@progress/kendo-charts 1.23.3-dev.202202251035 → 1.23.4-dev.202205040416

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.
@@ -1 +1 @@
1
- System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(nx){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;o=[function(t,e){t.exports=n},function(n,t,e){"use strict";e.r(t);var s={},d=(e.d(s,"NAVIGATOR_AXIS",function(){return Ul}),e.d(s,"NAVIGATOR_PANE",function(){return Hl}),"arc"),a="#000",S="bottom",A="center",u="circle",y="date",g=10,h=/\{\d+:?/,P="left",c=Number.MAX_VALUE,l=-Number.MAX_VALUE,p="none",T="right",f="string",M="top",v="value",x="#fff",_="x",O="y";function B(t){return Array.isArray(t)}function R(t,e){for(var o=B(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var E=/\s+/g;function L(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(E," "))}var b=e(0);function I(t){var e=.5;t.options.stroke&&b.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 z(t,e){return-t.x*e.y+t.y*e.x<0}function V(t){return"number"==typeof t&&!isNaN(t)}function j(t){return typeof t===f}function D(t){return V(t)||j(t)&&isFinite(t)}function H(t){return"function"==typeof t}var U="object",F="undefined";function m(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===U&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):H(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===U&&r||{},t(e[i],n)):s!==F&&(e[i]=n)}return e}(t,e[i]);return t}function N(t){return"object"==typeof t}function G(t){return V(t)?t+"px":t}var W=/width|height|top|left|bottom|right/i;function X(t,e){var o=j(e)?[e]:e;if(B(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=W.test(s)?parseFloat(r[s]):r[s]}return i}if(N(e))for(var a in e)t.style[a]=G(e[a])}function q(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[M]=o[T]=o[S]=o[P]=t:(o[M]=t[M]||e,o[T]=t[T]||e,o[S]=t[S]||e,o[P]=t[P]||e),o}function Y(){}var Z={compile:function(t){return t}},Q=(Y.register=function(t){Z=t},Y.compile=function(t){return Z.compile(t)},Y);function K(t){var e;return(t=void 0===t?{}:t).template?t.template=e=Q.compile(t.template):H(t.content)&&(e=t.content),e}var $=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,J={};function tt(t){if(J[t])return J[t];var r=[];return t.replace($,function(t,e,o,i){r.push(b.drawing.util.defined(e)?e:o||i)}),J[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},J[t]}function et(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function ot(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}J[void 0]=function(t){return t};function it(){this._map={}}it.prototype.get=function(t){return this._map[this._key(t)]},it.prototype.set=function(t,e){this._map[this._key(t)]=e},it.prototype._key=function(t){return t instanceof Date?t.getTime():t};var rt=it;function nt(t,e){if(e)return-1!==e.indexOf(t)}function st(t,e,o){return b.drawing.util.round(t+(e-t)*o,3)}function at(t,e){this.observer=t,this.handlerMap=m({},this.handlerMap,e)}at.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},at.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)},at.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 ht=at;function pt(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);b.drawing.util.defined(n)&&i.push(n)}return i}var lt=b.support.browser||{};function ct(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,lt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function ut(){}var o=b.drawing.util,dt=o.append,ft=o.bindEvents,w=o.defined,gt=o.deg,yt=o.elementOffset,vt=o.elementSize,mt=o.eventCoordinates,xt=o.eventElement,_t=o.hashKey,bt=o.last,wt=o.limitValue,Ct=o.objectKey,St=o.rad,k=o.round,kt=o.unbindEvents,At=o.valueOrDefault,Pt=(ut.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++,ut.fetchFonts(e,i,r),r.depth--))})},ut.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(b.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},ut.preloadFonts=function(t,e){var o=[];ut.fetchFonts(t,o),ut.loadFonts(o,e)},ut);function i(t,e){t=t.prototype;t.options?t.options=m({},t.options,e):t.options=e}function Tt(t){for(var e=c,o=l,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===c?void 0:e,max:o===l?void 0:o}}function Mt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Ot=b.geometry.Matrix,Bt=/matrix\((.*)\)/;function Rt(t){var t=getComputedStyle(t).transform;return"none"===t?Ot.unit():(t=t.match(Bt),null===t||2!==t.length?Ot.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Ot,[null].concat(t)))))}function Et(t){if(!t)return Ot.unit();for(var e=Rt(t),o=t.parentElement;o;)var i=Rt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Lt(t){return new b.Color(t).isDark()?x:a}function It(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}function zt(t){this._set=new Set(t)}var Vt={},o={size:{configurable:!0}},o=(It.prototype.values=function(){return this._values.filter(function(t){return t!==Vt})},It.prototype.has=function(t){return void 0!==this._index[t]},It.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},It.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Vt,delete this._index[t])},It.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(It.prototype,o),{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()},o.size.get=function(){return this._set.size},Object.defineProperties(zt.prototype,o);function jt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?zt:It)(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=k(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=k(t/e,g);return k(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(Ft=b.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 e=St(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=k(i+(r-i)*o+(n-t)*e,3),this.y=k(t+(n-t)*o-(r-i)*e,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=St(e);return new Gt(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};var Ft,Nt=Gt;function Gt(t,e){Ft.call(this),this.x=t||0,this.y=e||0}function Wt(t,e,o,i,r){r=St(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))}(Xt=b.Class)&&(qt.__proto__=Xt),((qt.prototype=Object.create(Xt&&Xt.prototype)).constructor=qt).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},qt.prototype.width=function(){return this.x2-this.x1},qt.prototype.height=function(){return this.y2-this.y1},qt.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},qt.prototype.move=function(t,e){var o=this.height(),i=this.width();return w(t)&&(this.x1=t,this.x2=this.x1+i),w(e)&&(this.y1=e,this.y2=this.y1+o),this},qt.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},qt.prototype.wrapPoint=function(t){var e=B(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new qt(o,e,o,e)),this},qt.prototype.snapTo=function(t,e){return e!==_&&e||(this.x1=t.x1,this.x2=t.x2),e!==O&&e||(this.y1=t.y1,this.y2=t.y2),this},qt.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===M||e===S?O:_,a=s==O?r:n;return e===A?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===M||e===P?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},qt.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},qt.prototype.expand=function(t,e){return this.shrink(-t,-e),this},qt.prototype.pad=function(t){t=q(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},qt.prototype.unpad=function(t){t=q(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},qt.prototype.clone=function(){return new qt(this.x1,this.y1,this.x2,this.y2)},qt.prototype.center=function(){return new Nt(this.x1+this.width()/2,this.y1+this.height()/2)},qt.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},qt.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)]},qt.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},qt.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},qt.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=Wt(0,0,r,i,t),s=Wt(e,0,r,i,t),a=Wt(e,o,r,i,t),r=Wt(0,o,r,i,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),o=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},qt.prototype.toRect=function(){return new b.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},qt.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},qt.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===_?"width":"height",n=this[e]();nt(o,[P,M])?(this[i]=t[i],this[r]=this[i]+n):nt(o,[T,S])?(this[r]=t[r],this[i]=this[r]-n):o===A&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};var Xt,C=qt;function qt(t,e,o,i){Xt.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function Yt(t,e){return t-e}(Kt=b.Class)&&(oe.__proto__=Kt),((oe.prototype=Object.create(Kt&&Kt.prototype)).constructor=oe).prototype.clone=function(){return new oe(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},oe.prototype.middle=function(){return this.startAngle+this.angle/2},oe.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},oe.prototype.point=function(t,e){var t=St(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=k(this.center.x-o*e,3),t=k(this.center.y-t*e,3);return new Nt(o,t)},oe.prototype.adjacentBox=function(t,e,o){var t=this.clone().expand(t),i=t.middle(),t=t.point(i),r=e/2,n=o/2,s=Math.sin(St(i)),i=Math.cos(St(i)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-i/Math.abs(i)),Math.abs(i)<.9&&(t+=n*-s/Math.abs(s)),new C(a,t,a+e,t+o)},oe.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,t=t.y-e.y,a=new Nt(s,t),r=this.point(r),r=new Nt(r.x-e.x,r.y-e.y),n=this.point(n),n=new Nt(n.x-e.x,n.y-e.y),e=k(s*s+t*t,3);return(r.equals(a)||z(r,a))&&!z(n,a)&&o*o<=e&&e<=i*i},oe.prototype.getBBox=function(){for(var t=new C(c,c,l,l),e=k(this.startAngle%360),o=k((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(Yt),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},oe.prototype.expand=function(t){return this.radius+=t,this};var Zt,Qt,Kt,$t=oe,Jt=((Qt=$t)&&(ee.__proto__=Qt),((ee.prototype=Object.create(Qt&&Qt.prototype)).constructor=ee).prototype.expand=function(t){return Qt.prototype.expand.call(this,t)},ee.prototype.clone=function(){return new ee(this.center,this.radius,this.startAngle,this.angle)},ee.prototype.setRadius=function(t){return this.radius=t,this},ee),o=((Zt=b.Class)&&(te.__proto__=Zt),((te.prototype=Object.create(Zt&&Zt.prototype)).constructor=te).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new b.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new b.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=b.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},te);function te(){Zt.apply(this,arguments)}function ee(t,e,o,i){Qt.call(this,t,0,e,o,i)}function oe(t,e,o,i,r){Kt.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}o.current=new o;var ie,re=o,o=((ie=b.Class)&&(ne.__proto__=ie),((ne.prototype=Object.create(ie&&ie.prototype)).constructor=ne).prototype.initUserOptions=function(t){return t},ne.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},ne.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},ne.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},ne.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},ne.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},ne.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},ne.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},ne.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},ne.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},ne.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},ne.prototype.createVisual=function(){this.visual=new b.drawing.Group({zIndex:this.options.zIndex,visible:At(this.options.visible,!0)})},ne.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=b.drawing.Animation.create(this.visual,this.options.animation))},ne.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):w(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},ne.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},ne.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},ne.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(At(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},ne.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)}},ne.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},ne.prototype.renderComplete=function(){},ne.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},ne.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:x,opacity:e||.2},stroke:{color:x,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);w(n.options.zIndex)||(n.options.zIndex=At(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},ne.prototype.createGradientOverlay=function(t,e,o){o=new b.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},ne.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},ne.prototype.supportsPointInactiveOpacity=function(){return!0},ne);function ne(t){ie.call(this),this.children=[],this.options=m({},this.options,this.initUserOptions(t))}o.prototype.options={};var se,ae=o,o=((se=ae)&&(he.__proto__=se),((he.prototype=Object.create(se&&se.prototype)).constructor=he).prototype.reflow=function(t){function l(){o.align(t,_,i.align),o.align(t,O,i.vAlign),o.paddingBox=e.clone().unpad(s).unpad(h)}var e,o=this,i=this.options,r=i.width,n=i.height,c=i.shrinkToFit,u=r&&n,s=i.margin,a=i.padding,h=i.border.width,p=t.clone();u&&(p.x2=p.x1+r,p.y2=p.y1+n),c&&p.unpad(s).unpad(h).unpad(a),se.prototype.reflow.call(this,p),e=u?this.box=new C(0,0,r,n):this.box,c&&u?(l(),p=this.contentBox=this.paddingBox.clone().unpad(a)):(p=this.contentBox=e.clone(),e.pad(a).pad(h).pad(s),l()),this.translateChildren(e.x1-p.x1+s.left+h+a.left,e.y1-p.y1+s.top+h+a.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},he.prototype.align=function(t,e,o){this.box.align(t,e,o)},he.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},he.prototype.createVisual=function(){se.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},he.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:At(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},he);function he(t){se.call(this,t),this.options.margin=q(this.options.margin),this.options.padding=q(this.options.padding)}i(o,{align:P,vAlign:M,margin:{},padding:{},border:{color:a,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var pe,le=o,o=((pe=le)&&(ce.__proto__=pe),((ce.prototype=Object.create(pe&&pe.prototype)).constructor=ce).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 b.drawing.Circle(new b.geometry.Circle([k(e.x1+n,3),k(e.y1+s,3)],Math.min(n,s)),h):"triangle"===o?a=b.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],h).close():"cross"===o?((a=new b.drawing.MultiPath(h)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(s=e.toRect(),"roundedRect"===o&&(n=At(t.borderRadius,s.width()/5),s.setCornerRadius(n)),a=b.drawing.Path.fromRect(s,h)),i&&a.transform(b.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},ce.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()},ce.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}},ce.prototype.createVisual=function(){this.visual=this.createElement()},ce);function ce(t,e){pe.call(this,t),this.pointData=e}i(o,{type:u,align:A,vAlign:A});var ue=o,de={glass:{type:"linear",rotation:0,stops:[{offset:0,color:x,opacity:0},{offset:.25,color:x,opacity:.3},{offset:1,color:x,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:x,opacity:.55},{offset:.65,color:x,opacity:0},{offset:.95,color:x,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:x,opacity:.06},{offset:.83,color:x,opacity:.2},{offset:.95,color:x,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:x,opacity:0},{offset:.5,color:x,opacity:.3},{offset:.99,color:x,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:x,opacity:.2},{offset:.15,color:x,opacity:.15},{offset:.17,color:x,opacity:.35},{offset:.85,color:x,opacity:.05},{offset:.87,color:x,opacity:.15},{offset:.99,color:x,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};(fe=ae)&&(ge.__proto__=fe),((ge.prototype=Object.create(fe&&fe.prototype)).constructor=ge).prototype.reflow=function(){var t=this.options,e=this.children,o=new C(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),l=Math.max(t.y2,e.y2),p=[];return p[0]=new C(i,s,r,a),p[1]=new C(o,a,i,h),p[2]=new C(r,a,n,h),p[3]=new C(i,h,r,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(p[4]=new C(o,s,i,a),p[5]=new C(r,h,n,l)):(p[4]=new C(r,s,n,a),p[5]=new C(o,h,i,l)),et(p,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new C},ge.prototype.createVisual=function(){this.visual=new b.drawing.Group,this.createBackground()},ge.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=b.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(o)},ge.prototype.getRoot=function(){return this},ge.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Ct(t),r=de[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new b.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 b.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},ge.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},ge.prototype.size=function(){var t=this.options;return new C(0,0,t.width,t.height)};var fe,o=ge;function ge(t){fe.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}i(o,{width:600,height:400,background:x,border:{color:a,width:0},margin:q(5),zIndex:-2});var ye,ve=o,o=((ye=ae)&&(me.__proto__=ye),((me.prototype=Object.create(ye&&ye.prototype)).constructor=me).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=_,this.elementAxis=O,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=O,this.elementAxis=_,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},me.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},me.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,o=this.groupAxis,l=this.elementSizeField,i=this.groupSizeField,r=this.groupOptions(),c=r.groups,u=r.groupsSize,r=r.maxGroupElementsSize,d=c.length,n=t[o+1]+this.alignStart(u,t[i]());if(d){for(var f=n,s=0;s<d;s++){for(var a=c[s],g=a.groupElements,y=t[e+1],v=g.length,m=0;m<v;m++){var x=g[m],h=this.elementSize(x),_=f+this.alignStart(h[i],a.groupSize),p=new C;p[o+1]=_,p[o+2]=_+h[i],p[e+1]=y,p[e+2]=y+h[l],x.reflow(p),y+=h[l]+this.elementSpacing}f+=a.groupSize+this.groupSpacing}t[o+1]=n,t[o+2]=n+u,t[e+2]=t[e+1]+r}},me.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===T||i===S?o=e-t:i===A&&(o=(e-t)/2),o},me.prototype.groupOptions=function(){for(var t=this.box,l=this.children,e=this.elementSizeField,c=this.groupSizeField,u=this.elementSpacing,d=this.groupSpacing,f=k(t[e]()),g=l.length,o=[],i=0,r=0,y=0,n=0,s=[],a=0;a<g;a++){var h=l[a],p=(h.box||h.reflow(t),this.elementSize(h));this.options.wrap&&k(r+u+p[e])>f&&(o.push({groupElements:s,groupSize:i,groupElementsSize:r}),n=Math.max(n,r),y+=d+i,r=i=0,s=[]),i=Math.max(i,p[c]),0<r&&(r+=u),r+=p[e],s.push(h)}return o.push({groupElements:s,groupSize:i,groupElementsSize:r}),{groups:o,groupsSize:y+=i,maxGroupElementsSize:n=Math.max(n,r)}},me.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},me.prototype.createVisual=function(){},me);function me(t){ye.call(this,t),this._initDirection()}i(o,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var xe,_e=o,be=b.drawing.Text,o=((xe=ae)&&(we.__proto__=xe),((we.prototype=Object.create(xe&&xe.prototype)).constructor=we).prototype.reflow=function(t){var e=this.options,e=e.size=b.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new C(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},we.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new be(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},we);function we(t,e){xe.call(this,e),this.content=t,this.reflow(new C)}i(o,{font:"12px sans-serif",color:a});var Ce=o;function Se(t){var e=t.origin,t=t.bottomRight();return new C(e.x,e.y,t.x,t.y)}var ke,Ae,Pe=/\n/m,Te=((Ae=le)&&(Oe.__proto__=Ae),((Oe.prototype=Object.create(Ae&&Ae.prototype)).constructor=Oe).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Pe),o=new _e({vertical:!0,align:t.align,wrap:!1}),i=m({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Ce(e[r].trim(),i);o.append(n)}},Oe.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=Se(i.clippedBBox()||new b.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Ae.prototype.reflow.call(this,t),o.rotation&&(i=q(o.margin),e=this.box.unpad(i),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=e.clone(),e.pad(i)))},Oe.prototype.createVisual=function(){var t=this.options;this.visual=new b.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Oe.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!w(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Ae.prototype.renderVisual.call(this))},Oe.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},Oe.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Oe.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,_,t.align),this.align(this.targetBox,O,t.vAlign),this.box},Oe.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,e=e.y,i=this.rotatedBox.center();return b.geometry.transform().translate(i.x-o,i.y-e).rotate(t,[o,e])},Oe),o=((ke=ae)&&(Me.__proto__=ke),((Me.prototype=Object.create(ke&&ke.prototype)).constructor=Me).prototype.reflow=function(t){ke.prototype.reflow.call(this,t),this.box.snapTo(t,_)},Me.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 Me(t),e.append(i)),i},Me);function Me(t){ke.call(this,t),this.append(new Te(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function Oe(t,e,o){Ae.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new C)}i(o,{color:a,position:M,align:A,margin:q(5),padding:q(5)});var Be,Re=o,o=((Be=Te)&&(Ee.__proto__=Be),((Ee.prototype=Object.create(Be&&Be.prototype)).constructor=Ee).prototype.visualContext=function(t){t=Be.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},Ee.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:xt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Ee.prototype.rotate=function(){var t,e;return this.options.alignRotation!==A?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Se(t.bbox(e.matrix()))):Be.prototype.rotate.call(this),this.box},Ee.prototype.rotationTransform=function(){var t=this.options,l=t.rotation;if(!l)return null;if(t.alignRotation===A)return Be.prototype.rotationTransform.call(this);var e=b.geometry.transform().rotate(l).matrix(),o=this.normalBox.toRect(),i=this.targetBox.toRect(),t=t.rotationOrigin||M,r=t===M||t===S?_:O,n=t===M||t===S?O:_,t=t===M||t===P?i.origin:i.bottomRight(),s=o.topLeft().transformCopy(e),a=o.topRight().transformCopy(e),c=o.bottomRight().transformCopy(e),o=o.bottomLeft().transformCopy(e),e=b.geometry.Rect.fromPoints(s,a,c,o),h={};h[n]=i.origin[n]-e.origin[n];var p,e=Math.abs(s[n]+h[n]-t[n]),t=Math.abs(a[n]+h[n]-t[n]),n=k(e,g)===k(t,g)?(p=s,a):t<e?(p=a,c):(p=s,o),t=p[r]+(n[r]-p[r])/2;return h[r]=i.center()[r]-t,b.geometry.transform().translate(h.x,h.y).rotate(l)},Ee);function Ee(t,e,o,i,r){Be.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new C)}i(o,{_autoReflow:!1});var Le,Ie=o,o=((Le=le)&&(ze.__proto__=Le),((ze.prototype=Object.create(Le&&Le.prototype)).constructor=ze).prototype.hide=function(){this.options.visible=!1},ze.prototype.show=function(){this.options.visible=!0},ze.prototype.render=function(){var t,e,o,i,r,n,s,a,h=this,p=this.options;p.visible&&(o=p.label,p=p.icon,i=new C,r=function(){return h},n=p.size,s=this.fields.text,w(o)&&o.visible&&((a=K(o))?s=a(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color="inside"===o.position?"#fff":p.background),this.label=new Te(s,m({},o)),this.label.aliasFor=r,"inside"!==o.position||w(n)||(p.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))),p.width=t||n||7,p.height=e||n||7,(a=new ue(m({},p))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new C),this.wrapperBox=i.wrap(a.box))},ze.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),l=r.line.length,p=r.position;r.visible&&(nt(p,[P,T])?p===P?(i=a.alignTo(t,p).translate(-l,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,p).translate(l,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))):p===S?(i=a.alignTo(t,p).translate(t.center().x-a.center().x,l),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,p).translate(t.center().x-a.center().x,-l),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,p),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},ze.prototype.createVisual=function(){Le.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},ze.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()):Le.prototype.renderVisual.call(this)},ze.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(I(t=b.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},ze.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},ze.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},ze.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},ze.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:xt(t),text:w(e.label)?e.label.text:"",visual:this.visual})},ze);function ze(t,e,o){Le.call(this,e),this.fields=t,this.chartService=o,this.render()}i(o,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:A,vAlign:A},line:{visible:!0},visible:!0,position:M,zIndex:2});function Ve(){}function je(t){this._intlService=t}function De(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Ge(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}var He=o,Ue={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},o={implementation:{configurable:!0}},Fe=(Ve.register=function(t){Ue=t},o.implementation.get=function(){return Ue},Object.defineProperties(Ve,o),Ve),Ne=/\{(\d+)(:[^\}]+)?\}/g,o={intl:{configurable:!0}},Ge=(o.intl.get=function(){return this._intlService||Fe.implementation},o.intl.set=function(t){this._intlService=t},je.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return j(t)&&t.match(h)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},je.prototype.localeAuto=function(t,i,r){var n=this.intl;return j(t)&&t.match(h)?t.replace(Ne,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(je.prototype,o),je),o={intl:{configurable:!0}};o.intl.get=function(){return this._intlService||Fe.implementation},o.intl.set=function(t){this._intlService=t,this.format.intl=t},De.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},De.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(De.prototype,o);function We(){}var Xe,qe=De,Ye=(We.register=function(t){Xe=t},We.create=function(t,e){if(Xe)return Xe.create(t,e)},We);function Ze(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new b.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),I(n),n}function Qe(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new b.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),I(e),e}(Ke=ae)&&($e.__proto__=Ke),(($e.prototype=Object.create(Ke&&Ke.prototype)).constructor=$e).prototype.initFields=function(){},$e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},$e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;N(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},$e.prototype.createLabels=function(){var t=this.options,e=t.vertical?T:A,o=m({},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))}}},$e.prototype.clearLabels=function(){this.children=et(this.children,function(t){return!(t instanceof Ie)}),this.labels=[]},$e.prototype.clearTitle=function(){var e=this;this.title&&(this.children=et(this.children,function(t){return t!==e.title}),this.title=void 0)},$e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},$e.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 C(r,e.y1,r,e.y2-t):new C(e.x1,i,e.x2-t,i)},$e.prototype.createTitle=function(){var t=this.options,t=m({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Te(t.text,t),this.append(t),this.title=t)},$e.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=m({},e,o[i]),r=(r.value=this.parseNoteValue(r.value),new He({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(w(r.options.position)?t.vertical&&!nt(r.options.position,[P,T])?r.options.position=t.reverse?P:T:t.vertical||nt(r.options.position,[M,S])||(r.options.position=t.reverse?S:M):t.vertical?r.options.position=t.reverse?P:T:r.options.position=t.reverse?S:M,this.append(r),this.notes.push(r))}},$e.prototype.parseNoteValue=function(t){return t},$e.prototype.renderVisual=function(){Ke.prototype.renderVisual.call(this),this.createPlotBands()},$e.prototype.createVisual=function(){Ke.prototype.createVisual.call(this),this.createBackground(),this.createLine()},$e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new b.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},$e.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)w(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(Ze(p,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},$e.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new b.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&I(e),(o=this._lineGroup=new b.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},$e.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},$e.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=b.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},$e.prototype.createPlotBands=function(){var l=this,t=this.options,e=t.plotBands||[],c=t.vertical,o=this.plotArea;if(0!==e.length){for(var i=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),u=et(this.pane.axes,function(t){return t.options.vertical!==l.options.vertical})[0],r=0;r<e.length;r++){var n=e[r],s=void 0,a=void 0,h=n.label,p=void 0,a=c?(s=(u||o.axisX).lineBox(),this.getSlot(n.from,n.to,!0)):(s=this.getSlot(n.from,n.to,!0),(u||o.axisY).lineBox());h&&(h.vAlign=h.position||P,p=this.createPlotBandLabel(h,n,new C(s.x1,a.y1,s.x2,a.y2))),0!==s.width()&&0!==a.height()&&(h=new b.geometry.Rect([s.x1,a.y1],[s.width(),a.height()]),s=b.drawing.Path.fromRect(h,{fill:{color:n.color,opacity:n.opacity},stroke:null}),i.append(s),p&&i.append(p))}this.appendVisual(i)}},$e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return w(t)&&t.visible&&((i=K(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)),(i=new Te(r,t)).reflow(o),i.renderVisual(),i.visual},$e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,l=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),c=t[n?"y1":"x1"],a={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},h=[],p=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=k(t[n]);nt(s,h)||n%o==0||l&&c===s||(a.position=s,p.append(Qe(a,e)),h.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),p.children},$e.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,l=o.length,n=r?"width":"height",i=i?i.box[n]():0,s=this.getActualTickSize()+e.margin+i,c=((this.getRoot()||{}).box||t)[n](),a=0,h=0;h<l;h++){var p=o[h].box[n]();p+s<=c&&(a=Math.max(a,p))}this.box=r?new C(t.x1,t.y1,t.x1+a+s,t.y2):new C(t.x1,t.y1,t.x2,t.y1+a+s),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},$e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},$e.prototype.labelTickIndex=function(t){return t.index},$e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,l=t.labels.mirror,c=this.getLabelsTickPositions(),r=0;r<e.length;r++){var n=e[r],s=this.labelTickIndex(n),a=i?n.box.height():n.box.width(),h=c[s],s=c[s+1],p=void 0,u=void 0,u=i?p=o?h+(s-h)/2-a/2:h-a/2:o?(p=h,s):(p=h-a/2)+a;this.positionLabel(n,l,p,u)}},$e.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,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=P):(n-=r+t.box.width(),t.options.rotationOrigin=T),t.box.move(n,o)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=M),new C(o,n,i,n+t.box.height()));t.reflow(s)},$e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},$e.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,s=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==s?s:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new C);return!0}},$e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?T:P,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?M:S),e.reflow(this.box))},$e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;w(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},$e.prototype.noteSlot=function(t){return this.getSlot(t)},$e.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,o=e?O:_;this.box.snapTo(t,o),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[o+1]-=this.lineBox()[o+1]-t[o+1],this.box[o+2]-=this.lineBox()[o+2]-t[o+2]},$e.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=K(e),n=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return n},$e.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},$e.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(e=this.options.vertical?O:_,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),o[e+1]-=t.start,o[e+2]+=t.end):(i[0].options.visible&&o.wrap(i[0].box),(e=i[i.length-1]).options.visible&&o.wrap(e.box))),o},$e.prototype.maxLabelOffset=function(){for(var t=this.options,l=t.vertical,t=t.reverse,c=this.labelsBetweenTicks(),e=this.getLabelsTickPositions(),o=l?O:_,u=this.labels,d=t?1:0,f=t?0:1,i=0,r=0,n=0;n<u.length;n++){var s=u[n],a=this.labelTickIndex(s),h=void 0,p=void 0;c?(h=e[a+d],p=e[a+f]):h=p=e[a],i=Math.max(i,h-s.box[o+1]),r=Math.max(r,s.box[o+2]-p)}return{start:i,end:r}},$e.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!w(n.min)||n.min<=o)||i<e&&0<r&&(!w(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var n=e-t,s=t,a=e;return t<o&&r<0?(s=wt(t,o,i),a=wt(t+n,o+n,i)):i<e&&0<r&&(a=wt(e,o,i),s=wt(e-n,o,i-n)),{min:s,max:a}},$e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},$e.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},$e.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),t=t?O:_,i=this.lineDir(),r=t+(1===i?1:2).toString();return{axis:t,axisOrigin:r,axisDir:i,lineBox:e,lineSize:o,lineStart:e[r]}},$e.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},$e.prototype.scaleToDelta=function(t,e){t=wt(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},$e.prototype.labelsBetweenTicks=function(){return!this.options.justified},$e.prototype.prepareUserOptions=function(){};var Ke,o=$e;function $e(t,e){void 0===e&&(e=new qe),Ke.call(this,t),this.chartService=e,this.options.visible||(this.options=m({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=m({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==p},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=m({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==p},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}i(o,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:a,visible:!0},title:{visible:!0,position:A},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:p,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:a,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Je=o,to="milliseconds",eo="seconds",oo="minutes",io="hours",ro="days",no="weeks",so="months",ao="years",ho=1e3,po=60*ho,lo=60*po,co=24*lo,uo=7*co,fo=31*co,go=365*co,yo={years:go,months:fo,weeks:uo,days:co,hours:lo,minutes:po,seconds:ho,milliseconds:1};function vo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*po}function mo(t,e){return new Date(t.getTime()+e)}function xo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function _o(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function bo(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=xo(t)).getHours(),o===ao?_o(a=new Date(t.getFullYear()+e,0,1),0):o===so?_o(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===no?_o(a=bo(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 mo(t,-o*co)}(t,r),7*e,ro),i):o===ro?_o(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===io?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),a=mo(s,(i.getTimezoneOffset()-s.getTimezoneOffset())*po+n*lo)):o===oo?0<(a=mo(t,e*po)).getSeconds()&&a.setSeconds(0):o===eo?a=mo(t,e*ho):o===to&&(a=mo(t,e)),o!==to&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function wo(t,e,o){return bo(xo(t),0,e,o)}function Co(t,e,o){t=xo(t);return t&&wo(t,e,o).getTime()===t.getTime()?t:bo(t,1,e,o)}function So(t,e){return t&&e?t.getTime()-e.getTime():-1}function ko(t,e){return t.getTime()-e}function Ao(t){if(B(t)){for(var e=[],o=0;o<t.length;o++)e.push(Ao(t[o]));return e}if(t)return xo(t).getTime()}function Po(t,e){return t&&e?Ao(t)===Ao(e):t===e}function To(t,e,o){return vo(t,e)/yo[o]}function Mo(t,e,o,i){var t=xo(t),r=xo(e);return(o===so?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+To(t,new Date(t.getFullYear(),t.getMonth()),ro)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===ao?t.getFullYear()-r.getFullYear()+Mo(t,new Date(t.getFullYear(),0),so,1)/12:o===ro||o===no?To(t,r,o):ko(t,e)/yo[o])/i}function Oo(t,e,o){return o===ao?e.getFullYear()-t.getFullYear():o===so?12*Oo(t,e,ao)+e.getMonth()-t.getMonth():o===ro?Math.floor(ko(e,t)/co):Math.floor(ko(e,t)/yo[o])}function Bo(t,e){return j(e)&&t.parseDate(e)||xo(e)}function Ro(t,e){if(B(e)){for(var o=[],i=0;i<e.length;i++)o.push(Bo(t,e[i]));return o}return Bo(t,e)}function Eo(t,e){return V(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Lo=Je)&&(Io.__proto__=Lo),((Io.prototype=Object.create(Lo&&Lo.prototype)).constructor=Io).prototype.initFields=function(){this._ticks={}},Io.prototype.categoriesHash=function(){return""},Io.prototype.clone=function(){var t=new Io(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Io.prototype.initUserOptions=function(t){var e=t.categories||[],o=w(t.min),i=w(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,i=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,i)),t},Io.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:V(t.min)?t.min%1:0,max:V(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Io.prototype.totalRangeIndices=function(t){var e=this.options,o=V(e.min)?e.min:0;return e=V(e.max)?e.max:V(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=wt(o,0,t.max),e=wt(e,0,t.max)),{min:o,max:e}},Io.prototype.range=function(){var t=this.options;return{min:V(t.min)?t.min:0,max:(V(t.max)?t:this.totalRange()).max}},Io.prototype.roundedRange=function(){return this.range()},Io.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Io.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(t-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:t}},Io.prototype.arrangeLabels=function(){Lo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Io.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?O:_)+1],i=i[t+2],o=r[0],r=bt(r),(o.box[t+1]>i||o.box[t+2]<e)&&(o.options.visible=!1),(r.box[t+1]>i||r.box[t+2]<e)&&(r.options.visible=!1))},Io.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Io.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Io.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Io.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},Io.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,e=e.reverse,i=this.scaleOptions(),r=i.scale,n=i.box,s=i.min,l=n[(o?O:_)+(e?2:1)],a=this.tickIndices(t),h=[],p=0;p<a.length;p++)h.push(l+k(r*(a[p]-s),3));return h},Io.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},Io.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?O:_,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)},Io.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,o=this.lineBox(),i=e?o.height():o.width(),e=e?O:_,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:o,lineSize:i,lineStart:o[r]}},Io.prototype.lineDir=function(){return this.options.reverse?-1:1},Io.prototype.getSlot=function(t,e,l){var o=this.options,i=o.reverse,o=o.justified,r=this.scaleOptions(),c=r.scale,n=r.box,r=r.min,s=this.lineInfo(),a=s.axis,s=s.lineStart,h=n.clone(),u=!w(e),t=At(t,0),e=At(e,t),e=Math.max(e-1,t),p=s+(t-r)*c,s=s+(Math.max(t,e)+1-r)*c;return u&&o&&(s=p),l&&(p=wt(p,n[a+1],n[a+2]),s=wt(s,n[a+1],n[a+2])),h[a+1]=i?s:p,h[a+2]=i?p:s,h},Io.prototype.limitSlot=function(t){var e=this.options.vertical?O:_,o=this.lineBox(),i=t.clone();return i[e+1]=wt(t[e+1],o[e+1],o[e+2]),i[e+2]=wt(t[e+2],o[e+1],o[e+2]),i},Io.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):V(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):V(e)&&(e-=i),Lo.prototype.slot.call(this,t,e,o)},Io.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,e=e.vertical?O:_,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,h=s[e+1],s=s[e+2],t=t[e];if(t<h||s<t)return null;e=(o?r:a)+(t-h)/n,s=e%1;return i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e)},Io.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Io.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Io.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},Io.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Io.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=k(t/(o/e),g);return{min:t,max:e+t}},Io.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.totalRangeIndices(),i=o.max-o.min,t=this.scaleToDelta(t,i),i=o.min+e*t,o=o.max-(1-e)*t;return{min:i,max:o=o-i<.1?i+.1:o}},Io.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,t=this.scaleRange(t,e);return{min:wt(t.min,i,o),max:wt(t.max,i,o)}},Io.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Io.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,i=i.max,n=Math.floor(r),i=e?(r=Math.ceil(r),Math.floor(i)):(r=Math.floor(r),Math.ceil(i));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-n,max:(t.categories.length?i+(e?1:0):0)-n}},Io.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=At(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new Ie(i,o,t,r,e)},Io.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Io.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},Io.prototype.arrangeNotes=function(){Lo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Io.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?O:_,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()}},Io.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=k(t/o,g),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},Io.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,o=o.vertical?O:_,r=this.totalRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[o+(i?2:1)],i=t[o]-n,t=e[o]-n,e=r.min+i/s,o=r.min+t/s,n=Math.min(e,o),i=Math.max(e,o);if(.01<=i-n)return{min:n,max:i}},Io.prototype.valueRange=function(){return this.range()},Io.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var o=t,i=e.srcCategories;if(o instanceof Date){for(var r=i.length,n=0;n<r;n++)if(Po(i[n],o))return n;return-1}return i.indexOf(o)},Io.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=V(t.min)?Math.floor(t.min):e,max:V(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Io.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new rt,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},Io.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Lo,o=Io;function Io(){Lo.apply(this,arguments)}i(o,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:a},labels:{zIndex:1},justified:!1,_deferLabels:!0});var zo=o,o={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"},Vo=[to,eo,oo,io,ro,no,so,ao],jo="fit";function Do(t){var e=t._range;return e||((e=t._range=Tt(t)).min=xo(e.min),e.max=xo(e.max)),e}function Ho(t){this.options=t}function Uo(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=bo(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&Po(e,s)&&!o.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),o.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=o.max)?(i=!n&&Po(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,i),this.displayEnd=r?this.roundToTotalStep(t,!n):o.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}Ho.prototype.displayIndices=function(){return{min:0,max:1}},Ho.prototype.displayRange=function(){return{}},Ho.prototype.total=function(){return{}},Ho.prototype.valueRange=function(){return{}},Ho.prototype.valueIndex=function(){return-1},Ho.prototype.values=function(){return[]},Ho.prototype.totalIndex=function(){return-1},Ho.prototype.valuesCount=function(){return 0},Ho.prototype.totalCount=function(){return 0},Ho.prototype.dateAt=function(){return null};function Fo(t,e,l){for(var o,i,r,n=Do(t.categories),c=(t.max||n.max)-(t.min||n.min),u=t.autoBaseUnitSteps,s=t.maxDateGroups,d=t.baseUnit===jo,f=e?Vo.indexOf(e):0,a=d?Vo[f++]:t.baseUnit,h=c/yo[a],p=h;!i||s<=h;){for(o=o||u[a].slice(0);(r=o.shift())&&e===a&&r<l;);if(r)h=p/(i=r);else{if(a===bt(Vo)){i=Math.ceil(p/s);break}if(!d){s<h&&(i=Math.ceil(p/s));break}a=Vo[f++]||bt(Vo),p=c/yo[a],o=null}}t.baseUnitStep=i,t.baseUnit=a}Uo.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Uo.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Mo(this.displayStart,this.valueStart,o,t),o=Mo(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},Uo.prototype.total=function(){return{min:this.start,max:this.end}},Uo.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Uo.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Uo.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Mo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Uo.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Mo(t,this.start,e.baseUnit,e.baseUnitStep))},Uo.prototype.dateIndex=function(t){var e=this.options;return Mo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Uo.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Uo.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=bo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Uo.prototype.dateAt=function(t,e){var o=this.options;return bo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Uo.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Mo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),bo(s,e*n,r,i)};(No=zo)&&(Wo.__proto__=No),((Wo.prototype=Object.create(No&&No.prototype)).constructor=Wo).prototype.clone=function(){var t=new Wo(Object.assign({},this.options),this.chartService);return t.createLabels(),t},Wo.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},Wo.prototype.initUserOptions=function(t){return t},Wo.prototype.initFields=function(){No.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Ro(e,i))._parsed=!0),o=m({roundToBaseUnit:!0},o,{categories:i,min:Bo(e,o.min),max:Bo(e,o.max),weekStartDay:Eo(o,e)}),t.panning&&t.isPannable(o.vertical?O:_)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=Do(i),t=o.maxDivisions,this.dataRange=new Uo(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==jo&&!nt(e,Vo)){for(var o,i,r=t,n=r.categories,l=w(n)?n.length:0,s=c,a=0;a<l;a++){var h,p=n[a];p&&o&&(0<(h=vo(p,o))&&(i=(s=Math.min(s,h))>=go?ao:fo-3*co<=s?so:uo<=s?no:co<=s?ro:lo<=s?io:po<=s?oo:eo)),o=p}r.baseUnit=i||ro}return e!==jo&&"auto"!==t.baseUnitStep||Fo(t),t}(o)),t?(i=this.dataRange.displayRange(),Fo(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 Uo(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||ro,this.dataRange=this.divisionRange=new Ho(o)),this.rangeLabels=[]},Wo.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return No.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},Wo.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=So(t,e.min)&&So(t,e.max)<=0&&o.length},Wo.prototype.parseNoteValue=function(t){return Bo(this.chartService.intl,t)},Wo.prototype.noteSlot=function(t){return this.getSlot(t)},Wo.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=k(t/r,g);return n.min&&n.max&&(r=mo(e.min||n.min,t),e=mo(e.max||n.max,t),n={min:bo(r,0,o,i),max:bo(e,0,o,i)}),n},Wo.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},Wo.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),i=this.dataRange.displayRange(),r=i.min,i=i.max,n=this.dataRange.total(),t=k(t/(o/(i-r)),g)*(e.reverse?-1:1),o=mo(r,t),r=mo(i,t),i=this.limitRange(Ao(o),Ao(r),Ao(n.min),Ao(n.max),t);return i?(i.min=xo(i.min),i.max=xo(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},Wo.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var t=No.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=ko(e.max,e.min)/(o.max-o.min),i=this.options;return{min:mo(e.min,t.min*o),max:mo(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}},Wo.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,l=o.userSetBaseUnit===jo,i=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,r=r.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-n),s=Math.round(e*t),e=Math.round((1-e)*t),a=this.dataRange.options.baseUnit,t=new Date(n.getTime()+s),s=new Date(r.getTime()-e);if(l){var h,p,c=o.autoBaseUnitSteps,e=o.maxDateGroups,l=bt(c[a])*e*yo[a],u=ko(r,n),d=ko(s,t),f=Vo.indexOf(a);if(d<yo[a]&&a!==to)a=Vo[f-1],t=mo(n,p=(u-(e-1)*(h=bt(c[a]))*yo[a])/2),s=mo(r,-p);else if(l<d&&a!==ao){var g=0;do{for(a=Vo[++f],g=0,p=2*yo[a];h=c[a][g],++g<c[a].length&&p*h<u;);}while(a!==ao&&p*h<u);0<(p=(p*h-u)/2)&&(t=mo(n,-p),s=mo(r,p),t=mo(t,wt(s,i.min,i.max)-s),s=mo(s,wt(t,i.min,i.max)-t))}}return t&&s&&0<ko(s,t)?{min:t,max:s,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},Wo.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<o.min&&(t.min=o.min),t.max>o.max&&(t.max=o.max)),t},Wo.prototype.range=function(){return this.dataRange.displayRange()},Wo.prototype.createLabels=function(){No.prototype.createLabels.call(this),this.createRangeLabels()},Wo.prototype.clearLabels=function(){No.prototype.clearLabels.call(this),this.rangeLabels=[]},Wo.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),No.prototype.arrangeLabels.call(this)},Wo.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(i=e?t.y1-o.box.height()/2:t.x1,this.positionLabel(o,r,i)),(o=n[1])&&(i=e?t.y2-o.box.height()/2:t.x2,this.positionLabel(o,r,i)))},Wo.prototype.autoRotateLabels=function(){No.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},Wo.prototype.hideOutOfRangeLabels=function(){No.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},Wo.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)}},Wo.prototype.contentBox=function(){for(var t=No.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},Wo.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,i=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,o.dataItem=i,this.axisLabelText(r,e,o));if(n)return new Ie(r,n,t,i,e)},Wo.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,o=this.options,r=Object.assign({},o.labels,o.rangeLabels,{align:A,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=A,"auto"===r.rotation&&(r.rotation=0,o.autoRotateRangeLabels=!0),o=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||o,(o=function(t,e,o){o&&(e=new Ie(e,o,t,null,r),i.append(e),i.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),o(1,t,this.axisLabelText(t,r,{index:1,count:2})))},Wo.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){e=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,e);0!==o&&(t.options.rotation=o,t.reflow(new C))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},Wo.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},Wo.prototype.slot=function(t,e,o){var i=this.dataRange,i=(t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e)),this.getSlot(t,e,o));if(i)return i.toRect()},Wo.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),No.prototype.getSlot.call(this,t,e,o)},Wo.prototype.valueRange=function(){var t=Do(this.options.srcCategories);return{min:xo(t.min),max:xo(t.max)}},Wo.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},Wo.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},Wo.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},Wo.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},Wo.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},Wo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},Wo.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},Wo.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},Wo.prototype.totalRange=function(){return this.dataRange.total()},Wo.prototype.totalCount=function(){return this.dataRange.totalCount()},Wo.prototype.isEmpty=function(){return!this.options.srcCategories.length},Wo.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Do(t.srcCategories);return new Uo(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()};var No,Go=Wo;function Wo(){No.apply(this,arguments)}i(Go,{type:y,labels:{dateFormats:o},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 Xo=Go;function qo(t,e){return k(Math.floor(t/e)*e,g)}function Yo(t,e){return k(Math.ceil(t/e)*e,g)}function Zo(t){return Math.max(Math.min(t,3e5),-3e5)}var Qo,Ko=Math.pow(10,-9),Go=((Qo=Je)&&($o.__proto__=Qo),(($o.prototype=Object.create(Qo&&Qo.prototype)).constructor=$o).prototype.initUserOptions=function(t){a=t.seriesMin,o=t.seriesMax,i=(r=t).narrowRange,e=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}(a),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;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(a,o,i),n=Ut(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&Jo(e,n,1/3)&&(e-=n),0<a&&Jo(a,n,1/3)&&(a+=n)),s.min=qo(e,n),s.max=Yo(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:w((a=t).min)?Math.min(e.min,a.min):e.min,max:w(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var l=s,c=["min","max"],h=0;h<c.length;h++){var u=c[h];null===l[u]&&(l[u]=void 0)}var d=w(s.min),f=w(s.max),p=d||f;p&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=qo(n.min,s.majorUnit),n.max=Yo(n.max,s.majorUnit)):p&&(a=m(n,s),n.majorUnit=Ut(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(p=m(n,a)).min>=p.max&&(d&&!f?p.max=p.min+p.majorUnit:!d&&f&&(p.min=p.max-p.majorUnit)),p},$o.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},$o.prototype.clone=function(){return new $o(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},$o.prototype.startValue=function(){return 0},$o.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},$o.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(k(e/t,3))+1},$o.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,l=i.lineBox,c=t*(i.lineSize/(o.max-o.min)),u=this.getDivisions(t),s=[],a=l[n],h=0;e&&(h=e/t);for(var p=0;p<u;p++)p%h!=0&&s.push(k(a,3)),a+=c*r;return s},$o.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},$o.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},$o.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,r=r.lineStart,h=s*(h/(i.max-i.min)),p=At(t,e||0),e=At(e,t||0),t=(o&&(p=wt(p,i.min,i.max),e=wt(e,i.min,i.max)),Math.min(p,e)-i.min),o=Math.max(p,e)-i.min,p=new C(a.x1,a.y1,a.x1,a.y1);return p[n+1]=Zo(r+h*(0<s?t:o)),p[n+2]=Zo(r+h*(0<s?o:t)),p},$o.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:k(e+t*(o-e),g)},$o.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=k(t/(n/(r-e)),g);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},$o.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},$o.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=k(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new Ie(i,o,t,null,e)},$o.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},$o.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},$o.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(o,t))return{min:o,max:t}},$o.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=(1-e)*t,e=k(this.options.min+e*t,g),t=k(this.options.max-o,g);return{min:e,max:t=t-e<Ko?e+Ko:t}},$o.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,t=this.scaleRange(t,e);return{min:wt(t.min,o,i),max:wt(t.max,o,i),narrowRange:!1}},$o.prototype.isValidRange=function(t,e){return Ko<e-t},$o);function $o(t,e,o,i){Qo.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function Jo(t,e,o){t=k(Math.abs(t%e),g);return 0===t||e*(1-o)<t}i(Go,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:a},labels:{format:"#.####################"},zIndex:1});var ti,ei=Go,Go=((ti=Je)&&(oi.__proto__=ti),((oi.prototype=Object.create(ti&&ti.prototype)).constructor=oi).prototype.clone=function(){return new oi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},oi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},oi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Oo(e.min,e.max,e.baseUnit)/t+1)},oi.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/ko(e.max,e.min),l=e.weekStartDay||0,h=[n],p=1;p<s;p++){var c=n+ko(bo(e.min,p*t,e.baseUnit,l),e.min)*a*i;h.push(k(c,3))}return h},oi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},oi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},oi.prototype.getSlot=function(t,e,o){return ei.prototype.getSlot.call(this,Bo(this.intlService,t),Bo(this.intlService,e),o)},oi.prototype.getValue=function(t){t=ei.prototype.getValue.call(this,t);return null!==t?xo(t):null},oi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},oi.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min,r=(0<r&&(s=bo(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new Ie(s,n,t,null,e)},oi.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,o=i?o.height():o.width(),n=this.range(),o=o/ko(n.max,n.min),n=k(t/o,g);return{min:mo(e.min,n=!i&&!r||i&&r?n:-n),max:mo(e.max,n),offset:n}},oi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=So(t,e.min)&&So(t,e.max)<=0},oi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Ao(t.min),Ao(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:xo(t.min),max:xo(t.max)}},oi.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);return{min:xo(o),max:xo(t)}},oi.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=e*t,e=(1-e)*t,t=xo(Ao(this.options.min)+o),o=xo(Ao(this.options.max)-e);return{min:t,max:o=o-t<1e3?xo(Ao(t)+1e3):o}},oi.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:xo(wt(Ao(t.min),this.totalMin,this.totalMax)),max:xo(wt(Ao(t.max),this.totalMin,this.totalMax))}},oi);function oi(t,l,e,c){var o,i,r,n,s,u,a,d,t=xo(t),l=xo(l),h=c.intl,e=e||{},p=(p=t,o=l,i=e=m(e||{},{min:Bo(h,e.min),max:Bo(h,e.max),axisCrossingValue:Ro(h,e.axisCrossingValues||e.axisCrossingValue),weekStartDay:Eo(e,h)}),p=i.min||p,o=i.max||o,r=i.baseUnit||(o&&p?(r=vo(o,p),n=io,go<=r?n=ao:fo<=r?n=so:uo<=r?n=no:co<=r&&(n=ro),n):io),n=yo[r],s=i.weekStartDay||0,p=wo(Ao(p)-1,r,s)||xo(o),o=Co(Ao(o)+1,r,s),u=i.majorUnit||Yo(Ut(p.getTime(),o.getTime()),n)/n,a=Yo(a=Oo(p,o,r),u)-a,d=Math.floor(a/2),a-=d,i.baseUnit||delete i.baseUnit,i.baseUnit=i.baseUnit||r,i.min=i.min||bo(p,-d,r,s),i.max=i.max||bo(o,a,r,s),i.minorUnit=i.minorUnit||u/5,i.majorUnit=u,e=i,ti.call(this,e,c),this.intlService=h,this.seriesMin=t,this.seriesMax=l,e.weekStartDay||0);this.totalMin=Ao(wo(Ao(t)-1,e.baseUnit,p)),this.totalMax=Ao(Co(Ao(l)+1,e.baseUnit,p))}i(Go,{type:y,majorGridLines:{visible:!0,width:1,color:a},labels:{dateFormats:o}});var ii,ri=Go,o=((ii=Je)&&(ni.__proto__=ii),((ni.prototype=Object.create(ii&&ii.prototype)).constructor=ni).prototype.clone=function(){return new ni(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ni.prototype.startValue=function(){return this.options.min},ni.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,l=i.majorUnit,s=i.min,i=i.max,a=this.lineInfo(),c=a.axis,h=a.axisDir,p=a.lineBox,u=a.lineSize,a=a.lineStart,u=h*(u/(n-r)),n=At(t,e||1),e=At(e,t||1);if(n<=0||e<=0)return null;o&&(n=wt(n,s,i),e=wt(e,s,i));n=ai(n,l),e=ai(e,l),t=Math.min(n,e)-r,o=Math.max(n,e)-r,s=new C(p.x1,p.y1,p.x1,p.y1);return s[c+1]=Zo(a+u*(0<h?t:o)),s[c+2]=Zo(a+u*(0<h?o:t)),s},ni.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:k(Math.pow(e,o+s*((i-o)/r)),g)},ni.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ni.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=k(t/(s/(i-o)),g);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},ni.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},ni.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},ni.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(Ze(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),i.visible&&this.traverseMinorTicksPositions(h,i),[]},ni.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){nt(t,n)||(r.position=t,s.append(Qe(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},ni.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(k(i+r*(a-n),g),e)},ni.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,l=o.minorUnit,c=o.majorUnit,o=this.lineInfo(),u=o.lineStart,d=o.step,n=this.logMin,f=this.logMax,s=Math.floor(n);s<f;s++)for(var a=this._minorIntervalOptions(s),h=e.skip;h<l;h+=e.step){var p=a.value+h*a.minorStep;if(r<p)break;i<=p&&t(k(u+d*(ai(p,c)-n),g),e)}},ni.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 Ie(i,o,t,null,e)},ni.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ni.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ni.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},ni.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=ai(this.options.min,o),r=ai(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),o=Math.pow(o,r-(1-e)*t);return{min:i,max:o=o-i<1e-6?i+1e-6:o}},ni.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,o=this.totalMax;return{min:wt(t.min,e,o),max:wt(t.max,e,o)}},ni.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,e=e.majorUnit,i=Math.pow(e,t);return{value:i,minorStep:(Math.pow(e,t+1)-i)/o}},ni.prototype.lineInfo=function(){var t=ii.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},ni);function ni(l,t,e,c){var u,d,o,i,r,n=m({majorUnit:10,min:l,max:t},e),s=n.majorUnit,a=(a=k(ai(r=t,h=s),g)%1,r<=0?h:0!=a&&(a<.3||.9<a)?Math.pow(h,ai(r,h)+.2):Math.pow(h,Math.ceil(ai(r,h)))),h=(r=l,o=(h=n).majorUnit,(i=r)<=0?i=t<=1?Math.pow(o,-2):1:h.narrowRange||(i=Math.pow(o,Math.floor(ai(r,o)))),i),p=(r=h,o=a,i=e,u=(p=n).min,d=p.max,w(p.axisCrossingValue)&&p.axisCrossingValue<=0&&si(),w(i.max)?i.max<=0&&si():d=o,w(i.min)?i.min<=0&&si():u=r,{min:u,max:d});n.max=p.max,n.min=p.min,n.minorUnit=e.minorUnit||k(s-1,g),ii.call(this,n,c),this.totalMin=w(e.min)?Math.min(h,e.min):h,this.totalMax=w(e.max)?Math.max(a,e.max):a,this.logMin=k(ai(p.min,s),g),this.logMax=k(ai(p.max,s),g),this.seriesMin=l,this.seriesMax=t,this.createLabels()}function si(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function ai(t,e){return Math.log(t)/Math.log(e)}i(o,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:a},zIndex:1,_deferLabels:!0});var hi,pi=o,Go={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),dt(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){i=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,i)},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 b.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new b.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,e=this.intervals(e,o,i,r),o=t.options,s=o.visible&&!1!==(o.line||{}).visible;return pt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},o=((hi=zo)&&(li.__proto__=hi),((li.prototype=Object.create(hi&&hi.prototype)).constructor=li).prototype.range=function(){return{min:0,max:this.options.categories.length}},li.prototype.reflow=function(t){this.box=t,this.reflowLabels()},li.prototype.lineBox=function(){return this.box},li.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new C,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()))}},li.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,l=o||1,h=[],p=e||0;p<s;p+=l)r=n.reverse?360-p*a:p*a,r=k(r,3)%360,i&&nt(r,i)||h.push(r);return h},li.prototype.majorIntervals=function(){return this.intervals(1)},li.prototype.minorIntervals=function(){return this.intervals(.5)},li.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},li.prototype.majorAngles=function(){var e=this;return pt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},li.prototype.createLine=function(){return[]},li.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},li.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,e=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,e)},li.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==d)return t=St(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&nt(t,r)?e:i}},li.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new b.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),a=(r.startAngle+=s*n.angle,Math.ceil(i.to)-i.to),a=(r.angle-=(a+s)*n.angle,re.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},li.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},li.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,o=(o.reverse&&!i&&(t=(t+1)%s),n[t=wt(Math.floor(t),0,s-1)]),n=(i&&(o-=a/2)<0&&(o+=360),a*(wt(Math.ceil(e||t),t,s-1)-t+1));return new $t(r.center(),0,r.height()/2,o,n)},li.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new b.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},li.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},li);function li(){hi.apply(this,arguments)}i(o,{startAngle:90,labels:{margin:q(10)},majorGridLines:{visible:!0},justified:!0}),m(o.prototype,Go);var ci,ui=o,o=((ci=Je)&&(di.__proto__=ci),((di.prototype=Object.create(ci&&ci.prototype)).constructor=di).prototype.getDivisions=function(t){return ei.prototype.getDivisions.call(this,t)-1},di.prototype.reflow=function(t){this.box=t,this.reflowLabels()},di.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 C,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()))}},di.prototype.lineBox=function(){return this.box},di.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&&nt(p,i)||s.push(p)}return s},di.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},di.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},di.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},di.prototype.createLine=function(){return[]},di.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},di.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,e=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,e)},di.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},di.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=wt(t,o.min,o.max),e=wt(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(o=t,t=e,e=o),new $t(i.center(),0,i.height()/2,t,e-t)},di.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),t=Math.max(t,e),e=o.reverse?(s=n,t):(s=360-t,360-n),s=(s+i)%360;return new b.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},di.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,t=t.y-o.y,o=Math.round(gt(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},di.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},di);function di(t,e){ci.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}i(o,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:q(10)},majorGridLines:{color:a,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),m(o.prototype,Go,{createPlotBands:ui.prototype.createPlotBands,majorAngles:ui.prototype.majorAngles,range:ei.prototype.range,labelsCount:ei.prototype.labelsCount,createAxisLabel:ei.prototype.createAxisLabel});var fi=o;function gi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var yi,Go={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 b.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 $t(r,r.y-a.y2,r.y-a.y1,0,360),a=e===d?re.current.createRing(a,h):b.drawing.Path.fromPoints(this.plotBandPoints(a,i),h).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new b.geometry.Circle(r,t.innerRadius),s=new b.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(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),dt(r,this.renderGridLines(t,o,i,e.minorGridLines))),r},renderGridLines:function(t,e,o,i){var l={stroke:{width:i.width,color:i.color,dashType:i.dashType}},r=i.skip,n=(void 0===r&&(r=0),i.step);void 0===n&&(n=0);for(var s=this.gridLinesVisual(),a=r;a<e.length;a+=n){var c=t.y-e[a];if(0<c){var u=new b.geometry.Circle([t.x,t.y],c);if(i.type===d)s.append(new b.drawing.Circle(u,l));else{for(var h=new b.drawing.Path(l),p=0;p<o.length;p++)h.lineTo(u.pointAt(o[p]+180));h.close(),s.append(h)}}}return s.children},getValue:function(t){var e,o,i=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==d&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(gt(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return gi(t,o)-gi(e,o)}),r=90-gi(n[0],n[1])/2,t=180-gi(o,n[0])-r,a=s*(Math.sin(St(t))/Math.sin(St(r)))),this.axisType().prototype.getValue.call(this,new Nt(i.x1,i.y2-a))}},o=((yi=ei)&&(vi.__proto__=yi),((vi.prototype=Object.create(yi&&yi.prototype)).constructor=vi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},vi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},vi.prototype.axisType=function(){return yi},vi);function vi(){yi.apply(this,arguments)}m(o.prototype,Go);var mi,xi=o,o=((mi=pi)&&(_i.__proto__=mi),((_i.prototype=Object.create(mi&&mi.prototype)).constructor=_i).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},_i.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},_i.prototype.axisType=function(){return mi},_i);function _i(){mi.apply(this,arguments)}m(o.prototype,Go);var bi=o;function wi(t){return t<=0?-1:1}(Si=b.Class)&&(Ti.__proto__=Si),((Ti.prototype=Object.create(Si&&Si.prototype)).constructor=Ti).prototype.process=function(t){var e=t.slice(0),o=[],l=this.closed,i=e.length;if(2<i&&(this.removeDuplicates(0,e),i=e.length),i<2||2===i&&e[0].equals(e[1]))return o;var c,r=e[0],n=e[1],s=e[2];for(o.push(new b.geometry.Segment(r));r.equals(e[i-1]);)l=!0,e.pop(),i--;if(2===i)return t=this.tangent(r,n,_,O),bt(o).controlOut(this.firstControlPoint(t,r,n,_,O)),o.push(new b.geometry.Segment(n,this.secondControlPoint(t,r,n,_,O))),o;l?(r=e[i-1],n=e[0],s=e[1],h=(t=this.controlPoints(r,n,s))[1],c=t[0]):(t=this.tangent(r,n,_,O),h=this.firstControlPoint(t,r,n,_,O));for(var a,h,u=h,p=0;p<=i-3;p++)this.removeDuplicates(p,e),p+3<=(i=e.length)&&(r=e[p],n=e[p+1],s=e[p+2],a=this.controlPoints(r,n,s),bt(o).controlOut(u),u=a[1],a=a[0],o.push(new b.geometry.Segment(n,a)));return l?(r=e[i-2],n=e[i-1],s=e[0],t=this.controlPoints(r,n,s),bt(o).controlOut(u),o.push(new b.geometry.Segment(n,t[0])),bt(o).controlOut(t[1]),o.push(new b.geometry.Segment(s,c))):(h=this.tangent(n,s,_,O),bt(o).controlOut(u),o.push(new b.geometry.Segment(s,this.secondControlPoint(h,n,s,_,O)))),o},Ti.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)},Ti.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},Ti.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||k(i,1)===k(o.y,1)},Ti.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Ti.prototype.controlPoints=function(t,e,o){var i,r=_,n=O,s=!1,a=!1,h=(this.isLine(t,e,o)?i=this.tangent(t,e,_,O):(h={x:this.isMonotonicByField(t,e,o,_),y:this.isMonotonicByField(t,e,o,O)}).x&&h.y?(i=this.tangent(t,o,_,O),s=!0):(this.invertAxis(t,e,o)&&(r=O,n=_),h[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?wi((o[n]-t[n])*(e[r]-t[r])):-wi((o[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(i,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(i,e,o,r,n));return s&&(this.restrictControlPoint(t,e,h,i),this.restrictControlPoint(e,o,a,i)),[h,a]},Ti.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)},Ti.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],e=e[i]-t[i];return 0==o?0:e/o},Ti.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Ti.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)},Ti.prototype.secondControlPoint=function(t,e,o,i,r){var e=e[i],n=o[i],e=.333*(n-e);return this.point(n-e,o[r]-e*t,i,r)},Ti.prototype.point=function(t,e,o,i){var r=new b.geometry.Point;return r[o]=t,r[i]=e,r},Ti.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};var Ci,Si,ki=Ti,Ai=((Ci=b.Class)&&(Pi.__proto__=Ci),((Pi.prototype=Object.create(Ci&&Ci.prototype)).constructor=Pi).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Pi.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Pi.prototype.range=function(){return this._axis.range()},Pi.prototype.valueRange=function(){return this._axis.valueRange()},Pi);function Pi(t){Ci.call(this),this._axis=t,this.options=t.options}function Ti(t){Si.call(this),this.closed=t}function Mi(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Ai(e[o])}function Oi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Oi.prototype.findAxisByName=function(t){return Mi(t,this._pane.axes)};var Bi,Ri=Oi,Ei=((Bi=b.Class)&&(Li.__proto__=Bi),(Li.prototype=Object.create(Bi&&Bi.prototype)).constructor=Li);function Li(t){Bi.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Ii(t){for(var e=t.length,o=0,i=0;i<e;i++)V(t[i])&&o++;return o}var zi={min:function(t){for(var e=t.length,o=c,i=0;i<e;i++){var r=t[i];V(r)&&(o=Math.min(o,r))}return o===c?t[0]:o},max:function(t){for(var e=t.length,o=l,i=0;i<e;i++){var r=t[i];V(r)&&(o=Math.max(o,r))}return o===l?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];V(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Ii(t)?zi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&w(r)&&o++}return o},avg:function(t){var e=Ii(t),o=t[0];return o=0<e?zi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&w(i))return i}return t[0]}},Vi=zi;function ji(t,e){return null===e?e:tt(t)(e)}(Di=b.Class)&&(Hi.__proto__=Di),((Hi.prototype=Object.create(Di&&Di.prototype)).constructor=Hi).prototype.register=function(t,e,o){void 0===e&&(e=[v]),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)}},Hi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Hi.prototype.valueFields=function(t){return this._valueFields[t.type]||[v]},Hi.prototype.otherFields=function(t){return this._otherFields[t.type]||[v]},Hi.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=w(o)?o:a[e],a={valueFields:{value:o}},e=this.valueFields(t),h=this._otherFields[t.type];return null===o?i=this._nullValue[t.type]:w(o)?Array.isArray(o)?(r=o.slice(e.length),i=this._bindFromArray(o,e),r=this._bindFromArray(r,h)):"object"==typeof o&&(n=this.sourceFields(t,e),s=this.sourceFields(t,h),i=this._bindFromObject(o,e,n),r=this._bindFromObject(o,h,s)):i=this._undefinedValue[t.type],w(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Hi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Hi.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},Hi.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},Hi.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===v?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o};var Di,Go=Hi;function Hi(){Di.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Go.current=new Go;var Ui,Fi,Ni=Go,Gi=/percent(?:\w*)\((\d+)\)/,Wi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Xi=((Fi=b.Class)&&(hr.__proto__=Fi),((hr.prototype=Object.create(Fi&&Fi.prototype)).constructor=hr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,h=Wi.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}})},hr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ni.current,n=r.valueFields(t),i=w(i[0])?i[0]:{};return B(i)?o=tt("["+(e?n.indexOf(e):0)+"]"):V(i)?o=tt():"object"==typeof i&&(o=tt(r.sourceFields(t,n)[n.indexOf(e)])),o},hr.prototype.getErrorRange=function(t,e){var o;if(!w(e))return null;if(this.globalRange)return this.globalRange(t);if(B(e))i=t-e[0],r=t+e[1];else if(V(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Gi.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(o[1])/100),i=t-Math.abs(e),r=t+Math.abs(e)}return{low:i,high:r}},hr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},hr.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]);V(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},hr.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);V(n)&&(o+=n,i++)}return{value:o/i,count:i}},hr),qi=(b.support.browser||{}).msie?.001:0,Yi="zero",Zi="interpolate",Qi="bar",Ki="column",$i="line",Ji="pie",tr="verticalLine",er=[Qi,Ki,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],or="drag",ir="dragEnd",rr="zoom",nr="zoomEnd",sr="DOMMouseScroll mousewheel",o=((Ui=ae)&&(ar.__proto__=Ui),((ar.prototype=Object.create(Ui&&Ui.prototype)).constructor=ar).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,i),s=i?n.x:n.y,a=s-t,s=s+t;i?(e=[new Nt(n.x,r.y1),new Nt(n.x,r.y2)],o&&e.push(new Nt(a,r.y1),new Nt(s,r.y1),new Nt(a,r.y2),new Nt(s,r.y2)),this.box=new C(a,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,a),new Nt(r.x1,s),new Nt(r.x2,a),new Nt(r.x2,s)),this.box=new C(r.x1,a,r.x2,s)),this.linePoints=e},ar.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},ar.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()},ar.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Ui.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new b.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);I(r),this.visual.append(r)}},ar);function ar(t,e,o,i,r,n){Ui.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function hr(t,e,o){Fi.call(this),this.initGlobalRanges(t,e,o)}i(o,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var pr,lr=o,cr=((pr=lr)&&(ur.__proto__=pr),((ur.prototype=Object.create(pr&&pr.prototype)).constructor=ur).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},ur);function ur(){pr.apply(this,arguments)}function dr(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)!nt(r,o.excluded)&&t.hasOwnProperty(r)&&(H(n=t[r])?(h=!0,i||(t[r]=At(n(e),s[r]))):N(n)&&(i||(o.defaults=s[r]),o.depth++,h=dr(n,e,o,i)||h,o.depth--));return h}function fr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}(gr=ae)&&(yr.__proto__=gr),((yr.prototype=Object.create(gr&&gr.prototype)).constructor=yr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},yr.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=m({},o,{vertical:!this.options.invertAxes},t)),i},yr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&V(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||V(h.value)&&(r+=Math.abs(h.value),i.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},yr.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,l=!1,s=0;s<o.length;s++){var a=o[s];if(t===a)break;var h=t.series.stack,p=a.series.stack;if(h&&p){if(typeof h===f&&h!==p)continue;if(h.group&&h.group!==p.group)continue}h=this.plotValue(a);(0<=h&&r||h<0&&!r)&&(n+=h,i+=h,l=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return l&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,D(t.value)?t.value:e]},yr.prototype.stackLimits=function(t,e){for(var o=c,i=l,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],w(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},yr.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,Tt(n.negative).min)),n.positive.length&&(h.max=Math.max(h.max,Tt(n.positive).max))),h.min!==c||h.max!==l?i[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},yr.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;V(h)&&V(e)?i={low:h,high:e}:a&&w(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Xi(a.value,n,v),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},yr.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},o={categoryIx:e,series:n}),this.updateRange({value:a},o)),new cr(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},yr.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,t=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<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:i,high:t}},yr.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o],s=(n||(this.categoryPoints[o]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,w(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)},yr.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],n=(w(a)||(this._evalSeries[n]=a=dr(t,{},s,!0)),t);return a&&dr(n=m({},n),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},yr.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,o=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((o=this.valueAxisRanges[e]=o||{min:c,max:l}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},yr.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},yr.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,i=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=h[l++],n=a[i];n||(a[i]=n=s.categorySlot(p,i,e)),r&&(i=s.plotRange(r,e.startValue()),(o=s.valueSlot(e,i))?(n=s.pointSlot(n,o),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=i[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},yr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},yr.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(bt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},yr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},yr.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},yr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},yr.prototype.reflowPoint=function(t,e){t.reflow(e)},yr.prototype.reflowCategories=function(){},yr.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new C(i.x1,o.y1,i.x2,o.y2)},yr.prototype.categorySlot=function(t,e){return t.getSlot(e)},yr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=fr(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)},yr.prototype._outOfRangeCallback=function(t,e,o,i){var r,e=t[e];e&&(r=e.categoryIx,i(this._bindPoint(t,o,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:o,dataItem:e.item}))},yr.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]=Ni.current.bindPoint(t,o,i))},yr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},yr.prototype.pointValue=function(t){return t.valueFields.value};var gr,Go=yr;function yr(t,e){gr.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()}i(Go,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var vr,mr=Go,xr={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:xt(t),originalEvent:t,point:this}}},o={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&w(e)&&null!==e&&(this.note=new He({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Go=((vr=ae)&&(_r.__proto__=vr),((_r.prototype=Object.create(vr&&vr.prototype)).constructor=_r).prototype.render=function(){var t,e,o=this.options,i=o.markers,o=o.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(i=K(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new Te(e,m({align:A,vAlign:A,margin:{left:5,right:5},zIndex:At(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},_r.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=m({color:this.color},t.border);return w(t.color)||(t.color=new b.Color(e).brightness(.8).toHex()),t},_r.prototype.createVisual=function(){},_r.prototype.createMarker=function(){var t=this.options.markers;return new ue({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:At(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},_r.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},_r.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical,r=(this.render(),(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&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(i=t.center(),t=new C(i.x,i.y,i.x,i.y)),this.note.reflow(t))},_r.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?M:e)?S:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},_r.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),i=new ue({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:At(t.border.opacity,1)},opacity:At(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},_r.prototype.highlightVisual=function(){return(this.marker||{}).visual},_r.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,o=this.box.center(),i=new b.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},_r.prototype.tooltipAnchor=function(){var t,e,o=this.markerBox(),i=this.owner.pane.clipBox();if(!i||i.overlaps(o))return i=o.x2+5,e=P,o=this.aboveAxis?(t=o.y1,S):(t=o.y2,M),{point:new Nt(i,t),align:{horizontal:e,vertical:o}}},_r.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},_r.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},_r.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},_r.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},_r);function _r(t,e){vr.call(this),this.value=t,this.options=e,this.aboveAxis=At(this.options.aboveAxis,!0),this.tooltipTracking=!0}Go.prototype.defaults={vertical:!0,markers:{visible:!0,background:x,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:q(3),padding:q(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},m(Go.prototype,xr),m(Go.prototype,o);var br,wr=Go,Go=((br=ae)&&(Cr.__proto__=br),((Cr.prototype=Object.create(br&&br.prototype)).constructor=Cr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Cr.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},Cr.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&&!w(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Cr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(H(o)&&i&&(o=i.color),b.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&i.close(),this.visual=i},Cr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Cr);function Cr(t,e,o){br.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}i(Go,{closed:!1});var Sr=Go;function kr(t,e,o,i,r){var t=t.box,n=new b.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var Ar,Go={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,l=e.justified,c=e.vertical,e=e.reverse,o=c?_:O,i=c?O:_,r=e?2:1,u=r,n=kr(t[0],o,r,i,u),s=[n],a=1;a<t.length;a++){var h,p=kr(t[a],o,r,i,u);n[o]!==p[o]&&((h=new b.geometry.Point)[o]=n[o],h[i]=p[i],s.push(h,p)),n=p}return l?n!==bt(s)&&s.push(n):s.push(kr(bt(t),o,r,i,e?1:2)),s}},Pr=((Ar=Sr)&&(Tr.__proto__=Ar),((Tr.prototype=Object.create(Ar&&Ar.prototype)).constructor=Tr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Tr);function Tr(){Ar.apply(this,arguments)}m(Pr.prototype,Go);var Mr,Or,Br=Pr,Rr=((Or=Sr)&&(Ir.__proto__=Or),((Ir.prototype=Object.create(Or&&Or.prototype)).constructor=Ir).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(H(o)&&e&&(o=e.color),new ki(this.options.closed).process(this.points())),o=new b.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});o.segments.push.apply(o.segments,e),this.visual=o},Ir),Pr={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,l=o.length;this._segments=[];for(var r=0;r<l;r++){for(var n=i[r],s=this.sortPoints(o[r]),c=s.length,a=[],h=0;h<c;h++){var p=s[h];p?a.push(p):this.seriesMissingValues(n)!==Zi&&(1<a.length&&(t=this.createSegment(a,n,r,t),this._addSegment(t)),a=[])}1<a.length&&(t=this.createSegment(a,n,r,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?Yi:t||Zi},getNearestPoint:function(t,e,o){for(var i,r=new Nt(t,e),n=this.seriesPoints[o],s=c,a=0;a<n.length;a++){var h,p=n[a];p&&w(p.value)&&null!==p.value&&!1!==p.visible&&((h=p.box.center().distanceTo(r))<s&&(i=p,s=h))}return i}},Er=((Mr=b.drawing.Animation)&&(Lr.__proto__=Mr),((Lr.prototype=Object.create(Mr&&Mr.prototype)).constructor=Lr).prototype.setup=function(){this._setEnd(this.options.box.x1)},Lr.prototype.step=function(t){var e=this.options.box;this._setEnd(st(e.x1,e.x2,t))},Lr.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)},Lr);function Lr(){Mr.apply(this,arguments)}function Ir(){Or.apply(this,arguments)}i(Er,{duration:600}),b.drawing.AnimationFactory.current.register("clip",Er);var zr=Er;function Vr(t){for(var e=0;e<t.length;e++)if(w(t[e].zIndex))return!0}var jr,Er={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=b.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new zr(t,{box:e}),Vr(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&w(i.visual.options.zIndex)&&i.visual.clip(t)}}},Dr=((jr=mr)&&(Hr.__proto__=jr),((Hr.prototype=Object.create(jr&&jr.prototype)).constructor=Hr).prototype.render=function(){jr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Hr.prototype.pointType=function(){return wr},Hr.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.seriesMissingValues(r),s=t.valueFields.value;if(!w(s)||null===s){if(n!==Yi)return null;s=0}n=this.pointOptions(r,e),n=this.evalPointOptions(n,s,i,o,r,e),i=t.fields.color||r.color,H(r.color)&&(i=n.color),o=new wr(s,n);return o.color=i,this.append(o),o},Hr.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]},Hr.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Br:"smooth"===i?Rr:Sr)(t,e,o)},Hr.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)},Hr.prototype.supportsPointInactiveOpacity=function(){return!1},Hr);function Hr(){jr.apply(this,arguments)}m(Dr.prototype,Pr,Er);var Ur,Fr,Nr=Dr,Gr=((Fr=Sr)&&(Xr.__proto__=Fr),((Xr.prototype=Object.create(Fr&&Fr.prototype)).constructor=Xr).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;H(i)&&e&&(i=e.color),this.visual=new b.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:m({color:i,opacity:t.opacity,lineCap:"butt"},o)})},Xr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Xr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Xr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Xr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Xr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new b.geometry.Segment(t)})},Xr.prototype.createStroke=function(t){t=new b.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Xr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Xr.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),dt(o,r)),new b.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Xr.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(i),i=i.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=bt(e).anchor(),i=o?i.x1:i.y1;o?t.lineTo(i,e.y).lineTo(i,r.y):t.lineTo(e.x,i).lineTo(r.x,i)},Xr),Dr=((Ur=Gr)&&(Wr.__proto__=Ur),((Wr.prototype=Object.create(Ur&&Ur.prototype)).constructor=Wr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Wr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Wr);function Wr(){Ur.apply(this,arguments)}function Xr(t,e,o,i,r){Fr.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}m(Dr.prototype,Go);var qr,Yr,Zr,Qr,Kr=Dr,$r=((Qr=Gr)&&(nn.__proto__=Qr),((nn.prototype=Object.create(Qr&&Qr.prototype)).constructor=nn).prototype.createStrokeSegments=function(){var t=new ki(this.options.closed),e=this.points();return t.process(e)},nn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new b.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},nn),Jr=((Zr=Nr)&&(rn.__proto__=Zr),((rn.prototype=Object.create(Zr&&Zr.prototype)).constructor=rn).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?Kr:"smooth"===a?$r:Gr)(t,e,o,r,n)},rn.prototype.reflow=function(t){Zr.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)}},rn.prototype._gapStackPoints=function(t,l,e){var o=this.seriesPoints,i=t[0].categoryIx,t=t.length,c=(i<0&&(i=0,t--),i+t),u=this.seriesOptions[0]._outOfRangeMinPoint?1:0,r=[];this._stackPoints=this._stackPoints||[];for(var n=i;n<c;n++){for(var s,a=n+u,h=l,p=void 0;p=o[--h][a],0<h&&!p;);p?("step"!==e&&i<n&&!o[h][a-1]&&r.push(this._previousSegmentPoint(n,a,a-1,h)),r.push(p),"step"!==e&&n+1<c&&!o[h][a+1]&&r.push(this._previousSegmentPoint(n,a,a+1,h))):(s=this._createGapStackPoint(n),this._stackPoints.push(s),r.push(s))}return r},rn.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},rn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new wr(0,e);return e.categoryIx=t,e.series={},e},rn.prototype.seriesMissingValues=function(t){return t.missingValues||Yi},rn.prototype.supportsPointInactiveOpacity=function(){return!1},rn),tn=((Yr=b.Class)&&(on.__proto__=Yr),((on.prototype=Object.create(Yr&&Yr.prototype)).constructor=on).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:c,max:l},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},on.prototype.reset=function(t){this.axisRanges[t]=void 0},on.prototype.query=function(t){return this.axisRanges[t]},on),Dr=((qr=ae)&&(en.__proto__=qr),((en.prototype=Object.create(qr&&qr.prototype)).constructor=en).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},en.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?A:P,n.vAlign=o?M:A,"insideEnd"===e.position?o?(n.vAlign=M,!i&&s.height()<t.height()&&(n.vAlign=S)):n.align=i?T:P:e.position===A?(n.vAlign=A,n.align=A):"insideBase"===e.position?o?n.vAlign=i?S:M:n.align=i?P:T:"outsideEnd"===e.position&&(h=o?i?new C(t.x1,t.y1-s.height(),t.x2,t.y1):new C(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=A,i?new C(t.x2,t.y1,t.x2+s.width(),t.y2):new C(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)},en.prototype.alignToClipBox=function(t){var e=this.options.vertical?O:_,o=e+"1",e=e+"2",i=this.children[0],r=this.parent.box;(r[o]<t[o]||t[e]<r[e])&&((i=i.paddingBox.clone())[o]=Math.max(r[o],t[o]),i[e]=Math.min(r[e],t[e]),this.reflow(i))},en);function en(t,e,o){qr.call(this,e),this.textBox=new Te(t,this.options,o),this.append(this.textBox)}function on(){Yr.call(this),this.axisRanges={}}function rn(){Zr.apply(this,arguments)}function nn(){Qr.apply(this,arguments)}i(Dr,{position:"outsideEnd",margin:q(3),padding:q(4),color:a,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var sn=Dr;function an(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}(hn=ae)&&(pn.__proto__=hn),((pn.prototype=Object.create(hn&&hn.prototype)).constructor=pn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},pn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=K(i))?e(t):this.formatValue(i.format),this.label=new sn(e,m({vertical:o.vertical},i),t),this.append(this.label))},pn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},pn.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)},pn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(hn.prototype.createVisual.call(this),i?(i=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 b.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},pn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(w(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=b.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)&&(I(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),an(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},m({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},pn.prototype.createHighlight=function(t){return I(b.drawing.Path.fromRect(this.box.toRect(),t))},pn.prototype.highlightVisual=function(){return this.rectVisual},pn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},pn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=w(e)?e:new b.Color(t).brightness(o).toHex()},pn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=P,p=M;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=S)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(p=S,t=s?(h=T,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,h=T),Math.max(n.y1,a.y1))),{point:new Nt(t,i),align:{horizontal:h,vertical:p}}},pn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},pn.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}};var hn,Dr=pn;function pn(t,e){hn.call(this),this.options=e,this.color=e.color||x,this.aboveAxis=At(this.options.aboveAxis,!0),this.value=t}m(Dr.prototype,xr),m(Dr.prototype,o),Dr.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var ln=Dr;function cn(t,e){t.forEach(e)}function un(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}(dn=ae)&&(fn.__proto__=dn),((fn.prototype=Object.create(dn&&dn.prototype)).constructor=fn).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?O:_,a=n+o+r*(n-1),h=(e?i.height():i.width())/a,p=i[s+1]+o/2*h;this.forEach(t,function(t,e){var o=(t.box||i).clone();o[s+1]=p,o[s+2]=p+h,t.reflow(o),e<n-1&&(p+=h*r),p+=h})};var dn,Dr=fn;function fn(t){dn.call(this,t),this.forEach=t.rtl?un:cn}i(Dr,{vertical:!1,gap:0,spacing:0});var gn,yn=Dr,Dr=((gn=ae)&&(vn.__proto__=gn),((vn.prototype=Object.create(gn&&gn.prototype)).constructor=vn).prototype.reflow=function(t){for(var e=this.options.vertical?_:O,o=this.children,i=o.length,r=this.box=new C,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))}},vn);function vn(){gn.apply(this,arguments)}i(Dr,{vertical:!0});var mn,xn=Dr,Dr=((mn=mr)&&(_n.__proto__=mn),((_n.prototype=Object.create(mn&&mn.prototype)).constructor=_n).prototype.render=function(){mn.prototype.render.call(this),this.updateStackRange()},_n.prototype.pointType=function(){return ln},_n.prototype.clusterType=function(){return yn},_n.prototype.stackType=function(){return xn},_n.prototype.stackLimits=function(t,e){return mn.prototype.stackLimits.call(this,t,e)},_n.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,l=this.children,s=n.isStacked,a=this.pointValue(t),h=this.pointOptions(r,e),p=h.labels,p=(s&&"outsideEnd"===p.position&&(p.position="insideEnd"),h.isStacked=s,t.fields.color||r.color),t=(a<0&&h.negativeColor&&(p=h.negativeColor),h=this.evalPointOptions(h,a,i,o,r,e),H(r.color)&&(p=h.color),new(this.pointType())(a,h)),i=(t.color=p,l[o]);return i||(i=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),(s?this.getStackWrap(r,i):i).append(t),t},_n.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},_n.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(o=o.getSlot(e,e,!0),t[(e=i.invertAxes?_:O)+1]=t[e+2]=o[e+1]),t},_n.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},_n.prototype.createAnimation=function(){this._setAnimationOptions(),mn.prototype.createAnimation.call(this),Vr(this.options.series)&&this._setChildrenAnimation()},_n.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&w(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},_n.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 b.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},_n);function _n(){mn.apply(this,arguments)}i(Dr,{animation:{type:Qi}});var bn,wn=Dr,Dr=((bn=ae)&&(Cn.__proto__=bn),((Cn.prototype=Object.create(bn&&bn.prototype)).constructor=Cn).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=e.getSlot(o.open,o.close),e=e.getSlot(o.low,o.high),o=(i.x1=e.x1=t.x1,i.x2=e.x2=t.x2,this.realBody=i,e.center().x),t=[];t.push([[o,e.y1],[o,i.y1]]),t.push([[o,i.y2],[o,e.y2]]),this.lines=t,this.box=e.clone().wrap(i),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},Cn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Cn.prototype.createVisual=function(){bn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Cn.prototype.mainVisual=function(t){var e=new b.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Cn.prototype.createBody=function(t,e){var o=b.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:At(e.border.opacity,e.opacity)}),I(o),t.append(o),an(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},m({end:e.vertical?void 0:[0,1]},e.overlay)))},Cn.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Cn.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:At(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=b.drawing.Path.fromPoints(o[n],r);I(s),t.append(s)}},Cn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=w(e)?e:new b.Color(this.color).brightness(t._brightness).toHex()},Cn.prototype.createOverlay=function(){var t=b.drawing.Path.fromRect(this.box.toRect(),{fill:{color:x,opacity:0},stroke:null});this.visual.append(t)},Cn.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(m({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},Cn.prototype.highlightVisual=function(){return this._mainVisual},Cn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Cn.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:P,vertical:M}}},Cn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Cn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Cn);function Cn(t,e){bn.call(this,e),this.value=t}i(Dr,{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:{}}}),m(Dr.prototype,xr),m(Dr.prototype,o);var Sn=Dr;function kn(t){return Ii(t)===t.length}(An=mr)&&(Pn.__proto__=An),((Pn.prototype=Object.create(An&&An.prototype)).constructor=Pn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Pn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,l=e.seriesIx,c=this.children,s=this.options,a=t.valueFields,h=kn(this.splitValue(a)),u=n.data[i],p=this.categoryPoints[i],h=(p||(this.categoryPoints[i]=p=[]),h&&(o=this.createPoint(t,e)),c[i]);h||(h=new yn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),o&&(this.updateRange(a,e),h.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=l,o.owner=this,o.dataItem=u,o.noteText=t.fields.noteText),this.points.push(o),p.push(o)},Pn.prototype.pointType=function(){return Sn},Pn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.pointType(),s=t.valueFields,a=m({},r),h=t.fields.color||r.color,a=this.evalPointOptions(a,s,i,o,r,e),i=("candlestick"===r.type&&s.open>s.close&&(h=t.fields.downColor||r.downColor||r.color),H(r.color)&&(h=a.color),a.vertical=!this.options.invertAxes,new n(s,a));return i.color=h,i},Pn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Pn.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:c,max:l};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},Pn.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)},Pn.prototype.animationPoints=function(){return this.points};var An,Dr=Pn;function Pn(){An.apply(this,arguments)}m(Dr.prototype,Er);var Tn,Mn=Dr,Dr=((Tn=Sn)&&(On.__proto__=Tn),((On.prototype=Object.create(Tn&&Tn.prototype)).constructor=On).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,i=this.owner.seriesValueAxis(i),n=(this.boxSlot=o=i.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=i.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),i.getSlot(r.median));r.mean&&(i=i.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,i)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(o),this.reflowNote()},On.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},On.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},On.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},On.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]]]},On.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},On.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],h=m({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),h=(w(h.color)||(w(this.color)?h.color=this.color:h.color=new b.Color(e.background).brightness(.8).toHex()),new ue({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:h,opacity:e.opacity}));h.value=a,n.push(h)}return this.reflowOutliers(n),n},On.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)}},On.prototype.mainVisual=function(t){for(var e=Tn.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},On.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)},On.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Tn.prototype.getBorderColor.call(this)},On);function On(t,e){Tn.call(this,t,e),this.createNote()}i(Dr,{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:x,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:x,border:{width:2,opacity:1},opacity:0}}),m(Dr.prototype,xr);var Bn,Rn,En,Ln=Dr,In=((En=Ln)&&(Hn.__proto__=En),((Hn.prototype=Object.create(En&&En.prototype)).constructor=Hn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Hn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Hn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Hn.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]]]},Hn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Hn),zn=((Rn=Mn)&&(Dn.__proto__=Rn),((Dn.prototype=Object.create(Rn&&Rn.prototype)).constructor=Dn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,l=e.seriesIx,c=this.children,s=this.options,a=t.valueFields,h=kn(this.splitValue(a)),u=n.data[i],p=this.categoryPoints[i],h=(p||(this.categoryPoints[i]=p=[]),h&&(o=this.createPoint(t,e)),c[i]);h||(h=new yn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),o&&(this.updateRange(a,e),h.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=l,o.owner=this,o.dataItem=u),this.points.push(o),p.push(o)},Dn.prototype.pointType=function(){return this.options.invertAxes?In:Ln},Dn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Dn.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));w(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:c,max:l},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},Dn.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)},Dn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];w(r)&&null!==r&&o.push(r)}return o},Dn.prototype.supportsPointInactiveOpacity=function(){return!1},Dn),Vn=((Bn=lr)&&(jn.__proto__=Bn),((jn.prototype=Object.create(Bn&&Bn.prototype)).constructor=jn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},jn);function jn(){Bn.apply(this,arguments)}function Dn(){Rn.apply(this,arguments)}function Hn(){En.apply(this,arguments)}function Un(t){return w(t)&&null!==t}(Fn=ae)&&(Nn.__proto__=Fn),((Nn.prototype=Object.create(Fn&&Fn.prototype)).constructor=Nn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Nn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Nn.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"];V(r)&&(V(p)&&V(o)&&(i={low:p,high:o}),h&&w(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Xi(h[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),i&&this.addPointErrorBar(i,t,e))},Nn.prototype.addPointErrorBar=function(t,e,o){var i=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=o===O,a={},s=(e[o+"Low"]=i,e[o+"High"]=t,e.errorBars=e.errorBars||[],new Vn(i,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[o]=i,this.updateRange(a,r),a[o]=t,this.updateRange(a,r)},Nn.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=Un(i)&&Un(r)?t:this.createMissingValue(t,s))&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,_,e),this.addErrorBar(o,O,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},Nn.prototype.seriesMissingValues=function(t){return t.missingValues},Nn.prototype.createMissingValue=function(){},Nn.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[i],s=this.yAxisRanges[e];Un(r)&&(n=this.xAxisRanges[i]=n||{min:c,max:l},j(r)&&(r=Bo(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Un(t)&&(s=this.yAxisRanges[e]=s||{min:c,max:l},j(t)&&(t=Bo(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Nn.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],r=(w(s)||(this._evalSeries[r]=s=dr(t,{},n,!0)),t);return s&&dr(r=m({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Nn.prototype.pointType=function(){return wr},Nn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=m({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},Nn.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=(H(o.color)&&(r=i.color),new wr(t,i));return e.color=r,this.append(e),e},Nn.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(!o)throw new Error("Unable to locate Y axis with name "+t);return{x:i,y:o}},Nn.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++],e=r.seriesAxes(e.series),i=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);o&&(i&&e?(t=r.pointSlot(i,e),o.reflow(t)):o.visible=!1)}),this.box=t},Nn.prototype.pointSlot=function(t,e){return new C(t.x1,e.y1,t.x2,e.y2)},Nn.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,m({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},Nn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Nn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var Fn,Dr=Nn;function Nn(t,e){Fn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(Dr,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),m(Dr.prototype,Er,{_bindPoint:mr.prototype._bindPoint});var Gn,Wn=Dr,Dr=((Gn=wr)&&(Xn.__proto__=Gn),((Xn.prototype=Object.create(Gn&&Gn.prototype)).constructor=Xn).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 b.drawing.Group,s=new b.drawing.Circle(new b.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}]})}),i=new b.drawing.Circle(new b.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new b.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,i),n},Xn);function Xn(t,e){Gn.call(this,t,e),this.category=t.category}Dr.prototype.defaults=m({},Dr.prototype.defaults,{labels:{position:A},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Dr.prototype.defaults.highlight.zIndex=void 0;var qn,Yn=Dr,Dr=((qn=Wn)&&(Zn.__proto__=qn),((Zn.prototype=Object.create(qn&&qn.prototype)).constructor=Zn).prototype._initFields=function(){this._maxSize=l,qn.prototype._initFields.call(this)},Zn.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)),qn.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Zn.prototype.reflow=function(t){this.updateBubblesSize(t),qn.prototype.reflow.call(this,t)},Zn.prototype.pointType=function(){return Yn},Zn.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,i=e.pointIx*(600/i),r={delay:i,duration:600-i,type:"bubble"},n=e.color||o.color,i=(t.size<0&&o.negativeValues.visible&&(n=At(o.negativeValues.color,n)),m({labels:{animation:{delay:i,duration:600-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:u,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(H(o.color)&&(n=i.color),i.markers.background=n,new Yn(t,i));return r.color=n,this.append(r),r},Zn.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],l=this.seriesPoints[i],c=(r.minSize||Math.max(.02*o,10))/2,n=(r.maxSize||.2*o)/2,u=Math.PI*c*c,d=(Math.PI*n*n-u)/this._maxSize,s=0;s<l.length;s++){var a,h,p=l[s];p&&(a=Math.abs(p.value.size)*d,a=Math.sqrt((u+a)/Math.PI),h=At(p.options.zIndex,0)+(1-a/n),m(p.options,{zIndex:h,markers:{size:2*a,zIndex:h},labels:{zIndex:h+1}}))}},Zn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},Zn.prototype.createAnimation=function(){},Zn.prototype.createVisual=function(){},Zn);function Zn(){qn.apply(this,arguments)}i(Dr,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Qn,Kn=Dr,Dr=((Qn=ue)&&($n.__proto__=Qn),($n.prototype=Object.create(Qn&&Qn.prototype)).constructor=$n);function $n(){Qn.apply(this,arguments)}m(Dr.prototype,xr);var Jn,ts=Dr,Dr=((Jn=ae)&&(es.__proto__=Jn),((es.prototype=Object.create(Jn&&Jn.prototype)).constructor=es).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,w(this.value.target)&&(this.target=new ts({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:M,align:T}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},es.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),i=i.categorySlot(i.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:i,i=r?i:n;o&&(n=new C(s.x1,i.y1,s.x2,i.y2),o.options.height=r?n.height():e.target.line.width,o.options.width=r?e.target.line.width:n.width(),o.reflow(n)),this.note&&this.note.reflow(t),this.box=t},es.prototype.createVisual=function(){Jn.prototype.createVisual.call(this);var t=this.options,e=b.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:At(t.border.opacity,t.opacity)}),I(this.bodyVisual=e),this.visual.append(e)},es.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=b.drawing.Animation.create(this.bodyVisual,this.options.animation))},es.prototype.createHighlight=function(t){return b.drawing.Path.fromRect(this.box.toRect(),t)},es.prototype.highlightVisual=function(){return this.bodyVisual},es.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},es.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},es);function es(t,e){Jn.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||x,this.value=t}Dr.prototype.tooltipAnchor=ln.prototype.tooltipAnchor,i(Dr,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),m(Dr.prototype,xr),m(Dr.prototype,o);var os,is=Dr,Dr=((os=mr)&&(rs.__proto__=os),((rs.prototype=Object.create(os&&os.prototype)).constructor=rs).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},rs.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},rs.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,s=this.children,a=t.valueFields,h=m({vertical:!n.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:n.invertAxes},r),t=t.fields.color||r.color,h=this.evalPointOptions(h,a,i,o,r,e),i=(H(r.color)&&(t=h.color),new is(a,h)),e=(i.color=t,s[o]);return e||(e=new yn({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),e.append(i),i},rs.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];w(o)&&!isNaN(o)&&w(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:c,max:l}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},rs.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},rs.prototype.pointValue=function(t){return t.valueFields.current},rs.prototype.aboveAxis=function(t){return 0<t.value.current},rs.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()}},rs);function rs(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||B(n[0])||N(n[0])||(r.data=[n])}os.call(this,t,e)}Dr.prototype._setAnimationOptions=wn.prototype._setAnimationOptions,i(Dr,{animation:{type:Qi}});var ns,ss=Dr,Dr=((ns=b.Class)&&(as.__proto__=ns),((as.prototype=Object.create(ns&&ns.prototype)).constructor=as).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=At(o,e),i=At(i,e)),q(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:G(t.border.width),paddingTop:G(e.top),paddingBottom:G(e.bottom),paddingLeft:G(e.left),paddingRight:G(e.right)}},as.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new b.Color(o.backgroundColor);w(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},as.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},as.prototype.destroy=function(){delete this.chartService},as);function as(t,e){ns.call(this),this.chartService=t,this.options=m({},this.options,e)}i(Dr,{border:{width:1},opacity:1});(hs=Dr)&&(ls.__proto__=hs),((ls.prototype=Object.create(hs&&hs.prototype)).constructor=ls).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},ls.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)},ls.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},ls.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,i=i.padding,n=!o.axis.options.vertical,o=o.line.bbox(),n=n?(t=A,r===S?(e=M,o.bottomLeft().translate(0,i)):(e=S,o.topLeft().translate(0,-i))):(e=A,r===P?(t=T,o.topLeft().translate(-i,0)):(t=P,o.topRight().translate(i,0)));return{point:n,align:{horizontal:t,vertical:e}}};var hs,ps=ls;function ls(t,e,o){hs.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}i(ps,{padding:10});var cs,us=ps,ps=((cs=ae)&&(ds.__proto__=cs),((ds.prototype=Object.create(cs&&cs.prototype)).constructor=ds).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},ds.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},ds.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?O:_,n=new b.geometry.Point(i.x1,i.y1),o=o?new b.geometry.Point(i.x2,i.y1):new b.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)},ds.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?_:O,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},ds.prototype.createVisual=function(){cs.prototype.createVisual.call(this);var t=this.options;this.line=new b.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},ds.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),cs.prototype.destroy.call(this)},ds);function ds(t,e,o){cs.call(this,o),this.axis=e,this.stickyMode=e instanceof zo;o=this.options.tooltip;o.visible&&(this.tooltip=new us(t,this,m({},o,{stickyMode:this.stickyMode})))}i(ps,{color:a,width:2,zIndex:-1,tooltip:{visible:!1}});var fs,gs=ps,ps=((fs=ae)&&(ys.__proto__=fs),((ys.prototype=Object.create(fs&&fs.prototype)).constructor=ys).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},ys.prototype._clipBox=function(){return this.pane.chartsBox()},ys.prototype.createVisual=function(){var t;this.visual=new b.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),I(t=b.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},ys.prototype.stackRoot=function(){return this},ys.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)))}},ys.prototype.destroy=function(){fs.prototype.destroy.call(this),delete this.parent},ys);function ys(t,e){fs.call(this,t),this.pane=e}ps.prototype.isStackRoot=!0;var vs,ms=ps,ps=((vs=le)&&(_s.__proto__=vs),((_s.prototype=Object.create(vs&&vs.prototype)).constructor=_s).prototype.createTitle=function(){var t=this.options.title;N(t)&&(t=m({},t,{align:t.position,position:M})),this.title=Re.buildTitle(t,this,_s.prototype.options.title)},_s.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},_s.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},_s.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},_s.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=[]},_s.prototype.reflow=function(t){var e;bt(this.children)===this.content&&(e=this.children.pop()),vs.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},_s.prototype.visualStyle=function(){var t=vs.prototype.visualStyle.call(this);return t.zIndex=-10,t},_s.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},_s.prototype.stackRoot=function(){return this},_s.prototype.clipRoot=function(){return this},_s.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&&dt(h,s.createGridLines(t))},_s.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()},_s.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new C,i=0;i<e;i++){var r=t[i],n=r.options.vertical?O:_,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},_s.prototype.clipBox=function(){return this.chartContainer.clipBox},_s.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Ri(this),index:this.paneIndex,name:this.options.name})},_s),xs=1;function _s(t){vs.call(this,t),this.id="pane"+xs++,this.createTitle(),this.content=new ae,this.chartContainer=new ms({},this),this.append(this.content),this.axes=[],this.charts=[]}ps.prototype.isStackRoot=!0,i(ps,{zIndex:-1,shrinkToFit:!0,title:{align:P},visible:!0});var bs=ps;function ws(t,e){null!==e&&t.push(e)}function Cs(t,e,o){e=e.visible;if(w(e))return e;e=t.pointVisibility;return e?e[o]:void 0}function Ss(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Ni.current.bindPoint(t,n),a=s.valueFields.value;V(a=j(a)?parseFloat(a):a)?(s.visible=!1!==Cs(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 ks(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function As(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];nt(n.type,i)&&o.push(n)}return o}function Ps(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Bo(o,tt(t)(e)),e[i]=r),r}function Ts(t,e){t=t.type,e=e instanceof Date;return!t&&e||ks(t,y)}function Ms(t){return 1===t.length?t[0]:t}var Os=/area/i;function Bs(t,e){var o,i=Ni.current.bindPoint(t,null,e).valueFields;for(o in i)if(D(i[o]))return!0}function Rs(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,l=t.series,p=i;h(p+=r)&&(e=Bs(l,(o=a(p)).item)),n<=p&&p<=s&&!e;);if(e)return o}function Es(t,e,o,i,l){var r,n,s,a,h=e.min,e=e.max,p=0<h&&h<o,c=e+1<o;(p||c)&&(((a=t).missingValues||(Os.test(a.type)||a.stack?Yi:Zi))!==Zi?(p&&(r=i(h-1)),c&&(n=i(e+1))):(p&&(r=Bs(t,(s=i(h-1)).item)?s:Rs({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:l,series:t})),c&&(n=Bs(t,(s=i(e+1)).item)?s:Rs({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:l,series:t}))),r&&(t._outOfRangeMinPoint=r),n&&(t._outOfRangeMaxPoint=n))}(Ls=ae)&&(Is.__proto__=Ls),((Is.prototype=Object.create(Ls&&Ls.prototype)).constructor=Is).prototype.initFields=function(){},Is.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Is.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=m({title:{color:t.color}},e),s=0;s<i;s++){var a=m({},n,o[s]),a=(j(a.title)&&(a.title=m({text:a.title},n.title)),new bs(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Is.prototype.crosshairOptions=function(t){return t.options.crosshair},Is.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&&(r=new gs(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},Is.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}},Is.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Is.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]},Is.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},Is.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Is.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},Is.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Is.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},Is.prototype.addToLegend=function(t){for(var l=t.length,e=this.options.legend,c=e.labels||{},u=e.inactiveItems||{},o=u.labels||{},d=[],i=0;i<l;i++){var r,n,s,a,h=t[i],p=!1!==h.visible;!1!==h.visibleInLegend&&(r=h.name,(s=!p&&K(o)||K(c))&&(r=s({text:Un(r)?r:"",series:h})),s=h._defaults,s=void(H(n=h.color)&&s&&(n=s.color)),a=void 0,a=p?(s={},n):(s={color:o.color,font:o.font},u.markers.color),Un(r)&&""!==r&&d.push({text:r,labels:s,markerColor:a,series:h,active:p}))}dt(e.items,d)},Is.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)}},Is.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},Is.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},Is.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=q(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},Is.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),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()},Is.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},Is.prototype.alignAxisTo=function(t,e,o,i){var o=t.getSlot(o,o,!0),r=t.options.reverse?2:1,i=e.getSlot(i,i,!0),n=e.options.reverse?2:1,i=t.box.translate(i[_+n]-o[_+r],i[O+n]-o[O+r]);t.pane!==e.pane&&i.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(i)},Is.prototype.alignAxes=function(t,e){for(var l=t[0],c=e[0],u=this.axisCrossingValues(l,e),d=this.axisCrossingValues(c,t),f={},g={},y={},v={},o=0;o<e.length;o++){var i=e[o],r=i.pane,n=r.id,m=!1!==i.options.visible,r=Vs(t,r)||l,x=u;r!==l&&(x=this.axisCrossingValues(r,e)),this.alignAxisTo(i,r,d[o],x[o]),i.options._overlap||(k(i.lineBox().x1)===k(r.lineBox().x1)&&(f[n]&&i.reflow(i.box.alignTo(f[n].box,P).translate(-i.options.margin,0)),m&&(f[n]=i)),k(i.lineBox().x2)===k(r.lineBox().x2)&&(i._mirrored||(i.options.labels.mirror=!i.options.labels.mirror,i._mirrored=!0),this.alignAxisTo(i,r,d[o],x[o]),g[n]&&i.reflow(i.box.alignTo(g[n].box,T).translate(i.options.margin,0)),m&&(g[n]=i)),0!==o&&c.pane===i.pane&&(i.alignTo(c),i.reflow(i.box)))}for(var s=0;s<t.length;s++){var a=t[s],h=a.pane,p=h.id,_=!1!==a.options.visible,h=Vs(e,h)||c,b=d;h!==c&&(b=this.axisCrossingValues(h,t)),this.alignAxisTo(a,h,u[s],b[s]),a.options._overlap||(k(a.lineBox().y1)===k(h.lineBox().y1)&&(a._mirrored||(a.options.labels.mirror=!a.options.labels.mirror,a._mirrored=!0),this.alignAxisTo(a,h,u[s],b[s]),y[p]&&a.reflow(a.box.alignTo(y[p].box,M).translate(0,-a.options.margin)),_&&(y[p]=a)),k(a.lineBox().y2,3)===k(h.lineBox().y2,3)&&(v[p]&&a.reflow(a.box.alignTo(v[p].box,S).translate(0,a.options.margin)),_&&(v[p]=a)),0!==s&&(a.alignTo(l),a.reflow(a.box)))}},Is.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=zs(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))}},Is.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,zs(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},Is.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,r=r.contentBox;if(0<n.length)for(var s=zs(n),l=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),a=0;a<n.length;a++){var h=n[a];h.reflow(h.box.translate(0,l))}}for(var p=0;p<e.length;p++){var c=e[p];c.reflow(c.box.translate(o,0))}},Is.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))},Is.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=js(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))}},Is.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)},Is.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&&!nt(n,t)||e[r].reflow(i)}},Is.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,l=t.y1,n=0;n<o;n++){var s=e[n],a=s.options.height;s.options.width=t.width(),s.options.height?(a.indexOf&&a.indexOf("%")&&(a=parseInt(a,10)/100,s.options.height=a*t.height()),s.reflow(t.clone()),i-=s.options.height):r++}for(var h=0;h<o;h++){var c=e[h];c.options.height||(c.options.height=i/r)}for(var p=0;p<o;p++){var u=e[p],d=t.clone().move(t.x1,l);u.reflow(d),l+=u.options.height}},Is.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},Is.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},Is.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(b.drawing.Path.fromRect(e[o].toRect()))},Is.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},Is.prototype.createVisual=function(){Ls.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border,o=(void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&w(o)||(o=x,e=0),this._bgVisual=new b.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(o),this.appendVisual(o)},Is.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&&w(s.value)&&null!==s.value&&o.push(s)}}return o},Is.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Is.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Is.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},Is.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}},Is.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}},Is.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Is.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Vs(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},Is.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,i=i.visible;if("end"!==r&&"start"!==r||!1===i)return null;var i=this.groupAxes(this.panes),i=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,i),r="end"===r,n=o.range(),r=r?n.max:n.min;if(wt(i[e],n.min,n.max)-r==0)return null;i.splice(e+1,0,r),o.options.axisCrossingValues=i;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n};var Ls,ps=Is;function Is(t,e,o){Ls.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 zs(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))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new C}function Vs(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var js=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},Ds=(i(ps,{series:[],plotArea:{margin:{}},background:"",border:{color:a,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}}),ps),Hs={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};(Fs=b.Class)&&(Ws.__proto__=Fs),((Ws.prototype=Object.create(Fs&&Fs.prototype)).constructor=Ws).prototype.aggregatePoints=function(t,l){var c,u=this._series,d=this._seriesFields,e=this._bindPoints(t||[]),t=e.dataItems[0],o={};!t||V(t)||B(t)||((c=function(){}).prototype=t,o=new c);for(var i=0;i<d.length;i++){var r=d[i],n=this._bindField(e.values,r.canonicalName),n=r.transform(n,u,e.dataItems,l);if(!(null===n||!N(n)||w(n.length)||n instanceof Date)){o=n;break}if(w(n)){s=void 0;f=void 0;g=void 0;a=void 0;h=void 0;p=void 0;var s=r.name;var f=o;var g=n;var a=f,h=s;if(-1<s.indexOf(".")){for(var p=s.split(".");1<p.length;)h=p.shift(),w(a[h])||(a[h]={}),a=a[h];h=p.shift()}a[h]=g}}return o},Ws.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}},Ws.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(w(s[e])?s:n.fields)[e];o.push(s)}return o};var Us,Fs,Ns=Ws,ps=((Us=b.Class)&&(Gs.__proto__=Us),((Gs.prototype=Object.create(Us&&Us.prototype)).constructor=Gs).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Gs.prototype.query=function(t){return this._defaults[t]},Gs);function Gs(){Us.call(this),this._defaults={}}function Ws(t,e,o){Fs.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),l=this._seriesFields=[],o=o.query(t.type),s=t.aggregate||o;this._series=t,this._binder=e;for(var a=0;a<i.length;a++){var h=i[a],p=void 0;if(N(s))p=s[h];else{if(0!==a&&!nt(h,r))break;p=s}p&&l.push({canonicalName:h,name:n[a],transform:H(p)?p:Vi[p]})}}ps.current=new ps;var Xs,qs=ps,ps=((Xs=ln)&&(Ys.__proto__=Xs),((Ys.prototype=Object.create(Xs&&Xs.prototype)).constructor=Ys).prototype.createLabel=function(){var t=this.options.labels,e=m({},t,t.from),t=m({},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))},Ys.prototype._createLabel=function(t){var e=K(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new sn(e,m({vertical:this.options.vertical},t),o)},Ys.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)},Ys);function Ys(){Xs.apply(this,arguments)}ps.prototype.defaults=m({},ps.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Zs,Qs=ps,ps=((Zs=wn)&&(Ks.__proto__=Zs),((Ks.prototype=Object.create(Zs&&Zs.prototype)).constructor=Ks).prototype.pointType=function(){return Qs},Ks.prototype.pointValue=function(t){return t.valueFields},Ks.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)},Ks.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Ks.prototype.updateRange=function(t,e){var e=e.series.axis,o=t.from,i=t.to,r=this.valueAxisRanges[e];null!==t&&V(o)&&V(i)&&((r=this.valueAxisRanges[e]=r||{min:c,max:l}).min=Math.min(r.min,o),r.max=Math.max(r.max,o),r.min=Math.min(r.min,i),r.max=Math.max(r.max,i))},Ks.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Ks);function Ks(){Zs.apply(this,arguments)}ps.prototype.plotLimits=mr.prototype.plotLimits;var $s,Js,ta=ps,ea=((Js=wr)&&(ia.__proto__=Js),((ia.prototype=Object.create(Js&&Js.prototype)).constructor=ia).prototype.aliasFor=function(){return this.parent},ia),ps=(($s=ae)&&(oa.__proto__=$s),((oa.prototype=Object.create($s&&$s.prototype)).constructor=oa).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,i=this.value,o=this.fromPoint=new ea(i,m({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new ea(i,m({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},oa.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())},oa.prototype.createHighlight=function(){var t=new b.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},oa.prototype.highlightVisual=function(){return this.visual},oa.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},oa.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return o=(r=this.box).center(),i=P,r=this.options.vertical?(t=o.x,e=r.y1-5,S):(t=r.x2+5,e=o.y,A),{point:new Nt(t,e),align:{horizontal:i,vertical:r}}},oa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},oa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},oa.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},oa.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}"})))},oa.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(i=i?e.y1<=t.y1?(o="above","below"):(o="below","above"):e.x1<=t.x1?(o=P,T):(o=T,P),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},oa.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},oa);function oa(t,e){$s.call(this),this.value=t,this.options=e,this.aboveAxis=At(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function ia(){Js.apply(this,arguments)}m(ps.prototype,xr),m(ps.prototype,o),ps.prototype.defaults={markers:{visible:!1,background:x,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:q(3),padding:q(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:x,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var ra,na,sa,aa=ps,ha=((sa=Gr)&&(ua.__proto__=sa),((ua.prototype=Object.create(sa&&sa.prototype)).constructor=ua).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ua.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},ua.prototype.createStroke=function(t){var e=new b.drawing.Path(t),t=new b.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)},ua.prototype.hasStackSegment=function(){return!0},ua.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ua.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ua),pa=((na=ha)&&(ca.__proto__=na),((ca.prototype=Object.create(na&&na.prototype)).constructor=ca).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},ca.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},ca.prototype.createCurveSegments=function(t){return(new ki).process(this.toGeometryPoints(t))},ca),ps=((ra=ha)&&(la.__proto__=ra),((la.prototype=Object.create(ra&&ra.prototype)).constructor=la).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},la.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},la);function la(){ra.apply(this,arguments)}function ca(){na.apply(this,arguments)}function ua(){sa.apply(this,arguments)}m(ps.prototype,Go);var da,fa=ps,Go=((da=mr)&&(ga.__proto__=da),((ga.prototype=Object.create(da&&da.prototype)).constructor=ga).prototype.render=function(){da.prototype.render.call(this),this.renderSegments()},ga.prototype.pointType=function(){return aa},ga.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=t.valueFields;if(!Un(n.from)&&!Un(n.to)){if(this.seriesMissingValues(r)!==Yi)return null;n={from:0,to:0}}var s=this.pointOptions(r,e),s=this.evalPointOptions(s,n,i,o,r,e),i=t.fields.color||r.color,o=(H(r.color)&&(i=s.color),new aa(n,s));return o.color=i,this.append(o),o},ga.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?pa:"step"===i?fa:ha)(t,e,o)},ga.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},ga.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(o&&t)return{from:o,to:t}},ga.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new C(i.x1,t.y1,i.x2,t.y2),new C(e.x1,t.y1,e.x2,t.y2)):(o=new C(t.x1,i.y1,t.x2,i.y2),new C(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},ga.prototype.addValue=function(t,e){var o=t.valueFields;V(o.from)||(o.from=o.to),V(o.to)||(o.to=o.from),da.prototype.addValue.call(this,t,e)},ga.prototype.updateRange=function(t,e){var o;null!==t&&V(t.from)&&V(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:c,max:l},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},ga.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},ga.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)},ga);function ga(){da.apply(this,arguments)}m(Go.prototype,Pr,Er);var ya,va,ma,xa=Go,_a=((ma=Sn)&&(Sa.__proto__=ma),((Sa.prototype=Object.create(ma&&ma.prototype)).constructor=Sa).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=[],r=[],n=[],s=e.getSlot(o.low,o.high),a=e.getSlot(o.open,o.open),e=e.getSlot(o.close,o.close),o=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);i.push([a.x1,a.y1]),i.push([o,a.y1]),r.push([o,e.y1]),r.push([e.x2,e.y1]),n.push([o,s.y1]),n.push([o,s.y2]),this.lines=[i,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},Sa.prototype.createBody=function(){},Sa),ba=((va=Mn)&&(Ca.__proto__=va),((Ca.prototype=Object.create(va&&va.prototype)).constructor=Ca).prototype.pointType=function(){return _a},Ca),ps=((ya=ae)&&(wa.__proto__=ya),((wa.prototype=Object.create(ya&&ya.prototype)).constructor=wa).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])):(t=e.aboveAxis?o.x2:o.x1,r.push([t,o.y1],[t,i.y2])),r},wa.prototype.createVisual=function(){ya.prototype.createVisual.call(this);var t=this.series.line||{},t=b.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});I(t),this.visual.append(t)},wa);function wa(t,e,o){ya.call(this),this.from=t,this.to=e,this.series=o}function Ca(){va.apply(this,arguments)}function Sa(){ma.apply(this,arguments)}i(ps,{animation:{type:"fadeIn",delay:600}});var ka,Aa,Pa=ps,Ta=((Aa=wn)&&(Ra.__proto__=Aa),((Ra.prototype=Object.create(Aa&&Aa.prototype)).constructor=Ra).prototype.render=function(){Aa.prototype.render.call(this),this.createSegments()},Ra.prototype.traverseDataPoints=function(l){for(var t=this.options.series,c=fr(t),u=!this.options.invertAxes,e=0;e<t.length;e++)for(var o=t[e],i=0,r=0,n=0;n<c;n++){var s=Ni.current.bindPoint(o,n),a=s.valueFields.value,d=s.fields.summary,h=i,p=void 0;d?"total"===d.toLowerCase()?(h=0,p=s.valueFields.value=i):(p=h-(s.valueFields.value=r),r=0):V(a)&&(r+=a,p=i+=a),l(s,{category:this.categoryAxis.categoryAt(n),categoryIx:n,series:o,seriesIx:e,total:i,runningTotal:r,from:h,to:p,isVertical:u})}},Ra.prototype.updateRange=function(t,e){Aa.prototype.updateRange.call(this,{value:e.to},e)},Ra.prototype.aboveAxis=function(t){return 0<=t.value},Ra.prototype.plotRange=function(t){return[t.from,t.to]},Ra.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 Pa(s,p,r),o.push(h),this.append(h)),s=p}}},Ra),Ma=["area","verticalArea","rangeArea","verticalRangeArea"],Oa=[$i,tr].concat(Ma),Er=((ka=Ds)&&(Ba.__proto__=ka),((Ba.prototype=Object.create(ka&&ka.prototype)).constructor=Ba).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new tn,0<t.length){this.invertAxes=nt(t[0].type,[Qi,"bullet",tr,"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}}}},Ba.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)},Ba.prototype.removeAxis=function(t){var e=t.options.name;ka.prototype.removeAxis.call(this,t),t instanceof zo?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Ba.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"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},Ba.prototype.createChartGroup=function(t,e){this.createAreaChart(As(t,["area","verticalArea"]),e),this.createRangeAreaChart(As(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(As(t,[Ki,Qi]),e),this.createRangeBarChart(As(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(As(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(As(t,"candlestick"),e),this.createBoxPlotChart(As(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(As(t,"ohlc"),e),this.createWaterfallChart(As(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(As(t,[$i,tr]),e)},Ba.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=(ks(n.options.type,y)||r.categoryField)&&nt(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},Ba.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!V(o.options.min)&&!V(o.options.max))return e;var i=o.currentRangeIndices(),r=nt(e.type,Oa),n=m({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Es(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return w(e.data[t])}),n},Ba.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Ba.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=ks(i.type,y),n=t.data,l=i?Ps:ji,s=[];i||e.mapCategories();for(var a=0;a<n.length;a++){var h,p=t.categoryField?l(t.categoryField,n[a],this.chartService.intl):r[a];w(p)&&null!==p&&(s[h=e.totalIndex(p)]=s[h]||{items:[],category:p},s[h].items.push(a))}return this._currentPointsCache[o]=s},Ba.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=m({},t),n=new Ns(m({},t),Ni.current,qs.current),l=e.data=[],o=i.options.dataItems||[],s=i.currentRangeIndices(),a=function(t){var e=t-s.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=n.aggregatePoints(o.items,e)),o},h=s.min;h<=s.max;h++){var p=a(h);l[p.categoryIx]=p.item,p.items&&p.items.length&&(o[p.categoryIx]=p.item)}return nt(e.type,Oa)&&Es(e,s,i.totalCount(),a,function(t){return r[t]}),i.options.dataItems=o,e},Ba.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,fr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),ka.prototype.appendChart.call(this,t,e)},Ba.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=et([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Ba.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(!e)throw new Error("Unable to locate category axis with name "+t);return e},Ba.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Ba.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 et(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Ba.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new wn(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(t,e))},Ba.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ta(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},Ba.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ss(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Nr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},Ba.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Jr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},Ba.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new xa(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ba(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Mn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new zn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Ta(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},Ba.prototype.axisRequiresRounding=function(t,e){for(var o=As(this.series,er),i=0;i<this.series.length;i++){var r,n=this.series[i];!nt(n.type,Ma)||(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}},Ba.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}},Ba.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof zo&&t[e].createLabels()},Ba.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(nt(this.findPane(n.pane),t)){var s=n.name,a=n.categories,h=(void 0===a&&(a=[]),n=m({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?c:0},n),w(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Ts(n,a[0])?Xo:zo)(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},Ba.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!nt(t[e].type,Ma))return!1;return!0},Ba.prototype.createValueAxes=function(l){var t=this.valueAxisRangeTracker,e=t.query(),o=[].concat(this.options.valueAxis),i=this.invertAxes,r={vertical:!i,reverse:i&&this.chartService.rtl},c=[];this.stack100&&(r.roundToMajorUnit=!1,r.labels={format:"P0"});for(var n=0;n<o.length;n++){var s=o[n];if(nt(this.findPane(s.pane),l)){var a=s.name,h=ks(s.type,"log")?{min:.1,max:1}:{min:0,max:1},h=t.query(a)||e||h,h=(0===n&&h&&e&&(h.min=Math.min(h.min,e.min),h.max=Math.max(h.max,e.max)),new(ks(s.type,"log")?pi:ei)(h.min,h.max,m({},r,s),this.chartService));if(a){if(this.namedValueAxes[a])throw new Error("Value axis with name "+a+" is already defined");this.namedValueAxes[a]=h}h.axisIndex=n,c.push(h),this.appendAxis(h)}}var p=this.valueAxis||c[0];this.valueAxis=p,i?this.axisX=p:this.axisY=p},Ba.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?ws(s,p.getValue(r)):ws(n,p.getCategory(r))}0===n.length&&ws(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:xt(e),originalEvent:e,category:Ms(n),value:Ms(s)})}},Ba.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}},Ba.prototype.updateAxisOptions=function(t,e){Ea(this.options,t,e),Ea(this.originalOptions,t,e)},Ba);function Ba(){ka.apply(this,arguments)}function Ra(){Aa.apply(this,arguments)}function Ea(t,e,o){m([].concat(e instanceof zo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}i(Er,{categoryAxis:{},valueAxis:{}}),m(Er.prototype,Hs);var La=Er;function Ia(){this._defaultPrevented=!0}(za=b.Class)&&(ja.__proto__=za),((ja.prototype=Object.create(za&&za.prototype)).constructor=ja).prototype.destroy=function(){this._points=[]},ja.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))}},ja.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:Ia,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},ja.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},ja.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};var za,Va=ja;function ja(){za.call(this),this._points=[]}function Da(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ha(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}(Ua=b.Class)&&(Fa.__proto__=Ua),((Fa.prototype=Object.create(Ua&&Ua.prototype)).constructor=Fa).prototype.start=function(t){return this._active=Da(t,this.options.key),this._active},Fa.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,_).concat(this._panAxes(t,O));if(t.length)return Ha(this.axisRanges=t)}},Fa.prototype.end=function(){var t=this._active;return this._active=!1,t},Fa.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)}},Fa.prototype.destroy=function(){delete this.plotArea},Fa.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===_&&!h.options.vertical||e===O&&h.options.vertical)||(a=h.pan(i))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r};var Ua,Go=Fa;function Fa(t,e){Ua.call(this),this.plotArea=t,this.options=m({},this.options,e)}Go.prototype.options={key:"none",lock:"none"};var Na,Ga=Go,ps=((Na=b.Class)&&(Wa.__proto__=Na),((Wa.prototype=Object.create(Na&&Na.prototype)).constructor=Wa).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},Wa.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Wa.prototype.setStyles=function(t){X(this._marquee,t)},Wa.prototype.start=function(t){if(Da(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)return e=this._elementOffset(),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},Wa.prototype._elementOffset=function(){var t=this.chart.element,e=X(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=yt(t);return{left:o+t.left,top:e+t.top}},Wa.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Wa.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(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},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Ha(this.axisRanges)},Wa.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)}},Wa.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Wa.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===_&&!a||o===O&&a||!w(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Wa.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(o.x,i),s=Math.min(o.y,t),a=Math.abs(o.x-i),h=Math.abs(o.y-t);return r===_&&(n=e.x1,a=e.width()),r===O&&(s=e.y1,h=e.height()),i>e.x2&&(a=e.x2-o.x),i<e.x1&&(a=o.x-e.x1),t>e.y2&&(h=e.y2-o.y),t<e.y1&&(h=o.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:h}},Wa);function Wa(t,e){Na.call(this),this.chart=t,this.options=m({},this.options,e),this.createElement()}ps.prototype.options={key:"shift",lock:"none"};var Xa,qa,Ya,Za,Qa=ps,Ka=((Za=b.Class)&&(rh.__proto__=Za),((rh.prototype=Object.create(Za&&Za.prototype)).constructor=rh).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===_&&!a||o===O&&a||!s.zoomRange||(a=wt(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return Ha(this.axisRanges=i)},rh.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)}},rh.prototype.destroy=function(){delete this.chart},rh),$a=((Ya=ae)&&(ih.__proto__=Ya),((ih.prototype=Object.create(Ya&&Ya.prototype)).constructor=ih).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new b.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 C),r.renderVisual()}},ih.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Se(t):new C},ih.prototype.renderVisual=function(){this.addVisual()},ih.prototype.createVisual=function(){},ih),Ja=((qa=le)&&(oh.__proto__=qa),((oh.prototype=Object.create(qa&&qa.prototype)).constructor=oh).prototype.createContainer=function(){this.container=new _e({vertical:!1,wrap:!1,align:A,spacing:this.options.spacing}),this.append(this.container)},oh.prototype.createMarker=function(){this.container.append(new ue(this.markerOptions()))},oh.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return m({},t.markers,{background:e,border:{color:e}})},oh.prototype.createLabel=function(){var t=this.options,e=m({},t.labels);this.container.append(new Te(t.text,e))},oh.prototype.renderComplete=function(){qa.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=b.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:x,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},oh.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},oh.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},oh.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},oh.prototype.eventArgs=function(t){var e=this.options;return{element:xt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},oh.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()):qa.prototype.renderVisual.call(this)},oh),th="custom",Er=((Xa=ae)&&(eh.__proto__=Xa),((eh.prototype=Object.create(Xa&&Xa.prototype)).constructor=eh).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=A;e===th?i=P:nt(e,[M,S])?(i="start"===o?P:"end"===o?T:A,r=e):o&&("start"===o?r=M:"end"===o&&(r=S)),this.container=new le({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 le({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},eh.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new $a({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 Ja(m({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},eh.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===th&&"horizontal"!==e||(w(e)?"horizontal"!==e:nt(t,[P,T]))},eh.prototype.hasItems=function(){return 0<this.container.children[0].children.length},eh.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===th?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new C(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},eh.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===M||i===S?_:O,a=this.isVertical(),h=t.clone(),p=t.clone(),i=(i!==P&&i!==T||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,O,o.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,_,o.options.align)),o.reflow(p),(p=o.box).clone());(e.offsetX||e.offsetY)&&(p.translate(e.offsetX,e.offsetY),o.reflow(p)),i[s+1]=t[s+1],i[s+2]=t[s+2],this.box=i},eh.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new C(i,r,i+t.width(),r+t.height()))},eh.prototype.renderVisual=function(){this.hasItems()&&Xa.prototype.renderVisual.call(this)},eh.prototype.createLegendTitle=function(t){var e=m({},{color:a,position:M,align:A},t),o=e.text;t&&!1!==t.visible&&(w(e)&&e.visible&&((t=K(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new Te(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},eh.prototype.createTitleLayout=function(){this.layout=new _e({vertical:!0,wrap:!1}),this.container.append(this.layout)},eh.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},eh.prototype.appendTitleLayoutContent=function(){this.options.title.position===S?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},eh);function eh(t,e){void 0===e&&(e={}),Xa.call(this,t),this.chartService=e,nt(this.options.position,[M,T,S,P,th])||(this.options.position=T),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function oh(t){qa.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function ih(t,e){Ya.call(this,t),this.chartService=e}function rh(t,e){Za.call(this),this.chart=t,this.options=m({rate:.3},this.options,e)}i(Er,{position:T,items:[],offsetX:0,offsetY:0,margin:q(5),padding:q(5),border:{color:a,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:P,vAlign:A}});var nh,sh=Er,Go=((nh=b.Class)&&(ah.__proto__=nh),((ah.prototype=Object.create(nh&&nh.prototype)).constructor=ah).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},ah.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=As(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},ah);function ah(){nh.call(this),this._registry=[]}Go.current=new Go;var hh=Go;function ph(t){var e=document.createElement("div");return t&&(e.className=t),e}function lh(t){for(var e=t;e&&!ot(e,"k-handle");)e=e.parentNode;return e}(ch=b.Class)&&(uh.__proto__=ch),((uh.prototype=Object.create(ch&&ch.prototype)).constructor=uh).prototype.onPane=function(t){return this.categoryAxis.pane===t},uh.prototype.createElements=function(){var t=this.options,e=this.wrapper=ph("k-selector"),o=(X(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=ph("k-selection")),i=(this.leftMask=ph("k-mask"),this.rightMask=ph("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(ph("k-selection-bg")),this.leftHandle=ph("k-handle k-left-handle")),r=this.rightHandle=ph("k-handle k-right-handle"),o=(i.appendChild(ph()),r.appendChild(ph()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),X(o,["borderLeftWidth","borderRightWidth","height"])),n=X(i,"height").height,s=X(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},X(i,{top:(o.height-n)/2}),X(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},uh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ft(this.wrapper,((t={})[sr]=this._mousewheelHandler,t))),this._domEvents=Ye.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)})},uh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&m(t,{min:Bo(o,t.min),max:Bo(o,t.max),from:Bo(o,t.from),to:Bo(o,t.to)}),X(this.chartElement,["paddingLeft","paddingTop"])),i=o.paddingLeft,o=o.paddingTop;this.options=m({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:o},offset:{left:e.x1+i,top:e.y1+o},from:t.min,to:t.max},t)},uh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(kt(this.wrapper,((t={})[sr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},uh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},uh.prototype._start=function(t){var e=this.options,o=xt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:lh(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},o=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",o)&&(this._state=null))},uh.prototype._press=function(t){(t=this._state?this._state.moveTarget:lh(xt(t)))&&R(t,"k-handle-active")},uh.prototype._move=function(t){var e,o,i,r,l,n,s,c,a,h,p,u;this._state&&(h=this._state,s=this.options,p=this.categoryAxis,e=h.range,o=h.moveTarget,i=p.options.reverse,r=this._index(s.from),l=this._index(s.to),n=this._index(s.min),s=this._index(s.max),h=h.startLocation-t.x.location,t=e.from,c=e.to,a=e.to-e.from,p=X(this.wrapper,"width").width/(p.categoriesCount()-1),h=Math.round(h/p)*(i?-1:1),o&&(p=ot(o,"k-left-handle"),u=ot(o,"k-right-handle"),ot(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(n,r-h),s-a),e.to=Math.min(e.from+a,s)):p&&!i||u&&i?(e.from=Math.min(Math.max(n,r-h),s-1),e.to=Math.max(e.from+1,e.to)):(p&&i||u&&!i)&&(e.to=Math.min(Math.max(n+1,l-h),s),e.from=Math.min(e.to-1,e.from)),e.from===t&&e.to===c||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},uh.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&L(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},uh.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new Nt(i.x,o.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},h=3===t.event.which,i=Math.round(r+n/2-i);this._state||h||(this.chart._unsetActivePoint(),o.options.justified||i--,a.from=Math.min(Math.max(s,r-i),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger("select",this._rangeEventArgs(a)),this._end()))},uh.prototype._mousewheel=function(t){var e,o=this,i=ct(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))},uh.prototype._gesturestart=function(t){var e=this.options,e=(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},this._rangeEventArgs(this._state.range));this.trigger("selectStart",e)?this._state=null:t.preventDefault()},uh.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},uh.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,o=o.range,n=e._toModelCoordinates(t.touches[0].x.location).x,e=e._toModelCoordinates(t.touches[1].x.location).x,s=Math.min(n,e),n=Math.max(n,e);t.preventDefault(),o.from=r.pointCategoryIndex(new Nt(s))||i.min,o.to=r.pointCategoryIndex(new Nt(n))||i.max,this.move(o.from,o.to),this.trigger("select",this._rangeEventArgs(o))},uh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},uh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},uh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},uh.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),i=this._slot(i?e:t),e=k(i[h]-r.left+n.left),t=(X(this.leftMask,{width:e}),X(this.selection,{left:e}),i=this._slot(a),k(o.width-(i[h]-r.left+n.left))),a=(X(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),X(this.rightMask,{left:a}),X(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},uh.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),t=wt(this._index(t),i,r),i=wt(this._index(e),t+1,r);o.visible&&this.move(t,i),o.from=this._value(t),o.to=this._value(i)},uh.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),e=this._index(e.to),s={from:n,to:e},a=m({},s);if(this._state&&(s=this._state.range),r!==T&&(s.from=wt(wt(n-t,0,e-1),o,i)),r!==P&&(s.to=wt(wt(e+t,s.from+1,i),o,i)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},uh.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),o=this._index(o.to),s={from:n,to:o},a=m({},s),h=this.categoryAxis.options.reverse,h=_+(h?"2":"1"),p=this.categoryAxis.lineBox(),h=Math.abs(p[h]-e.x),e=p.width(),p=k(h/e,2),h=k(p*t),e=k((1-p)*t);if((s=this._state?this._state.range:s).from=wt(wt(n-h,0,o-1),i,r),s.to=wt(wt(o+e,s.from+1,r),i,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},uh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var ch,ps=uh;function uh(t,e,o,i){ch.call(this);var r=t.element;this.options=m({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Xo,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())}i(ps,{visible:!0,mousewheel:{zoom:"both"},min:l,max:c});var dh,fh,gh=ps,yh=((fh=Dr)&&(mh.__proto__=fh),((mh.prototype=Object.create(fh&&fh.prototype)).constructor=mh).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=m({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,fh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},mh.prototype.hide=function(){delete this._current,fh.prototype.hide.call(this)},mh),Er=((dh=Dr)&&(vh.__proto__=dh),((vh.prototype=Object.create(dh&&dh.prototype)).constructor=vh).prototype.showAt=function(t,e){var o,i=et(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(i=i[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),e=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:e,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},vh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},vh.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:o?new Nt(t.x,e.y):new Nt(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},vh);function vh(t,e){dh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function mh(){fh.apply(this,arguments)}i(Er,{categoryFormat:"{0:d}"});var xh,_h=Er,Go=((xh=b.drawing.Animation)&&(bh.__proto__=xh),((bh.prototype=Object.create(xh&&xh.prototype)).constructor=bh).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,o=o.vertical?O:_,(t=this.fromScale=new b.geometry.Point(1,1))[o]=qi,e.transform(b.geometry.transform().scale(t.x,t.y))):this.abort()},bh.prototype.step=function(t){var e=st(this.fromScale.x,1,t),t=st(this.fromScale.y,1,t);this.element.transform(b.geometry.transform().scale(e,t,this.origin))},bh.prototype.abort=function(){xh.prototype.abort.call(this),this.element.transform(null)},bh);function bh(){xh.apply(this,arguments)}i(Go,{duration:600}),b.drawing.AnimationFactory.current.register(Qi,Go);(wh=b.drawing.Animation)&&(Ch.__proto__=wh),((Ch.prototype=Object.create(wh&&wh.prototype)).constructor=Ch).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(b.geometry.transform().scale(qi,qi,t))},Ch.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.center))};var wh,ps=Ch;function Ch(){wh.apply(this,arguments)}i(ps,{easing:"easeOutElastic"}),b.drawing.AnimationFactory.current.register("bubble",ps);(Sh=b.drawing.Animation)&&(kh.__proto__=Sh),((kh.prototype=Object.create(Sh&&Sh.prototype)).constructor=kh).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},kh.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var Sh,Dr=kh;function kh(){Sh.apply(this,arguments)}i(Dr,{duration:200,easing:"linear"}),b.drawing.AnimationFactory.current.register("fadeIn",Dr);(Ah=b.drawing.Animation)&&(Ph.__proto__=Ah),((Ph.prototype=Object.create(Ah&&Ah.prototype)).constructor=Ph).prototype.setup=function(){this.element.transform(b.geometry.transform().scale(qi,qi,this.options.center))},Ph.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.options.center))};var Ah,Er=Ph;function Ph(){Ah.apply(this,arguments)}i(Er,{easing:"easeOutElastic",duration:600}),b.drawing.AnimationFactory.current.register(Ji,Er);var Th,Mh=Er,Go=((Th=Wn)&&(Oh.__proto__=Th),((Oh.prototype=Object.create(Th&&Th.prototype)).constructor=Oh).prototype.render=function(){Th.prototype.render.call(this),this.renderSegments()},Oh.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Rr:Sr)(t,e,o)},Oh.prototype.animationPoints=function(){return Th.prototype.animationPoints.call(this).concat(this._segments)},Oh.prototype.createMissingValue=function(t,e){if(e===Yi)return Un((e={x:t.x,y:t.y}).x)||(e.x=0),Un(e.y)||(e.y=0),e},Oh);function Oh(){Th.apply(this,arguments)}m(Go.prototype,Pr);var Bh,Rh=Go,ps=((Bh=Ds)&&(Eh.__proto__=Bh),((Eh.prototype=Object.create(Bh&&Bh.prototype)).constructor=Eh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new tn,this.yAxisRangeTracker=new tn},Eh.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"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(As(r,"scatter"),i),this.createScatterLineChart(As(r,"scatterLine"),i),this.createBubbleChart(As(r,"bubble"),i))}this.createAxes(t)},Eh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Bh.prototype.appendChart.call(this,t,e)},Eh.prototype.removeAxis=function(t){var e=t.options.name;Bh.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},Eh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=et([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=et([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Eh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Wn(this,{series:t,clip:e.options.clip}),e)},Eh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Rh(this,{series:t,clip:e.options.clip}),e)},Eh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Kn(this,{series:t,clip:e.options.clip}),e)},Eh.prototype.createXYAxis=function(t,e,o){for(var l,i=t.name,c=e?this.namedYAxes:this.namedXAxes,r=e?this.yAxisRangeTracker:this.xAxisRangeTracker,n=m({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=ks(n.type,"log"),s=r.query(),a=t?{min:.1,max:1}:{min:0,max:1},r=r.query(i)||s||a,h=[n.min,n.max],u=this.series,d=0;d<u.length;d++){var f=u[d],p=f[e?"yAxis":"xAxis"];if(p===n.name||0===o&&!p){p=Ni.current.bindPoint(f,0).valueFields;h.push(p[e?"y":"x"]);break}}0===o&&s&&(r.min=Math.min(r.min,s.min),r.max=Math.max(r.max,s.max));for(var g=0;g<h.length;g++)if(h[g]instanceof Date){l=!0;break}a=new(ks(n.type,y)||!n.type&&l?ri:t?pi:ei)(r.min,r.max,n,this.chartService);if(a.axisIndex=o,i){if(c[i])throw new Error((e?"Y":"X")+" axis with name "+i+" is already defined");c[i]=a}return this.appendAxis(a),a},Eh.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++)nt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)nt(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]},Eh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,l=n.length,s=[],a=[],h=0;h<l;h++){var p=n[h],c=p.options.vertical?a:s,p=p.getValue(r);null!==p&&c.push(p)}0<s.length&&0<a.length&&t.trigger(o,{element:xt(e),originalEvent:e,x:Ms(s),y:Ms(a)})},Eh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);Lh(this.options,i,o,e),Lh(this.originalOptions,i,o,e)},Eh);function Eh(){Bh.apply(this,arguments)}function Lh(t,e,o,i){m([].concat(o?t.yAxis:t.xAxis)[e],i)}i(ps,{xAxis:{},yAxis:{}}),m(ps.prototype,Hs);var Ih,zh=ps,Dr=((Ih=ae)&&(Dh.__proto__=Ih),((Dh.prototype=Object.create(Ih&&Ih.prototype)).constructor=Dh).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,e=K(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===A||"insideEnd"===o.position?(o.color||(o.color=Lt(this.options.color)),o.background||(o.background=this.options.color)):(e=i.theme.seriesDefaults.labels,o.color=o.color||e.color,o.background=o.background||e.background),this.label=new Te(r,m({},o,{align:A,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),t),this.append(this.label)))},Dh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Dh.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===A?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new C(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 C(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=T):(i=t.x-o,n.orientation=P),n.reflow(new C(i,t.y-e,t.x,t.y))))},Dh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Ih.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(t=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new b.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 b.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Dh.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},i=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},r=o.color,n={color:r,opacity:o.opacity},i=this.createSegment(e,m({fill:n,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(i),an(o)&&t.append(this.createGradientOverlay(i,{baseColor:r,fallbackFill:n},m({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},Dh.prototype.createSegment=function(t,e){return e.singleSegment?new b.drawing.Circle(new b.geometry.Circle(new b.geometry.Point(t.center.x,t.center.y),t.radius),e):re.current.createRing(t,e)},Dh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;m(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Ih.prototype.createAnimation.call(this)},Dh.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,m({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},Dh.prototype.highlightVisual=function(){return this.visual.children[0]},Dh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new b.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Dh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=St(e+180),e=k(Math.sin(t),g),t=k(Math.cos(t),g),{horizontal:Math.abs(e)>jh?A:t<0?T:P,vertical:Math.abs(e)<Vh?A:e<0?S:M})}},Dh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Dh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Dh),Vh=k(St(30),g),jh=k(St(60),g);function Dh(t,e,o){Ih.call(this,o),this.value=t,this.sector=e}i(Dr,{color:x,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:q(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:Ji},highlight:{visible:!0,border:{width:1}},visible:!0}),m(Dr.prototype,xr);var Hh,Uh=Dr,Fh={createLegendItem:function(t,e,o){var i,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},h=s.labels||{};o&&!1!==o.visibleInLegend&&(a=!(r=!1!==o.visible)&&K(h)||K(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:h.color,font:h.font},(s.markers||{}).color),Un(n)&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i}))}},Er=((Hh=ae)&&(Nh.__proto__=Hh),((Nh.prototype=Object.create(Hh&&Hh.prototype)).constructor=Nh).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Nh.prototype.traverseDataPoints=function(l){for(var c=this.options,t=this.plotArea.options.seriesColors,u=(t=void 0===t?[]:t).length,d=c.series,e=d.length,o=0;o<e;o++){var i=d[o],f=i.data,r=Ss(i),n=r.total,g=r.points,r=r.count,y=360/n,v=void 0,m=(isFinite(y)||(v=360/r),void 0),m=(w(i.startAngle)?i:c).startAngle;o!==e-1&&"outsideEnd"===i.labels.position&&(i.labels.position=A);for(var s=0;s<g.length;s++){var a,h,x,_,b,p=g[s];p&&(a=p.fields,h=p.value,x=p.visible,_=0!==h?v||h*y:0,b=1!==f.length&&Boolean(a.explode),H(i.color)||(i.color=a.color||t[s%u]),l(p.valueFields.value,new $t(null,0,0,m,_),{owner:this,category:w(a.category)?a.category:"",index:s,series:i,seriesIx:o,dataItem:f[s],percentage:0!==n?h/n:0,explode:b,visibleInLegend:a.visibleInLegend,visible:x,zIndex:e-o,animationDelay:this.animationDelay(s,o,e)}),!1!==x&&(m+=_))}}},Nh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;dr(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Nh.prototype.addValue=function(t,e,o){var i=m({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new Uh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Nh.prototype.reflow=function(l){var t=this.options,c=this.points,e=this.seriesConfigs,u=(void 0===e&&(e=[]),c.length),o=l.clone(),i=Math.min(o.width(),o.height()),d=i/2,f=i-.85*i,r=new C(o.x1,o.y1,o.x1+i,o.y1+i),i=r.center(),o=o.center(),g=t.series.length,n=[],s=[],t=At(t.padding,f);this.targetBox=l,t=d-5<t?d-5:t,r.translate(o.x-i.x,o.y-i.y);for(var y=d-t,v=new Nt(y+r.x1+t,y+r.y1+t),m=0;m<u;m++){var a=c[m],h=a.sector,x=a.seriesIx,p=(h.radius=y,h.center=v,e.length&&(p=e[x],h.innerRadius=p.innerRadius,h.radius=p.radius),x===g-1&&a.explode&&(h.center=h.clone().setRadius(.15*h.radius).point(h.middle())),a.reflow(r),a.label);p&&"outsideEnd"===p.options.position&&x===g-1&&(p.orientation===T?s:n).push(p)}0<n.length&&(n.sort(this.labelComparator(!0)),this.leftLabelsReflow(n)),0<s.length&&(s.sort(this.labelComparator(!1)),this.rightLabelsReflow(s)),this.box=r},Nh.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Nh.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Nh.prototype.distanceBetweenLabels=function(t){var e=bt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=k(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=k(h.y1-n.y2);r.push(s)}return s=k(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Nh.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)},Nh.prototype._takeDistance=function(t,e,o,i){var r;return 0<t[o]&&(i-=r=Math.min(t[o],i),t[o]-=r,t[e]+=r),i},Nh.prototype.reflowLabels=function(t,e){var o,l=bt(this.points),i=l.sector,r=l.options.labels,c=e.length,n=r.distance,s=i.center.y-(i.radius+n)-e[0].box.height();t[0]+=2;for(var a=0;a<c;a++){var h=e[a],p=h.box;s+=t[a],o=this.hAlignLabel(p.x2,i.clone().expand(n),s,s+p.height(),h.orientation===T),h.orientation===T?(r.align!==u&&(o=i.radius+i.center.x+n),h.reflow(new C(o+p.width(),s,o,s))):(r.align!==u&&(o=i.center.x-i.radius-n),h.reflow(new C(o-p.width(),s,o,s))),s+=p.height()}},Nh.prototype.createVisual=function(){var t=this.options.connectors,l=this.points,c=l.length;Hh.prototype.createVisual.call(this),this._connectorLines=[];for(var u=0;u<c;u++){var e,d,o,i,r,n,s,a=l[u],h=a.sector,f=a.label,g=h.middle(),p=(a.options.connectors||{}).color||t.color;f&&(p=new b.drawing.Path({stroke:{color:p,width:t.width},animation:{type:"fadeIn",delay:a.animationDelay}}),"outsideEnd"===f.options.position&&(e=f.box,d=h.center,s=h.point(g),o=new Nt(e.x1,e.center().y),n=r=i=void 0,s=h.clone().expand(t.padding).point(g),p.moveTo(s.x,s.y),f.orientation===T?(n=Gh(d,s,o,r=new Nt(e.x1-t.padding,e.center().y)),o=new Nt(r.x-4,r.y),(n=n||o).x=Math.min(n.x,o.x),this.pointInCircle(n,h.center,h.radius+4)||n.x<h.center.x?(i=h.center.x+h.radius+4,a.options.labels.align===Ki||i<o.x?p.lineTo(i,s.y):p.lineTo(s.x+8,s.y),p.lineTo(o.x,r.y)):(n.y=r.y,p.lineTo(n.x,n.y))):(n=Gh(d,s,o,r=new Nt(e.x2+t.padding,e.center().y)),o=new Nt(r.x+4,r.y),(n=n||o).x=Math.max(n.x,o.x),this.pointInCircle(n,h.center,h.radius+4)||n.x>h.center.x?(i=h.center.x-h.radius-4,a.options.labels.align===Ki||i>o.x?p.lineTo(i,s.y):p.lineTo(s.x-8,s.y),p.lineTo(o.x,r.y)):(n.y=r.y,p.lineTo(n.x,n.y))),p.lineTo(r.x,r.y),this._connectorLines.push(p),this.visual.append(p)))}},Nh.prototype.renderVisual=function(){var t,e,o,i;Hh.prototype.renderVisual.call(this),Mt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(i=this.visual.bbox())&&(o=i.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-i.origin.y),(t.y2-e.y)/(o.y-e.y),(e.x-t.x1)/(e.x-i.origin.x),(t.x2-e.x)/(o.x-e.x)))<1&&this.visual.transform(b.geometry.transform().scale(i,i,[e.x,e.y]))))},Nh.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}},Nh.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,e=e.center,s=e.x,e=e.y,o=Math.min(Math.abs(e-o),Math.abs(e-i));return n<o?t:s+Math.sqrt(n*n-o*o)*(r?1:-1)},Nh.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)},Nh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Nh.prototype.animationDelay=function(t){return 70*t},Nh.prototype.stackRoot=function(){return this},Nh);function Nh(t,e){Hh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Gh(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),i=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return r=0!=i?new Nt(t.x+(o=n/i)*(e.x-t.x),t.y+o*(e.y-t.y)):r}i(Er,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),m(Er.prototype,Fh),Er.prototype.isStackRoot=!0;var Wh,Xh,qh=Er,Yh=((Xh=Ds)&&(Qh.__proto__=Xh),((Qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Qh).prototype.render=function(){this.createPieChart(this.series)},Qh.prototype.createPieChart=function(t){var e=t[0],t=new qh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Qh.prototype.appendChart=function(t,e){Xh.prototype.appendChart.call(this,t,e),dt(this.options.legend.items,t.legendItems)},Qh),Pr=((Wh=Uh)&&(Zh.__proto__=Wh),((Zh.prototype=Object.create(Wh&&Wh.prototype)).constructor=Zh).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===A?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new C(e.x,e.y-t/2,e.x,e.y))):Wh.prototype.reflowLabel.call(this))},Zh.prototype.createSegment=function(t,e){return re.current.createRing(t,e)},Zh);function Zh(){Wh.apply(this,arguments)}function Qh(){Xh.apply(this,arguments)}i(Pr,{overlay:{gradient:"roundedGlass"},labels:{position:A},animation:{type:Ji}}),m(Pr.prototype,xr);var Kh,$h=Pr,Go=((Kh=qh)&&(Jh.__proto__=Kh),((Jh.prototype=Object.create(Kh&&Kh.prototype)).constructor=Jh).prototype.addValue=function(t,e,o){var i=m({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(t=new $h(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Jh.prototype.reflow=function(l){for(var t,e=this.options,o=l.clone(),o=Math.min(o.width(),o.height()),i=o/2,r=e.series,n=r.length,e=At(e.padding,o-.85*o),s=i-(e=i-5<e?i-5:e),c=0,a=0;a<n;a++){var h=r[a];0===a&&w(h.holeSize)&&(t=h.holeSize,s-=h.holeSize),w(h.size)?s-=h.size:c++,w(h.margin)&&a!==n-1&&(s-=h.margin)}w(t)||(s-=t=(i-e)/(n+.75)*.75);var p=t,u=0;this.seriesConfigs=[];for(var d=0;d<n;d++){var f=r[d],g=(p+=u)+At(f.size,s/c);this.seriesConfigs.push({innerRadius:p,radius:g}),u=f.margin||0,p=g}Kh.prototype.reflow.call(this,l)},Jh.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},Jh);function Jh(){Kh.apply(this,arguments)}i(Go,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var tp,ep,op,ip=Go,rp=((op=Yh)&&(ap.__proto__=op),((ap.prototype=Object.create(op&&op.prototype)).constructor=ap).prototype.render=function(){this.createDonutChart(this.series)},ap.prototype.createDonutChart=function(t){var e=t[0],t=new ip(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},ap),ps=((ep=Ds)&&(sp.__proto__=ep),((sp.prototype=Object.create(ep&&ep.prototype)).constructor=sp).prototype.initFields=function(){this.valueAxisRangeTracker=new tn},sp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},sp.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),o=this.polarAxis.getSlot(0).center,o=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(o)},sp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=bi,{min:.1,max:1}):(t=xi,{min:0,max:1}),e=e.query(name)||o||r,r=(e&&o&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max)),new t(e.min,e.max,i,this.chartService));this.valueAxis=r,this.appendAxis(r)},sp.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()),t=q(t.padding||{},r),r=i.clone().unpad(t),i=r.clone(),t=(i.y2=i.y1+Math.min(i.width(),i.height()),i.align(r,O,A),i.clone().shrink(0,i.height()/2)),r=(o.reflow(i),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=i,this.alignAxes(i)},sp.prototype.backgroundBox=function(){return this.box},sp.prototype.detachLabels=function(){},sp),Dr=((tp=Wn)&&(np.__proto__=tp),((np.prototype=Object.create(tp&&tp.prototype)).constructor=np).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=Nt.onCircle(t.center,t.startAngle,e);return new C(t.x,t.y,t.x,t.y)},np);function np(){tp.apply(this,arguments)}function sp(){ep.apply(this,arguments)}function ap(){op.apply(this,arguments)}i(Dr,{clip:!1});var hp,pp=Dr,Er=((hp=Rh)&&(lp.__proto__=hp),(lp.prototype=Object.create(hp&&hp.prototype)).constructor=lp);function lp(){hp.apply(this,arguments)}Er.prototype.pointSlot=pp.prototype.pointSlot,i(Er,{clip:!1});var cp,up,dp=Er,fp=((up=$r)&&(vp.__proto__=up),((vp.prototype=Object.create(up&&up.prototype)).constructor=vp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},vp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},vp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new ki(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},vp),gp=((cp=Gr)&&(yp.__proto__=cp),((yp.prototype=Object.create(cp&&cp.prototype)).constructor=yp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new b.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},yp);function yp(){cp.apply(this,arguments)}function vp(){up.apply(this,arguments)}function mp(t,e){return t.value.x-e.value.x}(_p=dp)&&(Cp.__proto__=_p),((Cp.prototype=Object.create(_p&&_p.prototype)).constructor=Cp).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?fp:gp)(t,e,o)},Cp.prototype.createMissingValue=function(t,e){var o;return Un(t.x)&&e!==Zi&&(o={x:t.x,y:t.y},e===Yi&&(o.y=0)),o},Cp.prototype.seriesMissingValues=function(t){return t.missingValues||Yi},Cp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Cp.prototype.sortPoints=function(t){if(t.sort(mp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Un(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t};var xp,_p,bp=Cp,Pr=((xp=ps)&&(wp.__proto__=xp),((wp.prototype=Object.create(xp&&xp.prototype)).constructor=wp).prototype.createPolarAxis=function(){var t=new fi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},wp.prototype.valueAxisOptions=function(t){return m(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},wp.prototype.createValueAxis=function(){xp.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},wp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Ds.prototype.appendChart.call(this,t,e)},wp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(As(t,["polarLine"]),e),this.createScatterChart(As(t,["polarScatter"]),e),this.createAreaChart(As(t,["polarArea"]),e)},wp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new dp(this,{series:t}),this.appendChart(t,e))},wp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new pp(this,{series:t}),this.appendChart(t,e))},wp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new bp(this,{series:t}),this.appendChart(t,e))},wp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new Nt(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:xt(e),x:r,y:i})},wp.prototype.createCrosshairs=function(){},wp);function wp(){xp.apply(this,arguments)}function Cp(){_p.apply(this,arguments)}i(Pr,{xAxis:{},yAxis:{}}),m(Pr.prototype,Hs);var Sp,Go=Pr,Dr=((Sp=Nr)&&(kp.__proto__=Sp),((kp.prototype=Object.create(Sp&&Sp.prototype)).constructor=kp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=Nt.onCircle(t.center,t.middle(),e);return new C(t.x,t.y,t.x,t.y)},kp.prototype.renderSegments=function(){if(Sp.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],r=bt(n),r=bt(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&bt(n).linePoints.push(o))}},kp.prototype.createSegment=function(t,e,o){var o=new("smooth"===e.style?Rr:Sr)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==Zi||(o.options.closed=!0),o},kp);function kp(){Sp.apply(this,arguments)}i(Dr,{clip:!1,limitPoints:!1});var Ap,Pp,Tp,Mp,Op=Dr,Bp=((Mp=$r)&&(Vp.__proto__=Mp),((Vp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Vp).prototype.fillToAxes=function(){},Vp),Rp=((Tp=Gr)&&(zp.__proto__=Tp),((zp.prototype=Object.create(Tp&&Tp.prototype)).constructor=zp).prototype.fillToAxes=function(){},zp),Ep=((Pp=Op)&&(Ip.__proto__=Pp),((Ip.prototype=Object.create(Pp&&Pp.prototype)).constructor=Ip).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 Bp(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Rp(t,e,o,r,n)),s},Ip.prototype.seriesMissingValues=function(t){return t.missingValues||Yi},Ip),Er=((Ap=$h)&&(Lp.__proto__=Ap),(Lp.prototype=Object.create(Ap&&Ap.prototype)).constructor=Lp);function Lp(t,e){Ap.call(this,t,null,e)}function Ip(){Pp.apply(this,arguments)}function zp(){Tp.apply(this,arguments)}function Vp(){Mp.apply(this,arguments)}i(Er,{overlay:{gradient:"none"},labels:{distance:10}});var jp,Dp=Er,Pr=((jp=ae)&&(Hp.__proto__=jp),((Hp.prototype=Object.create(jp&&jp.prototype)).constructor=Hp).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})},Hp);function Hp(t){jp.call(this,t),this.forEach=t.rtl?un:cn}i(Pr,{gap:1,spacing:0});var Up,Fp,Np=Pr,Gp=((Fp=ae)&&(Xp.__proto__=Fp),((Xp.prototype=Object.create(Fp&&Fp.prototype)).constructor=Xp).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 C;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Xp),Dr=((Up=wn)&&(Wp.__proto__=Up),((Wp.prototype=Object.create(Up&&Up.prototype)).constructor=Wp).prototype.pointType=function(){return Dp},Wp.prototype.clusterType=function(){return Np},Wp.prototype.stackType=function(){return Gp},Wp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Wp.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},Wp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Wp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Up.prototype.createAnimation.call(this)},Wp);function Wp(){Up.apply(this,arguments)}function Xp(){Fp.apply(this,arguments)}Dr.prototype.reflow=mr.prototype.reflow,i(Dr,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var qp,Yp=Dr,Er=((qp=ps)&&(Zp.__proto__=qp),((Zp.prototype=Object.create(qp&&qp.prototype)).constructor=Zp).prototype.createPolarAxis=function(){var t=new ui(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Zp.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&m(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&m(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),m(t,this.options.valueAxis)},Zp.prototype.aggregateCategories=function(){La.prototype.aggregateCategories.call(this,this.panes)},Zp.prototype.createCategoryAxesLabels=function(){La.prototype.createCategoryAxesLabels.call(this,this.panes)},Zp.prototype.filterSeries=function(t){return t},Zp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(As(t,["radarArea"]),e),this.createLineChart(As(t,["radarLine"]),e),this.createBarChart(As(t,["radarColumn"]),e)},Zp.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},Zp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Ep(this,this.chartOptions(t)),this.appendChart(t,e))},Zp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Op(this,this.chartOptions(t)),this.appendChart(t,e))},Zp.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,o=new Yp(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},Zp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Zp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new Nt(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:xt(e),category:r,value:i})},Zp.prototype.createCrosshairs=function(){},Zp);function Zp(){qp.apply(this,arguments)}m(Er.prototype,Hs,{appendChart:La.prototype.appendChart,aggregateSeries:La.prototype.aggregateSeries,seriesSourcePoints:La.prototype.seriesSourcePoints}),i(Er,{categoryAxis:{categories:[]},valueAxis:{}});var Qp,Pr=Er,Dr=((Qp=ae)&&(Kp.__proto__=Qp),((Kp.prototype=Object.create(Qp&&Qp.prototype)).constructor=Kp).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new C(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new C(t.x1,e[0].y,t.x2,e[2].y))},Kp.prototype.createVisual=function(){var t=this,e=this.options;Qp.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)},Kp.prototype.createPath=function(){var t=this.options,e=t.border;return b.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Kp.prototype.createHighlight=function(t){return b.drawing.Path.fromPoints(this.points,t)},Kp.prototype.highlightVisual=function(){return this.visual.children[0]},Kp.prototype.highlightVisualArgs=function(){var t=b.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Kp.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Nt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Kp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Kp);function Kp(t,e,o){Qp.call(this,e),this.value=t,this.options.index=o.index}i(Dr,{color:x,border:{width:1}}),m(Dr.prototype,xr);var $p,Jp=Dr,ps=(($p=ae)&&(tl.__proto__=$p),((tl.prototype=Object.create($p&&$p.prototype)).constructor=tl).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},tl.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,o=(void 0===e&&(e=[]),t.series[0]),i=o.data;if(i)for(var t=Ss(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(a=p.fields,H(o.color)||(o.color=a.color||e[s%e.length]),a=m({index:s,owner:this,series:o,dataItem:i[s],percentage:p.value/r},a,{visible:p.visible}),p=p.valueFields.value,h=this.createSegment(p,a),p=this.createLabel(p,a),h&&p&&h.append(p))}},tl.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;dr(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},tl.prototype.createSegment=function(t,e){var o=m({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible)return t=new Jp(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},tl.prototype.createLabel=function(t,e){var o,i=e.series,r=e.dataItem,n=m({},this.options.labels,i.labels),s=t;if(n.visible)return o=K(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:i},o?s=o(r):n.format&&(s=this.plotArea.chartService.format.auto(n.format,s)),n.color||(n.color=Lt(i.color),n.background||(n.background=i.color)),this.evalSegmentOptions(n,t,e),o=new Te(s,m({vAlign:n.position},n),r),this.labels.push(o),o},tl.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!==A&&(i=t[o].box.width(),r===P?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},tl.prototype.dynamicSlopeReflow=function(t,e,l){for(var c=this.options,o=this.points,u=o.length,d=o[0],i=d,r=0;r<o.length;r++)o[r].percentage>i.percentage&&(i=o[r]);for(var f=d.percentage/i.percentage*e,g=(e-f)/2,n=0,s=0;s<u;s++){var a=o[s].percentage,h=o[s+1],h=h?h.percentage:a,p=o[s].points=[],y=c.dynamicHeight?l*a:l/u,a=wt(a?(e-f*(h/a))/2:h?0:e/2,0,e);p.push(new b.geometry.Point(t.x1+g,t.y1+n)),p.push(new b.geometry.Point(t.x1+e-g,t.y1+n)),p.push(new b.geometry.Point(t.x1+e-a,t.y1+y+n)),p.push(new b.geometry.Point(t.x1+a,t.y1+y+n)),n+=y+c.segmentSpacing,f=wt(e-2*(g=a),0,e)}},tl.prototype.constantSlopeReflow=function(t,e,l){for(var o=this.options,i=this.points,r=i.length,c=o.neckRatio<=1,u=c?o.neckRatio*e:e,n=c?0:(e-e/o.neckRatio)/2,d=((c?e:e-2*n)-u)/2,s=0,a=0;a<r;a++){var h=i[a].points=[],p=i[a].percentage,f=o.dynamicHeight?d*p:d/r,p=o.dynamicHeight?l*p:l/r;h.push(new b.geometry.Point(t.x1+n,t.y1+s)),h.push(new b.geometry.Point(t.x1+e-n,t.y1+s)),h.push(new b.geometry.Point(t.x1+e-n-f,t.y1+p+s)),h.push(new b.geometry.Point(t.x1+n+f,t.y1+p+s)),n+=f,s+=p+o.segmentSpacing}},tl.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)}},tl);function tl(t,e){$p.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}i(ps,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:A,position:A,zIndex:1}}),m(ps.prototype,Fh);var el,ol,il=ps,Er=((ol=Ds)&&(nl.__proto__=ol),((nl.prototype=Object.create(ol&&ol.prototype)).constructor=nl).prototype.render=function(){this.createFunnelChart(this.series)},nl.prototype.createFunnelChart=function(t){var e=t[0],t=new il(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(t)},nl.prototype.appendChart=function(t,e){ol.prototype.appendChart.call(this,t,e),dt(this.options.legend.items,t.legendItems)},nl),Dr=((el=ae)&&(rl.__proto__=el),((rl.prototype=Object.create(el&&el.prototype)).constructor=rl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},rl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=K(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Lt(this.color),this.label=new Te(e,m({align:A,vAlign:A,margin:{left:5,right:5},zIndex:At(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},rl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},rl.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())},rl.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r="roundedRect"===At(e.type,"rect"),o=At(o.width,r?1:0),r=Math.round(o/2);return e.size&&(t=i.center(),i.size.width=i.size.height=e.size,i.origin.x=Math.round(t.x-i.size.width/2),i.origin.y=Math.round(t.y-i.size.height/2)),i.size.width-=o,i.size.height-=o,i.origin.y+=r+.5,i.origin.x+=r+.5,Se(i)},rl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=At(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},rl.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new ue({type:At(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:At(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=e,this.append(e)},rl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new ue({type:At(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:At(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},rl.prototype.highlightVisual=function(){return this.rectVisual},rl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},rl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Nt(t,e),align:{horizontal:A,vertical:S}}},rl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},rl.prototype.unclipElements=function(){},rl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},rl);function rl(t,e){el.call(this),this.options=e,this.color=e.color||x,this.value=t}function nl(){ol.apply(this,arguments)}m(Dr.prototype,xr),m(Dr.prototype,o),Dr.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var sl,al=Dr,ps=((sl=ae)&&(hl.__proto__=sl),((hl.prototype=Object.create(sl&&sl.prototype)).constructor=hl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:c,max:l},this._evalSeries=[]},hl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},hl.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;w(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},hl.prototype.addValue=function(t,e){var o;t&&w(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},hl.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],r=(w(s)||(this._evalSeries[r]=s=dr(t,{},n,!0)),t);return s&&dr(r=m({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},hl.prototype.pointType=function(){return al},hl.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=m({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},hl.prototype.createPoint=function(t,e){var o,i,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(H(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=Object(b.parseColor)(e),r=1-o,a=function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}(t.value/this.valueRange.max)),new al(t,s));return n.color=a,this.append(n),n},hl.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(!o)throw new Error("Unable to locate Y axis with name "+t);return{xAxis:i,yAxis:o}},hl.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++],e=n.seriesAxes(e.series),i=e.xAxis,e=e.yAxis,r=i.categoryIndex(t.x),t=e.categoryIndex(t.y),i=i.getSlot(r,r,a),r=e.getSlot(t,t,a);o&&(i&&r?(e=n.pointSlot(i,r),o.reflow(e)):o.visible=!1)}),this.box=t},hl.prototype.pointSlot=function(t,e){return new C(t.x1,e.y1,t.x2,e.y2)},hl.prototype.traverseDataPoints=function(l){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=this.seriesAxes(o),r=i.xAxis,c=i.yAxis,u=r.currentRangeIndices(),d=c.currentRangeIndices(),n=0;n<o.data.length;n++){var s=this._bindPoint(o,e,n),a=s.valueFields,s=s.fields,h=r.totalIndex(a.x),p=c.totalIndex(a.y),h=u.min<=h&&h<=u.max,p=d.min<=p&&p<=d.max;h&&p&&l(a,m({pointIx:n,series:o,seriesIx:e,dataItem:o.data[n],owner:this},s))}},hl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},hl.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},hl);function hl(t,e){sl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(ps,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),m(ps.prototype,{_bindPoint:mr.prototype._bindPoint});var pl,ll=ps,o=((pl=Ds)&&(cl.__proto__=pl),((cl.prototype=Object.create(pl&&pl.prototype)).constructor=cl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},cl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},cl.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],l=o.data||[],i=this.seriesAxes(o),r=i.xAxis,i=i.yAxis,n=jt(r.categories||[]),s=jt(i.categories||[]),a=0;a<l.length;a++){var h=Ni.current.bindPoint(o,a).valueFields,p=h.x,h=h.y;n.has(p)||n.add(p),s.has(h)||s.add(h)}r.categories=n.values(),i.categories=s.values()}},cl.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"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(As(r,["heatmap"]),i)}},cl.prototype.createHeatmapChart=function(t,e){t=new ll(this,{series:t});this.appendChart(t,e)},cl.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=et([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=et([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},cl.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,t=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(!t)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:o,yAxis:t}},cl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},cl.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,l=e?this.namedYAxes:this.namedXAxes,n=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=n.categories?n.categories[0]:null,s=[n.min,n.max,t],c=this.series,a=0;a<c.length;a++){var u=c[a],h=u[e?"yAxis":"xAxis"];if(h===n.name||0===o&&!h){h=Ni.current.bindPoint(u,0).valueFields;s.push(h[e?"y":"x"]);break}}for(var p=0;p<s.length;p++)if(s[p]instanceof Date){i=!0;break}t=new(ks(n.type,y)||!n.type&&i?Xo:zo)(n,this.chartService);if(t.axisIndex=o,r){if(l[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");l[r]=t}return this.appendAxis(t),t.mapCategories(),t},cl.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++)nt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)nt(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]},cl.prototype.removeAxis=function(t){var e=t.options.name;pl.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},cl.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,l=n.length,s=[],a=[],h=0;h<l;h++){var p=n[h];ws(p.options.vertical?a:s,p.getCategory(r))}0<s.length&&0<a.length&&t.trigger(o,{element:xt(e),originalEvent:e,x:Ms(s),y:Ms(a)})},cl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);ul(this.options,i,o,e),ul(this.originalOptions,i,o,e)},cl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},cl);function cl(){pl.apply(this,arguments)}function ul(t,e,o,i){m([].concat(o?t.yAxis:t.xAxis)[e],i)}i(o,{xAxis:{},yAxis:{}}),m(o.prototype,Hs);var dl,Dr=o,ps="color",o="first",fl="max",gl=(hh.current.register(La,[Qi,Ki,$i,tr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),hh.current.register(zh,["scatter","scatterLine","bubble"]),hh.current.register(Yh,[Ji]),hh.current.register(rp,["donut"]),hh.current.register(Er,["funnel"]),hh.current.register(Go,["polarArea","polarLine","polarScatter"]),hh.current.register(Pr,["radarArea","radarColumn","radarLine"]),hh.current.register(Dr,["heatmap"]),Ni.current.register([Qi,Ki,$i,tr,"area","verticalArea"],[v],["category",ps,"noteText","errorLow","errorHigh"]),Ni.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",ps,"noteText"]),Ni.current.register(["waterfall","horizontalWaterfall"],[v],["category",ps,"noteText","summary"]),Ni.current.register(["polarArea","polarLine","polarScatter"],[_,O],[ps]),Ni.current.register(["radarArea","radarColumn","radarLine"],[v],[ps]),Ni.current.register(["funnel"],[v],["category",ps,"visibleInLegend","visible"]),qs.current.register([Qi,Ki,$i,tr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:fl,color:o,noteText:o,errorLow:"min",errorHigh:fl}),qs.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:fl,color:o,noteText:o}),qs.current.register(["radarArea","radarColumn","radarLine"],{value:fl,color:o}),Ni.current.register(["scatter","scatterLine","bubble"],[_,O],[ps,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ni.current.register(["bubble"],[_,O,"size"],[ps,"category","noteText"]),Ni.current.register(["heatmap"],[_,O,v],[ps,"noteText"]),Ni.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",ps,"downColor","noteText"]),qs.current.register(["candlestick","ohlc"],{open:fl,high:fl,low:"min",close:fl,color:o,downColor:o,noteText:o}),Ni.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",ps,"noteText"]),qs.current.register(["boxPlot","verticalBoxPlot"],{lower:fl,q1:fl,median:fl,q3:fl,upper:fl,mean:fl,outliers:o,color:o,noteText:o}),Ni.current.register(["bullet","verticalBullet"],["current","target"],["category",ps,"visibleInLegend","noteText"]),qs.current.register(["bullet","verticalBullet"],{current:fl,target:fl,color:o,noteText:o}),Ni.current.register([Ji,"donut"],[v],["category",ps,"explode","visibleInLegend","visible"]),["category",v,_,O]),Er=((dl=b.Class)&&(r.__proto__=dl),((r.prototype=Object.create(dl&&dl.prototype)).constructor=r).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},r.prototype._setElementClass=function(t){R(t,"k-chart")},r.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;for(var n=t,s=gl,a=0;a<s.length;a++){var h=s[a]+"Axes";n[h]&&(n[s[a]+"Axis"]=n[h],delete n[h])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=m({},e,t),this.applySeriesColors()},r.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)}},r.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&&Mt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},r.prototype._resize=function(){this._noTransitionsRedraw()},r.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()},r.prototype.getAxis=function(t){return Mi(t,this._plotArea.axes)},r.prototype.findAxisByName=function(t){return this.getAxis(t)},r.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Ri(e[o])},r.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Ri(e[t])},r.prototype.plotArea=function(){return new Ei(this._plotArea)},r.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=H(e)?r.filterPoints(e):(N(e)?(o=e.series,i=e.category):o=i=e,"donut"===n.type?yl(r.pointsBySeriesName(o),i):n.type===Ji||"funnel"===n.type?yl((r.charts[0]||{}).points,i):r.pointsBySeriesName(o));e&&this.togglePointsHighlight(t,e)},r.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},r.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;H(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&w(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(n=this._plotArea.pointsByCategoryIndex(o),r.showAt(n)):e&&r.show(e)},r.prototype.hideTooltip=function(){this._tooltip.hide()},r.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&vt(e,{width:o.width}),o.height&&vt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=b.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},r.prototype._surfaceWrap=function(){return this.element},r.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 Va,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),bl(this._plotArea.panes),this._navState||this._cancelDomEvents()},r.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(o=this.options,t=m({},t.options,{chartArea:{width:t.width,height:t.height}}),_l(this._originalOptions,t),this.options=m({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),bl(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},r.prototype._sharedTooltip=function(){return this._plotArea instanceof La&&this.options.tooltip&&this.options.tooltip.shared},r.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ga(this._plotArea,t.pannable))},r.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Qa(this,e))},r.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Ka(this,e))},r.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart",or,ir])),o=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",rr,nr]),e=this.element;this._dragZoomEnabled&&t&&o?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&o||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!o)},r.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},r.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new yh(this.chartService,t)},r.prototype._createSharedTooltip=function(t){return new _h(this._plotArea,t)},r.prototype.applyDefaults=function(t,l){var o,i,e,r=t,c=(l||{}).axisDefaults||{};function u(t){var e=(t||{}).color||i.color,e=m({},c,c[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[o],e}for(var n=0;n<gl.length;n++)i=r.axisDefaults||{},e=(e=[].concat(r[o=gl[n]+"Axis"])).map(u),r[o]=1<e.length?e:e[0];var s=t,t=l,a=s.series,d=a.length,f=s.seriesDefaults,g=m({},s.seriesDefaults),y=t?m({},t.seriesDefaults):{},v=m({},y);vl(g),vl(v);for(var h=0;h<d;h++){var p=a[h].type||s.seriesDefaults.type,p=m({data:[]},v,y[p],{tooltip:s.tooltip},g,f[p]);a[h]._defaults=p,a[h]=m({},p,a[h]),a[h].data=a[h].data||[]}},r.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)}},r.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new ve(this._modelOptions());return o.chart=this,o._plotArea=e,Re.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new sh(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},r.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return m({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},r.prototype._createPlotArea=function(t){var e=this.options;return hh.current.create(t?[]:e.series,e,this.chartService)},r.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 zo&&n.select&&!n.vertical&&(i=r.range(),r=new gh(this,r,m({min:i.min,max:i.max},n.select)),e.push(r))}},r.prototype._selectStart=function(t){return this.trigger("selectStart",t)},r.prototype._select=function(t){return this.trigger("select",t)},r.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},r.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(b.throttle)(this._mousemove.bind(this),20)},r.prototype.addObserver=function(t){t&&this.observers.push(t)},r.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},r.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},r.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},r.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ft(e,((t={}).contextmenu=this._clickHandler,t[sr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&ft(e,((t={}).mousemove=this._mousemove,t)),this.domEvents=Ye.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()},r.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},r.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},r.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},r.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(nr,{}))},r.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+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(rr,o)&&i.zoom())))},r.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},r.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",or,ir])&&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}))},r.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(or,{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(or,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},r.prototype._end=function(t){var e,o;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(ir,{axisRanges:ml(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,ir),this._zoomSelection&&(o=this._zoomSelection.end(t))&&!this.trigger(rr,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(nr,{axisRanges:o,originalEvent:t})))},r.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},r.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return At(t.rate,.3)},r.prototype._mousewheel=function(t){var e=this,o=ct(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(rr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(nr,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=i||this._startNavigation(t,r,"zoomStart")?i:this._navState){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(rr,{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,nr)},150)}}},r.prototype._startNavigation=function(t,e,o){var i,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(i=ml(r),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:e,axes:r}))},r.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},r.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},r.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},r.prototype._eventCoordinates=function(t){t=mt(t);return this._toModelCoordinates(t.x,t.y)},r.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=X(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},r.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=yt(this.element);return{left:k(t.x+e.left+o.left),top:k(t.y+e.top+o.top)}},r.prototype._toModelCoordinates=function(t,e){var o=this.element,i=yt(o),r=this._elementPadding(),o=Et(o).invert(),t=new b.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new Nt(t.x,t.y)},r.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)},r.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},r.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},r.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Ds)}),o=this._activePoint,i=1<this._plotArea.series.length,r=this._hasInactiveOpacity();return this._updateHoveredPoint(t,e),t&&o!==t&&t.hover?(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),r?this._displayInactiveOpacity(t,i):this._highlight.show(t))):!t&&r&&(i&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),t},r.prototype._displayTooltip=function(t){m({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},r.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()?(e=this._getInactivePoints(t,i))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},r.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},r.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},r.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)},r.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))}},r.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)}},r.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},r.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},r.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},r.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},r.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),ft(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},r.prototype._mouseMoveTracking=function(t){var e=this.options,o=this._tooltip,i=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&((n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&((this._activePoint=n).hover(this,t)||(m({},e.tooltip,n.options.tooltip).visible&&o.show(n),i.show(n)))):(kt(document,((r={}).mousemove=this._mouseMoveTrackHandler,r)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},r.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)},r.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()}},r.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,h,p;this._suppressHover||(i=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((p=(h=(a=a.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))},r.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},r.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()},r.prototype._deferRedraw=function(){this._redraw()},r.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},r.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)}},r.prototype.bindCategoryAxisFromSeries=function(t,l){for(var e,o,c=this.options.series,u=c.length,d=new rt,n=[],f=!1,i=0;i<u;i++){var r=c[i],s=r.categoryAxis===t.name||!r.categoryAxis&&0===l,a=r.data,g=a.length,s=r.categoryField&&s,f=s||f;if(s&&0<g)for(var y=(e=Ts(t,ji(r.categoryField,a[0])))?Ps:ji,h=0;h<g;h++){var v=a[h],p=y(r.categoryField,v,this.chartService.intl);!e&&d.get(p)||(n.push([p,v]),e||d.set(p,!0))}}0<n.length?(o=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}(n=e?function(t){for(var e=function(t,e){void 0===e&&(e=So);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(n,t=void 0===t?So:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],bt(i))&&i.push(e[r]);return i}(function(t,e){return So(t[0],e[0])}):n),t.categories=o[0]):f&&(t.categories=[])},r.prototype._isBindable=function(t){for(var e=Ni.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===v?r="field":r+="Field",!w(t[r])){o=!1;break}}return o},r.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},r.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=nt(r.type,[Ji,"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)},r.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},r.prototype.updateMouseMoveHandler=function(){var t;kt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&ft(this.element,((t={}).mousemove=this._mousemove,t))},r.prototype.applyOptions=function(t,e){_l(this._originalOptions,t),this._originalOptions=m(this._originalOptions,t),this.options=m({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},r.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},r.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},r.prototype.setIntlService=function(t){this.chartService.intl=t},r.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},r.prototype.destroy=function(){var t;this._destroyed=!0,kt(this.element,((t={}).contextmenu=this._clickHandler,t[sr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&kt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},r.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},r.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},r.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)},r);function r(t,e,o,i){var r=this,i=(void 0===i&&(i={}),dl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new qe(this,i),this.chartService.theme=o,this._initElement(t),m({},this.options,e));this._originalOptions=m({},i),this._theme=o,this._initTheme(i,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Pt.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function yl(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function vl(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 xl=["data","categories"];function _l(t,e){for(var o in e){var i,r,n;!nt(o,xl)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],w(r)&&((n=null===i)||!w(i)?(delete t[o],n&&delete e[o]):r&&N(i)&&N(r)&&_l(r,i)))}}function bl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}i(Er,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Ki,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 wl,Cl=Er,Sl=((wl=_h)&&(Al.__proto__=wl),((Al.prototype=Object.create(wl&&wl.prototype)).constructor=Al).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}},Al.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Al),kl=[Qi,"bullet"];function Al(){wl.apply(this,arguments)}function Pl(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 Tl(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Ml(t){return V(t)?[t]:t}(Ol=Cl)&&(Bl.__proto__=Ol),((Bl.prototype=Object.create(Ol&&Ol.prototype)).constructor=Bl).prototype._setElementClass=function(t){R(t,"k-sparkline")},Bl.prototype._initElement=function(t){Ol.prototype._initElement.call(this,t),this._initialWidth=Math.floor(vt(t).width)},Bl.prototype._resize=function(){var t=this.element,e=Pl(t.childNodes);this._initialWidth=Math.floor(vt(t).width),Tl(t.childNodes,e),Ol.prototype._resize.call(this)},Bl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Pl(e.childNodes),i=document.createElement("span"),t=(i.innerHTML="&nbsp;",e.appendChild(i),m({width:this._autoWidth,height:vt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return vt(e,{width:t.width,height:t.height}),e.removeChild(i),Tl(e.childNodes,o),this.surface&&this.surface.resize(),t},Bl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Bl.prototype._createPlotArea=function(t){t=Ol.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Bl.prototype._calculateWidth=function(t){for(var e=this.options,o=q(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===Qi)return 150;if("bullet"===h.type)return 150;if(h.type===Ji)return vt(r).height;var p=a.categoryAxis;p&&(p=p.categoriesCount()*(!a.options.isStacked&&nt(h.type,[Ki,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,p))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},Bl.prototype._createSharedTooltip=function(t){return new Sl(this._plotArea,t)},Bl.normalizeOptions=function(t){t=Ml(t);return(t=B(t)?{seriesDefaults:{data:t}}:m({},t)).series||(t.series=[{data:Ml(t.data)}]),m(t,{seriesDefaults:{type:t.type}}),t=nt(t.series[0].type,kl)||nt(t.seriesDefaults.type,kl)?m({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Ol,Go=Bl;function Bl(){Ol.apply(this,arguments)}i(Go,{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 Rl,El=Go,Ll=((Rl=b.drawing.Animation)&&(Il.__proto__=Rl),((Il.prototype=Object.create(Rl&&Rl.prototype)).constructor=Il).prototype.setup=function(){this._initialOpacity=parseFloat(X(this.element,"opacity").opacity)},Il.prototype.step=function(t){X(this.element,{opacity:String(st(this._initialOpacity,0,t))})},Il.prototype.abort=function(){Rl.prototype.abort.call(this),X(this.element,{display:"none",opacity:String(this._initialOpacity)})},Il.prototype.cancel=function(){Rl.prototype.abort.call(this),X(this.element,{opacity:String(this._initialOpacity)})},Il);function Il(){Rl.apply(this,arguments)}function zl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}(Vl=b.Class)&&(jl.__proto__=Vl),((jl.prototype=Object.create(Vl&&Vl.prototype)).constructor=jl).prototype.createElements=function(){var t=this.element=zl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=zl("k-tooltip k-chart-tooltip"),o=this.scroll=zl("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(o)},jl.prototype.show=function(t,e,o){var i=this.element,r=this.options,l=this.scroll,n=this.tooltip,s=xo(Ao(t)+Ao(e-t)/2),a=.4*o.width(),h=o.center().x-a,c=(o.center().x-h)/(r.max-r.min),s=s-r.min,p=this.chartService.intl.format(r.format,t,e),r=K(r),r=(this.clearHideTimeout(),this._visible||(X(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(p=r({from:t,to:e})),n.innerHTML=p,X(n,{left:o.center().x-n.offsetWidth/2,top:o.y1}),X(n,["marginTop","borderTopWidth","height"]));X(l,{width:a,left:h+s*c,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),X(i,{visibility:"visible"})},jl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},jl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Ll(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},jl.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};var Vl,Pr=jl;function jl(t,e,o){Vl.call(this),this.options=m({},this.options,o),this.container=t,this.chartService=e;o=X(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}i(Pr,{format:"{0:d} - {1:d}",hideDelay:500});var Dl=Pr,Hl="_navigator",Ul=Hl;function Fl(){}(Gl=b.Class)&&(ql.__proto__=Gl),((ql.prototype=Object.create(Gl&&Gl.prototype)).constructor=ql).prototype.parseDate=function(t){return Bo(this.chart.chartService.intl,t)},ql.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},ql.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},ql.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},ql.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,i=i.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,h=(Fl.prototype=o,new Fl);0!==o.categoriesCount()&&(this.clean(),h.box=o.box,this.selection=new gh(t,h,{min:r,max:i,from:s||r,to:a||i,mousewheel:At(n,{zoom:"left"}),visible:e.visible},new ht(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Dl(t.element,t.chartService,{min:r,max:i,template:K(e.hint),format:e.hint.format})))},ql.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Ul].roundedRange(),e=t.min,t=t.max,o=this.options.select||{},i=o.from||e,r=o.to||t;this.options.select=m({},o,{from:i=i<e?e:i,to:r=t<r?t:r}),this.filterAxes()},ql.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(bt(e.panes),t)},ql.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)},ql.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(i),i=e._plotArea.categoryAxis,e=t.axisRanges[i.options.name],t=this.options.select;e&&!r&&o&&(i=t.from&&t.to?Ao(t.to)-Ao(t.from):Ao(o.options.to)-Ao(o.options.from),r=xo(wt(Ao(e.min),n.min,Ao(n.max)-i)),t=xo(wt(Ao(r)+i,Ao(n.min)+i,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(r,t),this.showHint(r,t))},ql.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},ql.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},ql.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!==Hl&&(n.min=o,n.max=i)}},ql.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:i.from,to:i.to},"category"!==e.options.type&&(e=new Xo(m({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=bo(e.min,-e.baseUnitStep,e.baseUnit),t.to=bo(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},ql.prototype._zoom=function(t){var e,o,i=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),h=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),o=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<a-e?(r.zoom(h,o),this.readSelection()):(i.options.min=s.from,s.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),o).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},ql.prototype._zoomEnd=function(t){this._dragEnd(t)},ql.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},ql.prototype._selectStart=function(t){return this.chart._selectStart(t)},ql.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},ql.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},ql.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Ul]},ql.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}},ql.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=m({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=m({},o.pane,{name:Hl}),o.visible||(r.visible=!1,r.height=.1),i.push(r),ql.attachAxes(t,o),ql.attachSeries(t,o,e))},ql.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=0===As(o,er).length,o=m({type:"date",pane:Hl,roundToBaseUnit:!o,justified:o,_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]}}),r=e.categoryAxis;i.push(m({},o,{maxDateGroups:200},r,{name:Ul,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),m({},o,r,{name:Ul+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),m({},o,r,{name:Ul+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(m({name:Ul,pane:Hl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},ql.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(m({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Ul,categoryAxis:Ul,autoBind:e.autoBindElements}))};var Nl,Gl,Wl=ql,Dr=((Nl=Cl)&&(Xl.__proto__=Nl),((Xl.prototype=Object.create(Nl&&Nl.prototype)).constructor=Xl).prototype.applyDefaults=function(t,e){var o=vt(this.element).width||600,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&&m({},e,o);Wl.setup(t,e),Nl.prototype.applyDefaults.call(this,t,e)},Xl.prototype._setElementClass=function(t){R(t,"k-chart k-stockchart")},Xl.prototype.setOptions=function(t){this.destroyNavigator(),Nl.prototype.setOptions.call(this,t)},Xl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Xl.prototype._resize=function(){this.noTransitionsRedraw()},Xl.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Xl.prototype._dirty=function(){var t=this.options,t=et([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Xl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Wl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Nl.prototype._redraw.call(this),t.initSelection()},Xl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Hl?this._unsetActivePoint():Nl.prototype._trackSharedTooltip.call(this,t)},Xl.prototype.bindCategories=function(){Nl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Xl.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Ul?t=i.categories:t&&i.pane===Hl&&(i.categories=t)}},Xl.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Xl.prototype.destroy=function(){this.destroyNavigator(),Nl.prototype.destroy.call(this)},Xl.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Nl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Hl},Xl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Xl);function Xl(){Nl.apply(this,arguments)}function ql(t){Gl.call(this),this.chart=t;var e=this.options=m({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),w(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new ht(this,((o={})[or]="_drag",o[ir]="_dragEnd",o[rr]="_zoom",o[nr]="_zoomEnd",o)),t.addObserver(this.chartObserver)}i(Dr,{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 Yl=Dr,Zl=Math.PI/180;function Ql(t,e){var o=t.getOrigin(),i=t.getSize(),e=q(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 Kl=b.drawing.Group,$l=b.drawing.Path,Jl=b.drawing.Text;function tc(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=$l.fromRect(new b.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new Jl(t.text,new b.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=Ql(t.bbox().clone(),e.padding),e=$l.fromRect(i,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),i=new Kl;return i.append(o),i.append(e),i.append(t),i}function ec(t,e,o){var i=w(t.from)?t.from:l,r=w(t.to)?t.to:c;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function oc(t,e){e=q(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Ql(t,e)}var ic,rc=b.drawing.Path,nc=b.drawing.Surface,fl=((ic=b.Class)&&(sc.__proto__=ic),((sc.prototype=Object.create(ic&&ic.prototype)).constructor=sc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},sc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},sc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},sc.prototype.exportVisual=function(){return this._visuals},sc.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(B(t))for(var r=0;r<t.length;r++)V(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},sc.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]},sc.prototype.resize=function(){this.noTransitionsRedraw()},sc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},sc.prototype.redraw=function(){var t=this._surfaceSize(),t=new b.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),oc(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},sc.prototype.setOptions=function(t,e){this._originalOptions=m(this._originalOptions,t),this.options=m({},this._originalOptions),this._initTheme(e),this.redraw()},sc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},sc.prototype.setIntlService=function(t){this.contextService.intl=t},sc.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=m({},e,this.options),this.options),o=t.pointer;if(B(o)){for(var i=[],r=0;r<o.length;r++)i.push(m({},e.pointer,o[r]));t.pointer=i}},sc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new b.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=oc(e,o.width)),rc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},sc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();vt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=nc.create(o,{type:t.renderAs}))},sc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&m(e,t.gaugeArea),e},sc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},sc.prototype.getSize=function(){return this._getSize()},sc.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}},sc.prototype._defaultSize=function(){return{width:200,height:200}},sc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},sc);function sc(t,e,o,i){void 0===i&&(i={}),ic.call(this),this.element=t,this.theme=o,this.contextService=new qe(this,i),this._originalOptions=m({},this.options,e),this.options=m({},this._originalOptions),this._initTheme(o),this.redraw()}i(fl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var ac=fl,hc=b.drawing.Path,pc=b.drawing.Group,lc=b.geometry.Point;function cc(l,c,t,e){var o,i,r,n,s,a,u=c.length;if(e.visible)for(var d=t.mirror,h=t.lineBox,p=e.skip;p<u;p+=e.step)p%e.skipUnit!=0&&(t.tickX=d?h.x2:h.x2-e.size,t.tickY=d?h.y1-e.size:h.y1,t.position=c[p],l.append((i=e,a=s=n=r=void 0,n=(o=t).position,s=t.tickX,a=t.tickY,o=t.vertical?(r=new lc(s,n),new lc(s+i.size,n)):(r=new lc(n,a),new lc(n,a+i.size)),new hc({stroke:{color:i.color,width:i.width}}).moveTo(r).lineTo(o))))}(uc=ei)&&(dc.__proto__=uc),((dc.prototype=Object.create(uc&&uc.prototype)).constructor=dc).prototype.initUserOptions=function(t){t=m({},this.options,t);return(t=m({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ut(t.min,t.max),t},dc.prototype.initFields=function(){},dc.prototype.render=function(){var t=this.elements=new pc,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},dc.prototype.renderRanges=function(){for(var t=this.options,l=t.min,c=t.max,e=t.vertical,o=t.labels.mirror,i=t.ranges||[],r=new pc,u=i.length,n=t.rangeSize||t.minorTicks.size/2,s=0;s<u;s++){var a=ec(i[s],l,c),h=this.getSlot(a.from,a.to),p=e?this.lineBox():h,h=e?h:this.lineBox();e?p.x1-=n*(o?-1:1):h.y2+=n*(o?-1:1),r.append(hc.fromRect(new b.geometry.Rect([p.x1,h.y1],[p.x2-p.x1,h.y2-h.y1]),{fill:{color:a.color,opacity:a.opacity},stroke:{}}))}return r},dc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new pc,i=0;i<t.length;i++)o.append(tc(t[i],e.labels));return o},dc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new pc;return 0<t.width&&t.visible&&((t=new hc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},dc.prototype.renderTicks=function(){var t=new pc,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return cc(t,this.getMajorTickPositions(),i,e.majorTicks),cc(t,this.getMinorTickPositions(),i,m({},{skipUnit:o/e.minorUnit},e.minorTicks)),t};var uc,o=dc;function dc(t,e){t=t||{};!w(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),uc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}i(o,{min:0,max:50,majorTicks:{size:15,align:"inside",color:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var fc,gc=o,ps=((fc=b.Class)&&(yc.__proto__=fc),((yc.prototype=Object.create(fc&&fc.prototype)).constructor=yc).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=w(e._oldValue)?e.value:i,e.value=wt(t,i,o),this.elements&&this.repaint()},yc);function yc(t,e){fc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=m({},this.options,e);e.fill=e.color,this.scale=t,w(e.value)?e.value=wt(e.value,i,o):e.value=i}i(ps,{color:a});var vc,Er=ps,Go=((vc=Er)&&(mc.__proto__=vc),((mc.prototype=Object.create(vc&&vc.prototype)).constructor=mc).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=i.track.size||i.size,h=i.size/2,p=q(i.margin),p=n?p[s?"left":"right"]:p[s?"bottom":"top"],p=s?-p:p;n?(o=new C(r.x1+p,r.y1,r.x1+p,r.y2),s?o.x1-=a:o.x2+=a,"barPointer"!==i.shape&&(t=e=new C(r.x2+p,r.y1-h,r.x2+p,r.y2+h))):(o=new C(r.x1,r.y1-p,r.x2,r.y1-p),s?o.y2+=a:o.y1-=a,"barPointer"!==i.shape&&(t=e=new C(r.x1-h,r.y1-p,r.x2+h,r.y1-p))),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:w(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,t=t.options,o=t.mirror,t=t.vertical,e=q(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},mc);function mc(t,e){vc.call(this,t,e),this.options=m({track:{visible:w(e.track)}},this.options)}i(Go,{shape:"barPointer",track:{border:{width:1}},color:a,border:{width:1},opacity:1,margin:q(3),animation:{type:"barPointer"},visible:!0});var xc,_c=Go,Pr=((xc=b.drawing.Animation)&&(bc.__proto__=xc),((bc.prototype=Object.create(xc&&xc.prototype)).constructor=bc).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e),this.fromScale=new b.geometry.Point(o.x1,o.y1)),n=this.toScale=new b.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},bc.prototype.step=function(t){var e=st(this.fromScale.x,this.toScale.x,t),t=st(this.fromScale.y,this.toScale.y,t);this.element.transform(b.geometry.transform().translate(e,t))},bc);function bc(){xc.apply(this,arguments)}i(Pr,{easing:"linear",duration:250}),b.drawing.AnimationFactory.current.register("arrowPointer",Pr);var wc,Cc,Sc=Pr,kc=b.geometry.Point,Ac=b.drawing.Path,Pc=((Cc=_c)&&(Mc.__proto__=Cc),((Mc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Mc).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 kc(0,0-o),new kc(0-i*e,0),new kc(0,0+o)]:[new kc(0-o,0),new kc(0,0+i*e),new kc(0+o,0)]},Mc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Sc(this.elements,m(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()},Mc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type="arrowPointer",new Ac({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(b.geometry.transform().translate(i.x1,i.y1)),this.elements=o},Mc),Dr=((wc=b.drawing.Animation)&&(Tc.__proto__=wc),((Tc.prototype=Object.create(wc&&wc.prototype)).constructor=Tc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?O:_,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)},Tc.prototype.step=function(t){t=st(this.from,this.to,t);this._set(t)},Tc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Tc);function Tc(){wc.apply(this,arguments)}function Mc(t,e){Cc.call(this,t,e),w(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}i(Dr,{easing:"linear",speed:250}),b.drawing.AnimationFactory.current.register("barPointer",Dr);var Oc,Bc,Rc=Dr,Ec=b.drawing.Group,Lc=b.drawing.Path,Ic=((Bc=_c)&&(jc.__proto__=Bc),((jc.prototype=Object.create(Bc&&Bc.prototype)).constructor=jc).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,i=i.vertical,r=r===i?-1:1,o=o.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=i?O:_,s=i?_:O,r=this._margin()*r,a=new b.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new b.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],i?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return i?(t.translate(o,0),e.translate(o,0)):(t.translate(0,o),e.translate(0,o)),[a,n,t,e]},jc.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue),i=(i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),new Rc(i,m(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]})));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},jc.prototype.render=function(){var t=new Ec,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new Lc({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},jc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Lc.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},jc),zc=b.drawing.Group,fl=((Oc=ac)&&(Vc.__proto__=Oc),((Vc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Vc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new C(o,i,o+t.width(),i+t.height());this.scale.reflow(o),this._shrinkScaleWidth(o);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(o),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Vc.prototype._buildVisual=function(){var t=new zc,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},Vc.prototype._createModel=function(){var t=this.options,e=this.scale=new gc(t.scale,this.contextService);this.pointers=[];for(var o=B(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=m({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Pc:Ic;this.pointers.push(new n(e,r))}},Vc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Vc.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 C(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new C(t.x1,r.y-e,t.x2,r.y+e))},Vc.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 C(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new C(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Vc.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))},Vc.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)},Vc);function Vc(){Oc.apply(this,arguments)}function jc(t,e){Bc.call(this,t,e),w(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}i(fl,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Dc=fl,Hc=b.drawing.Arc,Uc=b.drawing.Path,Fc=b.drawing.Group;function Nc(t,e,p,o){var i=new Fc,r=t.center,n=t.getRadiusX();if(o.visible)for(var s=0;s<e.length;s++){var a=t.pointAt(e[s]),h=new b.geometry.Point(r.x+n-o.size,r.y).rotate(e[s],r);i.append(new Uc({stroke:{color:o.color,width:o.width}}).moveTo(a).lineTo(h))}return i}function Gc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}(Wc=ei)&&(Xc.__proto__=Wc),((Xc.prototype=Object.create(Wc&&Wc.prototype)).constructor=Xc).prototype.initUserOptions=function(t){t=m({},this.options,t);return t.majorUnit=t.majorUnit||Ut(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Xc.prototype.initFields=function(){},Xc.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Xc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!w(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Xc.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-o)/(i-o)*s:(t-o)/(i-o)*s+n)+180},Xc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Xc.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,o=0;return e.visible&&(o=e.size),o=t.visible?Math.max(t.size,o):o},Xc.prototype.labelsCount=function(){var t=Wc.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Xc.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),l=this.tickAngles(e,t.majorUnit),i=t.rangeSize=t.rangeSize||.1*o,c=new Fc,u=.05*o,d=(w(t.rangeDistance)?u=t.rangeDistance:t.rangeDistance=u,t.labels),f="inside"===d.position,g=w(this.labelElements);f&&(o-=this.ticksSize(),this.hasRanges()&&!g&&(o-=i+u),e.setRadiusX(o).setRadiusY(o));for(var y=this.labels,v=y.length,i=q(d.padding),m=(i.left+i.right)/2,x=(i.top+i.bottom)/2,r=0;r<v;r++){var n=y[r],s=n.box.width()/2,_=n.box.height()/2,a=l[r],h=(a-180)*Zl,a=e.pointAt(a),p=a.x+Math.cos(h)*(s+m)*(f?1:-1),a=a.y+Math.sin(h)*(_+x)*(f?1:-1),h=(n.reflow(new C(p-s,a-_,p+s,a+_)),new b.geometry.Point(n.box.x1,n.box.y1)),p=void 0;g?(s=(p=this.labelElements.children[r]).bbox().origin,(a=p.transform()||b.geometry.transform()).translate(h.x-s.x,h.y-s.y),p.transform(a)):(p=tc(n,t.labels),c.append(p)),this.bbox=b.geometry.Rect.union(this.bbox,p.bbox())}return c},Xc.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,e=e.rangeSize,i=this.getRangeRadius();"inside"===this.options.labels.position&&(i+=e+o);for(var r=i+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=b.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Xc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Fc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,l=this.getRangeRadius();this.radius(this.radius()-r-i);for(var s=0;s<e;s++){var a=t[s],h=this.slotAngle(a[n?"to":"from"]),p=this.slotAngle(a[n?"from":"to"]);p-h!=0&&o.append(this.createRange(h,p,l,a))}}return o},Xc.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new b.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Hc(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Xc.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,l=t.rangePlaceholderColor;i.push(Gc(r,n,l));for(var s=0;s<o;s++)for(var a=ec(e[s],r,n),c=i.length,h=0;h<c;h++){var p=i[h];if(p.from<=a.from&&a.from<=p.to){i.push(Gc(a.from,a.to,a.color,a.opacity)),p.from<=a.to&&a.to<=p.to&&i.push(Gc(a.to,p.to,l,a.opacity)),p.to=a.from;break}}}return i},Xc.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},Xc.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new b.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Xc.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Nc(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Fc),n=(r.append(this.majorTicks),o.majorTicks.size),s=o.minorTicks.size;return this._tickDifference=n-s,"outside"===o.labels.position&&(t=i.getRadiusX(),i.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,o.minorUnit)),this.minorTicks=Nc(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Xc.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},Xc.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,l=o.max-o.min,r=t.endAngle-t.startAngle,n=l/e,s=t.startAngle,a=r/n;i&&(s+=r,a=-a),360<=r&&o.max%e==0&&--n;for(var h=[],p=0;p<n;p++)h.push(k(s,3)),s+=a;return k(s)<=t.endAngle&&h.push(s),h},Xc.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)},Xc.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,a=a.y-h[0].anchor().y;t[s].transform((new b.geometry.transform).translate(p,a))}};var Wc,o=Xc;function Xc(t,e){Wc.call(this,0,1,t,e)}i(o,{min:0,max:100,majorTicks:{size:15,align:"inside",color:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var qc,Yc=o,ps=((qc=b.drawing.Animation)&&(Zc.__proto__=qc),((Zc.prototype=Object.create(qc&&qc.prototype)).constructor=Zc).prototype.step=function(t){var e=this.options,t=st(e.oldAngle,e.newAngle,t);this.element.transform(b.geometry.transform().rotate(t,e.center))},Zc);function Zc(t,e){qc.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}i(ps,{easing:"linear",duration:150}),b.drawing.AnimationFactory.current.register("radialPointer",ps);var Qc,Kc=ps,$c=b.drawing.Circle,Jc=b.drawing.Group,tu=b.drawing.Path,Go=((Qc=Er)&&(eu.__proto__=Qc),((eu.prototype=Object.create(Qc&&Qc.prototype)).constructor=eu).prototype.setAngle=function(t){this.elements.transform(b.geometry.transform().rotate(t,this.center))},eu.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 Kc(this.elements,m(e.animation,{oldAngle:o,newAngle:t})).play()},eu.prototype.render=function(){var t=this.scale,e=this.options,o=new Jc;return!1!==e.animation&&m(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Zl),o},eu.prototype.reflow=function(t){var e=this.center=t.center,o=wt(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(t*this.options.cap.size);this.bbox=b.geometry.Rect.fromPoints(new b.geometry.Point(e.x-o,e.y-o),new b.geometry.Point(e.x+o,e.y+o))},eu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new tu({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},eu.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new b.geometry.Circle(this.center,this.capSize);return new $c(e,{fill:{color:t},stroke:{color:t}})},eu);function eu(){Qc.apply(this,arguments)}i(Go,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var ou,iu=Go,ru=b.drawing.Group,Pr=((ou=ac)&&(nu.__proto__=ou),((nu.prototype=Object.create(ou&&ou.prototype)).constructor=nu).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=b.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},nu.prototype._buildVisual=function(t,e,o){var i=this._visuals=new ru;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},nu.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)}},nu.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=k(a,3),p=k(-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:k((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)},nu.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=b.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},nu.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},nu.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,e=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=b.geometry.Rect.union(r.bbox,n[s].bbox)},nu.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Yc(t.scale,this.contextService);this.pointers=[];for(var i=B(e)?e:[e],r=0;r<i.length;r++){var n=new iu(o,m({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},nu);function nu(){ou.apply(this,arguments)}i(Pr,{transitions:!0,gaugeArea:{background:""}});var su,au=Pr,Dr=((su=Yc)&&(hu.__proto__=su),((hu.prototype=Object.create(su&&su.prototype)).constructor=hu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},hu.prototype.hasRanges=function(){return!0},hu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},hu.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),i=this.slotAngle(i?t:e),t=this.createRange(r,i,this.getRangeRadius(),o);return this.ranges.append(t),t},hu);function hu(){su.apply(this,arguments)}i(Dr,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var pu,lu=Dr,fl=((pu=b.drawing.Animation)&&(cu.__proto__=pu),((cu.prototype=Object.create(pu&&pu.prototype)).constructor=cu).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=st(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=k(st(i.r,r.r,t)),e=k(st(i.g,r.g,t)),i=k(st(i.b,r.b,t)),this.element.stroke(new b.Color(o,e,i).toHex()))},cu);function cu(t,e){pu.call(this,t,e);var e=this.options,o=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=wt(o,150,800),t.elements.options.get("stroke.color")),o=t.currentColor();e!==o&&(this.startColor=new b.Color(e),this.color=new b.Color(o))}i(fl,{easing:"linear",duration:150}),b.drawing.AnimationFactory.current.register("radialRangePointer",fl);var uu,du=fl,o=((uu=Er)&&(fu.__proto__=uu),((fu.prototype=Object.create(uu&&uu.prototype)).constructor=fu).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 du(this,m(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},fu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},fu.prototype.stroke=function(t){this.elements.stroke(t)},fu.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&m(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}))},fu.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,t=this.options,i=t.colors,r=t.color,t=t.value,n=V(t)?t:e;if(i)for(var s=0;s<i.length;s++){var a=i[s],h=a.color,p=a.from,a=(void 0===p&&(p=e),a.to);if(void 0===a&&(a=o),p<=n&&n<=a)return h}return r},fu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},fu);function fu(){uu.apply(this,arguments)}i(o,{animation:{type:"radialRangePointer",duration:150}});var gu,yu,vu,mu=o,xu=((vu=au)&&(Cu.__proto__=vu),((Cu.prototype=Object.create(vu&&vu.prototype)).constructor=Cu).prototype._initTheme=function(t){vu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Cu.prototype._createModel=function(){var t=this.options,e=this.scale=new lu(t.scale,this.contextService),e=new mu(e,m({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Cu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},Cu.prototype._setValueOptions=function(t){this.options.value=t},Cu.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Cu.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,i=i.y-e/2;return t<o.width&&(t=r+t,r=Math.max(r,0),t>o.width&&(r-=t-o.width)),e<o.height&&(o=(t=this.scale.bbox).bottomRight().y,e=i+e,i=Math.max(i,t.origin.y),o<e&&(i-=e-o)),{left:r,top:i}},Cu),_u=((yu=xu)&&(wu.__proto__=yu),((wu.prototype=Object.create(yu&&yu.prototype)).constructor=wu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,yu.prototype._createModel.call(this)},wu),ps=((gu=b.Class)&&(bu.__proto__=gu),((bu.prototype=Object.create(gu&&gu.prototype)).constructor=bu).prototype.initProperties=function(){},bu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},bu.prototype.encode=function(t,e,o){t=w(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}},bu.prototype.initValue=function(){},bu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},bu.prototype.addData=function(){},bu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},bu);function bu(t){gu.call(this),this.setOptions(t),this.initProperties()}function wu(){yu.apply(this,arguments)}function Cu(){vu.apply(this,arguments)}i(ps,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Su,ku=Object.assign,Go=((Su=ps)&&(Au.__proto__=Su),((Au.prototype=Object.create(Su&&Su.prototype)).constructor=Au).prototype.initProperties=function(){Su.prototype.initProperties.call(this),ku(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"})},Au.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Au.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()},Au.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Au.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&&(o=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=o,this.addPattern(this.characterMap[o]))},Au.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},Au.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Au.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Au.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Au.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},Au);function Au(){Su.apply(this,arguments)}i(Go,{addCheckSum:!0});var Pu,Tu,Mu=Object.assign,Pr=((Tu=ps)&&(Bu.__proto__=Tu),((Bu.prototype=Object.create(Tu&&Tu.prototype)).constructor=Bu).prototype.initProperties=function(){Tu.prototype.initProperties.call(this),Mu(this,{minBaseUnitLength:.7})},Bu.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()},Bu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Bu.prototype.addBase=function(){},Bu),Dr=((Pu=Pr)&&(Ou.__proto__=Pu),((Ou.prototype=Object.create(Pu&&Pu.prototype)).constructor=Ou).prototype.initProperties=function(){Pu.prototype.initProperties.call(this),Mu(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"}}})},Ou.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Ou.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)throw i=Math.ceil(this.getBaseWidth(o)*e),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))},Ou.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Ou.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Ou.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Ou.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Ou.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Ou.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Ou.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Ou);function Ou(){Pu.apply(this,arguments)}function Bu(){Tu.apply(this,arguments)}i(Dr,{addCheckSum:!1});var Ru,Eu,Lu,Iu,zu,Vu,ju,Du,Hu,Uu,Fu,Nu={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"]},fl=((Vu=Dr)&&(rd.__proto__=Vu),((rd.prototype=Object.create(Vu&&Vu.prototype)).constructor=rd).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),m(this,Nu,{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}}})},rd),Gu=Object.assign,Er=((zu=Pr)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.prototype.initProperties.call(this),Gu(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"}})},id.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},id.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)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),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.")},id.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},id.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},id.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},id.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},id.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)},id.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]},id.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},id.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},id.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},id),o=((Iu=Er)&&(od.__proto__=Iu),((od.prototype=Object.create(Iu&&Iu.prototype)).constructor=od).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),m(this,Nu,{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))}})},od),Wu=/^\d+$/,Xu=Object.assign,Pr=((Lu=ps)&&(ed.__proto__=Lu),((ed.prototype=Object.create(Lu&&Lu.prototype)).constructor=ed).prototype.initProperties=function(){Lu.prototype.initProperties.call(this),Xu(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},ed.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()},ed.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()},ed.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},ed.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},ed.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},ed.prototype.validate=function(t){if(Wu.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!nt(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},ed.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)},ed),qu=/^\d+$/,Yu=/^[a-z0-9]+$/i,Zu=Object.assign,Qu=((Eu=b.Class)&&(td.__proto__=Eu),((td.prototype=Object.create(Eu&&Eu.prototype)).constructor=td).prototype.initProperties=function(){},td.prototype.addStart=function(){},td.prototype.is=function(){},td.prototype.isCode=function(){return!1},td.prototype.move=function(){},td.prototype.pushState=function(){},td),Ku=((Ru=Qu)&&(Ju.__proto__=Ru),((Ju.prototype=Object.create(Ru&&Ru.prototype)).constructor=Ju).prototype.initProperties=function(){Ru.prototype.initProperties.call(this),m(this,{FNC4:"FNC4",SHIFT:98})},Ju.prototype.addStart=function(){this.encoding.addPattern(this.START)},Ju.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Ju.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Ju.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!nt("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++},Ju.prototype._initMoves=function(t){this._moves=[],nt(this.FNC4,t)&&this._moves.push(this._moveFNC),nt(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Ju.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Ju.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},Ju.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Ju),$u={};function Ju(t,e){Ru.call(this,t),this.states=e,this._initMoves(e)}function td(t){Eu.call(this),this.encoding=t,this.initProperties()}function ed(){Lu.apply(this,arguments)}function od(){Iu.apply(this,arguments)}function id(){zu.apply(this,arguments)}function rd(){Vu.apply(this,arguments)}function nd(t,e){ju.call(this,t),this.states=e}function sd(t,e){Du.call(this,t),this._initSubStates(e)}function ad(){Hu.apply(this,arguments)}function hd(){Uu.apply(this,arguments)}function pd(){Fu.apply(this,arguments)}$u.A=((Fu=Ku)&&(pd.__proto__=Fu),((pd.prototype=Object.create(Fu&&Fu.prototype)).constructor=pd).prototype.initProperties=function(){Fu.prototype.initProperties.call(this),Zu(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},pd.prototype.isCode=function(t){return 0<=t&&t<96},pd.prototype.getValue=function(t){return t<32?t+64:t-32},pd),$u.B=((Uu=Ku)&&(hd.__proto__=Uu),((hd.prototype=Object.create(Uu&&Uu.prototype)).constructor=hd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),Zu(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},hd.prototype.isCode=function(t){return 32<=t&&t<128},hd.prototype.getValue=function(t){return t-32},hd),$u.C=((Hu=Qu)&&(ad.__proto__=Hu),((ad.prototype=Object.create(Hu&&Hu.prototype)).constructor=ad).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Zu(this,{key:"C",MOVE:99,START:105})},ad.prototype.addStart=function(){this.encoding.addPattern(this.START)},ad.prototype.is=function(t,e){var o=kd(t,e,4);return(e+4<=t.length||2===t.length)&&qu.test(o)},ad.prototype.move=function(){this.encoding.addPattern(this.MOVE)},ad.prototype.pushState=function(t){for(var e;(e=kd(t.value,t.index,2))&&qu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},ad.prototype.getValue=function(t){return t},ad),$u.FNC4=((Du=Qu)&&(sd.__proto__=Du),((sd.prototype=Object.create(Du&&Du.prototype)).constructor=sd).prototype.initProperties=function(){Du.prototype.initProperties.call(this),Zu(this,{key:"FNC4",dependentStates:["A","B"]})},sd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},sd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},sd.prototype.isCode=function(t){return 128<=t&&t<256},sd.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},sd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},sd.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},sd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)nt(t[e],this.dependentStates)&&this.subStates.push(t[e])},sd.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]},sd.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},sd),$u.FNC1=((ju=Qu)&&(nd.__proto__=ju),((nd.prototype=Object.create(ju&&ju.prototype)).constructor=nd).prototype.initProperties=function(){ju.prototype.initProperties.call(this),Zu(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})},nd.prototype.addStart=function(){this.encoding[this.startState].addStart()},nd.prototype.is=function(){return nt(this.key,this.states)},nd.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},nd.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!qu.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Yu.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},nd.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=kd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},nd.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},nd.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,e),t=t.substring(e+1,o),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},nd.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&&nt(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}},nd);(gd=ps)&&(Sd.__proto__=gd),((Sd.prototype=Object.create(gd&&gd.prototype)).constructor=Sd).prototype.initProperties=function(){gd.prototype.initProperties.call(this),Zu(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})},Sd.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new $u[this.states[t]](this,this.states)},Sd.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},Sd.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())},Sd.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))}},Sd.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Sd.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Sd.prototype.addStop=function(){this.addPattern(this.STOP)},Sd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Sd.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++},Sd.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))};var ld,cd,ud,dd,fd,gd,Ku=Sd,Qu=((fd=Ku)&&(Cd.__proto__=fd),((Cd.prototype=Object.create(fd&&fd.prototype)).constructor=Cd).prototype.initProperties=function(){fd.prototype.initProperties.call(this),Zu(this,{name:"Code 128 A",states:["A"]})},Cd),yd=((dd=Ku)&&(wd.__proto__=dd),((wd.prototype=Object.create(dd&&dd.prototype)).constructor=wd).prototype.initProperties=function(){dd.prototype.initProperties.call(this),Zu(this,{name:"Code 128 B",states:["B"]})},wd),vd=((ud=Ku)&&(bd.__proto__=ud),((bd.prototype=Object.create(ud&&ud.prototype)).constructor=bd).prototype.initProperties=function(){ud.prototype.initProperties.call(this),Zu(this,{name:"Code 128 C",states:["C"]})},bd),md=((cd=Ku)&&(_d.__proto__=cd),((_d.prototype=Object.create(cd&&cd.prototype)).constructor=_d).prototype.initProperties=function(){cd.prototype.initProperties.call(this),Zu(this,{name:"Code 128",states:["C","B","A","FNC4"]})},_d),Ku=((ld=Ku)&&(xd.__proto__=ld),((xd.prototype=Object.create(ld&&ld.prototype)).constructor=xd).prototype.initProperties=function(){ld.prototype.initProperties.call(this),Zu(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},xd);function xd(){ld.apply(this,arguments)}function _d(){cd.apply(this,arguments)}function bd(){ud.apply(this,arguments)}function wd(){dd.apply(this,arguments)}function Cd(){fd.apply(this,arguments)}function Sd(t){gd.call(this,t),this._initStates()}function kd(t,e,o){return t.substring(e,e+o)}var Ad,Pd,Td,Md,Od,Bd,Rd,Ed=Object.assign,Ld=((Rd=ps)&&(Zd.__proto__=Rd),((Zd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Zd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Ed(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:jd})},Zd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Zd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Zd.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()},Zd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Zd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Zd.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]])},Zd),Id=((Bd=Ld)&&(Yd.__proto__=Bd),((Yd.prototype=Object.create(Bd&&Bd.prototype)).constructor=Yd).prototype.initProperties=function(){Bd.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Yd),zd=((Od=Ld)&&(qd.__proto__=Od),((qd.prototype=Object.create(Od&&Od.prototype)).constructor=qd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},qd),Vd=((Md=Ld)&&(Xd.__proto__=Md),((Xd.prototype=Object.create(Md&&Md.prototype)).constructor=Xd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Xd),Ld=((Td=Ld)&&(Wd.__proto__=Td),((Wd.prototype=Object.create(Td&&Td.prototype)).constructor=Wd).prototype.initProperties=function(){Td.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Wd),jd={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))}},Dd=Object.assign,ps=((Pd=ps)&&(Gd.__proto__=Pd),((Gd.prototype=Object.create(Pd&&Pd.prototype)).constructor=Gd).prototype.initProperties=function(){Pd.prototype.initProperties.call(this),Dd(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]}})},Gd.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},Gd.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)},Gd.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)},Gd.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])},Gd.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},Gd),Hd=Object.assign,Ud=((Ad=ps)&&(Nd.__proto__=Ad),((Nd.prototype=Object.create(Ad&&Ad.prototype)).constructor=Nd).prototype.initProperties=function(){Ad.prototype.initProperties.call(this),Hd(this,{name:"EAN 8"})},Nd.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)},Nd),Fd={code11:Go,code39:Dr,code39extended:fl,code93:Er,code93extended:o,code128:md,code128a:Qu,code128b:yd,code128c:vd};function Nd(){Ad.apply(this,arguments)}function Gd(){Pd.apply(this,arguments)}function Wd(){Td.apply(this,arguments)}function Xd(){Md.apply(this,arguments)}function qd(){Od.apply(this,arguments)}function Yd(){Bd.apply(this,arguments)}function Zd(){Rd.apply(this,arguments)}function Qd(t,e){var o=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=o,e}Fd["gs1-128"]=Ku,Fd.msimod10=Id,Fd.msimod11=zd,Fd.msimod1010=Vd,Fd.msimod1110=Ld,Fd.postnet=Pr,Fd.ean8=Ud,Fd.ean13=ps;(Kd=b.Class)&&($d.__proto__=Kd),(($d.prototype=Object.create(Kd&&Kd.prototype)).constructor=$d).prototype.destroy=function(){this._destroySurface()},$d.prototype._initElement=function(){R(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 b.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._initSurface(),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=q(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new C(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),p=new b.drawing.Group;this.contentBox=s,p.append(this._getBackground(n)),i.visible&&(h-=b.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,s.width(),h)}catch(t){return this.onError(t),p}return i.visible&&(n=o,e.checksum&&w(a.checksum)&&(n+=" "+a.checksum),p.append(this._getText(n))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),p.append(this._bandsGroup),p},$d.prototype.exportVisual=function(){return this._render()},$d.prototype._getSize=function(){var t=Qd(this.element,this.options.renderAs),e=new b.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},$d.prototype.value=function(t){if(!w(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 b.drawing.Group,n=0;n<t.length;n++){var s,a=(s=N(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=b.geometry.Rect.fromPoints(new b.geometry.Point(i,s.y1+o.y1),new b.geometry.Point(i+a,s.y2+o.y1)),s=b.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 C(0,0,t.width,t.height).unpad(o.width/2);return b.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,t=this._textbox=new Te(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.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),!Fd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Fd[this.type],this.options=m({},this.options,t)};var Kd,Go=$d;function $d(t,e,o){void 0===o&&(o=Dt),Kd.call(this),this.options=m({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&w(e.value)&&this.redraw()}i(Go,{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"),!Fd[o])throw new Error("Encoding '"+t+"' is not supported.");var r,n,s,t=new Fd[o];return r=t,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=Go,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)}(df=b.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}};var af,hf,pf,lf,cf,uf,df,ff=Sf,gf=((uf=b.Class)&&(Cf.__proto__=uf),(Cf.prototype=Object.create(uf&&uf.prototype)).constructor=Cf),yf=((cf=b.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),Dr=((lf=b.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),fl=((pf=Dr)&&(_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),Er=((hf=Dr)&&(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),o=((af=Dr)&&(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 fl,vf.alphanumeric=new Er,vf.byte=new o;(kf=b.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};var kf,Af=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,e){return t%2==0},function(t,e){return e%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),s=s?s[0]:"",a=Uf.exec(t),a=a?a[0]:"",h=Ff.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Ff.test(t.charAt(s.length)))?(n=Tf,s):h&&(t.length===h.length||h.length>=i||r===Mf)?(n=Mf,s||a):(n=Of,h?h+Nf.exec(t.substring(h.length))[0]:Nf.exec(t)[0]);return{mode:n,modeString:e}}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),e=e.length-1,r=t<<e,t=nf(t,o-e),o=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}(r,i);return t+nf(o,e)}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(l,c,t){var t=(new(t&&0<=t.toLowerCase().indexOf("utf_8")?Af:yf)).getEncodingResult(l,c),r=t.version,u=Pf[r-1][c],l=function(l,t){for(var e,o=0,i=[],r=[],n=t.groups,s=0;s<n.length;s++)for(var c=n[s][0],a=0;a<c;a++){for(var h=n[s][1],u=[],d=[],p=1;p<=h;p++)e=l.substring(o,o+8),u.push(e),d[h-p]=sf(e),o+=8;i.push(u),r.push(tg(d,t.errorCodewordsPerBlock))}return[i,r]}(function(t){for(var e=8*u.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}(t.dataString),u),t=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}(),d=(i=(e=t)[0].length,ag(e,Lf,0,0),hg(e,[-1,-1],7,7),ag(e,Lf,i-7,0),hg(e,[1,-1],i-8,7),ag(e,Lf,0,i-7),hg(e,[-1,1],7,i-8),t),e=r;if(!(e<2)){var o,f=d[0],g=f.length,i=Math.floor(e/7),n=[6],y=0;for((e=Ef[e])?o=(g-13-e)/i:e=o=(g-13)/(i+1),n.push(n[y++]+e);n[y]+o<g;)n.push(n[y++]+o);for(var s=0;s<n.length;s++)for(var a=0;a<n.length;a++)void 0===f[n[s]][n[a]]&&ag(d,If,n[s]-2,n[a]-2)}for(var v=t,m=1,x=v[0].length,_=8;_<x-8;_++)$f(v,m,6,_),$f(v,m,_,6),m^=1;7<=r&&sg(t,nf(0,18)),ng(t,nf(0,15));for(var h,b,p,w=t,C=l,S=new ff(w[0]),k=0;k<C.length;k++)for(h=C[k],b=0;0<h.length;){for(var A=0;A<h.length;A++)for(var P=0;P<8;P++)p=S.getNextCell(),Jf(w,h[A][b].charAt(P),p.row,p.column);for(b++;h[0]&&b===h[0].length;)h.splice(0,1)}for(;p=S.getNextRemainderCell();)Jf(w,0,p.row,p.column);i=function(l){for(var t,e=[],o=[],c=[],u=[],d=[],i=l[0].length,r=0;r<l.length;r++)e[r]=0,c[r]=0,d[r]=[0,0],u[r]=[0,0],o[r]=[];for(var n=0;n<i;n++)for(var s=0;s<i;s++)for(var a=0;a<l.length;a++)t=l[a],c[a]+=parseInt(t[n][s],10),o[a][0]===t[n][s]&&n+1<i&&0<=s-1&&t[n+1][s]===o[a][0]&&t[n+1][s-1]===o[a][0]&&(e[a]+=3),pg(a,u,e,0,t[n][s]),pg(a,u,e,1,t[s][n]),lg(a,e,o,t[n][s],d,0),lg(a,e,o,t[s][n],d,1);var f,h,p,g,y=i*i,v=Number.MAX_VALUE;for(r=0;r<e.length;r++)e[r]+=(h=c[r],p=y,g=void 0,p=(h=Math.floor(h/p*100))%5,g=Math.abs(h-p-50),h=Math.abs(h+5-p-50),10*Math.min(g/5,h/5)),e[r]<v&&(v=e[r],f=r);return f}(t),e=t[i];return 7<=r&&sg([e],ig(r,"1111100100101",18)),ng([e],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[c]+nf(i,3))),e}for(var ug,dg=1;dg<255;dg++)255<(ug=2*Rf[dg-1])&&(ug^=285),Rf[dg]=ug,Bf[ug]=dg;ug=2*Rf[dg-1]^285,Rf[dg]=ug,Rf[-1]=0;for(var fg=2;fg<=68;fg++){var gg=Qf[fg-1];Qf[fg]=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}(gg,[fg,0])}var yg,vg=Math.round,mg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],xg=[[0,1],[1,1],[1,0]],md=((yg=b.Class)&&(_g.__proto__=yg),((_g.prototype=Object.create(yg&&yg.prototype)).constructor=_g).prototype.destroy=function(){this._destroySurface()},_g.prototype._initElement=function(){R(this.element,"k-qrcode")},_g.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},_g.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},_g.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},_g.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},_g.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},_g.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},_g.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,o={width:0,height:0};return 0<e&&(o.width=e),t&&(o.height=t),o},_g.prototype._resize=function(){this.redraw()},_g.prototype.createVisual=function(){this.visual=this._render()},_g.prototype.exportVisual=function(){return this._render()},_g.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,p=(s.width=h,new b.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},_g.prototype._renderLogo=function(t,e){var t=vg(t/2),e=this._getLogoSize(7*e),o=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new b.geometry.Rect(new b.geometry.Point(t.x,t.y),new b.geometry.Size(e.width,e.height));return new b.drawing.Image(o,t)},_g.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,t=t/2,n={},s=new b.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),xg,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,xg,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,mg,"#fff")),s},_g.prototype._renderShape=function(t,e,o,i){var r=new b.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},_g.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Qd(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},_g.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},_g.prototype._renderMatrix=function(t,e,o){for(var i=new b.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 a=vg(o+a*e),h=vg(n),p=vg(o+s*e),l=vg(n+e);i.moveTo(a,h).lineTo(a,l).lineTo(p,l).lineTo(p,h).close()}}return i},_g.prototype._renderBackground=function(t,e){t=new C(0,0,t,t).unpad(e.width/2);return b.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},_g.prototype.setOptions=function(t){this.options=of(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},_g.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},_g.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},_g.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},_g.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}},_g);function _g(t,e,o){void 0===o&&(o=Dt),yg.call(this),this.options=m({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}i(md,{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 bg(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 wg=md,Cg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Sg(t){return t*t}var kg,Ag,Pg=Math,Tg=Pg.abs,Mg=Pg.atan,Og=Pg.atan2,Bg=Pg.cos,Rg=Pg.sin,Eg=Pg.tan,Lg=((Ag=b.Class)&&(Yg.__proto__=Ag),((Yg.prototype=Object.create(Ag&&Ag.prototype)).constructor=Yg).prototype.initProperties=function(){m(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Yg.prototype.toArray=function(){return[this.lat,this.lng]},Yg.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Yg.prototype.clone=function(){return new Yg(this.lat,this.lng)},Yg.prototype.round=function(t){return this.lng=k(this.lng,t),this.lat=k(this.lat,t),this},Yg.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Yg.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Yg.prototype.destination=function(t,e,o){var e=St(e),o=o||Cg.WGS84,i=St(this.lat),r=St(this.lng),t=t/o.a,o=Pg.asin(Rg(i)*Bg(t)+Bg(i)*Rg(t)*Bg(e)),r=r+Og(Rg(e)*Rg(t)*Bg(i),Bg(t)-Rg(i)*Rg(o));return new Yg(gt(o),gt(r))},Yg.prototype.greatCircleTo=function(l,t){var e=Yg.create(void 0),t=t||Cg.WGS84;if(!e||this.clone().round(8).equals(e.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,c,i=t.a,u=t.b,r=t.f,d=St(e.lng-this.lng),t=Mg((1-r)*Eg(St(this.lat))),n=Rg(t),s=Bg(t),t=Mg((1-r)*Eg(St(e.lat))),a=Rg(t),h=Bg(t),f=d,g=this.DISTANCE_ITERATIONS,y=!1;!y&&0<g--;)var v=Rg(f),m=Bg(f),x=Pg.sqrt(Sg(h*v)+Sg(s*a-n*h*m)),_=Og(x,c=n*a+s*h*m),b=s*h*v/x,p=0,w=(0!=(o=1-Sg(b))&&(p=c-2*n*a/o),f),C=r/16*o*(4+r*(4-3*o)),f=d+(1-C)*r*b*(_+C*x*(p+C*c*(2*Sg(p)-1))),y=Tg(f-w)<=this.DISTANCE_CONVERGENCE;var e=o*(Sg(i)-Sg(u))/Sg(u),t=1+e/16384*(4096+e*(e*(320-175*e)-768)),i=e/1024*(256+e*(e*(74-47*e)-128)),e=i*x*(p+i/4*(c*(2*Sg(p)-1)-i/6*p*(4*Sg(x)-3)*(4*Sg(p)-3))),i=Og(h*v,s*a-n*h*m),S=Og(s*v,-n*h+s*a*m);return{distance:k(u*t*(_-e),this.DISTANCE_PRECISION),azimuthFrom:gt(i),azimuthTo:gt(S)}},Yg.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Yg.fromLngLat=function(t){return new Yg(t[1],t[0])},Yg.fromLatLng=function(t){return new Yg(t[0],t[1])},Yg.create=function(t,e){if(w(t))return t instanceof Yg?t.clone():1===arguments.length&&2===t.length?Yg.fromLatLng(t):new Yg(t,e)},Yg),Ig=Math,zg=Ig.atan,Vg=Ig.exp,jg=Ig.pow,Dg=Ig.sin,Hg=Ig.log,Ug=Ig.tan,Fg=b.geometry.Point,Ng=Ig.PI,Gg=Ng/2,Wg=Ng/4,Xg=Ng/180,Qu=Cg.WGS84,yd=((kg=b.Class)&&(qg.__proto__=kg),((qg.prototype=Object.create(kg&&kg.prototype)).constructor=qg).prototype._initOptions=function(t){this.options=m({},this.options,t)},qg.prototype.initProperties=function(){m(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},qg.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,r=wt(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?wt(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=St(e-o)*i,e=this._projectLat(r);return new Fg(t,e)},qg.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=St(t),i=Ug(Wg+t/2),t=o*Dg(t),t=jg((1-t)/(1+t),o/2);return e*Hg(i*t)},qg.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(Xg*i)+o,o=wt(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=wt(i,-this.MAX_LNG,this.MAX_LNG)),new Lg(o,i)},qg.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Vg(-t/o),s=Gg-2*zg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=i*Dg(s),h=jg((1-h)/(1+h),r),h=Gg-2*zg(n*h)-s;if(s+=h,Ig.abs(h)<=this.INVERSE_CONVERGENCE)break}return gt(s)},qg);function qg(t){kg.call(this),this.initProperties(),this._initOptions(t)}function Yg(t,e){Ag.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}i(yd,{centralMeridian:0,datum:Qu});function Zg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Qg(t,e){e.insertBefore(t,e.firstChild)}function Kg(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function $g(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(ey=yd)&&(py.__proto__=ey),((py.prototype=Object.create(ey&&ey.prototype)).constructor=py).prototype.initProperties=function(){ey.prototype.initProperties.call(this),m(this,{MAX_LAT:85.0511287798})},py.prototype._projectLat=function(t){var e=this.options.datum.a,t=St(t),t=Ug(Wg+t/2);return e*Hg(t)},py.prototype._inverseY=function(t){var e=this.options.datum.a,t=Vg(-t/e);return gt(Gg-2*zg(t))};var Jg,ty,ey,oy=py,iy=((ty=b.Class)&&(hy.__proto__=ty),((hy.prototype=Object.create(ty&&ty.prototype)).constructor=hy).prototype.forward=function(t){return new Fg(t.lng,t.lat)},hy.prototype.inverse=function(t){return new Lg(t.y,t.x)},(Jg=b.Class)&&(ay.__proto__=Jg),((ay.prototype=Object.create(Jg&&Jg.prototype)).constructor=ay).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},ay.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},ay),ry=(b.Class,b.Class,Object.defineProperty),ny=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),sy=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=ly(o,a,!1),i.browser=ly(t,h,"default"),i.name=ly(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 ay(){Jg.call(this);var t=this._proj=new oy,t=this.c=2*Ng*t.options.datum.a;this._tm=b.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=b.geometry.transform().scale(t,-t).translate(-.5,-.5)}function hy(){ty.apply(this,arguments)}function py(){ey.apply(this,arguments)}function ly(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 cy(t,e){return t.bind(e)}function uy(t,e,o,i,r){Sy(t,e,o,i,r)}function dy(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(B(t=e)?t:(t||"").split(" ")).forEach(function(t){ky(n,t,s,a)})}function fy(t){var e=wy(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function gy(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 yy(){return Number(new Date)}function vy(){}function my(){this._defaultPrevented=!0}function xy(){return!0===this._defaultPrevented}var _y,by,wy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=Cy();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},Cy=function(){var t=sy(navigator.userAgent),e=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),o=e.chrome,i=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!o&&!i&&!r&&!e&&window.PointerEvent,n.msPointers=!o&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,h=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,o="string"==typeof s.style[t+"Transition"];if(o||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),h={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},o&&((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},Sy=function(s,t,a,h,p){(B(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=h,(e=a)&&H(e)&&!i?n=e:e&&"string"==typeof e&&H(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,ry(t,"currentTarget",{value:e}),ry(t,"delegateTarget",{value:o}),n(t))},Boolean(p))})},ky=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},vd=((by=b.Class)&&(My.__proto__=by),((My.prototype=Object.create(by&&by.prototype)).constructor=My).prototype.destroy=function(){this.unbind()},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=my,n.isDefaultPrevented=xy,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.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events&&this._events[i]&&delete this._events[i])}this.bind(this.events,t)},My),Ay=Q.compile,Py=((_y=vd)&&(Ty.__proto__=_y),((Ty.prototype=Object.create(_y&&_y.prototype)).constructor=Ty).prototype._initOptions=function(t){this.options=m({},this.options,t)},Ty.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Ty.prototype.add=function(t){var e=t;w(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Ty.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()},Ty.prototype.clear=function(){this.items=[],Zg(this.element)},Ty.prototype._render=function(){for(var t=[],e=Ay(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}))}if(0<t.length){Zg(this.element);var r=t.join(this.options.separator),n=this.element,s=document.createElement("div");for(s.innerHTML=r;0<s.childNodes.length;)n.appendChild(s.childNodes[0]);this.showElement()}else this.hideElement()},Ty.prototype.hideElement=function(){this.element.style.display="none"},Ty.prototype.showElement=function(){this.element.style.display=""},Ty.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},Ty.prototype._inZoomLevel=function(t,e){t=At(t,-Number.MAX_VALUE),e=At(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Ty.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Ty);function Ty(t,e){_y.call(this),this.element=t,this._initOptions(e),this.items=[],R(this.element,"k-widget k-attribution")}function My(){by.call(this),this._events={}}i(Py,{name:"Attribution",separator:"&nbsp;|&nbsp;",itemTemplate:"#= text #"});var Oy={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 By(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Oy[t].className+'" aria-label="move '+t+'"><span class="k-icon '+Oy[t].iconClass+'" /></button>';return ny(t)}(Ry=vd)&&(Ly.__proto__=Ry),((Ly.prototype=Object.create(Ry&&Ry.prototype)).constructor=Ly).prototype.destroy=function(){this.dispose()},Ly.prototype.dispose=function(){dy(this._keyroot,"keydown",this._keydownHandler)},Ly.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o=t.getAttribute("tabindex")||e.getAttribute("tabindex");e.removeAttribute("tabindex"),t.setAttribute("tabindex",isNaN(o)?0:o)},Ly.prototype._initOptions=function(t){this.options=m({},this.options,t)},Ly.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Ly.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()},Ly.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()}};var Ry,Ey=Ly;function Ly(t,e){Ry.call(this),this.element=t,this._initOptions(e);var t=By("up"),e=By("right"),o=By("down"),i=By("left"),t=(this.element.appendChild(t),this.element.appendChild(e),this.element.appendChild(o),this.element.appendChild(i),R(this.element,"k-widget k-navigator"),uy(this.element,"click",".k-button",cy(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=cy(this._keydown,this),uy(this._keyroot,"keydown",this._keydownHandler)}function Iy(t,e){return ny('<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>')}i(Ey,{name:"Navigator",panStep:1}),gy(Ey,["pan"]);(zy=vd)&&(jy.__proto__=zy),((jy.prototype=Object.create(zy&&zy.prototype)).constructor=jy).prototype.destroy=function(){this.element&&dy(this.element,"click",this._clickHandler),this._keyroot&&dy(this._keyroot,"keydown",this._keydownHandler)},jy.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o=t.getAttribute("tabindex")||e.getAttribute("tabindex");e.removeAttribute("tabindex"),t.setAttribute("tabindex",isNaN(o)?0:o)},jy.prototype._initOptions=function(t){this.options=m({},this.options,t)},jy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},jy.prototype._click=function(t){var e=1;ot(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},jy.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)}};var zy,Vy=jy;function jy(t,e){zy.call(this),this.element=t,this._initOptions(e);t=Iy("in","k-i-plus"),e=Iy("out","k-i-minus"),this.element.appendChild(t),this.element.appendChild(e),R(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),uy(this.element,"click",".k-button",this._clickHandler),t=this.element.parentNode.closest("[data-role]");this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),uy(this._keyroot,"keydown",this._keydownHandler)}i(Vy,{name:"ZoomControl",zoomStep:1}),gy(Vy,["change"]);var Dy,Hy,Ku=Math,Uy=Ku.max,Fy=Ku.min,Ny=((Hy=b.Class)&&(Yy.__proto__=Hy),Id={World:{configurable:!0}},((Yy.prototype=Object.create(Hy&&Hy.prototype)).constructor=Yy).prototype.contains=function(t){var e=this.nw,o=this.se,i=At(t.lng,t[1]),r=At(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},Yy.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new Lg(e,o)},Yy.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},Yy.prototype.include=function(t){var e=this.nw,o=this.se,i=At(t.lng,t[1]),t=At(t.lat,t[0]);e.lng=Fy(e.lng,i),e.lat=Uy(e.lat,t),o.lng=Uy(o.lng,i),o.lat=Fy(o.lat,t)},Yy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Yy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Lg(t.lat,e.lng),se:this.se,sw:new Lg(e.lat,t.lng)}},Yy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Lg(t.lat,e.lng),e,new Lg(e.lat,t.lng)]},Yy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Yy.create=function(t,e){return t instanceof Yy?t:t&&e?new Yy(t,e):t&&4===t.length&&!e?new Yy([t[0],t[1]],[t[2],t[3]]):void 0},Id.World.get=function(){return new Yy([90,-180],[-90,180])},Object.defineProperties(Yy,Id),Yy),zd=((Dy=b.Class)&&(qy.__proto__=Dy),((qy.prototype=Object.create(Dy&&Dy.prototype)).constructor=qy).prototype.destroy=function(){this._deactivate()},qy.prototype._initOptions=function(t){this.options=m({},this.options,t)},qy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},qy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},qy.prototype.reset=function(){this._beforeReset(),this._reset()},qy.prototype._reset=function(){this._applyExtent()},qy.prototype._beforeReset=function(){},qy.prototype._resize=function(){},qy.prototype._panEnd=function(){this._applyExtent()},qy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!w(t.minZoom)||e>=t.minZoom,e=!w(t.maxZoom)||e<=t.maxZoom,t=Ny.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},qy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},qy.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)},qy.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)},qy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},qy.prototype._readData=function(){return this.options.data||[]},qy.prototype._hasData=function(){return this._data&&0<this._data.length},qy),Gy=Math,Wy=Q.compile,Xy=b.geometry.Point;function qy(t,e){Dy.call(this),this.support=Cy(),this._initOptions(e),this.map=t;e=document.createElement("div");R(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 Yy(t,e){Hy.call(this);t=Lg.create(t),e=Lg.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)}function Zy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(Qy=zd)&&(Ky.__proto__=Qy),((Ky.prototype=Object.create(Qy&&Qy.prototype)).constructor=Ky).prototype.destroy=function(){Qy.prototype.destroy.call(this),this._view.destroy(),this._view=null},Ky.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Ky.prototype._reset=function(){Qy.prototype._reset.call(this),this._updateView(),this._view.reset()},Ky.prototype._viewType=function(){return tv},Ky.prototype._activate=function(){Qy.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=Object(b.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Ky.prototype._deactivate=function(){Qy.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Ky.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())},Ky.prototype._resize=function(){this._render()},Ky.prototype._panEnd=function(t){Qy.prototype._panEnd.call(this,t),this._render()},Ky.prototype._render=function(){this._updateView(),this._view.render()};var Qy,Vd=Ky;function Ky(t,e){Qy.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}i(Vd,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(Jy=b.Class)&&(iv.__proto__=Jy),((iv.prototype=Object.create(Jy&&Jy.prototype)).constructor=iv).prototype._initOptions=function(t){this.options=m({},this.options,t)},iv.prototype.center=function(t){this._center=t},iv.prototype.extent=function(t){this._extent=t},iv.prototype.viewOrigin=function(t){this._viewOrigin=t},iv.prototype.zoom=function(t){this._zoom=t},iv.prototype.pointToTileIndex=function(t){return new Xy(Gy.floor(t.x/this.options.tileSize),Gy.floor(t.y/this.options.tileSize))},iv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,e=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Gy.ceil((Gy.abs(e.x)+t.width)/this.options.tileSize),y:Gy.ceil((Gy.abs(e.y)+t.height)/this.options.tileSize)}},iv.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}},iv.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Xy(e*this.options.tileSize,t*this.options.tileSize)},iv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},iv.prototype.destroy=function(){Zg(this.element),this.pool.empty()},iv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},iv.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()},iv.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},iv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin;return{index:e,currentIndex:t,point:o,offset:(e=o.clone().translate(-i.x,-i.y),new Xy(k(e.x),k(e.y))),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},iv.prototype.wrapIndex=function(t){var e=Gy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:wt(t.y,0,e-1)}},iv.prototype.wrapValue=function(t,e){var o=Gy.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var $y,Jy,tv=iv,ev=(($y=b.Class)&&(ov.__proto__=$y),((ov.prototype=Object.create($y&&$y.prototype)).constructor=ov).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},ov.prototype._initOptions=function(t){this.options=m({},this.options,t)},ov.prototype.createElement=function(){var t=document.createElement("img");R(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},ov.prototype.show=function(){var t=this.element,e=(t.style.top=Zy(this.options.offset.y),t.style.left=Zy(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},ov.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},ov.prototype.url=function(){return Wy(this.options.urlTemplate)(this.urlOptions())},ov.prototype.errorUrl=function(){return Wy(this.options.errorUrlTemplate)(this.urlOptions())},ov.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}},ov);function ov(t,e){$y.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function iv(t,e){Jy.call(this),this.element=t,this._initOptions(e),this.pool=new nv}i(ev,{urlTemplate:"",errorUrlTemplate:""});(rv=b.Class)&&(sv.__proto__=rv),((sv.prototype=Object.create(rv&&rv.prototype)).constructor=sv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},sv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},sv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},sv.prototype._create=function(t){for(var e,o=this._items,i=_t(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 ev(i,t),this._items.push(e)),e},sv.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))};var rv,nv=sv;function sv(){rv.call(this),this._items=[]}i(nv,{maxSize:100});function av(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var hv,pv,lv,cv,uv,dv,fv,gv=Object.assign,yv="change",vv=((fv=vd)&&(Ov.__proto__=fv),((Ov.prototype=Object.create(fv&&fv.prototype)).constructor=Ov).prototype.captureNext=function(){this.capture=!0},Ov.prototype.cancelCapture=function(){this.capture=!1},Ov.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Ov.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Ov),mv=((dv=vd)&&(Mv.__proto__=dv),((Mv.prototype=Object.create(dv&&dv.prototype)).constructor=Mv).prototype.makeVirtual=function(){gv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Mv.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Mv.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Mv.prototype.forceEnabled=function(){this.forcedEnabled=!0},Mv.prototype.getSize=function(){return this.container[this.measure]},Mv.prototype.getTotal=function(){return this.element[this.scrollSize]},Mv.prototype.rescale=function(t){this.scale=t},Mv.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(yv,this))},Mv),xv=((uv=vd)&&(Tv.__proto__=uv),((Tv.prototype=Object.create(uv&&uv.prototype)).constructor=Tv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},Tv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},Tv.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(yv)},Tv),_v=((cv=vd)&&(Pv.__proto__=cv),((Pv.prototype=Object.create(cv&&cv.prototype)).constructor=Pv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Pv.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(yv,this))},Pv),bv=((lv=b.Class)&&(Av.__proto__=lv),(Av.prototype=Object.create(lv&&lv.prototype)).constructor=Av),wv=((pv=vd)&&(kv.__proto__=pv),((kv.prototype=Object.create(pv&&pv.prototype)).constructor=kv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},kv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},kv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},kv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},kv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},kv.prototype.moveTo=function(t){gv(this,t),this.refresh()},kv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=av(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(yv))},kv.prototype._saveCoordinates=function(t){this.coordinates=t},kv),Cv=b.drawing.Group,Ld=((hv=zd)&&(Sv.__proto__=hv),((Sv.prototype=Object.create(hv&&hv.prototype)).constructor=Sv).prototype.destroy=function(){hv.prototype.destroy.call(this),this.surface.destroy()},Sv.prototype._reset=function(){hv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},Sv.prototype._initRoot=function(){this._root=new Cv,this.surface.draw(this._root)},Sv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},Sv.prototype._resize=function(){this.surface.size(this.map.size())},Sv.prototype._readData=function(){var t=hv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},Sv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Ev(this.map,this.options.style,this));for(var e=new Cv,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},Sv.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof b.drawing.Circle&&this.map.options.renderPointsAsMarkers?w(this._createMarker(t)):e)?e:this.map.trigger("shapeCreated",{layer:this,shape:t})},Sv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},Sv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},Sv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},Sv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},Sv.prototype._panEnd=function(t){hv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},Sv.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}))},Sv.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))}},Sv.prototype._activate=function(){hv.prototype._activate.call(this),this._panHandler=cy(this._pan,this),this.map.bind("pan",this.panHandler)},Sv.prototype._deactivate=function(){hv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},Sv);function Sv(t,e){hv.call(this,t,e),this._pan=cy(this._pan,this),this.surface=b.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new wv(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 kv(t){pv.call(this),this.support=Cy(),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=av(this.x,this.y,this.scale);this.element.style[this.transformStyle]=t,this._saveCoordinates(t)}function Av(t){lv.call(this);var s,a,h,p=this;gv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new _v({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new _v({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=yt(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,e=t.distance/e.distance,r=p.dimensions.minScale,n=p.dimensions.maxScale,r=(h.scale<=r&&e<1&&(e+=.8*(1-e)),h.scale*e>=n&&(e=n/h.scale),h.x+p.offset.left),n=h.y+p.offset.top,r={x:(r-o.x)*e+i.x-r,y:(n-o.y)*e+i.y-n};h.scaleWith(e),s.dragMove(r.x),a.dragMove(r.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 Pv(t){cv.call(this),gv(this,t)}function Tv(t){uv.call(this),this.x=new mv(gv({horizontal:!0},t)),this.y=new mv(gv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(yv,t)}function Mv(t){dv.call(this),this.forcedEnabled=!1,gv(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 Ov(t,e){fv.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,wy(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,cy(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,cy(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,cy(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,cy(o._release,o))})),o.bind(["press","release"],e||{})}i(Ld,{autoBind:!0,zIndex:100});(Rv=b.Class)&&(Iv.__proto__=Rv),((Iv.prototype=Object.create(Rv&&Rv.prototype)).constructor=Iv).prototype.parse=function(t){var e=new Cv,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},Iv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Iv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Iv.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)}},Iv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(bt(e).anchor()))&&(t.options.fill=null)},Iv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Iv.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,this._loadShape(t,e)},Iv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?b.drawing.MultiPath:b.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(Lg.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Iv.prototype._loadPoint=function(t,e,o){var e=Lg.fromLngLat(e),i=this.locator.locationToView(e),i=new b.geometry.Circle(i,10),i=new b.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var Bv,Rv,Ev=Iv,Pr=((Bv=Ld)&&(Lv.__proto__=Bv),((Lv.prototype=Object.create(Bv&&Bv.prototype)).constructor=Lv).prototype._readData=function(){return this.options.data||[]},Lv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=tt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var l=this._scaleType(),c=tt(this.options.locationField),r=0;r<i.length;r++){var n,u,s,a=i[r],h=c(a),p=o(a);w(h)&&w(p)&&(n=n||new l([0,p],[e.minSize,e.maxSize]),h=Lg.create(h),s=this.map.locationToView(h),u=n.map(p),(s=this._createSymbol({center:s,size:u,style:e.style,dataItem:a,location:h})).dataItem=a,s.location=h,s.value=p,this._drawSymbol(s))}}},Lv.prototype._scaleType=function(){var t=this.options.scale;return H(t)?t:jv[t]},Lv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=H(e)?e:Dv[e])(t)},Lv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Lv);function Lv(){Bv.apply(this,arguments)}function Iv(t,e,o){Rv.call(this),this.observer=o,this.locator=t,this.style=e}i(Pr,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var zv,Vv,jv={sqrt:((Vv=b.Class)&&(Gv.__proto__=Vv),((Gv.prototype=Object.create(Vv&&Vv.prototype)).constructor=Gv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Gv)},Dv={circle:function(t){var e=new b.geometry.Circle(t.center,t.size/2);return new b.drawing.Circle(e,t.style)},square:function(t){var e=new b.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}},Hv=Object.assign,Uv=".k-marker",Fv=((zv=zd)&&(Nv.__proto__=zv),((Nv.prototype=Object.create(zv&&zv.prototype)).constructor=Nv).prototype.destroy=function(){zv.prototype.destroy.call(this),dy(this.element,"click",this._markerClickHandler),this.clear()},Nv.prototype.add=function(t){if(!B(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Nv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Nv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Nv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Nv.prototype._reset=function(){zv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Nv.prototype.bind=function(t,e){t=Xv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Nv.prototype._addOne=function(t){t=Xv.create(t,this.options);return t.addTo(this),t},Nv.prototype._readData=function(){return this.options.data||[]},Nv.prototype._load=function(t){this._data=t,this.clear();for(var e=tt(this.options.locationField),o=tt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Nv.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,e={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),originalEvent:t};this.map.trigger("markerClick",e)},Nv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Nv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Nv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Hv({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Nv);function Nv(t,e){zv.call(this,t,e),this._markerClickHandler=cy(this._markerClick,this),uy(this.element,"click",Uv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Gv(t,e){Vv.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}i(Fv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});(Wv=b.Class)&&(Yv.__proto__=Wv),((Yv.prototype=Object.create(Wv&&Wv.prototype)).constructor=Yv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Yv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Yv.prototype.location=function(t){return t?(this.options.location=Lg.create(t).toArray(),this.layer&&this.layer.update(this),this):Lg.create(this.options.location)},Yv.prototype.showAt=function(t){this.render(),this.element.style.left=$g(Math.round(t.x)),this.element.style.top=$g(Math.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},Yv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},Yv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=cy(this._mouseEnter,this),uy(this.element,"mouseenter",Uv,this._mouseEnterHandler),this._mouseLeaveHandler=cy(this._mouseLeave,this),uy(this.element,"mouseleave",Uv,this._mouseLeaveHandler))},Yv.prototype.unbindEvents=function(){this.element&&(dy(this.element,"mouseenter",this._mouseEnterHandler),dy(this.element,"mouseleave",this._mouseLeaveHandler))},Yv.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,R(o=document.createElement("span"),"k-marker k-icon k-i-marker-"+Kg(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())},Yv.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t)},Yv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Yv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Yv.prototype.renderTooltip=function(){},Yv.create=function(t,e){return t instanceof Yv?t:new Yv(m({},e,t))};var Wv,Xv=Yv,qv=Object.assign;function Yv(t){Wv.call(this),this.options=t||{}}function Zv(t){window.requestAnimationFrame(t)}function Qv(t){t.preventDefault()}($v=b.Class)&&(um.__proto__=$v),((um.prototype=Object.create($v&&$v.prototype)).constructor=um).prototype.tick=function(){},um.prototype.done=function(){},um.prototype.onEnd=function(){},um.prototype.onCancel=function(){},um.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Zv(this._tickProxy)))},um.prototype.enabled=function(){return!0},um.prototype.cancel=function(){this._started=!1,this.onCancel()},um.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Zv(this._tickProxy))};var Kv,$v,Ud=um,Jv=((Kv=Ud)&&(cm.__proto__=Kv),((cm.prototype=Object.create(Kv&&Kv.prototype)).constructor=cm).prototype.done=function(){return this.timePassed()>=this.duration},cm.prototype.timePassed=function(){return Math.min(this.duration,yy()-this.startDate)},cm.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=yy(),this.start()},cm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},cm.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},cm),tm=Object.assign,em=800,om=0,im="move",rm="tap",nm="doubleTap",sm="release",am="gesturechange",hm="gestureend",pm="gesturetap",lm={api:0,touch:0,mouse:9,pointer:9};function cm(t){Kv.call(this),qv(this,t)}function um(){$v.call(this),this._tickProxy=cy(this._tick,this),this._started=!1}function dm(t){var e,o,i,r=Cy(),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}(gm=b.Class)&&(xm.__proto__=gm),((xm.prototype=Object.create(gm&&gm.prototype)).constructor=xm).prototype.move=function(t){var e=t["page"+this.axis],o=yy(),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)},xm.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var fm,gm,ym=xm,vm=((fm=b.Class)&&(mm.__proto__=fm),((mm.prototype=Object.create(fm&&fm.prototype)).constructor=mm).prototype.press=function(){this._holdTimeout=setTimeout(cy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},mm.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(rm,t):e._trigger(nm,t),e.userEvents._clicks=0},300))},mm.prototype._hold=function(){this._trigger("hold",this.pressEvent)},mm.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(Pm.current&&Pm.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger(im,t)}},mm.prototype.end=function(t){this.endTime=yy(),this._finished||(this._finished=!0,this._trigger(sm,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(rm,t)),clearTimeout(this._holdTimeout),this.dispose())},mm.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},mm.prototype.skip=function(){this.dispose()},mm.prototype.cancel=function(){this.dispose()},mm.prototype.isMoved=function(){return this._moved},mm.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=yy(),this._moved=!0,this._trigger("start",t)},mm.prototype._trigger=function(t,e){var e=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,o)&&e.preventDefault()},mm.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},mm);function mm(t,e,o){fm.call(this),tm(this,{x:new ym("X",o.location),y:new ym("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||lm[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 xm(t,e){gm.call(this),this.support=Cy(),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=yy()}function _m(t){for(var e=wy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(Am=vd)&&(Um.__proto__=Am),((Um.prototype=Object.create(Am&&Am.prototype)).constructor=Um).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Um.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,_m(function(t){e.removeEventListener(t,o.preventIfMoving)})),dy(o.surface,fy("move"),this._surfaceMoveHandler),dy(o.surface,fy("up cancel"),this._surfaceEndHandler),dy(i,fy("down"),this._elementStartHandler),o.useClickAsTap&&dy(i,fy("click"),this._elementClickHandler),t.preventDragEvent&&dy(i,fy("dragstart"),this._elementDragStartHandler),dy(i,fy("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Um.prototype.capture=function(){Um.current=this},Um.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Um.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case im:a=am;break;case"end":a=hm;break;case rm:a=pm}tm(e,{touches:s},(t=s[0],s=s[1],o=t.x.location,t=t.y.location,i=s.x.location,s=s.y.location,r=o-i,n=t-s,{center:{x:(o+i)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,tm(e,{type:a}))},Um.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Um.prototype.move=function(t,e){this._apiCall("_move",t,e)},Um.prototype.end=function(t,e){this._apiCall("_end",t,e)},Um.prototype._isMultiTouch=function(){return 1<this.touches.length},Um.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Um.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Um.prototype._isMoved=function(){return et(this.touches,function(t){return t.isMoved()}).length},Um.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Um.prototype._start=function(t){var e,o,i=0,r=this.filter,n=dm(t),s=n.length,a=t.which;if(!(a&&1<a||this._maxTouchesReached()))for(Um.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 vm(this,e,o),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))},Um.prototype._move=function(t){this._eachTouch("move",t)},Um.prototype._end=function(t){this._eachTouch("end",t)},Um.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:yy(),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()},Um.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=dm(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)},Um.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:vy,preventDefault:vy})},Um.defaultThreshold=function(t){om=t},Um.minHold=function(t){em=t};var bm,wm,Cm,Sm,km,Am,Pm=Um,Tm=Object.assign,Mm=Math.abs,Om="change",Bm=((km=Ud)&&(Hm.__proto__=km),((Hm.prototype=Object.create(km&&km.prototype)).constructor=Hm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Hm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Hm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Hm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Hm),Rm=((Sm=Ud)&&(Dm.__proto__=Sm),((Dm.prototype=Object.create(Sm&&Sm.prototype)).constructor=Dm).prototype.onCancel=function(){this.transition.cancel()},Dm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Dm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Dm.prototype.done=function(){return Mm(this.velocity)<1},Dm.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),Sm.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(),Sm.prototype.start.call(this)))},Dm.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)},Dm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Dm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Dm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Jv.easeOutExpo})},Dm),Em=((Cm=Ud)&&(jm.__proto__=Cm),((jm.prototype=Object.create(Cm&&Cm.prototype)).constructor=jm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},jm.prototype.done=function(){return Mm(this.offset.y)<5&&Mm(this.offset.x)<5},jm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},jm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},jm.prototype.setCallback=function(t){t&&H(t)&&(this.callback=t)},jm.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}},jm),Lm=((wm=b.Class)&&(Vm.__proto__=wm),((Vm.prototype=Object.create(wm&&wm.prototype)).constructor=Vm).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,e=o/e.total,i=Math.round(-i[t]*e),r=Math.round(o*e);this.element.style.display=1<=e?"none":"",o<i+r?r=o-i:i<0&&(r+=i,i=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,i)},Vm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Vm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Vm),Im=((bm=vd)&&(zm.__proto__=bm),((zm.prototype=Object.create(bm&&bm.prototype)).constructor=zm).prototype._initOptions=function(t){this.options=m({},this.options,t)},zm.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&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},zm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},zm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},zm.prototype.height=function(){return this.dimensions.y.size},zm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},zm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},zm.prototype._resize=function(){this._native||this.contentResized()},zm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},zm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},zm.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)},zm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},zm.prototype.enable=function(){this.enabled=!0},zm.prototype.disable=function(){this.enabled=!1},zm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Mm(t)),this.scrollElement.scrollTop(Mm(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},zm.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())},zm.prototype.pullHandled=function(){},zm.prototype.destroy=function(){var t=this.element;dy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},zm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},zm.prototype._initPullToRefresh=function(){},zm.prototype._dragEnd=function(){},zm.prototype._paneChange=function(){},zm.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new Lm({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Om,function(){s.refresh()}),n.bind(Om,function(){s.show()}),e[t+"inertia"]=new Rm({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})}})},zm);function zm(t,e){bm.call(this);var n=this,e=(this.element=t,this._initOptions(e),function(t){t=sy(t);return t.ios||t.android}(navigator.userAgent)),e=(n._native=n.options.useNative&&e,ny('<div class="km-scroll-header"/>'));if(n._native)return R(t,"km-native-scroller"),Qg(e,t),void Tm(n,{scrollElement:t,fixedContainer:t.children[0]});t.style.overflow="hidden",R(t,"km-scroll-wrapper");var o=ny('<div class="km-scroll-container"/>'),i=t,r=o;for(i.appendChild(r);i.firstChild!==r;)r.appendChild(i.firstChild);Qg(e,t);var o=t.children[1],e=new vv(t),s=new wv(o),a=new xv({element:o,container:t,forcedEnabled:n.options.zoom}),h=this.options.avoidScrolling,p=new Pm(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:n.options.zoom,supportDoubleTap:n.options.supportDoubleTap,start:function(t){a.refresh();var o,e=Mm(t.x.velocity),i=Mm(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)&&!h(t)&&n.enabled&&(a.x.enabled&&r||a.y.enabled&&e)?p.capture():p.cancel()}}),l=new bv({movable:s,dimensions:a,userEvents:p,elastic:n.options.elastic}),c=new Bm({movable:s,dimensions:a,userEvents:p,tapCapture:e}),u=new Em({moveTo:function(t){n.scrollTo(t.x,t.y)}});s.bind(Om,function(){n.scrollTop=-s.y,n.scrollLeft=-s.x,n.trigger("scroll",{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft})}),n.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),uy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),Tm(n,{movable:s,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:p,pane:l,tapCapture:e,pulled:!1,enabled:!0,scrollElement:o,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)},a.refresh(),n.options.pullToRefresh&&n._initPullToRefresh()}function Vm(t){wm.call(this);var e="x"===t.axis,o=ny('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');Tm(this,t,{element:o,elementSize:0,movable:new wv(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Om,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function jm(t){Cm.call(this,t),Tm(this,t,{origin:{},destination:{},offset:{}})}function Dm(t){Sm.call(this);var e=this;Tm(e,t,{transition:new Jv({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",cy(e.start,e)),e.userEvents.bind("gestureend",cy(e.start,e)),e.userEvents.bind("tap",cy(e.onEnd,e))}function Hm(t){km.call(this,t),Tm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Um(t,e){Am.call(this);var o,i,r,n=Cy(),s=(this.support=n,this.options=e=e||{},o=this.filter=e.filter,this.threshold=e.threshold||om,this.minHold=e.minHold||em,this.touches=[],this._maxTouches=e.multiTouch?2:1,this.allowSelection=e.allowSelection,this.captureUpIfMoved=e.captureUpIfMoved,this.useClickAsTap=!e.fastTap&&!n.delayedClick(),this._clicks=0,this.supportDoubleTap=e.supportDoubleTap,!n.touch||n.mouseAndTouchPresent);tm(this,{element:t,surface:e.global&&s?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=cy(this._move,this),uy(this.surface,fy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=cy(this._end,this),uy(this.surface,fy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=cy(this._start,this),uy(t,fy("down"),o,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=cy(this._click,this),uy(t,fy("click"),o,this._elementClickHandler)),(n.pointers||n.msPointers)&&(n.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=Qv,uy(t,fy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=cy(this._select,this),uy(t,fy("mousedown"),o,this._elementSelectHandler),this.captureUpIfMoved&&n.eventCapture&&(i=this.surface,r=cy(this.preventIfMoving,this),_m(function(t){i.addEventListener(t,r,!0)})),this.bind(["press","hold",rm,nm,"start",im,"end",sm,"cancel","gesturestart",am,hm,pm,"select"],e)}i(Im,{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"}}),gy(Im,["pull","scroll","resize"]);function Fm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}Fm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Nm=Fm,Gm=Math,Wm=Gm.min,Xm=Gm.pow,qm=b.geometry.Point,Ym={bubble:Pr,shape:Ld,tile:Vd};function Zm(t){var e=[];if(t)for(var o=Kg(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Ym.marker=Fv;(Qm=vd)&&(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(),B(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();dy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler),Qm.prototype.destroy.call(this)},Km.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=Cy(),this.context=i,this.initObserver(i),this.initServices(i),this._initOptions(e),this._setEvents(e),this.crs=new iy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),uy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)},Km.prototype._initOptions=function(t){this.options=m({},this.options,t)},Km.prototype._initElement=function(t){R(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Zg(t);t=ny("<div />");this.element.appendChild(t)},Km.prototype.initServices=function(t){this.widgetService=new Nm(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,t=w(t)?(t=Gm.round(wt(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom;return t},Km.prototype.center=function(t){t=t?(this.options.center=Lg.create(t).toArray(),this._reset(),this):Lg.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){void 0===t&&(t={});var e=this.element;this.destroy(),Zg(e),this._init(e,t,{},this.context),this._reset()},Km.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=Lg.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},Km.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=qm.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},Km.prototype.locationToView=function(t){var t=Lg.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},Km.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),t=qm.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},Km.prototype.eventOffset=function(t){var e,o=yt(this.element);return t=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=At(t.pageX,t.clientX)-o.left,At(t.pageY,t.clientY)-o.top),new b.geometry.Point(e,t)},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?o:Wm(e,o),height:Wm(e,t.clientHeight)}},Km.prototype.exportVisual=function(){return this._reset(),!1},Km.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=Lg.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=Ny.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Ny(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=Gm.abs(h.x-a.x),h=Gm.abs(h.y-a.y);if(p<=r&&h<=n)break}this.zoom(s)},Km.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize(),o=(e.x+=o.width,e.y+=o.height,this.layerToLocation(e));return new Ny(t,o)},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){var o,t=t.position||e,e="."+Zm(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(R(o=document.createElement("div"),"k-map-controls "+Zm(t)),this.element.appendChild(e=o)),document.createElement("div"));return e.appendChild(t),t},Km.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Py(e,t)},Km.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Ey(e,t);this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},Km.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,i=this.element.clientWidth,r=this.element.clientHeight,o=wt(o,t.x.min,t.x.max-i),e=wt(e,t.y.min,t.y.max-r);this.scroller.one("scroll",cy(this._scrollEnd,this)),this.scroller.scrollTo(-o,-e)},Km.prototype._navigatorCenter=function(){this.center(this.options.center)},Km.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Vy(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),e.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,t=this.scroller=new Im(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",cy(this._scroll,this)),t.bind("scrollEnd",cy(this._scrollEnd,this)),t.userEvents.bind("gesturestart",cy(this._scaleStart,this)),t.userEvents.bind("gestureend",cy(this._scale,this)),t.userEvents.bind("doubleTap",cy(this._doubleTap,this)),t.userEvents.bind("tap",cy(this._tap,this)),this.scrollElement=t.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],o=m({},"marker"===e?this.options.markerDefaults:o,t),t=new Ym[e](this,o);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 Fv(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 b.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=yy(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},Km.prototype._panComplete=function(){return 50<yy()-(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,e=this._scaleToZoom(e),o=new b.geometry.Point(t.center.x,t.center.y),i=this.viewToLocation(o,e),i=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t})},Km.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Gm.log(t)/Gm.log(2);return Gm.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,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=Xm(2,this.options.minZoom-n),t.dimensions.maxScale=Xm(2,this.options.maxZoom-n),{min:-r.x,max:i-r.x}),n={min:-r.y,max:i-r.y};this.options.wraparound&&(t.max=20*i,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(t.min,t.max),o.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},Km.prototype._renderLayers=function(){},Km.prototype._layerSize=function(t){t=At(t,this.options.zoom);return this.options.minSize*Xm(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,o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},Km.prototype._mousewheel=function(t){t.preventDefault();var e=0<ct(t)?-1:1,o=this.options,i=this.zoom(),e=wt(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))};var Qm,ps=Km;function Km(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Qm.call(this),this._init(t,e,o,i)}i(ps,{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}),gy(ps,["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:ox,padding:3},line:{length:10,width:2},visible:!0}}function Jm(t){return{axisDefaults:{labels:{font:ox},notes:$m(),title:{font:ix,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:ix},legend:{labels:{font:ox}}}}var tx,ex=ps,Go="Arial, Helvetica, sans-serif",ox="12px "+Go,ix="16px "+Go,rx=(e.d(t,"autoMajorUnit",function(){return Ut}),e.d(t,"Point",function(){return Nt}),e.d(t,"Box",function(){return C}),e.d(t,"Ring",function(){return $t}),e.d(t,"Sector",function(){return Jt}),e.d(t,"ShapeBuilder",function(){return re}),e.d(t,"ShapeElement",function(){return ue}),e.d(t,"ChartElement",function(){return ae}),e.d(t,"BoxElement",function(){return le}),e.d(t,"RootElement",function(){return ve}),e.d(t,"FloatElement",function(){return _e}),e.d(t,"Text",function(){return Ce}),e.d(t,"TextBox",function(){return Te}),e.d(t,"Title",function(){return Re}),e.d(t,"AxisLabel",function(){return Ie}),e.d(t,"Axis",function(){return Je}),e.d(t,"Note",function(){return He}),e.d(t,"CategoryAxis",function(){return zo}),e.d(t,"DateCategoryAxis",function(){return Xo}),e.d(t,"DateValueAxis",function(){return ri}),e.d(t,"NumericAxis",function(){return ei}),e.d(t,"LogarithmicAxis",function(){return pi}),e.d(t,"PolarAxis",function(){return fi}),e.d(t,"RadarCategoryAxis",function(){return ui}),e.d(t,"RadarNumericAxis",function(){return xi}),e.d(t,"RadarLogarithmicAxis",function(){return bi}),e.d(t,"CurveProcessor",function(){return ki}),e.d(t,"Gradients",function(){return de}),e.d(t,"rectToBox",function(){return Se}),e.d(t,"Aggregates",function(){return Vi}),e.d(t,"AreaChart",function(){return Jr}),e.d(t,"AreaSegment",function(){return Gr}),e.d(t,"AxisGroupRangeTracker",function(){return tn}),e.d(t,"Bar",function(){return ln}),e.d(t,"BarChart",function(){return wn}),e.d(t,"BarLabel",function(){return sn}),e.d(t,"BoxPlotChart",function(){return zn}),e.d(t,"BoxPlot",function(){return Ln}),e.d(t,"BubbleChart",function(){return Kn}),e.d(t,"Bullet",function(){return is}),e.d(t,"BulletChart",function(){return ss}),e.d(t,"CandlestickChart",function(){return Mn}),e.d(t,"Candlestick",function(){return Sn}),e.d(t,"CategoricalChart",function(){return mr}),e.d(t,"CategoricalErrorBar",function(){return cr}),e.d(t,"CategoricalPlotArea",function(){return La}),e.d(t,"Chart",function(){return Cl}),e.d(t,"ChartContainer",function(){return ms}),e.d(t,"ClipAnimation",function(){return zr}),e.d(t,"ClusterLayout",function(){return yn}),e.d(t,"Crosshair",function(){return gs}),e.d(t,"CrosshairTooltip",function(){return us}),e.d(t,"DefaultAggregates",function(){return qs}),e.d(t,"DonutChart",function(){return ip}),e.d(t,"DonutPlotArea",function(){return rp}),e.d(t,"DonutSegment",function(){return $h}),e.d(t,"ErrorBarBase",function(){return lr}),e.d(t,"ErrorRangeCalculator",function(){return Xi}),e.d(t,"Highlight",function(){return Va}),e.d(t,"SharedTooltip",function(){return _h}),e.d(t,"Legend",function(){return sh}),e.d(t,"LegendItem",function(){return Ja}),e.d(t,"LegendLayout",function(){return $a}),e.d(t,"LineChart",function(){return Nr}),e.d(t,"LinePoint",function(){return wr}),e.d(t,"LineSegment",function(){return Sr}),e.d(t,"Pane",function(){return bs}),e.d(t,"PieAnimation",function(){return Mh}),e.d(t,"PieChart",function(){return qh}),e.d(t,"PieChartMixin",function(){return Fh}),e.d(t,"PiePlotArea",function(){return Yh}),e.d(t,"PieSegment",function(){return Uh}),e.d(t,"PlotAreaBase",function(){return Ds}),e.d(t,"PlotAreaEventsMixin",function(){return Hs}),e.d(t,"PlotAreaFactory",function(){return hh}),e.d(t,"PointEventsMixin",function(){return xr}),e.d(t,"RangeBar",function(){return Qs}),e.d(t,"RangeBarChart",function(){return ta}),e.d(t,"RangeAreaPoint",function(){return aa}),e.d(t,"RangeAreaChart",function(){return xa}),e.d(t,"ScatterChart",function(){return Wn}),e.d(t,"ScatterErrorBar",function(){return Vn}),e.d(t,"ScatterLineChart",function(){return Rh}),e.d(t,"Selection",function(){return gh}),e.d(t,"SeriesAggregator",function(){return Ns}),e.d(t,"SeriesBinder",function(){return Ni}),e.d(t,"SplineSegment",function(){return Rr}),e.d(t,"SplineAreaSegment",function(){return $r}),e.d(t,"StackWrap",function(){return xn}),e.d(t,"Tooltip",function(){return yh}),e.d(t,"OHLCChart",function(){return ba}),e.d(t,"OHLCPoint",function(){return _a}),e.d(t,"WaterfallChart",function(){return Ta}),e.d(t,"WaterfallSegment",function(){return Pa}),e.d(t,"XYPlotArea",function(){return zh}),e.d(t,"MousewheelZoom",function(){return Ka}),e.d(t,"ZoomSelection",function(){return Qa}),e.d(t,"Pannable",function(){return Ga}),e.d(t,"ChartAxis",function(){return Ai}),e.d(t,"ChartPane",function(){return Ri}),e.d(t,"ChartPlotArea",function(){return Ei}),e.d(t,"findAxisByName",function(){return Mi}),e.d(t,"anyHasZIndex",function(){return Vr}),e.d(t,"appendIfNotNull",function(){return ws}),e.d(t,"areNumbers",function(){return kn}),e.d(t,"bindSegments",function(){return Ss}),e.d(t,"categoriesCount",function(){return fr}),e.d(t,"countNumbers",function(){return Ii}),e.d(t,"equalsIgnoreCase",function(){return ks}),e.d(t,"evalOptions",function(){return dr}),e.d(t,"filterSeriesByType",function(){return As}),e.d(t,"getDateField",function(){return Ps}),e.d(t,"getField",function(){return ji}),e.d(t,"hasGradientOverlay",function(){return an}),e.d(t,"hasValue",function(){return Un}),e.d(t,"isDateAxis",function(){return Ts}),e.d(t,"segmentVisible",function(){return Cs}),e.d(t,"singleItemOrArray",function(){return Ms}),e.d(t,"createOutOfRangePoints",function(){return Es}),e.d(t,"ChartService",function(){return qe}),e.d(t,"DomEventsBuilder",function(){return Ye}),e.d(t,"FormatService",function(){return Ge}),e.d(t,"IntlService",function(){return Fe}),e.d(t,"TemplateService",function(){return Q}),e.d(t,"Sparkline",function(){return El}),e.d(t,"Navigator",function(){return Wl}),e.d(t,"NavigatorHint",function(){return Dl}),e.d(t,"StockChart",function(){return Yl}),e.d(t,"constants",function(){return s}),e.d(t,"Gauge",function(){return ac}),e.d(t,"LinearGauge",function(){return Dc}),e.d(t,"LinearPointer",function(){return _c}),e.d(t,"ArrowLinearPointer",function(){return Pc}),e.d(t,"BarLinearPointer",function(){return Ic}),e.d(t,"LinearScale",function(){return gc}),e.d(t,"RadialGauge",function(){return au}),e.d(t,"RadialPointer",function(){return iu}),e.d(t,"RadialScale",function(){return Yc}),e.d(t,"ArcGauge",function(){return xu}),e.d(t,"RangePointer",function(){return mu}),e.d(t,"ArcScale",function(){return lu}),e.d(t,"CircularGauge",function(){return _u}),e.d(t,"Barcode",function(){return tf}),e.d(t,"barcodeValidator",function(){return Jd}),e.d(t,"QRCode",function(){return wg}),e.d(t,"qrcodeValidator",function(){return bg}),e.d(t,"Map",function(){return ex}),e.d(t,"addClass",function(){return R}),e.d(t,"removeClass",function(){return L}),e.d(t,"alignPathToPixel",function(){return I}),e.d(t,"clockwise",function(){return z}),e.d(t,"convertableToNumber",function(){return D}),e.d(t,"deepExtend",function(){return m}),e.d(t,"elementStyles",function(){return X}),e.d(t,"getSpacing",function(){return q}),e.d(t,"getTemplate",function(){return K}),e.d(t,"getter",function(){return tt}),e.d(t,"grep",function(){return et}),e.d(t,"hasClasses",function(){return ot}),e.d(t,"HashMap",function(){return rt}),e.d(t,"inArray",function(){return nt}),e.d(t,"interpolateValue",function(){return st}),e.d(t,"InstanceObserver",function(){return ht}),e.d(t,"isArray",function(){return B}),e.d(t,"isFunction",function(){return H}),e.d(t,"isNumber",function(){return V}),e.d(t,"isObject",function(){return N}),e.d(t,"isString",function(){return j}),e.d(t,"map",function(){return pt}),e.d(t,"mousewheelDelta",function(){return ct}),e.d(t,"FontLoader",function(){return Pt}),e.d(t,"setDefaultOptions",function(){return i}),e.d(t,"sparseArrayLimits",function(){return Tt}),e.d(t,"styleValue",function(){return G}),e.d(t,"find",function(){return Mt}),e.d(t,"elementScale",function(){return Et}),e.d(t,"autoTextColor",function(){return Lt}),e.d(t,"createHashSet",function(){return jt}),e.d(t,"defaultErrorHandler",function(){return Dt}),e.d(t,"keys",function(){return Ht}),e.d(t,"append",function(){return dt}),e.d(t,"bindEvents",function(){return ft}),e.d(t,"Class",function(){return b.Class}),e.d(t,"defined",function(){return w}),e.d(t,"deg",function(){return gt}),e.d(t,"elementOffset",function(){return yt}),e.d(t,"elementSize",function(){return vt}),e.d(t,"eventCoordinates",function(){return mt}),e.d(t,"eventElement",function(){return xt}),e.d(t,"hashKey",function(){return _t}),e.d(t,"last",function(){return bt}),e.d(t,"limitValue",function(){return wt}),e.d(t,"logToConsole",function(){return b.logToConsole}),e.d(t,"objectKey",function(){return Ct}),e.d(t,"rad",function(){return St}),e.d(t,"round",function(){return k}),e.d(t,"unbindEvents",function(){return kt}),e.d(t,"valueOrDefault",function(){return At}),e.d(t,"chartBaseTheme",function(){return Jm}),t);for(tx in rx)nx(tx,rx[tx])}],r={},i.m=o,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(t,e){var r={};return{setters:[function(t){r.Class=t.Class,r.Color=t.Color,r.drawing=t.drawing,r.geometry=t.geometry,r.logToConsole=t.logToConsole,r.parseColor=t.parseColor,r.support=t.support,r.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var o={100:t=>{t.exports=r}},i={};function i1(t){var e=i[t];if(void 0!==e)return e.exports;e=i[t]={exports:{}};return o[t](e,e.exports,i1),e.exports}i1.d=(t,e)=>{for(var o in e)i1.o(e,o)&&!i1.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i1.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i1.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r1={};return(()=>{i1.r(r1),i1.d(r1,{Aggregates:()=>qi,ArcGauge:()=>bd,ArcScale:()=>cd,AreaChart:()=>ts,AreaSegment:()=>Gn,ArrowLinearPointer:()=>Mu,Axis:()=>yo,AxisGroupRangeTracker:()=>os,AxisLabel:()=>Ke,Bar:()=>hs,BarChart:()=>_s,BarLabel:()=>ns,BarLinearPointer:()=>Vu,Barcode:()=>tg,Box:()=>B,BoxElement:()=>Ae,BoxPlot:()=>Es,BoxPlotChart:()=>Vs,BubbleChart:()=>Zs,Bullet:()=>ea,BulletChart:()=>ra,Candlestick:()=>Cs,CandlestickChart:()=>Ps,CategoricalChart:()=>mn,CategoricalErrorBar:()=>fn,CategoricalPlotArea:()=>Bp,CategoryAxis:()=>qo,Chart:()=>bc,ChartAxis:()=>ji,ChartContainer:()=>ga,ChartElement:()=>o,ChartPane:()=>Fi,ChartPlotArea:()=>Ni,ChartService:()=>po,CircularGauge:()=>Cd,Class:()=>b.Class,ClipAnimation:()=>Vn,ClusterLayout:()=>fs,Crosshair:()=>ua,CrosshairTooltip:()=>ha,CurveProcessor:()=>Ii,DateCategoryAxis:()=>ei,DateValueAxis:()=>ui,DefaultAggregates:()=>Na,DomEventsBuilder:()=>co,DonutChart:()=>Jh,DonutPlotArea:()=>el,DonutSegment:()=>Yh,ErrorBarBase:()=>un,ErrorRangeCalculator:()=>er,Extent:()=>Rv,FloatElement:()=>ze,FontLoader:()=>Xt,FormatService:()=>so,Gauge:()=>hu,Gradients:()=>Oe,HashMap:()=>At,Highlight:()=>Lp,InstanceObserver:()=>Mt,IntlService:()=>io,Legend:()=>oh,LegendItem:()=>Kp,LegendLayout:()=>Zp,LineChart:()=>Fn,LinePoint:()=>Cn,LineSegment:()=>An,LinearGauge:()=>Uu,LinearPointer:()=>bu,LinearScale:()=>yu,Location:()=>ky,LogarithmicAxis:()=>vi,Map:()=>Gx,MousewheelZoom:()=>qp,Navigator:()=>Nc,NavigatorHint:()=>Vc,Note:()=>to,NumericAxis:()=>hi,OHLCChart:()=>xp,OHLCPoint:()=>vp,Pane:()=>xa,Pannable:()=>Dp,PieAnimation:()=>kh,PieChart:()=>Nh,PieChartMixin:()=>jh,PiePlotArea:()=>Wh,PieSegment:()=>Vh,PlotAreaBase:()=>Va,PlotAreaEventsMixin:()=>ja,PlotAreaFactory:()=>nh,Point:()=>O,PointEventsMixin:()=>xn,PolarAxis:()=>Si,QRCode:()=>uy,RadarCategoryAxis:()=>bi,RadarLogarithmicAxis:()=>Ei,RadarNumericAxis:()=>Ti,RadialGauge:()=>pd,RadialPointer:()=>rd,RadialScale:()=>Zu,RangeAreaChart:()=>gp,RangeAreaPoint:()=>ip,RangeBar:()=>Xa,RangeBarChart:()=>Qa,RangePointer:()=>xd,Ring:()=>ye,RootElement:()=>Ee,ScatterChart:()=>Ns,ScatterErrorBar:()=>Ds,ScatterLineChart:()=>Th,Sector:()=>me,Selection:()=>ch,SeriesAggregator:()=>Da,SeriesBinder:()=>Ki,ShapeBuilder:()=>be,ShapeElement:()=>Me,SharedTooltip:()=>yh,Sparkline:()=>Bc,SplineAreaSegment:()=>$n,SplineSegment:()=>Ln,StackWrap:()=>vs,StockChart:()=>Xc,TemplateService:()=>mt,Text:()=>He,TextBox:()=>We,Title:()=>Ye,Tooltip:()=>dh,WaterfallChart:()=>kp,WaterfallSegment:()=>Cp,XYPlotArea:()=>Rh,ZoomSelection:()=>Wp,addClass:()=>it,alignPathToPixel:()=>st,anyHasZIndex:()=>jn,append:()=>Lt,appendIfNotNull:()=>_a,areNumbers:()=>Ss,autoMajorUnit:()=>le,autoTextColor:()=>Jt,barcodeValidator:()=>og,bindEvents:()=>It,bindSegments:()=>wa,categoriesCount:()=>yn,chartBaseTheme:()=>o1,clockwise:()=>at,constants:()=>z,convertableToNumber:()=>ht,countNumbers:()=>Wi,createHashSet:()=>ae,createOutOfRangePoints:()=>Ba,deepExtend:()=>x,defaultErrorHandler:()=>pe,defined:()=>P,deg:()=>zt,elementOffset:()=>Vt,elementScale:()=>$t,elementSize:()=>jt,elementStyles:()=>gt,equalsIgnoreCase:()=>Ca,evalOptions:()=>gn,eventCoordinates:()=>Dt,eventElement:()=>Ht,filterSeriesByType:()=>Sa,find:()=>Yt,findAxisByName:()=>Di,getDateField:()=>ka,getField:()=>Yi,getSpacing:()=>A,getTemplate:()=>xt,getter:()=>wt,grep:()=>Ct,hasClasses:()=>St,hasGradientOverlay:()=>ss,hasValue:()=>Hs,hashKey:()=>Ut,inArray:()=>u,interpolateValue:()=>Pt,isArray:()=>ot,isDateAxis:()=>Aa,isFunction:()=>lt,isNumber:()=>m,isObject:()=>ut,isString:()=>pt,keys:()=>he,last:()=>Ft,limitValue:()=>_,logToConsole:()=>b.logToConsole,map:()=>Ot,mousewheelDelta:()=>Rt,objectKey:()=>Nt,qrcodeValidator:()=>dy,rad:()=>Gt,rectToBox:()=>Ue,removeClass:()=>nt,round:()=>T,segmentVisible:()=>ba,setDefaultOptions:()=>e,singleItemOrArray:()=>Pa,sparseArrayLimits:()=>qt,styleValue:()=>dt,unbindEvents:()=>Wt,valueOrDefault:()=>M});var z={},V=(i1.r(z),i1.d(z,{NAVIGATOR_AXIS:()=>Hc,NAVIGATOR_PANE:()=>Dc}),"arc"),j="#000",D="bottom",w="center",H="circle",U="cross",F="date",N="12px sans-serif",g=10,G=/\{\d+:?/,W="height",X="inside",C="left",q=Number.MAX_VALUE,Y=-Number.MAX_VALUE,Z="none",Q="object",K="outside",S="right",$="roundedRect",J="string",k="top",tt="value",a="#fff",et="width",y="x",v="y";function ot(t){return Array.isArray(t)}function it(t,e){for(var o=ot(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var rt=/\s+/g;function nt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(rt," "))}var b=i1(100);function st(t){var e=.5;t.options.stroke&&b.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 at(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function pt(t){return typeof t===J}function ht(t){return m(t)||pt(t)&&isFinite(t)}function lt(t){return"function"==typeof t}var ct="object";function x(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===ct&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):lt(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===ct&&r||{},t(e[i],n)):"undefined"!=s&&(e[i]=n)}}(t,e[i]);return t}function ut(t){return"object"==typeof t}function dt(t){return m(t)?t+"px":t}var ft=/width|height|top|left|bottom|right/i;function gt(t,e){var o=pt(e)?[e]:e;if(ot(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=ft.test(s)?parseFloat(r[s]):r[s]}return i}if(ut(e))for(var a in e)t.style[a]=dt(e[a])}function A(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o.top=o.right=o.bottom=o.left=t:(o.top=t.top||e,o.right=t.right||e,o.bottom=t.bottom||e,o.left=t.left||e),o}function yt(){}var vt={compile:function(t){return t}};yt.register=function(t){vt=t},yt.compile=function(t){return vt.compile(t)};const mt=yt;function xt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=mt.compile(t.template):lt(t.content)&&(e=t.content),e}var _t=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,bt={};function wt(t){if(bt[t])return bt[t];var r=[];return t.replace(_t,function(t,e,o,i){r.push(b.drawing.util.defined(e)?e:o||i)}),bt[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},bt[t]}function Ct(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function St(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}bt[void 0]=function(t){return t};function kt(){this._map={}}kt.prototype.get=function(t){return this._map[this._key(t)]},kt.prototype.set=function(t,e){this._map[this._key(t)]=e},kt.prototype._key=function(t){return t instanceof Date?t.getTime():t};const At=kt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Pt(t,e,o){return b.drawing.util.round(t+(e-t)*o,3)}function Tt(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}Tt.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},Tt.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)},Tt.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};const Mt=Tt;function Ot(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);b.drawing.util.defined(n)&&i.push(n)}return i}var Bt=b.support.browser||{};function Rt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Bt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Et(){}var t=b.drawing.util,Lt=t.append,It=t.bindEvents,P=t.defined,zt=t.deg,Vt=t.elementOffset,jt=t.elementSize,Dt=t.eventCoordinates,Ht=t.eventElement,Ut=t.hashKey,Ft=t.last,_=t.limitValue,Nt=t.objectKey,Gt=t.rad,T=t.round,Wt=t.unbindEvents,M=t.valueOrDefault;Et.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++,Et.fetchFonts(e,i,r),r.depth--))})},Et.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){(0,b.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},Et.preloadFonts=function(t,e){var o=[];Et.fetchFonts(t,o),Et.loadFonts(o,e)};const Xt=Et;function e(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function qt(t){for(var e=q,o=Y,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===q?void 0:e,max:o===Y?void 0:o}}function Yt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Zt=b.geometry.Matrix,Qt=/matrix\((.*)\)/;function Kt(t){var t=getComputedStyle(t).transform;return"none"===t?Zt.unit():(t=t.match(Qt),null===t||2!==t.length?Zt.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Zt,[null].concat(t)))))}function $t(t){if(!t)return Zt.unit();for(var e=Kt(t),o=t.parentElement;o;)var i=Kt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}const Jt=function(t){return new b.Color(t).isDark()?a:j};var te,ee,oe,ie,re={},ne=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},t={size:{configurable:!0}},se=(ne.prototype.values=function(){return this._values.filter(function(t){return t!==re})},ne.prototype.has=function(t){return void 0!==this._index[t]},ne.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},ne.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=re,delete this._index[t])},ne.prototype.clear=function(){this._index={},this._values=[]},t.size.get=function(){return this._values.length},Object.defineProperties(ne.prototype,t),function(t){this._set=new Set(t)}),t={size:{configurable:!0}};function ae(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?se:ne)(t);var e}function pe(t){throw t}se.prototype.values=function(){return Array.from(this._set)},se.prototype.has=function(t){return this._set.has(t)},se.prototype.add=function(t){this._set.add(t)},se.prototype.delete=function(t){this._set.delete(t)},se.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(se.prototype,t);const he={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 le(t,e){t=T(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=T(t/e,g);return T(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(te=b.Class)&&(ce.__proto__=te),((ce.prototype=Object.create(te&&te.prototype)).constructor=ce).prototype.clone=function(){return new ce(this.x,this.y)},ce.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},ce.prototype.rotate=function(t,e){var e=Gt(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=T(i+(r-i)*o+(n-t)*e,3),this.y=T(t+(n-t)*o-(r-i)*e,3),this},ce.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},ce.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},ce.onCircle=function(t,e,o){e=Gt(e);return new ce(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};const O=ce;function ce(t,e){te.call(this),this.x=t||0,this.y=e||0}function ue(t,e,o,i){ee.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function de(t,e,o,i,r){r=Gt(r);return new O(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(ee=b.Class)&&(ue.__proto__=ee),((ue.prototype=Object.create(ee&&ee.prototype)).constructor=ue).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},ue.prototype.width=function(){return this.x2-this.x1},ue.prototype.height=function(){return this.y2-this.y1},ue.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},ue.prototype.move=function(t,e){var o=this.height(),i=this.width();return P(t)&&(this.x1=t,this.x2=this.x1+i),P(e)&&(this.y1=e,this.y2=this.y1+o),this},ue.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},ue.prototype.wrapPoint=function(t){var e=ot(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new ue(o,e,o,e)),this},ue.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},ue.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===D?v:y,a=s==v?r:n;return e===w?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===k||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},ue.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},ue.prototype.expand=function(t,e){return this.shrink(-t,-e),this},ue.prototype.pad=function(t){t=A(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},ue.prototype.unpad=function(t){t=A(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},ue.prototype.clone=function(){return new ue(this.x1,this.y1,this.x2,this.y2)},ue.prototype.center=function(){return new O(this.x1+this.width()/2,this.y1+this.height()/2)},ue.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},ue.prototype.points=function(){return[new O(this.x1,this.y1),new O(this.x2,this.y1),new O(this.x2,this.y2),new O(this.x1,this.y2)]},ue.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},ue.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},ue.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=de(0,0,r,i,t),s=de(e,0,r,i,t),a=de(e,o,r,i,t),r=de(0,o,r,i,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),o=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},ue.prototype.toRect=function(){return new b.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},ue.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},ue.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===y?et:W,n=this[e]();u(o,[C,k])?(this[i]=t[i],this[r]=this[i]+n):u(o,[S,D])?(this[r]=t[r],this[i]=this[r]-n):o===w&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};const B=ue;function fe(t,e,o,i,r){oe.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}function ge(t,e){return t-e}(oe=b.Class)&&(fe.__proto__=oe),((fe.prototype=Object.create(oe&&oe.prototype)).constructor=fe).prototype.clone=function(){return new fe(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},fe.prototype.middle=function(){return this.startAngle+this.angle/2},fe.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},fe.prototype.point=function(t,e){var t=Gt(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=T(this.center.x-o*e,3),t=T(this.center.y-t*e,3);return new O(o,t)},fe.prototype.adjacentBox=function(t,e,o){var t=this.clone().expand(t),i=t.middle(),t=t.point(i),r=e/2,n=o/2,s=Math.sin(Gt(i)),i=Math.cos(Gt(i)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-i/Math.abs(i)),Math.abs(i)<.9&&(t+=n*-s/Math.abs(s)),new B(a,t,a+e,t+o)},fe.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,t=t.y-e.y,a=new O(s,t),r=this.point(r),r=new O(r.x-e.x,r.y-e.y),n=this.point(n),n=new O(n.x-e.x,n.y-e.y),e=T(s*s+t*t,3);return(r.equals(a)||at(r,a))&&!at(n,a)&&o*o<=e&&e<=i*i},fe.prototype.getBBox=function(){for(var t=new B(q,q,Y,Y),e=T(this.startAngle%360),o=T((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(ge),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)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,i)}return i||t.wrapPoint(this.center),t},fe.prototype.expand=function(t){return this.radius+=t,this};const ye=fe;function ve(t,e,o,i){ie.call(this,t,0,e,o,i)}(ie=ye)&&(ve.__proto__=ie),((ve.prototype=Object.create(ie&&ie.prototype)).constructor=ve).prototype.expand=function(t){return ie.prototype.expand.call(this,t)},ve.prototype.clone=function(){return new ve(this.center,this.radius,this.startAngle,this.angle)},ve.prototype.setRadius=function(t){return this.radius=t,this};const me=ve;(xe=b.Class)&&(_e.__proto__=xe),((_e.prototype=Object.create(xe&&xe.prototype)).constructor=_e).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new b.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new b.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=b.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};var xe,t=_e;function _e(){xe.apply(this,arguments)}t.current=new t;const be=t;(we=b.Class)&&(Ce.__proto__=we),((Ce.prototype=Object.create(we&&we.prototype)).constructor=Ce).prototype.initUserOptions=function(t){return t},Ce.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},Ce.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},Ce.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},Ce.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},Ce.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},Ce.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},Ce.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},Ce.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},Ce.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},Ce.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},Ce.prototype.createVisual=function(){this.visual=new b.drawing.Group({zIndex:this.options.zIndex,visible:M(this.options.visible,!0)})},Ce.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=b.drawing.Animation.create(this.visual,this.options.animation))},Ce.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):P(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},Ce.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},Ce.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},Ce.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(M(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},Ce.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)}},Ce.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},Ce.prototype.renderComplete=function(){},Ce.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},Ce.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);P(n.options.zIndex)||(n.options.zIndex=M(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},Ce.prototype.createGradientOverlay=function(t,e,o){o=new b.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},Ce.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},Ce.prototype.supportsPointInactiveOpacity=function(){return!0};var we,t=Ce;function Ce(t){we.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}t.prototype.options={};const o=t;(Se=o)&&(ke.__proto__=Se),((ke.prototype=Object.create(Se&&Se.prototype)).constructor=ke).prototype.reflow=function(t){function e(){i.align(t,y,r.align),i.align(t,v,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),Se.prototype.reflow.call(this,u),o=p?this.box=new B(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(h),e()),this.translateChildren(o.x1-u.x1+h.left+c+l.left,o.y1-u.y1+h.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},ke.prototype.align=function(t,e,o){this.box.align(t,e,o)},ke.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ke.prototype.createVisual=function(){Se.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ke.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:M(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}};var Se,t=ke;function ke(t){Se.call(this,t),this.options.margin=A(this.options.margin),this.options.padding=A(this.options.padding)}e(t,{align:C,vAlign:k,margin:{},padding:{},border:{color:j,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Ae=t;(Pe=Ae)&&(Te.__proto__=Pe),((Te.prototype=Object.create(Pe&&Pe.prototype)).constructor=Te).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,p=this.visualStyle();return o===H?a=new b.drawing.Circle(new b.geometry.Circle([T(e.x1+n,3),T(e.y1+s,3)],Math.min(n,s)),p):"triangle"===o?a=b.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close():o===U?((a=new b.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(s=e.toRect(),o===$&&(n=M(t.borderRadius,s.width()/5),s.setCornerRadius(n)),a=b.drawing.Path.fromRect(s,p)),i&&a.transform(b.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},Te.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()},Te.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}},Te.prototype.createVisual=function(){this.visual=this.createElement()};var Pe,t=Te;function Te(t,e){Pe.call(this,t),this.pointData=e}e(t,{type:H,align:w,vAlign:w});const Me=t;t="radial";const Oe={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:t,stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:t,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:t,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:t,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:t,center:[.5,.5],radius:.5}};(Be=o)&&(Re.__proto__=Be),((Re.prototype=Object.create(Be&&Be.prototype)).constructor=Re).prototype.reflow=function(){var t=this.options,e=this.children,o=new B(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),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new B(i,s,r,a),l[1]=new B(o,a,i,p),l[2]=new B(r,a,n,p),l[3]=new B(i,p,r,h),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new B(o,s,i,a),l[5]=new B(r,p,n,h)):(l[4]=new B(r,s,n,a),l[5]=new B(o,p,i,h)),Ct(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new B},Re.prototype.createVisual=function(){this.visual=new b.drawing.Group,this.createBackground()},Re.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=b.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(o)},Re.prototype.getRoot=function(){return this},Re.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Nt(t),r=Oe[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new b.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 b.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Re.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Re.prototype.size=function(){var t=this.options;return new B(0,0,t.width,t.height)};var Be,t=Re;function Re(t){Be.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}e(t,{width:600,height:400,background:a,border:{color:j,width:0},margin:A(5),zIndex:-2});const Ee=t;(Le=o)&&(Ie.__proto__=Le),((Ie.prototype=Object.create(Le&&Le.prototype)).constructor=Ie).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=et,this.elementSizeField=W,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=W,this.elementSizeField=et,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Ie.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ie.prototype.reflowChildren=function(){var t=this,e=t.box,o=t.elementAxis,i=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,p=s.length,h=e[i+1]+this.alignStart(a,e[n]());if(p){for(var l=h,c=0;c<p;c++){for(var u=s[c],d=u.groupElements,f=e[o+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[n],u.groupSize),_=new B;_[i+1]=x,_[i+2]=x+m[n],_[o+1]=f,_[o+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}e[i+1]=h,e[i+2]=h+a,e[o+2]=e[o+1]+t}},Ie.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===D?o=e-t:i===w&&(o=(e-t)/2),o},Ie.prototype.groupOptions=function(){for(var t=this,e=t.box,o=t.children,i=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=T(e[i]()),p=o.length,h=[],l=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=o[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&T(c+n+v[i])>a&&(h.push({groupElements:f,groupSize:l,groupElementsSize:c}),d=Math.max(d,c),u+=s+l,c=l=0,f=[]),l=Math.max(l,v[r]),0<c&&(c+=n),c+=v[i],f.push(y)}return h.push({groupElements:f,groupSize:l,groupElementsSize:c}),{groups:h,groupsSize:u+=l,maxGroupElementsSize:d=Math.max(d,c)}},Ie.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ie.prototype.createVisual=function(){};var Le,t=Ie;function Ie(t){Le.call(this,t),this._initDirection()}e(t,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const ze=t;var Ve,je=b.drawing.Text,t=((Ve=o)&&(De.__proto__=Ve),((De.prototype=Object.create(Ve&&Ve.prototype)).constructor=De).prototype.reflow=function(t){var e=this.options,e=e.size=b.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new B(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},De.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new je(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},De);function De(t,e){Ve.call(this,e),this.content=t,this.reflow(new B)}e(t,{font:N,color:j});const He=t;function Ue(t){var e=t.origin,t=t.bottomRight();return new B(e.x,e.y,t.x,t.y)}var Fe,Ne=/\n/m;function Ge(t,e,o){Fe.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new B)}(Fe=Ae)&&(Ge.__proto__=Fe),((Ge.prototype=Object.create(Fe&&Fe.prototype)).constructor=Ge).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ne),o=new ze({vertical:!0,align:t.align,wrap:!1}),i=x({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new He(e[r].trim(),i);o.append(n)}},Ge.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=Ue(i.clippedBBox()||new b.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Fe.prototype.reflow.call(this,t),o.rotation&&(i=A(o.margin),e=this.box.unpad(i),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=e.clone(),e.pad(i)))},Ge.prototype.createVisual=function(){var t=this.options;this.visual=new b.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ge.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!P(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Fe.prototype.renderVisual.call(this))},Ge.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},Ge.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ge.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},Ge.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,e=e.y,i=this.rotatedBox.center();return b.geometry.transform().translate(i.x-o,i.y-e).rotate(t,[o,e])};const We=Ge;(Xe=o)&&(qe.__proto__=Xe),((qe.prototype=Object.create(Xe&&Xe.prototype)).constructor=qe).prototype.reflow=function(t){Xe.prototype.reflow.call(this,t),this.box.snapTo(t,y)},qe.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 qe(t),e.append(i)),i};var Xe,t=qe;function qe(t){Xe.call(this,t),this.append(new We(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}e(t,{color:j,position:k,align:w,margin:A(5),padding:A(5)});const Ye=t;(Ze=We)&&(Qe.__proto__=Ze),((Qe.prototype=Object.create(Ze&&Ze.prototype)).constructor=Qe).prototype.visualContext=function(t){t=Ze.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},Qe.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Ht(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Qe.prototype.rotate=function(){var t,e;return this.options.alignRotation!==w?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ue(t.bbox(e.matrix()))):Ze.prototype.rotate.call(this),this.box},Qe.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===w)return Ze.prototype.rotationTransform.call(this);var o=b.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||k,n=t===k||t===D?y:v,s=t===k||t===D?v:y,t=t===k||t===C?r.origin:r.bottomRight(),a=i.topLeft().transformCopy(o),p=i.topRight().transformCopy(o),h=i.bottomRight().transformCopy(o),i=i.bottomLeft().transformCopy(o),o=b.geometry.Rect.fromPoints(a,p,h,i),l={};l[s]=r.origin[s]-o.origin[s];var c,o=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(p[s]+l[s]-t[s]),s=T(o,g)===T(t,g)?(c=a,p):t<o?(c=p,h):(c=a,i),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,b.geometry.transform().translate(l.x,l.y).rotate(e)};var Ze,t=Qe;function Qe(t,e,o,i,r){Ze.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new B)}e(t,{_autoReflow:!1});const Ke=t;($e=Ae)&&(Je.__proto__=$e),((Je.prototype=Object.create($e&&$e.prototype)).constructor=Je).prototype.hide=function(){this.options.visible=!1},Je.prototype.show=function(){this.options.visible=!0},Je.prototype.render=function(){var t,e,o,i,r,n,s,a,p=this,h=this.options;h.visible&&(o=h.label,h=h.icon,i=new B,r=function(){return p},n=h.size,s=this.fields.text,P(o)&&o.visible&&((a=xt(o))?s=a(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color=o.position===X?"#fff":h.background),this.label=new We(s,x({},o)),this.label.aliasFor=r,o.position!==X||P(n)||(h.type===H?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))),h.width=t||n||7,h.height=e||n||7,(a=new Me(x({},h))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new B),this.wrapperBox=i.wrap(a.box))},Je.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(u(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):l===D?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&(r.label.position===K&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},Je.prototype.createVisual=function(){$e.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Je.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()):$e.prototype.renderVisual.call(this)},Je.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(st(t=b.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Je.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},Je.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},Je.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Je.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Ht(t),text:P(e.label)?e.label.text:"",visual:this.visual})};var $e,t=Je;function Je(t,e,o){$e.call(this,e),this.fields=t,this.chartService=o,this.render()}e(t,{icon:{visible:!0,type:H},label:{position:X,visible:!0,align:w,vAlign:w},line:{visible:!0},visible:!0,position:k,zIndex:2});const to=t;function eo(){}var oo={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},t={implementation:{configurable:!0}};eo.register=function(t){oo=t},t.implementation.get=function(){return oo},Object.defineProperties(eo,t);const io=eo;function ro(t){this._intlService=t}var no=/\{(\d+)(:[^\}]+)?\}/g,t={intl:{configurable:!0}};t.intl.get=function(){return this._intlService||io.implementation},t.intl.set=function(t){this._intlService=t},ro.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return pt(t)&&t.match(G)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},ro.prototype.localeAuto=function(t,i,r){var n=this.intl;return pt(t)&&t.match(G)?t.replace(no,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(ro.prototype,t);const so=ro;function ao(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new so(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}t={intl:{configurable:!0}};t.intl.get=function(){return this._intlService||io.implementation},t.intl.set=function(t){this._intlService=t,this.format.intl=t},ao.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},ao.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(ao.prototype,t);const po=ao;function ho(){}var lo;ho.register=function(t){lo=t},ho.create=function(t,e){if(lo)return lo.create(t,e)};const co=ho;function uo(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new b.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),st(n),n}function fo(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new b.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),st(e),e}(go=o)&&(i.__proto__=go),((i.prototype=Object.create(go&&go.prototype)).constructor=i).prototype.initFields=function(){},i.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},i.prototype.normalizeLabelRotation=function(t){var e=t.rotation;ut(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},i.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:w,o=x({},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))}}},i.prototype.clearLabels=function(){this.children=Ct(this.children,function(t){return!(t instanceof Ke)}),this.labels=[]},i.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Ct(this.children,function(t){return t!==e.title}),this.title=void 0)},i.prototype.clear=function(){this.clearLabels(),this.clearTitle()},i.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 B(r,e.y1,r,e.y2-t):new B(e.x1,i,e.x2-t,i)},i.prototype.createTitle=function(){var t=this.options,t=x({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new We(t.text,t),this.append(t),this.title=t)},i.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=x({},e,o[i]),r=(r.value=this.parseNoteValue(r.value),new to({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(P(r.options.position)?t.vertical&&!u(r.options.position,[C,S])?r.options.position=t.reverse?C:S:t.vertical||u(r.options.position,[k,D])||(r.options.position=t.reverse?D:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?D:k,this.append(r),this.notes.push(r))}},i.prototype.parseNoteValue=function(t){return t},i.prototype.renderVisual=function(){go.prototype.renderVisual.call(this),this.createPlotBands()},i.prototype.createVisual=function(){go.prototype.createVisual.call(this),this.createBackground(),this.createLine()},i.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new b.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},i.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={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)P(o)&&n%o==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(uo(h,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},i.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new b.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&st(e),(o=this._lineGroup=new b.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},i.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},i.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=b.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},i.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 b.drawing.Group({zIndex:-1}),s=Ct(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var p=o[a],h=void 0,l=void 0,c=p.label,u=void 0,l=i?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new B(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(c=new b.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),h=b.drawing.Path.fromRect(c,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(h),u&&n.append(u))}this.appendVisual(n)}},i.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return P(t)&&t.visible&&((i=xt(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)),(i=new We(r,t)).reflow(o),i.renderVisual(),i.visual},i.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(),p=t[n?"y1":"x1"],h={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=T(t[n]);u(s,l)||n%o==0||a&&p===s||(h.position=s,c.append(fo(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},i.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?et:W,i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new B(t.x1,t.y1,t.x1+h+a,t.y2):new B(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},i.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},i.prototype.labelTickIndex=function(t){return t.index},i.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],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),l=n[p],p=n[p+1],c=void 0,u=void 0,u=i?c=o?l+(p-l)/2-h/2:l-h/2:o?(c=l,p):(c=l-h/2)+h;this.positionLabel(a,r,c,u)}},i.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,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=S),t.box.move(n,o)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=D):(n+=r,t.options.rotationOrigin=k),new B(o,n,i,n+t.box.height()));t.reflow(s)},i.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},i.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,s=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==s?s:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new B);return!0}},i.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?S:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?k:D),e.reflow(this.box))},i.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;P(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},i.prototype.noteSlot=function(t){return this.getSlot(t)},i.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,o=e?v:y;this.box.snapTo(t,o),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[o+1]-=this.lineBox()[o+1]-t[o+1],this.box[o+2]-=this.lineBox()[o+2]-t[o+2]},i.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=xt(e);return n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i()},i.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},i.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),o[e+1]-=t.start,o[e+2]+=t.end):(i[0].options.visible&&o.wrap(i[0].box),(e=i[i.length-1]).options.visible&&o.wrap(e.box))),o},i.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=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],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-f)}return{start:p,end:h}},i.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!P(n.min)||n.min<=o)||i<e&&0<r&&(!P(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var n=e-t,s=t,a=e;return t<o&&r<0?(s=_(t,o,i),a=_(t+n,o+n,i)):i<e&&0<r&&(a=_(e,o,i),s=_(e-n,o,i-n)),{min:s,max:a}},i.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},i.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},i.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),t=t?v:y,i=this.lineDir(),r=t+(1===i?1:2).toString();return{axis:t,axisOrigin:r,axisDir:i,lineBox:e,lineSize:o,lineStart:e[r]}},i.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},i.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},i.prototype.labelsBetweenTicks=function(){return!this.options.justified},i.prototype.prepareUserOptions=function(){};var go,t=i;function i(t,e){void 0===e&&(e=new po),go.call(this,t),this.chartService=e,this.options.visible||(this.options=x({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==Z},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==Z},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}e(t,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:j,visible:!0},title:{visible:!0,position:w},majorTicks:{align:K,size:4,skip:0,step:1},minorTicks:{align:K,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:K,minorTickType:Z,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:j,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const yo=t;var vo="milliseconds",mo="seconds",xo="minutes",_o="hours",bo="days",wo="weeks",Co="months",So="years",ko=6e4,Ao=36e5,Po=864e5,To=6048e5,Mo=31536e6,Oo={years:Mo,months:26784e5,weeks:To,days:Po,hours:Ao,minutes:ko,seconds:1e3,milliseconds:1};function Bo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ko}function Ro(t,e){return new Date(t.getTime()+e)}function d(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Eo(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Lo(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=d(t)).getHours(),o===So?Eo(a=new Date(t.getFullYear()+e,0,1),0):o===Co?Eo(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===wo?Eo(a=Lo(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 Ro(t,-o*Po)}(t,r),7*e,bo),i):o===bo?Eo(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===_o?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),i=(i.getTimezoneOffset()-s.getTimezoneOffset())*ko,a=Ro(s,i+n*Ao)):o===xo?0<(a=Ro(t,e*ko)).getSeconds()&&a.setSeconds(0):o===mo?a=Ro(t,1e3*e):o===vo&&(a=Ro(t,e)),o!==vo&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function Io(t,e,o){return Lo(d(t),0,e,o)}function zo(t,e,o){t=d(t);return t&&Io(t,e,o).getTime()===t.getTime()?t:Lo(t,1,e,o)}function Vo(t,e){return t&&e?t.getTime()-e.getTime():-1}function jo(t,e){return t.getTime()-e}function f(t){if(ot(t)){for(var e=[],o=0;o<t.length;o++)e.push(f(t[o]));return e}if(t)return d(t).getTime()}function Do(t,e){return t&&e?f(t)===f(e):t===e}function Ho(t,e,o){return Bo(t,e)/Oo[o]}function Uo(t,e,o,i){var t=d(t),r=d(e);return(o===Co?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Ho(t,new Date(t.getFullYear(),t.getMonth()),bo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===So?t.getFullYear()-r.getFullYear()+Uo(t,new Date(t.getFullYear(),0),Co,1)/12:o===bo||o===wo?Ho(t,r,o):jo(t,e)/Oo[o])/i}function Fo(t,e,o){return o===So?e.getFullYear()-t.getFullYear():o===Co?12*Fo(t,e,So)+e.getMonth()-t.getMonth():o===bo?Math.floor(jo(e,t)/Po):Math.floor(jo(e,t)/Oo[o])}function No(t,e){return pt(e)&&t.parseDate(e)||d(e)}function Go(t,e){if(ot(e)){for(var o=[],i=0;i<e.length;i++)o.push(No(t,e[i]));return o}return No(t,e)}function Wo(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Xo=yo)&&(r.__proto__=Xo),((r.prototype=Object.create(Xo&&Xo.prototype)).constructor=r).prototype.initFields=function(){this._ticks={}},r.prototype.categoriesHash=function(){return""},r.prototype.clone=function(){var t=new r(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},r.prototype.initUserOptions=function(t){var e=t.categories||[],o=P(t.min),i=P(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,i=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,i)),t},r.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},r.prototype.totalRangeIndices=function(t){var e=this.options,o=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=_(o,0,t.max),e=_(e,0,t.max)),{min:o,max:e}},r.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},r.prototype.roundedRange=function(){return this.range()},r.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},r.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(t-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:t}},r.prototype.arrangeLabels=function(){Xo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},r.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?v:y)+1],i=i[t+2],o=r[0],r=Ft(r),(o.box[t+1]>i||o.box[t+2]<e)&&(o.options.visible=!1),(r.box[t+1]>i||r.box[t+2]<e)&&(r.options.visible=!1))},r.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},r.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},r.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},r.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},r.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,e=e.reverse,i=this.scaleOptions(),r=i.scale,n=i.box,s=i.min,a=n[(o?v:y)+(e?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+T(r*(p[l]-s),3));return h},r.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},r.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?v:y,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)},r.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,o=this.lineBox(),i=e?o.height():o.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:o,lineSize:i,lineStart:o[r]}},r.prototype.lineDir=function(){return this.options.reverse?-1:1},r.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,i=i.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,p=this.lineInfo(),h=p.axis,p=p.lineStart,l=a.clone(),c=!P(e),t=M(t,0),e=M(e,t),e=Math.max(e-1,t),u=p+(t-n)*s,p=p+(Math.max(t,e)+1-n)*s;return c&&i&&(p=u),o&&(u=_(u,a[h+1],a[h+2]),p=_(p,a[h+1],a[h+2])),l[h+1]=r?p:u,l[h+2]=r?u:p,l},r.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,o=this.lineBox(),i=t.clone();return i[e+1]=_(t[e+1],o[e+1],o[e+2]),i[e+2]=_(t[e+2],o[e+1],o[e+2]),i},r.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=i),Xo.prototype.slot.call(this,t,e,o)},r.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,p=s[e+1],s=s[e+2],t=t[e];if(t<p||s<t)return null;e=(o?r:a)+(t-p)/n,s=e%1;return i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e)},r.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},r.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},r.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},r.prototype.categoriesCount=function(){return(this.options.categories||[]).length},r.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=T(t/(o/e),g);return{min:t,max:e+t}},r.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.totalRangeIndices(),i=o.max-o.min,t=this.scaleToDelta(t,i),i=o.min+e*t,o=o.max-(1-e)*t;return{min:i,max:o=o-i<.1?i+.1:o}},r.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,t=this.scaleRange(t,e);return{min:_(t.min,i,o),max:_(t.max,i,o)}},r.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},r.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,i=i.max,n=Math.floor(r),i=e?(r=Math.ceil(r),Math.floor(i)):(r=Math.floor(r),Math.ceil(i));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-n,max:(t.categories.length?i+(e?1:0):0)-n}},r.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=M(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new Ke(i,o,t,r,e)},r.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},r.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},r.prototype.arrangeNotes=function(){Xo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},r.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?v:y,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()}},r.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=T(t/o,g),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},r.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,o=o.vertical?v:y,r=this.totalRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[o+(i?2:1)],i=t[o]-n,t=e[o]-n,e=r.min+i/s,o=r.min+t/s,n=Math.min(e,o),i=Math.max(e,o);if(.01<=i-n)return{min:n,max:i}},r.prototype.valueRange=function(){return this.range()},r.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var o=t,i=e.srcCategories;if(o instanceof Date){for(var r=i.length,n=0;n<r;n++)if(Do(i[n],o))return n;return-1}return i.indexOf(o)},r.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},r.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new At,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},r.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Xo,t=r;function r(){Xo.apply(this,arguments)}e(t,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:j},labels:{zIndex:1},justified:!1,_deferLabels:!0});const qo=t;var t={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"},Yo=[vo,mo,xo,_o,bo,wo,Co,So],Zo="fit";function Qo(t){var e=t._range;return e||((e=t._range=qt(t)).min=d(e.min),e.max=d(e.max)),e}function Ko(t){this.options=t}function $o(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=Lo(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&Do(e,s)&&!o.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),o.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=o.max)?(i=!n&&Do(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,i),this.displayEnd=r?this.roundToTotalStep(t,!n):o.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}Ko.prototype.displayIndices=function(){return{min:0,max:1}},Ko.prototype.displayRange=function(){return{}},Ko.prototype.total=function(){return{}},Ko.prototype.valueRange=function(){return{}},Ko.prototype.valueIndex=function(){return-1},Ko.prototype.values=function(){return[]},Ko.prototype.totalIndex=function(){return-1},Ko.prototype.valuesCount=function(){return 0},Ko.prototype.totalCount=function(){return 0},Ko.prototype.dateAt=function(){return null};function Jo(t,e,o){for(var i,r,n,s=Qo(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===Zo,c=e?Yo.indexOf(e):0,u=l?Yo[c++]:t.baseUnit,d=a/Oo[u],f=d;!r||h<=d;){for(i=i||p[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===Ft(Yo)){r=Math.ceil(f/h);break}if(!l){h<d&&(r=Math.ceil(f/h));break}u=Yo[c++]||Ft(Yo),f=a/Oo[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}$o.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},$o.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Uo(this.displayStart,this.valueStart,o,t),o=Uo(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},$o.prototype.total=function(){return{min:this.start,max:this.end}},$o.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},$o.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},$o.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Uo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},$o.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Uo(t,this.start,e.baseUnit,e.baseUnitStep))},$o.prototype.dateIndex=function(t){var e=this.options;return Uo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},$o.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},$o.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=Lo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},$o.prototype.dateAt=function(t,e){var o=this.options;return Lo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},$o.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Uo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),Lo(s,e*n,r,i)};(ti=qo)&&(s.__proto__=ti),((s.prototype=Object.create(ti&&ti.prototype)).constructor=s).prototype.clone=function(){var t=new s(Object.assign({},this.options),this.chartService);return t.createLabels(),t},s.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},s.prototype.initUserOptions=function(t){return t},s.prototype.initFields=function(){ti.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Go(e,i))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:i,min:No(e,o.min),max:No(e,o.max),weekStartDay:Wo(o,e)}),t.panning&&t.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=Qo(i),t=o.maxDivisions,this.dataRange=new $o(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==Zo&&!u(e,Yo)){for(var o=t,i,r,n=o.categories,s=P(n)?n.length:0,a=q,p=0;p<s;p++){var h,l=n[p];l&&i&&(0<(h=Bo(l,i))&&(r=(a=Math.min(a,h))>=Mo?So:24192e5<=a?Co:To<=a?wo:Po<=a?bo:Ao<=a?_o:ko<=a?xo:mo)),i=l}o.baseUnit=r||bo}return e!==Zo&&"auto"!==t.baseUnitStep||Jo(t),t}(o)),t?(i=this.dataRange.displayRange(),Jo(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 $o(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||bo,this.dataRange=this.divisionRange=new Ko(o)),this.rangeLabels=[]},s.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return ti.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,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&(a=r.length-1,r.splice(p,0,r[a-1]+(r[a]-r[a-1])*t));return r},s.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Vo(t,e.min)&&Vo(t,e.max)<=0&&o.length},s.prototype.parseNoteValue=function(t){return No(this.chartService.intl,t)},s.prototype.noteSlot=function(t){return this.getSlot(t)},s.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=T(t/r,g);return n.min&&n.max&&(r=Ro(e.min||n.min,t),e=Ro(e.max||n.max,t),n={min:Lo(r,0,o,i),max:Lo(e,0,o,i)}),n},s.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},s.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),i=this.dataRange.displayRange(),r=i.min,i=i.max,n=this.dataRange.total(),t=T(t/(o/(i-r)),g)*(e.reverse?-1:1),o=Ro(r,t),r=Ro(i,t),i=this.limitRange(f(o),f(r),f(n.min),f(n.max),t);return i?(i.min=d(i.min),i.max=d(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},s.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var t=ti.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=jo(e.max,e.min)/(o.max-o.min),i=this.options;return{min:Ro(e.min,t.min*o),max:Ro(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}},s.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Zo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),p=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(i){var h,l,c=o.autoBaseUnitSteps,e=o.maxDateGroups,i=Ft(c[p])*e*Oo[p],u=jo(n,s),d=jo(a,t),f=Yo.indexOf(p);if(d<Oo[p]&&p!==vo)p=Yo[f-1],t=Ro(s,l=(u-(e-1)*(h=Ft(c[p]))*Oo[p])/2),a=Ro(n,-l);else if(i<d&&p!==So){var g=0;do{for(p=Yo[++f],g=0,l=2*Oo[p];h=c[p][g],++g<c[p].length&&l*h<u;);}while(p!==So&&l*h<u);0<(l=(l*h-u)/2)&&(t=Ro(s,-l),a=Ro(n,l),t=Ro(t,_(a,r.min,r.max)-a),a=Ro(a,_(t,r.min,r.max)-t))}}return t&&a&&0<jo(a,t)?{min:t,max:a,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},s.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<o.min&&(t.min=o.min),t.max>o.max&&(t.max=o.max)),t},s.prototype.range=function(){return this.dataRange.displayRange()},s.prototype.createLabels=function(){ti.prototype.createLabels.call(this),this.createRangeLabels()},s.prototype.clearLabels=function(){ti.prototype.clearLabels.call(this),this.rangeLabels=[]},s.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),ti.prototype.arrangeLabels.call(this)},s.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(i=e?t.y1-o.box.height()/2:t.x1,this.positionLabel(o,r,i)),(o=n[1])&&(i=e?t.y2-o.box.height()/2:t.x2,this.positionLabel(o,r,i)))},s.prototype.autoRotateLabels=function(){ti.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){ti.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},s.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))}},s.prototype.contentBox=function(){for(var t=ti.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},s.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,i=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,o.dataItem=i,this.axisLabelText(r,e,o));if(n)return new Ke(r,n,t,i,e)},s.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,o=this.options,r=Object.assign({},o.labels,o.rangeLabels,{align:w,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=w,"auto"===r.rotation&&(r.rotation=0,o.autoRotateRangeLabels=!0),o=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||o,(o=function(t,e,o){o&&(e=new Ke(e,o,t,null,r),i.append(e),i.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),o(1,t,this.axisLabelText(t,r,{index:1,count:2})))},s.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){e=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,e);0!==o&&(t.options.rotation=o,t.reflow(new B))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},s.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},s.prototype.slot=function(t,e,o){var i=this.dataRange,i=(t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e)),this.getSlot(t,e,o));if(i)return i.toRect()},s.prototype.getSlot=function(t,e,o){return typeof t==Q&&(t=this.categoryIndex(t)),typeof e==Q&&(e=this.categoryIndex(e)),ti.prototype.getSlot.call(this,t,e,o)},s.prototype.valueRange=function(){var t=Qo(this.options.srcCategories);return{min:d(t.min),max:d(t.max)}},s.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},s.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},s.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},s.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},s.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},s.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},s.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalRange=function(){return this.dataRange.total()},s.prototype.totalCount=function(){return this.dataRange.totalCount()},s.prototype.isEmpty=function(){return!this.options.srcCategories.length},s.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Qo(t.srcCategories);return new $o(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()};var ti,n=s;function s(){ti.apply(this,arguments)}e(n,{type:F,labels:{dateFormats:t},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});const ei=n;function oi(t,e){return T(Math.floor(t/e)*e,g)}function ii(t,e){return T(Math.ceil(t/e)*e,g)}function ri(t){return Math.max(Math.min(t,3e5),-3e5)}var ni,si=Math.pow(10,-9),n=((ni=yo)&&(ai.__proto__=ni),((ai.prototype=Object.create(ni&&ni.prototype)).constructor=ai).prototype.initUserOptions=function(t){a=t.seriesMin,o=t.seriesMax,i=(r=t).narrowRange,e=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}(a),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;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(a,o,i),n=le(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&pi(e,n,1/3)&&(e-=n),0<a&&pi(a,n,1/3)&&(a+=n)),s.min=oi(e,n),s.max=ii(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:P((a=t).min)?Math.min(e.min,a.min):e.min,max:P(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var p=s,h=["min","max"],l=0;l<h.length;l++){var c=h[l];null===p[c]&&(p[c]=void 0)}var u=P(s.min),d=P(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=oi(n.min,s.majorUnit),n.max=ii(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=le(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=x(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},ai.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},ai.prototype.clone=function(){return new ai(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ai.prototype.startValue=function(){return 0},ai.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ai.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(T(e/t,3))+1},ai.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)),p=this.getDivisions(t),h=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&h.push(T(l,3)),l+=a*r;return h},ai.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ai.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ai.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,p=r.lineSize,r=r.lineStart,p=s*(p/(i.max-i.min)),h=M(t,e||0),e=M(e,t||0),t=(o&&(h=_(h,i.min,i.max),e=_(e,i.min,i.max)),Math.min(h,e)-i.min),o=Math.max(h,e)-i.min,h=new B(a.x1,a.y1,a.x1,a.y1);return h[n+1]=ri(r+p*(0<s?t:o)),h[n+2]=ri(r+p*(0<s?o:t)),h},ai.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:T(e+t*(o-e),g)},ai.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=T(t/(n/(r-e)),g);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},ai.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ai.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=T(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new Ke(i,o,t,null,e)},ai.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ai.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ai.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(o,t))return{min:o,max:t}},ai.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=(1-e)*t,e=T(this.options.min+e*t,g),t=T(this.options.max-o,g);return{min:e,max:t=t-e<si?e+si:t}},ai.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,t=this.scaleRange(t,e);return{min:_(t.min,o,i),max:_(t.max,o,i),narrowRange:!1}},ai.prototype.isValidRange=function(t,e){return si<e-t},ai);function ai(t,e,o,i){ni.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function pi(t,e,o){t=T(Math.abs(t%e),g);return 0===t||e*(1-o)<t}e(n,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:j},labels:{format:"#.####################"},zIndex:1});const hi=n;(li=yo)&&(ci.__proto__=li),((ci.prototype=Object.create(li&&li.prototype)).constructor=ci).prototype.clone=function(){return new ci(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ci.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ci.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Fo(e.min,e.max,e.baseUnit)/t+1)},ci.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/jo(e.max,e.min),p=e.weekStartDay||0,h=[n],l=1;l<s;l++){var c=n+jo(Lo(e.min,l*t,e.baseUnit,p),e.min)*a*i;h.push(T(c,3))}return h},ci.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ci.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ci.prototype.getSlot=function(t,e,o){return hi.prototype.getSlot.call(this,No(this.intlService,t),No(this.intlService,e),o)},ci.prototype.getValue=function(t){t=hi.prototype.getValue.call(this,t);return null!==t?d(t):null},ci.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ci.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min,r=(0<r&&(s=Lo(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new Ke(s,n,t,null,e)},ci.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,o=i?o.height():o.width(),n=this.range(),o=o/jo(n.max,n.min),n=T(t/o,g);return{min:Ro(e.min,n=!i&&!r||i&&r?n:-n),max:Ro(e.max,n),offset:n}},ci.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Vo(t,e.min)&&Vo(t,e.max)<=0},ci.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(f(t.min),f(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:d(t.min),max:d(t.max)}},ci.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);return{min:d(o),max:d(t)}},ci.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=e*t,e=(1-e)*t,t=d(f(this.options.min)+o),o=d(f(this.options.max)-e);return{min:t,max:o=o-t<1e3?d(f(t)+1e3):o}},ci.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:d(_(f(t.min),this.totalMin,this.totalMax)),max:d(_(f(t.max),this.totalMin,this.totalMax))}};var li,n=ci;function ci(t,e,o,i){var r,n,s,a,p,h,l,t=d(t),e=d(e),c=i.intl,o=o||{},u=(u=t,r=e,n=o=x(o||{},{min:No(c,o.min),max:No(c,o.max),axisCrossingValue:Go(c,o.axisCrossingValues||o.axisCrossingValue),weekStartDay:Wo(o,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Bo(r,u),a=_o,Mo<=s?a=So:26784e5<=s?a=Co:To<=s?a=wo:Po<=s&&(a=bo),a):_o),a=Oo[s],p=n.weekStartDay||0,u=Io(f(u)-1,s,p)||d(r),r=zo(f(r)+1,s,p),a=n.majorUnit||ii(le(u.getTime(),r.getTime()),a)/a,h=ii(h=Fo(u,r,s),a)-h,l=Math.floor(h/2),h-=l,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Lo(u,-l,s,p),n.max=n.max||Lo(r,h,s,p),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,o=n,li.call(this,o,i),this.intlService=c,this.seriesMin=t,this.seriesMax=e,o.weekStartDay||0);this.totalMin=f(Io(f(t)-1,o.baseUnit,u)),this.totalMax=f(zo(f(e)+1,o.baseUnit,u))}e(n,{type:F,majorGridLines:{visible:!0,width:1,color:j},labels:{dateFormats:t}});const ui=n;(di=yo)&&(fi.__proto__=di),((fi.prototype=Object.create(di&&di.prototype)).constructor=fi).prototype.clone=function(){return new fi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},fi.prototype.startValue=function(){return this.options.min},fi.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,i=i.max,p=this.lineInfo(),h=p.axis,l=p.axisDir,c=p.lineBox,u=p.lineSize,p=p.lineStart,u=l*(u/(n-r)),n=M(t,e||1),e=M(e,t||1);if(n<=0||e<=0)return null;o&&(n=_(n,a,i),e=_(e,a,i));n=yi(n,s),e=yi(e,s),t=Math.min(n,e)-r,o=Math.max(n,e)-r,a=new B(c.x1,c.y1,c.x1,c.y1);return a[h+1]=ri(p+u*(0<l?t:o)),a[h+2]=ri(p+u*(0<l?o:t)),a},fi.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:T(Math.pow(e,o+s*((i-o)/r)),g)},fi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},fi.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=T(t/(s/(i-o)),g);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},fi.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},fi.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},fi.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 p(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(uo(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),i.visible&&this.traverseMinorTicksPositions(p,i),[]},fi.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){u(t,n)||(r.position=t,s.append(fo(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},fi.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(T(i+r*(a-n),g),e)},fi.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,p=o.step,h=this.logMin,l=this.logMax,c=Math.floor(h);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(T(a+p*(yi(f,s)-h),g),e)}},fi.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 Ke(i,o,t,null,e)},fi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},fi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},fi.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},fi.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=yi(this.options.min,o),r=yi(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),o=Math.pow(o,r-(1-e)*t);return{min:i,max:o=o-i<1e-6?i+1e-6:o}},fi.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,o=this.totalMax;return{min:_(t.min,e,o),max:_(t.max,e,o)}},fi.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,e=e.majorUnit,i=Math.pow(e,t);return{value:i,minorStep:(Math.pow(e,t+1)-i)/o}},fi.prototype.lineInfo=function(){var t=di.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t};var di,t=fi;function fi(t,e,o,i){var r,n,s,a,p,h=x({majorUnit:10,min:t,max:e},o),l=h.majorUnit,c=(c=T(yi(p=e,u=l),g)%1,p<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,yi(p,u)+.2):Math.pow(u,Math.ceil(yi(p,u)))),u=(p=t,s=(u=h).majorUnit,(a=p)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(yi(p,s)))),a),d=(p=u,s=c,a=o,r=(d=h).min,n=d.max,P(d.axisCrossingValue)&&d.axisCrossingValue<=0&&gi(),P(a.max)?a.max<=0&&gi():n=s,P(a.min)?a.min<=0&&gi():r=p,{min:r,max:n});h.max=d.max,h.min=d.min,h.minorUnit=o.minorUnit||T(l-1,g),di.call(this,h,i),this.totalMin=P(o.min)?Math.min(u,o.min):u,this.totalMax=P(o.max)?Math.max(c,o.max):c,this.logMin=T(yi(d.min,l),g),this.logMax=T(yi(d.max,l),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function gi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function yi(t,e){return Math.log(t)/Math.log(e)}e(t,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:j},zIndex:1,_deferLabels:!0});const vi=t,mi={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),Lt(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){i=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,i)},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 b.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new b.drawing.Path(r);i&&(n.radius=i(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,e=this.intervals(e,o,i,r),o=t.options,s=o.visible&&!1!==(o.line||{}).visible;return Ot(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};(xi=qo)&&(_i.__proto__=xi),((_i.prototype=Object.create(xi&&xi.prototype)).constructor=_i).prototype.range=function(){return{min:0,max:this.options.categories.length}},_i.prototype.reflow=function(t){this.box=t,this.reflowLabels()},_i.prototype.lineBox=function(){return this.box},_i.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new B,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()))}},_i.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,p=o||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=T(r,3)%360,i&&u(r,i)||h.push(r);return h},_i.prototype.majorIntervals=function(){return this.intervals(1)},_i.prototype.minorIntervals=function(){return this.intervals(.5)},_i.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},_i.prototype.majorAngles=function(){var e=this;return Ot(this.majorIntervals(),function(t){return e.intervalAngle(t)})},_i.prototype.createLine=function(){return[]},_i.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},_i.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,e=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,e)},_i.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==V)return t=Gt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&u(t,r)?e:i}},_i.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new b.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),a=(r.startAngle+=s*n.angle,Math.ceil(i.to)-i.to),a=(r.angle-=(a+s)*n.angle,be.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},_i.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},_i.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,o=(o.reverse&&!i&&(t=(t+1)%s),n[t=_(Math.floor(t),0,s-1)]),n=(i&&(o-=a/2)<0&&(o+=360),a*(_(Math.ceil(e||t),t,s-1)-t+1));return new ye(r.center(),0,r.height()/2,o,n)},_i.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new b.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},_i.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};var xi,n=_i;function _i(){xi.apply(this,arguments)}e(n,{startAngle:90,labels:{margin:A(10)},majorGridLines:{visible:!0},justified:!0}),x(n.prototype,mi);const bi=n;(wi=yo)&&(Ci.__proto__=wi),((Ci.prototype=Object.create(wi&&wi.prototype)).constructor=Ci).prototype.getDivisions=function(t){return hi.prototype.getDivisions.call(this,t)-1},Ci.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Ci.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 B,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()))}},Ci.prototype.lineBox=function(){return this.box},Ci.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,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&u(h,i)||s.push(h)}return s},Ci.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},Ci.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},Ci.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},Ci.prototype.createLine=function(){return[]},Ci.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},Ci.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,e=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,e)},Ci.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},Ci.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=_(t,o.min,o.max),e=_(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(o=t,t=e,e=o),new ye(i.center(),0,i.height()/2,t,e-t)},Ci.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),t=Math.max(t,e),e=o.reverse?(s=n,t):(s=360-t,360-n),s=(s+i)%360;return new b.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},Ci.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,t=t.y-o.y,o=Math.round(zt(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},Ci.prototype.valueRange=function(){return{min:0,max:2*Math.PI}};var wi,t=Ci;function Ci(t,e){wi.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}e(t,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:A(10)},majorGridLines:{color:j,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(t.prototype,mi,{createPlotBands:bi.prototype.createPlotBands,majorAngles:bi.prototype.majorAngles,range:hi.prototype.range,labelsCount:hi.prototype.labelsCount,createAxisLabel:hi.prototype.createAxisLabel});const Si=t;function ki(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Ai,n={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 b.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new ye(r,r.y-a.y2,r.y-a.y1,0,360),a=e===V?be.current.createRing(a,p):b.drawing.Path.fromPoints(this.plotBandPoints(a,i),p).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new b.geometry.Circle(r,t.innerRadius),s=new b.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(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),Lt(r,this.renderGridLines(t,o,i,e.minorGridLines))),r},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip,s=(void 0===n&&(n=0),i.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new b.geometry.Circle([t.x,t.y],h);if(i.type===V)a.append(new b.drawing.Circle(l,r));else{for(var c=new b.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 e,o,i=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==V&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(zt(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return ki(t,o)-ki(e,o)}),r=90-ki(n[0],n[1])/2,t=180-ki(o,n[0])-r,a=s*(Math.sin(Gt(t))/Math.sin(Gt(r)))),this.axisType().prototype.getValue.call(this,new O(i.x1,i.y2-a))}},t=((Ai=hi)&&(Pi.__proto__=Ai),((Pi.prototype=Object.create(Ai&&Ai.prototype)).constructor=Pi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Pi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Pi.prototype.axisType=function(){return Ai},Pi);function Pi(){Ai.apply(this,arguments)}x(t.prototype,n);const Ti=t;(Mi=vi)&&(Ri.__proto__=Mi),((Ri.prototype=Object.create(Mi&&Mi.prototype)).constructor=Ri).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ri.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ri.prototype.axisType=function(){return Mi};var Mi,Oi,Bi,t=Ri;function Ri(){Mi.apply(this,arguments)}x(t.prototype,n);const Ei=t;function Li(t){return t<=0?-1:1}(Oi=b.Class)&&(zi.__proto__=Oi),((zi.prototype=Object.create(Oi&&Oi.prototype)).constructor=zi).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],p=e[2];for(o.push(new b.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r)return t=this.tangent(s,a,y,v),Ft(o).controlOut(this.firstControlPoint(t,s,a,y,v)),o.push(new b.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v))),o;i?(s=e[r-1],a=e[0],p=e[1],l=(t=this.controlPoints(s,a,p))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var h,l,c=l,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],p=e[u+2],h=this.controlPoints(s,a,p),Ft(o).controlOut(c),c=h[1],h=h[0],o.push(new b.geometry.Segment(a,h)));return i?(s=e[r-2],a=e[r-1],p=e[0],t=this.controlPoints(s,a,p),Ft(o).controlOut(c),o.push(new b.geometry.Segment(a,t[0])),Ft(o).controlOut(t[1]),o.push(new b.geometry.Segment(p,n))):(l=this.tangent(a,p,y,v),Ft(o).controlOut(c),o.push(new b.geometry.Segment(p,this.secondControlPoint(l,a,p,y,v)))),o},zi.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)},zi.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},zi.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||T(i,1)===T(o.y,1)},zi.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},zi.prototype.controlPoints=function(t,e,o){var i,r=y,n=v,s=!1,a=!1,p=(this.isLine(t,e,o)?i=this.tangent(t,e,y,v):(p={x:this.isMonotonicByField(t,e,o,y),y:this.isMonotonicByField(t,e,o,v)}).x&&p.y?(i=this.tangent(t,o,y,v),s=!0):(this.invertAxis(t,e,o)&&(r=v,n=y),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Li((o[n]-t[n])*(e[r]-t[r])):-Li((o[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(i,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(i,e,o,r,n));return s&&(this.restrictControlPoint(t,e,p,i),this.restrictControlPoint(e,o,a,i)),[p,a]},zi.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)},zi.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],e=e[i]-t[i];return 0==o?0:e/o},zi.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},zi.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)},zi.prototype.secondControlPoint=function(t,e,o,i,r){var e=e[i],n=o[i],e=.333*(n-e);return this.point(n-e,o[r]-e*t,i,r)},zi.prototype.point=function(t,e,o,i){var r=new b.geometry.Point;return r[o]=t,r[i]=e,r},zi.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};const Ii=zi;function zi(t){Oi.call(this),this.closed=t}function Vi(t){Bi.call(this),this._axis=t,this.options=t.options}(Bi=b.Class)&&(Vi.__proto__=Bi),((Vi.prototype=Object.create(Bi&&Bi.prototype)).constructor=Vi).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Vi.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Vi.prototype.range=function(){return this._axis.range()},Vi.prototype.valueRange=function(){return this._axis.valueRange()};const ji=Vi;function Di(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new ji(e[o])}function Hi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}var Ui;Hi.prototype.findAxisByName=function(t){return Di(t,this._pane.axes)};const Fi=Hi,Ni=((Ui=b.Class)&&(Gi.__proto__=Ui),(Gi.prototype=Object.create(Ui&&Ui.prototype)).constructor=Gi);function Gi(t){Ui.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Wi(t){for(var e=t.length,o=0,i=0;i<e;i++)m(t[i])&&o++;return o}var Xi={min:function(t){for(var e=t.length,o=q,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.min(o,r))}return o===q?t[0]:o},max:function(t){for(var e=t.length,o=Y,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.max(o,r))}return o===Y?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];m(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Wi(t)?Xi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&P(r)&&o++}return o},avg:function(t){var e=Wi(t),o=t[0];return o=0<e?Xi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&P(i))return i}return t[0]}};const qi=Xi;function Yi(t,e){return null===e?e:wt(t)(e)}(Zi=b.Class)&&(Qi.__proto__=Zi),((Qi.prototype=Object.create(Zi&&Zi.prototype)).constructor=Qi).prototype.register=function(t,e,o){void 0===e&&(e=[tt]),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)}},Qi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Qi.prototype.valueFields=function(t){return this._valueFields[t.type]||[tt]},Qi.prototype.otherFields=function(t){return this._otherFields[t.type]||[tt]},Qi.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=P(o)?o:a[e],a={valueFields:{value:o}},e=this.valueFields(t),p=this._otherFields[t.type];return null===o?i=this._nullValue[t.type]:P(o)?Array.isArray(o)?(r=o.slice(e.length),i=this._bindFromArray(o,e),r=this._bindFromArray(r,p)):"object"==typeof o&&(n=this.sourceFields(t,e),s=this.sourceFields(t,p),i=this._bindFromObject(o,e,n),r=this._bindFromObject(o,p,s)):i=this._undefinedValue[t.type],P(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Qi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Qi.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},Qi.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]=Yi(a,t))}return i},Qi.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===tt?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o};var Zi,n=Qi;function Qi(){Zi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}n.current=new n;const Ki=n;var $i,Ji=/percent(?:\w*)\((\d+)\)/,tr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");($i=b.Class)&&(or.__proto__=$i),((or.prototype=Object.create($i&&$i.prototype)).constructor=or).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,p=tr.exec(t);p?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),p=p[1]?parseFloat(p[1]):1,n={low:i.value-r*p,high:i.value+r*p},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}})},or.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ki.current,n=r.valueFields(t),i=P(i[0])?i[0]:{};return ot(i)?o=wt("["+(e?n.indexOf(e):0)+"]"):m(i)?o=wt():typeof i==Q&&(o=wt(r.sourceFields(t,n)[n.indexOf(e)])),o},or.prototype.getErrorRange=function(t,e){var o;if(!P(e))return null;if(this.globalRange)return this.globalRange(t);if(ot(e))i=t-e[0],r=t+e[1];else if(m(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Ji.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(o[1])/100),i=t-Math.abs(e),r=t+Math.abs(e)}return{low:i,high:r}},or.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},or.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]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},or.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(o+=n,i++)}return{value:o/i,count:i}};const er=or;function or(t,e,o){$i.call(this),this.initGlobalRanges(t,e,o)}var ir,rr,t=b.support.browser||{},nr=600,sr="fadeIn",ar=t.msie?.001:0,pr="zero",hr="interpolate",lr="above",cr="below",ur="smooth",dr="step",fr="area",gr="bar",yr="boxPlot",vr="bubble",mr="bullet",xr="candlestick",_r="column",br="donut",wr="funnel",Cr="heatmap",Sr="horizontalWaterfall",kr="line",Ar="ohlc",Pr="pie",Tr="polarArea",Mr="polarLine",Or="polarScatter",Br="radarArea",Rr="radarColumn",Er="radarLine",Lr="rangeArea",Ir="rangeBar",zr="rangeColumn",Vr="scatter",jr="scatterLine",Dr="verticalArea",Hr="verticalBoxPlot",Ur="verticalBullet",Fr="verticalLine",Nr="verticalRangeArea",Gr="waterfall",Wr=[gr,_r,Ar,xr,yr,Hr,mr,zr,Ir,Gr,Sr],Xr="seriesHover",qr="plotAreaHover",Yr="plotAreaLeave",Zr="drag",Qr="dragEnd",Kr="dragStart",$r="zoomStart",Jr="zoom",tn="zoomEnd",en="selectStart",on="select",rn="selectEnd",nn="showTooltip",sn="hideTooltip",an="log",n="category",pn="insideEnd",hn="outsideEnd",ln="DOMMouseScroll mousewheel",t=((ir=o)&&(cn.__proto__=ir),((cn.prototype=Object.create(ir&&ir.prototype)).constructor=cn).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,i),s=i?n.x:n.y,a=s-t,s=s+t;i?(e=[new O(n.x,r.y1),new O(n.x,r.y2)],o&&e.push(new O(a,r.y1),new O(s,r.y1),new O(a,r.y2),new O(s,r.y2)),this.box=new B(a,r.y1,s,r.y2)):(e=[new O(r.x1,n.y),new O(r.x2,n.y)],o&&e.push(new O(r.x1,a),new O(r.x1,s),new O(r.x2,a),new O(r.x2,s)),this.box=new B(r.x1,a,r.x2,s)),this.linePoints=e},cn.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},cn.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()},cn.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};ir.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new b.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);st(r),this.visual.append(r)}},cn);function cn(t,e,o,i,r,n){ir.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}e(t,{animation:{type:sr,delay:nr},endCaps:!0,line:{width:2},zIndex:1});const un=t;function dn(){rr.apply(this,arguments)}(rr=un)&&(dn.__proto__=rr),((dn.prototype=Object.create(rr&&rr.prototype)).constructor=dn).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const fn=dn;function gn(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,p=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!u(r,o.excluded)&&t.hasOwnProperty(r)&&(lt(n=t[r])?(p=!0,i||(t[r]=M(n(e),s[r]))):ut(n)&&(i||(o.defaults=s[r]),o.depth++,p=gn(n,e,o,i)||p,o.depth--));return p}function yn(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}(vn=o)&&(p.__proto__=vn),((p.prototype=Object.create(vn&&vn.prototype)).constructor=p).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},p.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{vertical:!this.options.invertAxes},t)),i},p.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,p=o[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||m(p.value)&&(r+=Math.abs(p.value),i.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},p.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 p=o[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===J&&h!==l)continue;if(h.group&&h.group!==l.group)continue}h=this.plotValue(p);(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,ht(t.value)?t.value:e]},p.prototype.stackLimits=function(t,e){for(var o=q,i=Y,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],P(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},p.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,p=i[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,qt(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,qt(n.positive).max))),p.min!==q||p.max!==Y?i[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},p.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,e=e.fields.errorHigh;m(p)&&m(e)?i={low:p,high:e}:a&&P(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new er(a.value,n,tt),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},p.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},o={categoryIx:e,series:n}),this.updateRange({value:a},o)),new fn(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},p.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,t=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<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:i,high:t}},p.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o],s=(n||(this.categoryPoints[o]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,P(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)},p.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],n=(P(a)||(this._evalSeries[n]=a=gn(t,{},s,!0)),t);return a&&gn(n=x({},n),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},p.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,o=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((o=this.valueAxisRanges[e]=o||{min:q,max:Y}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},p.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},p.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o,i=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=p[l++],n=a[i];n||(a[i]=n=s.categorySlot(h,i,e)),r&&(i=s.plotRange(r,e.startValue()),(o=s.valueSlot(e,i))?(n=s.pointSlot(n,o),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=i[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},p.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},p.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Ft(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},p.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},p.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},p.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},p.prototype.reflowPoint=function(t,e){t.reflow(e)},p.prototype.reflowCategories=function(){},p.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new B(i.x1,o.y1,i.x2,o.y2)},p.prototype.categorySlot=function(t,e){return t.getSlot(e)},p.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=yn(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],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},p.prototype._outOfRangeCallback=function(t,e,o,i){var r,e=t[e];e&&(r=e.categoryIx,i(this._bindPoint(t,o,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:o,dataItem:e.item}))},p.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]=Ki.current.bindPoint(t,o,i))},p.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},p.prototype.pointValue=function(t){return t.valueFields.value};var vn,t=p;function p(t,e){vn.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()}e(t,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const mn=t,xn={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger(Xr,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:Ht(t),originalEvent:t,point:this}}},_n={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&P(e)&&null!==e&&(this.note=new to({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};(bn=o)&&(wn.__proto__=bn),((wn.prototype=Object.create(bn&&bn.prototype)).constructor=wn).prototype.render=function(){var t,e,o=this.options,i=o.markers,o=o.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(i=xt(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new We(e,x({align:w,vAlign:w,margin:{left:5,right:5},zIndex:M(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},wn.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return P(t.color)||(t.color=new b.Color(e).brightness(.8).toHex()),t},wn.prototype.createVisual=function(){},wn.prototype.createMarker=function(){var t=this.options.markers;return new Me({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:M(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},wn.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},wn.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical,r=(this.render(),(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&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(i=t.center(),t=new B(i.x,i.y,i.x,i.y)),this.note.reflow(t))},wn.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e=(e=e===lr?k:e)===cr?D:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},wn.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),i=new Me({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:M(t.border.opacity,1)},opacity:M(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},wn.prototype.highlightVisual=function(){return(this.marker||{}).visual},wn.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,o=this.box.center(),i=new b.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},wn.prototype.tooltipAnchor=function(){var t,e=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(e))return o=e.x2+5,e=this.aboveAxis?(t=e.y1,D):(t=e.y2,k),{point:new O(o,t),align:{horizontal:"left",vertical:e}}},wn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},wn.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},wn.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},wn.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}};var bn,t=wn;function wn(t,e){bn.call(this),this.value=t,this.options=e,this.aboveAxis=M(this.options.aboveAxis,!0),this.tooltipTracking=!0}t.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,position:lr,margin:A(3),padding:A(4),animation:{type:sr,delay:nr}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},x(t.prototype,xn),x(t.prototype,_n);const Cn=t;(Sn=o)&&(kn.__proto__=Sn),((kn.prototype=Object.create(Sn&&Sn.prototype)).constructor=kn).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},kn.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},kn.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&&!P(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},kn.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(lt(o)&&i&&(o=i.color),b.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&i.close(),this.visual=i},kn.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)};var Sn,t=kn;function kn(t,e,o){Sn.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}e(t,{closed:!1});const An=t;function Pn(t,e,o,i,r){var t=t.box,n=new b.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var Tn,Mn,t={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?y:v,n=i?v:y,s=e?2:1,a=s,p=Pn(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=Pn(t[l],r,s,n,a);p[r]!==u[r]&&((c=new b.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return o?p!==Ft(h)&&h.push(p):h.push(Pn(Ft(t),r,s,n,e?1:2)),h}},On=((Tn=An)&&(Bn.__proto__=Tn),((Bn.prototype=Object.create(Tn&&Tn.prototype)).constructor=Bn).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Bn);function Bn(){Tn.apply(this,arguments)}x(On.prototype,t);const Rn=On;function En(){Mn.apply(this,arguments)}(Mn=An)&&(En.__proto__=Mn),((En.prototype=Object.create(Mn&&Mn.prototype)).constructor=En).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(lt(o)&&e&&(o=e.color),new Ii(this.options.closed).process(this.points())),o=new b.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});o.segments.push.apply(o.segments,e),this.visual=o};const Ln=En;var In,On={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]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==hr&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(t=this.createSegment(h,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||hr},getNearestPoint:function(t,e,o){for(var i,r=new O(t,e),n=this.seriesPoints[o],s=q,a=0;a<n.length;a++){var p,h=n[a];h&&P(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(i=h,s=p))}return i}},h=((In=b.drawing.Animation)&&(zn.__proto__=In),((zn.prototype=Object.create(In&&In.prototype)).constructor=zn).prototype.setup=function(){this._setEnd(this.options.box.x1)},zn.prototype.step=function(t){var e=this.options.box;this._setEnd(Pt(e.x1,e.x2,t))},zn.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)},zn);function zn(){In.apply(this,arguments)}e(h,{duration:nr}),b.drawing.AnimationFactory.current.register("clip",h);const Vn=h;function jn(t){for(var e=0;e<t.length;e++)if(P(t[e].zIndex))return!0}var Dn,Hn,h={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=b.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Vn(t,{box:e}),jn(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&P(i.visual.options.zIndex)&&i.visual.clip(t)}}},l=((Dn=mn)&&(Un.__proto__=Dn),((Un.prototype=Object.create(Dn&&Dn.prototype)).constructor=Un).prototype.render=function(){Dn.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Un.prototype.pointType=function(){return Cn},Un.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.seriesMissingValues(r),s=t.valueFields.value;if(!P(s)||null===s){if(n!==pr)return null;s=0}n=this.pointOptions(r,e),n=this.evalPointOptions(n,s,i,o,r,e),i=t.fields.color||r.color,lt(r.color)&&(i=n.color),o=new Cn(s,n);return o.color=i,this.append(o),o},Un.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]},Un.prototype.createSegment=function(t,e,o){var i=e.style;return new(i===dr?Rn:i===ur?Ln:An)(t,e,o)},Un.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)},Un.prototype.supportsPointInactiveOpacity=function(){return!1},Un);function Un(){Dn.apply(this,arguments)}x(l.prototype,On,h);const Fn=l;function Nn(t,e,o,i,r){Hn.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}(Hn=An)&&(Nn.__proto__=Hn),((Nn.prototype=Object.create(Hn&&Hn.prototype)).constructor=Nn).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;lt(i)&&e&&(i=e.color),this.visual=new b.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:x({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 b.geometry.Segment(t)})},Nn.prototype.createStroke=function(t){t=new b.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=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),Lt(o,r)),new b.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Nn.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(i),i=i.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=Ft(e).anchor(),i=o?i.x1:i.y1;o?t.lineTo(i,e.y).lineTo(i,r.y):t.lineTo(e.x,i).lineTo(r.x,i)};const Gn=Nn;(Wn=Gn)&&(Zn.__proto__=Wn),((Zn.prototype=Object.create(Wn&&Wn.prototype)).constructor=Zn).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Zn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()};var Wn,Xn,qn,Yn,l=Zn;function Zn(){Wn.apply(this,arguments)}x(l.prototype,t);const Qn=l;function Kn(){Xn.apply(this,arguments)}(Xn=Gn)&&(Kn.__proto__=Xn),((Kn.prototype=Object.create(Xn&&Xn.prototype)).constructor=Kn).prototype.createStrokeSegments=function(){var t=new Ii(this.options.closed),e=this.points();return t.process(e)},Kn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new b.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e};const $n=Kn;function Jn(){qn.apply(this,arguments)}(qn=Fn)&&(Jn.__proto__=qn),((Jn.prototype=Object.create(qn&&qn.prototype)).constructor=Jn).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(a===dr?Qn:a===ur?$n:Gn)(t,e,o,r,n)},Jn.prototype.reflow=function(t){qn.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)}},Jn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?(o!==dr&&r<p&&!i[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),o!==dr&&p+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},Jn.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},Jn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Cn(0,e);return e.categoryIx=t,e.series={},e},Jn.prototype.seriesMissingValues=function(t){return t.missingValues||pr},Jn.prototype.supportsPointInactiveOpacity=function(){return!1};const ts=Jn;function es(){Yn.call(this),this.axisRanges={}}(Yn=b.Class)&&(es.__proto__=Yn),((es.prototype=Object.create(Yn&&Yn.prototype)).constructor=es).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:q,max:Y},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},es.prototype.reset=function(t){this.axisRanges[t]=void 0},es.prototype.query=function(t){return this.axisRanges[t]};const os=es;(is=o)&&(rs.__proto__=is),((rs.prototype=Object.create(is&&is.prototype)).constructor=rs).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},rs.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,p=t;n.align=o?w:C,n.vAlign=o?k:w,e.position===pn?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=D)):n.align=i?S:C:e.position===w?(n.vAlign=w,n.align=w):"insideBase"===e.position?o?n.vAlign=i?D:k:n.align=i?C:S:e.position===hn&&(p=o?i?new B(t.x1,t.y1-s.height(),t.x2,t.y1):new B(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=w,i?new B(t.x2,t.y1,t.x2+s.width(),t.y2):new B(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},rs.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,o=e+"1",e=e+"2",i=this.children[0],r=this.parent.box;(r[o]<t[o]||t[e]<r[e])&&((i=i.paddingBox.clone())[o]=Math.max(r[o],t[o]),i[e]=Math.min(r[e],t[e]),this.reflow(i))};var is,l=rs;function rs(t,e,o){is.call(this,e),this.textBox=new We(t,this.options,o),this.append(this.textBox)}e(l,{position:hn,margin:A(3),padding:A(4),color:j,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:sr,delay:nr},zIndex:2});const ns=l;function ss(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}(as=o)&&(ps.__proto__=as),((ps.prototype=Object.create(as&&as.prototype)).constructor=ps).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},ps.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=xt(i))?e(t):this.formatValue(i.format),this.label=new ns(e,x({vertical:o.vertical},i),t),this.append(this.label))},ps.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ps.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)},ps.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(as.prototype.createVisual.call(this),i?(i=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 b.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},ps.prototype.createRect=function(t){var e=this.options,o=e.border,i=(P(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=b.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)&&(st(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),ss(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},ps.prototype.createHighlight=function(t){return st(b.drawing.Path.fromRect(this.box.toRect(),t))},ps.prototype.highlightVisual=function(){return this.rectVisual},ps.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},ps.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=P(e)?e:new b.Color(t).brightness(o).toHex()},ps.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=C,h=k;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),h=D)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(h=D,t=s?(p=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,p=S),Math.max(n.y1,a.y1))),{point:new O(t,i),align:{horizontal:p,vertical:h}}},ps.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ps.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}};var as,l=ps;function ps(t,e){as.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=M(this.options.aboveAxis,!0),this.value=t}x(l.prototype,xn),x(l.prototype,_n),l.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};const hs=l;function ls(t,e){t.forEach(e)}function cs(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}(us=o)&&(ds.__proto__=us),((ds.prototype=Object.create(us&&us.prototype)).constructor=ds).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+o+r*(n-1),p=(e?i.height():i.width())/a,h=i[s+1]+o/2*p;this.forEach(t,function(t,e){var o=(t.box||i).clone();o[s+1]=h,o[s+2]=h+p,t.reflow(o),e<n-1&&(h+=p*r),h+=p})};var us,l=ds;function ds(t){us.call(this,t),this.forEach=t.rtl?cs:ls}e(l,{vertical:!1,gap:0,spacing:0});const fs=l;(gs=o)&&(ys.__proto__=gs),((ys.prototype=Object.create(gs&&gs.prototype)).constructor=ys).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,o=this.children,i=o.length,r=this.box=new B,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))}};var gs,l=ys;function ys(){gs.apply(this,arguments)}e(l,{vertical:!0});const vs=l;(ms=mn)&&(xs.__proto__=ms),((xs.prototype=Object.create(ms&&ms.prototype)).constructor=xs).prototype.render=function(){ms.prototype.render.call(this),this.updateStackRange()},xs.prototype.pointType=function(){return hs},xs.prototype.clusterType=function(){return fs},xs.prototype.stackType=function(){return vs},xs.prototype.stackLimits=function(t,e){return ms.prototype.stackLimits.call(this,t,e)},xs.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,s=this.children,a=n.isStacked,p=this.pointValue(t),h=this.pointOptions(r,e),l=h.labels,l=(a&&l.position===hn&&(l.position=pn),h.isStacked=a,t.fields.color||r.color),t=(p<0&&h.negativeColor&&(l=h.negativeColor),h=this.evalPointOptions(h,p,i,o,r,e),lt(r.color)&&(l=h.color),new(this.pointType())(p,h)),i=(t.color=l,s[o]);return i||(i=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),(a?this.getStackWrap(r,i):i).append(t),t},xs.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===J){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},xs.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(o=o.getSlot(e,e,!0),t[(e=i.invertAxes?y:v)+1]=t[e+2]=o[e+1]),t},xs.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},xs.prototype.createAnimation=function(){this._setAnimationOptions(),ms.prototype.createAnimation.call(this),jn(this.options.series)&&this._setChildrenAnimation()},xs.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&P(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},xs.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 b.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes};var ms,l=xs;function xs(){ms.apply(this,arguments)}e(l,{animation:{type:gr}});const _s=l;(bs=o)&&(ws.__proto__=bs),((ws.prototype=Object.create(bs&&bs.prototype)).constructor=ws).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=e.getSlot(o.open,o.close),e=e.getSlot(o.low,o.high),o=(i.x1=e.x1=t.x1,i.x2=e.x2=t.x2,this.realBody=i,e.center().x),t=[];t.push([[o,e.y1],[o,i.y1]]),t.push([[o,i.y2],[o,e.y2]]),this.lines=t,this.box=e.clone().wrap(i),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},ws.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},ws.prototype.createVisual=function(){bs.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},ws.prototype.mainVisual=function(t){var e=new b.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},ws.prototype.createBody=function(t,e){var o=b.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:M(e.border.opacity,e.opacity)}),st(o),t.append(o),ss(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},ws.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},ws.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:M(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=b.drawing.Path.fromPoints(o[n],r);st(s),t.append(s)}},ws.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=P(e)?e:new b.Color(this.color).brightness(t._brightness).toHex()},ws.prototype.createOverlay=function(){var t=b.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},ws.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(x({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},ws.prototype.highlightVisual=function(){return this._mainVisual},ws.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},ws.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new O(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},ws.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ws.prototype.overlapsBox=function(t){return this.box.overlaps(t)};var bs,l=ws;function ws(t,e){bs.call(this,e),this.value=t}e(l,{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:{}}}),x(l.prototype,xn),x(l.prototype,_n);const Cs=l;function Ss(t){return Wi(t)===t.length}(ks=mn)&&(As.__proto__=ks),((As.prototype=Object.create(ks&&ks.prototype)).constructor=As).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},As.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Ss(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new fs({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.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)},As.prototype.pointType=function(){return Cs},As.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.pointType(),s=t.valueFields,a=x({},r),p=t.fields.color||r.color,a=this.evalPointOptions(a,s,i,o,r,e),i=(r.type===xr&&s.open>s.close&&(p=t.fields.downColor||r.downColor||r.color),lt(r.color)&&(p=a.color),a.vertical=!this.options.invertAxes,new n(s,a));return i.color=p,i},As.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},As.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:q,max:Y};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},As.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)},As.prototype.animationPoints=function(){return this.points};var ks,l=As;function As(){ks.apply(this,arguments)}x(l.prototype,h);const Ps=l;(Ts=Cs)&&(Rs.__proto__=Ts),((Rs.prototype=Object.create(Ts&&Ts.prototype)).constructor=Rs).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,i=this.owner.seriesValueAxis(i),n=(this.boxSlot=o=i.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=i.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),i.getSlot(r.median));r.mean&&(i=i.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,i)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(o),this.reflowNote()},Rs.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Rs.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Rs.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rs.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]]]},Rs.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rs.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],p=x({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),p=(P(p.color)||(P(this.color)?p.color=this.color:p.color=new b.Color(e.background).brightness(.8).toHex()),new Me({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:p,opacity:e.opacity}));p.value=a,n.push(p)}return this.reflowOutliers(n),n},Rs.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)}},Rs.prototype.mainVisual=function(t){for(var e=Ts.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},Rs.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)},Rs.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Ts.prototype.getBorderColor.call(this)};var Ts,Ms,Os,Bs,l=Rs;function Rs(t,e){Ts.call(this,t,e),this.createNote()}e(l,{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:U,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:H,background:a,border:{width:2,opacity:1},opacity:0}}),x(l.prototype,xn);const Es=l;function Ls(){Ms.apply(this,arguments)}(Ms=Es)&&(Ls.__proto__=Ms),((Ls.prototype=Object.create(Ms&&Ms.prototype)).constructor=Ls).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Ls.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Ls.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ls.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]]]},Ls.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const Is=Ls;function zs(){Os.apply(this,arguments)}(Os=Ps)&&(zs.__proto__=Os),((zs.prototype=Object.create(Os&&Os.prototype)).constructor=zs).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Ss(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new fs({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.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)},zs.prototype.pointType=function(){return this.options.invertAxes?Is:Es},zs.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},zs.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));P(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:q,max:Y},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},zs.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)},zs.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];P(r)&&null!==r&&o.push(r)}return o},zs.prototype.supportsPointInactiveOpacity=function(){return!1};const Vs=zs;function js(){Bs.apply(this,arguments)}(Bs=un)&&(js.__proto__=Bs),((js.prototype=Object.create(Bs&&Bs.prototype)).constructor=js).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const Ds=js;function Hs(t){return P(t)&&null!==t}(Us=o)&&(Fs.__proto__=Us),((Fs.prototype=Object.create(Us&&Us.prototype)).constructor=Fs).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Fs.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Fs.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,p=t.options.errorBars,h=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];m(r)&&(m(h)&&m(o)&&(i={low:h,high:o}),p&&P(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new er(p[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),i&&this.addPointErrorBar(i,t,e))},Fs.prototype.addPointErrorBar=function(t,e,o){var i=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=o===v,a={},s=(e[o+"Low"]=i,e[o+"High"]=t,e.errorBars=e.errorBars||[],new Ds(i,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[o]=i,this.updateRange(a,r),a[o]=t,this.updateRange(a,r)},Fs.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=Hs(i)&&Hs(r)?t:this.createMissingValue(t,s))&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,y,e),this.addErrorBar(o,v,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},Fs.prototype.seriesMissingValues=function(t){return t.missingValues},Fs.prototype.createMissingValue=function(){},Fs.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[i],s=this.yAxisRanges[e];Hs(r)&&(n=this.xAxisRanges[i]=n||{min:q,max:Y},pt(r)&&(r=No(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Hs(t)&&(s=this.yAxisRanges[e]=s||{min:q,max:Y},pt(t)&&(t=No(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Fs.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],r=(P(s)||(this._evalSeries[r]=s=gn(t,{},n,!0)),t);return s&&gn(r=x({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Fs.prototype.pointType=function(){return Cn},Fs.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},Fs.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=(lt(o.color)&&(r=i.color),new Cn(t,i));return e.color=r,this.append(e),e},Fs.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{x:i,y:o};throw new Error("Unable to locate Y axis with name "+t)},Fs.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++],e=r.seriesAxes(e.series),i=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);o&&(i&&e?(t=r.pointSlot(i,e),o.reflow(t)):o.visible=!1)}),this.box=t},Fs.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},Fs.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,x({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},Fs.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Fs.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var Us,l=Fs;function Fs(t,e){Us.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(l,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(l.prototype,h,{_bindPoint:mn.prototype._bindPoint});const Ns=l;(Gs=Cn)&&(Ws.__proto__=Gs),((Ws.prototype=Object.create(Gs&&Gs.prototype)).constructor=Ws).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 b.drawing.Group,s=new b.drawing.Circle(new b.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}]})}),i=new b.drawing.Circle(new b.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new b.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,i),n};var Gs,l=Ws;function Ws(t,e){Gs.call(this,t,e),this.category=t.category}l.prototype.defaults=x({},l.prototype.defaults,{labels:{position:w},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),l.prototype.defaults.highlight.zIndex=void 0;const Xs=l;(qs=Ns)&&(Ys.__proto__=qs),((Ys.prototype=Object.create(qs&&qs.prototype)).constructor=Ys).prototype._initFields=function(){this._maxSize=Y,qs.prototype._initFields.call(this)},Ys.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)),qs.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Ys.prototype.reflow=function(t){this.updateBubblesSize(t),qs.prototype.reflow.call(this,t)},Ys.prototype.pointType=function(){return Xs},Ys.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,i=e.pointIx*(nr/i),r={delay:i,duration:nr-i,type:vr},n=e.color||o.color,i=(t.size<0&&o.negativeValues.visible&&(n=M(o.negativeValues.color,n)),x({labels:{animation:{delay:i,duration:nr-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:H,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(lt(o.color)&&(n=i.color),i.markers.background=n,new Xs(t,i));return r.color=n,this.append(r),r},Ys.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,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*h,c=Math.sqrt((p+c)/Math.PI),u=M(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Ys.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},Ys.prototype.createAnimation=function(){},Ys.prototype.createVisual=function(){};var qs,l=Ys;function Ys(){qs.apply(this,arguments)}e(l,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const Zs=l;(Qs=Me)&&(Ks.__proto__=Qs);var Qs,l=(Ks.prototype=Object.create(Qs&&Qs.prototype)).constructor=Ks;function Ks(){Qs.apply(this,arguments)}x(l.prototype,xn);const $s=l;(Js=o)&&(ta.__proto__=Js),((ta.prototype=Object.create(Js&&Js.prototype)).constructor=ta).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,P(this.value.target)&&(this.target=new $s({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:k,align:S}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},ta.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),i=i.categorySlot(i.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:i,i=r?i:n;o&&(n=new B(s.x1,i.y1,s.x2,i.y2),o.options.height=r?n.height():e.target.line.width,o.options.width=r?e.target.line.width:n.width(),o.reflow(n)),this.note&&this.note.reflow(t),this.box=t},ta.prototype.createVisual=function(){Js.prototype.createVisual.call(this);var t=this.options,e=b.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:M(t.border.opacity,t.opacity)}),st(this.bodyVisual=e),this.visual.append(e)},ta.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=b.drawing.Animation.create(this.bodyVisual,this.options.animation))},ta.prototype.createHighlight=function(t){return b.drawing.Path.fromRect(this.box.toRect(),t)},ta.prototype.highlightVisual=function(){return this.bodyVisual},ta.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ta.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)};var Js,l=ta;function ta(t,e){Js.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}l.prototype.tooltipAnchor=hs.prototype.tooltipAnchor,e(l,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),x(l.prototype,xn),x(l.prototype,_n);const ea=l;(oa=mn)&&(ia.__proto__=oa),((ia.prototype=Object.create(oa&&oa.prototype)).constructor=ia).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ia.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ia.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,s=this.children,a=t.valueFields,p=x({vertical:!n.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:n.invertAxes},r),t=t.fields.color||r.color,p=this.evalPointOptions(p,a,i,o,r,e),i=(lt(r.color)&&(t=p.color),new ea(a,p)),e=(i.color=t,s[o]);return e||(e=new fs({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),e.append(i),i},ia.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];P(o)&&!isNaN(o)&&P(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:q,max:Y}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},ia.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ia.prototype.pointValue=function(t){return t.valueFields.current},ia.prototype.aboveAxis=function(t){return 0<t.value.current},ia.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()}};var oa,l=ia;function ia(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||ot(n[0])||ut(n[0])||(r.data=[n])}oa.call(this,t,e)}l.prototype._setAnimationOptions=_s.prototype._setAnimationOptions,e(l,{animation:{type:gr}});const ra=l;(na=b.Class)&&(sa.__proto__=na),((sa.prototype=Object.create(na&&na.prototype)).constructor=sa).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=M(o,e),i=M(i,e)),A(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:dt(t.border.width),paddingTop:dt(e.top),paddingBottom:dt(e.bottom),paddingLeft:dt(e.left),paddingRight:dt(e.right)}},sa.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new b.Color(o.backgroundColor);P(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(nn,t),this.visible=!0},sa.prototype.hide=function(){this.chartService&&this.chartService.notify(sn),this.visible=!1},sa.prototype.destroy=function(){delete this.chartService};var na,l=sa;function sa(t,e){na.call(this),this.chartService=t,this.options=x({},this.options,e)}e(l,{border:{width:1},opacity:1});(aa=l)&&(pa.__proto__=aa),((pa.prototype=Object.create(aa&&aa.prototype)).constructor=pa).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},pa.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===F&&(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)},pa.prototype.hide=function(){this.chartService.notify(sn,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},pa.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,i=i.padding,n=!o.axis.options.vertical,o=o.line.bbox(),n=n?(t=w,r===D?(e=k,o.bottomLeft().translate(0,i)):(e=D,o.topLeft().translate(0,-i))):(e=w,r===C?(t=S,o.topLeft().translate(-i,0)):(t=C,o.topRight().translate(i,0)));return{point:n,align:{horizontal:t,vertical:e}}};var aa,c=pa;function pa(t,e,o){aa.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}e(c,{padding:10});const ha=c;(la=o)&&(ca.__proto__=la),((ca.prototype=Object.create(la&&la.prototype)).constructor=ca).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},ca.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},ca.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?v:y,n=new b.geometry.Point(i.x1,i.y1),o=o?new b.geometry.Point(i.x2,i.y1):new b.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)},ca.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},ca.prototype.createVisual=function(){la.prototype.createVisual.call(this);var t=this.options;this.line=new b.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},ca.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),la.prototype.destroy.call(this)};var la,c=ca;function ca(t,e,o){la.call(this,o),this.axis=e,this.stickyMode=e instanceof qo;o=this.options.tooltip;o.visible&&(this.tooltip=new ha(t,this,x({},o,{stickyMode:this.stickyMode})))}e(c,{color:j,width:2,zIndex:-1,tooltip:{visible:!1}});const ua=c;(da=o)&&(fa.__proto__=da),((fa.prototype=Object.create(da&&da.prototype)).constructor=fa).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},fa.prototype._clipBox=function(){return this.pane.chartsBox()},fa.prototype.createVisual=function(){var t;this.visual=new b.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),st(t=b.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},fa.prototype.stackRoot=function(){return this},fa.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)))}},fa.prototype.destroy=function(){da.prototype.destroy.call(this),delete this.parent};var da,c=fa;function fa(t,e){da.call(this,t),this.pane=e}c.prototype.isStackRoot=!0;const ga=c;(ya=Ae)&&(ma.__proto__=ya),((ma.prototype=Object.create(ya&&ya.prototype)).constructor=ma).prototype.createTitle=function(){var t=this.options.title;ut(t)&&(t=x({},t,{align:t.position,position:k})),this.title=Ye.buildTitle(t,this,ma.prototype.options.title)},ma.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},ma.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},ma.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},ma.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=[]},ma.prototype.reflow=function(t){var e;Ft(this.children)===this.content&&(e=this.children.pop()),ya.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},ma.prototype.visualStyle=function(){var t=ya.prototype.visualStyle.call(this);return t.zIndex=-10,t},ma.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},ma.prototype.stackRoot=function(){return this},ma.prototype.clipRoot=function(){return this},ma.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,p=a?i:r,h=0;h<o.length;h++)0!==p.length||a!==(t=o[h]).options.vertical&&Lt(p,s.createGridLines(t))},ma.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()},ma.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new B,i=0;i<e;i++){var r=t[i],n=r.options.vertical?v:y,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,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),o.x1=h.x1,o.x2=h.x2)}return o},ma.prototype.clipBox=function(){return this.chartContainer.clipBox},ma.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Fi(this),index:this.paneIndex,name:this.options.name})};var ya,c=ma,va=1;function ma(t){ya.call(this,t),this.id="pane"+va++,this.createTitle(),this.content=new o,this.chartContainer=new ga({},this),this.append(this.content),this.axes=[],this.charts=[]}c.prototype.isStackRoot=!0,e(c,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const xa=c;function _a(t,e){null!==e&&t.push(e)}function ba(t,e,o){e=e.visible;if(P(e))return e;e=t.pointVisibility;return e?e[o]:void 0}function wa(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Ki.current.bindPoint(t,n),a=s.valueFields.value;m(a=pt(a)?parseFloat(a):a)?(s.visible=!1!==ba(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 Ca(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Sa(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,i)&&o.push(n)}return o}function ka(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=No(o,wt(t)(e)),e[i]=r),r}function Aa(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ca(t,F)}function Pa(t){return 1===t.length?t[0]:t}var Ta=/area/i;function Ma(t,e){var o,i=Ki.current.bindPoint(t,null,e).valueFields;for(o in i)if(ht(i[o]))return!0}function Oa(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=i;p(l+=r)&&(e=Ma(h,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Ba(t,e,o,i,r){var n,s,a,p,h=e.min,e=e.max,l=0<h&&h<o,c=e+1<o;(l||c)&&(((p=t).missingValues||(Ta.test(p.type)||p.stack?pr:hr))!==hr?(l&&(n=i(h-1)),c&&(s=i(e+1))):(l&&(n=Ma(t,(a=i(h-1)).item)?a:Oa({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Ma(t,(a=i(e+1)).item)?a:Oa({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}(Ra=o)&&(R.__proto__=Ra),((R.prototype=Object.create(Ra&&Ra.prototype)).constructor=R).prototype.initFields=function(){},R.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},R.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=x({title:{color:t.color}},e),s=0;s<i;s++){var a=x({},n,o[s]),a=(pt(a.title)&&(a.title=x({text:a.title},n.title)),new xa(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},R.prototype.crosshairOptions=function(t){return t.options.crosshair},R.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&&(r=new ua(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},R.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}},R.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},R.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]},R.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},R.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},R.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},R.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},R.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},R.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 p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&xt(n)||xt(i))&&(p=l({text:Hs(p)?p:"",series:u})),l=u._defaults,l=void(lt(h=u.color)&&l&&(h=l.color)),c=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Hs(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}Lt(o.items,s)},R.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)}},R.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},R.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},R.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=A(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},R.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),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()},R.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},R.prototype.alignAxisTo=function(t,e,o,i){var o=t.getSlot(o,o,!0),r=t.options.reverse?2:1,i=e.getSlot(i,i,!0),n=e.options.reverse?2:1,i=t.box.translate(i[y+n]-o[y+r],i[v+n]-o[v+r]);t.pane!==e.pane&&i.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(i)},R.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={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,u=La(t,u)||o,g=r;u!==o&&(g=this.axisCrossingValues(u,e)),this.alignAxisTo(c,u,n[l],g[l]),c.options._overlap||(T(c.lineBox().x1)===T(u.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f&&(s[d]=c)),T(c.lineBox().x2)===T(u.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,u,n[l],g[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,S).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,m=La(e,m)||i,b=n;m!==i&&(b=this.axisCrossingValues(m,t)),this.alignAxisTo(v,m,r[y],b[y]),v.options._overlap||(T(v.lineBox().y1)===T(m.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,m,r[y],b[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,k).translate(0,-v.options.margin)),_&&(p[x]=v)),T(v.lineBox().y2,3)===T(m.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,D).translate(0,v.options.margin)),_&&(h[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},R.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Ea(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))}},R.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Ea(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},R.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,r=r.contentBox;if(0<n.length)for(var s=Ea(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},R.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))},R.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=za(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))}},R.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)},R.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&&!u(n,t)||e[r].reflow(i)}},R.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],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var h=0;h<o;h++){var l=e[h];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}},R.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},R.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},R.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(b.drawing.Path.fromRect(e[o].toRect()))},R.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},R.prototype.createVisual=function(){Ra.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border,o=(void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&P(o)||(o=a,e=0),this._bgVisual=new b.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(o),this.appendVisual(o)},R.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&&P(s.value)&&null!==s.value&&o.push(s)}}return o},R.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},R.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},R.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},R.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}},R.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}},R.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},R.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=La(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},R.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,i=i.visible;if("end"!==r&&"start"!==r||!1===i)return null;var i=this.groupAxes(this.panes),i=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,i),r="end"===r,n=o.range(),r=r?n.max:n.min;if(_(i[e],n.min,n.max)-r==0)return null;i.splice(e+1,0,r),o.options.axisCrossingValues=i;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n};var Ra,c=R;function R(t,e,o){Ra.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 Ea(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))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new B}function La(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Ia,za=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};e(c,{series:[],plotArea:{margin:{}},background:"",border:{color:j,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Va=c,ja={hover:function(t,e){this._dispatchEvent(t,e,qr)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};(Ia=b.Class)&&(Ha.__proto__=Ia),((Ha.prototype=Object.create(Ia&&Ia.prototype)).constructor=Ha).prototype.aggregatePoints=function(t,e){var o,i=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||ot(t)||((o=function(){}).prototype=t,s=new o);for(var a=0;a<r.length;a++){var p=r[a],h=this._bindField(n.values,p.canonicalName),h=p.transform(h,i,n.dataItems,e);if(!(null===h||!ut(h)||P(h.length)||h instanceof Date)){s=h;break}if(P(h)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=p.name;var c=s;var u=h;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),P(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},Ha.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}},Ha.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(P(s[e])?s:n.fields)[e];o.push(s)}return o};const Da=Ha;function Ha(t,e,o){Ia.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 p=0;p<i.length;p++){var h=i[p],l=void 0;if(ut(a))l=a[h];else{if(0!==p&&!u(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:lt(l)?l:qi[l]})}}(Ua=b.Class)&&(Fa.__proto__=Ua),((Fa.prototype=Object.create(Ua&&Ua.prototype)).constructor=Fa).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Fa.prototype.query=function(t){return this._defaults[t]};var Ua,c=Fa;function Fa(){Ua.call(this),this._defaults={}}c.current=new c;const Na=c;(Ga=hs)&&(Wa.__proto__=Ga),((Wa.prototype=Object.create(Ga&&Ga.prototype)).constructor=Wa).prototype.createLabel=function(){var t=this.options.labels,e=x({},t,t.from),t=x({},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))},Wa.prototype._createLabel=function(t){var e=xt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new ns(e,x({vertical:this.options.vertical},t),o)},Wa.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)};var Ga,c=Wa;function Wa(){Ga.apply(this,arguments)}c.prototype.defaults=x({},c.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const Xa=c;(qa=_s)&&(Za.__proto__=qa),((Za.prototype=Object.create(qa&&qa.prototype)).constructor=Za).prototype.pointType=function(){return Xa},Za.prototype.pointValue=function(t){return t.valueFields},Za.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)},Za.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Za.prototype.updateRange=function(t,e){var e=e.series.axis,o=t.from,i=t.to,r=this.valueAxisRanges[e];null!==t&&m(o)&&m(i)&&((r=this.valueAxisRanges[e]=r||{min:q,max:Y}).min=Math.min(r.min,o),r.max=Math.max(r.max,o),r.min=Math.min(r.min,i),r.max=Math.max(r.max,i))},Za.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to};var qa,Ya,c=Za;function Za(){qa.apply(this,arguments)}c.prototype.plotLimits=mn.prototype.plotLimits;const Qa=c;function Ka(){Ya.apply(this,arguments)}(Ya=Cn)&&(Ka.__proto__=Ya),((Ka.prototype=Object.create(Ya&&Ya.prototype)).constructor=Ka).prototype.aliasFor=function(){return this.parent};const $a=Ka;(Ja=o)&&(op.__proto__=Ja),((op.prototype=Object.create(Ja&&Ja.prototype)).constructor=op).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,i=this.value,o=this.fromPoint=new $a(i,x({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new $a(i,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},op.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())},op.prototype.createHighlight=function(){var t=new b.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},op.prototype.highlightVisual=function(){return this.visual},op.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},op.prototype.tooltipAnchor=function(){var t,e,o,i=this.owner.pane.clipBox();if(!i||i.overlaps(this.box))return o=(i=this.box).center(),i=this.options.vertical?(t=o.x,e=i.y1-5,D):(t=i.x2+5,e=o.y,w),{point:new O(t,e),align:{horizontal:"left",vertical:i}}},op.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},op.prototype.overlapsBox=function(t){return this.box.overlaps(t)},op.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},op.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}"})))},op.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(i=i?e.y1<=t.y1?(o=lr,cr):(o=cr,lr):e.x1<=t.x1?(o=C,S):(o=S,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},op.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner};var Ja,tp,ep,c=op;function op(t,e){Ja.call(this),this.value=t,this.options=e,this.aboveAxis=M(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}x(c.prototype,xn),x(c.prototype,_n),c.prototype.defaults={markers:{visible:!1,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,margin:A(3),padding:A(4),animation:{type:sr,delay:nr},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};const ip=c;function rp(){tp.apply(this,arguments)}(tp=Gn)&&(rp.__proto__=tp),((rp.prototype=Object.create(tp&&tp.prototype)).constructor=rp).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},rp.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},rp.prototype.createStroke=function(t){var e=new b.drawing.Path(t),t=new b.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)},rp.prototype.hasStackSegment=function(){return!0},rp.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},rp.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const np=rp;function sp(){ep.apply(this,arguments)}(ep=np)&&(sp.__proto__=ep),((sp.prototype=Object.create(ep&&ep.prototype)).constructor=sp).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},sp.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},sp.prototype.createCurveSegments=function(t){return(new Ii).process(this.toGeometryPoints(t))};const ap=sp;(pp=np)&&(hp.__proto__=pp),((hp.prototype=Object.create(pp&&pp.prototype)).constructor=hp).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},hp.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t};var pp,c=hp;function hp(){pp.apply(this,arguments)}x(c.prototype,t);const lp=c;(cp=mn)&&(fp.__proto__=cp),((fp.prototype=Object.create(cp&&cp.prototype)).constructor=fp).prototype.render=function(){cp.prototype.render.call(this),this.renderSegments()},fp.prototype.pointType=function(){return ip},fp.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=t.valueFields;if(!Hs(n.from)&&!Hs(n.to)){if(this.seriesMissingValues(r)!==pr)return null;n={from:0,to:0}}var s=this.pointOptions(r,e),s=this.evalPointOptions(s,n,i,o,r,e),i=t.fields.color||r.color,o=(lt(r.color)&&(i=s.color),new ip(n,s));return o.color=i,this.append(o),o},fp.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?ap:"step"===i?lp:np)(t,e,o)},fp.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},fp.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(o&&t)return{from:o,to:t}},fp.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new B(i.x1,t.y1,i.x2,t.y2),new B(e.x1,t.y1,e.x2,t.y2)):(o=new B(t.x1,i.y1,t.x2,i.y2),new B(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},fp.prototype.addValue=function(t,e){var o=t.valueFields;m(o.from)||(o.from=o.to),m(o.to)||(o.to=o.from),cp.prototype.addValue.call(this,t,e)},fp.prototype.updateRange=function(t,e){var o;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:q,max:Y},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},fp.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},fp.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)};var cp,up,dp,t=fp;function fp(){cp.apply(this,arguments)}x(t.prototype,On,h);const gp=t;function yp(){up.apply(this,arguments)}(up=Cs)&&(yp.__proto__=up),((yp.prototype=Object.create(up&&up.prototype)).constructor=yp).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=[],r=[],n=[],s=e.getSlot(o.low,o.high),a=e.getSlot(o.open,o.open),e=e.getSlot(o.close,o.close),o=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);i.push([a.x1,a.y1]),i.push([o,a.y1]),r.push([o,e.y1]),r.push([e.x2,e.y1]),n.push([o,s.y1]),n.push([o,s.y2]),this.lines=[i,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},yp.prototype.createBody=function(){};const vp=yp;function mp(){dp.apply(this,arguments)}(dp=Ps)&&(mp.__proto__=dp),((mp.prototype=Object.create(dp&&dp.prototype)).constructor=mp).prototype.pointType=function(){return vp};const xp=mp;(_p=o)&&(wp.__proto__=_p),((wp.prototype=Object.create(_p&&_p.prototype)).constructor=wp).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])):(t=e.aboveAxis?o.x2:o.x1,r.push([t,o.y1],[t,i.y2])),r},wp.prototype.createVisual=function(){_p.prototype.createVisual.call(this);var t=this.series.line||{},t=b.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});st(t),this.visual.append(t)};var _p,bp,c=wp;function wp(t,e,o){_p.call(this),this.from=t,this.to=e,this.series=o}e(c,{animation:{type:sr,delay:nr}});const Cp=c;function Sp(){bp.apply(this,arguments)}(bp=_s)&&(Sp.__proto__=bp),((Sp.prototype=Object.create(bp&&bp.prototype)).constructor=Sp).prototype.render=function(){bp.prototype.render.call(this),this.createSegments()},Sp.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=yn(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=Ki.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},Sp.prototype.updateRange=function(t,e){bp.prototype.updateRange.call(this,{value:e.to},e)},Sp.prototype.aboveAxis=function(t){return 0<=t.value},Sp.prototype.plotRange=function(t){return[t.from,t.to]},Sp.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 p,h=n[a];h&&s&&(p=new Cp(s,h,r),o.push(p),this.append(p)),s=h}}};const kp=Sp;var Ap,Pp,Tp=[fr,Dr,Lr,Nr],Mp=[kr,Fr].concat(Tp),h=((Ap=Va)&&(E.__proto__=Ap),((E.prototype=Object.create(Ap&&Ap.prototype)).constructor=E).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new os,0<t.length){this.invertAxes=u(t[0].type,[gr,mr,Fr,Dr,Nr,Ir,Sr,Hr]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},E.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)},E.prototype.removeAxis=function(t){var e=t.options.name;Ap.prototype.removeAxis.call(this,t),t instanceof qo?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},E.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"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},E.prototype.createChartGroup=function(t,e){this.createAreaChart(Sa(t,[fr,Dr]),e),this.createRangeAreaChart(Sa(t,[Lr,Nr]),e),this.createBarChart(Sa(t,[_r,gr]),e),this.createRangeBarChart(Sa(t,[zr,Ir]),e),this.createBulletChart(Sa(t,[mr,Ur]),e),this.createCandlestickChart(Sa(t,xr),e),this.createBoxPlotChart(Sa(t,[yr,Hr]),e),this.createOHLCChart(Sa(t,Ar),e),this.createWaterfallChart(Sa(t,[Gr,Sr]),e),this.createLineChart(Sa(t,[kr,Fr]),e)},E.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=(Ca(n.options.type,F)||r.categoryField)&&u(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},E.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!m(o.options.min)&&!m(o.options.max))return e;var i=o.currentRangeIndices(),r=u(e.type,Mp),n=x({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Ba(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return P(e.data[t])}),n},E.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},E.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=Ca(i.type,F),n=t.data,s=i?ka:Yi,a=[];i||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];P(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[o]=a},E.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=x({},t),n=new Da(x({},t),Ki.current,Na.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),p=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=n.aggregatePoints(o.items,e)),o},h=a.min;h<=a.max;h++){var l=p(h);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return u(e.type,Mp)&&Ba(e,a,i.totalCount(),p,function(t){return r[t]}),i.options.dataItems=s,e},E.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,yn(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Ap.prototype.appendChart.call(this,t,e)},E.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=Ct([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},E.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},E.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},E.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 Ct(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},E.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new _s(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Qa(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},E.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ra(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Fn(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ts(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new gp(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new xp(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Ps(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Vs(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new kp(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},E.prototype.axisRequiresRounding=function(t,e){for(var o=Sa(this.series,Wr),i=0;i<this.series.length;i++){var r,n=this.series[i];!u(n.type,Tp)||(r=n.line)&&r.style===dr&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},E.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}},E.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof qo&&t[e].createLabels()},E.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(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,p=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?q:0},n),P(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),p=new(Aa(n,a[0])?ei:qo)(n,this.chartService);if(o[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},E.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Tp))return!1;return!0},E.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 p=i[a];if(u(this.findPane(p.pane),t)){var h=p.name,l=Ca(p.type,an)?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||l,l=(0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max)),new(Ca(p.type,an)?vi:hi)(l.min,l.max,x({},n,p),this.chartService));if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=l}l.axisIndex=a,s.push(l),this.appendAxis(l)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},E.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new O(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?_a(s,h.getValue(r)):_a(n,h.getCategory(r))}0===n.length&&_a(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Ht(e),originalEvent:e,category:Pa(n),value:Pa(s)})}},E.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}},E.prototype.updateAxisOptions=function(t,e){Op(this.options,t,e),Op(this.originalOptions,t,e)},E);function E(){Ap.apply(this,arguments)}function Op(t,e,o){x([].concat(e instanceof qo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}e(h,{categoryAxis:{},valueAxis:{}}),x(h.prototype,ja);const Bp=h;function Rp(){Pp.call(this),this._points=[]}function Ep(){this._defaultPrevented=!0}(Pp=b.Class)&&(Rp.__proto__=Pp),((Rp.prototype=Object.create(Pp&&Pp.prototype)).constructor=Rp).prototype.destroy=function(){this._points=[]},Rp.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))}},Rp.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:Ep,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},Rp.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Rp.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};const Lp=Rp;function Ip(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function zp(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}(Vp=b.Class)&&(jp.__proto__=Vp),((jp.prototype=Object.create(Vp&&Vp.prototype)).constructor=jp).prototype.start=function(t){return this._active=Ip(t,this.options.key),this._active},jp.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return zp(this.axisRanges=t)}},jp.prototype.end=function(){var t=this._active;return this._active=!1,t},jp.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)}},jp.prototype.destroy=function(){delete this.plotArea},jp.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,p=n[s];!(e===y&&!p.options.vertical||e===v&&p.options.vertical)||(a=p.pan(i))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r};var Vp,t=jp;function jp(t,e){Vp.call(this),this.plotArea=t,this.options=x({},this.options,e)}t.prototype.options={key:"none",lock:"none"};const Dp=t;(Hp=b.Class)&&(Gp.__proto__=Hp),((Gp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Gp).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},Gp.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Gp.prototype.setStyles=function(t){gt(this._marquee,t)},Gp.prototype.start=function(t){if(Ip(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)return e=this._elementOffset(),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},Gp.prototype._elementOffset=function(){var t=this.chart.element,e=gt(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=Vt(t);return{left:o+t.left,top:e+t.top}},Gp.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Gp.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(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},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,zp(this.axisRanges)},Gp.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)}},Gp.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Gp.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===y&&!a||o===v&&a||!P(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Gp.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(o.x,i),s=Math.min(o.y,t),a=Math.abs(o.x-i),p=Math.abs(o.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,p=e.height()),i>e.x2&&(a=e.x2-o.x),i<e.x1&&(a=o.x-e.x1),t>e.y2&&(p=e.y2-o.y),t<e.y1&&(p=o.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:p}};var Hp,Up,Fp,Np,c=Gp;function Gp(t,e){Hp.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}c.prototype.options={key:"shift",lock:"none"};const Wp=c;function Xp(t,e){Up.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}(Up=b.Class)&&(Xp.__proto__=Up),((Xp.prototype=Object.create(Up&&Up.prototype)).constructor=Xp).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===y&&!a||o===v&&a||!s.zoomRange||(a=_(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return zp(this.axisRanges=i)},Xp.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)}},Xp.prototype.destroy=function(){delete this.chart};const qp=Xp;function Yp(t,e){Fp.call(this,t),this.chartService=e}(Fp=o)&&(Yp.__proto__=Fp),((Yp.prototype=Object.create(Fp&&Fp.prototype)).constructor=Yp).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new b.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 B),r.renderVisual()}},Yp.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ue(t):new B},Yp.prototype.renderVisual=function(){this.addVisual()},Yp.prototype.createVisual=function(){};const Zp=Yp;function Qp(t){Np.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}(Np=Ae)&&(Qp.__proto__=Np),((Qp.prototype=Object.create(Np&&Np.prototype)).constructor=Qp).prototype.createContainer=function(){this.container=new ze({vertical:!1,wrap:!1,align:w,spacing:this.options.spacing}),this.append(this.container)},Qp.prototype.createMarker=function(){this.container.append(new Me(this.markerOptions()))},Qp.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return x({},t.markers,{background:e,border:{color:e}})},Qp.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new We(t.text,e))},Qp.prototype.renderComplete=function(){Np.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=b.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},Qp.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},Qp.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},Qp.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},Qp.prototype.eventArgs=function(t){var e=this.options;return{element:Ht(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},Qp.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()):Np.prototype.renderVisual.call(this)};const Kp=Qp;var $p,Jp="horizontal",th="custom",h=(($p=o)&&(eh.__proto__=$p),((eh.prototype=Object.create($p&&$p.prototype)).constructor=eh).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=w;e===th?i=C:u(e,[k,D])?(i="start"===o?C:"end"===o?S:w,r=e):o&&("start"===o?r=k:"end"===o&&(r=D)),this.container=new Ae({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 Ae({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},eh.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new Zp({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 Kp(x({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},eh.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===th&&e!==Jp||(P(e)?e!==Jp:u(t,[C,S]))},eh.prototype.hasItems=function(){return 0<this.container.children[0].children.length},eh.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===th?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new B(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},eh.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===D?y:v,a=this.isVertical(),p=t.clone(),h=t.clone(),i=(i!==C&&i!==S||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,v,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,y,o.options.align)),o.reflow(h),(h=o.box).clone());(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),i[s+1]=t[s+1],i[s+2]=t[s+2],this.box=i},eh.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new B(i,r,i+t.width(),r+t.height()))},eh.prototype.renderVisual=function(){this.hasItems()&&$p.prototype.renderVisual.call(this)},eh.prototype.createLegendTitle=function(t){var e=x({},{color:j,position:k,align:w},t),o=e.text;t&&!1!==t.visible&&(P(e)&&e.visible&&((t=xt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new We(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},eh.prototype.createTitleLayout=function(){this.layout=new ze({vertical:!0,wrap:!1}),this.container.append(this.layout)},eh.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},eh.prototype.appendTitleLayoutContent=function(){this.options.title.position===D?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},eh);function eh(t,e){void 0===e&&(e={}),$p.call(this,t),this.chartService=e,u(this.options.position,[k,S,D,C,th])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}e(h,{position:S,items:[],offsetX:0,offsetY:0,margin:A(5),padding:A(5),border:{color:j,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:C,vAlign:w}});const oh=h;(ih=b.Class)&&(rh.__proto__=ih),((rh.prototype=Object.create(ih&&ih.prototype)).constructor=rh).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},rh.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=Sa(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)};var ih,t=rh;function rh(){ih.call(this),this._registry=[]}t.current=new t;const nh=t;function sh(t){var e=document.createElement("div");return t&&(e.className=t),e}function ah(t){for(var e=t;e&&!St(e,"k-handle");)e=e.parentNode;return e}(ph=b.Class)&&(lh.__proto__=ph),((lh.prototype=Object.create(ph&&ph.prototype)).constructor=lh).prototype.onPane=function(t){return this.categoryAxis.pane===t},lh.prototype.createElements=function(){var t=this.options,e=this.wrapper=sh("k-selector"),o=(gt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=sh("k-selection")),i=(this.leftMask=sh("k-mask"),this.rightMask=sh("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(sh("k-selection-bg")),this.leftHandle=sh("k-handle k-left-handle")),r=this.rightHandle=sh("k-handle k-right-handle"),o=(i.appendChild(sh()),r.appendChild(sh()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),gt(o,["borderLeftWidth","borderRightWidth","height"])),n=gt(i,"height").height,s=gt(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},gt(i,{top:(o.height-n)/2}),gt(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},lh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),It(this.wrapper,((t={})[ln]=this._mousewheelHandler,t))),this._domEvents=co.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)})},lh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&x(t,{min:No(o,t.min),max:No(o,t.max),from:No(o,t.from),to:No(o,t.to)}),gt(this.chartElement,["paddingLeft","paddingTop"])),i=o.paddingLeft,o=o.paddingTop;this.options=x({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:o},offset:{left:e.x1+i,top:e.y1+o},from:t.min,to:t.max},t)},lh.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={})[ln]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},lh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},lh.prototype._start=function(t){var e=this.options,o=Ht(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:ah(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},o=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger(en,o)&&(this._state=null))},lh.prototype._press=function(t){(t=this._state?this._state.moveTarget:ah(Ht(t)))&&it(t,"k-handle-active")},lh.prototype._move=function(t){var e,o,i,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,a=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),l=l.startLocation-t.x.location,t=e.from,p=e.to,h=e.to-e.from,c=gt(this.wrapper,"width").width/(c.categoriesCount()-1),l=Math.round(l/c)*(i?-1:1),o&&(c=St(o,"k-left-handle"),u=St(o,"k-right-handle"),St(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-l),a-h),e.to=Math.min(e.from+h,a)):c&&!i||u&&i?(e.from=Math.min(Math.max(s,r-l),a-1),e.to=Math.max(e.from+1,e.to)):(c&&i||u&&!i)&&(e.to=Math.min(Math.max(s+1,n-l),a),e.from=Math.min(e.to-1,e.from)),e.from===t&&e.to===p||(this.move(e.from,e.to),this.trigger(on,this._rangeEventArgs(e)))))},lh.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&nt(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(rn,this._rangeEventArgs(t)),delete this._state)},lh.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new O(i.x,o.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},p=3===t.event.which,i=Math.round(r+n/2-i);this._state||p||(this.chart._unsetActivePoint(),o.options.justified||i--,a.from=Math.min(Math.max(s,r-i),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(on,this._rangeEventArgs(a)),this._end()))},lh.prototype._mousewheel=function(t){var e,o=this,i=Rt(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(on,{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))},lh.prototype._gesturestart=function(t){var e=this.options,e=(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},this._rangeEventArgs(this._state.range));this.trigger(en,e)?this._state=null:t.preventDefault()},lh.prototype._gestureend=function(){this._state&&(this.trigger(rn,this._rangeEventArgs(this._state.range)),delete this._state)},lh.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,o=o.range,n=e._toModelCoordinates(t.touches[0].x.location).x,e=e._toModelCoordinates(t.touches[1].x.location).x,s=Math.min(n,e),n=Math.max(n,e);t.preventDefault(),o.from=r.pointCategoryIndex(new O(s))||i.min,o.to=r.pointCategoryIndex(new O(n))||i.max,this.move(o.from,o.to),this.trigger(on,this._rangeEventArgs(o))},lh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},lh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},lh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},lh.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,p="x"+(i?2:1),i=this._slot(i?e:t),e=T(i[p]-r.left+n.left),t=(gt(this.leftMask,{width:e}),gt(this.selection,{left:e}),i=this._slot(a),T(o.width-(i[p]-r.left+n.left))),a=(gt(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),gt(this.rightMask,{left:a}),gt(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},lh.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),t=_(this._index(t),i,r),i=_(this._index(e),t+1,r);o.visible&&this.move(t,i),o.from=this._value(t),o.to=this._value(i)},lh.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),e=this._index(e.to),s={from:n,to:e},a=x({},s);if(this._state&&(s=this._state.range),r!==S&&(s.from=_(_(n-t,0,e-1),o,i)),r!==C&&(s.to=_(_(e+t,s.from+1,i),o,i)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},lh.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),o=this._index(o.to),s={from:n,to:o},a=x({},s),p=this.categoryAxis.options.reverse,p=y+(p?"2":"1"),h=this.categoryAxis.lineBox(),p=Math.abs(h[p]-e.x),e=h.width(),h=T(p/e,2),p=T(h*t),e=T((1-h)*t);if((s=this._state?this._state.range:s).from=_(_(n-p,0,o-1),i,r),s.to=_(_(o+e,s.from+1,r),i,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},lh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var ph,hh,c=lh;function lh(t,e,o,i){ph.call(this);var r=t.element;this.options=x({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof ei,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())}e(c,{visible:!0,mousewheel:{zoom:"both"},min:Y,max:q});const ch=c;function uh(){hh.apply(this,arguments)}(hh=l)&&(uh.__proto__=hh),((uh.prototype=Object.create(hh&&hh.prototype)).constructor=uh).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=x({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,hh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},uh.prototype.hide=function(){delete this._current,hh.prototype.hide.call(this)};const dh=uh;(fh=l)&&(gh.__proto__=fh),((gh.prototype=Object.create(fh&&fh.prototype)).constructor=gh).prototype.showAt=function(t,e){var o,i=Ct(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(i=i[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),e=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:e,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},gh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},gh.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:o?new O(t.x,e.y):new O(e.x,t.y),align:{horizontal:"center",vertical:"center"}}};var fh,h=gh;function gh(t,e){fh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}e(h,{categoryFormat:"{0:d}"});const yh=h;(vh=b.drawing.Animation)&&(mh.__proto__=vh),((mh.prototype=Object.create(vh&&vh.prototype)).constructor=mh).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,o=o.vertical?v:y,(t=this.fromScale=new b.geometry.Point(1,1))[o]=ar,e.transform(b.geometry.transform().scale(t.x,t.y))):this.abort()},mh.prototype.step=function(t){var e=Pt(this.fromScale.x,1,t),t=Pt(this.fromScale.y,1,t);this.element.transform(b.geometry.transform().scale(e,t,this.origin))},mh.prototype.abort=function(){vh.prototype.abort.call(this),this.element.transform(null)};var vh,t=mh;function mh(){vh.apply(this,arguments)}e(t,{duration:nr}),b.drawing.AnimationFactory.current.register(gr,t);(xh=b.drawing.Animation)&&(_h.__proto__=xh),((_h.prototype=Object.create(xh&&xh.prototype)).constructor=_h).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(b.geometry.transform().scale(ar,ar,t))},_h.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.center))};var xh,c=_h;function _h(){xh.apply(this,arguments)}e(c,{easing:"easeOutElastic"}),b.drawing.AnimationFactory.current.register(vr,c);(bh=b.drawing.Animation)&&(wh.__proto__=bh),((wh.prototype=Object.create(bh&&bh.prototype)).constructor=wh).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},wh.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var bh,l=wh;function wh(){bh.apply(this,arguments)}e(l,{duration:200,easing:"linear"}),b.drawing.AnimationFactory.current.register(sr,l);(Ch=b.drawing.Animation)&&(Sh.__proto__=Ch),((Sh.prototype=Object.create(Ch&&Ch.prototype)).constructor=Sh).prototype.setup=function(){this.element.transform(b.geometry.transform().scale(ar,ar,this.options.center))},Sh.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.options.center))};var Ch,h=Sh;function Sh(){Ch.apply(this,arguments)}e(h,{easing:"easeOutElastic",duration:nr}),b.drawing.AnimationFactory.current.register(Pr,h);const kh=h;(Ah=Ns)&&(Ph.__proto__=Ah),((Ph.prototype=Object.create(Ah&&Ah.prototype)).constructor=Ph).prototype.render=function(){Ah.prototype.render.call(this),this.renderSegments()},Ph.prototype.createSegment=function(t,e,o){return new(e.style===ur?Ln:An)(t,e,o)},Ph.prototype.animationPoints=function(){return Ah.prototype.animationPoints.call(this).concat(this._segments)},Ph.prototype.createMissingValue=function(t,e){if(e===pr)return Hs((e={x:t.x,y:t.y}).x)||(e.x=0),Hs(e.y)||(e.y=0),e};var Ah,t=Ph;function Ph(){Ah.apply(this,arguments)}x(t.prototype,On);const Th=t;(Mh=Va)&&(Oh.__proto__=Mh),((Oh.prototype=Object.create(Mh&&Mh.prototype)).constructor=Oh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new os,this.yAxisRangeTracker=new os},Oh.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"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(Sa(r,Vr),i),this.createScatterLineChart(Sa(r,jr),i),this.createBubbleChart(Sa(r,vr),i))}this.createAxes(t)},Oh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Mh.prototype.appendChart.call(this,t,e)},Oh.prototype.removeAxis=function(t){var e=t.options.name;Mh.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},Oh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Ct([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Ct([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Oh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Ns(this,{series:t,clip:e.options.clip}),e)},Oh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Th(this,{series:t,clip:e.options.clip}),e)},Oh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Zs(this,{series:t,clip:e.options.clip}),e)},Oh.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=x({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=Ca(a.type,an),p=s.query(),h=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||p||h,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){f=Ki.current.bindPoint(d,0).valueFields;l.push(f[e?"y":"x"]);break}}0===o&&p&&(s.min=Math.min(s.min,p.min),s.max=Math.max(s.max,p.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}h=new(Ca(a.type,F)||!a.type&&i?ui:t?vi:hi)(s.min,s.max,a,this.chartService);if(h.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=h}return this.appendAxis(h),h},Oh.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++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(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]},Oh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new O(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(o,{element:Ht(e),originalEvent:e,x:Pa(a),y:Pa(p)})},Oh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);Bh(this.options,i,o,e),Bh(this.originalOptions,i,o,e)};var Mh,c=Oh;function Oh(){Mh.apply(this,arguments)}function Bh(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}e(c,{xAxis:{},yAxis:{}}),x(c.prototype,ja);const Rh=c;(Eh=o)&&(zh.__proto__=Eh),((zh.prototype=Object.create(Eh&&Eh.prototype)).constructor=zh).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,e=xt(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===w||o.position===pn?(o.color||(o.color=Jt(this.options.color)),o.background||(o.background=this.options.color)):(e=i.theme.seriesDefaults.labels,o.color=o.color||e.color,o.background=o.background||e.background),this.label=new We(r,x({},o,{align:w,vAlign:"",animation:{type:sr,delay:this.animationDelay}}),t),this.append(this.label)))},zh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},zh.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===w?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new B(t.x,t.y-e/2,t.x,t.y))):r.position===pn?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new B(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(i=t.x+o,n.orientation=S):(i=t.x-o,n.orientation=C),n.reflow(new B(i,t.y-e,t.x,t.y))))},zh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Eh.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(t=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new b.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 b.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},zh.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},i=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},r=o.color,n={color:r,opacity:o.opacity},i=this.createSegment(e,x({fill:n,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(i),ss(o)&&t.append(this.createGradientOverlay(i,{baseColor:r,fallbackFill:n},x({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},zh.prototype.createSegment=function(t,e){return e.singleSegment?new b.drawing.Circle(new b.geometry.Circle(new b.geometry.Point(t.center.x,t.center.y),t.radius),e):be.current.createRing(t,e)},zh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Eh.prototype.createAnimation.call(this)},zh.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,x({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},zh.prototype.highlightVisual=function(){return this.visual.children[0]},zh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new b.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},zh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Gt(e+180),e=T(Math.sin(t),g),t=T(Math.cos(t),g),{horizontal:Math.abs(e)>Ih?w:t<0?S:C,vertical:Math.abs(e)<Lh?w:e<0?D:k})}},zh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},zh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}};var Eh,l=zh,Lh=T(Gt(30),g),Ih=T(Gt(60),g);function zh(t,e,o){Eh.call(this,o),this.value=t,this.sector=e}e(l,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:N,margin:A(.5),align:H,zIndex:1,position:hn},animation:{type:Pr},highlight:{visible:!0,border:{width:1}},visible:!0}),x(l.prototype,xn);const Vh=l,jh={createLegendItem:function(t,e,o){var i,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},p=s.labels||{};o&&!1!==o.visibleInLegend&&(a=!(r=!1!==o.visible)&&xt(p)||xt(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:p.color,font:p.font},(s.markers||{}).color),Hs(n)&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i}))}};(Dh=o)&&(Uh.__proto__=Dh),((Uh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Uh).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Uh.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],p=a.data,h=wa(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/h),void 0),f=(P(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===hn&&(a.labels.position=w);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!==p.length&&Boolean(y.explode),lt(a.color)||(a.color=y.color||o[g%i]),t(b.valueFields.value,new ye(null,0,0,f,x),{owner:this,category:P(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:p[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))}}},Uh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;gn(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Uh.prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new Vh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Uh.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs,r=(void 0===i&&(i=[]),o.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new B(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],e=M(e.padding,p);this.targetBox=t,e=a-5<e?a-5:e,h.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new O(d+h.x1+e,d+h.y1+e),g=0;g<r;g++){var y=o[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,i.length&&(x=i[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===l-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(h),y.label);x&&x.options.position===hn&&m===l-1&&(x.orientation===S?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Uh.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Uh.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Uh.prototype.distanceBetweenLabels=function(t){var e=Ft(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=T(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var p=t[a+1].box,n=t[a].box,s=T(p.y1-n.y2);r.push(s)}return s=T(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Uh.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)},Uh.prototype._takeDistance=function(t,e,o,i){var r;return 0<t[o]&&(i-=r=Math.min(t[o],i),t[o]-=r,t[e]+=r),i},Uh.prototype.reflowLabels=function(t,e){var o,i=Ft(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var l=e[h],c=l.box;p+=t[h],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===S),l.orientation===S?(n.align!==H&&(o=r.radius+r.center.x+a),l.reflow(new B(o+c.width(),p,o,p))):(n.align!==H&&(o=r.center.x-r.radius-a),l.reflow(new B(o-c.width(),p,o,p))),p+=c.height()}},Uh.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Dh.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,p,h,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new b.drawing.Path({stroke:{color:g,width:t.width},animation:{type:sr,delay:c.animationDelay}}),d.options.position===hn&&(r=d.box,n=u.center,l=u.point(f),s=new O(r.x1,r.center().y),h=p=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===S?(h=Fh(n,l,s,p=new O(r.x1-t.padding,r.center().y)),s=new O(p.x-4,p.y),(h=h||s).x=Math.min(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===_r||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))):(h=Fh(n,l,s,p=new O(r.x2+t.padding,r.center().y)),s=new O(p.x+4,p.y),(h=h||s).x=Math.max(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===_r||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))),g.lineTo(p.x,p.y),this._connectorLines.push(g),this.visual.append(g)))}},Uh.prototype.renderVisual=function(){var t,e,o,i;Dh.prototype.renderVisual.call(this),Yt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(i=this.visual.bbox())&&(o=i.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-i.origin.y),(t.y2-e.y)/(o.y-e.y),(e.x-t.x1)/(e.x-i.origin.x),(t.x2-e.x)/(o.x-e.x)))<1&&this.visual.transform(b.geometry.transform().scale(i,i,[e.x,e.y]))))},Uh.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}},Uh.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,e=e.center,s=e.x,e=e.y,o=Math.min(Math.abs(e-o),Math.abs(e-i));return n<o?t:s+Math.sqrt(n*n-o*o)*(r?1:-1)},Uh.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)},Uh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Uh.prototype.animationDelay=function(t){return 70*t},Uh.prototype.stackRoot=function(){return this};var Dh,Hh,h=Uh;function Uh(t,e){Dh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Fh(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),i=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return 0!=i&&(o=n/i,r=new O(t.x+o*(e.x-t.x),t.y+o*(e.y-t.y))),r}e(h,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(h.prototype,jh),h.prototype.isStackRoot=!0;const Nh=h;function Gh(){Hh.apply(this,arguments)}(Hh=Va)&&(Gh.__proto__=Hh),((Gh.prototype=Object.create(Hh&&Hh.prototype)).constructor=Gh).prototype.render=function(){this.createPieChart(this.series)},Gh.prototype.createPieChart=function(t){var e=t[0],t=new Nh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Gh.prototype.appendChart=function(t,e){Hh.prototype.appendChart.call(this,t,e),Lt(this.options.legend.items,t.legendItems)};const Wh=Gh;(Xh=Vh)&&(qh.__proto__=Xh),((qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=qh).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===w?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new B(e.x,e.y-t/2,e.x,e.y))):Xh.prototype.reflowLabel.call(this))},qh.prototype.createSegment=function(t,e){return be.current.createRing(t,e)};var Xh,On=qh;function qh(){Xh.apply(this,arguments)}e(On,{overlay:{gradient:"roundedGlass"},labels:{position:w},animation:{type:Pr}}),x(On.prototype,xn);const Yh=On;(Zh=Nh)&&($h.__proto__=Zh),(($h.prototype=Object.create(Zh&&Zh.prototype)).constructor=$h).prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(t=new Yh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},$h.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),i=Math.min(i.width(),i.height()),r=i/2,n=o.series,s=n.length,o=M(o.padding,i-.85*i),a=r-(o=r-5<o?r-5:o),p=0,h=0;h<s;h++){var l=n[h];0===h&&P(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),P(l.size)?a-=l.size:p++,P(l.margin)&&h!==s-1&&(a-=l.margin)}P(e)||(a-=e=(r-o)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+M(f.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Zh.prototype.reflow.call(this,t)},$h.prototype.animationDelay=function(t,e,o){return 50*t+nr*(e+1)/(o+1)};var Zh,Qh,Kh,t=$h;function $h(){Zh.apply(this,arguments)}e(t,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const Jh=t;function tl(){Qh.apply(this,arguments)}(Qh=Wh)&&(tl.__proto__=Qh),((tl.prototype=Object.create(Qh&&Qh.prototype)).constructor=tl).prototype.render=function(){this.createDonutChart(this.series)},tl.prototype.createDonutChart=function(t){var e=t[0],t=new Jh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)};const el=tl;function ol(){Kh.apply(this,arguments)}(Kh=Va)&&(ol.__proto__=Kh),((ol.prototype=Object.create(Kh&&Kh.prototype)).constructor=ol).prototype.initFields=function(){this.valueAxisRangeTracker=new os},ol.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},ol.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),o=this.polarAxis.getSlot(0).center,o=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(o)},ol.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=i.type===an?(t=Ei,{min:.1,max:1}):(t=Ti,{min:0,max:1}),e=e.query(name)||o||r,r=(e&&o&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max)),new t(e.min,e.max,i,this.chartService));this.valueAxis=r,this.appendAxis(r)},ol.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()),t=A(t.padding||{},r),r=i.clone().unpad(t),i=r.clone(),t=(i.y2=i.y1+Math.min(i.width(),i.height()),i.align(r,v,w),i.clone().shrink(0,i.height()/2)),r=(o.reflow(i),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=i,this.alignAxes(i)},ol.prototype.backgroundBox=function(){return this.box},ol.prototype.detachLabels=function(){};var il,c=ol,N=((il=Ns)&&(rl.__proto__=il),((rl.prototype=Object.create(il&&il.prototype)).constructor=rl).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=O.onCircle(t.center,t.startAngle,e);return new B(t.x,t.y,t.x,t.y)},rl);function rl(){il.apply(this,arguments)}e(N,{clip:!1});const nl=N;(sl=Th)&&(ll.__proto__=sl);var sl,al,pl,hl,l=(ll.prototype=Object.create(sl&&sl.prototype)).constructor=ll;function ll(){sl.apply(this,arguments)}l.prototype.pointSlot=nl.prototype.pointSlot,e(l,{clip:!1});const cl=l;function ul(){al.apply(this,arguments)}(al=$n)&&(ul.__proto__=al),((ul.prototype=Object.create(al&&al.prototype)).constructor=ul).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},ul.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},ul.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Ii(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i};const dl=ul;function fl(){pl.apply(this,arguments)}(pl=Gn)&&(fl.__proto__=pl),((fl.prototype=Object.create(pl&&pl.prototype)).constructor=fl).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new b.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const gl=fl;function yl(){hl.apply(this,arguments)}function vl(t,e){return t.value.x-e.value.x}(hl=cl)&&(yl.__proto__=hl),((yl.prototype=Object.create(hl&&hl.prototype)).constructor=yl).prototype.createSegment=function(t,e,o){return new((e.line||{}).style===ur?dl:gl)(t,e,o)},yl.prototype.createMissingValue=function(t,e){var o;return Hs(t.x)&&e!==hr&&(o={x:t.x,y:t.y},e===pr&&(o.y=0)),o},yl.prototype.seriesMissingValues=function(t){return t.missingValues||pr},yl.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},yl.prototype.sortPoints=function(t){if(t.sort(vl),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];!o||Hs(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t};const ml=yl;(xl=c)&&(_l.__proto__=xl),((_l.prototype=Object.create(xl&&xl.prototype)).constructor=_l).prototype.createPolarAxis=function(){var t=new Si(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},_l.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:V},minorGridLines:{type:V}},this.options.yAxis)},_l.prototype.createValueAxis=function(){xl.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},_l.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Va.prototype.appendChart.call(this,t,e)},_l.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Sa(t,[Mr]),e),this.createScatterChart(Sa(t,[Or]),e),this.createAreaChart(Sa(t,[Tr]),e)},_l.prototype.createLineChart=function(t,e){0!==t.length&&(t=new cl(this,{series:t}),this.appendChart(t,e))},_l.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new nl(this,{series:t}),this.appendChart(t,e))},_l.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new ml(this,{series:t}),this.appendChart(t,e))},_l.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new O(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Ht(e),x:r,y:i})},_l.prototype.createCrosshairs=function(){};var xl,h=_l;function _l(){xl.apply(this,arguments)}e(h,{xAxis:{},yAxis:{}}),x(h.prototype,ja);var bl,wl,Cl,Sl,On=h,t=((bl=Fn)&&(kl.__proto__=bl),((kl.prototype=Object.create(bl&&bl.prototype)).constructor=kl).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=O.onCircle(t.center,t.middle(),e);return new B(t.x,t.y,t.x,t.y)},kl.prototype.renderSegments=function(){if(bl.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],r=Ft(n),r=Ft(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&Ft(n).linePoints.push(o))}},kl.prototype.createSegment=function(t,e,o){var o=new(e.style===ur?Ln:An)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==hr||(o.options.closed=!0),o},kl);function kl(){bl.apply(this,arguments)}e(t,{clip:!1,limitPoints:!1});const Al=t;function Pl(){wl.apply(this,arguments)}(wl=$n)&&(Pl.__proto__=wl),((Pl.prototype=Object.create(wl&&wl.prototype)).constructor=Pl).prototype.fillToAxes=function(){};const Tl=Pl;function Ml(){Cl.apply(this,arguments)}(Cl=Gn)&&(Ml.__proto__=Cl),((Ml.prototype=Object.create(Cl&&Cl.prototype)).constructor=Ml).prototype.fillToAxes=function(){};const Ol=Ml;function Bl(){Sl.apply(this,arguments)}(Sl=Al)&&(Bl.__proto__=Sl),((Bl.prototype=Object.create(Sl&&Sl.prototype)).constructor=Bl).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),p===ur?(s=new Tl(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Ol(t,e,o,r,n)),s},Bl.prototype.seriesMissingValues=function(t){return t.missingValues||pr};const Rl=Bl;(El=Yh)&&(Ll.__proto__=El);var El,N=(Ll.prototype=Object.create(El&&El.prototype)).constructor=Ll;function Ll(t,e){El.call(this,t,null,e)}e(N,{overlay:{gradient:"none"},labels:{distance:10}});const Il=N;(zl=o)&&(jl.__proto__=zl),((jl.prototype=Object.create(zl&&zl.prototype)).constructor=jl).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})};var zl,Vl,l=jl;function jl(t){zl.call(this,t),this.forEach=t.rtl?cs:ls}e(l,{gap:1,spacing:0});const Dl=l;function Hl(){Vl.apply(this,arguments)}(Vl=o)&&(Hl.__proto__=Vl),((Hl.prototype=Object.create(Vl&&Vl.prototype)).constructor=Hl).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 B;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const Ul=Hl;(Fl=_s)&&(Nl.__proto__=Fl),((Nl.prototype=Object.create(Fl&&Fl.prototype)).constructor=Nl).prototype.pointType=function(){return Il},Nl.prototype.clusterType=function(){return Dl},Nl.prototype.stackType=function(){return Ul},Nl.prototype.categorySlot=function(t,e){return t.getSlot(e)},Nl.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},Nl.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Nl.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Fl.prototype.createAnimation.call(this)};var Fl,h=Nl;function Nl(){Fl.apply(this,arguments)}h.prototype.reflow=mn.prototype.reflow,e(h,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const Gl=h;(Wl=c)&&(Xl.__proto__=Wl),((Xl.prototype=Object.create(Wl&&Wl.prototype)).constructor=Xl).prototype.createPolarAxis=function(){var t=new bi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Xl.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:V},minorGridLines:{type:V}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},Xl.prototype.aggregateCategories=function(){Bp.prototype.aggregateCategories.call(this,this.panes)},Xl.prototype.createCategoryAxesLabels=function(){Bp.prototype.createCategoryAxesLabels.call(this,this.panes)},Xl.prototype.filterSeries=function(t){return t},Xl.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Sa(t,[Br]),e),this.createLineChart(Sa(t,[Er]),e),this.createBarChart(Sa(t,[Rr]),e)},Xl.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},Xl.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Rl(this,this.chartOptions(t)),this.appendChart(t,e))},Xl.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Al(this,this.chartOptions(t)),this.appendChart(t,e))},Xl.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,o=new Gl(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},Xl.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Xl.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new O(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Ht(e),category:r,value:i})},Xl.prototype.createCrosshairs=function(){};var Wl,t=Xl;function Xl(){Wl.apply(this,arguments)}x(t.prototype,ja,{appendChart:Bp.prototype.appendChart,aggregateSeries:Bp.prototype.aggregateSeries,seriesSourcePoints:Bp.prototype.seriesSourcePoints}),e(t,{categoryAxis:{categories:[]},valueAxis:{}});var ql,N=t,l=((ql=o)&&(Yl.__proto__=ql),((Yl.prototype=Object.create(ql&&ql.prototype)).constructor=Yl).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new B(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new B(t.x1,e[0].y,t.x2,e[2].y))},Yl.prototype.createVisual=function(){var t=this,e=this.options;ql.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)},Yl.prototype.createPath=function(){var t=this.options,e=t.border;return b.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Yl.prototype.createHighlight=function(t){return b.drawing.Path.fromPoints(this.points,t)},Yl.prototype.highlightVisual=function(){return this.visual.children[0]},Yl.prototype.highlightVisualArgs=function(){var t=b.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Yl.prototype.tooltipAnchor=function(){var t=this.box;return{point:new O(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Yl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Yl);function Yl(t,e,o){ql.call(this,e),this.value=t,this.options.index=o.index}e(l,{color:a,border:{width:1}}),x(l.prototype,xn);const Zl=l;(Ql=o)&&($l.__proto__=Ql),(($l.prototype=Object.create(Ql&&Ql.prototype)).constructor=$l).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},$l.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,o=(void 0===e&&(e=[]),t.series[0]),i=o.data;if(i)for(var t=wa(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(a=h.fields,lt(o.color)||(o.color=a.color||e[s%e.length]),a=x({index:s,owner:this,series:o,dataItem:i[s],percentage:h.value/r},a,{visible:h.visible}),h=h.valueFields.value,p=this.createSegment(h,a),h=this.createLabel(h,a),p&&h&&p.append(h))}},$l.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;gn(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},$l.prototype.createSegment=function(t,e){var o=x({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible)return t=new Zl(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},$l.prototype.createLabel=function(t,e){var o,i=e.series,r=e.dataItem,n=x({},this.options.labels,i.labels),s=t;if(n.visible)return o=xt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:i},o?s=o(r):n.format&&(s=this.plotArea.chartService.format.auto(n.format,s)),n.color||(n.color=Jt(i.color),n.background||(n.background=i.color)),this.evalSegmentOptions(n,t,e),o=new We(s,x({vAlign:n.position},n),r),this.labels.push(o),o},$l.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!==w&&(i=t[o].box.width(),r===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},$l.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=i.dynamicHeight?o*d:o/n,d=_(d?(e-h*(f/d))/2:f?0:e/2,0,e);g.push(new b.geometry.Point(t.x1+l,t.y1+c)),g.push(new b.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new b.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new b.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+i.segmentSpacing,h=_(e-2*(l=d),0,e)}},$l.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,p=s?0:(e-e/i.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?h*d:h/n,d=i.dynamicHeight?o*d:o/n;u.push(new b.geometry.Point(t.x1+p,t.y1+l)),u.push(new b.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new b.geometry.Point(t.x1+e-p-f,t.y1+d+l)),u.push(new b.geometry.Point(t.x1+p+f,t.y1+d+l)),p+=f,l+=d+i.segmentSpacing}},$l.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)}};var Ql,Kl,h=$l;function $l(t,e){Ql.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}e(h,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:w,position:w,zIndex:1}}),x(h.prototype,jh);const Jl=h;function tc(){Kl.apply(this,arguments)}(Kl=Va)&&(tc.__proto__=Kl),((tc.prototype=Object.create(Kl&&Kl.prototype)).constructor=tc).prototype.render=function(){this.createFunnelChart(this.series)},tc.prototype.createFunnelChart=function(t){var e=t[0],t=new Jl(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(t)},tc.prototype.appendChart=function(t,e){Kl.prototype.appendChart.call(this,t,e),Lt(this.options.legend.items,t.legendItems)};var ec,c=tc,t=((ec=o)&&(oc.__proto__=ec),((oc.prototype=Object.create(ec&&ec.prototype)).constructor=oc).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},oc.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=xt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Jt(this.color),this.label=new We(e,x({align:w,vAlign:w,margin:{left:5,right:5},zIndex:M(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},oc.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},oc.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())},oc.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r=M(e.type,"rect")===$,o=M(o.width,r?1:0),r=Math.round(o/2);return e.size&&(t=i.center(),i.size.width=i.size.height=e.size,i.origin.x=Math.round(t.x-i.size.width/2),i.origin.y=Math.round(t.y-i.size.height/2)),i.size.width-=o,i.size.height-=o,i.origin.y+=r+.5,i.origin.x+=r+.5,Ue(i)},oc.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=M(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},oc.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Me({type:M(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:M(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=e,this.append(e)},oc.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new Me({type:M(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:M(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},oc.prototype.highlightVisual=function(){return this.rectVisual},oc.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},oc.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new O(t,e),align:{horizontal:w,vertical:D}}},oc.prototype.overlapsBox=function(t){return this.box.overlaps(t)},oc.prototype.unclipElements=function(){},oc.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},oc);function oc(t,e){ec.call(this),this.options=e,this.color=e.color||a,this.value=t}x(t.prototype,xn),x(t.prototype,_n),t.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};const ic=t;(rc=o)&&(nc.__proto__=rc),((nc.prototype=Object.create(rc&&rc.prototype)).constructor=nc).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:q,max:Y},this._evalSeries=[]},nc.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},nc.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;P(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},nc.prototype.addValue=function(t,e){var o;t&&P(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},nc.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],r=(P(s)||(this._evalSeries[r]=s=gn(t,{},n,!0)),t);return s&&gn(r=x({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},nc.prototype.pointType=function(){return ic},nc.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},nc.prototype.createPoint=function(t,e){var o,i,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(lt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=(0,b.parseColor)(e),r=1-o,a=function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}(t.value/this.valueRange.max)),new ic(t,s));return n.color=a,this.append(n),n},nc.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{xAxis:i,yAxis:o};throw new Error("Unable to locate Y axis with name "+t)},nc.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var o=s[p++],e=n.seriesAxes(e.series),i=e.xAxis,e=e.yAxis,r=i.categoryIndex(t.x),t=e.categoryIndex(t.y),i=i.getSlot(r,r,a),r=e.getSlot(t,t,a);o&&(i&&r?(e=n.pointSlot(i,r),o.reflow(e)):o.visible=!1)}),this.box=t},nc.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},nc.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(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var l=this._bindPoint(i,o,h),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=p.min<=d&&d<=p.max;u&&d&&t(c,x({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},l))}},nc.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},nc.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var rc,l=nc;function nc(t,e){rc.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(l,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),x(l.prototype,{_bindPoint:mn.prototype._bindPoint});const sc=l;(ac=Va)&&(pc.__proto__=ac),((pc.prototype=Object.create(ac&&ac.prototype)).constructor=pc).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},pc.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},pc.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=ae(n.categories||[]),a=ae(r.categories||[]),p=0;p<i.length;p++){var h=Ki.current.bindPoint(o,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},pc.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"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(Sa(r,[Cr]),i)}},pc.prototype.createHeatmapChart=function(t,e){t=new sc(this,{series:t});this.appendChart(t,e)},pc.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Ct([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Ct([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},pc.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,t=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(t)return{xAxis:o,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},pc.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},pc.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],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){c=Ki.current.bindPoint(l,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(Ca(s.type,F)||!s.type&&i?ei:qo)(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},pc.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++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(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]},pc.prototype.removeAxis=function(t){var e=t.options.name;ac.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},pc.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new O(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];_a(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(o,{element:Ht(e),originalEvent:e,x:Pa(a),y:Pa(p)})},pc.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);hc(this.options,i,o,e),hc(this.originalOptions,i,o,e)},pc.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})};var ac,h=pc;function pc(){ac.apply(this,arguments)}function hc(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}e(h,{xAxis:{},yAxis:{}}),x(h.prototype,ja);var lc,t=h,l="color",h="first",cc="max",uc="noteText",dc=(nh.current.register(Bp,[gr,_r,kr,Fr,fr,Dr,xr,Ar,mr,Ur,yr,Hr,zr,Ir,Gr,Sr,Lr,Nr]),nh.current.register(Rh,[Vr,jr,vr]),nh.current.register(Wh,[Pr]),nh.current.register(el,[br]),nh.current.register(c,[wr]),nh.current.register(On,[Tr,Mr,Or]),nh.current.register(N,[Br,Rr,Er]),nh.current.register(t,[Cr]),Ki.current.register([gr,_r,kr,Fr,fr,Dr],[tt],[n,l,uc,"errorLow","errorHigh"]),Ki.current.register([zr,Ir,Lr,Nr],["from","to"],[n,l,uc]),Ki.current.register([Gr,Sr],[tt],[n,l,uc,"summary"]),Ki.current.register([Tr,Mr,Or],[y,v],[l]),Ki.current.register([Br,Rr,Er],[tt],[l]),Ki.current.register([wr],[tt],[n,l,"visibleInLegend","visible"]),Na.current.register([gr,_r,kr,Fr,fr,Dr,Gr,Sr],{value:cc,color:h,noteText:h,errorLow:"min",errorHigh:cc}),Na.current.register([zr,Ir,Lr,Nr],{from:"min",to:cc,color:h,noteText:h}),Na.current.register([Br,Rr,Er],{value:cc,color:h}),Ki.current.register([Vr,jr,vr],[y,v],[l,uc,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ki.current.register([vr],[y,v,"size"],[l,n,uc]),Ki.current.register([Cr],[y,v,tt],[l,uc]),Ki.current.register([xr,Ar],["open","high","low","close"],[n,l,"downColor",uc]),Na.current.register([xr,Ar],{open:cc,high:cc,low:"min",close:cc,color:h,downColor:h,noteText:h}),Ki.current.register([yr,Hr],["lower","q1","median","q3","upper","mean","outliers"],[n,l,uc]),Na.current.register([yr,Hr],{lower:cc,q1:cc,median:cc,q3:cc,upper:cc,mean:cc,outliers:h,color:h,noteText:h}),Ki.current.register([mr,Ur],["current","target"],[n,l,"visibleInLegend",uc]),Na.current.register([mr,Ur],{current:cc,target:cc,color:h,noteText:h}),Ki.current.register([Pr,br],[tt],[n,l,"explode","visibleInLegend","visible"]),[n,tt,y,v]),c=((lc=b.Class)&&(L.__proto__=lc),((L.prototype=Object.create(lc&&lc.prototype)).constructor=L).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},L.prototype._setElementClass=function(t){it(t,"k-chart")},L.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;for(var n=t,s=dc,a=0;a<s.length;a++){var p=s[a]+"Axes";n[p]&&(n[s[a]+"Axis"]=n[p],delete n[p])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=x({},e,t),this.applySeriesColors()},L.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)}},L.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&&Yt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},L.prototype._resize=function(){this._noTransitionsRedraw()},L.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()},L.prototype.getAxis=function(t){return Di(t,this._plotArea.axes)},L.prototype.findAxisByName=function(t){return this.getAxis(t)},L.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Fi(e[o])},L.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Fi(e[t])},L.prototype.plotArea=function(){return new Ni(this._plotArea)},L.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=lt(e)?r.filterPoints(e):(ut(e)?(o=e.series,i=e.category):o=i=e,n.type===br?fc(r.pointsBySeriesName(o),i):n.type===Pr||n.type===wr?fc((r.charts[0]||{}).points,i):r.pointsBySeriesName(o));e&&this.togglePointsHighlight(t,e)},L.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},L.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;lt(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&P(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(n=this._plotArea.pointsByCategoryIndex(o),r.showAt(n)):e&&r.show(e)},L.prototype.hideTooltip=function(){this._tooltip.hide()},L.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&jt(e,{width:o.width}),o.height&&jt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=b.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},L.prototype._surfaceWrap=function(){return this.element},L.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 Lp,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),_c(this._plotArea.panes),this._navState||this._cancelDomEvents()},L.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(o=this.options,t=x({},t.options,{chartArea:{width:t.width,height:t.height}}),xc(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),_c(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},L.prototype._sharedTooltip=function(){return this._plotArea instanceof Bp&&this.options.tooltip&&this.options.tooltip.shared},L.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Dp(this._plotArea,t.pannable))},L.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Wp(this,e))},L.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new qp(this,e))},L.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==o||this.requiresHandlers([Kr,Zr,Qr])),o=(!1===e||!1===i)&&!this.requiresHandlers([$r,Jr,tn]),e=this.element;this._dragZoomEnabled&&t&&o?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&o||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!o)},L.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},L.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new dh(this.chartService,t)},L.prototype._createSharedTooltip=function(t){return new yh(this._plotArea,t)},L.prototype.applyDefaults=function(t,e){var o,i,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||i.color,e=x({},s,s[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[o],e}for(var p=0;p<dc.length;p++)i=n.axisDefaults||{},r=(r=[].concat(n[o=dc[p]+"Axis"])).map(a),n[o]=1<r.length?r:r[0];var h=t,t=e,l=h.series,c=l.length,u=h.seriesDefaults,d=x({},h.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);gc(d),gc(g);for(var y=0;y<c;y++){var v=l[y].type||h.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:h.tooltip},d,u[v]);l[y]._defaults=v,l[y]=x({},v,l[y]),l[y].data=l[y].data||[]}},L.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)}},L.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Ee(this._modelOptions());return o.chart=this,o._plotArea=e,Ye.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new oh(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},L.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return x({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},L.prototype._createPlotArea=function(t){var e=this.options;return nh.current.create(t?[]:e.series,e,this.chartService)},L.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 qo&&n.select&&!n.vertical&&(i=r.range(),r=new ch(this,r,x({min:i.min,max:i.max},n.select)),e.push(r))}},L.prototype._selectStart=function(t){return this.trigger(en,t)},L.prototype._select=function(t){return this.trigger(on,t)},L.prototype._selectEnd=function(t){return this.trigger(rn,t)},L.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=(0,b.throttle)(this._mousemove.bind(this),20)},L.prototype.addObserver=function(t){t&&this.observers.push(t)},L.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},L.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},L.prototype.trigger=function(t,e){void 0===e&&(e={}),t===nn&&(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},L.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,It(e,((t={}).contextmenu=this._clickHandler,t[ln]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&It(e,((t={}).mousemove=this._mousemove,t)),this.domEvents=co.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()},L.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger(Yr),this._plotArea.hovered=!1)},L.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},L.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},L.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(tn,{}))},L.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,o={delta:e,axisRanges:yc(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger($r,o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(Jr,o)&&i.zoom())))},L.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},L.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Kr,Zr,Qr])&&this._startNavigation(t,e,Kr),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($r,{axisRanges:yc(this._plotArea.axes),originalEvent:t}))},L.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(Zr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];!p.options.name||0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(Zr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},L.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(Qr,{axisRanges:yc(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,Qr),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Jr,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(tn,{axisRanges:e,originalEvent:t})))},L.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},L.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return M(t.rate,.3)},L.prototype._mousewheel=function(t){var e=this,o=Rt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:yc(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger($r,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(Jr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(tn,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=i||this._startNavigation(t,r,$r)?i:this._navState){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(Jr,{delta:o,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,tn)},150)}}},L.prototype._startNavigation=function(t,e,o){var i,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(i=yc(r),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:e,axes:r}))},L.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},L.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},L.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},L.prototype._eventCoordinates=function(t){t=Dt(t);return this._toModelCoordinates(t.x,t.y)},L.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=gt(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},L.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=Vt(this.element);return{left:T(t.x+e.left+o.left),top:T(t.y+e.top+o.top)}},L.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Vt(o),r=this._elementPadding(),o=$t(o).invert(),t=new b.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new O(t.x,t.y)},L.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)},L.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},L.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},L.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Va)}),o=this._activePoint,i=1<this._plotArea.series.length,r=this._hasInactiveOpacity();return this._updateHoveredPoint(t,e),t&&o!==t&&t.hover?(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),r?this._displayInactiveOpacity(t,i):this._highlight.show(t))):!t&&r&&(i&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),t},L.prototype._displayTooltip=function(t){x({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},L.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()?(e=this._getInactivePoints(t,i))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},L.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},L.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},L.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)},L.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))}},L.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)}},L.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},L.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},L.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},L.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},L.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),It(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},L.prototype._mouseMoveTracking=function(t){var e=this.options,o=this._tooltip,i=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&!(this._activePoint=n).hover(this,t)&&(x({},e.tooltip,n.options.tooltip).visible&&o.show(n),i.show(n)):(Wt(document,((r={}).mousemove=this._mouseMoveTrackHandler,r)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},L.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(Yr),i.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(o,t)},L.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()}},L.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,p,h;this._suppressHover||(i=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((h=(p=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger(Xr,h)?(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))},L.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},L.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()},L.prototype._deferRedraw=function(){this._redraw()},L.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},L.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)}},L.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new At,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var f=(o=Aa(t,Yi(l.categoryField,u[0])))?ka:Yi,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=Vo);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?Vo:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],Ft(i))&&i.push(e[r]);return i}(function(t,e){return Vo(t[0],e[0])}):a),t.categories=i[0]):p&&(t.categories=[])},L.prototype._isBindable=function(t){for(var e=Ki.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===tt?r="field":r+="Field",!P(t[r])){o=!1;break}}return o},L.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},L.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[Pr,br,wr])?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)},L.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([qr,Yr])},L.prototype.updateMouseMoveHandler=function(){var t;Wt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&It(this.element,((t={}).mousemove=this._mousemove,t))},L.prototype.applyOptions=function(t,e){xc(this._originalOptions,t),this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},L.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},L.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},L.prototype.setIntlService=function(t){this.chartService.intl=t},L.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},L.prototype.destroy=function(){var t;this._destroyed=!0,Wt(this.element,((t={}).contextmenu=this._clickHandler,t[ln]=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()},L.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},L.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},L.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)},L);function L(t,e,o,i){var r=this,i=(void 0===i&&(i={}),lc.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new po(this,i),this.chartService.theme=o,this._initElement(t),x({},this.options,e));this._originalOptions=x({},i),this._theme=o,this._initTheme(i,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Xt.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function fc(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function gc(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 yc(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 vc,mc=["data","categories"];function xc(t,e){for(var o in e){var i,r,n;!u(o,mc)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],P(r)&&((n=null===i)||!P(i)?(delete t[o],n&&delete e[o]):r&&ut(i)&&ut(r)&&xc(r,i)))}}function _c(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e(c,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:_r,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});const bc=c;function wc(){vc.apply(this,arguments)}(vc=yh)&&(wc.__proto__=vc),((wc.prototype=Object.create(vc&&vc.prototype)).constructor=wc).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 O(this.plotArea.box.x2,e.center().y):new O(e.center().x,-2),align:i}},wc.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const Cc=wc;var Sc=[gr,mr];function kc(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 Ac(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Pc(t){return m(t)?[t]:t}(Tc=bc)&&(Oc.__proto__=Tc),((Oc.prototype=Object.create(Tc&&Tc.prototype)).constructor=Oc).prototype._setElementClass=function(t){it(t,"k-sparkline")},Oc.prototype._initElement=function(t){Tc.prototype._initElement.call(this,t),this._initialWidth=Math.floor(jt(t).width)},Oc.prototype._resize=function(){var t=this.element,e=kc(t.childNodes);this._initialWidth=Math.floor(jt(t).width),Ac(t.childNodes,e),Tc.prototype._resize.call(this)},Oc.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=kc(e.childNodes),i=document.createElement("span"),t=(i.innerHTML="&nbsp;",e.appendChild(i),x({width:this._autoWidth,height:jt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return jt(e,{width:t.width,height:t.height}),e.removeChild(i),Ac(e.childNodes,o),this.surface&&this.surface.resize(),t},Oc.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Oc.prototype._createPlotArea=function(t){t=Tc.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Oc.prototype._calculateWidth=function(t){for(var e=this.options,o=A(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===gr)return 150;if(p.type===mr)return 150;if(p.type===Pr)return jt(r).height;var h=a.categoryAxis;h&&(h=h.categoriesCount()*(!a.options.isStacked&&u(p.type,[_r,Ur])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},Oc.prototype._createSharedTooltip=function(t){return new Cc(this._plotArea,t)},Oc.normalizeOptions=function(t){t=Pc(t);return(t=ot(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:Pc(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Sc)||u(t.seriesDefaults.type,Sc)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Tc,Mc,On=Oc;function Oc(){Tc.apply(this,arguments)}e(On,{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}]});const Bc=On;function Rc(){Mc.apply(this,arguments)}(Mc=b.drawing.Animation)&&(Rc.__proto__=Mc),((Rc.prototype=Object.create(Mc&&Mc.prototype)).constructor=Rc).prototype.setup=function(){this._initialOpacity=parseFloat(gt(this.element,"opacity").opacity)},Rc.prototype.step=function(t){gt(this.element,{opacity:String(Pt(this._initialOpacity,0,t))})},Rc.prototype.abort=function(){Mc.prototype.abort.call(this),gt(this.element,{display:"none",opacity:String(this._initialOpacity)})},Rc.prototype.cancel=function(){Mc.prototype.abort.call(this),gt(this.element,{opacity:String(this._initialOpacity)})};const Ec=Rc;function Lc(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}(Ic=b.Class)&&(zc.__proto__=Ic),((zc.prototype=Object.create(Ic&&Ic.prototype)).constructor=zc).prototype.createElements=function(){var t=this.element=Lc("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Lc("k-tooltip k-chart-tooltip"),o=this.scroll=Lc("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(o)},zc.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=d(f(t)+f(e-t)/2),p=.4*o.width(),h=o.center().x-p,l=(o.center().x-h)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=xt(r),r=(this.clearHideTimeout(),this._visible||(gt(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,gt(s,{left:o.center().x-s.offsetWidth/2,top:o.y1}),gt(s,["marginTop","borderTopWidth","height"]));gt(n,{width:p,left:h+a*l,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),gt(i,{visibility:"visible"})},zc.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},zc.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Ec(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},zc.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};var Ic,N=zc;function zc(t,e,o){Ic.call(this),this.options=x({},this.options,o),this.container=t,this.chartService=e;o=gt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}e(N,{format:"{0:d} - {1:d}",hideDelay:500});const Vc=N;var jc,Dc="_navigator",Hc=Dc;function Uc(t){jc.call(this),this.chart=t;var e=this.options=x({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),P(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Mt(this,((o={}).drag="_drag",o.dragEnd="_dragEnd",o.zoom="_zoom",o.zoomEnd="_zoomEnd",o)),t.addObserver(this.chartObserver)}function Fc(){}(jc=b.Class)&&(Uc.__proto__=jc),((Uc.prototype=Object.create(jc&&jc.prototype)).constructor=Uc).prototype.parseDate=function(t){return No(this.chart.chartService.intl,t)},Uc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Uc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Uc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Uc.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,i=i.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,p=(Fc.prototype=o,new Fc);0!==o.categoriesCount()&&(this.clean(),p.box=o.box,this.selection=new ch(t,p,{min:r,max:i,from:s||r,to:a||i,mousewheel:M(n,{zoom:"left"}),visible:e.visible},new Mt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Vc(t.element,t.chartService,{min:r,max:i,template:xt(e.hint),format:e.hint.format})))},Uc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Hc].roundedRange(),e=t.min,t=t.max,o=this.options.select||{},i=o.from||e,r=o.to||t;this.options.select=x({},o,{from:i=i<e?e:i,to:r=t<r?t:r}),this.filterAxes()},Uc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Ft(e.panes),t)},Uc.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)},Uc.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(i),i=e._plotArea.categoryAxis,e=t.axisRanges[i.options.name],t=this.options.select;e&&!r&&o&&(i=t.from&&t.to?f(t.to)-f(t.from):f(o.options.to)-f(o.options.from),r=d(_(f(e.min),n.min,f(n.max)-i)),t=d(_(f(r)+i,f(n.min)+i,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(r,t),this.showHint(r,t))},Uc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Uc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},Uc.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!==Dc&&(n.min=o,n.max=i)}},Uc.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:i.from,to:i.to},"category"!==e.options.type&&(e=new ei(x({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=Lo(e.min,-e.baseUnitStep,e.baseUnit),t.to=Lo(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},Uc.prototype._zoom=function(t){var e,o,i=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),p=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),o=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(p)&&(p*=3),1<a-e?(r.zoom(p,o),this.readSelection()):(i.options.min=s.from,s.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),o).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},Uc.prototype._zoomEnd=function(t){this._dragEnd(t)},Uc.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},Uc.prototype._selectStart=function(t){return this.chart._selectStart(t)},Uc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Uc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Uc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Hc]},Uc.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}},Uc.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=x({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=x({},o.pane,{name:Dc}),o.visible||(r.visible=!1,r.height=.1),i.push(r),Uc.attachAxes(t,o),Uc.attachSeries(t,o,e))},Uc.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=0===Sa(o,Wr).length,o=x({type:"date",pane:Dc,roundToBaseUnit:!o,justified:o,_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]}}),r=e.categoryAxis;i.push(x({},o,{maxDateGroups:200},r,{name:Hc,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},o,r,{name:Hc+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},o,r,{name:Hc+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Hc,pane:Dc,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Uc.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(x({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Hc,categoryAxis:Hc,autoBind:e.autoBindElements}))};const Nc=Uc;(Gc=bc)&&(Wc.__proto__=Gc),((Wc.prototype=Object.create(Gc&&Gc.prototype)).constructor=Wc).prototype.applyDefaults=function(t,e){var o=jt(this.element).width||600,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&&x({},e,o);Nc.setup(t,e),Gc.prototype.applyDefaults.call(this,t,e)},Wc.prototype._setElementClass=function(t){it(t,"k-chart k-stockchart")},Wc.prototype.setOptions=function(t){this.destroyNavigator(),Gc.prototype.setOptions.call(this,t)},Wc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Wc.prototype._resize=function(){this.noTransitionsRedraw()},Wc.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Wc.prototype._dirty=function(){var t=this.options,t=Ct([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Wc.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Nc(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Gc.prototype._redraw.call(this),t.initSelection()},Wc.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Dc?this._unsetActivePoint():Gc.prototype._trackSharedTooltip.call(this,t)},Wc.prototype.bindCategories=function(){Gc.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Wc.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Hc?t=i.categories:t&&i.pane===Dc&&(i.categories=t)}},Wc.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Wc.prototype.destroy=function(){this.destroyNavigator(),Gc.prototype.destroy.call(this)},Wc.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Gc.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Dc},Wc.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)};var Gc,t=Wc;function Wc(){Gc.apply(this,arguments)}e(t,{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}});const Xc=t;var qc="arrowPointer",Yc="barPointer",Zc=Math.PI/180,Qc="inside",uc="linear",Kc="outside",cc="radialPointer",h="radialRangePointer";function $c(t,e){var o=t.getOrigin(),i=t.getSize(),e=A(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 Jc=b.drawing.Group,tu=b.drawing.Path,eu=b.drawing.Text;function ou(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=tu.fromRect(new b.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new eu(t.text,new b.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=$c(t.bbox().clone(),e.padding),e=tu.fromRect(i,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),i=new Jc;return i.append(o),i.append(e),i.append(t),i}function iu(t,e,o){var i=P(t.from)?t.from:Y,r=P(t.to)?t.to:q;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function ru(t,e){e=A(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,$c(t,e)}var nu,su=b.drawing.Path,au=b.drawing.Surface,l=((nu=b.Class)&&(pu.__proto__=nu),((pu.prototype=Object.create(nu&&nu.prototype)).constructor=pu).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},pu.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},pu.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},pu.prototype.exportVisual=function(){return this._visuals},pu.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(ot(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},pu.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]},pu.prototype.resize=function(){this.noTransitionsRedraw()},pu.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},pu.prototype.redraw=function(){var t=this._surfaceSize(),t=new b.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),ru(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},pu.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},pu.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},pu.prototype.setIntlService=function(t){this.contextService.intl=t},pu.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=x({},e,this.options),this.options),o=t.pointer;if(ot(o)){for(var i=[],r=0;r<o.length;r++)i.push(x({},e.pointer,o[r]));t.pointer=i}},pu.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new b.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=ru(e,o.width)),su.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},pu.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();jt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=au.create(o,{type:t.renderAs}))},pu.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},pu.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},pu.prototype.getSize=function(){return this._getSize()},pu.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}},pu.prototype._defaultSize=function(){return{width:200,height:200}},pu.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},pu);function pu(t,e,o,i){void 0===i&&(i={}),nu.call(this),this.element=t,this.theme=o,this.contextService=new po(this,i),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(o),this.redraw()}e(l,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const hu=l;var lu=b.drawing.Path,cu=b.drawing.Group,uu=b.geometry.Point;function du(t,e,o,i){var r,n,s,a,p,h,l=e.length;if(i.visible)for(var c=o.mirror,u=o.lineBox,d=i.skip;d<l;d+=i.step)d%i.skipUnit!=0&&(o.tickX=c?u.x2:u.x2-i.size,o.tickY=c?u.y1-i.size:u.y1,o.position=e[d],t.append((n=i,h=p=a=s=void 0,a=(r=o).position,p=o.tickX,h=o.tickY,r=o.vertical?(s=new uu(p,a),new uu(p+n.size,a)):(s=new uu(a,h),new uu(a,h+n.size)),new lu({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(fu=hi)&&(gu.__proto__=fu),((gu.prototype=Object.create(fu&&fu.prototype)).constructor=gu).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||le(t.min,t.max),t},gu.prototype.initFields=function(){},gu.prototype.render=function(){var t=this.elements=new cu,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},gu.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 cu,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=iu(n[h],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(lu.fromRect(new b.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},gu.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new cu,i=0;i<t.length;i++)o.append(ou(t[i],e.labels));return o},gu.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new cu;return 0<t.width&&t.visible&&((t=new lu({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},gu.prototype.renderTicks=function(){var t=new cu,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return du(t,this.getMajorTickPositions(),i,e.majorTicks),du(t,this.getMinorTickPositions(),i,x({},{skipUnit:o/e.minorUnit},e.minorTicks)),t};var fu,n=gu;function gu(t,e){t=t||{};!P(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),fu.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}e(n,{min:0,max:50,majorTicks:{size:15,align:Qc,color:j,width:.5,visible:!0},minorTicks:{size:10,align:Qc,color:j,width:.5,visible:!0},line:{width:.5},labels:{position:Qc,padding:2},mirror:!1,_alignLines:!1});const yu=n;(vu=b.Class)&&(mu.__proto__=vu),((mu.prototype=Object.create(vu&&vu.prototype)).constructor=mu).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=P(e._oldValue)?e.value:i,e.value=_(t,i,o),this.elements&&this.repaint()};var vu,c=mu;function mu(t,e){vu.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=x({},this.options,e);e.fill=e.color,this.scale=t,P(e.value)?e.value=_(e.value,i,o):e.value=i}e(c,{color:j});var xu,On=c,N=((xu=On)&&(_u.__proto__=xu),((_u.prototype=Object.create(xu&&xu.prototype)).constructor=_u).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=i.track.size||i.size,p=i.size/2,h=A(i.margin),h=n?h[s?"left":"right"]:h[s?"bottom":"top"],h=s?-h:h;n?(o=new B(r.x1+h,r.y1,r.x1+h,r.y2),s?o.x1-=a:o.x2+=a,i.shape!==Yc&&(t=e=new B(r.x2+h,r.y1-p,r.x2+h,r.y2+p))):(o=new B(r.x1,r.y1-h,r.x2,r.y1-h),s?o.y2+=a:o.y1-=a,i.shape!==Yc&&(t=e=new B(r.x1-p,r.y1-h,r.x2+p,r.y1-h))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},_u.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:P(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},_u.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=A(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},_u);function _u(t,e){xu.call(this,t,e),this.options=x({track:{visible:P(e.track)}},this.options)}e(N,{shape:Yc,track:{border:{width:1}},color:j,border:{width:1},opacity:1,margin:A(3),animation:{type:Yc},visible:!0});const bu=N;(wu=b.drawing.Animation)&&(Cu.__proto__=wu),((Cu.prototype=Object.create(wu&&wu.prototype)).constructor=Cu).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e),this.fromScale=new b.geometry.Point(o.x1,o.y1)),n=this.toScale=new b.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Cu.prototype.step=function(t){var e=Pt(this.fromScale.x,this.toScale.x,t),t=Pt(this.fromScale.y,this.toScale.y,t);this.element.transform(b.geometry.transform().translate(e,t))};var wu,t=Cu;function Cu(){wu.apply(this,arguments)}e(t,{easing:uc,duration:250}),b.drawing.AnimationFactory.current.register(qc,t);const Su=t;var ku,Au=b.geometry.Point,Pu=b.drawing.Path;function Tu(t,e){ku.call(this,t,e),P(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(ku=bu)&&(Tu.__proto__=ku),((Tu.prototype=Object.create(ku&&ku.prototype)).constructor=Tu).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 Au(0,0-o),new Au(0-i*e,0),new Au(0,0+o)]:[new Au(0-o,0),new Au(0,0+i*e),new Au(0+o,0)]},Tu.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Su(this.elements,x(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()},Tu.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type=qc,new Pu({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(b.geometry.transform().translate(i.x1,i.y1)),this.elements=o};const Mu=Tu;(Ou=b.drawing.Animation)&&(Bu.__proto__=Ou),((Bu.prototype=Object.create(Ou&&Ou.prototype)).constructor=Bu).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,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)},Bu.prototype.step=function(t){t=Pt(this.from,this.to,t);this._set(t)},Bu.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)};var Ou,l=Bu;function Bu(){Ou.apply(this,arguments)}e(l,{easing:uc,speed:250}),b.drawing.AnimationFactory.current.register(Yc,l);const Ru=l;var Eu,Lu=b.drawing.Group,Iu=b.drawing.Path;function zu(t,e){Eu.call(this,t,e),P(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(Eu=bu)&&(zu.__proto__=Eu),((zu.prototype=Object.create(Eu&&Eu.prototype)).constructor=zu).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,i=i.vertical,r=r===i?-1:1,o=o.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=i?v:y,s=i?y:v,r=this._margin()*r,a=new b.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new b.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],i?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return i?(t.translate(o,0),e.translate(o,0)):(t.translate(0,o),e.translate(0,o)),[a,n,t,e]},zu.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue),i=(i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),new Ru(i,x(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]})));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},zu.prototype.render=function(){var t=new Lu,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new Iu({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},zu.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Iu.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const Vu=zu;var ju,Du=b.drawing.Group,n=((ju=hu)&&(Hu.__proto__=ju),((Hu.prototype=Object.create(ju&&ju.prototype)).constructor=Hu).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new B(o,i,o+t.width(),i+t.height());this.scale.reflow(o),this._shrinkScaleWidth(o);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(o),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Hu.prototype._buildVisual=function(){var t=new Du,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},Hu.prototype._createModel=function(){var t=this.options,e=this.scale=new yu(t.scale,this.contextService);this.pointers=[];for(var o=ot(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=x({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Mu:Vu;this.pointers.push(new n(e,r))}},Hu.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Hu.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 B(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new B(t.x1,r.y-e,t.x2,r.y+e))},Hu.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 B(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new B(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Hu.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))},Hu.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)},Hu);function Hu(){ju.apply(this,arguments)}e(n,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const Uu=n;var Fu=b.drawing.Arc,Nu=b.drawing.Path,Gu=b.drawing.Group;function Wu(t,e,o,i){var r=new Gu,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new b.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Nu({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(h))}return r}function Xu(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}(qu=hi)&&(Yu.__proto__=qu),((Yu.prototype=Object.create(qu&&qu.prototype)).constructor=Yu).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||le(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Yu.prototype.initFields=function(){},Yu.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Yu.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!P(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Yu.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-o)/(i-o)*s:(t-o)/(i-o)*s+n)+180},Yu.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Yu.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,o=0;return e.visible&&(o=e.size),o=t.visible?Math.max(t.size,o):o},Yu.prototype.labelsCount=function(){var t=qu.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Yu.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 Gu,s=.05*o,a=(P(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),p=a.position===Qc,h=P(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!h&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,r=A(a.padding),u=(r.left+r.right)/2,d=(r.top+r.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)*Zc,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(p?1:-1),m=m.y+Math.sin(x)*(v+d)*(p?1:-1),x=(g.reflow(new B(_-y,m-v,_+y,m+v)),new b.geometry.Point(g.box.x1,g.box.y1)),_=void 0;h?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||b.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=ou(g,t.labels),n.append(_)),this.bbox=b.geometry.Rect.union(this.bbox,_.bbox())}return n},Yu.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,e=e.rangeSize,i=this.getRangeRadius();this.options.labels.position===Qc&&(i+=e+o);for(var r=i+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=b.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Yu.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Gu;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 p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&o.append(this.createRange(h,l,s,p))}}return o},Yu.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new b.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Fu(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Yu.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(Xu(r,n,s));for(var a=0;a<o;a++)for(var p=iu(e[a],r,n),h=i.length,l=0;l<h;l++){var c=i[l];if(c.from<=p.from&&p.from<=c.to){i.push(Xu(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(Xu(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},Yu.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Kc?t.getRadiusX()-r-i-o:t.getRadiusX()-o},Yu.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new b.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Yu.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Wu(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Gu),n=(r.append(this.majorTicks),o.majorTicks.size),s=o.minorTicks.size;return this._tickDifference=n-s,o.labels.position===Kc&&(t=i.getRadiusX(),i.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,o.minorUnit)),this.minorTicks=Wu(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Yu.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},Yu.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,p=n/s;i&&(a+=n,p=-p),360<=n&&o.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(T(a,3)),a+=p;return T(a)<=t.endAngle&&h.push(a),h},Yu.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)},Yu.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&this.options.labels.position===Kc&&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]),p=t[s].segments,h=a.x-p[0].anchor().x,a=a.y-p[0].anchor().y;t[s].transform((new b.geometry.transform).translate(h,a))}};var qu,c=Yu;function Yu(t,e){qu.call(this,0,1,t,e)}e(c,{min:0,max:100,majorTicks:{size:15,align:Qc,color:j,width:.5,visible:!0},minorTicks:{size:10,align:Qc,color:j,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Qc,padding:2}});const Zu=c;(Qu=b.drawing.Animation)&&(Ku.__proto__=Qu),((Ku.prototype=Object.create(Qu&&Qu.prototype)).constructor=Ku).prototype.step=function(t){var e=this.options,t=Pt(e.oldAngle,e.newAngle,t);this.element.transform(b.geometry.transform().rotate(t,e.center))};var Qu,N=Ku;function Ku(t,e){Qu.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}e(N,{easing:uc,duration:150}),b.drawing.AnimationFactory.current.register(cc,N);const $u=N;var Ju,td=b.drawing.Circle,ed=b.drawing.Group,od=b.drawing.Path,t=((Ju=On)&&(id.__proto__=Ju),((id.prototype=Object.create(Ju&&Ju.prototype)).constructor=id).prototype.setAngle=function(t){this.elements.transform(b.geometry.transform().rotate(t,this.center))},id.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 $u(this.elements,x(e.animation,{oldAngle:o,newAngle:t})).play()},id.prototype.render=function(){var t=this.scale,e=this.options,o=new ed;return!1!==e.animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Zc),o},id.prototype.reflow=function(t){var e=this.center=t.center,o=_(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(t*this.options.cap.size);this.bbox=b.geometry.Rect.fromPoints(new b.geometry.Point(e.x-o,e.y-o),new b.geometry.Point(e.x+o,e.y+o))},id.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new od({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},id.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new b.geometry.Circle(this.center,this.capSize);return new td(e,{fill:{color:t},stroke:{color:t}})},id);function id(){Ju.apply(this,arguments)}e(t,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:cc,duration:150}});const rd=t;var nd,sd=b.drawing.Group,l=((nd=hu)&&(ad.__proto__=nd),((ad.prototype=Object.create(nd&&nd.prototype)).constructor=ad).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=b.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},ad.prototype._buildVisual=function(t,e,o){var i=this._visuals=new sd;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},ad.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)}},ad.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)),p=T(a,3),h=T(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=0<e&&0<i?2*p:e<0&&i<0?2*h:T((p+h)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(h=r,i=o):(p=r,e=o)},ad.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=b.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},ad.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},ad.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,e=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=b.geometry.Rect.union(r.bbox,n[s].bbox)},ad.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Zu(t.scale,this.contextService);this.pointers=[];for(var i=ot(e)?e:[e],r=0;r<i.length;r++){var n=new rd(o,x({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},ad);function ad(){nd.apply(this,arguments)}e(l,{transitions:!0,gaugeArea:{background:""}});const pd=l;(hd=Zu)&&(ld.__proto__=hd),((ld.prototype=Object.create(hd&&hd.prototype)).constructor=ld).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},ld.prototype.hasRanges=function(){return!0},ld.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},ld.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),i=this.slotAngle(i?t:e),t=this.createRange(r,i,this.getRangeRadius(),o);return this.ranges.append(t),t};var hd,n=ld;function ld(){hd.apply(this,arguments)}e(n,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const cd=n;(ud=b.drawing.Animation)&&(dd.__proto__=ud),((dd.prototype=Object.create(ud&&ud.prototype)).constructor=dd).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=Pt(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=T(Pt(i.r,r.r,t)),e=T(Pt(i.g,r.g,t)),i=T(Pt(i.b,r.b,t)),this.element.stroke(new b.Color(o,e,i).toHex()))};var ud,c=dd;function dd(t,e){ud.call(this,t,e);var e=this.options,o=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=_(o,150,800),t.elements.options.get("stroke.color")),o=t.currentColor();e!==o&&(this.startColor=new b.Color(e),this.color=new b.Color(o))}e(c,{easing:uc,duration:150}),b.drawing.AnimationFactory.current.register(h,c);const fd=c;(gd=On)&&(md.__proto__=gd),((md.prototype=Object.create(gd&&gd.prototype)).constructor=md).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 fd(this,x(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},md.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},md.prototype.stroke=function(t){this.elements.stroke(t)},md.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&x(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}))},md.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,t=this.options,i=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(i)for(var s=0;s<i.length;s++){var a=i[s],p=a.color,h=a.from,a=(void 0===h&&(h=e),a.to);if(void 0===a&&(a=o),h<=n&&n<=a)return p}return r},md.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()};var gd,yd,vd,N=md;function md(){gd.apply(this,arguments)}e(N,{animation:{type:h,duration:150}});const xd=N;function _d(){yd.apply(this,arguments)}(yd=pd)&&(_d.__proto__=yd),((_d.prototype=Object.create(yd&&yd.prototype)).constructor=_d).prototype._initTheme=function(t){yd.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},_d.prototype._createModel=function(){var t=this.options,e=this.scale=new cd(t.scale,this.contextService),e=new xd(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},_d.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},_d.prototype._setValueOptions=function(t){this.options.value=t},_d.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},_d.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,i=i.y-e/2;return t<o.width&&(t=r+t,r=Math.max(r,0),t>o.width&&(r-=t-o.width)),e<o.height&&(o=(t=this.scale.bbox).bottomRight().y,e=i+e,i=Math.max(i,t.origin.y),o<e&&(i-=e-o)),{left:r,top:i}};const bd=_d;function wd(){vd.apply(this,arguments)}(vd=bd)&&(wd.__proto__=vd),((wd.prototype=Object.create(vd&&vd.prototype)).constructor=wd).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,vd.prototype._createModel.call(this)};const Cd=wd;(Sd=b.Class)&&(kd.__proto__=Sd),((kd.prototype=Object.create(Sd&&Sd.prototype)).constructor=kd).prototype.initProperties=function(){},kd.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},kd.prototype.encode=function(t,e,o){t=P(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}},kd.prototype.initValue=function(){},kd.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},kd.prototype.addData=function(){},kd.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")};var Sd,cc=kd;function kd(t){Sd.call(this),this.setOptions(t),this.initProperties()}e(cc,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Ad,Pd=Object.assign,t=((Ad=cc)&&(Td.__proto__=Ad),((Td.prototype=Object.create(Ad&&Ad.prototype)).constructor=Td).prototype.initProperties=function(){Ad.prototype.initProperties.call(this),Pd(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"})},Td.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Td.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()},Td.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Td.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&&(o=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=o,this.addPattern(this.characterMap[o]))},Td.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},Td.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Td.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Td.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Td.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},Td);function Td(){Ad.apply(this,arguments)}e(t,{addCheckSum:!0});var Md,Od,Bd=Object.assign,l=((Od=cc)&&(Ed.__proto__=Od),((Ed.prototype=Object.create(Od&&Od.prototype)).constructor=Ed).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Bd(this,{minBaseUnitLength:.7})},Ed.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()},Ed.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Ed.prototype.addBase=function(){},Ed),n=((Md=l)&&(Rd.__proto__=Md),((Rd.prototype=Object.create(Md&&Md.prototype)).constructor=Rd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),Bd(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"}}})},Rd.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Rd.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)throw i=Math.ceil(this.getBaseWidth(o)*e),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))},Rd.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Rd.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Rd.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Rd.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Rd.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Rd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Rd.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Rd);function Rd(){Md.apply(this,arguments)}function Ed(){Od.apply(this,arguments)}e(n,{addCheckSum:!1});var Ld,Id,zd,Vd,jd,Dd,Hd,Ud,Fd,Nd,Gd,Wd={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"]},uc=((Dd=n)&&(nf.__proto__=Dd),((nf.prototype=Object.create(Dd&&Dd.prototype)).constructor=nf).prototype.initProperties=function(){Dd.prototype.initProperties.call(this),x(this,Wd,{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}}})},nf),Xd=Object.assign,c=((jd=l)&&(rf.__proto__=jd),((rf.prototype=Object.create(jd&&jd.prototype)).constructor=rf).prototype.initProperties=function(){jd.prototype.initProperties.call(this),Xd(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"}})},rf.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},rf.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)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),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.")},rf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},rf.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},rf.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},rf.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},rf.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)},rf.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]},rf.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},rf.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},rf.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},rf),On=((Vd=c)&&(of.__proto__=Vd),((of.prototype=Object.create(Vd&&Vd.prototype)).constructor=of).prototype.initProperties=function(){Vd.prototype.initProperties.call(this),x(this,Wd,{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))}})},of),qd=/^\d+$/,Yd=Object.assign,h=((zd=cc)&&(ef.__proto__=zd),((ef.prototype=Object.create(zd&&zd.prototype)).constructor=ef).prototype.initProperties=function(){zd.prototype.initProperties.call(this),Yd(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},ef.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()},ef.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()},ef.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},ef.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},ef.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},ef.prototype.validate=function(t){if(qd.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},ef.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)},ef),Zd=/^\d+$/,Qd=/^[a-z0-9]+$/i,Kd=Object.assign,N=((Id=b.Class)&&(tf.__proto__=Id),((tf.prototype=Object.create(Id&&Id.prototype)).constructor=tf).prototype.initProperties=function(){},tf.prototype.addStart=function(){},tf.prototype.is=function(){},tf.prototype.isCode=function(){return!1},tf.prototype.move=function(){},tf.prototype.pushState=function(){},tf),l=((Ld=N)&&(Jd.__proto__=Ld),((Jd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Jd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},Jd.prototype.addStart=function(){this.encoding.addPattern(this.START)},Jd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Jd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Jd.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!u("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++},Jd.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Jd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Jd.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},Jd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Jd),$d={};function Jd(t,e){Ld.call(this,t),this.states=e,this._initMoves(e)}function tf(t){Id.call(this),this.encoding=t,this.initProperties()}function ef(){zd.apply(this,arguments)}function of(){Vd.apply(this,arguments)}function rf(){jd.apply(this,arguments)}function nf(){Dd.apply(this,arguments)}function sf(t,e){Hd.call(this,t),this.states=e}function af(t,e){Ud.call(this,t),this._initSubStates(e)}function pf(){Fd.apply(this,arguments)}function hf(){Nd.apply(this,arguments)}function lf(){Gd.apply(this,arguments)}$d.A=((Gd=l)&&(lf.__proto__=Gd),((lf.prototype=Object.create(Gd&&Gd.prototype)).constructor=lf).prototype.initProperties=function(){Gd.prototype.initProperties.call(this),Kd(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},lf.prototype.isCode=function(t){return 0<=t&&t<96},lf.prototype.getValue=function(t){return t<32?t+64:t-32},lf),$d.B=((Nd=l)&&(hf.__proto__=Nd),((hf.prototype=Object.create(Nd&&Nd.prototype)).constructor=hf).prototype.initProperties=function(){Nd.prototype.initProperties.call(this),Kd(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},hf.prototype.isCode=function(t){return 32<=t&&t<128},hf.prototype.getValue=function(t){return t-32},hf),$d.C=((Fd=N)&&(pf.__proto__=Fd),((pf.prototype=Object.create(Fd&&Fd.prototype)).constructor=pf).prototype.initProperties=function(){Fd.prototype.initProperties.call(this),Kd(this,{key:"C",MOVE:99,START:105})},pf.prototype.addStart=function(){this.encoding.addPattern(this.START)},pf.prototype.is=function(t,e){var o=Af(t,e,4);return(e+4<=t.length||2===t.length)&&Zd.test(o)},pf.prototype.move=function(){this.encoding.addPattern(this.MOVE)},pf.prototype.pushState=function(t){for(var e;(e=Af(t.value,t.index,2))&&Zd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},pf.prototype.getValue=function(t){return t},pf),$d.FNC4=((Ud=N)&&(af.__proto__=Ud),((af.prototype=Object.create(Ud&&Ud.prototype)).constructor=af).prototype.initProperties=function(){Ud.prototype.initProperties.call(this),Kd(this,{key:"FNC4",dependentStates:["A","B"]})},af.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},af.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},af.prototype.isCode=function(t){return 128<=t&&t<256},af.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},af.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},af.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},af.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},af.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]},af.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},af),$d.FNC1=((Hd=N)&&(sf.__proto__=Hd),((sf.prototype=Object.create(Hd&&Hd.prototype)).constructor=sf).prototype.initProperties=function(){Hd.prototype.initProperties.call(this),Kd(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})},sf.prototype.addStart=function(){this.encoding[this.startState].addStart()},sf.prototype.is=function(){return u(this.key,this.states)},sf.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,p={state:this.startState};for(r.addPattern(this.START);;){if((e=(p.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(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},sf.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!Zd.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Qd.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},sf.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Af(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},sf.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},sf.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,e),t=t.substring(e+1,o),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},sf.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&&u(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}},sf);(yf=cc)&&(kf.__proto__=yf),((kf.prototype=Object.create(yf&&yf.prototype)).constructor=kf).prototype.initProperties=function(){yf.prototype.initProperties.call(this),Kd(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})},kf.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new $d[this.states[t]](this,this.states)},kf.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},kf.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())},kf.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))}},kf.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},kf.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},kf.prototype.addStop=function(){this.addPattern(this.STOP)},kf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},kf.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++},kf.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))};var cf,uf,df,ff,gf,yf,l=kf,N=((gf=l)&&(Sf.__proto__=gf),((Sf.prototype=Object.create(gf&&gf.prototype)).constructor=Sf).prototype.initProperties=function(){gf.prototype.initProperties.call(this),Kd(this,{name:"Code 128 A",states:["A"]})},Sf),vf=((ff=l)&&(Cf.__proto__=ff),((Cf.prototype=Object.create(ff&&ff.prototype)).constructor=Cf).prototype.initProperties=function(){ff.prototype.initProperties.call(this),Kd(this,{name:"Code 128 B",states:["B"]})},Cf),mf=((df=l)&&(wf.__proto__=df),((wf.prototype=Object.create(df&&df.prototype)).constructor=wf).prototype.initProperties=function(){df.prototype.initProperties.call(this),Kd(this,{name:"Code 128 C",states:["C"]})},wf),xf=((uf=l)&&(bf.__proto__=uf),((bf.prototype=Object.create(uf&&uf.prototype)).constructor=bf).prototype.initProperties=function(){uf.prototype.initProperties.call(this),Kd(this,{name:"Code 128",states:["C","B","A","FNC4"]})},bf),l=((cf=l)&&(_f.__proto__=cf),((_f.prototype=Object.create(cf&&cf.prototype)).constructor=_f).prototype.initProperties=function(){cf.prototype.initProperties.call(this),Kd(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},_f);function _f(){cf.apply(this,arguments)}function bf(){uf.apply(this,arguments)}function wf(){df.apply(this,arguments)}function Cf(){ff.apply(this,arguments)}function Sf(){gf.apply(this,arguments)}function kf(t){yf.call(this,t),this._initStates()}function Af(t,e,o){return t.substring(e,e+o)}var Pf,Tf,Mf,Of,Bf,Rf,Ef,Lf=Object.assign,If=((Ef=cc)&&(Qf.__proto__=Ef),((Qf.prototype=Object.create(Ef&&Ef.prototype)).constructor=Qf).prototype.initProperties=function(){Ef.prototype.initProperties.call(this),Lf(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Df})},Qf.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Qf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Qf.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()},Qf.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Qf.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Qf.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]])},Qf),zf=((Rf=If)&&(Zf.__proto__=Rf),((Zf.prototype=Object.create(Rf&&Rf.prototype)).constructor=Zf).prototype.initProperties=function(){Rf.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Zf),Vf=((Bf=If)&&(Yf.__proto__=Bf),((Yf.prototype=Object.create(Bf&&Bf.prototype)).constructor=Yf).prototype.initProperties=function(){Bf.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Yf),jf=((Of=If)&&(qf.__proto__=Of),((qf.prototype=Object.create(Of&&Of.prototype)).constructor=qf).prototype.initProperties=function(){Of.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},qf),If=((Mf=If)&&(Xf.__proto__=Mf),((Xf.prototype=Object.create(Mf&&Mf.prototype)).constructor=Xf).prototype.initProperties=function(){Mf.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Xf),Df={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))}},Hf=Object.assign,cc=((Tf=cc)&&(Wf.__proto__=Tf),((Wf.prototype=Object.create(Tf&&Tf.prototype)).constructor=Wf).prototype.initProperties=function(){Tf.prototype.initProperties.call(this),Hf(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]}})},Wf.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},Wf.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)},Wf.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)},Wf.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])},Wf.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},Wf),Uf=Object.assign,Ff=((Pf=cc)&&(Gf.__proto__=Pf),((Gf.prototype=Object.create(Pf&&Pf.prototype)).constructor=Gf).prototype.initProperties=function(){Pf.prototype.initProperties.call(this),Uf(this,{name:"EAN 8"})},Gf.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)},Gf),Nf={code11:t,code39:n,code39extended:uc,code93:c,code93extended:On,code128:xf,code128a:N,code128b:vf,code128c:mf};function Gf(){Pf.apply(this,arguments)}function Wf(){Tf.apply(this,arguments)}function Xf(){Mf.apply(this,arguments)}function qf(){Of.apply(this,arguments)}function Yf(){Bf.apply(this,arguments)}function Zf(){Rf.apply(this,arguments)}function Qf(){Ef.apply(this,arguments)}function Kf(t,e){var o=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=o,e}Nf["gs1-128"]=l,Nf.msimod10=zf,Nf.msimod11=Vf,Nf.msimod1010=jf,Nf.msimod1110=If,Nf.postnet=h,Nf.ean8=Ff,Nf.ean13=cc;($f=b.Class)&&(Jf.__proto__=$f),((Jf.prototype=Object.create($f&&$f.prototype)).constructor=Jf).prototype.destroy=function(){this._destroySurface()},Jf.prototype._initElement=function(){it(this.element,"k-barcode")},Jf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Jf.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Jf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Jf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Jf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Jf.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},Jf.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)},Jf.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Jf.prototype._resize=function(){this.redraw()},Jf.prototype.createVisual=function(){this.visual=this._render()},Jf.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=A(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new B(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),p=s.height(),h=new b.drawing.Group;this.contentBox=s,h.append(this._getBackground(n)),i.visible&&(p-=b.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,s.width(),p)}catch(t){return this.onError(t),h}return i.visible&&(n=o,e.checksum&&P(a.checksum)&&(n+=" "+a.checksum),h.append(this._getText(n))),this.barHeight=p,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),h.append(this._bandsGroup),h},Jf.prototype.exportVisual=function(){return this._render()},Jf.prototype._getSize=function(){var t=Kf(this.element,this.options.renderAs),e=new b.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},Jf.prototype.value=function(t){if(!P(t))return this.options.value;this.options.value=String(t),this.redraw()},Jf.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new b.drawing.Group,n=0;n<t.length;n++){var s,a=(s=ut(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=b.geometry.Rect.fromPoints(new b.geometry.Point(i,s.y1+o.y1),new b.geometry.Point(i+a,s.y2+o.y1)),s=b.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},Jf.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new B(0,0,t.width,t.height).unpad(o.width/2);return b.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},Jf.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new We(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},Jf.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),!Nf[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Nf[this.type],this.options=x({},this.options,t)};var $f,t=Jf;function Jf(t,e,o){void 0===o&&(o=pe),$f.call(this),this.options=x({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&P(e.value)&&this.redraw()}e(t,{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}});const tg=t;var eg={width:500,height:100};const og=function(t,e){if(void 0===e&&(e=eg),!t)throw new Error("Please specify barcode type to validate.");var o,i,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),Nf[n])return o=new Nf[n],i=e,r=s,function(t){try{o.encode(r+t,i.width,i.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var ig=Object.assign;function rg(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function ng(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function sg(t){return parseInt(t,2)}(dg=b.Class)&&(Sg.__proto__=dg),((Sg.prototype=Object.create(dg&&dg.prototype)).constructor=Sg).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Sg.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}},Sg.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var ag,pg,hg,lg,cg,ug,dg,fg=Sg,gg=((ug=b.Class)&&(Cg.__proto__=ug),(Cg.prototype=Object.create(ug&&ug.prototype)).constructor=Cg),yg=((cg=b.Class)&&(wg.__proto__=cg),((wg.prototype=Object.create(cg&&cg.prototype)).constructor=wg).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(Xg(i,8,5,8,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=Xg(i,17,9,16,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=qg(function(t){for(var e=0,o=0;o<t.length;o++)e+=vg[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+=vg[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new gg(e,t)},wg),n=((lg=b.Class)&&(bg.__proto__=lg),((bg.prototype=Object.create(lg&&lg.prototype)).constructor=bg).prototype.initProperties=function(){ig(this,{modeIndicator:"",bitsInCharacterCount:[]})},bg.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},bg.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},bg.prototype.getModeCountString=function(t,e){return this.modeIndicator+ng(t,this.getBitsCharacterCount(e))},bg.prototype.encode=function(){},bg.prototype.getStringBitsLength=function(){},bg.prototype.getValue=function(){},bg),uc=((hg=n)&&(_g.__proto__=hg),((_g.prototype=Object.create(hg&&hg.prototype)).constructor=_g).prototype.initProperties=function(){hg.prototype.initProperties.call(this),ig(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},_g.prototype.getValue=function(t){return parseInt(t,10)},_g.prototype.encode=function(t,e){for(var o=rg(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=ng(o[r],10);return i+ng(o[r],1+3*o[r].length)},_g.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)},_g),c=((pg=n)&&(xg.__proto__=pg),((xg.prototype=Object.create(pg&&pg.prototype)).constructor=xg).prototype.initProperties=function(){pg.prototype.initProperties.call(this),ig(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"})},xg.prototype.getValue=function(t){return this.characters[t]},xg.prototype.encode=function(t,e){for(var o=rg(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=ng(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+ng(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)},xg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},xg),On=((ag=n)&&(mg.__proto__=ag),((mg.prototype=Object.create(ag&&ag.prototype)).constructor=mg).prototype.initProperties=function(){ag.prototype.initProperties.call(this),ig(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},mg.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+'".')},mg.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=ng(this.getValue(t.charAt(i)),8);return o},mg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},mg),vg={};function mg(){ag.apply(this,arguments)}function xg(){pg.apply(this,arguments)}function _g(){hg.apply(this,arguments)}function bg(){lg.call(this),this.initProperties()}function wg(){cg.apply(this,arguments)}function Cg(t,e){ug.call(this),this.dataString=t,this.version=e}function Sg(t){dg.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}vg.numeric=new uc,vg.alphanumeric=new c,vg.byte=new On;(kg=b.Class)&&(Fg.__proto__=kg),((Fg.prototype=Object.create(kg&&kg.prototype)).constructor=Fg).prototype.initProperties=function(){ig(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Fg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=qg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new gg(t,e)},Fg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Fg.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Fg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=ng(t,8);else{for(var e=8-e,r=0;r<o;r++)i=ng(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Fg.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var kg,Ag=Fg,Pg=[{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}}],Tg="alphanumeric",Mg={1:0},Og={0:1},Bg={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},Rg=[1,0,1,1,1],Eg=[1,0,1],Lg={L:"01",M:"00",Q:"11",H:"10"},Ig=["11101100","00010001"],zg=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%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}],Vg=/^\d+/,jg=new RegExp("^[A-Z $%*+./:-]+"),Dg=new RegExp("^[A-Z0-9 $%*+./:-]+"),Hg=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Ug=[[1,0],[1,25,0]];function Fg(){kg.call(this),this.initProperties(),this.mode=vg[this.encodingMode]}function Ng(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Gg(t,e,o,i){for(var r=0;r<zg.length;r++)t[r][o][i]=zg[r](o,i)?1^e:parseInt(e,10)}function Wg(t,e){for(var o,i=Ug[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],p=0;p<s;p++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=Og[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Mg[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(p=r.length-1;0<=p;p--)a[e-1-p]=ng(r[p],8);return a}function Xg(t,e,o,i,r){var n,s=Vg.exec(t),s=s?s[0]:"",a=jg.exec(t),a=a?a[0]:"",p=Dg.exec(t),p=p?p[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Dg.test(t.charAt(s.length)))?(n="numeric",s):p&&(t.length===p.length||p.length>=i||r===Tg)?(n=Tg,s||a):(n="byte",p?p+Hg.exec(t.substring(p.length))[0]:Hg.exec(t)[0]);return{mode:n,modeString:e}}function qg(t,e){for(var o=0,i=Pg.length-1,r=Math.floor(Pg.length/2);t<Pg[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Pg[o][e].totalDataCodewords?r+1:i+1}function Yg(t,e,o){var i=sg(e),e=e.length-1,r=t<<e;return ng(t,o-e)+ng(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}(r,i),e)}function Zg(t,e){return parseInt(t.charAt(e),10)}function Qg(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&Ng(t,Zg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&Ng(t,Zg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)Ng(t,Zg(e,r-1-i++),n,s);for(Ng(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)Ng(t,Zg(e,r-1-i++),n,s)}function Kg(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,Ng(t,r=Zg(e,e.length-p-1),0+o,s+i),Ng(t,r,a+i,0+o)}function $g(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Ng(t,r=e[a],o+p,i+a),Ng(t,r,o+a,i+p),Ng(t,r,o+s-p,i+s-a),Ng(t,r,o+s-a,i+s-p)}function Jg(t,e,o,i){for(var r=o,n=i,s=t[0];Ng(t,0,r,i),Ng(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function ty(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,93===e[t][i]&&(o[t]+=40)}function ey(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 oy(t,e,o){var o=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?Ag:yg)).getEncodingResult(t,e),r=o.version,n=Pg[r-1][e],t=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var p=s[a][0],h=0;h<p;h++){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]=sg(o),i+=8;r.push(c),n.push(Wg(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+=Ig[i],i^=1;return r}(o.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<zg.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}(),i=(l=(s=o)[0].length,$g(s,Rg,0,0),Jg(s,[-1,-1],7,7),$g(s,Rg,l-7,0),Jg(s,[1,-1],l-8,7),$g(s,Rg,0,l-7),Jg(s,[-1,1],7,l-8),o),s=r;if(!(s<2)){var a,p=i[0],h=p.length,l=Math.floor(s/7),c=[6],u=0;for((s=Bg[s])?a=(h-13-s)/l:s=a=(h-13)/(l+1),c.push(c[u++]+s);c[u]+a<h;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===p[c[d]][c[f]]&&$g(i,Eg,c[d]-2,c[f]-2)}for(var g=o,y=1,v=g[0].length,m=8;m<v-8;m++)Ng(g,y,6,m),Ng(g,y,m,6),y^=1;7<=r&&Kg(o,ng(0,18)),Qg(o,ng(0,15));for(var x,_,b,w=o,C=t,S=new fg(w[0]),k=0;k<C.length;k++)for(x=C[k],_=0;0<x.length;){for(var A=0;A<x.length;A++)for(var P=0;P<8;P++)b=S.getNextCell(),Gg(w,x[A][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)Gg(w,0,b.row,b.column);l=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,p=0;p<t.length;p++)o[p]=0,r[p]=0,s[p]=[0,0],n[p]=[0,0],i[p]=[];for(var h=0;h<a;h++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][l],10),i[c][0]===e[h][l]&&h+1<a&&0<=l-1&&e[h+1][l]===i[c][0]&&e[h+1][l-1]===i[c][0]&&(o[c]+=3),ty(c,n,o,0,e[h][l]),ty(c,n,o,1,e[l][h]),ey(c,o,i,e[h][l],s,0),ey(c,o,i,e[l][h],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(p=0;p<o.length;p++)o[p]+=(d=r[p],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),o[p]<v&&(v=o[p],u=p);return u}(o),s=o[l];return 7<=r&&Kg([s],Yg(r,"1111100100101",18)),Qg([s],function(t){var e="";if(0===sg(t))return"101010000010010";for(var o=Yg(sg(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(Lg[e]+ng(l,3))),s}for(var iy,ry=1;ry<255;ry++)255<(iy=2*Og[ry-1])&&(iy^=285),Og[ry]=iy,Mg[iy]=ry;iy=2*Og[ry-1]^285,Og[ry]=iy,Og[-1]=0;for(var ny=2;ny<=68;ny++){var sy=Ug[ny-1];Ug[ny]=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]=Mg[Og[o[i+r]]^Og[(t[i]+e[r])%255]];return o}(sy,[ny,0])}var ay,py=Math.round,hy=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],ly=[[0,1],[1,1],[1,0]],xf=((ay=b.Class)&&(cy.__proto__=ay),((cy.prototype=Object.create(ay&&ay.prototype)).constructor=cy).prototype.destroy=function(){this._destroySurface()},cy.prototype._initElement=function(){it(this.element,"k-qrcode")},cy.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},cy.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},cy.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},cy.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},cy.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},cy.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},cy.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,o={width:0,height:0};return 0<e&&(o.width=e),t&&(o.height=t),o},cy.prototype._resize=function(){this.redraw()},cy.prototype.createVisual=function(){this.visual=this._render()},cy.prototype.exportVisual=function(){return this._render()},cy.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0,h=(s.width=p,new b.drawing.Group);try{n&&(o=oy(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,h.append(this._renderBackground(i,s)),h.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?h.append(this._renderLogo(i,t)):this._isSwiss()&&h.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return h},cy.prototype._renderLogo=function(t,e){var t=py(t/2),e=this._getLogoSize(7*e),o=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new b.geometry.Rect(new b.geometry.Point(t.x,t.y),new b.geometry.Size(e.width,e.height));return new b.drawing.Image(o,t)},cy.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,t=t/2,n={},s=new b.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),ly,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,ly,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,hy,"#fff")),s},cy.prototype._renderShape=function(t,e,o,i){var r=new b.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},cy.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Kf(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},cy.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},cy.prototype._renderMatrix=function(t,e,o){for(var i=new b.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 a=py(o+a*e),p=py(n),h=py(o+s*e),l=py(n+e);i.moveTo(a,p).lineTo(a,l).lineTo(h,l).lineTo(h,p).close()}}return i},cy.prototype._renderBackground=function(t,e){t=new B(0,0,t,t).unpad(e.width/2);return b.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},cy.prototype.setOptions=function(t){this.options=ig(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},cy.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},cy.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},cy.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},cy.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}},cy);function cy(t,e,o){void 0===o&&(o=pe),ay.call(this),this.options=x({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}e(xf,{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}});const uy=xf,dy=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{oy(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var fy={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function gy(t){return t*t}var yy,vy,my=Math,xy=my.abs,_y=my.atan,by=my.atan2,wy=my.cos,Cy=my.sin,Sy=my.tan,ky=((vy=b.Class)&&(Dy.__proto__=vy),((Dy.prototype=Object.create(vy&&vy.prototype)).constructor=Dy).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Dy.prototype.toArray=function(){return[this.lat,this.lng]},Dy.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Dy.prototype.clone=function(){return new Dy(this.lat,this.lng)},Dy.prototype.round=function(t){return this.lng=T(this.lng,t),this.lat=T(this.lat,t),this},Dy.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Dy.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Dy.prototype.destination=function(t,e,o){var e=Gt(e),o=o||fy.WGS84,i=Gt(this.lat),r=Gt(this.lng),t=t/o.a,o=my.asin(Cy(i)*wy(t)+wy(i)*Cy(t)*wy(e)),r=r+by(Cy(e)*Cy(t)*wy(i),wy(t)-Cy(i)*Cy(o));return new Dy(zt(o),zt(r))},Dy.prototype.greatCircleTo=function(t,e){var o=Dy.create(void 0),e=e||fy.WGS84;if(!o||this.clone().round(8).equals(o.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var i,r,n=e.a,s=e.b,a=e.f,p=Gt(o.lng-this.lng),e=_y((1-a)*Sy(Gt(this.lat))),h=Cy(e),l=wy(e),e=_y((1-a)*Sy(Gt(o.lat))),c=Cy(e),u=wy(e),d=p,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Cy(d),v=wy(d),m=my.sqrt(gy(u*y)+gy(l*c-h*u*v)),x=by(m,r=h*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(i=1-gy(_))&&(b=r-2*h*c/i),d),C=a/16*i*(4+a*(4-3*i)),d=p+(1-C)*a*_*(x+C*m*(b+C*r*(2*gy(b)-1))),g=xy(d-w)<=this.DISTANCE_CONVERGENCE;var o=i*(gy(n)-gy(s))/gy(s),e=1+o/16384*(4096+o*(o*(320-175*o)-768)),n=o/1024*(256+o*(o*(74-47*o)-128)),o=n*m*(b+n/4*(r*(2*gy(b)-1)-n/6*b*(4*gy(m)-3)*(4*gy(b)-3))),n=by(u*y,l*c-h*u*v),S=by(l*y,-h*u+l*c*v);return{distance:T(s*e*(x-o),this.DISTANCE_PRECISION),azimuthFrom:zt(n),azimuthTo:zt(S)}},Dy.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Dy.fromLngLat=function(t){return new Dy(t[1],t[0])},Dy.fromLatLng=function(t){return new Dy(t[0],t[1])},Dy.create=function(t,e){if(P(t))return t instanceof Dy?t.clone():1===arguments.length&&2===t.length?Dy.fromLatLng(t):new Dy(t,e)},Dy),Ay=Math,Py=Ay.atan,Ty=Ay.exp,My=Ay.pow,Oy=Ay.sin,By=Ay.log,Ry=Ay.tan,Ey=b.geometry.Point,Ly=Ay.PI,Iy=Ly/2,zy=Ly/4,Vy=Ly/180,N=fy.WGS84,vf=((yy=b.Class)&&(jy.__proto__=yy),((jy.prototype=Object.create(yy&&yy.prototype)).constructor=jy).prototype._initOptions=function(t){this.options=x({},this.options,t)},jy.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},jy.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,r=_(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?_(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=Gt(e-o)*i,e=this._projectLat(r);return new Ey(t,e)},jy.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=Gt(t),i=Ry(zy+t/2),t=o*Oy(t),t=My((1-t)/(1+t),o/2);return e*By(i*t)},jy.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(Vy*i)+o,o=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=_(i,-this.MAX_LNG,this.MAX_LNG)),new ky(o,i)},jy.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Ty(-t/o),s=Iy-2*Py(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var p=i*Oy(s),p=My((1-p)/(1+p),r),p=Iy-2*Py(n*p)-s;if(s+=p,Ay.abs(p)<=this.INVERSE_CONVERGENCE)break}return zt(s)},jy);function jy(t){yy.call(this),this.initProperties(),this._initOptions(t)}function Dy(t,e){vy.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}e(vf,{centralMeridian:0,datum:N});function Hy(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Uy(t,e){e.insertBefore(t,e.firstChild)}function Fy(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Ny(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(Wy=vf)&&($y.__proto__=Wy),(($y.prototype=Object.create(Wy&&Wy.prototype)).constructor=$y).prototype.initProperties=function(){Wy.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},$y.prototype._projectLat=function(t){var e=this.options.datum.a,t=Gt(t),t=Ry(zy+t/2);return e*By(t)},$y.prototype._inverseY=function(t){var e=this.options.datum.a,t=Ty(-t/e);return zt(Iy-2*Py(t))};var Gy,Wy,Xy=$y,qy=((Gy=b.Class)&&(Ky.__proto__=Gy),((Ky.prototype=Object.create(Gy&&Gy.prototype)).constructor=Ky).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},Ky.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},Ky),Yy=Object.defineProperty,Zy=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Qy=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},p={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=Jy(o,a,!1),i.browser=Jy(t,p,"default"),i.name=Jy(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 Ky(){Gy.call(this);var t=this._proj=new Xy,t=this.c=2*Ly*t.options.datum.a;this._tm=b.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=b.geometry.transform().scale(t,-t).translate(-.5,-.5)}function $y(){Wy.apply(this,arguments)}function Jy(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 tv(t,e){return t.bind(e)}function ev(t,e,o,i,r){dv(t,e,o,i,r)}function ov(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(ot(t=e)?t:(t||"").split(" ")).forEach(function(t){fv(n,t,s,a)})}function iv(t){var e=cv(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function rv(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 nv(){return Number(new Date)}function sv(){}function av(){this._defaultPrevented=!0}function pv(){return!0===this._defaultPrevented}var hv,lv,cv=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=uv();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},uv=function(){var t=Qy(navigator.userAgent),e=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),o=e.chrome,i=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!o&&!i&&!r&&!e&&window.PointerEvent,n.msPointers=!o&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,p=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,o="string"==typeof s.style[t+"Transition"];if(o||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),p={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},o&&((a=p).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}),s=null,n.transforms=p,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},dv=function(s,t,a,p,h){(ot(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=p,(e=a)&&lt(e)&&!i?n=e:e&&"string"==typeof e&&lt(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,Yy(t,"currentTarget",{value:e}),Yy(t,"delegateTarget",{value:o}),n(t))},Boolean(h))})},fv=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},gv="function",mf=((lv=b.Class)&&(mv.__proto__=lv),((mv.prototype=Object.create(lv&&lv.prototype)).constructor=mv).prototype.destroy=function(){this.unbind()},mv.prototype.bind=function(t,e,o){var i,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==gv;if(void 0===e){for(p in t)n.bind(p,t[p]);return n}for(var p=0,h=s.length;p<h;p++)!function(){var t=s[p];(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},mv.prototype.one=function(t,e){return this.bind(t,e,!0)},mv.prototype.first=function(t,e){for(var o,i="string"==typeof t?[t]:t,r=typeof e==gv,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},mv.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=av,n.isDefaultPrevented=pv,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},mv.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},mv.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events&&this._events[i]&&delete this._events[i])}this.bind(this.events,t)},mv),yv=((hv=mf)&&(vv.__proto__=hv),((vv.prototype=Object.create(hv&&hv.prototype)).constructor=vv).prototype._initOptions=function(t){this.options=x({},this.options,t)},vv.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},vv.prototype.add=function(t){var e=t;P(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},vv.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()},vv.prototype.clear=function(){this.items=[],Hy(this.element)},vv.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var o=this.items[e],o=this._itemText(o);""!==o&&t.push(o)}if(0<t.length){Hy(this.element);var i=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=i;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},vv.prototype.hideElement=function(){this.element.style.display="none"},vv.prototype.showElement=function(){this.element.style.display=""},vv.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},vv.prototype._inZoomLevel=function(t,e){t=M(t,-Number.MAX_VALUE),e=M(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},vv.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},vv);function vv(t,e){hv.call(this),this.element=t,this._initOptions(e),this.items=[],it(this.element,"k-widget k-attribution")}function mv(){lv.call(this),this._events={}}e(yv,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var xv={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 _v(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+xv[t].className+'" aria-label="move '+t+'"><span class="k-icon '+xv[t].iconClass+'" /></button>';return Zy(t)}(bv=mf)&&(Cv.__proto__=bv),((Cv.prototype=Object.create(bv&&bv.prototype)).constructor=Cv).prototype.destroy=function(){this.dispose()},Cv.prototype.dispose=function(){ov(this._keyroot,"keydown",this._keydownHandler)},Cv.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},Cv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Cv.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Cv.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()},Cv.prototype._keydown=function(t){switch(t.which){case he.UP:this._pan(0,1),t.preventDefault();break;case he.DOWN:this._pan(0,-1),t.preventDefault();break;case he.RIGHT:this._pan(1,0),t.preventDefault();break;case he.LEFT:this._pan(-1,0),t.preventDefault()}};var bv,wv=Cv;function Cv(t,e){bv.call(this),this.element=t,this._initOptions(e);var t=_v("up"),e=_v("right"),o=_v("down"),i=_v("left"),t=(this.element.appendChild(t),this.element.appendChild(e),this.element.appendChild(o),this.element.appendChild(i),it(this.element,"k-widget k-navigator"),ev(this.element,"click",".k-button",tv(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=tv(this._keydown,this),ev(this._keyroot,"keydown",this._keydownHandler)}function Sv(t,e){return Zy('<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>')}e(wv,{name:"Navigator",panStep:1}),rv(wv,["pan"]);(kv=mf)&&(Pv.__proto__=kv),((Pv.prototype=Object.create(kv&&kv.prototype)).constructor=Pv).prototype.destroy=function(){this.element&&ov(this.element,"click",this._clickHandler),this._keyroot&&ov(this._keyroot,"keydown",this._keydownHandler)},Pv.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},Pv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Pv.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Pv.prototype._click=function(t){var e=1;St(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Pv.prototype._keydown=function(t){switch(t.which){case he.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case he.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var kv,Av=Pv;function Pv(t,e){kv.call(this),this.element=t,this._initOptions(e);t=Sv("in","k-i-plus"),e=Sv("out","k-i-minus"),this.element.appendChild(t),this.element.appendChild(e),it(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),ev(this.element,"click",".k-button",this._clickHandler),t=this.element.parentNode.closest("[data-role]");this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),ev(this._keyroot,"keydown",this._keydownHandler)}e(Av,{name:"ZoomControl",zoomStep:1}),rv(Av,["change"]);var Tv,Mv,l=Math,Ov=l.max,Bv=l.min,Rv=((Mv=b.Class)&&(zv.__proto__=Mv),zf={World:{configurable:!0}},((zv.prototype=Object.create(Mv&&Mv.prototype)).constructor=zv).prototype.contains=function(t){var e=this.nw,o=this.se,i=M(t.lng,t[1]),r=M(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},zv.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new ky(e,o)},zv.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},zv.prototype.include=function(t){var e=this.nw,o=this.se,i=M(t.lng,t[1]),t=M(t.lat,t[0]);e.lng=Bv(e.lng,i),e.lat=Ov(e.lat,t),o.lng=Ov(o.lng,i),o.lat=Bv(o.lat,t)},zv.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},zv.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new ky(t.lat,e.lng),se:this.se,sw:new ky(e.lat,t.lng)}},zv.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new ky(t.lat,e.lng),e,new ky(e.lat,t.lng)]},zv.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},zv.create=function(t,e){return t instanceof zv?t:t&&e?new zv(t,e):t&&4===t.length&&!e?new zv([t[0],t[1]],[t[2],t[3]]):void 0},zf.World.get=function(){return new zv([90,-180],[-90,180])},Object.defineProperties(zv,zf),zv),Vf=((Tv=b.Class)&&(Iv.__proto__=Tv),((Iv.prototype=Object.create(Tv&&Tv.prototype)).constructor=Iv).prototype.destroy=function(){this._deactivate()},Iv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Iv.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Iv.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Iv.prototype.reset=function(){this._beforeReset(),this._reset()},Iv.prototype._reset=function(){this._applyExtent()},Iv.prototype._beforeReset=function(){},Iv.prototype._resize=function(){},Iv.prototype._panEnd=function(){this._applyExtent()},Iv.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!P(t.minZoom)||e>=t.minZoom,e=!P(t.maxZoom)||e<=t.maxZoom,t=Rv.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Iv.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Iv.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)},Iv.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)},Iv.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Iv.prototype._readData=function(){return this.options.data||[]},Iv.prototype._hasData=function(){return this._data&&0<this._data.length},Iv),Ev=Math,Lv=b.geometry.Point;function Iv(t,e){Tv.call(this),this.support=uv(),this._initOptions(e),this.map=t;e=document.createElement("div");it(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 zv(t,e){Mv.call(this);t=ky.create(t),e=ky.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)}function Vv(t){return lt(t)?t:mt.compile(t)}function jv(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(Dv=Vf)&&(Hv.__proto__=Dv),((Hv.prototype=Object.create(Dv&&Dv.prototype)).constructor=Hv).prototype.destroy=function(){Dv.prototype.destroy.call(this),this._view.destroy(),this._view=null},Hv.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Hv.prototype._reset=function(){Dv.prototype._reset.call(this),this._updateView(),this._view.reset()},Hv.prototype._viewType=function(){return Nv},Hv.prototype._activate=function(){Dv.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,b.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Hv.prototype._deactivate=function(){Dv.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Hv.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())},Hv.prototype._resize=function(){this._render()},Hv.prototype._panEnd=function(t){Dv.prototype._panEnd.call(this,t),this._render()},Hv.prototype._render=function(){this._updateView(),this._view.render()};var Dv,jf=Hv;function Hv(t,e){Dv.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}e(jf,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(Fv=b.Class)&&(Xv.__proto__=Fv),((Xv.prototype=Object.create(Fv&&Fv.prototype)).constructor=Xv).prototype._initOptions=function(t){this.options=x({},this.options,t)},Xv.prototype.center=function(t){this._center=t},Xv.prototype.extent=function(t){this._extent=t},Xv.prototype.viewOrigin=function(t){this._viewOrigin=t},Xv.prototype.zoom=function(t){this._zoom=t},Xv.prototype.pointToTileIndex=function(t){return new Lv(Ev.floor(t.x/this.options.tileSize),Ev.floor(t.y/this.options.tileSize))},Xv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,e=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Ev.ceil((Ev.abs(e.x)+t.width)/this.options.tileSize),y:Ev.ceil((Ev.abs(e.y)+t.height)/this.options.tileSize)}},Xv.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}},Xv.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Lv(e*this.options.tileSize,t*this.options.tileSize)},Xv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},Xv.prototype.destroy=function(){Hy(this.element),this.pool.empty()},Xv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},Xv.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()},Xv.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},Xv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,i=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:new Lv(T((e=i).x),T(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},Xv.prototype.wrapIndex=function(t){var e=Ev.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},Xv.prototype.wrapValue=function(t,e){var o=Ev.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var Uv,Fv,Nv=Xv,Gv=((Uv=b.Class)&&(Wv.__proto__=Uv),((Wv.prototype=Object.create(Uv&&Uv.prototype)).constructor=Wv).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Wv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Wv.prototype.createElement=function(){var t=document.createElement("img");it(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},Wv.prototype.show=function(){var t=this.element,e=(t.style.top=jv(this.options.offset.y),t.style.left=jv(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Wv.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Wv.prototype.url=function(){return Vv(this.options.urlTemplate)(this.urlOptions())},Wv.prototype.errorUrl=function(){return Vv(this.options.errorUrlTemplate)(this.urlOptions())},Wv.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}},Wv);function Wv(t,e){Uv.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function Xv(t,e){Fv.call(this),this.element=t,this._initOptions(e),this.pool=new Yv}e(Gv,{urlTemplate:"",errorUrlTemplate:""});(qv=b.Class)&&(Zv.__proto__=qv),((Zv.prototype=Object.create(qv&&qv.prototype)).constructor=Zv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},Zv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},Zv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},Zv.prototype._create=function(t){for(var e,o=this._items,i=Ut(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 Gv(i,t),this._items.push(e)),e},Zv.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))};var qv,Yv=Zv;function Zv(){qv.call(this),this._items=[]}e(Yv,{maxSize:100});function Qv(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var Kv,$v,Jv,tm,em,om,im,rm=Object.assign,nm="change",sm=((im=mf)&&(xm.__proto__=im),((xm.prototype=Object.create(im&&im.prototype)).constructor=xm).prototype.captureNext=function(){this.capture=!0},xm.prototype.cancelCapture=function(){this.capture=!1},xm.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},xm.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},xm),am=((om=mf)&&(mm.__proto__=om),((mm.prototype=Object.create(om&&om.prototype)).constructor=mm).prototype.makeVirtual=function(){rm(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},mm.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},mm.prototype.outOfBounds=function(t){return t>this.max||t<this.min},mm.prototype.forceEnabled=function(){this.forcedEnabled=!0},mm.prototype.getSize=function(){return this.container[this.measure]},mm.prototype.getTotal=function(){return this.element[this.scrollSize]},mm.prototype.rescale=function(t){this.scale=t},mm.prototype.update=function(t){var e=this,o=e.virtual?e._virtualMax:e.getTotal(),i=o*e.scale,r=e.getSize();0===o&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=i,e.min=Math.min(e.max,r-i),e.minScale=r/o,e.centerOffset=(i-r)/2,e.enabled=e.forcedEnabled||r<i,t||e.trigger(nm,e))},mm),pm=((em=mf)&&(vm.__proto__=em),((vm.prototype=Object.create(em&&em.prototype)).constructor=vm).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},vm.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},vm.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(nm)},vm),hm=((tm=mf)&&(ym.__proto__=tm),((ym.prototype=Object.create(tm&&tm.prototype)).constructor=ym).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},ym.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(nm,this))},ym),lm=((Jv=b.Class)&&(gm.__proto__=Jv),(gm.prototype=Object.create(Jv&&Jv.prototype)).constructor=gm),cm=(($v=mf)&&(fm.__proto__=$v),((fm.prototype=Object.create($v&&$v.prototype)).constructor=fm).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},fm.prototype.scaleTo=function(t){this.scale=t,this.refresh()},fm.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},fm.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},fm.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},fm.prototype.moveTo=function(t){rm(this,t),this.refresh()},fm.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=Qv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(nm))},fm.prototype._saveCoordinates=function(t){this.coordinates=t},fm),um=b.drawing.Group,If=((Kv=Vf)&&(dm.__proto__=Kv),((dm.prototype=Object.create(Kv&&Kv.prototype)).constructor=dm).prototype.destroy=function(){Kv.prototype.destroy.call(this),this.surface.destroy()},dm.prototype._reset=function(){Kv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},dm.prototype._initRoot=function(){this._root=new um,this.surface.draw(this._root)},dm.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},dm.prototype._resize=function(){this.surface.size(this.map.size())},dm.prototype._readData=function(){var t=Kv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},dm.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new wm(this.map,this.options.style,this));for(var e=new um,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},dm.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof b.drawing.Circle&&this.map.options.renderPointsAsMarkers?P(this._createMarker(t)):e)?e:this.map.trigger("shapeCreated",{layer:this,shape:t})},dm.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},dm.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},dm.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},dm.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},dm.prototype._panEnd=function(t){Kv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},dm.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}))},dm.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))}},dm.prototype._activate=function(){Kv.prototype._activate.call(this),this._panHandler=tv(this._pan,this),this.map.bind("pan",this.panHandler)},dm.prototype._deactivate=function(){Kv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},dm);function dm(t,e){Kv.call(this,t,e),this._pan=tv(this._pan,this),this.surface=b.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new cm(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 fm(t){$v.call(this);var e=this,t=(e.support=uv(),this.transformStyle=this.support.transitions.prefix+"Transform",e.element=t,e.element.style.webkitTransformOrigin="left top",e.x=0,e.y=0,e.scale=1,Qv(e.x,e.y,e.scale));e.element.style[this.transformStyle]=t,e._saveCoordinates(t)}function gm(t){Jv.call(this);var s,a,p,h=this;rm(h,{elastic:!0},t),t=h.elastic?.5:0,p=h.movable,h.x=s=new hm({axis:"x",dimension:h.dimensions.x,resistance:t,movable:p}),h.y=a=new hm({axis:"y",dimension:h.dimensions.y,resistance:t,movable:p}),h.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){h.gesture=t,h.offset=Vt(h.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=h.gesture,o=e.center,i=t.center,e=t.distance/e.distance,r=h.dimensions.minScale,n=h.dimensions.maxScale,r=(p.scale<=r&&e<1&&(e+=.8*(1-e)),p.scale*e>=n&&(e=n/p.scale),p.x+h.offset.left),n=p.y+h.offset.top,r={x:(r-o.x)*e+i.x-r,y:(n-o.y)*e+i.y-n};p.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),h.dimensions.rescale(p.scale),(h.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 ym(t){tm.call(this),rm(this,t)}function vm(t){em.call(this);this.x=new am(rm({horizontal:!0},t)),this.y=new am(rm({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(nm,t)}function mm(t){om.call(this);var e=this;e.forcedEnabled=!1,rm(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function xm(t,e){im.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,cv(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,tv(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,tv(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,tv(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,tv(o._release,o))})),o.bind(["press","release"],e||{})}e(If,{autoBind:!0,zIndex:100});(bm=b.Class)&&(Sm.__proto__=bm),((Sm.prototype=Object.create(bm&&bm.prototype)).constructor=Sm).prototype.parse=function(t){var e=new um,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},Sm.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Sm.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Sm.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)}},Sm.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Ft(e).anchor()))&&(t.options.fill=null)},Sm.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Sm.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,this._loadShape(t,e)},Sm.prototype._buildPolygon=function(t){for(var e=new(1<t.length?b.drawing.MultiPath:b.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(ky.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Sm.prototype._loadPoint=function(t,e,o){var e=ky.fromLngLat(e),i=this.locator.locationToView(e),i=new b.geometry.Circle(i,10),i=new b.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var _m,bm,wm=Sm,h=((_m=If)&&(Cm.__proto__=_m),((Cm.prototype=Object.create(_m&&_m.prototype)).constructor=Cm).prototype._readData=function(){return this.options.data||[]},Cm.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=wt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=wt(this.options.locationField),s=0;s<i.length;s++){var a,p,h,l=i[s],c=n(l),u=o(l);P(c)&&P(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=ky.create(c),h=this.map.locationToView(c),p=a.map(u),(h=this._createSymbol({center:h,size:p,style:e.style,dataItem:l,location:c})).dataItem=l,h.location=c,h.value=u,this._drawSymbol(h))}}},Cm.prototype._scaleType=function(){var t=this.options.scale;return lt(t)?t:Pm[t]},Cm.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=lt(e)?e:Tm[e])(t)},Cm.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Cm);function Cm(){_m.apply(this,arguments)}function Sm(t,e,o){bm.call(this),this.observer=o,this.locator=t,this.style=e}e(h,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var km,Am,Pm={sqrt:((Am=b.Class)&&(Im.__proto__=Am),((Im.prototype=Object.create(Am&&Am.prototype)).constructor=Im).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Im)},Tm={circle:function(t){var e=new b.geometry.Circle(t.center,t.size/2);return new b.drawing.Circle(e,t.style)},square:function(t){var e=new b.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}},Mm="mouseenter",Om="mouseleave",Bm=Object.assign,Rm=".k-marker",Em=((km=Vf)&&(Lm.__proto__=km),((Lm.prototype=Object.create(km&&km.prototype)).constructor=Lm).prototype.destroy=function(){km.prototype.destroy.call(this),ov(this.element,"click",this._markerClickHandler),this.clear()},Lm.prototype.add=function(t){if(!ot(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Lm.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Lm.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Lm.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Lm.prototype._reset=function(){km.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Lm.prototype.bind=function(t,e){t=Vm.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Lm.prototype._addOne=function(t){t=Vm.create(t,this.options);return t.addTo(this),t},Lm.prototype._readData=function(){return this.options.data||[]},Lm.prototype._load=function(t){this._data=t,this.clear();for(var e=wt(this.options.locationField),o=wt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Lm.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,e={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),originalEvent:t};this.map.trigger("markerClick",e)},Lm.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Lm.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Lm.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Bm({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Lm);function Lm(t,e){km.call(this,t,e),this._markerClickHandler=tv(this._markerClick,this),ev(this.element,"click",Rm,this._markerClickHandler),this.items=[],this._load(this._readData())}function Im(t,e){Am.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}e(Em,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});(zm=b.Class)&&(Dm.__proto__=zm),((Dm.prototype=Object.create(zm&&zm.prototype)).constructor=Dm).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Dm.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Dm.prototype.location=function(t){return t?(this.options.location=ky.create(t).toArray(),this.layer&&this.layer.update(this),this):ky.create(this.options.location)},Dm.prototype.showAt=function(t){this.render(),this.element.style.left=Ny(Math.round(t.x)),this.element.style.top=Ny(Math.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},Dm.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},Dm.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=tv(this._mouseEnter,this),ev(this.element,Mm,Rm,this._mouseEnterHandler),this._mouseLeaveHandler=tv(this._mouseLeave,this),ev(this.element,Om,Rm,this._mouseLeaveHandler))},Dm.prototype.unbindEvents=function(){this.element&&(ov(this.element,Mm,this._mouseEnterHandler),ov(this.element,Om,this._mouseLeaveHandler))},Dm.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,it(o=document.createElement("span"),"k-marker k-icon k-i-marker-"+Fy(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())},Dm.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t)},Dm.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Dm.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Dm.prototype.renderTooltip=function(){},Dm.create=function(t,e){return t instanceof Dm?t:new Dm(x({},e,t))};var zm,Vm=Dm,jm=Object.assign;function Dm(t){zm.call(this),this.options=t||{}}function Hm(t){window.requestAnimationFrame(t)}function Um(t){t.preventDefault()}(Nm=b.Class)&&(ix.__proto__=Nm),((ix.prototype=Object.create(Nm&&Nm.prototype)).constructor=ix).prototype.tick=function(){},ix.prototype.done=function(){},ix.prototype.onEnd=function(){},ix.prototype.onCancel=function(){},ix.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Hm(this._tickProxy)))},ix.prototype.enabled=function(){return!0},ix.prototype.cancel=function(){this._started=!1,this.onCancel()},ix.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Hm(this._tickProxy))};var Fm,Nm,Ff=ix,Gm=((Fm=Ff)&&(ox.__proto__=Fm),((ox.prototype=Object.create(Fm&&Fm.prototype)).constructor=ox).prototype.done=function(){return this.timePassed()>=this.duration},ox.prototype.timePassed=function(){return Math.min(this.duration,nv()-this.startDate)},ox.prototype.moveTo=function(t){var e=this,o=e.movable;e.initial=o[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=nv(),e.start()},ox.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},ox.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},ox),Wm=Object.assign,Xm=800,qm=0,Ym="move",Zm="tap",Qm="doubleTap",Km="release",$m="gesturechange",Jm="gestureend",tx="gesturetap",ex={api:0,touch:0,mouse:9,pointer:9};function ox(t){Fm.call(this),jm(this,t)}function ix(){Nm.call(this);this._tickProxy=tv(this._tick,this),this._started=!1}function rx(t){var e,o,i,r=uv(),n=[],s=t.originalEvent||t,a=t.currentTarget,p=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;p<e;p++)i=o[p],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}(sx=b.Class)&&(lx.__proto__=sx),((lx.prototype=Object.create(sx&&sx.prototype)).constructor=lx).prototype.move=function(t){var e=this,o=t["page"+e.axis],i=nv(),r=i-e.timeStamp||1;!o&&this.invalidZeroEvents||(e.delta=o-e.location,e._updateLocationData(t),e.initialDelta=o-e.startLocation,e.velocity=e.delta/r,e.timeStamp=i)},lx.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var nx,sx,ax=lx,px=((nx=b.Class)&&(hx.__proto__=nx),((hx.prototype=Object.create(nx&&nx.prototype)).constructor=hx).prototype.press=function(){this._holdTimeout=setTimeout(tv(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},hx.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(Zm,t):e._trigger(Qm,t),e.userEvents._clicks=0},300))},hx.prototype._hold=function(){this._trigger("hold",this.pressEvent)},hx.prototype.move=function(t){var e=this,o="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!o){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(mx.current&&mx.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(Ym,t)}},hx.prototype.end=function(t){this.endTime=nv(),this._finished||(this._finished=!0,this._trigger(Km,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(Zm,t)),clearTimeout(this._holdTimeout),this.dispose())},hx.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},hx.prototype.skip=function(){this.dispose()},hx.prototype.cancel=function(){this.dispose()},hx.prototype.isMoved=function(){return this._moved},hx.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=nv(),this._moved=!0,this._trigger("start",t)},hx.prototype._trigger=function(t,e){var e=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,o)&&e.preventDefault()},hx.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},hx);function hx(t,e,o){nx.call(this),Wm(this,{x:new ax("X",o.location),y:new ax("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||ex[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 lx(t,e){sx.call(this);this.support=uv(),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=nv()}function cx(t){for(var e=cv(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(vx=mf)&&(Rx.__proto__=vx),((Rx.prototype=Object.create(vx&&vx.prototype)).constructor=Rx).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Rx.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,cx(function(t){e.removeEventListener(t,o.preventIfMoving)})),ov(o.surface,iv("move"),this._surfaceMoveHandler),ov(o.surface,iv("up cancel"),this._surfaceEndHandler),ov(i,iv("down"),this._elementStartHandler),o.useClickAsTap&&ov(i,iv("click"),this._elementClickHandler),t.preventDragEvent&&ov(i,iv("dragstart"),this._elementDragStartHandler),ov(i,iv("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Rx.prototype.capture=function(){Rx.current=this},Rx.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Rx.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case Ym:a=$m;break;case"end":a=Jm;break;case Zm:a=tx}Wm(e,{touches:s},(t=s[0],s=s[1],o=t.x.location,t=t.y.location,r=o-(i=s.x.location),n=t-(s=s.y.location),{center:{x:(o+i)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,Wm(e,{type:a}))},Rx.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Rx.prototype.move=function(t,e){this._apiCall("_move",t,e)},Rx.prototype.end=function(t,e){this._apiCall("_end",t,e)},Rx.prototype._isMultiTouch=function(){return 1<this.touches.length},Rx.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Rx.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Rx.prototype._isMoved=function(){return Ct(this.touches,function(t){return t.isMoved()}).length},Rx.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Rx.prototype._start=function(t){var e,o,i=this,r=0,n=i.filter,s=rx(t),a=s.length,p=t.which;if(!(p&&1<p||i._maxTouchesReached()))for(Rx.current=null,i.currentTarget=t.currentTarget,i.stopPropagation&&t.stopPropagation();r<a&&!i._maxTouchesReached();r++)o=s[r],(e=n?o.currentTarget:i.element)&&0===e.length||(o=new px(i,e,o),i.touches.push(o),o.press(),i._isMultiTouch()&&i.notify("gesturestart",{}))},Rx.prototype._move=function(t){this._eachTouch("move",t)},Rx.prototype._end=function(t){this._eachTouch("end",t)},Rx.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:nv(),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()},Rx.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=rx(e),a=this.touches,p=0;p<a.length;p++)n[(o=a[p]).id]=o;for(p=0;p<s.length;p++)(r=n[(i=s[p]).id])&&r[t](i)},Rx.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:sv,preventDefault:sv})},Rx.defaultThreshold=function(t){qm=t},Rx.minHold=function(t){Xm=t};var ux,dx,fx,gx,yx,vx,mx=Rx,xx=Object.assign,_x=Math.abs,bx="change",wx=((yx=Ff)&&(Bx.__proto__=yx),((Bx.prototype=Object.create(yx&&yx.prototype)).constructor=Bx).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Bx.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Bx.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Bx.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Bx),Cx=((gx=Ff)&&(Ox.__proto__=gx),((Ox.prototype=Object.create(gx&&gx.prototype)).constructor=Ox).prototype.onCancel=function(){this.transition.cancel()},Ox.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Ox.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Ox.prototype.done=function(){return _x(this.velocity)<1},Ox.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),gx.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),gx.prototype.start.call(this)))},Ox.prototype.tick=function(){var t=this,e=t.dimension,o=t.paneAxis.outOfBounds()?.5:t.friction,o=t.velocity*=o,o=t.movable[t.axis]+o;!t.elastic&&e.outOfBounds(o)&&(o=Math.max(Math.min(o,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,o)},Ox.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Ox.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Ox.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Gm.easeOutExpo})},Ox),Sx=((fx=Ff)&&(Mx.__proto__=fx),((Mx.prototype=Object.create(fx&&fx.prototype)).constructor=Mx).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Mx.prototype.done=function(){return _x(this.offset.y)<5&&_x(this.offset.x)<5},Mx.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Mx.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Mx.prototype.setCallback=function(t){t&&lt(t)&&(this.callback=t)},Mx.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}},Mx),kx=((dx=b.Class)&&(Tx.__proto__=dx),((Tx.prototype=Object.create(dx&&dx.prototype)).constructor=Tx).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,e=o/e.total,i=Math.round(-i[t]*e),r=Math.round(o*e);this.element.style.display=1<=e?"none":"",o<i+r?r=o-i:i<0&&(r+=i,i=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,i)},Tx.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Tx.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Tx),Ax=((ux=mf)&&(Px.__proto__=ux),((Px.prototype=Object.create(ux&&ux.prototype)).constructor=Px).prototype._initOptions=function(t){this.options=x({},this.options,t)},Px.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&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},Px.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Px.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Px.prototype.height=function(){return this.dimensions.y.size},Px.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Px.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Px.prototype._resize=function(){this._native||this.contentResized()},Px.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Px.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Px.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)},Px.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Px.prototype.enable=function(){this.enabled=!0},Px.prototype.disable=function(){this.enabled=!1},Px.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(_x(t)),this.scrollElement.scrollTop(_x(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Px.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())},Px.prototype.pullHandled=function(){},Px.prototype.destroy=function(){var t=this.element;ov(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Px.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Px.prototype._initPullToRefresh=function(){},Px.prototype._dragEnd=function(){},Px.prototype._paneChange=function(){},Px.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new kx({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(bx,function(){s.refresh()}),n.bind(bx,function(){s.show()}),e[t+"inertia"]=new Cx({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})}})},Px);function Px(t,e){ux.call(this);var s=this;this.element=t,this._initOptions(e);e=navigator.userAgent;e=(e=Qy(e)).ios||e.android,s._native=s.options.useNative&&e,e=Zy('<div class="km-scroll-header"/>');if(s._native)return it(t,"km-native-scroller"),Uy(e,t),void xx(s,{scrollElement:t,fixedContainer:t.children[0]});t.style.overflow="hidden",it(t,"km-scroll-wrapper");var o=t,i=Zy('<div class="km-scroll-container"/>');for(o.appendChild(i);o.firstChild!==i;)i.appendChild(o.firstChild);Uy(e,t);var e=t.children[1],r=new sm(t),n=new cm(e),a=new pm({element:e,container:t,forcedEnabled:s.options.zoom}),p=this.options.avoidScrolling,h=new mx(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:s.options.zoom,supportDoubleTap:s.options.supportDoubleTap,start:function(t){a.refresh();var e=_x(t.x.velocity),o=_x(t.y.velocity),i=o<=2*e;r=s.fixedContainer,n=t.event.target;var r,n,e=e<=2*o;!(r===n||function(t){if(!n)return!1;for(var e=n.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(r))&&!p(t)&&s.enabled&&(a.x.enabled&&i||a.y.enabled&&e)?h.capture():h.cancel()}}),l=new lm({movable:n,dimensions:a,userEvents:h,elastic:s.options.elastic}),c=new wx({movable:n,dimensions:a,userEvents:h,tapCapture:r}),u=new Sx({moveTo:function(t){s.scrollTo(t.x,t.y)}});n.bind(bx,function(){s.scrollTop=-n.y,s.scrollLeft=-n.x,s.trigger("scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),s.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),ev(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),xx(s,{movable:n,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:h,pane:l,tapCapture:r,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),s._initAxis("x"),s._initAxis("y"),s._wheelEnd=function(){s._wheel=!1,s.userEvents.end(0,s._wheelY)},a.refresh(),s.options.pullToRefresh&&s._initPullToRefresh()}function Tx(t){dx.call(this);var e="x"===t.axis,o=Zy('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');xx(this,t,{element:o,elementSize:0,movable:new cm(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(bx,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Mx(t){fx.call(this,t),xx(this,t,{origin:{},destination:{},offset:{}})}function Ox(t){gx.call(this);var e=this;xx(e,t,{transition:new Gm({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",tv(e.start,e)),e.userEvents.bind("gestureend",tv(e.start,e)),e.userEvents.bind("tap",tv(e.onEnd,e))}function Bx(t){yx.call(this,t);xx(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Rx(t,e){vx.call(this);var o,i,r,n=this,s=uv(),a=(this.support=s,this.options=e=e||{},o=n.filter=e.filter,n.threshold=e.threshold||qm,n.minHold=e.minHold||Xm,n.touches=[],n._maxTouches=e.multiTouch?2:1,n.allowSelection=e.allowSelection,n.captureUpIfMoved=e.captureUpIfMoved,n.useClickAsTap=!e.fastTap&&!s.delayedClick(),n._clicks=0,n.supportDoubleTap=e.supportDoubleTap,!s.touch||s.mouseAndTouchPresent);Wm(n,{element:t,surface:e.global&&a?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=tv(this._move,this),ev(n.surface,iv("move"),this._surfaceMoveHandler),this._surfaceEndHandler=tv(this._end,this),ev(n.surface,iv("up cancel"),this._surfaceEndHandler),this._elementStartHandler=tv(this._start,this),ev(t,iv("down"),o,this._elementStartHandler),n.useClickAsTap&&(this._elementClickHandler=tv(this._click,this),ev(t,iv("click"),o,this._elementClickHandler)),(s.pointers||s.msPointers)&&(s.browser.version<11?(a="pinch-zoom double-tap-zoom",t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?a+" "+e.touchAction:a):t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=Um,ev(t,iv("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=tv(this._select,this),ev(t,iv("mousedown"),o,this._elementSelectHandler),n.captureUpIfMoved&&s.eventCapture&&(i=n.surface,r=tv(n.preventIfMoving,n),cx(function(t){i.addEventListener(t,r,!0)})),n.bind(["press","hold",Zm,Qm,"start",Ym,"end",Km,"cancel","gesturestart",$m,Jm,tx,"select"],e)}e(Ax,{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"}}),rv(Ax,["pull","scroll","resize"]);function Ex(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}Ex.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const Lx=Ex;var Ix=Math,zx=Ix.min,Vx=Ix.pow,jx=b.geometry.Point,Dx="marker",Hx="DOMMouseScroll mousewheel",Ux={bubble:h,shape:If,tile:jf};function Fx(t){var e=[];if(t)for(var o=Fy(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Ux.marker=Em;(Nx=mf)&&(I.__proto__=Nx),((I.prototype=Object.create(Nx&&Nx.prototype)).constructor=I).prototype.destroy=function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),ot(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();ov(this.element,Hx,this._mousewheelHandler),Nx.prototype.destroy.call(this)},I.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=uv(),this.context=i,this.initObserver(i),this.initServices(i),this._initOptions(e),this._setEvents(e),this.crs=new qy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),ev(this.element,Hx,this._mousewheelHandler)},I.prototype._initOptions=function(t){this.options=x({},this.options,t)},I.prototype._initElement=function(t){it(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Hy(t);t=Zy("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new Lx(this,t)},I.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},I.prototype.addObserver=function(t){t&&this.observers.push(t)},I.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},I.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},I.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||Nx.prototype.trigger.call(this,t,e),i},I.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},I.prototype.zoom=function(t){var e=this.options,t=P(t)?(t=Ix.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom;return t},I.prototype.center=function(t){t=t?(this.options.center=ky.create(t).toArray(),this._reset(),this):ky.create(this.options.center);return t},I.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},I.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Hy(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=ky.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},I.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=jx.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},I.prototype.locationToView=function(t){var t=ky.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},I.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),t=jx.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,o=Vt(this.element);return t=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=M(t.pageX,t.clientX)-o.left,M(t.pageY,t.clientY)-o.top),new b.geometry.Point(e,t)},I.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},I.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},I.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},I.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return{width:o=this.options.wraparound?o:zx(e,o),height:zx(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=ky.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},I.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},I.prototype._setExtent=function(t){var e=Rv.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Rv(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),p=this.locationToLayer(i.se,s),h=Ix.abs(p.x-a.x),p=Ix.abs(p.y-a.y);if(h<=r&&p<=n)break}this.zoom(s)},I.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize(),o=(e.x+=o.width,e.y+=o.height,this.layerToLocation(e));return new Rv(t,o)},I.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},I.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))},I.prototype._createControlElement=function(t,e){var o,t=t.position||e,e="."+Fx(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(it(o=document.createElement("div"),"k-map-controls "+Fx(t)),this.element.appendChild(e=o)),document.createElement("div"));return e.appendChild(t),t},I.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new yv(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new wv(e,t);this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},I.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,i=this.element.clientWidth,r=this.element.clientHeight,o=_(o,t.x.min,t.x.max-i),e=_(e,t.y.min,t.y.max-r);this.scroller.one("scroll",tv(this._scrollEnd,this)),this.scroller.scrollTo(-o,-e)},I.prototype._navigatorCenter=function(){this.center(this.options.center)},I.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Av(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},I.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new Ax(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",tv(this._scroll,this)),t.bind("scrollEnd",tv(this._scrollEnd,this)),t.userEvents.bind("gesturestart",tv(this._scaleStart,this)),t.userEvents.bind("gestureend",tv(this._scale,this)),t.userEvents.bind("doubleTap",tv(this._doubleTap,this)),t.userEvents.bind("tap",tv(this._tap,this)),this.scrollElement=t.scrollElement},I.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)}},I.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],o=x({},e===Dx?this.options.markerDefaults:o,t),t=new Ux[e](this,o);return e===Dx&&(this.markers=t),t},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===Dx}).length||(this.markers=new Em(this,this.options.markerDefaults),this.markers.add(this.options.markers))},I.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,o=new b.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()})},I.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=nv(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},I.prototype._panComplete=function(){return 50<nv()-(this._panEndTimestamp||0)},I.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},I.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),o=new b.geometry.Point(t.center.x,t.center.y),i=this.viewToLocation(o,e),i=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t})},I.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Ix.log(t)/Ix.log(2);return Ix.round(t)},I.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")},I.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=Vx(2,this.options.minZoom-n),t.dimensions.maxScale=Vx(2,this.options.maxZoom-n),{min:-r.x,max:i-r.x}),n={min:-r.y,max:i-r.y};this.options.wraparound&&(t.max=20*i,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(t.min,t.max),o.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},I.prototype._renderLayers=function(){},I.prototype._layerSize=function(t){t=M(t,this.options.zoom);return this.options.minSize*Vx(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},I.prototype._doubleTap=function(t){var e,o,i;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._mousewheel=function(t){t.preventDefault();var e=0<Rt(t)?-1:1,o=this.options,i=this.zoom(),e=_(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))};var Nx,cc=I;function I(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Nx.call(this),this._init(t,e,o,i)}e(cc,{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}),rv(cc,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const Gx=cc;var Wx=1.5,Xx=.4,qx="#000",t="Arial, Helvetica, sans-serif",Yx="12px "+t,Zx="16px "+t,Qx="transparent",Kx="#fff",$x=function(){return{icon:{border:{width:1}},label:{font:Yx,padding:3},line:{length:10,width:2},visible:!0}},Jx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Kx,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}}},t1=function(){return{gap:Wx,spacing:Xx,target:{color:"#ff0000"}}},e1=function(){return{gap:.5,line:{color:qx,width:1},spacing:Xx}},o1=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Yx},notes:$x(),title:{font:Zx,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.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:Wx,spacing:Xx},boxPlot:Jx(),bubble:{border:{width:0},labels:{background:Qx},opacity:.6},bullet:t1(),candlestick:{border:{_brightness:.8,width:1},downColor:Kx,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:qx,width:1},spacing:.3},column:{gap:Wx,spacing:Xx},heatmap:{labels:{color:"",background:Qx,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:e1(),line:{width:2},notes:$x(),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:Wx,spacing:Xx},rangeColumn:{gap:Wx,spacing:Xx},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:Jx(),verticalBullet:t1(),verticalLine:{width:2},waterfall:e1()},title:{font:Zx},legend:{labels:{font:Yx}}}}})(),r1})())}}});