@progress/kendo-charts 1.27.0 → 1.27.1
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(hx){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function i(t){var e;return(r[t]||(e=r[t]={i:t,l:!1,exports:{}},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(z,t,e){"use strict";e.r(t);var j={},V=(e.d(j,"NAVIGATOR_AXIS",function(){return Nl}),e.d(j,"NAVIGATOR_PANE",function(){return Fl}),"arc"),D="#000",w="bottom",b="center",H="circle",U="date",F=10,N=/\{\d+:?/,C="left",G=Number.MAX_VALUE,W=-Number.MAX_VALUE,q="none",S="right",X="string",k="top",Y="value",a="#fff",y="x",v="y";function Z(t){return Array.isArray(t)}function Q(t,e){for(var o=Z(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var K=/\s+/g;function $(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(K," "))}var A=e(0);function J(t){var e=.5;t.options.stroke&&A.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 tt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function et(t){return typeof t===X}function ot(t){return m(t)||et(t)&&isFinite(t)}function it(t){return"function"==typeof t}var rt="object",nt="undefined";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===rt&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):it(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===rt&&r||{},t(e[i],n)):s!==nt&&(e[i]=n)}}(t,e[i]);return t}function st(t){return"object"==typeof t}function at(t){return m(t)?t+"px":t}var ht=/width|height|top|left|bottom|right/i;function pt(t,e){var o=et(e)?[e]:e;if(Z(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=ht.test(s)?parseFloat(r[s]):r[s]}return i}if(st(e))for(var a in e)t.style[a]=at(e[a])}function P(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[k]=o[S]=o[w]=o[C]=t:(o[k]=t[k]||e,o[S]=t[S]||e,o[w]=t[w]||e,o[C]=t[C]||e),o}function lt(){}var ct={compile:function(t){return t}},ut=(lt.register=function(t){ct=t},lt.compile=function(t){return ct.compile(t)},lt);function dt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=ut.compile(t.template):it(t.content)&&(e=t.content),e}var ft=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,gt={};function yt(t){var r;return gt[t]||(r=[],t.replace(ft,function(t,e,o,i){r.push(A.drawing.util.defined(e)?e:o||i)}),gt[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e}),gt[t]}function vt(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function mt(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}gt[void 0]=function(t){return t};function xt(){this._map={}}xt.prototype.get=function(t){return this._map[this._key(t)]},xt.prototype.set=function(t,e){this._map[this._key(t)]=e},xt.prototype._key=function(t){return t instanceof Date?t.getTime():t};var _t=xt;function u(t,e){if(e)return-1!==e.indexOf(t)}function bt(t,e,o){return A.drawing.util.round(t+(e-t)*o,3)}function wt(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}wt.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},wt.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)},wt.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 Ct=wt;function St(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);A.drawing.util.defined(n)&&i.push(n)}return i}var kt=A.support.browser||{};function At(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,kt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Pt(){}var o=A.drawing.util,Tt=o.append,Mt=o.bindEvents,T=o.defined,Ot=o.deg,Bt=o.elementOffset,Rt=o.elementSize,Et=o.eventCoordinates,Lt=o.eventElement,It=o.hashKey,zt=o.last,_=o.limitValue,jt=o.objectKey,Vt=o.rad,M=o.round,Dt=o.unbindEvents,O=o.valueOrDefault,Ht=(Pt.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++,Pt.fetchFonts(e,i,r),r.depth--))})},Pt.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(A.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},Pt.preloadFonts=function(t,e){var o=[];Pt.fetchFonts(t,o),Pt.loadFonts(o,e)},Pt);function i(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function Ut(t){for(var e=G,o=W,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===G?void 0:e,max:o===W?void 0:o}}function Ft(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Nt=A.geometry.Matrix,Gt=/matrix\((.*)\)/;function Wt(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(Gt))||2!==t.length?Nt.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Nt,[null].concat(t))))}function qt(t){if(!t)return Nt.unit();for(var e=Wt(t),o=t.parentElement;o;)var i=Wt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Xt(t){return new A.Color(t).isDark()?a:D}function Yt(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 Qt={},o={size:{configurable:!0}},o=(Yt.prototype.values=function(){return this._values.filter(function(t){return t!==Qt})},Yt.prototype.has=function(t){return void 0!==this._index[t]},Yt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Yt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Qt,delete this._index[t])},Yt.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(Yt.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 Kt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?Zt:Yt)(t);var e}function $t(t){throw t}var Jt={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 te(t,e){t=M(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=M(t/e,F);return M(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),F)}(ee=A.Class)&&(oe.__proto__=ee),((oe.prototype=Object.create(ee&&ee.prototype)).constructor=oe).prototype.clone=function(){return new oe(this.x,this.y)},oe.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},oe.prototype.rotate=function(t,e){var e=Vt(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=M(i+(r-i)*o+(n-t)*e,3),this.y=M(t+(n-t)*o-(r-i)*e,3),this},oe.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},oe.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},oe.onCircle=function(t,e,o){e=Vt(e);return new oe(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};var ee,B=oe;function oe(t,e){ee.call(this),this.x=t||0,this.y=e||0}function ie(t,e,o,i,r){r=Vt(r);return new B(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(re=A.Class)&&(ne.__proto__=re),((ne.prototype=Object.create(re&&re.prototype)).constructor=ne).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},ne.prototype.width=function(){return this.x2-this.x1},ne.prototype.height=function(){return this.y2-this.y1},ne.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},ne.prototype.move=function(t,e){var o=this.height(),i=this.width();return T(t)&&(this.x1=t,this.x2=this.x1+i),T(e)&&(this.y1=e,this.y2=this.y1+o),this},ne.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},ne.prototype.wrapPoint=function(t){var e=Z(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new ne(o,e,o,e)),this},ne.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},ne.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===w?v:y,a=s==v?r:n;return e===b?(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},ne.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},ne.prototype.expand=function(t,e){return this.shrink(-t,-e),this},ne.prototype.pad=function(t){t=P(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},ne.prototype.unpad=function(t){t=P(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},ne.prototype.clone=function(){return new ne(this.x1,this.y1,this.x2,this.y2)},ne.prototype.center=function(){return new B(this.x1+this.width()/2,this.y1+this.height()/2)},ne.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},ne.prototype.points=function(){return[new B(this.x1,this.y1),new B(this.x2,this.y1),new B(this.x2,this.y2),new B(this.x1,this.y2)]},ne.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},ne.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},ne.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=ie(0,0,r,i,t),s=ie(e,0,r,i,t),a=ie(e,o,r,i,t),r=ie(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},ne.prototype.toRect=function(){return new A.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},ne.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},ne.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===y?"width":"height",n=this[e]();u(o,[C,k])?(this[i]=t[i],this[r]=this[i]+n):u(o,[S,w])?(this[r]=t[r],this[i]=this[r]-n):o===b&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};var re,R=ne;function ne(t,e,o,i){re.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function se(t,e){return t-e}(pe=A.Class)&&(fe.__proto__=pe),((fe.prototype=Object.create(pe&&pe.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=Vt(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=M(this.center.x-o*e,3),t=M(this.center.y-t*e,3);return new B(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(Vt(i)),i=Math.cos(Vt(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 R(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 B(s,t),r=this.point(r),r=new B(r.x-e.x,r.y-e.y),n=this.point(n),n=new B(n.x-e.x,n.y-e.y),e=M(s*s+t*t,3);return(r.equals(a)||tt(r,a))&&!tt(n,a)&&o*o<=e&&e<=i*i},fe.prototype.getBBox=function(){for(var t=new R(G,G,W,W),e=M(this.startAngle%360),o=M((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(se),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},fe.prototype.expand=function(t){return this.radius+=t,this};var ae,he,pe,le=fe,ce=((he=le)&&(de.__proto__=he),((de.prototype=Object.create(he&&he.prototype)).constructor=de).prototype.expand=function(t){return he.prototype.expand.call(this,t)},de.prototype.clone=function(){return new de(this.center,this.radius,this.startAngle,this.angle)},de.prototype.setRadius=function(t){return this.radius=t,this},de),o=((ae=A.Class)&&(ue.__proto__=ae),((ue.prototype=Object.create(ae&&ae.prototype)).constructor=ue).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new A.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new A.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=A.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},ue);function ue(){ae.apply(this,arguments)}function de(t,e,o,i){he.call(this,t,0,e,o,i)}function fe(t,e,o,i,r){pe.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}o.current=new o;var ge,ye=o,o=((ge=A.Class)&&(ve.__proto__=ge),((ve.prototype=Object.create(ge&&ge.prototype)).constructor=ve).prototype.initUserOptions=function(t){return t},ve.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},ve.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},ve.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},ve.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},ve.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},ve.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},ve.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},ve.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},ve.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},ve.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},ve.prototype.createVisual=function(){this.visual=new A.drawing.Group({zIndex:this.options.zIndex,visible:O(this.options.visible,!0)})},ve.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=A.drawing.Animation.create(this.visual,this.options.animation))},ve.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):T(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},ve.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},ve.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},ve.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(O(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},ve.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)}},ve.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},ve.prototype.renderComplete=function(){},ve.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},ve.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);T(n.options.zIndex)||(n.options.zIndex=O(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},ve.prototype.createGradientOverlay=function(t,e,o){o=new A.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},ve.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},ve.prototype.supportsPointInactiveOpacity=function(){return!0},ve);function ve(t){ge.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}o.prototype.options={};var me,r=o,o=((me=r)&&(xe.__proto__=me),((xe.prototype=Object.create(me&&me.prototype)).constructor=xe).prototype.reflow=function(t){function e(){i.align(t,y,r.align),i.align(t,v,r.vAlign),i.paddingBox=o.clone().unpad(p).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,p=r.margin,l=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(p).unpad(c).unpad(l),me.prototype.reflow.call(this,u),o=h?this.box=new R(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(p),e()),this.translateChildren(o.x1-u.x1+p.left+c+l.left,o.y1-u.y1+p.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},xe.prototype.align=function(t,e,o){this.box.align(t,e,o)},xe.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},xe.prototype.createVisual=function(){me.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},xe.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},xe);function xe(t){me.call(this,t),this.options.margin=P(this.options.margin),this.options.padding=P(this.options.padding)}i(o,{align:C,vAlign:k,margin:{},padding:{},border:{color:D,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var _e,be=o,o=((_e=be)&&(we.__proto__=_e),((we.prototype=Object.create(_e&&_e.prototype)).constructor=we).prototype.getElement=function(){var t,e,o=this.options,i=this.paddingBox,r=o.type,n=o.rotation,s=i.center(),a=i.width()/2,h=i.height()/2;return o.visible&&this.hasBox()?(e=this.visualStyle(),r===H?t=new A.drawing.Circle(new A.geometry.Circle([M(i.x1+a,3),M(i.y1+h,3)],Math.min(a,h)),e):"triangle"===r?t=A.drawing.Path.fromPoints([[i.x1+a,i.y1],[i.x1,i.y2],[i.x2,i.y2]],e).close():"cross"===r?((t=new A.drawing.MultiPath(e)).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t.moveTo(i.x1,i.y2).lineTo(i.x2,i.y1)):(h=i.toRect(),"roundedRect"===r&&(a=O(o.borderRadius,h.width()/5),h.setCornerRadius(a)),t=A.drawing.Path.fromRect(h,e)),n&&t.transform(A.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=o.zIndex,t):null},we.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()},we.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}},we.prototype.createVisual=function(){this.visual=this.createElement()},we);function we(t,e){_e.call(this,t),this.pointData=e}i(o,{type:H,align:b,vAlign:b});var Ce=o,Se={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};(ke=r)&&(Ae.__proto__=ke),((Ae.prototype=Object.create(ke&&ke.prototype)).constructor=Ae).prototype.reflow=function(){var t=this.options,e=this.children,o=new R(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i,r,n,s,a,h,p,l,c,u,d,f=0;f<e.length;f++)e[f].reflow(o),i=o,r=e[f].box,d=u=c=l=p=h=a=s=n=void 0,o=(i.x1===r.x1&&i.y1===r.y1&&i.x2===r.x2&&i.y2===r.y2?r:(n=Math.min(i.x1,r.x1),s=Math.max(i.x1,r.x1),a=Math.min(i.x2,r.x2),h=Math.max(i.x2,r.x2),p=Math.min(i.y1,r.y1),l=Math.max(i.y1,r.y1),c=Math.min(i.y2,r.y2),u=Math.max(i.y2,r.y2),(d=[])[0]=new R(s,p,a,l),d[1]=new R(n,l,s,c),d[2]=new R(a,l,h,c),d[3]=new R(s,c,a,u),i.x1===n&&i.y1===p||r.x1===n&&r.y1===p?(d[4]=new R(n,p,s,l),d[5]=new R(a,c,h,u)):(d[4]=new R(a,p,h,l),d[5]=new R(n,c,s,u)),vt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new R},Ae.prototype.createVisual=function(){this.visual=new A.drawing.Group,this.createBackground()},Ae.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=A.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)},Ae.prototype.getRoot=function(){return this},Ae.prototype.createGradient=function(t){var e,s,o=this.gradients,i=jt(t),r=Se[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new A.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 A.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Ae.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Ae.prototype.size=function(){var t=this.options;return new R(0,0,t.width,t.height)};var ke,o=Ae;function Ae(t){ke.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:a,border:{color:D,width:0},margin:P(5),zIndex:-2});var Pe,Te=o,o=((Pe=r)&&(Me.__proto__=Pe),((Me.prototype=Object.create(Pe&&Pe.prototype)).constructor=Me).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,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,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,n=n.maxGroupElementsSize,h=s.length,p=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=p,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=t[e+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),_=new R;_[o+1]=x,_[o+2]=x+m[r],_[e+1]=f,_[e+2]=f+m[i],v.reflow(_),f+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=p,t[o+2]=p+a,t[e+2]=t[e+1]+n}},Me.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===w?o=e-t:i===b&&(o=(e-t)/2),o},Me.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=M(t[o]()),a=e.length,h=[],p=0,l=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f],y=(g.box||g.reflow(t),this.elementSize(g));this.options.wrap&&M(l+r+y[o])>s&&(h.push({groupElements:d,groupSize:p,groupElementsSize:l}),u=Math.max(u,l),c+=n+p,l=p=0,d=[]),p=Math.max(p,y[i]),0<l&&(l+=r),l+=y[o],d.push(g)}return h.push({groupElements:d,groupSize:p,groupElementsSize:l}),{groups:h,groupsSize:c+=p,maxGroupElementsSize:u=Math.max(u,l)}},Me.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Me.prototype.createVisual=function(){},Me);function Me(t){Pe.call(this,t),this._initDirection()}i(o,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Oe,Be=o,Re=A.drawing.Text,o=((Oe=r)&&(Ee.__proto__=Oe),((Ee.prototype=Object.create(Oe&&Oe.prototype)).constructor=Ee).prototype.reflow=function(t){var e=this.options,e=e.size=A.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new R(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Ee.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new Re(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},Ee);function Ee(t,e){Oe.call(this,e),this.content=t,this.reflow(new R)}i(o,{font:"12px sans-serif",color:D});var Le=o;function Ie(t){var e=t.origin,t=t.bottomRight();return new R(e.x,e.y,t.x,t.y)}var ze,je,Ve=/\n/m,De=((je=be)&&(Ue.__proto__=je),((Ue.prototype=Object.create(je&&je.prototype)).constructor=Ue).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ve),o=new Be({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 Le(e[r].trim(),i);o.append(n)}},Ue.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=Ie(i.clippedBBox()||new A.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(je.prototype.reflow.call(this,t),o.rotation&&(i=P(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)))},Ue.prototype.createVisual=function(){var t=this.options;this.visual=new A.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ue.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!T(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):je.prototype.renderVisual.call(this))},Ue.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},Ue.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ue.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},Ue.prototype.rotationTransform=function(){var t,e,o,i=this.options.rotation;return i?(t=(e=this.normalBox.center()).x,e=e.y,o=this.rotatedBox.center(),A.geometry.transform().translate(o.x-t,o.y-e).rotate(i,[t,e])):null},Ue),o=((ze=r)&&(He.__proto__=ze),((He.prototype=Object.create(ze&&ze.prototype)).constructor=He).prototype.reflow=function(t){ze.prototype.reflow.call(this,t),this.box.snapTo(t,y)},He.buildTitle=function(t,e){var o,t="string"==typeof t?{text:t}:t;return o=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new He(t):o},He.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==w}),t=t.filter(function(t){return t&&t.options.position===w});return Fe(e),Fe(t),t.reverse(),e.concat(t)},He);function He(t){ze.call(this,t),this._textBox=new De(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function Ue(t,e,o){je.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new R)}function Fe(t){for(var e=1;e<t.length;e++){var o=t[e]._textBox,i=t[e-1]._textBox;i.options.margin=Object.assign(P(i.options.margin),{bottom:0}),o.options.margin=Object.assign(P(o.options.margin),{top:0})}}i(o,{color:D,position:k,align:b,margin:P(5),padding:P(5)});var Ne,Ge=o,o=((Ne=De)&&(We.__proto__=Ne),((We.prototype=Object.create(Ne&&Ne.prototype)).constructor=We).prototype.visualContext=function(t){t=Ne.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},We.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Lt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},We.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ie(t.bbox(e.matrix()))):Ne.prototype.rotate.call(this),this.box},We.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return Ne.prototype.rotationTransform.call(this);var o=A.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||k,n=t===k||t===w?y:v,s=t===k||t===w?v:y,t=t===k||t===C?r.origin:r.bottomRight(),a=i.topLeft().transformCopy(o),h=i.topRight().transformCopy(o),p=i.bottomRight().transformCopy(o),i=i.bottomLeft().transformCopy(o),o=A.geometry.Rect.fromPoints(a,h,p,i),l={};l[s]=r.origin[s]-o.origin[s];var c,o=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(h[s]+l[s]-t[s]),s=M(o,F)===M(t,F)?(c=a,h):t<o?(c=h,p):(c=a,i),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,A.geometry.transform().translate(l.x,l.y).rotate(e)},We);function We(t,e,o,i,r){Ne.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new R)}i(o,{_autoReflow:!1});var qe,Xe=o,o=((qe=be)&&(Ye.__proto__=qe),((Ye.prototype=Object.create(qe&&qe.prototype)).constructor=Ye).prototype.hide=function(){this.options.visible=!1},Ye.prototype.show=function(){this.options.visible=!0},Ye.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 R,r=function(){return h},n=p.size,s=this.fields.text,T(o)&&o.visible&&((a=dt(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 De(s,x({},o)),this.label.aliasFor=r,"inside"!==o.position||T(n)||(p.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))),p.width=t||n||7,p.height=e||n||7,(a=new Ce(x({},p))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new R),this.wrapperBox=i.wrap(a.box))},Ye.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),p=r.line.length,l=r.position;r.visible&&(u(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-p,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[i.x2,h.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(p,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[i.x1,h.y]],o=i.clone().wrapPoint(e))):l===w?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,p),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-p),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s)&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box)),this.contentBox=i,this.targetBox=t,this.box=o||i)},Ye.prototype.createVisual=function(){qe.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Ye.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()):qe.prototype.renderVisual.call(this)},Ye.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(J(t=A.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Ye.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},Ye.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},Ye.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Ye.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Lt(t),text:T(e.label)?e.label.text:"",visual:this.visual})},Ye);function Ye(t,e,o){qe.call(this,e),this.fields=t,this.chartService=o,this.render()}i(o,{icon:{visible:!0,type:H},label:{position:"inside",visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:k,zIndex:2});function Ze(){}function Qe(t){this._intlService=t}function Ke(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new oo(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}var $e=o,Je={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}},to=(Ze.register=function(t){Je=t},o.implementation.get=function(){return Je},Object.defineProperties(Ze,o),Ze),eo=/\{(\d+)(:[^\}]+)?\}/g,o={intl:{configurable:!0}},oo=(o.intl.get=function(){return this._intlService||to.implementation},o.intl.set=function(t){this._intlService=t},Qe.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return et(t)&&t.match(N)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Qe.prototype.localeAuto=function(t,i,r){var n=this.intl;return et(t)&&t.match(N)?t.replace(eo,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(Qe.prototype,o),Qe),o={intl:{configurable:!0}};o.intl.get=function(){return this._intlService||to.implementation},o.intl.set=function(t){this._intlService=t,this.format.intl=t},Ke.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Ke.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Ke.prototype,o);function io(){}var ro,no=Ke,so=(io.register=function(t){ro=t},io.create=function(t,e){if(ro)return ro.create(t,e)},io);function ao(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new A.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),J(n),n}function ho(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new A.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),J(e),e}(po=r)&&(n.__proto__=po),((n.prototype=Object.create(po&&po.prototype)).constructor=n).prototype.initFields=function(){},n.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},n.prototype.normalizeLabelRotation=function(t){var e=t.rotation;st(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},n.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:b,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))}}},n.prototype.clearLabels=function(){this.children=vt(this.children,function(t){return!(t instanceof Xe)}),this.labels=[]},n.prototype.clearTitle=function(){var e=this;this.title&&(this.children=vt(this.children,function(t){return t!==e.title}),this.title=void 0)},n.prototype.clear=function(){this.clearLabels(),this.clearTitle()},n.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 R(r,e.y1,r,e.y2-t):new R(e.x1,i,e.x2-t,i)},n.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 De(t.text,t),this.append(t),this.title=t)},n.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 $e({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(T(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,w])||(r.options.position=t.reverse?w:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?w:k,this.append(r),this.notes.push(r))}},n.prototype.parseNoteValue=function(t){return t},n.prototype.renderVisual=function(){po.prototype.renderVisual.call(this),this.createPlotBands()},n.prototype.createVisual=function(){po.prototype.createVisual.call(this),this.createBackground(),this.createLine()},n.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new A.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},n.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)T(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(ao(p,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},n.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new A.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&J(e),(o=this._lineGroup=new A.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},n.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},n.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=A.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},n.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 A.drawing.Group({zIndex:-1}),s=vt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var h=o[a],p=void 0,l=void 0,c=h.label,u=void 0,l=i?(p=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(p=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,h,new R(p.x1,l.y1,p.x2,l.y2))),0!==p.width()&&0!==l.height()&&(c=new A.geometry.Rect([p.x1,l.y1],[p.width(),l.height()]),p=A.drawing.Path.fromRect(c,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(p),u)&&n.append(u)}this.appendVisual(n)}},n.prototype.createPlotBandLabel=function(t,e,o){var i,r;return!1===t.visible?null:(i=t.text,T(t)&&t.visible&&((r=dt(t))?i=r({text:i,item:e}):t.format&&(i=this.chartService.format.auto(t.format,i)),t.color||(t.color=this.options.labels.color)),(r=new De(i,t)).reflow(o),r.renderVisual(),r.visual)},n.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],p={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=M(t[n]);u(s,l)||n%o==0||a&&h===s||(p.position=s,c.append(ho(p,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},n.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,h=((this.getRoot()||{}).box||t)[s](),p=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=h&&(p=Math.max(p,c))}this.box=r?new R(t.x1,t.y1,t.x1+p+a,t.y2):new R(t.x1,t.y1,t.x2,t.y1+p+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},n.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},n.prototype.labelTickIndex=function(t){return t.index},n.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),p=i?a.box.height():a.box.width(),l=n[h],h=n[h+1],c=void 0,u=void 0,u=i?c=o?l+(h-l)/2-p/2:l-p/2:o?(c=l,h):(c=l-p/2)+p;this.positionLabel(a,r,c,u)}},n.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=w):(n+=r,t.options.rotationOrigin=k),new R(o,n,i,n+t.box.height()));t.reflow(s)},n.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},n.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 R);return!0}},n.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:w),e.reflow(this.box))},n.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;T(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},n.prototype.noteSlot=function(t){return this.getSlot(t)},n.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]},n.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=dt(e),n=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return n},n.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},n.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},n.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,h=0,p=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],h=Math.max(h,d-c.box[r+1]),p=Math.max(p,c.box[r+2]-f)}return{start:h,end:p}},n.prototype.limitRange=function(t,e,o,i,r){var n,s,a=this.options;return t<o&&r<0&&(!T(a.min)||a.min<=o)||i<e&&0<r&&(!T(a.max)||i<=a.max)?null:e<o&&0<r||i<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<o&&r<0?(n=_(t,o,i),s=_(t+a,o+a,i)):i<e&&0<r&&(s=_(e,o,i),n=_(e-a,o,i-a)),{min:n,max:s})},n.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},n.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},n.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]}},n.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},n.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},n.prototype.labelsBetweenTicks=function(){return!this.options.justified},n.prototype.prepareUserOptions=function(){};var po,o=n;function n(t,e){void 0===e&&(e=new no),po.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!==q},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!==q},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:D,visible:!0},title:{visible:!0,position:b},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:q,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:D,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var lo=o,co="milliseconds",uo="seconds",fo="minutes",go="hours",yo="days",vo="weeks",mo="months",xo="years",_o=1e3,bo=60*_o,wo=60*bo,Co=24*wo,So=7*Co,ko=31*Co,Ao=365*Co,Po={years:Ao,months:ko,weeks:So,days:Co,hours:wo,minutes:bo,seconds:_o,milliseconds:1};function To(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*bo}function Mo(t,e){return new Date(t.getTime()+e)}function Oo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Bo(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Ro(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=Oo(t)).getHours(),o===xo?Bo(a=new Date(t.getFullYear()+e,0,1),0):o===mo?Bo(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===vo?Bo(a=Ro(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,yo),i):o===yo?Bo(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===go?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),a=Mo(s,(i.getTimezoneOffset()-s.getTimezoneOffset())*bo+n*wo)):o===fo?0<(a=Mo(t,e*bo)).getSeconds()&&a.setSeconds(0):o===uo?a=Mo(t,e*_o):o===co&&(a=Mo(t,e)),o!==co)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function Eo(t,e,o){return Ro(Oo(t),0,e,o)}function Lo(t,e,o){t=Oo(t);return t&&Eo(t,e,o).getTime()===t.getTime()?t:Ro(t,1,e,o)}function Io(t,e){return t&&e?t.getTime()-e.getTime():-1}function zo(t,e){return t.getTime()-e}function jo(t){if(Z(t)){for(var e=[],o=0;o<t.length;o++)e.push(jo(t[o]));return e}if(t)return Oo(t).getTime()}function Vo(t,e){return t&&e?jo(t)===jo(e):t===e}function Do(t,e,o){return To(t,e)/Po[o]}function Ho(t,e,o,i){var t=Oo(t),r=Oo(e);return(o===mo?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Do(t,new Date(t.getFullYear(),t.getMonth()),yo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===xo?t.getFullYear()-r.getFullYear()+Ho(t,new Date(t.getFullYear(),0),mo,1)/12:o===yo||o===vo?Do(t,r,o):zo(t,e)/Po[o])/i}function Uo(t,e,o){return o===xo?e.getFullYear()-t.getFullYear():o===mo?12*Uo(t,e,xo)+e.getMonth()-t.getMonth():o===yo?Math.floor(zo(e,t)/Co):Math.floor(zo(e,t)/Po[o])}function Fo(t,e){return et(e)&&t.parseDate(e)||Oo(e)}function No(t,e){if(Z(e)){for(var o=[],i=0;i<e.length;i++)o.push(Fo(t,e[i]));return o}return Fo(t,e)}function Go(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Wo=lo)&&(s.__proto__=Wo),((s.prototype=Object.create(Wo&&Wo.prototype)).constructor=s).prototype.initFields=function(){this._ticks={}},s.prototype.categoriesHash=function(){return""},s.prototype.clone=function(){var t=new s(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},s.prototype.initUserOptions=function(t){var e=t.categories||[],o=T(t.min),i=T(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},s.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)}},s.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}},s.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},s.prototype.roundedRange=function(){return this.range()},s.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},s.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}},s.prototype.arrangeLabels=function(){Wo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},s.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=zt(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)},s.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},s.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},s.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},s.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},s.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)],h=this.tickIndices(t),p=[],l=0;l<h.length;l++)p.push(a+M(r*(h[l]-s),3));return p},s.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},s.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)},s.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]}},s.prototype.lineDir=function(){return this.options.reverse?-1:1},s.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,h=this.lineInfo(),p=h.axis,h=h.lineStart,l=a.clone(),c=!T(e),t=O(t,0),e=O(e,t),e=Math.max(e-1,t),u=h+(t-n)*s,h=h+(Math.max(t,e)+1-n)*s;return c&&i&&(h=u),o&&(u=_(u,a[p+1],a[p+2]),h=_(h,a[p+1],a[p+2])),l[p+1]=r?h:u,l[p+2]=r?u:h,l},s.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},s.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),Wo.prototype.slot.call(this,t,e,o)},s.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,h=s[e+1],s=s[e+2],t=t[e];return t<h||s<t?null:(s=(e=(o?r:a)+(t-h)/n)%1,i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e))},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},s.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},s.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},s.prototype.categoriesCount=function(){return(this.options.categories||[]).length},s.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=M(t/(o/e),F);return{min:t,max:e+t}},s.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}},s.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)}},s.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},s.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}},s.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=O(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new Xe(i,o,t,r,e)},s.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},s.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},s.prototype.arrangeNotes=function(){Wo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},s.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()}},s.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=M(t/o,F),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},s.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}},s.prototype.valueRange=function(){return this.range()},s.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(Vo(i[n],o))return n;return-1}return i.indexOf(o)},s.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}},s.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new _t,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},s.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Wo,o=s;function s(){Wo.apply(this,arguments)}i(o,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:D},labels:{zIndex:1},justified:!1,_deferLabels:!0});var qo=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"},Xo=[co,uo,fo,go,yo,vo,mo,xo],Yo="fit";function Zo(t){var e=t._range;return e||((e=t._range=Ut(t)).min=Oo(e.min),e.max=Oo(e.max)),e}function Qo(t){this.options=t}function Ko(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=Ro(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&Vo(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&&Vo(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))}Qo.prototype.displayIndices=function(){return{min:0,max:1}},Qo.prototype.displayRange=function(){return{}},Qo.prototype.total=function(){return{}},Qo.prototype.valueRange=function(){return{}},Qo.prototype.valueIndex=function(){return-1},Qo.prototype.values=function(){return[]},Qo.prototype.totalIndex=function(){return-1},Qo.prototype.valuesCount=function(){return 0},Qo.prototype.totalCount=function(){return 0},Qo.prototype.dateAt=function(){return null};function $o(t,e,o){for(var i,r,n,s=Zo(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,p=t.maxDateGroups,l=t.baseUnit===Yo,c=e?Xo.indexOf(e):0,u=l?Xo[c++]:t.baseUnit,d=a/Po[u],f=d;!r||p<=d;){for(i=i||h[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===zt(Xo)){r=Math.ceil(f/p);break}if(!l){p<d&&(r=Math.ceil(f/p));break}u=Xo[c++]||zt(Xo),f=a/Po[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}Ko.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ko.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Ho(this.displayStart,this.valueStart,o,t),o=Ho(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},Ko.prototype.total=function(){return{min:this.start,max:this.end}},Ko.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ko.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ko.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Ho(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ko.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Ho(t,this.start,e.baseUnit,e.baseUnitStep))},Ko.prototype.dateIndex=function(t){var e=this.options;return Ho(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ko.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ko.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=Ro(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ko.prototype.dateAt=function(t,e){var o=this.options;return Ro(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Ko.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Ho(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),Ro(s,e*n,r,i)};(Jo=qo)&&(p.__proto__=Jo),((p.prototype=Object.create(Jo&&Jo.prototype)).constructor=p).prototype.clone=function(){var t=new p(Object.assign({},this.options),this.chartService);return t.createLabels(),t},p.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},p.prototype.initUserOptions=function(t){return t},p.prototype.initFields=function(){Jo.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=No(e,i))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:i,min:Fo(e,o.min),max:Fo(e,o.max),weekStartDay:Go(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=Zo(i),t=o.maxDivisions,this.dataRange=new Ko(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==Yo&&!u(e,Xo)){for(var o,i,r=t,n=r.categories,s=T(n)?n.length:0,a=G,h=0;h<s;h++){var p,l=n[h];l&&o&&0<(p=To(l,o))&&(i=(a=Math.min(a,p))>=Ao?xo:ko-3*Co<=a?mo:So<=a?vo:Co<=a?yo:wo<=a?go:bo<=a?fo:uo),o=l}r.baseUnit=i||yo}return e!==Yo&&"auto"!==t.baseUnitStep||$o(t),t}(o)),t?(i=this.dataRange.displayRange(),$o(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 Ko(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||yo,this.dataRange=this.divisionRange=new Qo(o)),this.rangeLabels=[]},p.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return Jo.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&&r.splice(h,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},p.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Io(t,e.min)&&Io(t,e.max)<=0&&o.length},p.prototype.parseNoteValue=function(t){return Fo(this.chartService.intl,t)},p.prototype.noteSlot=function(t){return this.getSlot(t)},p.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=M(t/r,F);return n.min&&n.max&&(r=Mo(e.min||n.min,t),e=Mo(e.max||n.max,t),n={min:Ro(r,0,o,i),max:Ro(e,0,o,i)}),n},p.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},p.prototype.pan=function(t){var e,o,i,r,n;return this.isEmpty()?null:(e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,o=this.dataRange.total(),i=Mo(r,t=M(t/(i/(n-r)),F)*(e.reverse?-1:1)),r=Mo(n,t),(n=this.limitRange(jo(i),jo(r),jo(o.min),jo(o.max),t))?(n.min=Oo(n.min),n.max=Oo(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},p.prototype.pointsRange=function(t,e){var o,i;return this.isEmpty()?null:(t=Jo.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=zo(e.max,e.min)/(o.max-o.min),i=this.options,{min:Mo(e.min,t.min*o),max:Mo(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep})},p.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Yo,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),h=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(i){var p,l,c=o.autoBaseUnitSteps,e=o.maxDateGroups,i=zt(c[h])*e*Po[h],u=zo(n,s),d=zo(a,t),f=Xo.indexOf(h);if(d<Po[h]&&h!==co)h=Xo[f-1],t=Mo(s,l=(u-(e-1)*(p=zt(c[h]))*Po[h])/2),a=Mo(n,-l);else if(i<d&&h!==xo){var g=0;do{for(h=Xo[++f],g=0,l=2*Po[h];p=c[h][g],++g<c[h].length&&l*p<u;);}while(h!==xo&&l*p<u);0<(l=(l*p-u)/2)&&(t=Mo(s,-l),a=Mo(n,l),t=Mo(t,_(a,r.min,r.max)-a),a=Mo(a,_(t,r.min,r.max)-t))}}return t&&a&&0<zo(a,t)?{min:t,max:a,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},p.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},p.prototype.range=function(){return this.dataRange.displayRange()},p.prototype.createLabels=function(){Jo.prototype.createLabels.call(this),this.createRangeLabels()},p.prototype.clearLabels=function(){Jo.prototype.clearLabels.call(this),this.rangeLabels=[]},p.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Jo.prototype.arrangeLabels.call(this)},p.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))},p.prototype.autoRotateLabels=function(){Jo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},p.prototype.hideOutOfRangeLabels=function(){Jo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},p.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)}},p.prototype.contentBox=function(){for(var t=Jo.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},p.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 Xe(r,n,t,i,e)},p.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:b,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"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 Xe(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})))},p.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 R))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},p.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},p.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()},p.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),Jo.prototype.getSlot.call(this,t,e,o)},p.prototype.valueRange=function(){var t=Zo(this.options.srcCategories);return{min:Oo(t.min),max:Oo(t.max)}},p.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},p.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},p.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},p.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},p.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},p.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},p.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},p.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},p.prototype.totalRange=function(){return this.dataRange.total()},p.prototype.totalCount=function(){return this.dataRange.totalCount()},p.prototype.isEmpty=function(){return!this.options.srcCategories.length},p.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=Zo((t=this.options).srcCategories),new Ko(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange())};var Jo,h=p;function p(){Jo.apply(this,arguments)}i(h,{type:U,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 ti=h;function ei(t,e){return M(Math.floor(t/e)*e,F)}function oi(t,e){return M(Math.ceil(t/e)*e,F)}function ii(t){return Math.max(Math.min(t,3e5),-3e5)}var ri,ni=Math.pow(10,-9),h=((ri=lo)&&(si.__proto__=ri),((si.prototype=Object.create(ri&&ri.prototype)).constructor=si).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=te(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&ai(e,n,1/3)&&(e-=n),0<a)&&ai(a,n,1/3)&&(a+=n),s.min=ei(e,n),s.max=oi(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:T((a=t).min)?Math.min(e.min,a.min):e.min,max:T(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var h=s,p=["min","max"],l=0;l<p.length;l++){var c=p[l];null===h[c]&&(h[c]=void 0)}var u=T(s.min),d=T(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=ei(n.min,s.majorUnit),n.max=oi(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=te(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},si.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},si.prototype.clone=function(){return new si(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},si.prototype.startValue=function(){return 0},si.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},si.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(M(e/t,3))+1)},si.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),h=this.getDivisions(t),p=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&p.push(M(l,3)),l+=a*r;return p},si.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},si.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},si.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=O(t,e||0),e=O(e,t||0),t=(o&&(p=_(p,i.min,i.max),e=_(e,i.min,i.max)),Math.min(p,e)-i.min),o=Math.max(p,e)-i.min,p=new R(a.x1,a.y1,a.x1,a.y1);return p[n+1]=ii(r+h*(0<s?t:o)),p[n+2]=ii(r+h*(0<s?o:t)),p},si.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:M(e+t*(o-e),F)},si.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=M(t/(n/(r-e)),F);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},si.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},si.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=M(i.min+t*i.majorUnit,F),o=this.axisLabelText(i,e,o);return new Xe(i,o,t,null,e)},si.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},si.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},si.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}},si.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=M(this.options.min+e*t,F),t=M(this.options.max-o,F);return{min:e,max:t=t-e<ni?e+ni:t}},si.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}},si.prototype.isValidRange=function(t,e){return ni<e-t},si);function si(t,e,o,i){ri.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function ai(t,e,o){t=M(Math.abs(t%e),F);return 0===t||e*(1-o)<t}i(h,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:D},labels:{format:"#.####################"},zIndex:1});var hi,pi=h,h=((hi=lo)&&(li.__proto__=hi),((li.prototype=Object.create(hi&&hi.prototype)).constructor=li).prototype.clone=function(){return new li(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},li.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},li.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Uo(e.min,e.max,e.baseUnit)/t+1)},li.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/zo(e.max,e.min),h=e.weekStartDay||0,p=[n],l=1;l<s;l++){var c=n+zo(Ro(e.min,l*t,e.baseUnit,h),e.min)*a*i;p.push(M(c,3))}return p},li.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},li.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},li.prototype.getSlot=function(t,e,o){return pi.prototype.getSlot.call(this,Fo(this.intlService,t),Fo(this.intlService,e),o)},li.prototype.getValue=function(t){t=pi.prototype.getValue.call(this,t);return null!==t?Oo(t):null},li.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},li.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=Ro(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new Xe(s,n,t,null,e)},li.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/zo(n.max,n.min),n=M(t/o,F);return{min:Mo(e.min,n=!i&&!r||i&&r?n:-n),max:Mo(e.max,n),offset:n}},li.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Io(t,e.min)&&Io(t,e.max)<=0},li.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(jo(t.min),jo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Oo(t.min),max:Oo(t.max)}},li.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:Oo(o),max:Oo(t)}},li.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=Oo(jo(this.options.min)+o),o=Oo(jo(this.options.max)-e);return{min:t,max:o=o-t<1e3?Oo(jo(t)+1e3):o}},li.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:Oo(_(jo(t.min),this.totalMin,this.totalMax)),max:Oo(_(jo(t.max),this.totalMin,this.totalMax))}},li);function li(t,e,o,i){var r,n,s,a,h,p,l,c,t=Oo(t),e=Oo(e),u=i.intl,o=o||{},d=(d=t,r=e,n=o=x(o||{},{min:Fo(u,o.min),max:Fo(u,o.max),axisCrossingValue:No(u,o.axisCrossingValues||o.axisCrossingValue),weekStartDay:Go(o,u)}),d=n.min||d,r=n.max||r,s=n.baseUnit||(r&&d?(s=To(r,d),a=go,Ao<=s?a=xo:ko<=s?a=mo:So<=s?a=vo:Co<=s&&(a=yo),a):go),a=Po[s],h=n.weekStartDay||0,d=Eo(jo(d)-1,s,h)||Oo(r),r=Lo(jo(r)+1,s,h),p=n.majorUnit||oi(te(d.getTime(),r.getTime()),a)/a,l=oi(l=Uo(d,r,s),p)-l,c=Math.floor(l/2),l-=c,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Ro(d,-c,s,h),n.max=n.max||Ro(r,l,s,h),n.minorUnit=n.minorUnit||p/5,n.majorUnit=p,o=n,hi.call(this,o,i),this.intlService=u,this.seriesMin=t,this.seriesMax=e,o.weekStartDay||0);this.totalMin=jo(Eo(jo(t)-1,o.baseUnit,d)),this.totalMax=jo(Lo(jo(e)+1,o.baseUnit,d))}i(h,{type:U,majorGridLines:{visible:!0,width:1,color:D},labels:{dateFormats:o}});var ci,ui=h,o=((ci=lo)&&(di.__proto__=ci),((di.prototype=Object.create(ci&&ci.prototype)).constructor=di).prototype.clone=function(){return new di(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},di.prototype.startValue=function(){return this.options.min},di.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,h=this.lineInfo(),p=h.axis,l=h.axisDir,c=h.lineBox,u=h.lineSize,h=h.lineStart,u=l*(u/(n-r)),n=O(t,e||1),e=O(e,t||1);if(n<=0||e<=0)return null;o&&(n=_(n,a,i),e=_(e,a,i));n=gi(n,s),e=gi(e,s),t=Math.min(n,e)-r,o=Math.max(n,e)-r,a=new R(c.x1,c.y1,c.x1,c.y1);return a[p+1]=ii(h+u*(0<l?t:o)),a[p+2]=ii(h+u*(0<l?o:t)),a},di.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:M(Math.pow(e,o+s*((i-o)/r)),F)},di.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},di.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=M(t/(s/(i-o)),F);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},di.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},di.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},di.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(ao(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),i.visible&&this.traverseMinorTicksPositions(h,i),[]},di.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(ho(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},di.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(M(i+r*(a-n),F),e)},di.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,h=o.step,p=this.logMin,l=this.logMax,c=Math.floor(p);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(M(a+h*(gi(f,s)-p),F),e)}},di.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 Xe(i,o,t,null,e)},di.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},di.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},di.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},di.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=gi(this.options.min,o),r=gi(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}},di.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)}},di.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}},di.prototype.lineInfo=function(){var t=ci.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},di);function di(t,e,o,i){var r,n,s,a,h,p=x({majorUnit:10,min:t,max:e},o),l=p.majorUnit,c=(c=M(gi(h=e,u=l),F)%1,h<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,gi(h,u)+.2):Math.pow(u,Math.ceil(gi(h,u)))),u=(h=t,s=(u=p).majorUnit,(a=h)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(gi(h,s)))),a),d=(h=u,s=c,a=o,r=(d=p).min,n=d.max,T(d.axisCrossingValue)&&d.axisCrossingValue<=0&&fi(),T(a.max)?a.max<=0&&fi():n=s,T(a.min)?a.min<=0&&fi():r=h,{min:r,max:n});p.max=d.max,p.min=d.min,p.minorUnit=o.minorUnit||M(l-1,F),ci.call(this,p,i),this.totalMin=T(o.min)?Math.min(u,o.min):u,this.totalMax=T(o.max)?Math.max(c,o.max):c,this.logMin=M(gi(d.min,l),F),this.logMax=M(gi(d.max,l),F),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function fi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function gi(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:D},zIndex:1,_deferLabels:!0});var yi,vi=o,h={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),Tt(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 A.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new A.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 St(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},o=((yi=qo)&&(mi.__proto__=yi),((mi.prototype=Object.create(yi&&yi.prototype)).constructor=mi).prototype.range=function(){return{min:0,max:this.options.categories.length}},mi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},mi.prototype.lineBox=function(){return this.box},mi.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new R,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()))}},mi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=o||1,p=[],l=e||0;l<s;l+=h)r=n.reverse?360-l*a:l*a,r=M(r,3)%360,i&&u(r,i)||p.push(r);return p},mi.prototype.majorIntervals=function(){return this.intervals(1)},mi.prototype.minorIntervals=function(){return this.intervals(.5)},mi.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},mi.prototype.majorAngles=function(){var e=this;return St(this.majorIntervals(),function(t){return e.intervalAngle(t)})},mi.prototype.createLine=function(){return[]},mi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},mi.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)},mi.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==V)return t=Vt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&u(t,r)?e:i}},mi.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new A.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,ye.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},mi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},mi.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 le(r.center(),0,r.height()/2,o,n)},mi.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new A.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},mi.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},mi);function mi(){yi.apply(this,arguments)}i(o,{startAngle:90,labels:{margin:P(10)},majorGridLines:{visible:!0},justified:!0}),x(o.prototype,h);var xi,_i=o,o=((xi=lo)&&(bi.__proto__=xi),((bi.prototype=Object.create(xi&&xi.prototype)).constructor=bi).prototype.getDivisions=function(t){return pi.prototype.getDivisions.call(this,t)-1},bi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},bi.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 R,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()))}},bi.prototype.lineBox=function(){return this.box},bi.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&&u(p,i)||s.push(p)}return s},bi.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},bi.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},bi.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},bi.prototype.createLine=function(){return[]},bi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},bi.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)},bi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},bi.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 le(i.center(),0,i.height()/2,t,e-t)},bi.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 A.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},bi.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(Ot(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},bi.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},bi);function bi(t,e){xi.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:P(10)},majorGridLines:{color:D,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(o.prototype,h,{createPlotBands:_i.prototype.createPlotBands,majorAngles:_i.prototype.majorAngles,range:pi.prototype.range,labelsCount:pi.prototype.labelsCount,createAxisLabel:pi.prototype.createAxisLabel});var wi=o;function Ci(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Si,h={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 A.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 le(r,r.y-a.y2,r.y-a.y1,0,360),a=e===V?ye.current.createRing(a,h):A.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 A.geometry.Circle(r,t.innerRadius),s=new A.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(),Tt(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(),h=n;h<e.length;h+=s){var p=t.y-e[h];if(0<p){var l=new A.geometry.Circle([t.x,t.y],p);if(i.type===V)a.append(new A.drawing.Circle(l,r));else{for(var c=new A.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=(Ot(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return Ci(t,o)-Ci(e,o)}),r=90-Ci(n[0],n[1])/2,t=180-Ci(o,n[0])-r,a=s*(Math.sin(Vt(t))/Math.sin(Vt(r)))),this.axisType().prototype.getValue.call(this,new B(i.x1,i.y2-a))}},o=((Si=pi)&&(ki.__proto__=Si),((ki.prototype=Object.create(Si&&Si.prototype)).constructor=ki).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},ki.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},ki.prototype.axisType=function(){return Si},ki);function ki(){Si.apply(this,arguments)}x(o.prototype,h);var Ai,Pi=o,o=((Ai=vi)&&(Ti.__proto__=Ai),((Ti.prototype=Object.create(Ai&&Ai.prototype)).constructor=Ti).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ti.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ti.prototype.axisType=function(){return Ai},Ti);function Ti(){Ai.apply(this,arguments)}x(o.prototype,h);var Mi=o;function Oi(t){return t<=0?-1:1}(Ri=A.Class)&&(zi.__proto__=Ri),((zi.prototype=Object.create(Ri&&Ri.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]))){var n,s=e[0],a=e[1],h=e[2];for(o.push(new A.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),zt(o).controlOut(this.firstControlPoint(t,s,a,y,v)),o.push(new A.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{i?(s=e[r-1],a=e[0],h=e[1],l=(t=this.controlPoints(s,a,h))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var p,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],h=e[u+2],p=this.controlPoints(s,a,h),zt(o).controlOut(c),c=p[1],p=p[0],o.push(new A.geometry.Segment(a,p)));i?(s=e[r-2],a=e[r-1],h=e[0],t=this.controlPoints(s,a,h),zt(o).controlOut(c),o.push(new A.geometry.Segment(a,t[0])),zt(o).controlOut(t[1]),o.push(new A.geometry.Segment(h,n))):(l=this.tangent(a,h,y,v),zt(o).controlOut(c),o.push(new A.geometry.Segment(h,this.secondControlPoint(l,a,h,y,v))))}}return 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||M(i,1)===M(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,h=(this.isLine(t,e,o)?i=this.tangent(t,e,y,v):(h={x:this.isMonotonicByField(t,e,o,y),y:this.isMonotonicByField(t,e,o,v)}).x&&h.y?(i=this.tangent(t,o,y,v),s=!0):(this.invertAxis(t,e,o)&&(r=v,n=y),h[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Oi((o[n]-t[n])*(e[r]-t[r])):-Oi((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]},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 A.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};var Bi,Ri,Ei=zi,Li=((Bi=A.Class)&&(Ii.__proto__=Bi),((Ii.prototype=Object.create(Bi&&Bi.prototype)).constructor=Ii).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Ii.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Ii.prototype.range=function(){return this._axis.range()},Ii.prototype.valueRange=function(){return this._axis.valueRange()},Ii);function Ii(t){Bi.call(this),this._axis=t,this.options=t.options}function zi(t){Ri.call(this),this.closed=t}function ji(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Li(e[o])}function Vi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Vi.prototype.findAxisByName=function(t){return ji(t,this._pane.axes)};var Di,Hi=Vi,Ui=((Di=A.Class)&&(Fi.__proto__=Di),(Fi.prototype=Object.create(Di&&Di.prototype)).constructor=Fi);function Fi(t){Di.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Ni(t){for(var e=t.length,o=0,i=0;i<e;i++)m(t[i])&&o++;return o}var Gi={min:function(t){for(var e=t.length,o=G,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.min(o,r))}return o===G?t[0]:o},max:function(t){for(var e=t.length,o=W,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.max(o,r))}return o===W?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=Ni(t)?Gi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&T(r)&&o++}return o},avg:function(t){var e=Ni(t),o=t[0];return o=0<e?Gi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&T(i))return i}return t[0]}},Wi=Gi;function qi(t,e){return null===e?e:yt(t)(e)}(Xi=A.Class)&&(Yi.__proto__=Xi),((Yi.prototype=Object.create(Xi&&Xi.prototype)).constructor=Yi).prototype.register=function(t,e,o){void 0===e&&(e=[Y]),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)}},Yi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Yi.prototype.valueFields=function(t){return this._valueFields[t.type]||[Y]},Yi.prototype.otherFields=function(t){return this._otherFields[t.type]||[Y]},Yi.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=T(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]:T(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],T(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Yi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Yi.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},Yi.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]=qi(a,t))}return i},Yi.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===Y?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o};var Xi,h=Yi;function Yi(){Xi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}h.current=new h;var Zi,Qi,Ki=h,$i=/percent(?:\w*)\((\d+)\)/,Ji=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),tr=((Qi=A.Class)&&(yr.__proto__=Qi),((yr.prototype=Object.create(Qi&&Qi.prototype)).constructor=yr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,h=Ji.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}})},yr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ki.current,n=r.valueFields(t),i=T(i[0])?i[0]:{};return Z(i)?o=yt("["+(e?n.indexOf(e):0)+"]"):m(i)?o=yt():"object"==typeof i&&(o=yt(r.sourceFields(t,n)[n.indexOf(e)])),o},yr.prototype.getErrorRange=function(t,e){var o;if(!T(e))return null;if(this.globalRange)return this.globalRange(t);if(Z(e))i=t-e[0],r=t+e[1];else if(m(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=$i.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}},yr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},yr.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)},yr.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}},yr),er=(A.support.browser||{}).msie?.001:0,or="zero",ir="interpolate",rr="bar",nr="column",sr="line",ar="pie",hr="verticalLine",pr=[rr,nr,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],lr="drag",cr="dragEnd",ur="zoom",dr="zoomEnd",fr="DOMMouseScroll mousewheel",o=((Zi=r)&&(gr.__proto__=Zi),((gr.prototype=Object.create(Zi&&Zi.prototype)).constructor=gr).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 B(n.x,r.y1),new B(n.x,r.y2)],o&&e.push(new B(a,r.y1),new B(s,r.y1),new B(a,r.y2),new B(s,r.y2)),this.box=new R(a,r.y1,s,r.y2)):(e=[new B(r.x1,n.y),new B(r.x2,n.y)],o&&e.push(new B(r.x1,a),new B(r.x1,s),new B(r.x2,a),new B(r.x2,s)),this.box=new R(r.x1,a,r.x2,s)),this.linePoints=e},gr.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},gr.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()},gr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Zi.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new A.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);J(r),this.visual.append(r)}},gr);function gr(t,e,o,i,r,n){Zi.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function yr(t,e,o){Qi.call(this),this.initGlobalRanges(t,e,o)}i(o,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var vr,mr=o,xr=((vr=mr)&&(_r.__proto__=vr),((_r.prototype=Object.create(vr&&vr.prototype)).constructor=_r).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},_r);function _r(){vr.apply(this,arguments)}function br(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)!u(r,o.excluded)&&t.hasOwnProperty(r)&&(it(n=t[r])?(h=!0,i||(t[r]=O(n(e),s[r]))):st(n)&&(i||(o.defaults=s[r]),o.depth++,h=br(n,e,o,i)||h,o.depth--));return h}function wr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}(Cr=r)&&(l.__proto__=Cr),((l.prototype=Object.create(Cr&&Cr.prototype)).constructor=l).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},l.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},l.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,h=o[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||m(h.value)&&(r+=Math.abs(h.value),i.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},l.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var h=o[a];if(t===h)break;var p=t.series.stack,l=h.series.stack;if(p&&l){if(typeof p===X&&p!==l)continue;if(p.group&&p.group!==l.group)continue}p=this.plotValue(h);(0<=p&&r||p<0&&!r)&&(n+=p,i+=p,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,ot(t.value)?t.value:e]},l.prototype.stackLimits=function(t,e){for(var o=G,i=W,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],T(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},l.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,Ut(n.negative).min)),n.positive.length)&&(h.max=Math.max(h.max,Ut(n.positive).max)),h.min!==G||h.max!==W?i[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},l.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;m(h)&&m(e)?i={low:h,high:e}:a&&T(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new tr(a.value,n,Y),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},l.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 xr(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},l.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}},l.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,T(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)},l.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=(T(a)||(this._evalSeries[n]=a=br(t,{},s,!0)),t);return a&&br(n=x({},n),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},l.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:G,max:W}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},l.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)},l.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},l.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},l.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(zt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},l.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},l.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},l.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},l.prototype.reflowPoint=function(t,e){t.reflow(e)},l.prototype.reflowCategories=function(){},l.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new R(i.x1,o.y1,i.x2,o.y2)},l.prototype.categorySlot=function(t,e){return t.getSlot(e)},l.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=wr(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)},l.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}))},l.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))},l.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},l.prototype.pointValue=function(t){return t.valueFields.value};var Cr,h=l;function l(t,e){Cr.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(h,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Sr,kr=h,Ar={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:Lt(t),originalEvent:t,point:this}}},o={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&T(e)&&null!==e&&(this.note=new $e({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},h=((Sr=r)&&(Pr.__proto__=Sr),((Pr.prototype=Object.create(Sr&&Sr.prototype)).constructor=Pr).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=dt(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new De(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Pr.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return T(t.color)||(t.color=new A.Color(e).brightness(.8).toHex()),t},Pr.prototype.createVisual=function(){},Pr.prototype.createMarker=function(){var t=this.options.markers;return new Ce({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:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Pr.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Pr.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 R(i.x,i.y,i.x,i.y)),this.note.reflow(t))},Pr.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?k:e)?w:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Pr.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 Ce({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:O(t.border.opacity,1)},opacity:O(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},Pr.prototype.highlightVisual=function(){return(this.marker||{}).visual},Pr.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 A.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},Pr.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=C,o=this.aboveAxis?(t=o.y1,w):(t=o.y2,k),{point:new B(i,t),align:{horizontal:e,vertical:o}}},Pr.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Pr.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Pr.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Pr.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Pr);function Pr(t,e){Sr.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0}h.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:P(3),padding:P(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},x(h.prototype,Ar),x(h.prototype,o);var Tr,Mr=h,h=((Tr=r)&&(Or.__proto__=Tr),((Or.prototype=Object.create(Tr&&Tr.prototype)).constructor=Or).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Or.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},Or.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&&!T(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Or.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(it(o)&&i&&(o=i.color),A.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},Or.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Or);function Or(t,e,o){Tr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}i(h,{closed:!1});var Br=h;function Rr(t,e,o,i,r){var t=t.box,n=new A.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var Er,h={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,h=Rr(t[0],r,s,n,a),p=[h],l=1;l<t.length;l++){var c,u=Rr(t[l],r,s,n,a);h[r]!==u[r]&&((c=new A.geometry.Point)[r]=h[r],c[n]=u[n],p.push(c,u)),h=u}return o?h!==zt(p)&&p.push(h):p.push(Rr(zt(t),r,s,n,e?1:2)),p}},Lr=((Er=Br)&&(Ir.__proto__=Er),((Ir.prototype=Object.create(Er&&Er.prototype)).constructor=Ir).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Ir);function Ir(){Er.apply(this,arguments)}x(Lr.prototype,h);var zr,jr,Vr=Lr,Dr=((jr=Br)&&(Ur.__proto__=jr),((Ur.prototype=Object.create(jr&&jr.prototype)).constructor=Ur).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(it(o)&&e&&(o=e.color),new Ei(this.options.closed).process(this.points())),o=new A.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},Ur),Lr={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),h=a.length,p=[],l=0;l<h;l++){var c=a[l];c?p.push(c):this.seriesMissingValues(s)!==ir&&(1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t)),p=[])}1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?or:t||ir},getNearestPoint:function(t,e,o){for(var i,r=new B(t,e),n=this.seriesPoints[o],s=G,a=0;a<n.length;a++){var h,p=n[a];p&&T(p.value)&&null!==p.value&&!1!==p.visible&&(h=p.box.center().distanceTo(r))<s&&(i=p,s=h)}return i}},c=((zr=A.drawing.Animation)&&(Hr.__proto__=zr),((Hr.prototype=Object.create(zr&&zr.prototype)).constructor=Hr).prototype.setup=function(){this._setEnd(this.options.box.x1)},Hr.prototype.step=function(t){var e=this.options.box;this._setEnd(bt(e.x1,e.x2,t))},Hr.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)},Hr);function Hr(){zr.apply(this,arguments)}function Ur(){jr.apply(this,arguments)}i(c,{duration:600}),A.drawing.AnimationFactory.current.register("clip",c);var Fr=c;function Nr(t){for(var e=0;e<t.length;e++)if(T(t[e].zIndex))return!0}var Gr,c={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=A.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Fr(t,{box:e}),Nr(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&&T(i.visual.options.zIndex)&&i.visual.clip(t)}}},d=((Gr=kr)&&(Wr.__proto__=Gr),((Wr.prototype=Object.create(Gr&&Gr.prototype)).constructor=Wr).prototype.render=function(){Gr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Wr.prototype.pointType=function(){return Mr},Wr.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(!T(s)||null===s){if(n!==or)return null;s=0}n=this.pointOptions(r,e),n=this.evalPointOptions(n,s,i,o,r,e),i=t.fields.color||r.color,it(r.color)&&(i=n.color),o=new Mr(s,n);return o.color=i,this.append(o),o},Wr.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]},Wr.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Vr:"smooth"===i?Dr:Br)(t,e,o)},Wr.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)},Wr.prototype.supportsPointInactiveOpacity=function(){return!1},Wr);function Wr(){Gr.apply(this,arguments)}x(d.prototype,Lr,c);var qr,Xr,Yr=d,Zr=((Xr=Br)&&(Kr.__proto__=Xr),((Kr.prototype=Object.create(Xr&&Xr.prototype)).constructor=Kr).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;it(i)&&e&&(i=e.color),this.visual=new A.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)})},Kr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Kr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Kr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Kr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Kr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new A.geometry.Segment(t)})},Kr.prototype.createStroke=function(t){t=new A.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Kr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Kr.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),Tt(o,r)),new A.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Kr.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=zt(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)},Kr),d=((qr=Zr)&&(Qr.__proto__=qr),((Qr.prototype=Object.create(qr&&qr.prototype)).constructor=Qr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Qr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Qr);function Qr(){qr.apply(this,arguments)}function Kr(t,e,o,i,r){Xr.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}x(d.prototype,h);var $r,Jr,tn,en,on=d,rn=((en=Zr)&&(ln.__proto__=en),((ln.prototype=Object.create(en&&en.prototype)).constructor=ln).prototype.createStrokeSegments=function(){var t=new Ei(this.options.closed),e=this.points();return t.process(e)},ln.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new A.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},ln),nn=((tn=Yr)&&(pn.__proto__=tn),((pn.prototype=Object.create(tn&&tn.prototype)).constructor=pn).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?on:"smooth"===a?rn:Zr)(t,e,o,r,n)},pn.prototype.reflow=function(t){tn.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)}},pn.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 h=r;h<n;h++){for(var p,l=h+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<h&&!i[c][l-1]&&a.push(this._previousSegmentPoint(h,l,l-1,c)),a.push(u),"step"!==o&&h+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(h,l,l+1,c))):(p=this._createGapStackPoint(h),this._stackPoints.push(p),a.push(p))}return a},pn.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},pn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Mr(0,e);return e.categoryIx=t,e.series={},e},pn.prototype.seriesMissingValues=function(t){return t.missingValues||or},pn.prototype.supportsPointInactiveOpacity=function(){return!1},pn),sn=((Jr=A.Class)&&(hn.__proto__=Jr),((hn.prototype=Object.create(Jr&&Jr.prototype)).constructor=hn).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:G,max:W},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},hn.prototype.reset=function(t){this.axisRanges[t]=void 0},hn.prototype.query=function(t){return this.axisRanges[t]},hn),d=(($r=r)&&(an.__proto__=$r),((an.prototype=Object.create($r&&$r.prototype)).constructor=an).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},an.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?b:C,n.vAlign=o?k:b,"insideEnd"===e.position?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=w)):n.align=i?S:C:e.position===b?(n.vAlign=b,n.align=b):"insideBase"===e.position?o?n.vAlign=i?w:k:n.align=i?C:S:"outsideEnd"===e.position&&(h=o?i?new R(t.x1,t.y1-s.height(),t.x2,t.y1):new R(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=b,i?new R(t.x2,t.y1,t.x2+s.width(),t.y2):new R(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)},an.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))},an);function an(t,e,o){$r.call(this,e),this.textBox=new De(t,this.options,o),this.append(this.textBox)}function hn(){Jr.call(this),this.axisRanges={}}function pn(){tn.apply(this,arguments)}function ln(){en.apply(this,arguments)}i(d,{position:"outsideEnd",margin:P(3),padding:P(4),color:D,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var cn=d;function un(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}(dn=r)&&(fn.__proto__=dn),((fn.prototype=Object.create(dn&&dn.prototype)).constructor=fn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},fn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=dt(i))?e(t):this.formatValue(i.format),this.label=new cn(e,x({vertical:o.vertical},i),t),this.append(this.label))},fn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},fn.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)},fn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(dn.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 A.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},fn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(T(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=A.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)&&(J(r),i<1||o<1)&&(r.options.stroke.lineJoin="round"),t.append(r),un(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},fn.prototype.createHighlight=function(t){return J(A.drawing.Path.fromRect(this.box.toRect(),t))},fn.prototype.highlightVisual=function(){return this.rectVisual},fn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},fn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=T(e)?e:new A.Color(t).brightness(o).toHex()},fn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=C,p=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),p=w)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(p=w,t=s?(h=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,h=S),Math.max(n.y1,a.y1))),{point:new B(t,i),align:{horizontal:h,vertical:p}}},fn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},fn.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 dn,d=fn;function fn(t,e){dn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=O(this.options.aboveAxis,!0),this.value=t}x(d.prototype,Ar),x(d.prototype,o),d.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var gn=d;function yn(t,e){t.forEach(e)}function vn(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}(mn=r)&&(xn.__proto__=mn),((xn.prototype=Object.create(mn&&mn.prototype)).constructor=xn).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),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 mn,d=xn;function xn(t){mn.call(this,t),this.forEach=t.rtl?vn:yn}i(d,{vertical:!1,gap:0,spacing:0});var _n,bn=d,d=((_n=r)&&(wn.__proto__=_n),((wn.prototype=Object.create(_n&&_n.prototype)).constructor=wn).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,o=this.children,i=o.length,r=this.box=new R,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))}},wn);function wn(){_n.apply(this,arguments)}i(d,{vertical:!0});var Cn,Sn=d,d=((Cn=kr)&&(kn.__proto__=Cn),((kn.prototype=Object.create(Cn&&Cn.prototype)).constructor=kn).prototype.render=function(){Cn.prototype.render.call(this),this.updateStackRange()},kn.prototype.pointType=function(){return gn},kn.prototype.clusterType=function(){return bn},kn.prototype.stackType=function(){return Sn},kn.prototype.stackLimits=function(t,e){return Cn.prototype.stackLimits.call(this,t,e)},kn.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,h=this.pointValue(t),p=this.pointOptions(r,e),l=p.labels,l=(a&&"outsideEnd"===l.position&&(l.position="insideEnd"),p.isStacked=a,t.fields.color||r.color),t=(h<0&&p.negativeColor&&(l=p.negativeColor),p=this.evalPointOptions(p,h,i,o,r,e),it(r.color)&&(l=p.color),new(this.pointType())(h,p)),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},kn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===X){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},kn.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},kn.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},kn.prototype.createAnimation=function(){this._setAnimationOptions(),Cn.prototype.createAnimation.call(this),Nr(this.options.series)&&this._setChildrenAnimation()},kn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&T(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},kn.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 A.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},kn);function kn(){Cn.apply(this,arguments)}i(d,{animation:{type:rr}});var An,Pn=d,d=((An=r)&&(Tn.__proto__=An),((Tn.prototype=Object.create(An&&An.prototype)).constructor=Tn).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()},Tn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Tn.prototype.createVisual=function(){An.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Tn.prototype.mainVisual=function(t){var e=new A.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Tn.prototype.createBody=function(t,e){var o=A.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:O(e.border.opacity,e.opacity)}),J(o),t.append(o),un(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},Tn.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Tn.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:O(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=A.drawing.Path.fromPoints(o[n],r);J(s),t.append(s)}},Tn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=T(e)?e:new A.Color(this.color).brightness(t._brightness).toHex()},Tn.prototype.createOverlay=function(){var t=A.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Tn.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},Tn.prototype.highlightVisual=function(){return this._mainVisual},Tn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Tn.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new B(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},Tn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Tn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Tn);function Tn(t,e){An.call(this,e),this.value=t}i(d,{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(d.prototype,Ar),x(d.prototype,o);var Mn=d;function On(t){return Ni(t)===t.length}(Bn=kr)&&(Rn.__proto__=Bn),((Rn.prototype=Object.create(Bn&&Bn.prototype)).constructor=Rn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Rn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=On(this.splitValue(p)),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 bn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(p,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)},Rn.prototype.pointType=function(){return Mn},Rn.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),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),it(r.color)&&(h=a.color),a.vertical=!this.options.invertAxes,new n(s,a));return i.color=h,i},Rn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Rn.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:G,max:W};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},Rn.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)},Rn.prototype.animationPoints=function(){return this.points};var Bn,d=Rn;function Rn(){Bn.apply(this,arguments)}x(d.prototype,c);var En,Ln=d,d=((En=Mn)&&(In.__proto__=En),((In.prototype=Object.create(En&&En.prototype)).constructor=In).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()},In.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},In.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},In.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},In.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]]]},In.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},In.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=x({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),h=(T(h.color)||(T(this.color)?h.color=this.color:h.color=new A.Color(e.background).brightness(.8).toHex()),new Ce({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},In.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)}},In.prototype.mainVisual=function(t){for(var e=En.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},In.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)},In.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||En.prototype.getBorderColor.call(this)},In);function In(t,e){En.call(this,t,e),this.createNote()}i(d,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:H,background:a,border:{width:2,opacity:1},opacity:0}}),x(d.prototype,Ar);var zn,jn,Vn,Dn=d,Hn=((Vn=Dn)&&(Wn.__proto__=Vn),((Wn.prototype=Object.create(Vn&&Vn.prototype)).constructor=Wn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Wn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Wn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Wn.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]]]},Wn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Wn),Un=((jn=Ln)&&(Gn.__proto__=jn),((Gn.prototype=Object.create(jn&&jn.prototype)).constructor=Gn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=On(this.splitValue(p)),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 bn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(p,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)},Gn.prototype.pointType=function(){return this.options.invertAxes?Hn:Dn},Gn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Gn.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));T(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:G,max:W},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},Gn.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)},Gn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];T(r)&&null!==r&&o.push(r)}return o},Gn.prototype.supportsPointInactiveOpacity=function(){return!1},Gn),Fn=((zn=mr)&&(Nn.__proto__=zn),((Nn.prototype=Object.create(zn&&zn.prototype)).constructor=Nn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Nn);function Nn(){zn.apply(this,arguments)}function Gn(){jn.apply(this,arguments)}function Wn(){Vn.apply(this,arguments)}function qn(t){return T(t)&&null!==t}(Xn=r)&&(Yn.__proto__=Xn),((Yn.prototype=Object.create(Xn&&Xn.prototype)).constructor=Yn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Yn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Yn.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"];m(r)&&(m(p)&&m(o)&&(i={low:p,high:o}),h&&T(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new tr(h[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),i)&&this.addPointErrorBar(i,t,e)},Yn.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 Fn(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)},Yn.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=qn(i)&&qn(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)},Yn.prototype.seriesMissingValues=function(t){return t.missingValues},Yn.prototype.createMissingValue=function(){},Yn.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];qn(r)&&(n=this.xAxisRanges[i]=n||{min:G,max:W},et(r)&&(r=Fo(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),qn(t)&&(s=this.yAxisRanges[e]=s||{min:G,max:W},et(t)&&(t=Fo(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Yn.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=(T(s)||(this._evalSeries[r]=s=br(t,{},n,!0)),t);return s&&br(r=x({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Yn.prototype.pointType=function(){return Mr},Yn.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},Yn.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=(it(o.color)&&(r=i.color),new Mr(t,i));return e.color=r,this.append(e),e},Yn.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)},Yn.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},Yn.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},Yn.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))}}},Yn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Yn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var Xn,d=Yn;function Yn(t,e){Xn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(d,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(d.prototype,c,{_bindPoint:kr.prototype._bindPoint});var Zn,Qn=d,d=((Zn=Mr)&&(Kn.__proto__=Zn),((Kn.prototype=Object.create(Zn&&Zn.prototype)).constructor=Kn).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 A.drawing.Group,s=new A.drawing.Circle(new A.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 A.drawing.Circle(new A.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new A.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},Kn);function Kn(t,e){Zn.call(this,t,e),this.category=t.category}d.prototype.defaults=x({},d.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),d.prototype.defaults.highlight.zIndex=void 0;var $n,Jn=d,d=(($n=Qn)&&(ts.__proto__=$n),((ts.prototype=Object.create($n&&$n.prototype)).constructor=ts).prototype._initFields=function(){this._maxSize=W,$n.prototype._initFields.call(this)},ts.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)),$n.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},ts.prototype.reflow=function(t){this.updateBubblesSize(t),$n.prototype.reflow.call(this,t)},ts.prototype.pointType=function(){return Jn},ts.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=O(o.negativeValues.color,n)),x({labels:{animation:{delay:i,duration:600-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:H,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(it(o.color)&&(n=i.color),i.markers.background=n,new Jn(t,i));return r.color=n,this.append(r),r},ts.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,h=Math.PI*s*s,p=(Math.PI*a*a-h)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*p,c=Math.sqrt((h+c)/Math.PI),u=O(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},ts.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},ts.prototype.createAnimation=function(){},ts.prototype.createVisual=function(){},ts);function ts(){$n.apply(this,arguments)}i(d,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var es,os=d,d=((es=Ce)&&(is.__proto__=es),(is.prototype=Object.create(es&&es.prototype)).constructor=is);function is(){es.apply(this,arguments)}x(d.prototype,Ar);var rs,ns=d,d=((rs=r)&&(ss.__proto__=rs),((ss.prototype=Object.create(rs&&rs.prototype)).constructor=ss).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,T(this.value.target)&&(this.target=new ns({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.createLabel(),this.createNote())},ss.prototype.createLabel=function(){var t,e,o=this.options.labels;o.visible&&(t=this.pointData(),e=(e=dt(o))?e(t):this.formatValue(o.format),this.label=new cn(e,o,t),this.append(this.label))},ss.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,s=(o&&(n=new R(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.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},ss.prototype.createVisual=function(){rs.prototype.createVisual.call(this);var t=this.options,e=A.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:O(t.border.opacity,t.opacity)}),J(this.bodyVisual=e),this.visual.append(e)},ss.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=A.drawing.Animation.create(this.bodyVisual,this.options.animation))},ss.prototype.createHighlight=function(t){return A.drawing.Path.fromRect(this.box.toRect(),t)},ss.prototype.highlightVisual=function(){return this.bodyVisual},ss.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ss.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ss.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},ss.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ss);function ss(t,e){rs.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}d.prototype.tooltipAnchor=gn.prototype.tooltipAnchor,i(d,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}}}),x(d.prototype,Ar),x(d.prototype,o);var as,hs=d,d=((as=kr)&&(ps.__proto__=as),((ps.prototype=Object.create(as&&as.prototype)).constructor=ps).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ps.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ps.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=x({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=(it(r.color)&&(t=h.color),new hs(a,h)),e=(i.color=t,s[o]);return e||(e=new bn({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),e.append(i),i},ps.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];T(o)&&!isNaN(o)&&T(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:G,max:W}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},ps.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ps.prototype.pointValue=function(t){return t.valueFields.current},ps.prototype.aboveAxis=function(t){return 0<t.value.current},ps.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()}},ps);function ps(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||Z(n[0])||st(n[0])||(r.data=[n])}as.call(this,t,e)}d.prototype._setAnimationOptions=Pn.prototype._setAnimationOptions,i(d,{animation:{type:rr}});var ls,cs=d,d=((ls=A.Class)&&(us.__proto__=ls),((us.prototype=Object.create(ls&&ls.prototype)).constructor=us).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=O(o,e),i=O(i,e)),P(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:at(t.border.width),paddingTop:at(e.top),paddingBottom:at(e.bottom),paddingLeft:at(e.left),paddingRight:at(e.right)}},us.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new A.Color(o.backgroundColor);T(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},us.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},us.prototype.destroy=function(){delete this.chartService},us);function us(t,e){ls.call(this),this.chartService=t,this.options=x({},this.options,e)}i(d,{border:{width:1},opacity:1});(ds=d)&&(fs.__proto__=ds),((fs.prototype=Object.create(ds&&ds.prototype)).constructor=fs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},fs.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===U&&(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)},fs.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},fs.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=b,r===w?(e=k,o.bottomLeft().translate(0,i)):(e=w,o.topLeft().translate(0,-i))):(e=b,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 ds,f=fs;function fs(t,e,o){ds.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}i(f,{padding:10});var gs,ys=f,f=((gs=r)&&(vs.__proto__=gs),((vs.prototype=Object.create(gs&&gs.prototype)).constructor=vs).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},vs.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},vs.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?v:y,n=new A.geometry.Point(i.x1,i.y1),o=o?new A.geometry.Point(i.x2,i.y1):new A.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)},vs.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},vs.prototype.createVisual=function(){gs.prototype.createVisual.call(this);var t=this.options;this.line=new A.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},vs.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),gs.prototype.destroy.call(this)},vs);function vs(t,e,o){gs.call(this,o),this.axis=e,this.stickyMode=e instanceof qo;o=this.options.tooltip;o.visible&&(this.tooltip=new ys(t,this,x({},o,{stickyMode:this.stickyMode})))}i(f,{color:D,width:2,zIndex:-1,tooltip:{visible:!1}});var ms,xs=f,f=((ms=r)&&(_s.__proto__=ms),((_s.prototype=Object.create(ms&&ms.prototype)).constructor=_s).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},_s.prototype._clipBox=function(){return this.pane.chartsBox()},_s.prototype.createVisual=function(){var t;this.visual=new A.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),J(t=A.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},_s.prototype.stackRoot=function(){return this},_s.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)))}},_s.prototype.destroy=function(){ms.prototype.destroy.call(this),delete this.parent},_s);function _s(t,e){ms.call(this,t),this.pane=e}f.prototype.isStackRoot=!0;var bs,ws=f,f=((bs=be)&&(Ss.__proto__=bs),((Ss.prototype=Object.create(bs&&bs.prototype)).constructor=Ss).prototype.createTitle=function(){var t=this.options.title;st(t)&&(t=x({},t,{align:t.position,position:k})),this.title=Ge.buildTitle(t,Ss.prototype.options.title),this.title&&this.append(this.title)},Ss.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Ss.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Ss.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},Ss.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=[]},Ss.prototype.reflow=function(t){var e;zt(this.children)===this.content&&(e=this.children.pop()),bs.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Ss.prototype.visualStyle=function(){var t=bs.prototype.visualStyle.call(this);return t.zIndex=-10,t},Ss.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Ss.prototype.stackRoot=function(){return this},Ss.prototype.clipRoot=function(){return this},Ss.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&&Tt(h,s.createGridLines(t))},Ss.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()},Ss.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new R,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,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},Ss.prototype.clipBox=function(){return this.chartContainer.clipBox},Ss.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Hi(this),index:this.paneIndex,name:this.options.name})},Ss),Cs=1;function Ss(t){bs.call(this,t),this.id="pane"+Cs++,this.createTitle(),this.content=new r,this.chartContainer=new ws({},this),this.append(this.content),this.axes=[],this.charts=[]}f.prototype.isStackRoot=!0,i(f,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});var ks=f;function As(t,e){null!==e&&t.push(e)}function Ps(t,e,o){var e=e.visible;return T(e)?e:(e=t.pointVisibility)?e[o]:void 0}function Ts(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=et(a)?parseFloat(a):a)?(s.visible=!1!==Ps(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 Ms(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Os(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 Bs(t,e,o){var i,r;return null===e?e:((r=e[i="_date_"+t])||(r=Fo(o,yt(t)(e)),e[i]=r),r)}function Rs(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ms(t,U)}function Es(t){return 1===t.length?t[0]:t}var Ls=/area/i;function Is(t,e){var o,i=Ki.current.bindPoint(t,null,e).valueFields;for(o in i)if(ot(i[o]))return!0}function zs(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,p=t.series,l=i;h(l+=r)&&(e=Is(p,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function js(t,e,o,i,r){var n,s,a,h,p=e.min,e=e.max,l=0<p&&p<o,c=e+1<o;(l||c)&&(((h=t).missingValues||(Ls.test(h.type)||h.stack?or:ir))!==ir?(l&&(n=i(p-1)),c&&(s=i(e+1))):(l&&(n=Is(t,(a=i(p-1)).item)?a:zs({start:p,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Is(t,(a=i(e+1)).item)?a:zs({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}(Vs=r)&&(g.__proto__=Vs),((g.prototype=Object.create(Vs&&Vs.prototype)).constructor=g).prototype.initFields=function(){},g.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},g.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=(et(a.title)&&(a.title=x({text:a.title},n.title)),new ks(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},g.prototype.crosshairOptions=function(t){return t.options.crosshair},g.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 xs(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},g.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}},g.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},g.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]},g.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},g.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},g.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},g.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},g.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},g.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,p,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(l=!d&&dt(n)||dt(i))&&(h=l({text:qn(h)?h:"",series:u})),l=u._defaults,l=void(it(p=u.color)&&l&&(p=l.color)),c=void 0,c=d?(l={},p):(l={color:n.color,font:n.font},r.markers.color),qn(h))&&""!==h&&s.push({text:h,labels:l,markerColor:c,series:u,active:d})}Tt(o.items,s)},g.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)}},g.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},g.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},g.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=P(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},g.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()},g.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},g.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)},g.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},h={},p={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,u=Hs(t,u)||o,g=r;u!==o&&(g=this.axisCrossingValues(u,e)),this.alignAxisTo(c,u,n[l],g[l]),c.options._overlap||(M(c.lineBox().x1)===M(u.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),M(c.lineBox().x2)===M(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=Hs(e,m)||i,b=n;m!==i&&(b=this.axisCrossingValues(m,t)),this.alignAxisTo(v,m,r[y],b[y]),v.options._overlap||(M(v.lineBox().y1)===M(m.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,m,r[y],b[y]),h[x]&&v.reflow(v.box.alignTo(h[x].box,k).translate(0,-v.options.margin)),_)&&(h[x]=v),M(v.lineBox().y2,3)===M(m.lineBox().y2,3)&&(p[x]&&v.reflow(v.box.alignTo(p[x].box,w).translate(0,v.options.margin)),_)&&(p[x]=v),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},g.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Ds(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))}},g.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Ds(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},g.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=Ds(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),h=0;h<n.length;h++){var p=n[h];p.reflow(p.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},g.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))},g.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Us(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))}},g.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)},g.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)}},g.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var p=0;p<o;p++){var l=e[p];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},g.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},g.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},g.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(A.drawing.Path.fromRect(e[o].toRect()))},g.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},g.prototype.createVisual=function(){Vs.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&&T(o)||(o=a,e=0),this._bgVisual=new A.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)},g.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&&T(s.value)&&null!==s.value&&o.push(s)}}return o},g.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},g.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},g.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},g.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}},g.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}},g.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},g.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Hs(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},g.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 Vs,f=g;function g(t,e,o){Vs.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 Ds(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 R}function Hs(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Us=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},Fs=(i(f,{series:[],plotArea:{margin:{}},background:"",border:{color:D,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}}),f),Ns={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};(Ws=A.Class)&&(Ys.__proto__=Ws),((Ys.prototype=Object.create(Ws&&Ws.prototype)).constructor=Ys).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)||Z(t)||((o=function(){}).prototype=t,s=new o);for(var a=0;a<r.length;a++){var h=r[a],p=this._bindField(n.values,h.canonicalName),p=h.transform(p,i,n.dataItems,e);if(!(null===p||!st(p)||T(p.length)||p instanceof Date)){s=p;break}if(T(p)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=h.name;var c=s;var u=p;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),T(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},Ys.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}},Ys.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(T(s[e])?s:n.fields)[e];o.push(s)}return o};var Gs,Ws,qs=Ys,f=((Gs=A.Class)&&(Xs.__proto__=Gs),((Xs.prototype=Object.create(Gs&&Gs.prototype)).constructor=Xs).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Xs.prototype.query=function(t){return this._defaults[t]},Xs);function Xs(){Gs.call(this),this._defaults={}}function Ys(t,e,o){Ws.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var h=0;h<i.length;h++){var p=i[h],l=void 0;if(st(a))l=a[p];else{if(0!==h&&!u(p,r))break;l=a}l&&s.push({canonicalName:p,name:n[h],transform:it(l)?l:Wi[l]})}}f.current=new f;var Zs,Qs=f,f=((Zs=gn)&&(Ks.__proto__=Zs),((Ks.prototype=Object.create(Zs&&Zs.prototype)).constructor=Ks).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))},Ks.prototype._createLabel=function(t){var e=dt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new cn(e,x({vertical:this.options.vertical},t),o)},Ks.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)},Ks);function Ks(){Zs.apply(this,arguments)}f.prototype.defaults=x({},f.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var $s,Js=f,f=(($s=Pn)&&(ta.__proto__=$s),((ta.prototype=Object.create($s&&$s.prototype)).constructor=ta).prototype.pointType=function(){return Js},ta.prototype.pointValue=function(t){return t.valueFields},ta.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)},ta.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},ta.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:G,max:W}).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))},ta.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},ta);function ta(){$s.apply(this,arguments)}f.prototype.plotLimits=kr.prototype.plotLimits;var ea,oa,ia=f,ra=((oa=Mr)&&(sa.__proto__=oa),((sa.prototype=Object.create(oa&&oa.prototype)).constructor=sa).prototype.aliasFor=function(){return this.parent},sa),f=((ea=r)&&(na.__proto__=ea),((na.prototype=Object.create(ea&&ea.prototype)).constructor=na).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 ra(i,x({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new ra(i,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},na.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())},na.prototype.createHighlight=function(){var t=new A.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},na.prototype.highlightVisual=function(){return this.visual},na.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},na.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=C,r=this.options.vertical?(t=o.x,e=r.y1-5,w):(t=r.x2+5,e=o.y,b),{point:new B(t,e),align:{horizontal:i,vertical:r}}},na.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},na.prototype.overlapsBox=function(t){return this.box.overlaps(t)},na.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},na.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}"}))},na.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=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))},na.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},na);function na(t,e){ea.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function sa(){oa.apply(this,arguments)}x(f.prototype,Ar),x(f.prototype,o),f.prototype.defaults={markers:{visible:!1,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,margin:P(3),padding:P(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var aa,ha,pa,la=f,ca=((pa=Zr)&&(ga.__proto__=pa),((ga.prototype=Object.create(pa&&pa.prototype)).constructor=ga).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ga.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},ga.prototype.createStroke=function(t){var e=new A.drawing.Path(t),t=new A.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)},ga.prototype.hasStackSegment=function(){return!0},ga.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ga.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ga),ua=((ha=ca)&&(fa.__proto__=ha),((fa.prototype=Object.create(ha&&ha.prototype)).constructor=fa).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},fa.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},fa.prototype.createCurveSegments=function(t){return(new Ei).process(this.toGeometryPoints(t))},fa),f=((aa=ca)&&(da.__proto__=aa),((da.prototype=Object.create(aa&&aa.prototype)).constructor=da).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},da.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},da);function da(){aa.apply(this,arguments)}function fa(){ha.apply(this,arguments)}function ga(){pa.apply(this,arguments)}x(f.prototype,h);var ya,va=f,h=((ya=kr)&&(ma.__proto__=ya),((ma.prototype=Object.create(ya&&ya.prototype)).constructor=ma).prototype.render=function(){ya.prototype.render.call(this),this.renderSegments()},ma.prototype.pointType=function(){return la},ma.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=t.valueFields;if(!qn(n.from)&&!qn(n.to)){if(this.seriesMissingValues(r)!==or)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=(it(r.color)&&(i=s.color),new la(n,s));return o.color=i,this.append(o),o},ma.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?ua:"step"===i?va:ca)(t,e,o)},ma.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},ma.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}},ma.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new R(i.x1,t.y1,i.x2,t.y2),new R(e.x1,t.y1,e.x2,t.y2)):(o=new R(t.x1,i.y1,t.x2,i.y2),new R(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},ma.prototype.addValue=function(t,e){var o=t.valueFields;m(o.from)||(o.from=o.to),m(o.to)||(o.to=o.from),ya.prototype.addValue.call(this,t,e)},ma.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:G,max:W},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},ma.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},ma.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)},ma);function ma(){ya.apply(this,arguments)}x(h.prototype,Lr,c);var xa,_a,ba,wa=h,Ca=((ba=Mn)&&(Pa.__proto__=ba),((Pa.prototype=Object.create(ba&&ba.prototype)).constructor=Pa).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()},Pa.prototype.createBody=function(){},Pa),Sa=((_a=Ln)&&(Aa.__proto__=_a),((Aa.prototype=Object.create(_a&&_a.prototype)).constructor=Aa).prototype.pointType=function(){return Ca},Aa),f=((xa=r)&&(ka.__proto__=xa),((ka.prototype=Object.create(xa&&xa.prototype)).constructor=ka).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},ka.prototype.createVisual=function(){xa.prototype.createVisual.call(this);var t=this.series.line||{},t=A.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});J(t),this.visual.append(t)},ka);function ka(t,e,o){xa.call(this),this.from=t,this.to=e,this.series=o}function Aa(){_a.apply(this,arguments)}function Pa(){ba.apply(this,arguments)}i(f,{animation:{type:"fadeIn",delay:600}});var Ta,Ma,Oa=f,Ba=((Ma=Pn)&&(La.__proto__=Ma),((La.prototype=Object.create(Ma&&Ma.prototype)).constructor=La).prototype.render=function(){Ma.prototype.render.call(this),this.createSegments()},La.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=wr(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<o;h++){var p=Ki.current.bindPoint(n,h),l=p.valueFields.value,c=p.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=p.valueFields.value=s):(d=u-(p.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(p,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},La.prototype.updateRange=function(t,e){Ma.prototype.updateRange.call(this,{value:e.to},e)},La.prototype.aboveAxis=function(t){return 0<=t.value},La.prototype.plotRange=function(t){return[t.from,t.to]},La.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 Oa(s,p,r),o.push(h),this.append(h)),s=p}}},La),Ra=["area","verticalArea","rangeArea","verticalRangeArea"],Ea=[sr,hr].concat(Ra),c=((Ta=Fs)&&(E.__proto__=Ta),((E.prototype=Object.create(Ta&&Ta.prototype)).constructor=E).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new sn,0<t.length){this.invertAxes=u(t[0].type,[rr,"bullet",hr,"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}}}},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;Ta.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(Os(t,["area","verticalArea"]),e),this.createRangeAreaChart(Os(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Os(t,[nr,rr]),e),this.createRangeBarChart(Os(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Os(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Os(t,"candlestick"),e),this.createBoxPlotChart(Os(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Os(t,"ohlc"),e),this.createWaterfallChart(Os(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Os(t,[sr,hr]),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=(Ms(n.options.type,U)||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 i,t,r,n=(e.data||{}).length;return o._seriesMax=Math.max(o._seriesMax||0,n),m(o.options.min)||m(o.options.max)?(i=o.currentRangeIndices(),t=u(e.type,Ea),(r=x({},e)).data=(r.data||[]).slice(i.min,i.max+1),t&&js(r,i,n,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return T(e.data[t])}),r):e},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=Ms(i.type,U),n=t.data,s=i?Bs:qi,a=[];i||e.mapCategories();for(var h=0;h<n.length;h++){var p,l=t.categoryField?s(t.categoryField,n[h],this.chartService.intl):r[h];T(l)&&null!==l&&(a[p=e.totalIndex(l)]=a[p]||{items:[],category:l},a[p].items.push(h))}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 qs(x({},t),Ki.current,Qs.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),h=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=n.aggregatePoints(o.items,e)),o},p=a.min;p<=a.max;p++){var l=h(p);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return u(e.type,Ea)&&js(e,a,i.totalCount(),h,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,wr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Ta.prototype.appendChart.call(this,t,e)},E.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=vt([].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 vt(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 Pn(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 ia(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 cs(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 Yr(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 nn(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 wa(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 Sa(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 Ln(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 Un(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 Ba(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=Os(this.series,pr),i=0;i<this.series.length;i++){var r,n=this.series[i];u(n.type,Ra)&&(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}},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,h=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?G:0},n),T(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Rs(n,a[0])?ti:qo)(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},E.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Ra))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 h=i[a];if(u(this.findPane(h.pane),t)){var p=h.name,l=Ms(h.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(p)||o||l,l=(0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max)),new(Ms(h.type,"log")?vi:pi)(l.min,l.max,x({},n,h),this.chartService));if(p){if(this.namedValueAxes[p])throw new Error("Value axis with name "+p+" is already defined");this.namedValueAxes[p]=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 B(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?As(s,p.getValue(r)):As(n,p.getCategory(r))}0===n.length&&As(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Lt(e),originalEvent:e,category:Es(n),value:Es(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){Ia(this.options,t,e),Ia(this.originalOptions,t,e)},E);function E(){Ta.apply(this,arguments)}function La(){Ma.apply(this,arguments)}function Ia(t,e,o){x([].concat(e instanceof qo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}i(c,{categoryAxis:{},valueAxis:{}}),x(c.prototype,Ns);var za=c;function ja(){this._defaultPrevented=!0}(Va=A.Class)&&(Ha.__proto__=Va),((Ha.prototype=Object.create(Va&&Va.prototype)).constructor=Ha).prototype.destroy=function(){this._points=[]},Ha.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))}},Ha.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:ja,visual:t.highlightVisual(),show:e}),i._defaultPrevented)||t.toggleHighlight(e,o)},Ha.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Ha.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};var Va,Da=Ha;function Ha(){Va.call(this),this._points=[]}function Ua(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Fa(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}(Na=A.Class)&&(Ga.__proto__=Na),((Ga.prototype=Object.create(Na&&Na.prototype)).constructor=Ga).prototype.start=function(t){return this._active=Ua(t,this.options.key),this._active},Ga.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Fa(this.axisRanges=t)}},Ga.prototype.end=function(){var t=this._active;return this._active=!1,t},Ga.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)}},Ga.prototype.destroy=function(){delete this.plotArea},Ga.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===y&&!h.options.vertical||e===v&&h.options.vertical)&&(a=h.pan(i))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r};var Na,h=Ga;function Ga(t,e){Na.call(this),this.plotArea=t,this.options=x({},this.options,e)}h.prototype.options={key:"none",lock:"none"};var Wa,qa=h,f=((Wa=A.Class)&&(Xa.__proto__=Wa),((Xa.prototype=Object.create(Wa&&Wa.prototype)).constructor=Xa).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)},Xa.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Xa.prototype.setStyles=function(t){pt(this._marquee,t)},Xa.prototype.start=function(t){if(Ua(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},Xa.prototype._elementOffset=function(){var t=this.chart.element,e=pt(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=Bt(t);return{left:o+t.left,top:e+t.top}},Xa.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Xa.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,Fa(this.axisRanges)},Xa.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)}},Xa.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Xa.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||!T(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Xa.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===y&&(n=e.x1,a=e.width()),r===v&&(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}},Xa);function Xa(t,e){Wa.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}f.prototype.options={key:"shift",lock:"none"};var Ya,Za,Qa,Ka,$a=f,Ja=((Ka=A.Class)&&(sh.__proto__=Ka),((sh.prototype=Object.create(Ka&&Ka.prototype)).constructor=sh).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 Fa(this.axisRanges=i)},sh.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)}},sh.prototype.destroy=function(){delete this.chart},sh),th=((Qa=r)&&(nh.__proto__=Qa),((nh.prototype=Object.create(Qa&&Qa.prototype)).constructor=nh).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new A.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 R),r.renderVisual()}},nh.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ie(t):new R},nh.prototype.renderVisual=function(){this.addVisual()},nh.prototype.createVisual=function(){},nh),eh=((Za=be)&&(rh.__proto__=Za),((rh.prototype=Object.create(Za&&Za.prototype)).constructor=rh).prototype.createContainer=function(){this.container=new Be({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},rh.prototype.createMarker=function(){this.container.append(new Ce(this.markerOptions()))},rh.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return x({},t.markers,{background:e,border:{color:e}})},rh.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new De(t.text,e))},rh.prototype.renderComplete=function(){Za.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=A.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},rh.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},rh.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},rh.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},rh.prototype.eventArgs=function(t){var e=this.options;return{element:Lt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},rh.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()):Za.prototype.renderVisual.call(this)},rh),oh="custom",c=((Ya=r)&&(ih.__proto__=Ya),((ih.prototype=Object.create(Ya&&Ya.prototype)).constructor=ih).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=b;e===oh?i=C:u(e,[k,w])?(i="start"===o?C:"end"===o?S:b,r=e):o&&("start"===o?r=k:"end"===o&&(r=w)),this.container=new be({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 be({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},ih.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new th({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 eh(x({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},ih.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===oh&&"horizontal"!==e||(T(e)?"horizontal"!==e:u(t,[C,S]))},ih.prototype.hasItems=function(){return 0<this.container.children[0].children.length},ih.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===oh?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new R(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},ih.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===w?y:v,a=this.isVertical(),h=t.clone(),p=t.clone(),i=(i!==C&&i!==S||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,v,o.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,y,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},ih.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 R(i,r,i+t.width(),r+t.height()))},ih.prototype.renderVisual=function(){this.hasItems()&&Ya.prototype.renderVisual.call(this)},ih.prototype.createLegendTitle=function(t){var e=x({},{color:D,position:k,align:b},t),o=e.text;t&&!1!==t.visible&&(T(e)&&e.visible&&((t=dt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new De(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},ih.prototype.createTitleLayout=function(){this.layout=new Be({vertical:!0,wrap:!1}),this.container.append(this.layout)},ih.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},ih.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},ih);function ih(t,e){void 0===e&&(e={}),Ya.call(this,t),this.chartService=e,u(this.options.position,[k,S,w,C,oh])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function rh(t){Za.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function nh(t,e){Qa.call(this,t),this.chartService=e}function sh(t,e){Ka.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}i(c,{position:S,items:[],offsetX:0,offsetY:0,margin:P(5),padding:P(5),border:{color:D,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:b}});var ah,hh=c,h=((ah=A.Class)&&(ph.__proto__=ah),((ph.prototype=Object.create(ah&&ah.prototype)).constructor=ph).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},ph.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=Os(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},ph);function ph(){ah.call(this),this._registry=[]}h.current=new h;var lh=h;function ch(t){var e=document.createElement("div");return t&&(e.className=t),e}function uh(t){for(var e=t;e&&!mt(e,"k-handle");)e=e.parentNode;return e}(dh=A.Class)&&(fh.__proto__=dh),((fh.prototype=Object.create(dh&&dh.prototype)).constructor=fh).prototype.onPane=function(t){return this.categoryAxis.pane===t},fh.prototype.createElements=function(){var t=this.options,e=this.wrapper=ch("k-selector"),o=(pt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=ch("k-selection")),i=(this.leftMask=ch("k-mask"),this.rightMask=ch("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(ch("k-selection-bg")),this.leftHandle=ch("k-handle k-left-handle")),r=this.rightHandle=ch("k-handle k-right-handle"),o=(i.appendChild(ch()),r.appendChild(ch()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),pt(o,["borderLeftWidth","borderRightWidth","height"])),n=pt(i,"height").height,s=pt(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},pt(i,{top:(o.height-n)/2}),pt(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},fh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),Mt(this.wrapper,((t={})[fr]=this._mousewheelHandler,t))),this._domEvents=so.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)})},fh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&x(t,{min:Fo(o,t.min),max:Fo(o,t.max),from:Fo(o,t.from),to:Fo(o,t.to)}),pt(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)},fh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Dt(this.wrapper,((t={})[fr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},fh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},fh.prototype._start=function(t){var e=this.options,o=Lt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:uh(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)},fh.prototype._press=function(t){(t=this._state?this._state.moveTarget:uh(Lt(t)))&&Q(t,"k-handle-active")},fh.prototype._move=function(t){var e,o,i,r,n,s,a,h,p,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,h=e.to,p=e.to-e.from,c=pt(this.wrapper,"width").width/(c.categoriesCount()-1),l=Math.round(l/c)*(i?-1:1),o)&&(c=mt(o,"k-left-handle"),u=mt(o,"k-right-handle"),mt(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-l),a-p),e.to=Math.min(e.from+p,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===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e))))},fh.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&$(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},fh.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new B(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()))},fh.prototype._mousewheel=function(t){var e,o=this,i=At(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))},fh.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()},fh.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},fh.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 B(s))||i.min,o.to=r.pointCategoryIndex(new B(n))||i.max,this.move(o.from,o.to),this.trigger("select",this._rangeEventArgs(o))},fh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},fh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},fh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},fh.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=M(i[h]-r.left+n.left),t=(pt(this.leftMask,{width:e}),pt(this.selection,{left:e}),i=this._slot(a),M(o.width-(i[h]-r.left+n.left))),a=(pt(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),pt(this.rightMask,{left:a}),pt(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},fh.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)},fh.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},fh.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),h=this.categoryAxis.options.reverse,h=y+(h?"2":"1"),p=this.categoryAxis.lineBox(),h=Math.abs(p[h]-e.x),e=p.width(),p=M(h/e,2),h=M(p*t),e=M((1-p)*t);if((s=this._state?this._state.range:s).from=_(_(n-h,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},fh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var dh,f=fh;function fh(t,e,o,i){dh.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 ti,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(f,{visible:!0,mousewheel:{zoom:"both"},min:W,max:G});var gh,yh,vh=f,mh=((yh=d)&&(_h.__proto__=yh),((_h.prototype=Object.create(yh&&yh.prototype)).constructor=_h).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,yh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},_h.prototype.hide=function(){delete this._current,yh.prototype.hide.call(this)},_h),c=((gh=d)&&(xh.__proto__=gh),((xh.prototype=Object.create(gh&&gh.prototype)).constructor=xh).prototype.showAt=function(t,e){var o,i=vt(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))},xh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},xh.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 B(t.x,e.y):new B(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},xh);function xh(t,e){gh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function _h(){yh.apply(this,arguments)}i(c,{categoryFormat:"{0:d}"});var bh,wh=c,h=((bh=A.drawing.Animation)&&(Ch.__proto__=bh),((Ch.prototype=Object.create(bh&&bh.prototype)).constructor=Ch).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 A.geometry.Point(1,1))[o]=er,e.transform(A.geometry.transform().scale(t.x,t.y))):this.abort()},Ch.prototype.step=function(t){var e=bt(this.fromScale.x,1,t),t=bt(this.fromScale.y,1,t);this.element.transform(A.geometry.transform().scale(e,t,this.origin))},Ch.prototype.abort=function(){bh.prototype.abort.call(this),this.element.transform(null)},Ch);function Ch(){bh.apply(this,arguments)}i(h,{duration:600}),A.drawing.AnimationFactory.current.register(rr,h);(Sh=A.drawing.Animation)&&(kh.__proto__=Sh),((kh.prototype=Object.create(Sh&&Sh.prototype)).constructor=kh).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(A.geometry.transform().scale(er,er,t))},kh.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.center))};var Sh,f=kh;function kh(){Sh.apply(this,arguments)}i(f,{easing:"easeOutElastic"}),A.drawing.AnimationFactory.current.register("bubble",f);(Ah=A.drawing.Animation)&&(Ph.__proto__=Ah),((Ph.prototype=Object.create(Ah&&Ah.prototype)).constructor=Ph).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Ph.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var Ah,d=Ph;function Ph(){Ah.apply(this,arguments)}i(d,{duration:200,easing:"linear"}),A.drawing.AnimationFactory.current.register("fadeIn",d);(Th=A.drawing.Animation)&&(Mh.__proto__=Th),((Mh.prototype=Object.create(Th&&Th.prototype)).constructor=Mh).prototype.setup=function(){this.element.transform(A.geometry.transform().scale(er,er,this.options.center))},Mh.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.options.center))};var Th,c=Mh;function Mh(){Th.apply(this,arguments)}i(c,{easing:"easeOutElastic",duration:600}),A.drawing.AnimationFactory.current.register(ar,c);var Oh,Bh=c,h=((Oh=Qn)&&(Rh.__proto__=Oh),((Rh.prototype=Object.create(Oh&&Oh.prototype)).constructor=Rh).prototype.render=function(){Oh.prototype.render.call(this),this.renderSegments()},Rh.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Dr:Br)(t,e,o)},Rh.prototype.animationPoints=function(){return Oh.prototype.animationPoints.call(this).concat(this._segments)},Rh.prototype.createMissingValue=function(t,e){if(e===or)return qn((e={x:t.x,y:t.y}).x)||(e.x=0),qn(e.y)||(e.y=0),e},Rh);function Rh(){Oh.apply(this,arguments)}x(h.prototype,Lr);var Eh,Lh=h,f=((Eh=Fs)&&(Ih.__proto__=Eh),((Ih.prototype=Object.create(Eh&&Eh.prototype)).constructor=Ih).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new sn,this.yAxisRangeTracker=new sn},Ih.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(Os(r,"scatter"),i),this.createScatterLineChart(Os(r,"scatterLine"),i),this.createBubbleChart(Os(r,"bubble"),i))}this.createAxes(t)},Ih.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Eh.prototype.appendChart.call(this,t,e)},Ih.prototype.removeAxis=function(t){var e=t.options.name;Eh.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},Ih.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=vt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=vt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Ih.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Qn(this,{series:t,clip:e.options.clip}),e)},Ih.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Lh(this,{series:t,clip:e.options.clip}),e)},Ih.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new os(this,{series:t,clip:e.options.clip}),e)},Ih.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=Ms(a.type,"log"),h=s.query(),p=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||h||p,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&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}p=new(Ms(a.type,U)||!a.type&&i?ui:t?vi:pi)(s.min,s.max,a,this.chartService);if(p.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=p}return this.appendAxis(p),p},Ih.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]},Ih.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new B(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p],c=l.options.vertical?h:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<h.length&&t.trigger(o,{element:Lt(e),originalEvent:e,x:Es(a),y:Es(h)})},Ih.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);zh(this.options,i,o,e),zh(this.originalOptions,i,o,e)},Ih);function Ih(){Eh.apply(this,arguments)}function zh(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}i(f,{xAxis:{},yAxis:{}}),x(f.prototype,Ns);var jh,Vh=f,d=((jh=r)&&(Uh.__proto__=jh),((Uh.prototype=Object.create(jh&&jh.prototype)).constructor=Uh).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=dt(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===b||"insideEnd"===o.position?(o.color||(o.color=Xt(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 De(r,x({},o,{align:b,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),t),this.append(this.label)))},Uh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Uh.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===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new R(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 R(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=S):(i=t.x-o,n.orientation=C),n.reflow(new R(i,t.y-e,t.x,t.y))))},Uh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;jh.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 A.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 A.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Uh.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),un(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)))},Uh.prototype.createSegment=function(t,e){return e.singleSegment?new A.drawing.Circle(new A.geometry.Circle(new A.geometry.Point(t.center.x,t.center.y),t.radius),e):ye.current.createRing(t,e)},Uh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),jh.prototype.createAnimation.call(this)},Uh.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}}))},Uh.prototype.highlightVisual=function(){return this.visual.children[0]},Uh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new A.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Uh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Vt(e+180),e=M(Math.sin(t),F),t=M(Math.cos(t),F),{horizontal:Math.abs(e)>Hh?b:t<0?S:C,vertical:Math.abs(e)<Dh?b:e<0?w:k})}},Uh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Uh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Uh),Dh=M(Vt(30),F),Hh=M(Vt(60),F);function Uh(t,e,o){jh.call(this,o),this.value=t,this.sector=e}i(d,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:P(.5),align:H,zIndex:1,position:"outsideEnd"},animation:{type:ar},highlight:{visible:!0,border:{width:1}},visible:!0}),x(d.prototype,Ar);var Fh,Nh=d,Gh={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)&&dt(h)||dt(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=(r?(i={},e):(i={color:h.color,font:h.font},s.markers||{})).color,qn(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i})}},c=((Fh=r)&&(Wh.__proto__=Fh),((Wh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Wh).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Wh.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,p=Ts(a),l=p.total,c=p.points,p=p.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/p),void 0),f=(T(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==h.length&&Boolean(y.explode),it(a.color)||(a.color=y.color||o[g%i]),t(v,new le(null,0,0,f,m),{owner:this,category:T(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==l?v/l:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},Wh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;br(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Wh.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 Nh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Wh.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,h=s-.85*s,p=new R(n.x1,n.y1,n.x1+s,n.y1+s),s=p.center(),n=n.center(),l=e.series.length,c=[],u=[],e=O(e.padding,h);this.targetBox=t,e=a-5<e?a-5:e,p.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new B(d+p.x1+e,d+p.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(p),y.label);x&&"outsideEnd"===x.options.position&&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=p},Wh.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Wh.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Wh.prototype.distanceBetweenLabels=function(t){var e=zt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=M(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=M(h.y1-n.y2);r.push(s)}return s=M(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Wh.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)},Wh.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},Wh.prototype.reflowLabels=function(t,e){var o,i=zt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var p=0;p<s;p++){var l=e[p],c=l.box;h+=t[p],o=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),l.orientation===S),l.orientation===S?(n.align!==H&&(o=r.radius+r.center.x+a),l.reflow(new R(o+c.width(),h,o,h))):(n.align!==H&&(o=r.center.x-r.radius-a),l.reflow(new R(o-c.width(),h,o,h))),h+=c.height()}},Wh.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Fh.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,h,p,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new A.drawing.Path({stroke:{color:g,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position)&&(r=d.box,n=u.center,l=u.point(f),s=new B(r.x1,r.center().y),p=h=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===S?(p=qh(n,l,s,h=new B(r.x1-t.padding,r.center().y)),s=new B(h.x-4,h.y),(p=p||s).x=Math.min(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===nr||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))):(p=qh(n,l,s,h=new B(r.x2+t.padding,r.center().y)),s=new B(h.x+4,h.y),(p=p||s).x=Math.max(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===nr||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))),g.lineTo(h.x,h.y),this._connectorLines.push(g),this.visual.append(g))}},Wh.prototype.renderVisual=function(){var t,e,o,i;Fh.prototype.renderVisual.call(this),Ft(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(A.geometry.transform().scale(i,i,[e.x,e.y]))},Wh.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}},Wh.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)},Wh.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)},Wh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Wh.prototype.animationDelay=function(t){return 70*t},Wh.prototype.stackRoot=function(){return this},Wh);function Wh(t,e){Fh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function qh(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 B(t.x+(o=n/i)*(e.x-t.x),t.y+o*(e.y-t.y)):r}i(c,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(c.prototype,Gh),c.prototype.isStackRoot=!0;var Xh,Yh,Zh=c,Qh=((Yh=Fs)&&($h.__proto__=Yh),(($h.prototype=Object.create(Yh&&Yh.prototype)).constructor=$h).prototype.render=function(){this.createPieChart(this.series)},$h.prototype.createPieChart=function(t){var e=t[0],t=new Zh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},$h.prototype.appendChart=function(t,e){Yh.prototype.appendChart.call(this,t,e),Tt(this.options.legend.items,t.legendItems)},$h),Lr=((Xh=Nh)&&(Kh.__proto__=Xh),((Kh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Kh).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===b?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new R(e.x,e.y-t/2,e.x,e.y))):Xh.prototype.reflowLabel.call(this))},Kh.prototype.createSegment=function(t,e){return ye.current.createRing(t,e)},Kh);function Kh(){Xh.apply(this,arguments)}function $h(){Yh.apply(this,arguments)}i(Lr,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:ar}}),x(Lr.prototype,Ar);var Jh,tp=Lr,h=((Jh=Zh)&&(ep.__proto__=Jh),((ep.prototype=Object.create(Jh&&Jh.prototype)).constructor=ep).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 tp(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},ep.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=O(o.padding,i-.85*i),a=r-(o=r-5<o?r-5:o),h=0,p=0;p<s;p++){var l=n[p];0===p&&T(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),T(l.size)?a-=l.size:h++,T(l.margin)&&p!==s-1&&(a-=l.margin)}T(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)+O(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Jh.prototype.reflow.call(this,t)},ep.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},ep);function ep(){Jh.apply(this,arguments)}i(h,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var op,ip,rp,np=h,sp=((rp=Qh)&&(pp.__proto__=rp),((pp.prototype=Object.create(rp&&rp.prototype)).constructor=pp).prototype.render=function(){this.createDonutChart(this.series)},pp.prototype.createDonutChart=function(t){var e=t[0],t=new np(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},pp),f=((ip=Fs)&&(hp.__proto__=ip),((hp.prototype=Object.create(ip&&ip.prototype)).constructor=hp).prototype.initFields=function(){this.valueAxisRangeTracker=new sn},hp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},hp.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)},hp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=Mi,{min:.1,max:1}):(t=Pi,{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)},hp.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=P(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,b),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)},hp.prototype.backgroundBox=function(){return this.box},hp.prototype.detachLabels=function(){},hp),d=((op=Qn)&&(ap.__proto__=op),((ap.prototype=Object.create(op&&op.prototype)).constructor=ap).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=B.onCircle(t.center,t.startAngle,e);return new R(t.x,t.y,t.x,t.y)},ap);function ap(){op.apply(this,arguments)}function hp(){ip.apply(this,arguments)}function pp(){rp.apply(this,arguments)}i(d,{clip:!1});var lp,cp=d,c=((lp=Lh)&&(up.__proto__=lp),(up.prototype=Object.create(lp&&lp.prototype)).constructor=up);function up(){lp.apply(this,arguments)}c.prototype.pointSlot=cp.prototype.pointSlot,i(c,{clip:!1});var dp,fp,gp=c,yp=((fp=rn)&&(xp.__proto__=fp),((xp.prototype=Object.create(fp&&fp.prototype)).constructor=xp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},xp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},xp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Ei(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},xp),vp=((dp=Zr)&&(mp.__proto__=dp),((mp.prototype=Object.create(dp&&dp.prototype)).constructor=mp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new A.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},mp);function mp(){dp.apply(this,arguments)}function xp(){fp.apply(this,arguments)}function _p(t,e){return t.value.x-e.value.x}(wp=gp)&&(kp.__proto__=wp),((kp.prototype=Object.create(wp&&wp.prototype)).constructor=kp).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?yp:vp)(t,e,o)},kp.prototype.createMissingValue=function(t,e){var o;return qn(t.x)&&e!==ir&&(o={x:t.x,y:t.y},e===or)&&(o.y=0),o},kp.prototype.seriesMissingValues=function(t){return t.missingValues||or},kp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},kp.prototype.sortPoints=function(t){if(t.sort(_p),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];!o||qn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t};var bp,wp,Cp=kp,Lr=((bp=f)&&(Sp.__proto__=bp),((Sp.prototype=Object.create(bp&&bp.prototype)).constructor=Sp).prototype.createPolarAxis=function(){var t=new wi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Sp.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:V},minorGridLines:{type:V}},this.options.yAxis)},Sp.prototype.createValueAxis=function(){bp.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Sp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Fs.prototype.appendChart.call(this,t,e)},Sp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Os(t,["polarLine"]),e),this.createScatterChart(Os(t,["polarScatter"]),e),this.createAreaChart(Os(t,["polarArea"]),e)},Sp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new gp(this,{series:t}),this.appendChart(t,e))},Sp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new cp(this,{series:t}),this.appendChart(t,e))},Sp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Cp(this,{series:t}),this.appendChart(t,e))},Sp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new B(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Lt(e),x:r,y:i})},Sp.prototype.createCrosshairs=function(){},Sp);function Sp(){bp.apply(this,arguments)}function kp(){wp.apply(this,arguments)}i(Lr,{xAxis:{},yAxis:{}}),x(Lr.prototype,Ns);var Ap,h=Lr,d=((Ap=Yr)&&(Pp.__proto__=Ap),((Pp.prototype=Object.create(Ap&&Ap.prototype)).constructor=Pp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=B.onCircle(t.center,t.middle(),e);return new R(t.x,t.y,t.x,t.y)},Pp.prototype.renderSegments=function(){if(Ap.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=zt(n),r=zt(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i)&&r&&zt(n).linePoints.push(o)}},Pp.prototype.createSegment=function(t,e,o){var o=new("smooth"===e.style?Dr:Br)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==ir||(o.options.closed=!0),o},Pp);function Pp(){Ap.apply(this,arguments)}i(d,{clip:!1,limitPoints:!1});var Tp,Mp,Op,Bp,Rp=d,Ep=((Bp=rn)&&(Dp.__proto__=Bp),((Dp.prototype=Object.create(Bp&&Bp.prototype)).constructor=Dp).prototype.fillToAxes=function(){},Dp),Lp=((Op=Zr)&&(Vp.__proto__=Op),((Vp.prototype=Object.create(Op&&Op.prototype)).constructor=Vp).prototype.fillToAxes=function(){},Vp),Ip=((Mp=Rp)&&(jp.__proto__=Mp),((jp.prototype=Object.create(Mp&&Mp.prototype)).constructor=jp).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 Ep(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Lp(t,e,o,r,n)),s},jp.prototype.seriesMissingValues=function(t){return t.missingValues||or},jp),c=((Tp=tp)&&(zp.__proto__=Tp),(zp.prototype=Object.create(Tp&&Tp.prototype)).constructor=zp);function zp(t,e){Tp.call(this,t,null,e)}function jp(){Mp.apply(this,arguments)}function Vp(){Op.apply(this,arguments)}function Dp(){Bp.apply(this,arguments)}i(c,{overlay:{gradient:"none"},labels:{distance:10}});var Hp,Up=c,Lr=((Hp=r)&&(Fp.__proto__=Hp),((Fp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Fp).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})},Fp);function Fp(t){Hp.call(this,t),this.forEach=t.rtl?vn:yn}i(Lr,{gap:1,spacing:0});var Np,Gp,Wp=Lr,qp=((Gp=r)&&(Yp.__proto__=Gp),((Yp.prototype=Object.create(Gp&&Gp.prototype)).constructor=Yp).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 R;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Yp),d=((Np=Pn)&&(Xp.__proto__=Np),((Xp.prototype=Object.create(Np&&Np.prototype)).constructor=Xp).prototype.pointType=function(){return Up},Xp.prototype.clusterType=function(){return Wp},Xp.prototype.stackType=function(){return qp},Xp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Xp.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},Xp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Xp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Np.prototype.createAnimation.call(this)},Xp);function Xp(){Np.apply(this,arguments)}function Yp(){Gp.apply(this,arguments)}d.prototype.reflow=kr.prototype.reflow,i(d,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Zp,Qp=d,c=((Zp=f)&&(Kp.__proto__=Zp),((Kp.prototype=Object.create(Zp&&Zp.prototype)).constructor=Kp).prototype.createPolarAxis=function(){var t=new _i(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Kp.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)},Kp.prototype.aggregateCategories=function(){za.prototype.aggregateCategories.call(this,this.panes)},Kp.prototype.createCategoryAxesLabels=function(){za.prototype.createCategoryAxesLabels.call(this,this.panes)},Kp.prototype.filterSeries=function(t){return t},Kp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Os(t,["radarArea"]),e),this.createLineChart(Os(t,["radarLine"]),e),this.createBarChart(Os(t,["radarColumn"]),e)},Kp.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},Kp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Ip(this,this.chartOptions(t)),this.appendChart(t,e))},Kp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Rp(this,this.chartOptions(t)),this.appendChart(t,e))},Kp.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 Qp(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},Kp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Kp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new B(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Lt(e),category:r,value:i})},Kp.prototype.createCrosshairs=function(){},Kp);function Kp(){Zp.apply(this,arguments)}x(c.prototype,Ns,{appendChart:za.prototype.appendChart,aggregateSeries:za.prototype.aggregateSeries,seriesSourcePoints:za.prototype.seriesSourcePoints}),i(c,{categoryAxis:{categories:[]},valueAxis:{}});var $p,Lr=c,d=(($p=r)&&(Jp.__proto__=$p),((Jp.prototype=Object.create($p&&$p.prototype)).constructor=Jp).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new R(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new R(t.x1,e[0].y,t.x2,e[2].y))},Jp.prototype.createVisual=function(){var t=this,e=this.options;$p.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)},Jp.prototype.createPath=function(){var t=this.options,e=t.border;return A.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Jp.prototype.createHighlight=function(t){return A.drawing.Path.fromPoints(this.points,t)},Jp.prototype.highlightVisual=function(){return this.visual.children[0]},Jp.prototype.highlightVisualArgs=function(){var t=A.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Jp.prototype.tooltipAnchor=function(){var t=this.box;return{point:new B(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Jp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Jp);function Jp(t,e,o){$p.call(this,e),this.value=t,this.options.index=o.index}i(d,{color:a,border:{width:1}}),x(d.prototype,Ar);var tl,el=d,f=((tl=r)&&(ol.__proto__=tl),((ol.prototype=Object.create(tl&&tl.prototype)).constructor=ol).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},ol.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=Ts(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(a=p.fields,it(o.color)||(o.color=a.color||e[s%e.length]),a=x({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)}},ol.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;br(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},ol.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 el(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},ol.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=dt(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=Xt(i.color),n.background)||(n.background=i.color),this.evalSegmentOptions(n,t,e),o=new De(s,x({vAlign:n.position},n),r),this.labels.push(o),o},ol.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!==b&&(i=t[o].box.width(),r===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},ol.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var p=s.percentage/a.percentage*e,l=(e-p)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=i.dynamicHeight?o*d:o/n,d=_(d?(e-p*(f/d))/2:f?0:e/2,0,e);g.push(new A.geometry.Point(t.x1+l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new A.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+i.segmentSpacing,p=_(e-2*(l=d),0,e)}},ol.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,h=s?0:(e-e/i.neckRatio)/2,p=((s?e:e-2*h)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?p*d:p/n,d=i.dynamicHeight?o*d:o/n;u.push(new A.geometry.Point(t.x1+h,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-h,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-h-f,t.y1+d+l)),u.push(new A.geometry.Point(t.x1+h+f,t.y1+d+l)),h+=f,l+=d+i.segmentSpacing}},ol.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)}},ol);function ol(t,e){tl.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}i(f,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),x(f.prototype,Gh);var il,rl,nl=f,c=((rl=Fs)&&(al.__proto__=rl),((al.prototype=Object.create(rl&&rl.prototype)).constructor=al).prototype.render=function(){this.createFunnelChart(this.series)},al.prototype.createFunnelChart=function(t){var e=t[0],t=new nl(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)},al.prototype.appendChart=function(t,e){rl.prototype.appendChart.call(this,t,e),Tt(this.options.legend.items,t.legendItems)},al),d=((il=r)&&(sl.__proto__=il),((sl.prototype=Object.create(il&&il.prototype)).constructor=sl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},sl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=dt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Xt(this.color),this.label=new De(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},sl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},sl.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())},sl.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r="roundedRect"===O(e.type,"rect"),o=O(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,Ie(i)},sl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=O(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},sl.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Ce({type:O(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:O(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)},sl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new Ce({type:O(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:O(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},sl.prototype.highlightVisual=function(){return this.rectVisual},sl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},sl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new B(t,e),align:{horizontal:b,vertical:w}}},sl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},sl.prototype.unclipElements=function(){},sl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},sl);function sl(t,e){il.call(this),this.options=e,this.color=e.color||a,this.value=t}function al(){rl.apply(this,arguments)}x(d.prototype,Ar),x(d.prototype,o),d.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var hl,pl=d,f=((hl=r)&&(ll.__proto__=hl),((ll.prototype=Object.create(hl&&hl.prototype)).constructor=ll).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:G,max:W},this._evalSeries=[]},ll.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},ll.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;T(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))}},ll.prototype.addValue=function(t,e){var o;t&&T(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},ll.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=(T(s)||(this._evalSeries[r]=s=br(t,{},n,!0)),t);return s&&br(r=x({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},ll.prototype.pointType=function(){return pl},ll.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},ll.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=(it(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=Object(A.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 pl(t,s));return n.color=a,this.append(n),n},ll.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)},ll.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},ll.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},ll.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),p=0;p<i.data.length;p++){var l=this._bindPoint(i,o,p),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=h.min<=d&&d<=h.max;u&&d&&t(c,x({pointIx:p,series:i,seriesIx:o,dataItem:i.data[p],owner:this},l))}},ll.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},ll.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},ll);function ll(t,e){hl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(f,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),x(f.prototype,{_bindPoint:kr.prototype._bindPoint});var cl,ul=f,o=((cl=Fs)&&(dl.__proto__=cl),((dl.prototype=Object.create(cl&&cl.prototype)).constructor=dl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},dl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},dl.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=Kt(n.categories||[]),a=Kt(r.categories||[]),h=0;h<i.length;h++){var p=Ki.current.bindPoint(o,h).valueFields,l=p.x,p=p.y;s.has(l)||s.add(l),a.has(p)||a.add(p)}n.categories=s.values(),r.categories=a.values()}},dl.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(Os(r,["heatmap"]),i)}},dl.prototype.createHeatmapChart=function(t,e){t=new ul(this,{series:t});this.appendChart(t,e)},dl.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=vt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=vt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},dl.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)},dl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},dl.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],h=this.series,p=0;p<h.length;p++){var l=h[p],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){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(Ms(s.type,U)||!s.type&&i?ti: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},dl.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]},dl.prototype.removeAxis=function(t){var e=t.options.name;cl.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},dl.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new B(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p];As(l.options.vertical?h:a,l.getCategory(r))}0<a.length&&0<h.length&&t.trigger(o,{element:Lt(e),originalEvent:e,x:Es(a),y:Es(h)})},dl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);fl(this.options,i,o,e),fl(this.originalOptions,i,o,e)},dl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},dl);function dl(){cl.apply(this,arguments)}function fl(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}i(o,{xAxis:{},yAxis:{}}),x(o.prototype,Ns);var gl,d=o,f="color",o="first",yl="max",vl=(lh.current.register(za,[rr,nr,sr,hr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),lh.current.register(Vh,["scatter","scatterLine","bubble"]),lh.current.register(Qh,[ar]),lh.current.register(sp,["donut"]),lh.current.register(c,["funnel"]),lh.current.register(h,["polarArea","polarLine","polarScatter"]),lh.current.register(Lr,["radarArea","radarColumn","radarLine"]),lh.current.register(d,["heatmap"]),Ki.current.register([rr,nr,sr,hr,"area","verticalArea"],[Y],["category",f,"noteText","errorLow","errorHigh"]),Ki.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",f,"noteText"]),Ki.current.register(["waterfall","horizontalWaterfall"],[Y],["category",f,"noteText","summary"]),Ki.current.register(["polarArea","polarLine","polarScatter"],[y,v],[f]),Ki.current.register(["radarArea","radarColumn","radarLine"],[Y],[f]),Ki.current.register(["funnel"],[Y],["category",f,"visibleInLegend","visible"]),Qs.current.register([rr,nr,sr,hr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:yl,color:o,noteText:o,errorLow:"min",errorHigh:yl}),Qs.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:yl,color:o,noteText:o}),Qs.current.register(["radarArea","radarColumn","radarLine"],{value:yl,color:o}),Ki.current.register(["scatter","scatterLine","bubble"],[y,v],[f,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ki.current.register(["bubble"],[y,v,"size"],[f,"category","noteText"]),Ki.current.register(["heatmap"],[y,v,Y],[f,"noteText"]),Ki.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",f,"downColor","noteText"]),Qs.current.register(["candlestick","ohlc"],{open:yl,high:yl,low:"min",close:yl,color:o,downColor:o,noteText:o}),Ki.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",f,"noteText"]),Qs.current.register(["boxPlot","verticalBoxPlot"],{lower:yl,q1:yl,median:yl,q3:yl,upper:yl,mean:yl,outliers:o,color:o,noteText:o}),Ki.current.register(["bullet","verticalBullet"],["current","target"],["category",f,"visibleInLegend","noteText"]),Qs.current.register(["bullet","verticalBullet"],{current:yl,target:yl,color:o,noteText:o}),Ki.current.register([ar,"donut"],[Y],["category",f,"explode","visibleInLegend","visible"]),["category",Y,y,v]),c=((gl=A.Class)&&(L.__proto__=gl),((L.prototype=Object.create(gl&&gl.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){Q(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=vl,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=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&&Ft(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 ji(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 Hi(e[o])},L.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Hi(e[t])},L.prototype.plotArea=function(){return new Ui(this._plotArea)},L.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=it(e)?r.filterPoints(e):(st(e)?(o=e.series,i=e.category):o=i=e,"donut"===n.type?ml(r.pointsBySeriesName(o),i):n.type===ar||"funnel"===n.type?ml((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;it(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&T(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&&Rt(e,{width:o.width}),o.height&&Rt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=A.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 Da,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Cl(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}}),wl(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),Cl(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},L.prototype._sharedTooltip=function(){return this._plotArea instanceof za&&this.options.tooltip&&this.options.tooltip.shared},L.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new qa(this._plotArea,t.pannable))},L.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new $a(this,e))},L.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Ja(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(["dragStart",lr,cr])),o=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",ur,dr]),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 mh(this.chartService,t)},L.prototype._createSharedTooltip=function(t){return new wh(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 h=0;h<vl.length;h++)i=n.axisDefaults||{},r=(r=[].concat(n[o=vl[h]+"Axis"])).map(a),n[o]=1<r.length?r:r[0];var p=t,t=e,l=p.series,c=l.length,u=p.seriesDefaults,d=x({},p.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);xl(d),xl(g);for(var y=0;y<c;y++){var v=l[y].type||p.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:p.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 Te(this._modelOptions()),i=(o.chart=this,o._plotArea=e,Ge.buildTitle(t.title)),r=Ge.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return o.append.apply(o,Ge.orderTitles([i,r])),t.legend&&t.legend.visible&&o.append(new hh(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 lh.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 vh(this,r,x({min:i.min,max:i.max},n.select)),e.push(r))}},L.prototype._selectStart=function(t){return this.trigger("selectStart",t)},L.prototype._select=function(t){return this.trigger("select",t)},L.prototype._selectEnd=function(t){return this.trigger("selectEnd",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=Object(A.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={}),"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},L.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,Mt(e,((t={}).contextmenu=this._clickHandler,t[fr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Mt(e,((t={}).mousemove=this._mousemove,t)),this.domEvents=so.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._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger("plotAreaLeave"))},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(dr,{}))},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:_l(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(ur,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(["dragStart",lr,cr])&&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:_l(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(lr,{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(lr,{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(cr,{axisRanges:_l(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,cr),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(ur,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(dr,{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 O(t.rate,.3)},L.prototype._mousewheel=function(t){var e=this,o=At(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:_l(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(ur,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(dr,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(ur,{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,dr)},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=_l(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=Et(t);return this._toModelCoordinates(t.x,t.y)},L.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=pt(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=Bt(this.element);return{left:M(t.x+e.left+o.left),top:M(t.y+e.top+o.top)}},L.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Bt(o),r=this._elementPadding(),o=qt(o).invert(),t=new A.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new B(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){return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Fs)}),this._showInactiveOpacity(t,e),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._showInactiveOpacity=function(t,e){var 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},L.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},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),Mt(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)):(Dt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},L.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;this._trackCrosshairs(e),o.hover&&((o=o.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!o&&(this._plotAreaHovered=!1,this.trigger("plotAreaLeave"))),this._sharedTooltip()&&this._trackSharedTooltip(e,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,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))},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 _t,a=[],h=!1,p=0;p<n;p++){var l=r[p],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,h=c||h;if(c&&0<d)for(var f=(o=Rs(t,qi(l.categoryField,u[0])))?Bs:qi,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=Io);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?Io:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],zt(i))&&i.push(e[r]);return i}(function(t,e){return Io(t[0],e[0])}):a),t.categories=i[0]):h&&(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===Y?r="field":r+="Field",!T(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,[ar,"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)},L.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},L.prototype.updateMouseMoveHandler=function(){var t;Dt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&Mt(this.element,((t={}).mousemove=this._mousemove,t))},L.prototype.applyOptions=function(t,e){wl(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,Dt(this.element,((t={}).contextmenu=this._clickHandler,t[fr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Dt(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={}),gl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new no(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(),Ht.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function ml(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function xl(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 _l(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 bl=["data","categories"];function wl(t,e){for(var o in e){var i,r,n;!u(o,bl)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],T(r))&&((n=null===i)||!T(i)?(delete t[o],n&&delete e[o]):r&&st(i)&&st(r)&&wl(r,i))}}function Cl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}i(c,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:nr,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 Sl,kl=c,Al=((Sl=wh)&&(Tl.__proto__=Sl),((Tl.prototype=Object.create(Sl&&Sl.prototype)).constructor=Tl).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 B(this.plotArea.box.x2,e.center().y):new B(e.center().x,-2),align:i}},Tl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Tl),Pl=[rr,"bullet"];function Tl(){Sl.apply(this,arguments)}function Ml(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 Ol(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Bl(t){return m(t)?[t]:t}(Rl=kl)&&(El.__proto__=Rl),((El.prototype=Object.create(Rl&&Rl.prototype)).constructor=El).prototype._setElementClass=function(t){Q(t,"k-sparkline")},El.prototype._initElement=function(t){Rl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(Rt(t).width)},El.prototype._resize=function(){var t=this.element,e=Ml(t.childNodes);this._initialWidth=Math.floor(Rt(t).width),Ol(t.childNodes,e),Rl.prototype._resize.call(this)},El.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Ml(e.childNodes),i=document.createElement("span"),t=(i.innerHTML=" ",e.appendChild(i),x({width:this._autoWidth,height:Rt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return Rt(e,{width:t.width,height:t.height}),e.removeChild(i),Ol(e.childNodes,o),this.surface&&this.surface.resize(),t},El.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},El.prototype._createPlotArea=function(t){t=Rl.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},El.prototype._calculateWidth=function(t){for(var e=this.options,o=P(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===rr)return 150;if("bullet"===h.type)return 150;if(h.type===ar)return Rt(r).height;var p=a.categoryAxis;p&&(p=p.categoriesCount()*(!a.options.isStacked&&u(h.type,[nr,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,p))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},El.prototype._createSharedTooltip=function(t){return new Al(this._plotArea,t)},El.normalizeOptions=function(t){t=Bl(t);return(t=Z(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:Bl(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Pl)||u(t.seriesDefaults.type,Pl)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Rl,h=El;function El(){Rl.apply(this,arguments)}i(h,{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 Ll,Il=h,zl=((Ll=A.drawing.Animation)&&(jl.__proto__=Ll),((jl.prototype=Object.create(Ll&&Ll.prototype)).constructor=jl).prototype.setup=function(){this._initialOpacity=parseFloat(pt(this.element,"opacity").opacity)},jl.prototype.step=function(t){pt(this.element,{opacity:String(bt(this._initialOpacity,0,t))})},jl.prototype.abort=function(){Ll.prototype.abort.call(this),pt(this.element,{display:"none",opacity:String(this._initialOpacity)})},jl.prototype.cancel=function(){Ll.prototype.abort.call(this),pt(this.element,{opacity:String(this._initialOpacity)})},jl);function jl(){Ll.apply(this,arguments)}function Vl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}(Dl=A.Class)&&(Hl.__proto__=Dl),((Hl.prototype=Object.create(Dl&&Dl.prototype)).constructor=Hl).prototype.createElements=function(){var t=this.element=Vl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Vl("k-tooltip k-chart-tooltip"),o=this.scroll=Vl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},Hl.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Oo(jo(t)+jo(e-t)/2),h=.4*o.width(),p=o.center().x-h,l=(o.center().x-p)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=dt(r),r=(this.clearHideTimeout(),this._visible||(pt(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,pt(s,{left:o.center().x-s.offsetWidth/2,top:o.y1}),pt(s,["marginTop","borderTopWidth","height"]));pt(n,{width:h,left:p+a*l,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),pt(i,{visibility:"visible"})},Hl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Hl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new zl(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},Hl.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 Dl,Lr=Hl;function Hl(t,e,o){Dl.call(this),this.options=x({},this.options,o),this.container=t,this.chartService=e;o=pt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}i(Lr,{format:"{0:d} - {1:d}",hideDelay:500});var Ul=Lr,Fl="_navigator",Nl=Fl;function Gl(){}(ql=A.Class)&&(Zl.__proto__=ql),((Zl.prototype=Object.create(ql&&ql.prototype)).constructor=Zl).prototype.parseDate=function(t){return Fo(this.chart.chartService.intl,t)},Zl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Zl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Zl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Zl.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=(Gl.prototype=o,new Gl);0!==o.categoriesCount()&&(this.clean(),h.box=o.box,this.selection=new vh(t,h,{min:r,max:i,from:s||r,to:a||i,mousewheel:O(n,{zoom:"left"}),visible:e.visible},new Ct(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new Ul(t.element,t.chartService,{min:r,max:i,template:dt(e.hint),format:e.hint.format}))},Zl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Nl].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()},Zl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(zt(e.panes),t)},Zl.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)},Zl.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?jo(t.to)-jo(t.from):jo(o.options.to)-jo(o.options.from),r=Oo(_(jo(e.min),n.min,jo(n.max)-i)),t=Oo(_(jo(r)+i,jo(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))},Zl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Zl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},Zl.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!==Fl&&(n.min=o,n.max=i)}},Zl.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 ti(x({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=Ro(e.min,-e.baseUnitStep,e.baseUnit),t.to=Ro(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},Zl.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))},Zl.prototype._zoomEnd=function(t){this._dragEnd(t)},Zl.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},Zl.prototype._selectStart=function(t){return this.chart._selectStart(t)},Zl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Zl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Zl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Nl]},Zl.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}},Zl.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:Fl}),o.visible||(r.visible=!1,r.height=.1),i.push(r),Zl.attachAxes(t,o),Zl.attachSeries(t,o,e))},Zl.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=0===Os(o,pr).length,o=x({type:"date",pane:Fl,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:Nl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},o,r,{name:Nl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},o,r,{name:Nl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Nl,pane:Fl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Zl.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:Nl,categoryAxis:Nl,autoBind:e.autoBindElements}))};var Wl,ql,Xl=Zl,d=((Wl=kl)&&(Yl.__proto__=Wl),((Yl.prototype=Object.create(Wl&&Wl.prototype)).constructor=Yl).prototype.applyDefaults=function(t,e){var o=Rt(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);Xl.setup(t,e),Wl.prototype.applyDefaults.call(this,t,e)},Yl.prototype._setElementClass=function(t){Q(t,"k-chart k-stockchart")},Yl.prototype.setOptions=function(t){this.destroyNavigator(),Wl.prototype.setOptions.call(this,t)},Yl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Yl.prototype._resize=function(){this.noTransitionsRedraw()},Yl.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Yl.prototype._dirty=function(){var t=this.options,t=vt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Yl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Xl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Wl.prototype._redraw.call(this),t.initSelection()},Yl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Fl?this._unsetActivePoint():Wl.prototype._trackSharedTooltip.call(this,t)},Yl.prototype.bindCategories=function(){Wl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Yl.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Nl?t=i.categories:t&&i.pane===Fl&&(i.categories=t)}},Yl.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Yl.prototype.destroy=function(){this.destroyNavigator(),Wl.prototype.destroy.call(this)},Yl.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Wl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Fl},Yl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Yl);function Yl(){Wl.apply(this,arguments)}function Zl(t){ql.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)),T(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Ct(this,((o={})[lr]="_drag",o[cr]="_dragEnd",o[ur]="_zoom",o[dr]="_zoomEnd",o)),t.addObserver(this.chartObserver)}i(d,{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 Ql=d,Kl=Math.PI/180;function $l(t,e){var o=t.getOrigin(),i=t.getSize(),e=P(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 Jl=A.drawing.Group,tc=A.drawing.Path,ec=A.drawing.Text;function oc(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=tc.fromRect(new A.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new ec(t.text,new A.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=$l(t.bbox().clone(),e.padding),e=tc.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 Jl;return i.append(o),i.append(e),i.append(t),i}function ic(t,e,o){var i=T(t.from)?t.from:W,r=T(t.to)?t.to:G;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function rc(t,e){e=P(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,$l(t,e)}var nc,sc=A.drawing.Path,ac=A.drawing.Surface,yl=((nc=A.Class)&&(hc.__proto__=nc),((hc.prototype=Object.create(nc&&nc.prototype)).constructor=hc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},hc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},hc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},hc.prototype.exportVisual=function(){return this._visuals},hc.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(Z(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},hc.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]},hc.prototype.resize=function(){this.noTransitionsRedraw()},hc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},hc.prototype.redraw=function(){var t=this._surfaceSize(),t=new A.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),rc(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},hc.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},hc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},hc.prototype.setIntlService=function(t){this.contextService.intl=t},hc.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(Z(o)){for(var i=[],r=0;r<o.length;r++)i.push(x({},e.pointer,o[r]));t.pointer=i}},hc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new A.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=rc(e,o.width)),sc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},hc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Rt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=ac.create(o,{type:t.renderAs}))},hc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},hc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},hc.prototype.getSize=function(){return this._getSize()},hc.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}},hc.prototype._defaultSize=function(){return{width:200,height:200}},hc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},hc);function hc(t,e,o,i){void 0===i&&(i={}),nc.call(this),this.element=t,this.theme=o,this.contextService=new no(this,i),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(o),this.redraw()}i(yl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var pc=yl,lc=A.drawing.Path,cc=A.drawing.Group,uc=A.geometry.Point;function dc(t,e,o,i){var r,n,s,a,h,p,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,p=h=a=s=void 0,a=(r=o).position,h=o.tickX,p=o.tickY,r=o.vertical?(s=new uc(h,a),new uc(h+n.size,a)):(s=new uc(a,p),new uc(a,p+n.size)),new lc({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(fc=pi)&&(gc.__proto__=fc),((gc.prototype=Object.create(fc&&fc.prototype)).constructor=gc).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||te(t.min,t.max),t},gc.prototype.initFields=function(){},gc.prototype.render=function(){var t=this.elements=new cc,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},gc.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 cc,a=n.length,h=t.rangeSize||t.minorTicks.size/2,p=0;p<a;p++){var l=ic(n[p],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(lc.fromRect(new A.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},gc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new cc,i=0;i<t.length;i++)o.append(oc(t[i],e.labels));return o},gc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new cc;return 0<t.width&&t.visible&&((t=new lc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},gc.prototype.renderTicks=function(){var t=new cc,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return dc(t,this.getMajorTickPositions(),i,e.majorTicks),dc(t,this.getMinorTickPositions(),i,x({},{skipUnit:o/e.minorUnit},e.minorTicks)),t};var fc,o=gc;function gc(t,e){t=t||{};!T(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),fc.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:D,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:D,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var yc,vc=o,f=((yc=A.Class)&&(mc.__proto__=yc),((mc.prototype=Object.create(yc&&yc.prototype)).constructor=mc).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=T(e._oldValue)?e.value:i,e.value=_(t,i,o),this.elements&&this.repaint()},mc);function mc(t,e){yc.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,T(e.value)?e.value=_(e.value,i,o):e.value=i}i(f,{color:D});var xc,c=f,h=((xc=c)&&(_c.__proto__=xc),((_c.prototype=Object.create(xc&&xc.prototype)).constructor=_c).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=P(i.margin),p=n?p[s?"left":"right"]:p[s?"bottom":"top"],p=s?-p:p;n?(o=new R(r.x1+p,r.y1,r.x1+p,r.y2),s?o.x1-=a:o.x2+=a,"barPointer"!==i.shape&&(t=e=new R(r.x2+p,r.y1-h,r.x2+p,r.y2+h))):(o=new R(r.x1,r.y1-p,r.x2,r.y1-p),s?o.y2+=a:o.y1-=a,"barPointer"!==i.shape&&(t=e=new R(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)},_c.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:T(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},_c.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=P(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},_c);function _c(t,e){xc.call(this,t,e),this.options=x({track:{visible:T(e.track)}},this.options)}i(h,{shape:"barPointer",track:{border:{width:1}},color:D,border:{width:1},opacity:1,margin:P(3),animation:{type:"barPointer"},visible:!0});var bc,wc=h,Lr=((bc=A.drawing.Animation)&&(Cc.__proto__=bc),((Cc.prototype=Object.create(bc&&bc.prototype)).constructor=Cc).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 A.geometry.Point(o.x1,o.y1)),n=this.toScale=new A.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Cc.prototype.step=function(t){var e=bt(this.fromScale.x,this.toScale.x,t),t=bt(this.fromScale.y,this.toScale.y,t);this.element.transform(A.geometry.transform().translate(e,t))},Cc);function Cc(){bc.apply(this,arguments)}i(Lr,{easing:"linear",duration:250}),A.drawing.AnimationFactory.current.register("arrowPointer",Lr);var Sc,kc,Ac=Lr,Pc=A.geometry.Point,Tc=A.drawing.Path,Mc=((kc=wc)&&(Bc.__proto__=kc),((Bc.prototype=Object.create(kc&&kc.prototype)).constructor=Bc).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 Pc(0,0-o),new Pc(0-i*e,0),new Pc(0,0+o)]:[new Pc(0-o,0),new Pc(0,0+i*e),new Pc(0+o,0)]},Bc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ac(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()},Bc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type="arrowPointer",new Tc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(A.geometry.transform().translate(i.x1,i.y1)),this.elements=o},Bc),d=((Sc=A.drawing.Animation)&&(Oc.__proto__=Sc),((Oc.prototype=Object.create(Sc&&Sc.prototype)).constructor=Oc).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)},Oc.prototype.step=function(t){t=bt(this.from,this.to,t);this._set(t)},Oc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Oc);function Oc(){Sc.apply(this,arguments)}function Bc(t,e){kc.call(this,t,e),T(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}i(d,{easing:"linear",speed:250}),A.drawing.AnimationFactory.current.register("barPointer",d);var Rc,Ec,Lc=d,Ic=A.drawing.Group,zc=A.drawing.Path,jc=((Ec=wc)&&(Hc.__proto__=Ec),((Hc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Hc).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 A.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new A.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]},Hc.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 Lc(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()},Hc.prototype.render=function(){var t=new Ic,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new zc({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},Hc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new zc.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},Hc),Vc=A.drawing.Group,yl=((Rc=pc)&&(Dc.__proto__=Rc),((Dc.prototype=Object.create(Rc&&Rc.prototype)).constructor=Dc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new R(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()},Dc.prototype._buildVisual=function(){var t=new Vc,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},Dc.prototype._createModel=function(){var t=this.options,e=this.scale=new vc(t.scale,this.contextService);this.pointers=[];for(var o=Z(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=x({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Mc:jc;this.pointers.push(new n(e,r))}},Dc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Dc.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 R(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new R(t.x1,r.y-e,t.x2,r.y+e))},Dc.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 R(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new R(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Dc.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))},Dc.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)},Dc);function Dc(){Rc.apply(this,arguments)}function Hc(t,e){Ec.call(this,t,e),T(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}i(yl,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Uc=yl,Fc=A.drawing.Arc,Nc=A.drawing.Path,Gc=A.drawing.Group;function Wc(t,e,o,i){var r=new Gc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),p=new A.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Nc({stroke:{color:i.color,width:i.width}}).moveTo(h).lineTo(p))}return r}function qc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}(Xc=pi)&&(Yc.__proto__=Xc),((Yc.prototype=Object.create(Xc&&Xc.prototype)).constructor=Yc).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||te(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Yc.prototype.initFields=function(){},Yc.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()},Yc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!T(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Yc.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},Yc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Yc.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},Yc.prototype.labelsCount=function(){var t=Xc.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Yc.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 Gc,s=.05*o,a=(T(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),h="inside"===a.position,p=T(this.labelElements);h&&(o-=this.ticksSize(),this.hasRanges()&&!p&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,r=P(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)*Kl,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(h?1:-1),m=m.y+Math.sin(x)*(v+d)*(h?1:-1),x=(g.reflow(new R(_-y,m-v,_+y,m+v)),new A.geometry.Point(g.box.x1,g.box.y1)),_=void 0;p?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||A.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=oc(g,t.labels),n.append(_)),this.bbox=A.geometry.Rect.union(this.bbox,_.bbox())}return n},Yc.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=A.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Yc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Gc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var h=t[a],p=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-p!=0&&o.append(this.createRange(p,l,s,h))}}return o},Yc.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new A.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Fc(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Yc.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(qc(r,n,s));for(var a=0;a<o;a++)for(var h=ic(e[a],r,n),p=i.length,l=0;l<p;l++){var c=i[l];if(c.from<=h.from&&h.from<=c.to){i.push(qc(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&i.push(qc(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return i},Yc.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},Yc.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new A.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Yc.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Wc(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Gc),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=Wc(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Yc.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},Yc.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;i&&(a+=n,h=-h),360<=n&&o.max%e==0&&--s;for(var p=[],l=0;l<s;l++)p.push(M(a,3)),a+=h;return M(a)<=t.endAngle&&p.push(a),p},Yc.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)},Yc.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 A.geometry.transform).translate(p,a))}};var Xc,o=Yc;function Yc(t,e){Xc.call(this,0,1,t,e)}i(o,{min:0,max:100,majorTicks:{size:15,align:"inside",color:D,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:D,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Zc,Qc=o,f=((Zc=A.drawing.Animation)&&(Kc.__proto__=Zc),((Kc.prototype=Object.create(Zc&&Zc.prototype)).constructor=Kc).prototype.step=function(t){var e=this.options,t=bt(e.oldAngle,e.newAngle,t);this.element.transform(A.geometry.transform().rotate(t,e.center))},Kc);function Kc(t,e){Zc.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}i(f,{easing:"linear",duration:150}),A.drawing.AnimationFactory.current.register("radialPointer",f);var $c,Jc=f,tu=A.drawing.Circle,eu=A.drawing.Group,ou=A.drawing.Path,h=(($c=c)&&(iu.__proto__=$c),((iu.prototype=Object.create($c&&$c.prototype)).constructor=iu).prototype.setAngle=function(t){this.elements.transform(A.geometry.transform().rotate(t,this.center))},iu.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 Jc(this.elements,x(e.animation,{oldAngle:o,newAngle:t})).play()},iu.prototype.render=function(){var t=this.scale,e=this.options,o=new eu;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(Kl),o},iu.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=A.geometry.Rect.fromPoints(new A.geometry.Point(e.x-o,e.y-o),new A.geometry.Point(e.x+o,e.y+o))},iu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new ou({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},iu.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new A.geometry.Circle(this.center,this.capSize);return new tu(e,{fill:{color:t},stroke:{color:t}})},iu);function iu(){$c.apply(this,arguments)}i(h,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var ru,nu=h,su=A.drawing.Group,Lr=((ru=pc)&&(au.__proto__=ru),((au.prototype=Object.create(ru&&ru.prototype)).constructor=au).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=A.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},au.prototype._buildVisual=function(t,e,o){var i=this._visuals=new su;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},au.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)}},au.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=M(a,3),p=M(-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:M((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)},au.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=A.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},au.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},au.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=A.geometry.Rect.union(r.bbox,n[s].bbox)},au.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Qc(t.scale,this.contextService);this.pointers=[];for(var i=Z(e)?e:[e],r=0;r<i.length;r++){var n=new nu(o,x({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},au);function au(){ru.apply(this,arguments)}i(Lr,{transitions:!0,gaugeArea:{background:""}});var hu,pu=Lr,d=((hu=Qc)&&(lu.__proto__=hu),((lu.prototype=Object.create(hu&&hu.prototype)).constructor=lu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},lu.prototype.hasRanges=function(){return!0},lu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},lu.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},lu);function lu(){hu.apply(this,arguments)}i(d,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var cu,uu=d,yl=((cu=A.drawing.Animation)&&(du.__proto__=cu),((du.prototype=Object.create(cu&&cu.prototype)).constructor=du).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=bt(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=M(bt(i.r,r.r,t)),e=M(bt(i.g,r.g,t)),i=M(bt(i.b,r.b,t)),this.element.stroke(new A.Color(o,e,i).toHex()))},du);function du(t,e){cu.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 A.Color(e),this.color=new A.Color(o))}i(yl,{easing:"linear",duration:150}),A.drawing.AnimationFactory.current.register("radialRangePointer",yl);var fu,gu=yl,o=((fu=c)&&(yu.__proto__=fu),((yu.prototype=Object.create(fu&&fu.prototype)).constructor=yu).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 gu(this,x(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},yu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},yu.prototype.stroke=function(t){this.elements.stroke(t)},yu.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}))},yu.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],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},yu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},yu);function yu(){fu.apply(this,arguments)}i(o,{animation:{type:"radialRangePointer",duration:150}});var vu,mu,xu,_u=o,bu=((xu=pu)&&(ku.__proto__=xu),((ku.prototype=Object.create(xu&&xu.prototype)).constructor=ku).prototype._initTheme=function(t){xu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},ku.prototype._createModel=function(){var t=this.options,e=this.scale=new uu(t.scale,this.contextService),e=new _u(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},ku.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},ku.prototype._setValueOptions=function(t){this.options.value=t},ku.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},ku.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}},ku),wu=((mu=bu)&&(Su.__proto__=mu),((Su.prototype=Object.create(mu&&mu.prototype)).constructor=Su).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,mu.prototype._createModel.call(this)},Su),f=((vu=A.Class)&&(Cu.__proto__=vu),((Cu.prototype=Object.create(vu&&vu.prototype)).constructor=Cu).prototype.initProperties=function(){},Cu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},Cu.prototype.encode=function(t,e,o){t=T(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}},Cu.prototype.initValue=function(){},Cu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},Cu.prototype.addData=function(){},Cu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},Cu);function Cu(t){vu.call(this),this.setOptions(t),this.initProperties()}function Su(){mu.apply(this,arguments)}function ku(){xu.apply(this,arguments)}i(f,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Au,Pu=Object.assign,h=((Au=f)&&(Tu.__proto__=Au),((Tu.prototype=Object.create(Au&&Au.prototype)).constructor=Tu).prototype.initProperties=function(){Au.prototype.initProperties.call(this),Pu(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"})},Tu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Tu.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()},Tu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Tu.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]))},Tu.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},Tu.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Tu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Tu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Tu.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},Tu);function Tu(){Au.apply(this,arguments)}i(h,{addCheckSum:!0});var Mu,Ou,Bu=Object.assign,Lr=((Ou=f)&&(Eu.__proto__=Ou),((Eu.prototype=Object.create(Ou&&Ou.prototype)).constructor=Eu).prototype.initProperties=function(){Ou.prototype.initProperties.call(this),Bu(this,{minBaseUnitLength:.7})},Eu.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()},Eu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Eu.prototype.addBase=function(){},Eu),d=((Mu=Lr)&&(Ru.__proto__=Mu),((Ru.prototype=Object.create(Mu&&Mu.prototype)).constructor=Ru).prototype.initProperties=function(){Mu.prototype.initProperties.call(this),Bu(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"}}})},Ru.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Ru.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))},Ru.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Ru.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Ru.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Ru.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Ru.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Ru.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Ru.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Ru);function Ru(){Mu.apply(this,arguments)}function Eu(){Ou.apply(this,arguments)}i(d,{addCheckSum:!1});var Lu,Iu,zu,ju,Vu,Du,Hu,Uu,Fu,Nu,Gu,Wu={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"]},yl=((Du=d)&&(sd.__proto__=Du),((sd.prototype=Object.create(Du&&Du.prototype)).constructor=sd).prototype.initProperties=function(){Du.prototype.initProperties.call(this),x(this,Wu,{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}}})},sd),qu=Object.assign,c=((Vu=Lr)&&(nd.__proto__=Vu),((nd.prototype=Object.create(Vu&&Vu.prototype)).constructor=nd).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),qu(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"}})},nd.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},nd.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.")},nd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},nd.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},nd.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},nd.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},nd.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)},nd.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]},nd.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},nd.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},nd.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},nd),o=((ju=c)&&(rd.__proto__=ju),((rd.prototype=Object.create(ju&&ju.prototype)).constructor=rd).prototype.initProperties=function(){ju.prototype.initProperties.call(this),x(this,Wu,{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))}})},rd),Xu=/^\d+$/,Yu=Object.assign,Lr=((zu=f)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.prototype.initProperties.call(this),Yu(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},id.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()},id.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()},id.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},id.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},id.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},id.prototype.validate=function(t){if(Xu.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(",")+".")},id.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)},id),Zu=/^\d+$/,Qu=/^[a-z0-9]+$/i,Ku=Object.assign,$u=((Iu=A.Class)&&(od.__proto__=Iu),((od.prototype=Object.create(Iu&&Iu.prototype)).constructor=od).prototype.initProperties=function(){},od.prototype.addStart=function(){},od.prototype.is=function(){},od.prototype.isCode=function(){return!1},od.prototype.move=function(){},od.prototype.pushState=function(){},od),Ju=((Lu=$u)&&(ed.__proto__=Lu),((ed.prototype=Object.create(Lu&&Lu.prototype)).constructor=ed).prototype.initProperties=function(){Lu.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},ed.prototype.addStart=function(){this.encoding.addPattern(this.START)},ed.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},ed.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},ed.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++},ed.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)},ed.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},ed.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},ed.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},ed),td={};function ed(t,e){Lu.call(this,t),this.states=e,this._initMoves(e)}function od(t){Iu.call(this),this.encoding=t,this.initProperties()}function id(){zu.apply(this,arguments)}function rd(){ju.apply(this,arguments)}function nd(){Vu.apply(this,arguments)}function sd(){Du.apply(this,arguments)}function ad(t,e){Hu.call(this,t),this.states=e}function hd(t,e){Uu.call(this,t),this._initSubStates(e)}function pd(){Fu.apply(this,arguments)}function ld(){Nu.apply(this,arguments)}function cd(){Gu.apply(this,arguments)}td.A=((Gu=Ju)&&(cd.__proto__=Gu),((cd.prototype=Object.create(Gu&&Gu.prototype)).constructor=cd).prototype.initProperties=function(){Gu.prototype.initProperties.call(this),Ku(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},cd.prototype.isCode=function(t){return 0<=t&&t<96},cd.prototype.getValue=function(t){return t<32?t+64:t-32},cd),td.B=((Nu=Ju)&&(ld.__proto__=Nu),((ld.prototype=Object.create(Nu&&Nu.prototype)).constructor=ld).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),Ku(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},ld.prototype.isCode=function(t){return 32<=t&&t<128},ld.prototype.getValue=function(t){return t-32},ld),td.C=((Fu=$u)&&(pd.__proto__=Fu),((pd.prototype=Object.create(Fu&&Fu.prototype)).constructor=pd).prototype.initProperties=function(){Fu.prototype.initProperties.call(this),Ku(this,{key:"C",MOVE:99,START:105})},pd.prototype.addStart=function(){this.encoding.addPattern(this.START)},pd.prototype.is=function(t,e){var o=Pd(t,e,4);return(e+4<=t.length||2===t.length)&&Zu.test(o)},pd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},pd.prototype.pushState=function(t){for(var e;(e=Pd(t.value,t.index,2))&&Zu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},pd.prototype.getValue=function(t){return t},pd),td.FNC4=((Uu=$u)&&(hd.__proto__=Uu),((hd.prototype=Object.create(Uu&&Uu.prototype)).constructor=hd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),Ku(this,{key:"FNC4",dependentStates:["A","B"]})},hd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},hd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},hd.prototype.isCode=function(t){return 128<=t&&t<256},hd.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},hd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},hd.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},hd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},hd.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]},hd.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},hd),td.FNC1=((Hu=$u)&&(ad.__proto__=Hu),((ad.prototype=Object.create(Hu&&Hu.prototype)).constructor=ad).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Ku(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})},ad.prototype.addStart=function(){this.encoding[this.startState].addStart()},ad.prototype.is=function(){return u(this.key,this.states)},ad.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},ad.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!Zu.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Qu.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.")},ad.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Pd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},ad.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},ad.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}},ad.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}},ad);(vd=f)&&(Ad.__proto__=vd),((Ad.prototype=Object.create(vd&&vd.prototype)).constructor=Ad).prototype.initProperties=function(){vd.prototype.initProperties.call(this),Ku(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})},Ad.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new td[this.states[t]](this,this.states)},Ad.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},Ad.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())},Ad.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))}},Ad.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Ad.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Ad.prototype.addStop=function(){this.addPattern(this.STOP)},Ad.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Ad.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++},Ad.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 ud,dd,fd,gd,yd,vd,Ju=Ad,$u=((yd=Ju)&&(kd.__proto__=yd),((kd.prototype=Object.create(yd&&yd.prototype)).constructor=kd).prototype.initProperties=function(){yd.prototype.initProperties.call(this),Ku(this,{name:"Code 128 A",states:["A"]})},kd),md=((gd=Ju)&&(Sd.__proto__=gd),((Sd.prototype=Object.create(gd&&gd.prototype)).constructor=Sd).prototype.initProperties=function(){gd.prototype.initProperties.call(this),Ku(this,{name:"Code 128 B",states:["B"]})},Sd),xd=((fd=Ju)&&(Cd.__proto__=fd),((Cd.prototype=Object.create(fd&&fd.prototype)).constructor=Cd).prototype.initProperties=function(){fd.prototype.initProperties.call(this),Ku(this,{name:"Code 128 C",states:["C"]})},Cd),_d=((dd=Ju)&&(wd.__proto__=dd),((wd.prototype=Object.create(dd&&dd.prototype)).constructor=wd).prototype.initProperties=function(){dd.prototype.initProperties.call(this),Ku(this,{name:"Code 128",states:["C","B","A","FNC4"]})},wd),Ju=((ud=Ju)&&(bd.__proto__=ud),((bd.prototype=Object.create(ud&&ud.prototype)).constructor=bd).prototype.initProperties=function(){ud.prototype.initProperties.call(this),Ku(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},bd);function bd(){ud.apply(this,arguments)}function wd(){dd.apply(this,arguments)}function Cd(){fd.apply(this,arguments)}function Sd(){gd.apply(this,arguments)}function kd(){yd.apply(this,arguments)}function Ad(t){vd.call(this,t),this._initStates()}function Pd(t,e,o){return t.substring(e,e+o)}var Td,Md,Od,Bd,Rd,Ed,Ld,Id=Object.assign,zd=((Ld=f)&&(Kd.__proto__=Ld),((Kd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Kd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),Id(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Hd})},Kd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Kd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Kd.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()},Kd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Kd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Kd.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]])},Kd),jd=((Ed=zd)&&(Qd.__proto__=Ed),((Qd.prototype=Object.create(Ed&&Ed.prototype)).constructor=Qd).prototype.initProperties=function(){Ed.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Qd),Vd=((Rd=zd)&&(Zd.__proto__=Rd),((Zd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Zd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Zd),Dd=((Bd=zd)&&(Yd.__proto__=Bd),((Yd.prototype=Object.create(Bd&&Bd.prototype)).constructor=Yd).prototype.initProperties=function(){Bd.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Yd),zd=((Od=zd)&&(Xd.__proto__=Od),((Xd.prototype=Object.create(Od&&Od.prototype)).constructor=Xd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Xd),Hd={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Ud=Object.assign,f=((Md=f)&&(qd.__proto__=Md),((qd.prototype=Object.create(Md&&Md.prototype)).constructor=qd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),Ud(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},qd.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},qd.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)},qd.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)},qd.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])},qd.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},qd),Fd=Object.assign,Nd=((Td=f)&&(Wd.__proto__=Td),((Wd.prototype=Object.create(Td&&Td.prototype)).constructor=Wd).prototype.initProperties=function(){Td.prototype.initProperties.call(this),Fd(this,{name:"EAN 8"})},Wd.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)},Wd),Gd={code11:h,code39:d,code39extended:yl,code93:c,code93extended:o,code128:_d,code128a:$u,code128b:md,code128c:xd};function Wd(){Td.apply(this,arguments)}function qd(){Md.apply(this,arguments)}function Xd(){Od.apply(this,arguments)}function Yd(){Bd.apply(this,arguments)}function Zd(){Rd.apply(this,arguments)}function Qd(){Ed.apply(this,arguments)}function Kd(){Ld.apply(this,arguments)}function $d(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}Gd["gs1-128"]=Ju,Gd.msimod10=jd,Gd.msimod11=Vd,Gd.msimod1010=Dd,Gd.msimod1110=zd,Gd.postnet=Lr,Gd.ean8=Nd,Gd.ean13=f;(Jd=A.Class)&&(tf.__proto__=Jd),((tf.prototype=Object.create(Jd&&Jd.prototype)).constructor=tf).prototype.destroy=function(){this._destroySurface()},tf.prototype._initElement=function(){Q(this.element,"k-barcode")},tf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},tf.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},tf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},tf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},tf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},tf.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},tf.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)},tf.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},tf.prototype._resize=function(){this.redraw()},tf.prototype.createVisual=function(){this.visual=this._render()},tf.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=P(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new R(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),p=new A.drawing.Group;this.contentBox=s,p.append(this._getBackground(n)),i.visible&&(h-=A.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&&T(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},tf.prototype.exportVisual=function(){return this._render()},tf.prototype._getSize=function(){var t=$d(this.element,this.options.renderAs),e=new A.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},tf.prototype.value=function(t){if(!T(t))return this.options.value;this.options.value=String(t),this.redraw()},tf.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new A.drawing.Group,n=0;n<t.length;n++){var s,a=(s=st(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=A.geometry.Rect.fromPoints(new A.geometry.Point(i,s.y1+o.y1),new A.geometry.Point(i+a,s.y2+o.y1)),s=A.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},tf.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new R(0,0,t.width,t.height).unpad(o.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},tf.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new De(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},tf.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),!Gd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Gd[this.type],this.options=x({},this.options,t)};var Jd,h=tf;function tf(t,e,o){void 0===o&&(o=$t),Jd.call(this),this.options=x({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&T(e.value)&&this.redraw()}i(h,{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 ef(t,e){if(void 0===e&&(e=rf),!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"),Gd[n])return n=new Gd[n],o=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 of=h,rf={width:500,height:100},nf=Object.assign;function sf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function af(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function hf(t){return parseInt(t,2)}(gf=A.Class)&&(Af.__proto__=gf),((Af.prototype=Object.create(gf&&gf.prototype)).constructor=Af).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Af.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}},Af.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var pf,lf,cf,uf,df,ff,gf,yf=Af,vf=((ff=A.Class)&&(kf.__proto__=ff),(kf.prototype=Object.create(ff&&ff.prototype)).constructor=kf),mf=((df=A.Class)&&(Sf.__proto__=df),((Sf.prototype=Object.create(df&&df.prototype)).constructor=Sf).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(ig(i,qf,Xf,Yf,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=ig(i,Zf,Qf,Kf,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=rg(function(t){for(var e=0,o=0;o<t.length;o++)e+=xf[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+=xf[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new vf(e,t)},Sf),d=((uf=A.Class)&&(Cf.__proto__=uf),((Cf.prototype=Object.create(uf&&uf.prototype)).constructor=Cf).prototype.initProperties=function(){nf(this,{modeIndicator:"",bitsInCharacterCount:[]})},Cf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},Cf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},Cf.prototype.getModeCountString=function(t,e){return this.modeIndicator+af(t,this.getBitsCharacterCount(e))},Cf.prototype.encode=function(){},Cf.prototype.getStringBitsLength=function(){},Cf.prototype.getValue=function(){},Cf),yl=((cf=d)&&(wf.__proto__=cf),((wf.prototype=Object.create(cf&&cf.prototype)).constructor=wf).prototype.initProperties=function(){cf.prototype.initProperties.call(this),nf(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},wf.prototype.getValue=function(t){return parseInt(t,10)},wf.prototype.encode=function(t,e){for(var o=sf(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=af(o[r],10);return i+af(o[r],1+3*o[r].length)},wf.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)},wf),c=((lf=d)&&(bf.__proto__=lf),((bf.prototype=Object.create(lf&&lf.prototype)).constructor=bf).prototype.initProperties=function(){lf.prototype.initProperties.call(this),nf(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"})},bf.prototype.getValue=function(t){return this.characters[t]},bf.prototype.encode=function(t,e){for(var o=sf(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=af(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+af(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)},bf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},bf),o=((pf=d)&&(_f.__proto__=pf),((_f.prototype=Object.create(pf&&pf.prototype)).constructor=_f).prototype.initProperties=function(){pf.prototype.initProperties.call(this),nf(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},_f.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+'".')},_f.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=af(this.getValue(t.charAt(i)),8);return o},_f.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},_f),xf={};function _f(){pf.apply(this,arguments)}function bf(){lf.apply(this,arguments)}function wf(){cf.apply(this,arguments)}function Cf(){uf.call(this),this.initProperties()}function Sf(){df.apply(this,arguments)}function kf(t,e){ff.call(this),this.dataString=t,this.version=e}function Af(t){gf.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}xf.numeric=new yl,xf.alphanumeric=new c,xf.byte=new o;(Pf=A.Class)&&(Jf.__proto__=Pf),((Jf.prototype=Object.create(Pf&&Pf.prototype)).constructor=Jf).prototype.initProperties=function(){nf(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Jf.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=rg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new vf(t,e)},Jf.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Jf.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Jf.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=af(t,8);else{for(var e=8-e,r=0;r<o;r++)i=af(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Jf.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var Pf,Tf=Jf,Mf=[{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}}],Of="numeric",Bf="alphanumeric",Rf="byte",Ef={1:0},Lf={0:1},If={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},zf=[1,0,1,1,1],jf=[1,0,1],Vf={L:"01",M:"00",Q:"11",H:"10"},Df=["11101100","00010001"],Hf=93,Uf=[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}],Ff=/^\d+/,Nf=new RegExp("^[A-Z $%*+./:-]+"),Gf=new RegExp("^[A-Z0-9 $%*+./:-]+"),Wf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),qf=8,Xf=5,Yf=8,Zf=17,Qf=9,Kf=16,$f=[[1,0],[1,25,0]];function Jf(){Pf.call(this),this.initProperties(),this.mode=xf[this.encodingMode]}function tg(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function eg(t,e,o,i){for(var r=0;r<Uf.length;r++)t[r][o][i]=Uf[r](o,i)?1^e:parseInt(e,10)}function og(t,e){for(var o,i=$f[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]=Lf[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Ef[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]=af(r[h],8);return a}function ig(t,e,o,i,r){var n,s=Ff.exec(t),s=s?s[0]:"",a=Nf.exec(t),a=a?a[0]:"",h=Gf.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Gf.test(t.charAt(s.length)))?(n=Of,s):h&&(t.length===h.length||h.length>=i||r===Bf)?(n=Bf,s||a):(n=Rf,h?h+Wf.exec(t.substring(h.length))[0]:Wf.exec(t)[0]);return{mode:n,modeString:e}}function rg(t,e){for(var o=0,i=Mf.length-1,r=Math.floor(Mf.length/2);t<Mf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Mf[o][e].totalDataCodewords?r+1:i+1}function ng(t,e,o){var i=hf(e),e=e.length-1,r=t<<e,t=af(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+af(o,e)}function sg(t,e){return parseInt(t.charAt(e),10)}function ag(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&tg(t,sg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&tg(t,sg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)tg(t,sg(e,r-1-i++),n,s);for(tg(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)tg(t,sg(e,r-1-i++),n,s)}function hg(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,tg(t,r=sg(e,e.length-h-1),0+o,s+i),tg(t,r,a+i,0+o)}function pg(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++)tg(t,r=e[a],o+h,i+a),tg(t,r,o+a,i+h),tg(t,r,o+s-h,i+s-a),tg(t,r,o+s-a,i+s-h)}function lg(t,e,o,i){for(var r=o,n=i,s=t[0];tg(t,0,r,i),tg(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function cg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===Hf&&(o[t]+=40)}function ug(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 dg(t,e,o){var o=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?Tf:mf)).getEncodingResult(t,e),r=o.version,n=Mf[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 h=s[a][0],p=0;p<h;p++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=hf(o),i+=8;r.push(c),n.push(og(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+=Df[i],i^=1;return r}(o.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Uf.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,pg(s,zf,0,0),lg(s,[-1,-1],7,7),pg(s,zf,l-7,0),lg(s,[1,-1],l-8,7),pg(s,zf,0,l-7),lg(s,[-1,1],7,l-8),o),s=r;if(!(s<2)){var a,h=i[0],p=h.length,l=Math.floor(s/7),c=[6],u=0;for((s=If[s])?a=(p-13-s)/l:s=a=(p-13)/(l+1),c.push(c[u++]+s);c[u]+a<p;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===h[c[d]][c[f]]&&pg(i,jf,c[d]-2,c[f]-2)}for(var g=o,y=1,v=g[0].length,m=8;m<v-8;m++)tg(g,y,6,m),tg(g,y,m,6),y^=1;7<=r&&hg(o,af(0,18)),ag(o,af(0,15));for(var x,_,b,w=o,C=t,S=new yf(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(),eg(w,x[A][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)eg(w,0,b.row,b.column);l=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)s[h]=[r[h]=o[h]=0,0],n[h]=[0,0],i[h]=[];for(var p=0;p<a;p++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[p][l],10),i[c][0]===e[p][l]&&p+1<a&&0<=l-1&&e[p+1][l]===i[c][0]&&e[p+1][l-1]===i[c][0]&&(o[c]+=3),cg(c,n,o,0,e[p][l]),cg(c,n,o,1,e[l][p]),ug(c,o,i,e[p][l],s,0),ug(c,o,i,e[l][p],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<o.length;h++)o[h]+=(d=r[h],f=y,g=void 0,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[h]<v&&(v=o[h],u=h);return u}(o),s=o[l];return 7<=r&&hg([s],ng(r,"1111100100101",18)),ag([s],function(t){var e="";if(0===hf(t))return"101010000010010";for(var o=ng(hf(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(Vf[e]+af(l,3))),s}for(var fg,gg=1;gg<255;gg++)255<(fg=2*Lf[gg-1])&&(fg^=285),Lf[gg]=fg,Ef[fg]=gg;fg=2*Lf[gg-1]^285,Lf[gg]=fg,Lf[-1]=0;for(var yg=2;yg<=68;yg++){var vg=$f[yg-1];$f[yg]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)o[i+r]=void 0===o[i+r]?(t[i]+(0<=e[r]?e[r]:0))%255:Ef[Lf[o[i+r]]^Lf[(t[i]+e[r])%255]];return o}(vg,[yg,0])}var mg,xg=Math.round,_g=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],bg=[[0,1],[1,1],[1,0]],_d=((mg=A.Class)&&(wg.__proto__=mg),((wg.prototype=Object.create(mg&&mg.prototype)).constructor=wg).prototype.destroy=function(){this._destroySurface()},wg.prototype._initElement=function(){Q(this.element,"k-qrcode")},wg.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},wg.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},wg.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},wg.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},wg.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},wg.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},wg.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},wg.prototype._resize=function(){this.redraw()},wg.prototype.createVisual=function(){this.visual=this._render()},wg.prototype.exportVisual=function(){return this._render()},wg.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 A.drawing.Group);try{n&&(o=dg(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},wg.prototype._renderLogo=function(t,e){var t=xg(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 A.geometry.Rect(new A.geometry.Point(t.x,t.y),new A.geometry.Size(e.width,e.height));return new A.drawing.Image(o,t)},wg.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 A.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),bg,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,bg,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,_g,"#fff")),s},wg.prototype._renderShape=function(t,e,o,i){var r=new A.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},wg.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=$d(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},wg.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},wg.prototype._renderMatrix=function(t,e,o){for(var i=new A.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=xg(o+a*e),h=xg(n),p=xg(o+s*e),l=xg(n+e);i.moveTo(a,h).lineTo(a,l).lineTo(p,l).lineTo(p,h).close()}}return i},wg.prototype._renderBackground=function(t,e){t=new R(0,0,t,t).unpad(e.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},wg.prototype.setOptions=function(t){this.options=nf(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},wg.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},wg.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},wg.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},wg.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}},wg);function wg(t,e,o){void 0===o&&(o=$t),mg.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)}i(_d,{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 Cg(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{dg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var Sg=_d,kg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Ag(t){return t*t}var Pg,Tg,Mg=Math,Og=Mg.abs,Bg=Mg.atan,Rg=Mg.atan2,Eg=Mg.cos,Lg=Mg.sin,Ig=Mg.tan,zg=((Tg=A.Class)&&(Qg.__proto__=Tg),((Qg.prototype=Object.create(Tg&&Tg.prototype)).constructor=Qg).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Qg.prototype.toArray=function(){return[this.lat,this.lng]},Qg.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Qg.prototype.clone=function(){return new Qg(this.lat,this.lng)},Qg.prototype.round=function(t){return this.lng=M(this.lng,t),this.lat=M(this.lat,t),this},Qg.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Qg.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Qg.prototype.destination=function(t,e,o){var e=Vt(e),o=o||kg.WGS84,i=Vt(this.lat),r=Vt(this.lng),t=t/o.a,o=Mg.asin(Lg(i)*Eg(t)+Eg(i)*Lg(t)*Eg(e)),r=r+Rg(Lg(e)*Lg(t)*Eg(i),Eg(t)-Lg(i)*Lg(o));return new Qg(Ot(o),Ot(r))},Qg.prototype.greatCircleTo=function(t,e){var o=Qg.create(void 0),e=e||kg.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,h=Vt(o.lng-this.lng),e=Bg((1-a)*Ig(Vt(this.lat))),p=Lg(e),l=Eg(e),e=Bg((1-a)*Ig(Vt(o.lat))),c=Lg(e),u=Eg(e),d=h,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Lg(d),v=Eg(d),m=Mg.sqrt(Ag(u*y)+Ag(l*c-p*u*v)),x=Rg(m,r=p*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(i=1-Ag(_))&&(b=r-2*p*c/i),d),C=a/16*i*(4+a*(4-3*i)),d=h+(1-C)*a*_*(x+C*m*(b+C*r*(2*Ag(b)-1))),g=Og(d-w)<=this.DISTANCE_CONVERGENCE;var o=i*(Ag(n)-Ag(s))/Ag(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*Ag(b)-1)-n/6*b*(4*Ag(m)-3)*(4*Ag(b)-3))),n=Rg(u*y,l*c-p*u*v),S=Rg(l*y,-p*u+l*c*v);return{distance:M(s*e*(x-o),this.DISTANCE_PRECISION),azimuthFrom:Ot(n),azimuthTo:Ot(S)}},Qg.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Qg.fromLngLat=function(t){return new Qg(t[1],t[0])},Qg.fromLatLng=function(t){return new Qg(t[0],t[1])},Qg.create=function(t,e){if(T(t))return t instanceof Qg?t.clone():1===arguments.length&&2===t.length?Qg.fromLatLng(t):new Qg(t,e)},Qg),jg=Math,Vg=jg.atan,Dg=jg.exp,Hg=jg.pow,Ug=jg.sin,Fg=jg.log,Ng=jg.tan,Gg=A.geometry.Point,Wg=jg.PI,qg=Wg/2,Xg=Wg/4,Yg=Wg/180,$u=kg.WGS84,md=((Pg=A.Class)&&(Zg.__proto__=Pg),((Zg.prototype=Object.create(Pg&&Pg.prototype)).constructor=Zg).prototype._initOptions=function(t){this.options=x({},this.options,t)},Zg.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Zg.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=Vt(e-o)*i,e=this._projectLat(r);return new Gg(t,e)},Zg.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=Vt(t),i=Ng(Xg+t/2),t=o*Ug(t),t=Hg((1-t)/(1+t),o/2);return e*Fg(i*t)},Zg.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(Yg*i)+o,o=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=_(i,-this.MAX_LNG,this.MAX_LNG)),new zg(o,i)},Zg.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Dg(-t/o),s=qg-2*Vg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=i*Ug(s),h=Hg((1-h)/(1+h),r),h=qg-2*Vg(n*h)-s;if(s+=h,jg.abs(h)<=this.INVERSE_CONVERGENCE)break}return Ot(s)},Zg);function Zg(t){Pg.call(this),this.initProperties(),this._initOptions(t)}function Qg(t,e){Tg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}i(md,{centralMeridian:0,datum:$u});function Kg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function $g(t,e){e.insertBefore(t,e.firstChild)}function Jg(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function ty(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(iy=md)&&(cy.__proto__=iy),((cy.prototype=Object.create(iy&&iy.prototype)).constructor=cy).prototype.initProperties=function(){iy.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},cy.prototype._projectLat=function(t){var e=this.options.datum.a,t=Vt(t),t=Ng(Xg+t/2);return e*Fg(t)},cy.prototype._inverseY=function(t){var e=this.options.datum.a,t=Dg(-t/e);return Ot(qg-2*Vg(t))};var ey,oy,iy,ry=cy,ny=((oy=A.Class)&&(ly.__proto__=oy),((ly.prototype=Object.create(oy&&oy.prototype)).constructor=ly).prototype.forward=function(t){return new Gg(t.lng,t.lat)},ly.prototype.inverse=function(t){return new zg(t.y,t.x)},(ey=A.Class)&&(py.__proto__=ey),((py.prototype=Object.create(ey&&ey.prototype)).constructor=py).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},py.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},py),sy=(A.Class,A.Class,Object.defineProperty),ay=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),hy=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=uy(o,a,!1),i.browser=uy(t,h,"default"),i.name=uy(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 py(){ey.call(this);var t=this._proj=new ry,t=this.c=2*Wg*t.options.datum.a;this._tm=A.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=A.geometry.transform().scale(t,-t).translate(-.5,-.5)}function ly(){oy.apply(this,arguments)}function cy(){iy.apply(this,arguments)}function uy(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 dy(t,e){return t.bind(e)}function fy(t,e,o,i,r){Ay(t,e,o,i,r)}function gy(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(Z(t=e)?t:(t||"").split(" ")).forEach(function(t){Py(n,t,s,a)})}function yy(t){var e=Sy(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function vy(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function my(){return Number(new Date)}function xy(){}function _y(){this._defaultPrevented=!0}function by(){return!0===this._defaultPrevented}var wy,Cy,Sy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=ky();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},ky=function(){var t=hy(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;var t;if(n.mobileOS.android)return!n.browser.chrome||!(n.browser.version<32||((t=document.querySelector("meta[name=viewport]"))?t.getAttribute("content"):"").match(/user-scalable=no/i))}return!1},n},Ay=function(s,t,a,h,p){(Z(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=h,(e=a)&&it(e)&&!i?n=e:e&&"string"==typeof e&&it(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,sy(t,"currentTarget",{value:e}),sy(t,"delegateTarget",{value:o}),n(t))},Boolean(p))})},Py=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},xd=((Cy=A.Class)&&(Oy.__proto__=Cy),((Oy.prototype=Object.create(Cy&&Cy.prototype)).constructor=Oy).prototype.destroy=function(){this.unbind()},Oy.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]);else 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},Oy.prototype.one=function(t,e){return this.bind(t,e,!0)},Oy.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},Oy.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=_y,n.isDefaultPrevented=by,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},Oy.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},Oy.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)},Oy),Ty=((wy=xd)&&(My.__proto__=wy),((My.prototype=Object.create(wy&&wy.prototype)).constructor=My).prototype._initOptions=function(t){this.options=x({},this.options,t)},My.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},My.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},My.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()},My.prototype.clear=function(){this.items=[],Kg(this.element)},My.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){Kg(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()},My.prototype.hideElement=function(){this.element.style.display="none"},My.prototype.showElement=function(){this.element.style.display=""},My.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},My.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},My.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},My);function My(t,e){wy.call(this),this.element=t,this._initOptions(e),this.items=[],Q(this.element,"k-widget k-attribution")}function Oy(){Cy.call(this),this._events={}}i(Ty,{name:"Attribution",separator:" | "});var By={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function Ry(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+By[t].className+'" aria-label="move '+t+'"><span class="k-icon '+By[t].iconClass+'" /></button>';return ay(t)}(Ey=xd)&&(Iy.__proto__=Ey),((Iy.prototype=Object.create(Ey&&Ey.prototype)).constructor=Iy).prototype.destroy=function(){this.dispose()},Iy.prototype.dispose=function(){gy(this._keyroot,"keydown",this._keydownHandler)},Iy.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)},Iy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Iy.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Iy.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()},Iy.prototype._keydown=function(t){switch(t.which){case Jt.UP:this._pan(0,1),t.preventDefault();break;case Jt.DOWN:this._pan(0,-1),t.preventDefault();break;case Jt.RIGHT:this._pan(1,0),t.preventDefault();break;case Jt.LEFT:this._pan(-1,0),t.preventDefault()}};var Ey,Ly=Iy;function Iy(t,e){Ey.call(this),this.element=t,this._initOptions(e);var t=Ry("up"),e=Ry("right"),o=Ry("down"),i=Ry("left"),t=(this.element.appendChild(t),this.element.appendChild(e),this.element.appendChild(o),this.element.appendChild(i),Q(this.element,"k-widget k-navigator"),fy(this.element,"click",".k-button",dy(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=dy(this._keydown,this),fy(this._keyroot,"keydown",this._keydownHandler)}function zy(t,e){return ay('<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(Ly,{name:"Navigator",panStep:1}),vy(Ly,["pan"]);(jy=xd)&&(Dy.__proto__=jy),((Dy.prototype=Object.create(jy&&jy.prototype)).constructor=Dy).prototype.destroy=function(){this.element&&gy(this.element,"click",this._clickHandler),this._keyroot&&gy(this._keyroot,"keydown",this._keydownHandler)},Dy.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)},Dy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Dy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Dy.prototype._click=function(t){var e=1;mt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Dy.prototype._keydown=function(t){switch(t.which){case Jt.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Jt.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var jy,Vy=Dy;function Dy(t,e){jy.call(this),this.element=t,this._initOptions(e);t=zy("in","k-i-plus"),e=zy("out","k-i-minus"),this.element.appendChild(t),this.element.appendChild(e),Q(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),fy(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),fy(this._keyroot,"keydown",this._keydownHandler)}i(Vy,{name:"ZoomControl",zoomStep:1}),vy(Vy,["change"]);var Hy,Uy,Ju=Math,Fy=Ju.max,Ny=Ju.min,Gy=((Uy=A.Class)&&(Xy.__proto__=Uy),jd={World:{configurable:!0}},((Xy.prototype=Object.create(Uy&&Uy.prototype)).constructor=Xy).prototype.contains=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),r=O(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},Xy.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 zg(e,o)},Xy.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},Xy.prototype.include=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),t=O(t.lat,t[0]);e.lng=Ny(e.lng,i),e.lat=Fy(e.lat,t),o.lng=Fy(o.lng,i),o.lat=Ny(o.lat,t)},Xy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Xy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new zg(t.lat,e.lng),se:this.se,sw:new zg(e.lat,t.lng)}},Xy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new zg(t.lat,e.lng),e,new zg(e.lat,t.lng)]},Xy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Xy.create=function(t,e){return t instanceof Xy?t:t&&e?new Xy(t,e):t&&4===t.length&&!e?new Xy([t[0],t[1]],[t[2],t[3]]):void 0},jd.World.get=function(){return new Xy([90,-180],[-90,180])},Object.defineProperties(Xy,jd),Xy),Wy=((Hy=A.Class)&&(qy.__proto__=Hy),Vd={anchor:{configurable:!0}},((qy.prototype=Object.create(Hy&&Hy.prototype)).constructor=qy).prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},qy.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},Vd.anchor.get=function(){return this._anchor},Vd.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},qy.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(qy.prototype,Vd),qy);function qy(t,e){Hy.call(this),this.widgetService=t,this.options=x({},this.options,e),this.offset={x:0,y:0}}function Xy(t,e){Uy.call(this);t=zg.create(t),e=zg.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)}i(Wy,{border:{width:1},opacity:1});(Yy=A.Class)&&(Ky.__proto__=Yy),((Ky.prototype=Object.create(Yy&&Yy.prototype)).constructor=Ky).prototype.destroy=function(){this._deactivate()},Ky.prototype._initOptions=function(t){this.options=x({},this.options,t)},Ky.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Ky.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Ky.prototype.reset=function(){this._beforeReset(),this._reset()},Ky.prototype._reset=function(){this._applyExtent()},Ky.prototype._beforeReset=function(){},Ky.prototype._resize=function(){},Ky.prototype._panEnd=function(){this._applyExtent()},Ky.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!T(t.minZoom)||e>=t.minZoom,e=!T(t.maxZoom)||e<=t.maxZoom,t=Gy.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Ky.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Ky.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)},Ky.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)},Ky.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Ky.prototype._readData=function(){return this.options.data||[]},Ky.prototype._hasData=function(){return this._data&&0<this._data.length},Ky.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Yy,Dd=Ky,Zy=Math,Qy=A.geometry.Point;function Ky(t,e){Yy.call(this),this.support=ky(),this._initOptions(e),this.map=t;e=document.createElement("div");Q(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 $y(t){return it(t)?t:ut.compile(t)}function Jy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(tv=Dd)&&(ev.__proto__=tv),((ev.prototype=Object.create(tv&&tv.prototype)).constructor=ev).prototype.destroy=function(){tv.prototype.destroy.call(this),this._view.destroy(),this._view=null},ev.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},ev.prototype._reset=function(){tv.prototype._reset.call(this),this._updateView(),this._view.reset()},ev.prototype._viewType=function(){return rv},ev.prototype._activate=function(){tv.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=Object(A.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},ev.prototype._deactivate=function(){tv.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},ev.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())},ev.prototype._resize=function(){this._render()},ev.prototype._panEnd=function(t){tv.prototype._panEnd.call(this,t),this._render()},ev.prototype._render=function(){this._updateView(),this._view.render()};var tv,zd=ev;function ev(t,e){tv.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(zd,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(iv=A.Class)&&(av.__proto__=iv),((av.prototype=Object.create(iv&&iv.prototype)).constructor=av).prototype._initOptions=function(t){this.options=x({},this.options,t)},av.prototype.center=function(t){this._center=t},av.prototype.extent=function(t){this._extent=t},av.prototype.viewOrigin=function(t){this._viewOrigin=t},av.prototype.zoom=function(t){this._zoom=t},av.prototype.pointToTileIndex=function(t){return new Qy(Zy.floor(t.x/this.options.tileSize),Zy.floor(t.y/this.options.tileSize))},av.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:Zy.ceil((Zy.abs(e.x)+t.width)/this.options.tileSize),y:Zy.ceil((Zy.abs(e.y)+t.height)/this.options.tileSize)}},av.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}},av.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Qy(e*this.options.tileSize,t*this.options.tileSize)},av.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},av.prototype.destroy=function(){Kg(this.element),this.pool.empty()},av.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},av.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()},av.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},av.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 Qy(M(e.x),M(e.y))),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},av.prototype.wrapIndex=function(t){var e=Zy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},av.prototype.wrapValue=function(t,e){var o=Zy.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var ov,iv,rv=av,nv=((ov=A.Class)&&(sv.__proto__=ov),((sv.prototype=Object.create(ov&&ov.prototype)).constructor=sv).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},sv.prototype._initOptions=function(t){this.options=x({},this.options,t)},sv.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},sv.prototype.show=function(){var t=this.element,e=(t.style.top=Jy(this.options.offset.y),t.style.left=Jy(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},sv.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},sv.prototype.url=function(){return $y(this.options.urlTemplate)(this.urlOptions())},sv.prototype.errorUrl=function(){return $y(this.options.errorUrlTemplate)(this.urlOptions())},sv.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}},sv);function sv(t,e){ov.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function av(t,e){iv.call(this),this.element=t,this._initOptions(e),this.pool=new pv}i(nv,{urlTemplate:"",errorUrlTemplate:""});(hv=A.Class)&&(lv.__proto__=hv),((lv.prototype=Object.create(hv&&hv.prototype)).constructor=lv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},lv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},lv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},lv.prototype._create=function(t){for(var e,o=this._items,i=It(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 nv(i,t),this._items.push(e)),e},lv.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 hv,pv=lv;function lv(){hv.call(this),this._items=[]}i(pv,{maxSize:100});function cv(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var uv,dv,fv,gv,yv,vv,mv,xv=Object.assign,_v="change",bv=((mv=xd)&&(Lv.__proto__=mv),((Lv.prototype=Object.create(mv&&mv.prototype)).constructor=Lv).prototype.captureNext=function(){this.capture=!0},Lv.prototype.cancelCapture=function(){this.capture=!1},Lv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Lv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Lv),wv=((vv=xd)&&(Ev.__proto__=vv),((Ev.prototype=Object.create(vv&&vv.prototype)).constructor=Ev).prototype.makeVirtual=function(){xv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Ev.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Ev.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Ev.prototype.forceEnabled=function(){this.forcedEnabled=!0},Ev.prototype.getSize=function(){return this.container[this.measure]},Ev.prototype.getTotal=function(){return this.element[this.scrollSize]},Ev.prototype.rescale=function(t){this.scale=t},Ev.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(_v,this)},Ev),Cv=((yv=xd)&&(Rv.__proto__=yv),((Rv.prototype=Object.create(yv&&yv.prototype)).constructor=Rv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},Rv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},Rv.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(_v)},Rv),Sv=((gv=xd)&&(Bv.__proto__=gv),((Bv.prototype=Object.create(gv&&gv.prototype)).constructor=Bv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Bv.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(_v,this))},Bv),kv=((fv=A.Class)&&(Ov.__proto__=fv),(Ov.prototype=Object.create(fv&&fv.prototype)).constructor=Ov),Av=((dv=xd)&&(Mv.__proto__=dv),((Mv.prototype=Object.create(dv&&dv.prototype)).constructor=Mv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},Mv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},Mv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},Mv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},Mv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},Mv.prototype.moveTo=function(t){xv(this,t),this.refresh()},Mv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=cv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(_v))},Mv.prototype._saveCoordinates=function(t){this.coordinates=t},Mv),Pv=A.drawing.Group,Lr=((uv=Dd)&&(Tv.__proto__=uv),((Tv.prototype=Object.create(uv&&uv.prototype)).constructor=Tv).prototype.destroy=function(){uv.prototype.destroy.call(this),this.surface.destroy()},Tv.prototype._reset=function(){uv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},Tv.prototype._initRoot=function(){this._root=new Pv,this.surface.draw(this._root)},Tv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},Tv.prototype._resize=function(){this.surface.size(this.map.size())},Tv.prototype._readData=function(){var t=uv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},Tv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new jv(this.map,this.options.style,this));for(var e=new Pv,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},Tv.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof A.drawing.Circle&&this.map.options.renderPointsAsMarkers?T(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},Tv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},Tv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},Tv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},Tv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},Tv.prototype._panEnd=function(t){uv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},Tv.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}))},Tv.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},Tv.prototype._handler=function(e){var o=this;return function(t){t.element&&o.map.trigger(e,o._eventArgs(t))}},Tv.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},Tv.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},Tv.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},Tv.prototype._activate=function(){uv.prototype._activate.call(this),this._panHandler=dy(this._pan,this),this.map.bind("pan",this.panHandler)},Tv.prototype._deactivate=function(){uv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},Tv);function Tv(t,e){uv.call(this,t,e),this._pan=dy(this._pan,this),this.surface=A.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new Av(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}function Mv(t){dv.call(this),this.support=ky(),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=cv(this.x,this.y,this.scale);this.element.style[this.transformStyle]=t,this._saveCoordinates(t)}function Ov(t){fv.call(this);var s,a,h,p=this;xv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new Sv({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new Sv({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=Bt(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 Bv(t){gv.call(this),xv(this,t)}function Rv(t){yv.call(this),this.x=new wv(xv({horizontal:!0},t)),this.y=new wv(xv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(_v,t)}function Ev(t){vv.call(this),this.forcedEnabled=!1,xv(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 Lv(t,e){mv.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,Sy(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,dy(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,dy(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,dy(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,dy(o._release,o))})),o.bind(["press","release"],e||{})}i(Lr,{autoBind:!0,zIndex:100});(zv=A.Class)&&(Dv.__proto__=zv),((Dv.prototype=Object.create(zv&&zv.prototype)).constructor=Dv).prototype.parse=function(t){var e=new Pv,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},Dv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Dv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Dv.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)}},Dv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(zt(e).anchor()))&&(t.options.fill=null)},Dv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Dv.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},Dv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?A.drawing.MultiPath:A.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(zg.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Dv.prototype._loadPoint=function(t,e,o){var e=zg.fromLngLat(e),i=this.locator.locationToView(e),i=new A.geometry.Circle(i,10),i=new A.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var Iv,zv,jv=Dv,Nd=((Iv=Lr)&&(Vv.__proto__=Iv),((Vv.prototype=Object.create(Iv&&Iv.prototype)).constructor=Vv).prototype._readData=function(){return this.options.data||[]},Vv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=yt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=yt(this.options.locationField),s=0;s<i.length;s++){var a,h,p,l=i[s],c=n(l),u=o(l);T(c)&&T(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=zg.create(c),p=this.map.locationToView(c),h=a.map(u),(p=this._createSymbol({center:p,size:h,style:e.style,dataItem:l,location:c})).dataItem=l,p.location=c,p.value=u,this._drawSymbol(p))}}},Vv.prototype._scaleType=function(){var t=this.options.scale;return it(t)?t:Fv[t]},Vv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=it(e)?e:Nv[e])(t)},Vv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Vv.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},Vv.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},Vv);function Vv(){Iv.apply(this,arguments)}function Dv(t,e,o){zv.call(this),this.observer=o,this.locator=t,this.style=e}i(Nd,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Hv,Uv,Fv={sqrt:((Uv=A.Class)&&(Yv.__proto__=Uv),((Yv.prototype=Object.create(Uv&&Uv.prototype)).constructor=Yv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Yv)},Nv={circle:function(t){var e=new A.geometry.Circle(t.center,t.size/2);return new A.drawing.Circle(e,t.style)},square:function(t){var e=new A.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}},Gv=Object.assign,Wv=".k-marker",qv=((Hv=Dd)&&(Xv.__proto__=Hv),((Xv.prototype=Object.create(Hv&&Hv.prototype)).constructor=Xv).prototype.destroy=function(){Hv.prototype.destroy.call(this),gy(this.element,"click",this._markerClickHandler),this.clear()},Xv.prototype.add=function(t){if(!Z(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Xv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Xv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Xv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Xv.prototype._reset=function(){Hv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Xv.prototype.bind=function(t,e){t=Qv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Xv.prototype._addOne=function(t){t=Qv.create(t,this.options);return t.addTo(this),t},Xv.prototype._readData=function(){return this.options.data||[]},Xv.prototype._load=function(t){this._data=t,this.clear();for(var e=yt(this.options.locationField),o=yt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Xv.prototype._markerClick=function(t){var e=t.target._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},Xv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Xv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Xv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Gv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Xv);function Xv(t,e){Hv.call(this,t,e),this._markerClickHandler=dy(this._markerClick,this),fy(this.element,"click",Wv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Yv(t,e){Uv.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(qv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});(Zv=A.Class)&&($v.__proto__=Zv),(($v.prototype=Object.create(Zv&&Zv.prototype)).constructor=$v).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},$v.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},$v.prototype.location=function(t){return t?(this.options.location=zg.create(t).toArray(),this.layer&&this.layer.update(this),this):zg.create(this.options.location)},$v.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=ty(this._anchor.left),this.element.style.top=ty(this._anchor.top)},$v.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},$v.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=dy(this._mouseEnter,this),fy(this.element,"mouseenter",Wv,this._mouseEnterHandler),this._mouseLeaveHandler=dy(this._mouseLeave,this),fy(this.element,"mouseleave",Wv,this._mouseLeaveHandler))},$v.prototype.unbindEvents=function(){this.element&&(gy(this.element,"mouseenter",this._mouseEnterHandler),gy(this.element,"mouseleave",this._mouseLeaveHandler))},$v.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,Q(o=document.createElement("span"),"k-marker k-icon k-i-marker-"+Jg(t.shape||"pin")),t.title&&o.setAttribute("title",t.title),i=t.attributes||{},Object.keys(i).forEach(function(t){o.setAttribute(t,i[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents())},$v.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},$v.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},$v.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},$v.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},$v.create=function(t,e){return t instanceof $v?t:new $v(x({},e,t))};var Zv,Qv=$v,Kv=Object.assign;function $v(t){Zv.call(this),this.options=t||{}}function Jv(t){window.requestAnimationFrame(t)}function tm(t){t.preventDefault()}(om=A.Class)&&(ym.__proto__=om),((ym.prototype=Object.create(om&&om.prototype)).constructor=ym).prototype.tick=function(){},ym.prototype.done=function(){},ym.prototype.onEnd=function(){},ym.prototype.onCancel=function(){},ym.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Jv(this._tickProxy)))},ym.prototype.enabled=function(){return!0},ym.prototype.cancel=function(){this._started=!1,this.onCancel()},ym.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Jv(this._tickProxy))};var em,om,f=ym,im=((em=f)&&(gm.__proto__=em),((gm.prototype=Object.create(em&&em.prototype)).constructor=gm).prototype.done=function(){return this.timePassed()>=this.duration},gm.prototype.timePassed=function(){return Math.min(this.duration,my()-this.startDate)},gm.prototype.moveTo=function(t){var e=this.movable;this.initial=e[this.axis],this.delta=t.location-this.initial,this.duration="number"==typeof t.duration?t.duration:300,this.tick=this._easeProxy(t.ease),this.startDate=my(),this.start()},gm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},gm.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},gm),rm=Object.assign,nm=800,sm=0,am="move",hm="tap",pm="doubleTap",lm="release",cm="gesturechange",um="gestureend",dm="gesturetap",fm={api:0,touch:0,mouse:9,pointer:9};function gm(t){em.call(this),Kv(this,t)}function ym(){om.call(this),this._tickProxy=dy(this._tick,this),this._started=!1}function vm(t){var e,o,i,r=ky(),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}(xm=A.Class)&&(Cm.__proto__=xm),((Cm.prototype=Object.create(xm&&xm.prototype)).constructor=Cm).prototype.move=function(t){var e=t["page"+this.axis],o=my(),i=o-this.timeStamp||1;!e&&this.invalidZeroEvents||(this.delta=e-this.location,this._updateLocationData(t),this.initialDelta=e-this.startLocation,this.velocity=this.delta/i,this.timeStamp=o)},Cm.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var mm,xm,_m=Cm,bm=((mm=A.Class)&&(wm.__proto__=mm),((wm.prototype=Object.create(mm&&mm.prototype)).constructor=wm).prototype.press=function(){this._holdTimeout=setTimeout(dy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},wm.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(hm,t):e._trigger(pm,t),e.userEvents._clicks=0},300))},wm.prototype._hold=function(){this._trigger("hold",this.pressEvent)},wm.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(Bm.current&&Bm.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger(am,t)}},wm.prototype.end=function(t){this.endTime=my(),this._finished||(this._finished=!0,this._trigger(lm,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(hm,t)),clearTimeout(this._holdTimeout),this.dispose())},wm.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)},wm.prototype.skip=function(){this.dispose()},wm.prototype.cancel=function(){this.dispose()},wm.prototype.isMoved=function(){return this._moved},wm.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=my(),this._moved=!0,this._trigger("start",t)},wm.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()},wm.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},wm);function wm(t,e,o){mm.call(this),rm(this,{x:new _m("X",o.location),y:new _m("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||fm[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 Cm(t,e){xm.call(this),this.support=ky(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=my()}function Sm(t){for(var e=Sy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(Om=xd)&&(Wm.__proto__=Om),((Wm.prototype=Object.create(Om&&Om.prototype)).constructor=Wm).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Wm.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,Sm(function(t){e.removeEventListener(t,o.preventIfMoving)})),gy(o.surface,yy("move"),this._surfaceMoveHandler),gy(o.surface,yy("up cancel"),this._surfaceEndHandler),gy(i,yy("down"),this._elementStartHandler),o.useClickAsTap&&gy(i,yy("click"),this._elementClickHandler),t.preventDragEvent&&gy(i,yy("dragstart"),this._elementDragStartHandler),gy(i,yy("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Wm.prototype.capture=function(){Wm.current=this},Wm.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Wm.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case am:a=cm;break;case"end":a=um;break;case hm:a=dm}rm(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,rm(e,{type:a}))},Wm.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Wm.prototype.move=function(t,e){this._apiCall("_move",t,e)},Wm.prototype.end=function(t,e){this._apiCall("_end",t,e)},Wm.prototype._isMultiTouch=function(){return 1<this.touches.length},Wm.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Wm.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Wm.prototype._isMoved=function(){return vt(this.touches,function(t){return t.isMoved()}).length},Wm.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Wm.prototype._start=function(t){var e,o,i=0,r=this.filter,n=vm(t),s=n.length,a=t.which;if(!(a&&1<a||this._maxTouchesReached()))for(Wm.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 bm(this,e,o),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))},Wm.prototype._move=function(t){this._eachTouch("move",t)},Wm.prototype._end=function(t){this._eachTouch("end",t)},Wm.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:my(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Wm.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=vm(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)},Wm.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:xy,preventDefault:xy})},Wm.defaultThreshold=function(t){sm=t},Wm.minHold=function(t){nm=t};var km,Am,Pm,Tm,Mm,Om,Bm=Wm,Rm=Object.assign,Em=Math.abs,Lm="change",Im=((Mm=f)&&(Gm.__proto__=Mm),((Gm.prototype=Object.create(Mm&&Mm.prototype)).constructor=Gm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Gm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Gm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Gm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Gm),zm=((Tm=f)&&(Nm.__proto__=Tm),((Nm.prototype=Object.create(Tm&&Tm.prototype)).constructor=Nm).prototype.onCancel=function(){this.transition.cancel()},Nm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Nm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Nm.prototype.done=function(){return Em(this.velocity)<1},Nm.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),Tm.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(),Tm.prototype.start.call(this)))},Nm.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)},Nm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Nm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Nm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:im.easeOutExpo})},Nm),jm=((Pm=f)&&(Fm.__proto__=Pm),((Fm.prototype=Object.create(Pm&&Pm.prototype)).constructor=Fm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Fm.prototype.done=function(){return Em(this.offset.y)<5&&Em(this.offset.x)<5},Fm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Fm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Fm.prototype.setCallback=function(t){t&&it(t)&&(this.callback=t)},Fm.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}},Fm),Vm=((Am=A.Class)&&(Um.__proto__=Am),((Um.prototype=Object.create(Am&&Am.prototype)).constructor=Um).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)},Um.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Um.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Um),Dm=((km=xd)&&(Hm.__proto__=km),((Hm.prototype=Object.create(km&&km.prototype)).constructor=Hm).prototype._initOptions=function(t){this.options=x({},this.options,t)},Hm.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())},Hm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Hm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Hm.prototype.height=function(){return this.dimensions.y.size},Hm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Hm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Hm.prototype._resize=function(){this._native||this.contentResized()},Hm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Hm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Hm.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)},Hm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Hm.prototype.enable=function(){this.enabled=!0},Hm.prototype.disable=function(){this.enabled=!1},Hm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Em(t)),this.scrollElement.scrollTop(Em(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Hm.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())},Hm.prototype.pullHandled=function(){},Hm.prototype.destroy=function(){var t=this.element;gy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Hm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Hm.prototype._initPullToRefresh=function(){},Hm.prototype._dragEnd=function(){},Hm.prototype._paneChange=function(){},Hm.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new Vm({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Lm,function(){s.refresh()}),n.bind(Lm,function(){s.show()}),e[t+"inertia"]=new zm({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})}})},Hm);function Hm(t,e){km.call(this);var n=this,e=(this.element=t,this._initOptions(e),function(t){t=hy(t);return t.ios||t.android}(navigator.userAgent)),e=(n._native=n.options.useNative&&e,ay('<div class="km-scroll-header"/>'));if(n._native)Q(t,"km-native-scroller"),$g(e,t),Rm(n,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",Q(t,"km-scroll-wrapper");var o=ay('<div class="km-scroll-container"/>'),i=t,r=o;for(i.appendChild(r);i.firstChild!==r;)r.appendChild(i.firstChild);$g(e,t);var o=t.children[1],e=new bv(t),s=new Av(o),a=new Cv({element:o,container:t,forcedEnabled:n.options.zoom}),h=this.options.avoidScrolling,p=new Bm(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=Em(t.x.velocity),i=Em(t.y.velocity),r=i<=2*e,e=e<=2*i;i=n.fixedContainer,o=t.event.target,i!==o&&!function(t){if(o)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 kv({movable:s,dimensions:a,userEvents:p,elastic:n.options.elastic}),c=new Im({movable:s,dimensions:a,userEvents:p,tapCapture:e}),u=new jm({moveTo:function(t){n.scrollTo(t.x,t.y)}});s.bind(Lm,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),fy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),Rm(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 Um(t){Am.call(this);var e="x"===t.axis,o=ay('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');Rm(this,t,{element:o,elementSize:0,movable:new Av(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Lm,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Fm(t){Pm.call(this,t),Rm(this,t,{origin:{},destination:{},offset:{}})}function Nm(t){Tm.call(this);var e=this;Rm(e,t,{transition:new im({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",dy(e.start,e)),e.userEvents.bind("gestureend",dy(e.start,e)),e.userEvents.bind("tap",dy(e.onEnd,e))}function Gm(t){Mm.call(this,t),Rm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Wm(t,e){Om.call(this);var o,i,r,n=ky(),s=(this.support=n,this.options=e=e||{},o=this.filter=e.filter,this.threshold=e.threshold||sm,this.minHold=e.minHold||nm,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);rm(this,{element:t,surface:e.global&&s?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=dy(this._move,this),fy(this.surface,yy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=dy(this._end,this),fy(this.surface,yy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=dy(this._start,this),fy(t,yy("down"),o,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=dy(this._click,this),fy(t,yy("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=tm,fy(t,yy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=dy(this._select,this),fy(t,yy("mousedown"),o,this._elementSelectHandler),this.captureUpIfMoved&&n.eventCapture&&(i=this.surface,r=dy(this.preventIfMoving,this),Sm(function(t){i.addEventListener(t,r,!0)})),this.bind(["press","hold",hm,pm,"start",am,"end",lm,"cancel","gesturestart",cm,um,dm,"select"],e)}i(Dm,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),vy(Dm,["pull","scroll","resize"]);function qm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}qm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Xm=qm,Ym=Math,Zm=Ym.min,Qm=Ym.pow,Km=A.geometry.Point,$m={bubble:Nd,shape:Lr,tile:zd};function Jm(t){var e=[];if(t)for(var o=Jg(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}$m.marker=qv;(tx=xd)&&(I.__proto__=tx),((I.prototype=Object.create(tx&&tx.prototype)).constructor=I).prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),Z(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();gy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler),tx.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=ky(),this.context=i,this.initObserver(i),this.initServices(i),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new ny,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),fy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)},I.prototype._initOptions=function(t){this.options=x({},this.options,t)},I.prototype._initElement=function(t){Q(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Kg(t);t=ay("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){this.widgetService=new Xm(this,t=void 0===t?{}: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||tx.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=T(t)?(t=Ym.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},I.prototype.center=function(t){var e=t?(t=zg.create(t),e=zg.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify("centerChange",{center:this.options.center}),this._reset()),this):zg.create(this.options.center);return e},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(),Kg(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=zg.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},I.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=Km.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},I.prototype.locationToView=function(t){var t=zg.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=Km.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,o=Bt(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=O(t.pageX,t.clientX)-o.left,O(t.pageY,t.clientY)-o.top),new A.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:Zm(e,o),height:Zm(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},I.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=zg.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.widgetService.notify("centerChange",{center:this.options.center}),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=Gy.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Gy(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=Ym.abs(h.x-a.x),h=Ym.abs(h.y-a.y);if(p<=r&&h<=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 Gy(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="."+Jm(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(Q(o=document.createElement("div"),"k-map-controls "+Jm(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 Ty(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Ly(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",dy(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 Vy(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 Dm(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",dy(this._scroll,this)),t.bind("scrollEnd",dy(this._scrollEnd,this)),t.userEvents.bind("gesturestart",dy(this._scaleStart,this)),t.userEvents.bind("gestureend",dy(this._scale,this)),t.userEvents.bind("doubleTap",dy(this._doubleTap,this)),t.userEvents.bind("tap",dy(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({},"marker"===e?this.options.markerDefaults:o,t),t=new $m[e](this,o);return"marker"===e&&(this.markers=t),t},I.prototype._createTooltip=function(){return new Wy(this.widgetService,this.options.tooltip)},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&"marker"===t.type}).length||(this.markers=new qv(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 A.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._tooltip.offset=o,this.hideTooltip(),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=my(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},I.prototype._panComplete=function(){return 50<my()-(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 A.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=Ym.log(t)/Ym.log(2);return Ym.round(t)},I.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),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=Qm(2,this.options.minZoom-n),t.dimensions.maxScale=Qm(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=O(t,this.options.zoom);return this.options.minSize*Qm(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),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<At(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}))},I.prototype._toDocumentCoordinates=function(t){var e=Bt(this.element);return{left:M(t.x+e.left),top:M(t.y+e.top)}};var tx,h=I;function I(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),tx.call(this),this._init(t,e,o,i)}i(h,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),vy(h,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);function ex(){return{icon:{border:{width:1}},label:{font:nx,padding:3},line:{length:10,width:2},visible:!0}}function ox(t){return{axisDefaults:{labels:{font:nx},notes:ex(),title:{font:sx,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:ex(),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:sx},subtitle:{font:nx},legend:{labels:{font:nx}}}}var ix,rx=h,d="Arial, Helvetica, sans-serif",nx="12px "+d,sx="16px "+d,ax=(e.d(t,"autoMajorUnit",function(){return te}),e.d(t,"Point",function(){return B}),e.d(t,"Box",function(){return R}),e.d(t,"Ring",function(){return le}),e.d(t,"Sector",function(){return ce}),e.d(t,"ShapeBuilder",function(){return ye}),e.d(t,"ShapeElement",function(){return Ce}),e.d(t,"ChartElement",function(){return r}),e.d(t,"BoxElement",function(){return be}),e.d(t,"RootElement",function(){return Te}),e.d(t,"FloatElement",function(){return Be}),e.d(t,"Text",function(){return Le}),e.d(t,"TextBox",function(){return De}),e.d(t,"Title",function(){return Ge}),e.d(t,"AxisLabel",function(){return Xe}),e.d(t,"Axis",function(){return lo}),e.d(t,"Note",function(){return $e}),e.d(t,"CategoryAxis",function(){return qo}),e.d(t,"DateCategoryAxis",function(){return ti}),e.d(t,"DateValueAxis",function(){return ui}),e.d(t,"NumericAxis",function(){return pi}),e.d(t,"LogarithmicAxis",function(){return vi}),e.d(t,"PolarAxis",function(){return wi}),e.d(t,"RadarCategoryAxis",function(){return _i}),e.d(t,"RadarNumericAxis",function(){return Pi}),e.d(t,"RadarLogarithmicAxis",function(){return Mi}),e.d(t,"CurveProcessor",function(){return Ei}),e.d(t,"Gradients",function(){return Se}),e.d(t,"rectToBox",function(){return Ie}),e.d(t,"Aggregates",function(){return Wi}),e.d(t,"AreaChart",function(){return nn}),e.d(t,"AreaSegment",function(){return Zr}),e.d(t,"AxisGroupRangeTracker",function(){return sn}),e.d(t,"Bar",function(){return gn}),e.d(t,"BarChart",function(){return Pn}),e.d(t,"BarLabel",function(){return cn}),e.d(t,"BoxPlotChart",function(){return Un}),e.d(t,"BoxPlot",function(){return Dn}),e.d(t,"BubbleChart",function(){return os}),e.d(t,"Bullet",function(){return hs}),e.d(t,"BulletChart",function(){return cs}),e.d(t,"CandlestickChart",function(){return Ln}),e.d(t,"Candlestick",function(){return Mn}),e.d(t,"CategoricalChart",function(){return kr}),e.d(t,"CategoricalErrorBar",function(){return xr}),e.d(t,"CategoricalPlotArea",function(){return za}),e.d(t,"Chart",function(){return kl}),e.d(t,"ChartContainer",function(){return ws}),e.d(t,"ClipAnimation",function(){return Fr}),e.d(t,"ClusterLayout",function(){return bn}),e.d(t,"Crosshair",function(){return xs}),e.d(t,"CrosshairTooltip",function(){return ys}),e.d(t,"DefaultAggregates",function(){return Qs}),e.d(t,"DonutChart",function(){return np}),e.d(t,"DonutPlotArea",function(){return sp}),e.d(t,"DonutSegment",function(){return tp}),e.d(t,"ErrorBarBase",function(){return mr}),e.d(t,"ErrorRangeCalculator",function(){return tr}),e.d(t,"Highlight",function(){return Da}),e.d(t,"SharedTooltip",function(){return wh}),e.d(t,"Legend",function(){return hh}),e.d(t,"LegendItem",function(){return eh}),e.d(t,"LegendLayout",function(){return th}),e.d(t,"LineChart",function(){return Yr}),e.d(t,"LinePoint",function(){return Mr}),e.d(t,"LineSegment",function(){return Br}),e.d(t,"Pane",function(){return ks}),e.d(t,"PieAnimation",function(){return Bh}),e.d(t,"PieChart",function(){return Zh}),e.d(t,"PieChartMixin",function(){return Gh}),e.d(t,"PiePlotArea",function(){return Qh}),e.d(t,"PieSegment",function(){return Nh}),e.d(t,"PlotAreaBase",function(){return Fs}),e.d(t,"PlotAreaEventsMixin",function(){return Ns}),e.d(t,"PlotAreaFactory",function(){return lh}),e.d(t,"PointEventsMixin",function(){return Ar}),e.d(t,"RangeBar",function(){return Js}),e.d(t,"RangeBarChart",function(){return ia}),e.d(t,"RangeAreaPoint",function(){return la}),e.d(t,"RangeAreaChart",function(){return wa}),e.d(t,"ScatterChart",function(){return Qn}),e.d(t,"ScatterErrorBar",function(){return Fn}),e.d(t,"ScatterLineChart",function(){return Lh}),e.d(t,"Selection",function(){return vh}),e.d(t,"SeriesAggregator",function(){return qs}),e.d(t,"SeriesBinder",function(){return Ki}),e.d(t,"SplineSegment",function(){return Dr}),e.d(t,"SplineAreaSegment",function(){return rn}),e.d(t,"StackWrap",function(){return Sn}),e.d(t,"Tooltip",function(){return mh}),e.d(t,"OHLCChart",function(){return Sa}),e.d(t,"OHLCPoint",function(){return Ca}),e.d(t,"WaterfallChart",function(){return Ba}),e.d(t,"WaterfallSegment",function(){return Oa}),e.d(t,"XYPlotArea",function(){return Vh}),e.d(t,"MousewheelZoom",function(){return Ja}),e.d(t,"ZoomSelection",function(){return $a}),e.d(t,"Pannable",function(){return qa}),e.d(t,"ChartAxis",function(){return Li}),e.d(t,"ChartPane",function(){return Hi}),e.d(t,"ChartPlotArea",function(){return Ui}),e.d(t,"findAxisByName",function(){return ji}),e.d(t,"anyHasZIndex",function(){return Nr}),e.d(t,"appendIfNotNull",function(){return As}),e.d(t,"areNumbers",function(){return On}),e.d(t,"bindSegments",function(){return Ts}),e.d(t,"categoriesCount",function(){return wr}),e.d(t,"countNumbers",function(){return Ni}),e.d(t,"equalsIgnoreCase",function(){return Ms}),e.d(t,"evalOptions",function(){return br}),e.d(t,"filterSeriesByType",function(){return Os}),e.d(t,"getDateField",function(){return Bs}),e.d(t,"getField",function(){return qi}),e.d(t,"hasGradientOverlay",function(){return un}),e.d(t,"hasValue",function(){return qn}),e.d(t,"isDateAxis",function(){return Rs}),e.d(t,"segmentVisible",function(){return Ps}),e.d(t,"singleItemOrArray",function(){return Es}),e.d(t,"createOutOfRangePoints",function(){return js}),e.d(t,"ChartService",function(){return no}),e.d(t,"DomEventsBuilder",function(){return so}),e.d(t,"FormatService",function(){return oo}),e.d(t,"IntlService",function(){return to}),e.d(t,"TemplateService",function(){return ut}),e.d(t,"Sparkline",function(){return Il}),e.d(t,"Navigator",function(){return Xl}),e.d(t,"NavigatorHint",function(){return Ul}),e.d(t,"StockChart",function(){return Ql}),e.d(t,"constants",function(){return j}),e.d(t,"Gauge",function(){return pc}),e.d(t,"LinearGauge",function(){return Uc}),e.d(t,"LinearPointer",function(){return wc}),e.d(t,"ArrowLinearPointer",function(){return Mc}),e.d(t,"BarLinearPointer",function(){return jc}),e.d(t,"LinearScale",function(){return vc}),e.d(t,"RadialGauge",function(){return pu}),e.d(t,"RadialPointer",function(){return nu}),e.d(t,"RadialScale",function(){return Qc}),e.d(t,"ArcGauge",function(){return bu}),e.d(t,"RangePointer",function(){return _u}),e.d(t,"ArcScale",function(){return uu}),e.d(t,"CircularGauge",function(){return wu}),e.d(t,"Barcode",function(){return of}),e.d(t,"barcodeValidator",function(){return ef}),e.d(t,"QRCode",function(){return Sg}),e.d(t,"qrcodeValidator",function(){return Cg}),e.d(t,"Map",function(){return rx}),e.d(t,"Location",function(){return zg}),e.d(t,"Extent",function(){return Gy}),e.d(t,"addClass",function(){return Q}),e.d(t,"removeClass",function(){return $}),e.d(t,"alignPathToPixel",function(){return J}),e.d(t,"clockwise",function(){return tt}),e.d(t,"convertableToNumber",function(){return ot}),e.d(t,"deepExtend",function(){return x}),e.d(t,"elementStyles",function(){return pt}),e.d(t,"getSpacing",function(){return P}),e.d(t,"getTemplate",function(){return dt}),e.d(t,"getter",function(){return yt}),e.d(t,"grep",function(){return vt}),e.d(t,"hasClasses",function(){return mt}),e.d(t,"HashMap",function(){return _t}),e.d(t,"inArray",function(){return u}),e.d(t,"interpolateValue",function(){return bt}),e.d(t,"InstanceObserver",function(){return Ct}),e.d(t,"isArray",function(){return Z}),e.d(t,"isFunction",function(){return it}),e.d(t,"isNumber",function(){return m}),e.d(t,"isObject",function(){return st}),e.d(t,"isString",function(){return et}),e.d(t,"map",function(){return St}),e.d(t,"mousewheelDelta",function(){return At}),e.d(t,"FontLoader",function(){return Ht}),e.d(t,"setDefaultOptions",function(){return i}),e.d(t,"sparseArrayLimits",function(){return Ut}),e.d(t,"styleValue",function(){return at}),e.d(t,"find",function(){return Ft}),e.d(t,"elementScale",function(){return qt}),e.d(t,"autoTextColor",function(){return Xt}),e.d(t,"createHashSet",function(){return Kt}),e.d(t,"defaultErrorHandler",function(){return $t}),e.d(t,"keys",function(){return Jt}),e.d(t,"append",function(){return Tt}),e.d(t,"bindEvents",function(){return Mt}),e.d(t,"Class",function(){return A.Class}),e.d(t,"defined",function(){return T}),e.d(t,"deg",function(){return Ot}),e.d(t,"elementOffset",function(){return Bt}),e.d(t,"elementSize",function(){return Rt}),e.d(t,"eventCoordinates",function(){return Et}),e.d(t,"eventElement",function(){return Lt}),e.d(t,"hashKey",function(){return It}),e.d(t,"last",function(){return zt}),e.d(t,"limitValue",function(){return _}),e.d(t,"logToConsole",function(){return A.logToConsole}),e.d(t,"objectKey",function(){return jt}),e.d(t,"rad",function(){return Vt}),e.d(t,"round",function(){return M}),e.d(t,"unbindEvents",function(){return Dt}),e.d(t,"valueOrDefault",function(){return O}),e.d(t,"chartBaseTheme",function(){return ox}),t);for(ix in ax)hx(ix,ax[ix])}],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(hx){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function i(t){var e;return(r[t]||(e=r[t]={i:t,l:!1,exports:{}},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(z,t,e){"use strict";e.r(t);var V={},j=(e.d(V,"NAVIGATOR_AXIS",function(){return Nl}),e.d(V,"NAVIGATOR_PANE",function(){return Fl}),"arc"),D="#000",w="bottom",b="center",H="circle",U="date",F=10,N=/\{\d+:?/,C="left",G=Number.MAX_VALUE,W=-Number.MAX_VALUE,q="none",S="right",X="string",k="top",Y="value",a="#fff",y="x",v="y";function Z(t){return Array.isArray(t)}function Q(t,e){for(var o=Z(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var K=/\s+/g;function $(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(K," "))}var A=e(0);function J(t){var e=.5;t.options.stroke&&A.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 tt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function et(t){return typeof t===X}function ot(t){return m(t)||et(t)&&isFinite(t)}function it(t){return"function"==typeof t}var rt="object",nt="undefined";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===rt&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):it(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===rt&&r||{},t(e[i],n)):s!==nt&&(e[i]=n)}}(t,e[i]);return t}function st(t){return"object"==typeof t}function at(t){return m(t)?t+"px":t}var ht=/width|height|top|left|bottom|right/i;function pt(t,e){var o=et(e)?[e]:e;if(Z(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=ht.test(s)?parseFloat(r[s]):r[s]}return i}if(st(e))for(var a in e)t.style[a]=at(e[a])}function P(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[k]=o[S]=o[w]=o[C]=t:(o[k]=t[k]||e,o[S]=t[S]||e,o[w]=t[w]||e,o[C]=t[C]||e),o}function lt(){}var ct={compile:function(t){return t}},ut=(lt.register=function(t){ct=t},lt.compile=function(t){return ct.compile(t)},lt);function dt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=ut.compile(t.template):it(t.content)&&(e=t.content),e}var ft=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,gt={};function yt(t){var r;return gt[t]||(r=[],t.replace(ft,function(t,e,o,i){r.push(A.drawing.util.defined(e)?e:o||i)}),gt[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e}),gt[t]}function vt(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function mt(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}gt[void 0]=function(t){return t};function xt(){this._map={}}xt.prototype.get=function(t){return this._map[this._key(t)]},xt.prototype.set=function(t,e){this._map[this._key(t)]=e},xt.prototype._key=function(t){return t instanceof Date?t.getTime():t};var _t=xt;function u(t,e){if(e)return-1!==e.indexOf(t)}function bt(t,e,o){return A.drawing.util.round(t+(e-t)*o,3)}function wt(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}wt.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},wt.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)},wt.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 Ct=wt;function St(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);A.drawing.util.defined(n)&&i.push(n)}return i}var kt=A.support.browser||{};function At(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,kt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Pt(){}var o=A.drawing.util,Tt=o.append,Mt=o.bindEvents,T=o.defined,Ot=o.deg,Bt=o.elementOffset,Rt=o.elementSize,Et=o.eventCoordinates,Lt=o.eventElement,It=o.hashKey,zt=o.last,_=o.limitValue,Vt=o.objectKey,jt=o.rad,M=o.round,Dt=o.unbindEvents,O=o.valueOrDefault,Ht=(Pt.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++,Pt.fetchFonts(e,i,r),r.depth--))})},Pt.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(A.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},Pt.preloadFonts=function(t,e){var o=[];Pt.fetchFonts(t,o),Pt.loadFonts(o,e)},Pt);function i(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function Ut(t){for(var e=G,o=W,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===G?void 0:e,max:o===W?void 0:o}}function Ft(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Nt=A.geometry.Matrix,Gt=/matrix\((.*)\)/;function Wt(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(Gt))||2!==t.length?Nt.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Nt,[null].concat(t))))}function qt(t){if(!t)return Nt.unit();for(var e=Wt(t),o=t.parentElement;o;)var i=Wt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Xt(t){return new A.Color(t).isDark()?a:D}function Yt(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 Qt={},o={size:{configurable:!0}},o=(Yt.prototype.values=function(){return this._values.filter(function(t){return t!==Qt})},Yt.prototype.has=function(t){return void 0!==this._index[t]},Yt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Yt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Qt,delete this._index[t])},Yt.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(Yt.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 Kt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?Zt:Yt)(t);var e}function $t(t){throw t}var Jt={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 te(t,e){t=M(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=M(t/e,F);return M(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),F)}(ee=A.Class)&&(oe.__proto__=ee),((oe.prototype=Object.create(ee&&ee.prototype)).constructor=oe).prototype.clone=function(){return new oe(this.x,this.y)},oe.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},oe.prototype.rotate=function(t,e){var e=jt(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=M(i+(r-i)*o+(n-t)*e,3),this.y=M(t+(n-t)*o-(r-i)*e,3),this},oe.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},oe.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},oe.onCircle=function(t,e,o){e=jt(e);return new oe(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};var ee,B=oe;function oe(t,e){ee.call(this),this.x=t||0,this.y=e||0}function ie(t,e,o,i,r){r=jt(r);return new B(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(re=A.Class)&&(ne.__proto__=re),((ne.prototype=Object.create(re&&re.prototype)).constructor=ne).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},ne.prototype.width=function(){return this.x2-this.x1},ne.prototype.height=function(){return this.y2-this.y1},ne.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},ne.prototype.move=function(t,e){var o=this.height(),i=this.width();return T(t)&&(this.x1=t,this.x2=this.x1+i),T(e)&&(this.y1=e,this.y2=this.y1+o),this},ne.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},ne.prototype.wrapPoint=function(t){var e=Z(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new ne(o,e,o,e)),this},ne.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},ne.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===w?v:y,a=s==v?r:n;return e===b?(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},ne.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},ne.prototype.expand=function(t,e){return this.shrink(-t,-e),this},ne.prototype.pad=function(t){t=P(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},ne.prototype.unpad=function(t){t=P(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},ne.prototype.clone=function(){return new ne(this.x1,this.y1,this.x2,this.y2)},ne.prototype.center=function(){return new B(this.x1+this.width()/2,this.y1+this.height()/2)},ne.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},ne.prototype.points=function(){return[new B(this.x1,this.y1),new B(this.x2,this.y1),new B(this.x2,this.y2),new B(this.x1,this.y2)]},ne.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},ne.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},ne.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=ie(0,0,r,i,t),s=ie(e,0,r,i,t),a=ie(e,o,r,i,t),r=ie(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},ne.prototype.toRect=function(){return new A.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},ne.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},ne.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===y?"width":"height",n=this[e]();u(o,[C,k])?(this[i]=t[i],this[r]=this[i]+n):u(o,[S,w])?(this[r]=t[r],this[i]=this[r]-n):o===b&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};var re,R=ne;function ne(t,e,o,i){re.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function se(t,e){return t-e}(pe=A.Class)&&(fe.__proto__=pe),((fe.prototype=Object.create(pe&&pe.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=jt(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=M(this.center.x-o*e,3),t=M(this.center.y-t*e,3);return new B(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(jt(i)),i=Math.cos(jt(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 R(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 B(s,t),r=this.point(r),r=new B(r.x-e.x,r.y-e.y),n=this.point(n),n=new B(n.x-e.x,n.y-e.y),e=M(s*s+t*t,3);return(r.equals(a)||tt(r,a))&&!tt(n,a)&&o*o<=e&&e<=i*i},fe.prototype.getBBox=function(){for(var t=new R(G,G,W,W),e=M(this.startAngle%360),o=M((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(se),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},fe.prototype.expand=function(t){return this.radius+=t,this};var ae,he,pe,le=fe,ce=((he=le)&&(de.__proto__=he),((de.prototype=Object.create(he&&he.prototype)).constructor=de).prototype.expand=function(t){return he.prototype.expand.call(this,t)},de.prototype.clone=function(){return new de(this.center,this.radius,this.startAngle,this.angle)},de.prototype.setRadius=function(t){return this.radius=t,this},de),o=((ae=A.Class)&&(ue.__proto__=ae),((ue.prototype=Object.create(ae&&ae.prototype)).constructor=ue).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new A.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new A.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=A.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},ue);function ue(){ae.apply(this,arguments)}function de(t,e,o,i){he.call(this,t,0,e,o,i)}function fe(t,e,o,i,r){pe.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}o.current=new o;var ge,ye=o,o=((ge=A.Class)&&(ve.__proto__=ge),((ve.prototype=Object.create(ge&&ge.prototype)).constructor=ve).prototype.initUserOptions=function(t){return t},ve.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},ve.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},ve.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},ve.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},ve.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},ve.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},ve.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},ve.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},ve.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},ve.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},ve.prototype.createVisual=function(){this.visual=new A.drawing.Group({zIndex:this.options.zIndex,visible:O(this.options.visible,!0)})},ve.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=A.drawing.Animation.create(this.visual,this.options.animation))},ve.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):T(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},ve.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},ve.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},ve.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(O(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},ve.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)}},ve.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},ve.prototype.renderComplete=function(){},ve.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},ve.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);T(n.options.zIndex)||(n.options.zIndex=O(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},ve.prototype.createGradientOverlay=function(t,e,o){o=new A.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},ve.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},ve.prototype.supportsPointInactiveOpacity=function(){return!0},ve);function ve(t){ge.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}o.prototype.options={};var me,r=o,o=((me=r)&&(xe.__proto__=me),((xe.prototype=Object.create(me&&me.prototype)).constructor=xe).prototype.reflow=function(t){function e(){i.align(t,y,r.align),i.align(t,v,r.vAlign),i.paddingBox=o.clone().unpad(p).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,p=r.margin,l=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(p).unpad(c).unpad(l),me.prototype.reflow.call(this,u),o=h?this.box=new R(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(p),e()),this.translateChildren(o.x1-u.x1+p.left+c+l.left,o.y1-u.y1+p.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},xe.prototype.align=function(t,e,o){this.box.align(t,e,o)},xe.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},xe.prototype.createVisual=function(){me.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},xe.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},xe);function xe(t){me.call(this,t),this.options.margin=P(this.options.margin),this.options.padding=P(this.options.padding)}i(o,{align:C,vAlign:k,margin:{},padding:{},border:{color:D,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var _e,be=o,o=((_e=be)&&(we.__proto__=_e),((we.prototype=Object.create(_e&&_e.prototype)).constructor=we).prototype.getElement=function(){var t,e,o=this.options,i=this.paddingBox,r=o.type,n=o.rotation,s=i.center(),a=i.width()/2,h=i.height()/2;return o.visible&&this.hasBox()?(e=this.visualStyle(),r===H?t=new A.drawing.Circle(new A.geometry.Circle([M(i.x1+a,3),M(i.y1+h,3)],Math.min(a,h)),e):"triangle"===r?t=A.drawing.Path.fromPoints([[i.x1+a,i.y1],[i.x1,i.y2],[i.x2,i.y2]],e).close():"cross"===r?((t=new A.drawing.MultiPath(e)).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t.moveTo(i.x1,i.y2).lineTo(i.x2,i.y1)):(h=i.toRect(),"roundedRect"===r&&(a=O(o.borderRadius,h.width()/5),h.setCornerRadius(a)),t=A.drawing.Path.fromRect(h,e)),n&&t.transform(A.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=o.zIndex,t):null},we.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()},we.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}},we.prototype.createVisual=function(){this.visual=this.createElement()},we);function we(t,e){_e.call(this,t),this.pointData=e}i(o,{type:H,align:b,vAlign:b});var Ce=o,Se={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};(ke=r)&&(Ae.__proto__=ke),((Ae.prototype=Object.create(ke&&ke.prototype)).constructor=Ae).prototype.reflow=function(){var t=this.options,e=this.children,o=new R(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i,r,n,s,a,h,p,l,c,u,d,f=0;f<e.length;f++)e[f].reflow(o),i=o,r=e[f].box,d=u=c=l=p=h=a=s=n=void 0,o=(i.x1===r.x1&&i.y1===r.y1&&i.x2===r.x2&&i.y2===r.y2?r:(n=Math.min(i.x1,r.x1),s=Math.max(i.x1,r.x1),a=Math.min(i.x2,r.x2),h=Math.max(i.x2,r.x2),p=Math.min(i.y1,r.y1),l=Math.max(i.y1,r.y1),c=Math.min(i.y2,r.y2),u=Math.max(i.y2,r.y2),(d=[])[0]=new R(s,p,a,l),d[1]=new R(n,l,s,c),d[2]=new R(a,l,h,c),d[3]=new R(s,c,a,u),i.x1===n&&i.y1===p||r.x1===n&&r.y1===p?(d[4]=new R(n,p,s,l),d[5]=new R(a,c,h,u)):(d[4]=new R(a,p,h,l),d[5]=new R(n,c,s,u)),vt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new R},Ae.prototype.createVisual=function(){this.visual=new A.drawing.Group,this.createBackground()},Ae.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=A.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)},Ae.prototype.getRoot=function(){return this},Ae.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Vt(t),r=Se[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new A.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 A.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Ae.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Ae.prototype.size=function(){var t=this.options;return new R(0,0,t.width,t.height)};var ke,o=Ae;function Ae(t){ke.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:a,border:{color:D,width:0},margin:P(5),zIndex:-2});var Pe,Te=o,o=((Pe=r)&&(Me.__proto__=Pe),((Me.prototype=Object.create(Pe&&Pe.prototype)).constructor=Me).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,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,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,n=n.maxGroupElementsSize,h=s.length,p=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=p,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=t[e+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),_=new R;_[o+1]=x,_[o+2]=x+m[r],_[e+1]=f,_[e+2]=f+m[i],v.reflow(_),f+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=p,t[o+2]=p+a,t[e+2]=t[e+1]+n}},Me.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===w?o=e-t:i===b&&(o=(e-t)/2),o},Me.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=M(t[o]()),a=e.length,h=[],p=0,l=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f],y=(g.box||g.reflow(t),this.elementSize(g));this.options.wrap&&M(l+r+y[o])>s&&(h.push({groupElements:d,groupSize:p,groupElementsSize:l}),u=Math.max(u,l),c+=n+p,l=p=0,d=[]),p=Math.max(p,y[i]),0<l&&(l+=r),l+=y[o],d.push(g)}return h.push({groupElements:d,groupSize:p,groupElementsSize:l}),{groups:h,groupsSize:c+=p,maxGroupElementsSize:u=Math.max(u,l)}},Me.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Me.prototype.createVisual=function(){},Me);function Me(t){Pe.call(this,t),this._initDirection()}i(o,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Oe,Be=o,Re=A.drawing.Text,o=((Oe=r)&&(Ee.__proto__=Oe),((Ee.prototype=Object.create(Oe&&Oe.prototype)).constructor=Ee).prototype.reflow=function(t){var e=this.options,e=e.size=A.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new R(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Ee.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new Re(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},Ee);function Ee(t,e){Oe.call(this,e),this.content=t,this.reflow(new R)}i(o,{font:"12px sans-serif",color:D});var Le=o;function Ie(t){var e=t.origin,t=t.bottomRight();return new R(e.x,e.y,t.x,t.y)}var ze,Ve,je=/\n/m,De=((Ve=be)&&(Ue.__proto__=Ve),((Ue.prototype=Object.create(Ve&&Ve.prototype)).constructor=Ue).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(je),o=new Be({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 Le(e[r].trim(),i);o.append(n)}},Ue.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=Ie(i.clippedBBox()||new A.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Ve.prototype.reflow.call(this,t),o.rotation&&(i=P(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)))},Ue.prototype.createVisual=function(){var t=this.options;this.visual=new A.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ue.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!T(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Ve.prototype.renderVisual.call(this))},Ue.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},Ue.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ue.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},Ue.prototype.rotationTransform=function(){var t,e,o,i=this.options.rotation;return i?(t=(e=this.normalBox.center()).x,e=e.y,o=this.rotatedBox.center(),A.geometry.transform().translate(o.x-t,o.y-e).rotate(i,[t,e])):null},Ue),o=((ze=r)&&(He.__proto__=ze),((He.prototype=Object.create(ze&&ze.prototype)).constructor=He).prototype.reflow=function(t){ze.prototype.reflow.call(this,t),this.box.snapTo(t,y)},He.buildTitle=function(t,e){var o,t="string"==typeof t?{text:t}:t;return o=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new He(t):o},He.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==w}),t=t.filter(function(t){return t&&t.options.position===w});return Fe(e),Fe(t),t.reverse(),e.concat(t)},He);function He(t){ze.call(this,t),this._textBox=new De(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function Ue(t,e,o){Ve.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new R)}function Fe(t){for(var e=1;e<t.length;e++){var o=t[e]._textBox,i=t[e-1]._textBox;i.options.margin=Object.assign(P(i.options.margin),{bottom:0}),o.options.margin=Object.assign(P(o.options.margin),{top:0})}}i(o,{color:D,position:k,align:b,margin:P(5),padding:P(5)});var Ne,Ge=o,o=((Ne=De)&&(We.__proto__=Ne),((We.prototype=Object.create(Ne&&Ne.prototype)).constructor=We).prototype.visualContext=function(t){t=Ne.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},We.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Lt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},We.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ie(t.bbox(e.matrix()))):Ne.prototype.rotate.call(this),this.box},We.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return Ne.prototype.rotationTransform.call(this);var o=A.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||k,n=t===k||t===w?y:v,s=t===k||t===w?v:y,t=t===k||t===C?r.origin:r.bottomRight(),a=i.topLeft().transformCopy(o),h=i.topRight().transformCopy(o),p=i.bottomRight().transformCopy(o),i=i.bottomLeft().transformCopy(o),o=A.geometry.Rect.fromPoints(a,h,p,i),l={};l[s]=r.origin[s]-o.origin[s];var c,o=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(h[s]+l[s]-t[s]),s=M(o,F)===M(t,F)?(c=a,h):t<o?(c=h,p):(c=a,i),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,A.geometry.transform().translate(l.x,l.y).rotate(e)},We);function We(t,e,o,i,r){Ne.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new R)}i(o,{_autoReflow:!1});var qe,Xe=o,o=((qe=be)&&(Ye.__proto__=qe),((Ye.prototype=Object.create(qe&&qe.prototype)).constructor=Ye).prototype.hide=function(){this.options.visible=!1},Ye.prototype.show=function(){this.options.visible=!0},Ye.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 R,r=function(){return h},n=p.size,s=this.fields.text,T(o)&&o.visible&&((a=dt(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 De(s,x({},o)),this.label.aliasFor=r,"inside"!==o.position||T(n)||(p.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))),p.width=t||n||7,p.height=e||n||7,(a=new Ce(x({},p))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new R),this.wrapperBox=i.wrap(a.box))},Ye.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),p=r.line.length,l=r.position;r.visible&&(u(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-p,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[i.x2,h.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(p,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[i.x1,h.y]],o=i.clone().wrapPoint(e))):l===w?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,p),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-p),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s)&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box)),this.contentBox=i,this.targetBox=t,this.box=o||i)},Ye.prototype.createVisual=function(){qe.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Ye.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()):qe.prototype.renderVisual.call(this)},Ye.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(J(t=A.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Ye.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},Ye.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},Ye.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Ye.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Lt(t),text:T(e.label)?e.label.text:"",visual:this.visual})},Ye);function Ye(t,e,o){qe.call(this,e),this.fields=t,this.chartService=o,this.render()}i(o,{icon:{visible:!0,type:H},label:{position:"inside",visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:k,zIndex:2});function Ze(){}function Qe(t){this._intlService=t}function Ke(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new oo(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}var $e=o,Je={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}},to=(Ze.register=function(t){Je=t},o.implementation.get=function(){return Je},Object.defineProperties(Ze,o),Ze),eo=/\{(\d+)(:[^\}]+)?\}/g,o={intl:{configurable:!0}},oo=(o.intl.get=function(){return this._intlService||to.implementation},o.intl.set=function(t){this._intlService=t},Qe.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return et(t)&&t.match(N)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Qe.prototype.localeAuto=function(t,i,r){var n=this.intl;return et(t)&&t.match(N)?t.replace(eo,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(Qe.prototype,o),Qe),o={intl:{configurable:!0}};o.intl.get=function(){return this._intlService||to.implementation},o.intl.set=function(t){this._intlService=t,this.format.intl=t},Ke.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Ke.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Ke.prototype,o);function io(){}var ro,no=Ke,so=(io.register=function(t){ro=t},io.create=function(t,e){if(ro)return ro.create(t,e)},io);function ao(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new A.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),J(n),n}function ho(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new A.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),J(e),e}(po=r)&&(n.__proto__=po),((n.prototype=Object.create(po&&po.prototype)).constructor=n).prototype.initFields=function(){},n.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},n.prototype.normalizeLabelRotation=function(t){var e=t.rotation;st(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},n.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:b,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))}}},n.prototype.clearLabels=function(){this.children=vt(this.children,function(t){return!(t instanceof Xe)}),this.labels=[]},n.prototype.clearTitle=function(){var e=this;this.title&&(this.children=vt(this.children,function(t){return t!==e.title}),this.title=void 0)},n.prototype.clear=function(){this.clearLabels(),this.clearTitle()},n.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 R(r,e.y1,r,e.y2-t):new R(e.x1,i,e.x2-t,i)},n.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 De(t.text,t),this.append(t),this.title=t)},n.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 $e({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(T(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,w])||(r.options.position=t.reverse?w:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?w:k,this.append(r),this.notes.push(r))}},n.prototype.parseNoteValue=function(t){return t},n.prototype.renderVisual=function(){po.prototype.renderVisual.call(this),this.createPlotBands()},n.prototype.createVisual=function(){po.prototype.createVisual.call(this),this.createBackground(),this.createLine()},n.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new A.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},n.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)T(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(ao(p,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},n.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new A.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&J(e),(o=this._lineGroup=new A.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},n.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},n.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=A.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},n.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 A.drawing.Group({zIndex:-1}),s=vt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var h=o[a],p=void 0,l=void 0,c=h.label,u=void 0,l=i?(p=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(p=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,h,new R(p.x1,l.y1,p.x2,l.y2))),0!==p.width()&&0!==l.height()&&(c=new A.geometry.Rect([p.x1,l.y1],[p.width(),l.height()]),p=A.drawing.Path.fromRect(c,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(p),u)&&n.append(u)}this.appendVisual(n)}},n.prototype.createPlotBandLabel=function(t,e,o){var i,r;return!1===t.visible?null:(i=t.text,T(t)&&t.visible&&((r=dt(t))?i=r({text:i,item:e}):t.format&&(i=this.chartService.format.auto(t.format,i)),t.color||(t.color=this.options.labels.color)),(r=new De(i,t)).reflow(o),r.renderVisual(),r.visual)},n.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],p={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=M(t[n]);u(s,l)||n%o==0||a&&h===s||(p.position=s,c.append(ho(p,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},n.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,h=((this.getRoot()||{}).box||t)[s](),p=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=h&&(p=Math.max(p,c))}this.box=r?new R(t.x1,t.y1,t.x1+p+a,t.y2):new R(t.x1,t.y1,t.x2,t.y1+p+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},n.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},n.prototype.labelTickIndex=function(t){return t.index},n.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),p=i?a.box.height():a.box.width(),l=n[h],h=n[h+1],c=void 0,u=void 0,u=i?c=o?l+(h-l)/2-p/2:l-p/2:o?(c=l,h):(c=l-p/2)+p;this.positionLabel(a,r,c,u)}},n.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=w):(n+=r,t.options.rotationOrigin=k),new R(o,n,i,n+t.box.height()));t.reflow(s)},n.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},n.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 R);return!0}},n.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:w),e.reflow(this.box))},n.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;T(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},n.prototype.noteSlot=function(t){return this.getSlot(t)},n.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]},n.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=dt(e),n=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return n},n.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},n.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},n.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,h=0,p=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],h=Math.max(h,d-c.box[r+1]),p=Math.max(p,c.box[r+2]-f)}return{start:h,end:p}},n.prototype.limitRange=function(t,e,o,i,r){var n,s,a=this.options;return t<o&&r<0&&(!T(a.min)||a.min<=o)||i<e&&0<r&&(!T(a.max)||i<=a.max)?null:e<o&&0<r||i<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<o&&r<0?(n=_(t,o,i),s=_(t+a,o+a,i)):i<e&&0<r&&(s=_(e,o,i),n=_(e-a,o,i-a)),{min:n,max:s})},n.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},n.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},n.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]}},n.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},n.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},n.prototype.labelsBetweenTicks=function(){return!this.options.justified},n.prototype.prepareUserOptions=function(){};var po,o=n;function n(t,e){void 0===e&&(e=new no),po.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!==q},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!==q},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:D,visible:!0},title:{visible:!0,position:b},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:q,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:D,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var lo=o,co="milliseconds",uo="seconds",fo="minutes",go="hours",yo="days",vo="weeks",mo="months",xo="years",_o=1e3,bo=60*_o,wo=60*bo,Co=24*wo,So=7*Co,ko=31*Co,Ao=365*Co,Po={years:Ao,months:ko,weeks:So,days:Co,hours:wo,minutes:bo,seconds:_o,milliseconds:1};function To(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*bo}function Mo(t,e){return new Date(t.getTime()+e)}function Oo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Bo(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Ro(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=Oo(t)).getHours(),o===xo?Bo(a=new Date(t.getFullYear()+e,0,1),0):o===mo?Bo(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===vo?Bo(a=Ro(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,yo),i):o===yo?Bo(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===go?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),a=Mo(s,(i.getTimezoneOffset()-s.getTimezoneOffset())*bo+n*wo)):o===fo?0<(a=Mo(t,e*bo)).getSeconds()&&a.setSeconds(0):o===uo?a=Mo(t,e*_o):o===co&&(a=Mo(t,e)),o!==co)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function Eo(t,e,o){return Ro(Oo(t),0,e,o)}function Lo(t,e,o){t=Oo(t);return t&&Eo(t,e,o).getTime()===t.getTime()?t:Ro(t,1,e,o)}function Io(t,e){return t&&e?t.getTime()-e.getTime():-1}function zo(t,e){return t.getTime()-e}function Vo(t){if(Z(t)){for(var e=[],o=0;o<t.length;o++)e.push(Vo(t[o]));return e}if(t)return Oo(t).getTime()}function jo(t,e){return t&&e?Vo(t)===Vo(e):t===e}function Do(t,e,o){return To(t,e)/Po[o]}function Ho(t,e,o,i){var t=Oo(t),r=Oo(e);return(o===mo?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Do(t,new Date(t.getFullYear(),t.getMonth()),yo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===xo?t.getFullYear()-r.getFullYear()+Ho(t,new Date(t.getFullYear(),0),mo,1)/12:o===yo||o===vo?Do(t,r,o):zo(t,e)/Po[o])/i}function Uo(t,e,o){return o===xo?e.getFullYear()-t.getFullYear():o===mo?12*Uo(t,e,xo)+e.getMonth()-t.getMonth():o===yo?Math.floor(zo(e,t)/Co):Math.floor(zo(e,t)/Po[o])}function Fo(t,e){return et(e)&&t.parseDate(e)||Oo(e)}function No(t,e){if(Z(e)){for(var o=[],i=0;i<e.length;i++)o.push(Fo(t,e[i]));return o}return Fo(t,e)}function Go(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Wo=lo)&&(s.__proto__=Wo),((s.prototype=Object.create(Wo&&Wo.prototype)).constructor=s).prototype.initFields=function(){this._ticks={}},s.prototype.categoriesHash=function(){return""},s.prototype.clone=function(){var t=new s(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},s.prototype.initUserOptions=function(t){var e=t.categories||[],o=T(t.min),i=T(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},s.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)}},s.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}},s.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},s.prototype.roundedRange=function(){return this.range()},s.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},s.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}},s.prototype.arrangeLabels=function(){Wo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},s.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=zt(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)},s.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},s.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},s.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},s.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},s.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)],h=this.tickIndices(t),p=[],l=0;l<h.length;l++)p.push(a+M(r*(h[l]-s),3));return p},s.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},s.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)},s.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]}},s.prototype.lineDir=function(){return this.options.reverse?-1:1},s.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,h=this.lineInfo(),p=h.axis,h=h.lineStart,l=a.clone(),c=!T(e),t=O(t,0),e=O(e,t),e=Math.max(e-1,t),u=h+(t-n)*s,h=h+(Math.max(t,e)+1-n)*s;return c&&i&&(h=u),o&&(u=_(u,a[p+1],a[p+2]),h=_(h,a[p+1],a[p+2])),l[p+1]=r?h:u,l[p+2]=r?u:h,l},s.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},s.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),Wo.prototype.slot.call(this,t,e,o)},s.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,h=s[e+1],s=s[e+2],t=t[e];return t<h||s<t?null:(s=(e=(o?r:a)+(t-h)/n)%1,i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e))},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},s.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},s.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},s.prototype.categoriesCount=function(){return(this.options.categories||[]).length},s.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=M(t/(o/e),F);return{min:t,max:e+t}},s.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}},s.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)}},s.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},s.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}},s.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=O(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new Xe(i,o,t,r,e)},s.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},s.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},s.prototype.arrangeNotes=function(){Wo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},s.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()}},s.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=M(t/o,F),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},s.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}},s.prototype.valueRange=function(){return this.range()},s.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(jo(i[n],o))return n;return-1}return i.indexOf(o)},s.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}},s.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new _t,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},s.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Wo,o=s;function s(){Wo.apply(this,arguments)}i(o,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:D},labels:{zIndex:1},justified:!1,_deferLabels:!0});var qo=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"},Xo=[co,uo,fo,go,yo,vo,mo,xo],Yo="fit";function Zo(t){var e=t._range;return e||((e=t._range=Ut(t)).min=Oo(e.min),e.max=Oo(e.max)),e}function Qo(t){this.options=t}function Ko(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=Ro(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&jo(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&&jo(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))}Qo.prototype.displayIndices=function(){return{min:0,max:1}},Qo.prototype.displayRange=function(){return{}},Qo.prototype.total=function(){return{}},Qo.prototype.valueRange=function(){return{}},Qo.prototype.valueIndex=function(){return-1},Qo.prototype.values=function(){return[]},Qo.prototype.totalIndex=function(){return-1},Qo.prototype.valuesCount=function(){return 0},Qo.prototype.totalCount=function(){return 0},Qo.prototype.dateAt=function(){return null};function $o(t,e,o){for(var i,r,n,s=Zo(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,p=t.maxDateGroups,l=t.baseUnit===Yo,c=e?Xo.indexOf(e):0,u=l?Xo[c++]:t.baseUnit,d=a/Po[u],f=d;!r||p<=d;){for(i=i||h[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===zt(Xo)){r=Math.ceil(f/p);break}if(!l){p<d&&(r=Math.ceil(f/p));break}u=Xo[c++]||zt(Xo),f=a/Po[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}Ko.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ko.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Ho(this.displayStart,this.valueStart,o,t),o=Ho(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},Ko.prototype.total=function(){return{min:this.start,max:this.end}},Ko.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ko.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ko.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Ho(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ko.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Ho(t,this.start,e.baseUnit,e.baseUnitStep))},Ko.prototype.dateIndex=function(t){var e=this.options;return Ho(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ko.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ko.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=Ro(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ko.prototype.dateAt=function(t,e){var o=this.options;return Ro(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Ko.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Ho(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),Ro(s,e*n,r,i)};(Jo=qo)&&(p.__proto__=Jo),((p.prototype=Object.create(Jo&&Jo.prototype)).constructor=p).prototype.clone=function(){var t=new p(Object.assign({},this.options),this.chartService);return t.createLabels(),t},p.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},p.prototype.initUserOptions=function(t){return t},p.prototype.initFields=function(){Jo.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=No(e,i))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:i,min:Fo(e,o.min),max:Fo(e,o.max),weekStartDay:Go(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=Zo(i),t=o.maxDivisions,this.dataRange=new Ko(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==Yo&&!u(e,Xo)){for(var o,i,r=t,n=r.categories,s=T(n)?n.length:0,a=G,h=0;h<s;h++){var p,l=n[h];l&&o&&0<(p=To(l,o))&&(i=(a=Math.min(a,p))>=Ao?xo:ko-3*Co<=a?mo:So<=a?vo:Co<=a?yo:wo<=a?go:bo<=a?fo:uo),o=l}r.baseUnit=i||yo}return e!==Yo&&"auto"!==t.baseUnitStep||$o(t),t}(o)),t?(i=this.dataRange.displayRange(),$o(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 Ko(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||yo,this.dataRange=this.divisionRange=new Qo(o)),this.rangeLabels=[]},p.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return Jo.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&&r.splice(h,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},p.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Io(t,e.min)&&Io(t,e.max)<=0&&o.length},p.prototype.parseNoteValue=function(t){return Fo(this.chartService.intl,t)},p.prototype.noteSlot=function(t){return this.getSlot(t)},p.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=M(t/r,F);return n.min&&n.max&&(r=Mo(e.min||n.min,t),e=Mo(e.max||n.max,t),n={min:Ro(r,0,o,i),max:Ro(e,0,o,i)}),n},p.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},p.prototype.pan=function(t){var e,o,i,r,n;return this.isEmpty()?null:(e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,o=this.dataRange.total(),i=Mo(r,t=M(t/(i/(n-r)),F)*(e.reverse?-1:1)),r=Mo(n,t),(n=this.limitRange(Vo(i),Vo(r),Vo(o.min),Vo(o.max),t))?(n.min=Oo(n.min),n.max=Oo(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},p.prototype.pointsRange=function(t,e){var o,i;return this.isEmpty()?null:(t=Jo.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=zo(e.max,e.min)/(o.max-o.min),i=this.options,{min:Mo(e.min,t.min*o),max:Mo(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep})},p.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Yo,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),h=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(i){var p,l,c=o.autoBaseUnitSteps,e=o.maxDateGroups,i=zt(c[h])*e*Po[h],u=zo(n,s),d=zo(a,t),f=Xo.indexOf(h);if(d<Po[h]&&h!==co)h=Xo[f-1],t=Mo(s,l=(u-(e-1)*(p=zt(c[h]))*Po[h])/2),a=Mo(n,-l);else if(i<d&&h!==xo){var g=0;do{for(h=Xo[++f],g=0,l=2*Po[h];p=c[h][g],++g<c[h].length&&l*p<u;);}while(h!==xo&&l*p<u);0<(l=(l*p-u)/2)&&(t=Mo(s,-l),a=Mo(n,l),t=Mo(t,_(a,r.min,r.max)-a),a=Mo(a,_(t,r.min,r.max)-t))}}return t&&a&&0<zo(a,t)?{min:t,max:a,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},p.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},p.prototype.range=function(){return this.dataRange.displayRange()},p.prototype.createLabels=function(){Jo.prototype.createLabels.call(this),this.createRangeLabels()},p.prototype.clearLabels=function(){Jo.prototype.clearLabels.call(this),this.rangeLabels=[]},p.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Jo.prototype.arrangeLabels.call(this)},p.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))},p.prototype.autoRotateLabels=function(){Jo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},p.prototype.hideOutOfRangeLabels=function(){Jo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},p.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)}},p.prototype.contentBox=function(){for(var t=Jo.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},p.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 Xe(r,n,t,i,e)},p.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:b,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"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 Xe(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})))},p.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 R))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},p.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},p.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()},p.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),Jo.prototype.getSlot.call(this,t,e,o)},p.prototype.valueRange=function(){var t=Zo(this.options.srcCategories);return{min:Oo(t.min),max:Oo(t.max)}},p.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},p.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},p.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},p.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},p.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},p.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},p.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},p.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},p.prototype.totalRange=function(){return this.dataRange.total()},p.prototype.totalCount=function(){return this.dataRange.totalCount()},p.prototype.isEmpty=function(){return!this.options.srcCategories.length},p.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=Zo((t=this.options).srcCategories),new Ko(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())};var Jo,h=p;function p(){Jo.apply(this,arguments)}i(h,{type:U,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 ti=h;function ei(t,e){return M(Math.floor(t/e)*e,F)}function oi(t,e){return M(Math.ceil(t/e)*e,F)}function ii(t){return Math.max(Math.min(t,3e5),-3e5)}var ri,ni=Math.pow(10,-9),h=((ri=lo)&&(si.__proto__=ri),((si.prototype=Object.create(ri&&ri.prototype)).constructor=si).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=te(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&ai(e,n,1/3)&&(e-=n),0<a)&&ai(a,n,1/3)&&(a+=n),s.min=ei(e,n),s.max=oi(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:T((a=t).min)?Math.min(e.min,a.min):e.min,max:T(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var h=s,p=["min","max"],l=0;l<p.length;l++){var c=p[l];null===h[c]&&(h[c]=void 0)}var u=T(s.min),d=T(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=ei(n.min,s.majorUnit),n.max=oi(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=te(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},si.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},si.prototype.clone=function(){return new si(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},si.prototype.startValue=function(){return 0},si.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},si.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(M(e/t,3))+1)},si.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),h=this.getDivisions(t),p=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&p.push(M(l,3)),l+=a*r;return p},si.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},si.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},si.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=O(t,e||0),e=O(e,t||0),t=(o&&(p=_(p,i.min,i.max),e=_(e,i.min,i.max)),Math.min(p,e)-i.min),o=Math.max(p,e)-i.min,p=new R(a.x1,a.y1,a.x1,a.y1);return p[n+1]=ii(r+h*(0<s?t:o)),p[n+2]=ii(r+h*(0<s?o:t)),p},si.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:M(e+t*(o-e),F)},si.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=M(t/(n/(r-e)),F);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},si.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},si.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=M(i.min+t*i.majorUnit,F),o=this.axisLabelText(i,e,o);return new Xe(i,o,t,null,e)},si.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},si.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},si.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}},si.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=M(this.options.min+e*t,F),t=M(this.options.max-o,F);return{min:e,max:t=t-e<ni?e+ni:t}},si.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}},si.prototype.isValidRange=function(t,e){return ni<e-t},si);function si(t,e,o,i){ri.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function ai(t,e,o){t=M(Math.abs(t%e),F);return 0===t||e*(1-o)<t}i(h,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:D},labels:{format:"#.####################"},zIndex:1});var hi,pi=h,h=((hi=lo)&&(li.__proto__=hi),((li.prototype=Object.create(hi&&hi.prototype)).constructor=li).prototype.clone=function(){return new li(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},li.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},li.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Uo(e.min,e.max,e.baseUnit)/t+1)},li.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/zo(e.max,e.min),h=e.weekStartDay||0,p=[n],l=1;l<s;l++){var c=n+zo(Ro(e.min,l*t,e.baseUnit,h),e.min)*a*i;p.push(M(c,3))}return p},li.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},li.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},li.prototype.getSlot=function(t,e,o){return pi.prototype.getSlot.call(this,Fo(this.intlService,t),Fo(this.intlService,e),o)},li.prototype.getValue=function(t){t=pi.prototype.getValue.call(this,t);return null!==t?Oo(t):null},li.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},li.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=Ro(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new Xe(s,n,t,null,e)},li.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/zo(n.max,n.min),n=M(t/o,F);return{min:Mo(e.min,n=!i&&!r||i&&r?n:-n),max:Mo(e.max,n),offset:n}},li.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Io(t,e.min)&&Io(t,e.max)<=0},li.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Vo(t.min),Vo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Oo(t.min),max:Oo(t.max)}},li.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:Oo(o),max:Oo(t)}},li.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=Oo(Vo(this.options.min)+o),o=Oo(Vo(this.options.max)-e);return{min:t,max:o=o-t<1e3?Oo(Vo(t)+1e3):o}},li.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:Oo(_(Vo(t.min),this.totalMin,this.totalMax)),max:Oo(_(Vo(t.max),this.totalMin,this.totalMax))}},li);function li(t,e,o,i){var r,n,s,a,h,p,l,c,t=Oo(t),e=Oo(e),u=i.intl,o=o||{},d=(d=t,r=e,n=o=x(o||{},{min:Fo(u,o.min),max:Fo(u,o.max),axisCrossingValue:No(u,o.axisCrossingValues||o.axisCrossingValue),weekStartDay:Go(o,u)}),d=n.min||d,r=n.max||r,s=n.baseUnit||(r&&d?(s=To(r,d),a=go,Ao<=s?a=xo:ko<=s?a=mo:So<=s?a=vo:Co<=s&&(a=yo),a):go),a=Po[s],h=n.weekStartDay||0,d=Eo(Vo(d)-1,s,h)||Oo(r),r=Lo(Vo(r)+1,s,h),p=n.majorUnit||oi(te(d.getTime(),r.getTime()),a)/a,l=oi(l=Uo(d,r,s),p)-l,c=Math.floor(l/2),l-=c,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Ro(d,-c,s,h),n.max=n.max||Ro(r,l,s,h),n.minorUnit=n.minorUnit||p/5,n.majorUnit=p,o=n,hi.call(this,o,i),this.intlService=u,this.seriesMin=t,this.seriesMax=e,o.weekStartDay||0);this.totalMin=Vo(Eo(Vo(t)-1,o.baseUnit,d)),this.totalMax=Vo(Lo(Vo(e)+1,o.baseUnit,d))}i(h,{type:U,majorGridLines:{visible:!0,width:1,color:D},labels:{dateFormats:o}});var ci,ui=h,o=((ci=lo)&&(di.__proto__=ci),((di.prototype=Object.create(ci&&ci.prototype)).constructor=di).prototype.clone=function(){return new di(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},di.prototype.startValue=function(){return this.options.min},di.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,h=this.lineInfo(),p=h.axis,l=h.axisDir,c=h.lineBox,u=h.lineSize,h=h.lineStart,u=l*(u/(n-r)),n=O(t,e||1),e=O(e,t||1);if(n<=0||e<=0)return null;o&&(n=_(n,a,i),e=_(e,a,i));n=gi(n,s),e=gi(e,s),t=Math.min(n,e)-r,o=Math.max(n,e)-r,a=new R(c.x1,c.y1,c.x1,c.y1);return a[p+1]=ii(h+u*(0<l?t:o)),a[p+2]=ii(h+u*(0<l?o:t)),a},di.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:M(Math.pow(e,o+s*((i-o)/r)),F)},di.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},di.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=M(t/(s/(i-o)),F);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},di.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},di.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},di.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(ao(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),i.visible&&this.traverseMinorTicksPositions(h,i),[]},di.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(ho(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},di.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(M(i+r*(a-n),F),e)},di.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,h=o.step,p=this.logMin,l=this.logMax,c=Math.floor(p);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(M(a+h*(gi(f,s)-p),F),e)}},di.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 Xe(i,o,t,null,e)},di.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},di.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},di.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},di.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=gi(this.options.min,o),r=gi(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}},di.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)}},di.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}},di.prototype.lineInfo=function(){var t=ci.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},di);function di(t,e,o,i){var r,n,s,a,h,p=x({majorUnit:10,min:t,max:e},o),l=p.majorUnit,c=(c=M(gi(h=e,u=l),F)%1,h<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,gi(h,u)+.2):Math.pow(u,Math.ceil(gi(h,u)))),u=(h=t,s=(u=p).majorUnit,(a=h)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(gi(h,s)))),a),d=(h=u,s=c,a=o,r=(d=p).min,n=d.max,T(d.axisCrossingValue)&&d.axisCrossingValue<=0&&fi(),T(a.max)?a.max<=0&&fi():n=s,T(a.min)?a.min<=0&&fi():r=h,{min:r,max:n});p.max=d.max,p.min=d.min,p.minorUnit=o.minorUnit||M(l-1,F),ci.call(this,p,i),this.totalMin=T(o.min)?Math.min(u,o.min):u,this.totalMax=T(o.max)?Math.max(c,o.max):c,this.logMin=M(gi(d.min,l),F),this.logMax=M(gi(d.max,l),F),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function fi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function gi(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:D},zIndex:1,_deferLabels:!0});var yi,vi=o,h={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),Tt(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 A.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new A.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 St(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},o=((yi=qo)&&(mi.__proto__=yi),((mi.prototype=Object.create(yi&&yi.prototype)).constructor=mi).prototype.range=function(){return{min:0,max:this.options.categories.length}},mi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},mi.prototype.lineBox=function(){return this.box},mi.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new R,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()))}},mi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=o||1,p=[],l=e||0;l<s;l+=h)r=n.reverse?360-l*a:l*a,r=M(r,3)%360,i&&u(r,i)||p.push(r);return p},mi.prototype.majorIntervals=function(){return this.intervals(1)},mi.prototype.minorIntervals=function(){return this.intervals(.5)},mi.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},mi.prototype.majorAngles=function(){var e=this;return St(this.majorIntervals(),function(t){return e.intervalAngle(t)})},mi.prototype.createLine=function(){return[]},mi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},mi.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)},mi.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==j)return t=jt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&u(t,r)?e:i}},mi.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new A.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,ye.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},mi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},mi.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 le(r.center(),0,r.height()/2,o,n)},mi.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new A.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},mi.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},mi);function mi(){yi.apply(this,arguments)}i(o,{startAngle:90,labels:{margin:P(10)},majorGridLines:{visible:!0},justified:!0}),x(o.prototype,h);var xi,_i=o,o=((xi=lo)&&(bi.__proto__=xi),((bi.prototype=Object.create(xi&&xi.prototype)).constructor=bi).prototype.getDivisions=function(t){return pi.prototype.getDivisions.call(this,t)-1},bi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},bi.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 R,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()))}},bi.prototype.lineBox=function(){return this.box},bi.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&&u(p,i)||s.push(p)}return s},bi.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},bi.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},bi.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},bi.prototype.createLine=function(){return[]},bi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},bi.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)},bi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},bi.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 le(i.center(),0,i.height()/2,t,e-t)},bi.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 A.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},bi.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(Ot(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},bi.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},bi);function bi(t,e){xi.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:P(10)},majorGridLines:{color:D,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(o.prototype,h,{createPlotBands:_i.prototype.createPlotBands,majorAngles:_i.prototype.majorAngles,range:pi.prototype.range,labelsCount:pi.prototype.labelsCount,createAxisLabel:pi.prototype.createAxisLabel});var wi=o;function Ci(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Si,h={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 A.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 le(r,r.y-a.y2,r.y-a.y1,0,360),a=e===j?ye.current.createRing(a,h):A.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 A.geometry.Circle(r,t.innerRadius),s=new A.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(),Tt(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(),h=n;h<e.length;h+=s){var p=t.y-e[h];if(0<p){var l=new A.geometry.Circle([t.x,t.y],p);if(i.type===j)a.append(new A.drawing.Circle(l,r));else{for(var c=new A.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!==j&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(Ot(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return Ci(t,o)-Ci(e,o)}),r=90-Ci(n[0],n[1])/2,t=180-Ci(o,n[0])-r,a=s*(Math.sin(jt(t))/Math.sin(jt(r)))),this.axisType().prototype.getValue.call(this,new B(i.x1,i.y2-a))}},o=((Si=pi)&&(ki.__proto__=Si),((ki.prototype=Object.create(Si&&Si.prototype)).constructor=ki).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},ki.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},ki.prototype.axisType=function(){return Si},ki);function ki(){Si.apply(this,arguments)}x(o.prototype,h);var Ai,Pi=o,o=((Ai=vi)&&(Ti.__proto__=Ai),((Ti.prototype=Object.create(Ai&&Ai.prototype)).constructor=Ti).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ti.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ti.prototype.axisType=function(){return Ai},Ti);function Ti(){Ai.apply(this,arguments)}x(o.prototype,h);var Mi=o;function Oi(t){return t<=0?-1:1}(Ri=A.Class)&&(zi.__proto__=Ri),((zi.prototype=Object.create(Ri&&Ri.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]))){var n,s=e[0],a=e[1],h=e[2];for(o.push(new A.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),zt(o).controlOut(this.firstControlPoint(t,s,a,y,v)),o.push(new A.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{i?(s=e[r-1],a=e[0],h=e[1],l=(t=this.controlPoints(s,a,h))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var p,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],h=e[u+2],p=this.controlPoints(s,a,h),zt(o).controlOut(c),c=p[1],p=p[0],o.push(new A.geometry.Segment(a,p)));i?(s=e[r-2],a=e[r-1],h=e[0],t=this.controlPoints(s,a,h),zt(o).controlOut(c),o.push(new A.geometry.Segment(a,t[0])),zt(o).controlOut(t[1]),o.push(new A.geometry.Segment(h,n))):(l=this.tangent(a,h,y,v),zt(o).controlOut(c),o.push(new A.geometry.Segment(h,this.secondControlPoint(l,a,h,y,v))))}}return 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||M(i,1)===M(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,h=(this.isLine(t,e,o)?i=this.tangent(t,e,y,v):(h={x:this.isMonotonicByField(t,e,o,y),y:this.isMonotonicByField(t,e,o,v)}).x&&h.y?(i=this.tangent(t,o,y,v),s=!0):(this.invertAxis(t,e,o)&&(r=v,n=y),h[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Oi((o[n]-t[n])*(e[r]-t[r])):-Oi((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]},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 A.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};var Bi,Ri,Ei=zi,Li=((Bi=A.Class)&&(Ii.__proto__=Bi),((Ii.prototype=Object.create(Bi&&Bi.prototype)).constructor=Ii).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Ii.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Ii.prototype.range=function(){return this._axis.range()},Ii.prototype.valueRange=function(){return this._axis.valueRange()},Ii);function Ii(t){Bi.call(this),this._axis=t,this.options=t.options}function zi(t){Ri.call(this),this.closed=t}function Vi(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Li(e[o])}function ji(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}ji.prototype.findAxisByName=function(t){return Vi(t,this._pane.axes)};var Di,Hi=ji,Ui=((Di=A.Class)&&(Fi.__proto__=Di),(Fi.prototype=Object.create(Di&&Di.prototype)).constructor=Fi);function Fi(t){Di.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Ni(t){for(var e=t.length,o=0,i=0;i<e;i++)m(t[i])&&o++;return o}var Gi={min:function(t){for(var e=t.length,o=G,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.min(o,r))}return o===G?t[0]:o},max:function(t){for(var e=t.length,o=W,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.max(o,r))}return o===W?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=Ni(t)?Gi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&T(r)&&o++}return o},avg:function(t){var e=Ni(t),o=t[0];return o=0<e?Gi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&T(i))return i}return t[0]}},Wi=Gi;function qi(t,e){return null===e?e:yt(t)(e)}(Xi=A.Class)&&(Yi.__proto__=Xi),((Yi.prototype=Object.create(Xi&&Xi.prototype)).constructor=Yi).prototype.register=function(t,e,o){void 0===e&&(e=[Y]),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)}},Yi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Yi.prototype.valueFields=function(t){return this._valueFields[t.type]||[Y]},Yi.prototype.otherFields=function(t){return this._otherFields[t.type]||[Y]},Yi.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=T(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]:T(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],T(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Yi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Yi.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},Yi.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]=qi(a,t))}return i},Yi.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===Y?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o};var Xi,h=Yi;function Yi(){Xi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}h.current=new h;var Zi,Qi,Ki=h,$i=/percent(?:\w*)\((\d+)\)/,Ji=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),tr=((Qi=A.Class)&&(yr.__proto__=Qi),((yr.prototype=Object.create(Qi&&Qi.prototype)).constructor=yr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,h=Ji.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}})},yr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ki.current,n=r.valueFields(t),i=T(i[0])?i[0]:{};return Z(i)?o=yt("["+(e?n.indexOf(e):0)+"]"):m(i)?o=yt():"object"==typeof i&&(o=yt(r.sourceFields(t,n)[n.indexOf(e)])),o},yr.prototype.getErrorRange=function(t,e){var o;if(!T(e))return null;if(this.globalRange)return this.globalRange(t);if(Z(e))i=t-e[0],r=t+e[1];else if(m(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=$i.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}},yr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},yr.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)},yr.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}},yr),er=(A.support.browser||{}).msie?.001:0,or="zero",ir="interpolate",rr="bar",nr="column",sr="line",ar="pie",hr="verticalLine",pr=[rr,nr,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],lr="drag",cr="dragEnd",ur="zoom",dr="zoomEnd",fr="DOMMouseScroll mousewheel",o=((Zi=r)&&(gr.__proto__=Zi),((gr.prototype=Object.create(Zi&&Zi.prototype)).constructor=gr).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 B(n.x,r.y1),new B(n.x,r.y2)],o&&e.push(new B(a,r.y1),new B(s,r.y1),new B(a,r.y2),new B(s,r.y2)),this.box=new R(a,r.y1,s,r.y2)):(e=[new B(r.x1,n.y),new B(r.x2,n.y)],o&&e.push(new B(r.x1,a),new B(r.x1,s),new B(r.x2,a),new B(r.x2,s)),this.box=new R(r.x1,a,r.x2,s)),this.linePoints=e},gr.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},gr.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()},gr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Zi.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new A.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);J(r),this.visual.append(r)}},gr);function gr(t,e,o,i,r,n){Zi.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function yr(t,e,o){Qi.call(this),this.initGlobalRanges(t,e,o)}i(o,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var vr,mr=o,xr=((vr=mr)&&(_r.__proto__=vr),((_r.prototype=Object.create(vr&&vr.prototype)).constructor=_r).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},_r);function _r(){vr.apply(this,arguments)}function br(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)!u(r,o.excluded)&&t.hasOwnProperty(r)&&(it(n=t[r])?(h=!0,i||(t[r]=O(n(e),s[r]))):st(n)&&(i||(o.defaults=s[r]),o.depth++,h=br(n,e,o,i)||h,o.depth--));return h}function wr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}(Cr=r)&&(l.__proto__=Cr),((l.prototype=Object.create(Cr&&Cr.prototype)).constructor=l).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},l.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},l.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,h=o[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||m(h.value)&&(r+=Math.abs(h.value),i.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},l.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var h=o[a];if(t===h)break;var p=t.series.stack,l=h.series.stack;if(p&&l){if(typeof p===X&&p!==l)continue;if(p.group&&p.group!==l.group)continue}p=this.plotValue(h);(0<=p&&r||p<0&&!r)&&(n+=p,i+=p,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,ot(t.value)?t.value:e]},l.prototype.stackLimits=function(t,e){for(var o=G,i=W,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],T(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},l.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,Ut(n.negative).min)),n.positive.length)&&(h.max=Math.max(h.max,Ut(n.positive).max)),h.min!==G||h.max!==W?i[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},l.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;m(h)&&m(e)?i={low:h,high:e}:a&&T(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new tr(a.value,n,Y),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},l.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 xr(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},l.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}},l.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,T(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)},l.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=(T(a)||(this._evalSeries[n]=a=br(t,{},s,!0)),t);return a&&br(n=x({},n),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},l.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:G,max:W}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},l.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)},l.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},l.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},l.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(zt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},l.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},l.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},l.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},l.prototype.reflowPoint=function(t,e){t.reflow(e)},l.prototype.reflowCategories=function(){},l.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new R(i.x1,o.y1,i.x2,o.y2)},l.prototype.categorySlot=function(t,e){return t.getSlot(e)},l.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=wr(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)},l.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}))},l.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))},l.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},l.prototype.pointValue=function(t){return t.valueFields.value};var Cr,h=l;function l(t,e){Cr.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(h,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Sr,kr=h,Ar={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:Lt(t),originalEvent:t,point:this}}},o={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&T(e)&&null!==e&&(this.note=new $e({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},h=((Sr=r)&&(Pr.__proto__=Sr),((Pr.prototype=Object.create(Sr&&Sr.prototype)).constructor=Pr).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=dt(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new De(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Pr.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return T(t.color)||(t.color=new A.Color(e).brightness(.8).toHex()),t},Pr.prototype.createVisual=function(){},Pr.prototype.createMarker=function(){var t=this.options.markers;return new Ce({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:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Pr.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Pr.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 R(i.x,i.y,i.x,i.y)),this.note.reflow(t))},Pr.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?k:e)?w:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Pr.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 Ce({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:O(t.border.opacity,1)},opacity:O(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},Pr.prototype.highlightVisual=function(){return(this.marker||{}).visual},Pr.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 A.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},Pr.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=C,o=this.aboveAxis?(t=o.y1,w):(t=o.y2,k),{point:new B(i,t),align:{horizontal:e,vertical:o}}},Pr.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Pr.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Pr.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Pr.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Pr);function Pr(t,e){Sr.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0}h.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:P(3),padding:P(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},x(h.prototype,Ar),x(h.prototype,o);var Tr,Mr=h,h=((Tr=r)&&(Or.__proto__=Tr),((Or.prototype=Object.create(Tr&&Tr.prototype)).constructor=Or).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Or.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},Or.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&&!T(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Or.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(it(o)&&i&&(o=i.color),A.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},Or.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Or);function Or(t,e,o){Tr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}i(h,{closed:!1});var Br=h;function Rr(t,e,o,i,r){var t=t.box,n=new A.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var Er,h={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,h=Rr(t[0],r,s,n,a),p=[h],l=1;l<t.length;l++){var c,u=Rr(t[l],r,s,n,a);h[r]!==u[r]&&((c=new A.geometry.Point)[r]=h[r],c[n]=u[n],p.push(c,u)),h=u}return o?h!==zt(p)&&p.push(h):p.push(Rr(zt(t),r,s,n,e?1:2)),p}},Lr=((Er=Br)&&(Ir.__proto__=Er),((Ir.prototype=Object.create(Er&&Er.prototype)).constructor=Ir).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Ir);function Ir(){Er.apply(this,arguments)}x(Lr.prototype,h);var zr,Vr,jr=Lr,Dr=((Vr=Br)&&(Ur.__proto__=Vr),((Ur.prototype=Object.create(Vr&&Vr.prototype)).constructor=Ur).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(it(o)&&e&&(o=e.color),new Ei(this.options.closed).process(this.points())),o=new A.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},Ur),Lr={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),h=a.length,p=[],l=0;l<h;l++){var c=a[l];c?p.push(c):this.seriesMissingValues(s)!==ir&&(1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t)),p=[])}1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?or:t||ir},getNearestPoint:function(t,e,o){for(var i,r=new B(t,e),n=this.seriesPoints[o],s=G,a=0;a<n.length;a++){var h,p=n[a];p&&T(p.value)&&null!==p.value&&!1!==p.visible&&(h=p.box.center().distanceTo(r))<s&&(i=p,s=h)}return i}},c=((zr=A.drawing.Animation)&&(Hr.__proto__=zr),((Hr.prototype=Object.create(zr&&zr.prototype)).constructor=Hr).prototype.setup=function(){this._setEnd(this.options.box.x1)},Hr.prototype.step=function(t){var e=this.options.box;this._setEnd(bt(e.x1,e.x2,t))},Hr.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)},Hr);function Hr(){zr.apply(this,arguments)}function Ur(){Vr.apply(this,arguments)}i(c,{duration:600}),A.drawing.AnimationFactory.current.register("clip",c);var Fr=c;function Nr(t){for(var e=0;e<t.length;e++)if(T(t[e].zIndex))return!0}var Gr,c={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=A.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Fr(t,{box:e}),Nr(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&&T(i.visual.options.zIndex)&&i.visual.clip(t)}}},d=((Gr=kr)&&(Wr.__proto__=Gr),((Wr.prototype=Object.create(Gr&&Gr.prototype)).constructor=Wr).prototype.render=function(){Gr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Wr.prototype.pointType=function(){return Mr},Wr.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(!T(s)||null===s){if(n!==or)return null;s=0}n=this.pointOptions(r,e),n=this.evalPointOptions(n,s,i,o,r,e),i=t.fields.color||r.color,it(r.color)&&(i=n.color),o=new Mr(s,n);return o.color=i,this.append(o),o},Wr.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]},Wr.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?jr:"smooth"===i?Dr:Br)(t,e,o)},Wr.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)},Wr.prototype.supportsPointInactiveOpacity=function(){return!1},Wr);function Wr(){Gr.apply(this,arguments)}x(d.prototype,Lr,c);var qr,Xr,Yr=d,Zr=((Xr=Br)&&(Kr.__proto__=Xr),((Kr.prototype=Object.create(Xr&&Xr.prototype)).constructor=Kr).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;it(i)&&e&&(i=e.color),this.visual=new A.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)})},Kr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Kr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Kr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Kr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Kr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new A.geometry.Segment(t)})},Kr.prototype.createStroke=function(t){t=new A.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Kr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Kr.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),Tt(o,r)),new A.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Kr.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=zt(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)},Kr),d=((qr=Zr)&&(Qr.__proto__=qr),((Qr.prototype=Object.create(qr&&qr.prototype)).constructor=Qr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Qr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Qr);function Qr(){qr.apply(this,arguments)}function Kr(t,e,o,i,r){Xr.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}x(d.prototype,h);var $r,Jr,tn,en,on=d,rn=((en=Zr)&&(ln.__proto__=en),((ln.prototype=Object.create(en&&en.prototype)).constructor=ln).prototype.createStrokeSegments=function(){var t=new Ei(this.options.closed),e=this.points();return t.process(e)},ln.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new A.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},ln),nn=((tn=Yr)&&(pn.__proto__=tn),((pn.prototype=Object.create(tn&&tn.prototype)).constructor=pn).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?on:"smooth"===a?rn:Zr)(t,e,o,r,n)},pn.prototype.reflow=function(t){tn.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)}},pn.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 h=r;h<n;h++){for(var p,l=h+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<h&&!i[c][l-1]&&a.push(this._previousSegmentPoint(h,l,l-1,c)),a.push(u),"step"!==o&&h+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(h,l,l+1,c))):(p=this._createGapStackPoint(h),this._stackPoints.push(p),a.push(p))}return a},pn.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},pn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Mr(0,e);return e.categoryIx=t,e.series={},e},pn.prototype.seriesMissingValues=function(t){return t.missingValues||or},pn.prototype.supportsPointInactiveOpacity=function(){return!1},pn),sn=((Jr=A.Class)&&(hn.__proto__=Jr),((hn.prototype=Object.create(Jr&&Jr.prototype)).constructor=hn).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:G,max:W},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},hn.prototype.reset=function(t){this.axisRanges[t]=void 0},hn.prototype.query=function(t){return this.axisRanges[t]},hn),d=(($r=r)&&(an.__proto__=$r),((an.prototype=Object.create($r&&$r.prototype)).constructor=an).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},an.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?b:C,n.vAlign=o?k:b,"insideEnd"===e.position?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=w)):n.align=i?S:C:e.position===b?(n.vAlign=b,n.align=b):"insideBase"===e.position?o?n.vAlign=i?w:k:n.align=i?C:S:"outsideEnd"===e.position&&(h=o?i?new R(t.x1,t.y1-s.height(),t.x2,t.y1):new R(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=b,i?new R(t.x2,t.y1,t.x2+s.width(),t.y2):new R(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)},an.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))},an);function an(t,e,o){$r.call(this,e),this.textBox=new De(t,this.options,o),this.append(this.textBox)}function hn(){Jr.call(this),this.axisRanges={}}function pn(){tn.apply(this,arguments)}function ln(){en.apply(this,arguments)}i(d,{position:"outsideEnd",margin:P(3),padding:P(4),color:D,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var cn=d;function un(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}(dn=r)&&(fn.__proto__=dn),((fn.prototype=Object.create(dn&&dn.prototype)).constructor=fn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},fn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=dt(i))?e(t):this.formatValue(i.format),this.label=new cn(e,x({vertical:o.vertical},i),t),this.append(this.label))},fn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},fn.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)},fn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(dn.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 A.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},fn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(T(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=A.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)&&(J(r),i<1||o<1)&&(r.options.stroke.lineJoin="round"),t.append(r),un(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},fn.prototype.createHighlight=function(t){return J(A.drawing.Path.fromRect(this.box.toRect(),t))},fn.prototype.highlightVisual=function(){return this.rectVisual},fn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},fn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=T(e)?e:new A.Color(t).brightness(o).toHex()},fn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=C,p=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),p=w)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(p=w,t=s?(h=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,h=S),Math.max(n.y1,a.y1))),{point:new B(t,i),align:{horizontal:h,vertical:p}}},fn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},fn.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 dn,d=fn;function fn(t,e){dn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=O(this.options.aboveAxis,!0),this.value=t}x(d.prototype,Ar),x(d.prototype,o),d.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var gn=d;function yn(t,e){t.forEach(e)}function vn(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}(mn=r)&&(xn.__proto__=mn),((xn.prototype=Object.create(mn&&mn.prototype)).constructor=xn).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),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 mn,d=xn;function xn(t){mn.call(this,t),this.forEach=t.rtl?vn:yn}i(d,{vertical:!1,gap:0,spacing:0});var _n,bn=d,d=((_n=r)&&(wn.__proto__=_n),((wn.prototype=Object.create(_n&&_n.prototype)).constructor=wn).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,o=this.children,i=o.length,r=this.box=new R,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))}},wn);function wn(){_n.apply(this,arguments)}i(d,{vertical:!0});var Cn,Sn=d,d=((Cn=kr)&&(kn.__proto__=Cn),((kn.prototype=Object.create(Cn&&Cn.prototype)).constructor=kn).prototype.render=function(){Cn.prototype.render.call(this),this.updateStackRange()},kn.prototype.pointType=function(){return gn},kn.prototype.clusterType=function(){return bn},kn.prototype.stackType=function(){return Sn},kn.prototype.stackLimits=function(t,e){return Cn.prototype.stackLimits.call(this,t,e)},kn.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,h=this.pointValue(t),p=this.pointOptions(r,e),l=p.labels,l=(a&&"outsideEnd"===l.position&&(l.position="insideEnd"),p.isStacked=a,t.fields.color||r.color),t=(h<0&&p.negativeColor&&(l=p.negativeColor),p=this.evalPointOptions(p,h,i,o,r,e),it(r.color)&&(l=p.color),new(this.pointType())(h,p)),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},kn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===X){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},kn.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},kn.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},kn.prototype.createAnimation=function(){this._setAnimationOptions(),Cn.prototype.createAnimation.call(this),Nr(this.options.series)&&this._setChildrenAnimation()},kn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&T(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},kn.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 A.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},kn);function kn(){Cn.apply(this,arguments)}i(d,{animation:{type:rr}});var An,Pn=d,d=((An=r)&&(Tn.__proto__=An),((Tn.prototype=Object.create(An&&An.prototype)).constructor=Tn).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()},Tn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Tn.prototype.createVisual=function(){An.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Tn.prototype.mainVisual=function(t){var e=new A.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Tn.prototype.createBody=function(t,e){var o=A.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:O(e.border.opacity,e.opacity)}),J(o),t.append(o),un(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},Tn.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Tn.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:O(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=A.drawing.Path.fromPoints(o[n],r);J(s),t.append(s)}},Tn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=T(e)?e:new A.Color(this.color).brightness(t._brightness).toHex()},Tn.prototype.createOverlay=function(){var t=A.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Tn.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},Tn.prototype.highlightVisual=function(){return this._mainVisual},Tn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Tn.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new B(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},Tn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Tn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Tn);function Tn(t,e){An.call(this,e),this.value=t}i(d,{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(d.prototype,Ar),x(d.prototype,o);var Mn=d;function On(t){return Ni(t)===t.length}(Bn=kr)&&(Rn.__proto__=Bn),((Rn.prototype=Object.create(Bn&&Bn.prototype)).constructor=Rn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Rn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=On(this.splitValue(p)),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 bn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(p,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)},Rn.prototype.pointType=function(){return Mn},Rn.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),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),it(r.color)&&(h=a.color),a.vertical=!this.options.invertAxes,new n(s,a));return i.color=h,i},Rn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Rn.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:G,max:W};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},Rn.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)},Rn.prototype.animationPoints=function(){return this.points};var Bn,d=Rn;function Rn(){Bn.apply(this,arguments)}x(d.prototype,c);var En,Ln=d,d=((En=Mn)&&(In.__proto__=En),((In.prototype=Object.create(En&&En.prototype)).constructor=In).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()},In.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},In.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},In.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},In.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]]]},In.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},In.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=x({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),h=(T(h.color)||(T(this.color)?h.color=this.color:h.color=new A.Color(e.background).brightness(.8).toHex()),new Ce({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},In.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)}},In.prototype.mainVisual=function(t){for(var e=En.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},In.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)},In.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||En.prototype.getBorderColor.call(this)},In);function In(t,e){En.call(this,t,e),this.createNote()}i(d,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:H,background:a,border:{width:2,opacity:1},opacity:0}}),x(d.prototype,Ar);var zn,Vn,jn,Dn=d,Hn=((jn=Dn)&&(Wn.__proto__=jn),((Wn.prototype=Object.create(jn&&jn.prototype)).constructor=Wn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Wn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Wn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Wn.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]]]},Wn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Wn),Un=((Vn=Ln)&&(Gn.__proto__=Vn),((Gn.prototype=Object.create(Vn&&Vn.prototype)).constructor=Gn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=On(this.splitValue(p)),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 bn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(p,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)},Gn.prototype.pointType=function(){return this.options.invertAxes?Hn:Dn},Gn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Gn.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));T(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:G,max:W},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},Gn.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)},Gn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];T(r)&&null!==r&&o.push(r)}return o},Gn.prototype.supportsPointInactiveOpacity=function(){return!1},Gn),Fn=((zn=mr)&&(Nn.__proto__=zn),((Nn.prototype=Object.create(zn&&zn.prototype)).constructor=Nn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Nn);function Nn(){zn.apply(this,arguments)}function Gn(){Vn.apply(this,arguments)}function Wn(){jn.apply(this,arguments)}function qn(t){return T(t)&&null!==t}(Xn=r)&&(Yn.__proto__=Xn),((Yn.prototype=Object.create(Xn&&Xn.prototype)).constructor=Yn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Yn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Yn.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"];m(r)&&(m(p)&&m(o)&&(i={low:p,high:o}),h&&T(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new tr(h[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),i)&&this.addPointErrorBar(i,t,e)},Yn.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 Fn(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)},Yn.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=qn(i)&&qn(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)},Yn.prototype.seriesMissingValues=function(t){return t.missingValues},Yn.prototype.createMissingValue=function(){},Yn.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];qn(r)&&(n=this.xAxisRanges[i]=n||{min:G,max:W},et(r)&&(r=Fo(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),qn(t)&&(s=this.yAxisRanges[e]=s||{min:G,max:W},et(t)&&(t=Fo(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Yn.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=(T(s)||(this._evalSeries[r]=s=br(t,{},n,!0)),t);return s&&br(r=x({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Yn.prototype.pointType=function(){return Mr},Yn.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},Yn.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=(it(o.color)&&(r=i.color),new Mr(t,i));return e.color=r,this.append(e),e},Yn.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)},Yn.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},Yn.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},Yn.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))}}},Yn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Yn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var Xn,d=Yn;function Yn(t,e){Xn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(d,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(d.prototype,c,{_bindPoint:kr.prototype._bindPoint});var Zn,Qn=d,d=((Zn=Mr)&&(Kn.__proto__=Zn),((Kn.prototype=Object.create(Zn&&Zn.prototype)).constructor=Kn).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 A.drawing.Group,s=new A.drawing.Circle(new A.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 A.drawing.Circle(new A.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new A.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},Kn);function Kn(t,e){Zn.call(this,t,e),this.category=t.category}d.prototype.defaults=x({},d.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),d.prototype.defaults.highlight.zIndex=void 0;var $n,Jn=d,d=(($n=Qn)&&(ts.__proto__=$n),((ts.prototype=Object.create($n&&$n.prototype)).constructor=ts).prototype._initFields=function(){this._maxSize=W,$n.prototype._initFields.call(this)},ts.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)),$n.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},ts.prototype.reflow=function(t){this.updateBubblesSize(t),$n.prototype.reflow.call(this,t)},ts.prototype.pointType=function(){return Jn},ts.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=O(o.negativeValues.color,n)),x({labels:{animation:{delay:i,duration:600-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:H,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(it(o.color)&&(n=i.color),i.markers.background=n,new Jn(t,i));return r.color=n,this.append(r),r},ts.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,h=Math.PI*s*s,p=(Math.PI*a*a-h)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*p,c=Math.sqrt((h+c)/Math.PI),u=O(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},ts.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},ts.prototype.createAnimation=function(){},ts.prototype.createVisual=function(){},ts);function ts(){$n.apply(this,arguments)}i(d,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var es,os=d,d=((es=Ce)&&(is.__proto__=es),(is.prototype=Object.create(es&&es.prototype)).constructor=is);function is(){es.apply(this,arguments)}x(d.prototype,Ar);var rs,ns=d,d=((rs=r)&&(ss.__proto__=rs),((ss.prototype=Object.create(rs&&rs.prototype)).constructor=ss).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,T(this.value.target)&&(this.target=new ns({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.createLabel(),this.createNote())},ss.prototype.createLabel=function(){var t,e,o=this.options.labels;o.visible&&(t=this.pointData(),e=(e=dt(o))?e(t):this.formatValue(o.format),this.label=new cn(e,o,t),this.append(this.label))},ss.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,s=(o&&(n=new R(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.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},ss.prototype.createVisual=function(){rs.prototype.createVisual.call(this);var t=this.options,e=A.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:O(t.border.opacity,t.opacity)}),J(this.bodyVisual=e),this.visual.append(e)},ss.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=A.drawing.Animation.create(this.bodyVisual,this.options.animation))},ss.prototype.createHighlight=function(t){return A.drawing.Path.fromRect(this.box.toRect(),t)},ss.prototype.highlightVisual=function(){return this.bodyVisual},ss.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ss.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ss.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},ss.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ss);function ss(t,e){rs.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}d.prototype.tooltipAnchor=gn.prototype.tooltipAnchor,i(d,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}}}),x(d.prototype,Ar),x(d.prototype,o);var as,hs=d,d=((as=kr)&&(ps.__proto__=as),((ps.prototype=Object.create(as&&as.prototype)).constructor=ps).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ps.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ps.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=x({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=(it(r.color)&&(t=h.color),new hs(a,h)),e=(i.color=t,s[o]);return e||(e=new bn({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),e.append(i),i},ps.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];T(o)&&!isNaN(o)&&T(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:G,max:W}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},ps.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ps.prototype.pointValue=function(t){return t.valueFields.current},ps.prototype.aboveAxis=function(t){return 0<t.value.current},ps.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()}},ps);function ps(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||Z(n[0])||st(n[0])||(r.data=[n])}as.call(this,t,e)}d.prototype._setAnimationOptions=Pn.prototype._setAnimationOptions,i(d,{animation:{type:rr}});var ls,cs=d,d=((ls=A.Class)&&(us.__proto__=ls),((us.prototype=Object.create(ls&&ls.prototype)).constructor=us).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=O(o,e),i=O(i,e)),P(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:at(t.border.width),paddingTop:at(e.top),paddingBottom:at(e.bottom),paddingLeft:at(e.left),paddingRight:at(e.right)}},us.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new A.Color(o.backgroundColor);T(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},us.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},us.prototype.destroy=function(){delete this.chartService},us);function us(t,e){ls.call(this),this.chartService=t,this.options=x({},this.options,e)}i(d,{border:{width:1},opacity:1});(ds=d)&&(fs.__proto__=ds),((fs.prototype=Object.create(ds&&ds.prototype)).constructor=fs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},fs.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===U&&(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)},fs.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},fs.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=b,r===w?(e=k,o.bottomLeft().translate(0,i)):(e=w,o.topLeft().translate(0,-i))):(e=b,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 ds,f=fs;function fs(t,e,o){ds.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}i(f,{padding:10});var gs,ys=f,f=((gs=r)&&(vs.__proto__=gs),((vs.prototype=Object.create(gs&&gs.prototype)).constructor=vs).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},vs.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},vs.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?v:y,n=new A.geometry.Point(i.x1,i.y1),o=o?new A.geometry.Point(i.x2,i.y1):new A.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)},vs.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},vs.prototype.createVisual=function(){gs.prototype.createVisual.call(this);var t=this.options;this.line=new A.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},vs.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),gs.prototype.destroy.call(this)},vs);function vs(t,e,o){gs.call(this,o),this.axis=e,this.stickyMode=e instanceof qo;o=this.options.tooltip;o.visible&&(this.tooltip=new ys(t,this,x({},o,{stickyMode:this.stickyMode})))}i(f,{color:D,width:2,zIndex:-1,tooltip:{visible:!1}});var ms,xs=f,f=((ms=r)&&(_s.__proto__=ms),((_s.prototype=Object.create(ms&&ms.prototype)).constructor=_s).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},_s.prototype._clipBox=function(){return this.pane.chartsBox()},_s.prototype.createVisual=function(){var t;this.visual=new A.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),J(t=A.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},_s.prototype.stackRoot=function(){return this},_s.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)))}},_s.prototype.destroy=function(){ms.prototype.destroy.call(this),delete this.parent},_s);function _s(t,e){ms.call(this,t),this.pane=e}f.prototype.isStackRoot=!0;var bs,ws=f,f=((bs=be)&&(Ss.__proto__=bs),((Ss.prototype=Object.create(bs&&bs.prototype)).constructor=Ss).prototype.createTitle=function(){var t=this.options.title;st(t)&&(t=x({},t,{align:t.position,position:k})),this.title=Ge.buildTitle(t,Ss.prototype.options.title),this.title&&this.append(this.title)},Ss.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Ss.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Ss.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},Ss.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=[]},Ss.prototype.reflow=function(t){var e;zt(this.children)===this.content&&(e=this.children.pop()),bs.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Ss.prototype.visualStyle=function(){var t=bs.prototype.visualStyle.call(this);return t.zIndex=-10,t},Ss.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Ss.prototype.stackRoot=function(){return this},Ss.prototype.clipRoot=function(){return this},Ss.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&&Tt(h,s.createGridLines(t))},Ss.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()},Ss.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new R,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,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},Ss.prototype.clipBox=function(){return this.chartContainer.clipBox},Ss.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Hi(this),index:this.paneIndex,name:this.options.name})},Ss),Cs=1;function Ss(t){bs.call(this,t),this.id="pane"+Cs++,this.createTitle(),this.content=new r,this.chartContainer=new ws({},this),this.append(this.content),this.axes=[],this.charts=[]}f.prototype.isStackRoot=!0,i(f,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});var ks=f;function As(t,e){null!==e&&t.push(e)}function Ps(t,e,o){var e=e.visible;return T(e)?e:(e=t.pointVisibility)?e[o]:void 0}function Ts(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=et(a)?parseFloat(a):a)?(s.visible=!1!==Ps(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 Ms(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Os(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 Bs(t,e,o){var i,r;return null===e?e:((r=e[i="_date_"+t])||(r=Fo(o,yt(t)(e)),e[i]=r),r)}function Rs(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ms(t,U)}function Es(t){return 1===t.length?t[0]:t}var Ls=/area/i;function Is(t,e){var o,i=Ki.current.bindPoint(t,null,e).valueFields;for(o in i)if(ot(i[o]))return!0}function zs(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,p=t.series,l=i;h(l+=r)&&(e=Is(p,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Vs(t,e,o,i,r){var n,s,a,h,p=e.min,e=e.max,l=0<p&&p<o,c=e+1<o;(l||c)&&(((h=t).missingValues||(Ls.test(h.type)||h.stack?or:ir))!==ir?(l&&(n=i(p-1)),c&&(s=i(e+1))):(l&&(n=Is(t,(a=i(p-1)).item)?a:zs({start:p,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Is(t,(a=i(e+1)).item)?a:zs({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}(js=r)&&(g.__proto__=js),((g.prototype=Object.create(js&&js.prototype)).constructor=g).prototype.initFields=function(){},g.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},g.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=(et(a.title)&&(a.title=x({text:a.title},n.title)),new ks(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},g.prototype.crosshairOptions=function(t){return t.options.crosshair},g.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 xs(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},g.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}},g.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},g.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]},g.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},g.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},g.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},g.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},g.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},g.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,p,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(l=!d&&dt(n)||dt(i))&&(h=l({text:qn(h)?h:"",series:u})),l=u._defaults,l=void(it(p=u.color)&&l&&(p=l.color)),c=void 0,c=d?(l={},p):(l={color:n.color,font:n.font},r.markers.color),qn(h))&&""!==h&&s.push({text:h,labels:l,markerColor:c,series:u,active:d})}Tt(o.items,s)},g.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)}},g.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},g.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},g.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=P(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},g.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()},g.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},g.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)},g.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},h={},p={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,u=Hs(t,u)||o,g=r;u!==o&&(g=this.axisCrossingValues(u,e)),this.alignAxisTo(c,u,n[l],g[l]),c.options._overlap||(M(c.lineBox().x1)===M(u.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),M(c.lineBox().x2)===M(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=Hs(e,m)||i,b=n;m!==i&&(b=this.axisCrossingValues(m,t)),this.alignAxisTo(v,m,r[y],b[y]),v.options._overlap||(M(v.lineBox().y1)===M(m.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,m,r[y],b[y]),h[x]&&v.reflow(v.box.alignTo(h[x].box,k).translate(0,-v.options.margin)),_)&&(h[x]=v),M(v.lineBox().y2,3)===M(m.lineBox().y2,3)&&(p[x]&&v.reflow(v.box.alignTo(p[x].box,w).translate(0,v.options.margin)),_)&&(p[x]=v),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},g.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Ds(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))}},g.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Ds(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},g.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=Ds(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),h=0;h<n.length;h++){var p=n[h];p.reflow(p.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},g.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))},g.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Us(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))}},g.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)},g.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)}},g.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var p=0;p<o;p++){var l=e[p];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},g.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},g.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},g.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(A.drawing.Path.fromRect(e[o].toRect()))},g.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},g.prototype.createVisual=function(){js.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&&T(o)||(o=a,e=0),this._bgVisual=new A.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)},g.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&&T(s.value)&&null!==s.value&&o.push(s)}}return o},g.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},g.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},g.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},g.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}},g.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}},g.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},g.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Hs(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},g.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 js,f=g;function g(t,e,o){js.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 Ds(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 R}function Hs(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Us=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},Fs=(i(f,{series:[],plotArea:{margin:{}},background:"",border:{color:D,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}}),f),Ns={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};(Ws=A.Class)&&(Ys.__proto__=Ws),((Ys.prototype=Object.create(Ws&&Ws.prototype)).constructor=Ys).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)||Z(t)||((o=function(){}).prototype=t,s=new o);for(var a=0;a<r.length;a++){var h=r[a],p=this._bindField(n.values,h.canonicalName),p=h.transform(p,i,n.dataItems,e);if(!(null===p||!st(p)||T(p.length)||p instanceof Date)){s=p;break}if(T(p)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=h.name;var c=s;var u=p;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),T(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},Ys.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}},Ys.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(T(s[e])?s:n.fields)[e];o.push(s)}return o};var Gs,Ws,qs=Ys,f=((Gs=A.Class)&&(Xs.__proto__=Gs),((Xs.prototype=Object.create(Gs&&Gs.prototype)).constructor=Xs).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Xs.prototype.query=function(t){return this._defaults[t]},Xs);function Xs(){Gs.call(this),this._defaults={}}function Ys(t,e,o){Ws.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var h=0;h<i.length;h++){var p=i[h],l=void 0;if(st(a))l=a[p];else{if(0!==h&&!u(p,r))break;l=a}l&&s.push({canonicalName:p,name:n[h],transform:it(l)?l:Wi[l]})}}f.current=new f;var Zs,Qs=f,f=((Zs=gn)&&(Ks.__proto__=Zs),((Ks.prototype=Object.create(Zs&&Zs.prototype)).constructor=Ks).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))},Ks.prototype._createLabel=function(t){var e=dt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new cn(e,x({vertical:this.options.vertical},t),o)},Ks.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)},Ks);function Ks(){Zs.apply(this,arguments)}f.prototype.defaults=x({},f.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var $s,Js=f,f=(($s=Pn)&&(ta.__proto__=$s),((ta.prototype=Object.create($s&&$s.prototype)).constructor=ta).prototype.pointType=function(){return Js},ta.prototype.pointValue=function(t){return t.valueFields},ta.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)},ta.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},ta.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:G,max:W}).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))},ta.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},ta);function ta(){$s.apply(this,arguments)}f.prototype.plotLimits=kr.prototype.plotLimits;var ea,oa,ia=f,ra=((oa=Mr)&&(sa.__proto__=oa),((sa.prototype=Object.create(oa&&oa.prototype)).constructor=sa).prototype.aliasFor=function(){return this.parent},sa),f=((ea=r)&&(na.__proto__=ea),((na.prototype=Object.create(ea&&ea.prototype)).constructor=na).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 ra(i,x({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new ra(i,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},na.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())},na.prototype.createHighlight=function(){var t=new A.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},na.prototype.highlightVisual=function(){return this.visual},na.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},na.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=C,r=this.options.vertical?(t=o.x,e=r.y1-5,w):(t=r.x2+5,e=o.y,b),{point:new B(t,e),align:{horizontal:i,vertical:r}}},na.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},na.prototype.overlapsBox=function(t){return this.box.overlaps(t)},na.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},na.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}"}))},na.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=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))},na.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},na);function na(t,e){ea.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function sa(){oa.apply(this,arguments)}x(f.prototype,Ar),x(f.prototype,o),f.prototype.defaults={markers:{visible:!1,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,margin:P(3),padding:P(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var aa,ha,pa,la=f,ca=((pa=Zr)&&(ga.__proto__=pa),((ga.prototype=Object.create(pa&&pa.prototype)).constructor=ga).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ga.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},ga.prototype.createStroke=function(t){var e=new A.drawing.Path(t),t=new A.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)},ga.prototype.hasStackSegment=function(){return!0},ga.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ga.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ga),ua=((ha=ca)&&(fa.__proto__=ha),((fa.prototype=Object.create(ha&&ha.prototype)).constructor=fa).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},fa.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},fa.prototype.createCurveSegments=function(t){return(new Ei).process(this.toGeometryPoints(t))},fa),f=((aa=ca)&&(da.__proto__=aa),((da.prototype=Object.create(aa&&aa.prototype)).constructor=da).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},da.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},da);function da(){aa.apply(this,arguments)}function fa(){ha.apply(this,arguments)}function ga(){pa.apply(this,arguments)}x(f.prototype,h);var ya,va=f,h=((ya=kr)&&(ma.__proto__=ya),((ma.prototype=Object.create(ya&&ya.prototype)).constructor=ma).prototype.render=function(){ya.prototype.render.call(this),this.renderSegments()},ma.prototype.pointType=function(){return la},ma.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=t.valueFields;if(!qn(n.from)&&!qn(n.to)){if(this.seriesMissingValues(r)!==or)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=(it(r.color)&&(i=s.color),new la(n,s));return o.color=i,this.append(o),o},ma.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?ua:"step"===i?va:ca)(t,e,o)},ma.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},ma.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}},ma.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new R(i.x1,t.y1,i.x2,t.y2),new R(e.x1,t.y1,e.x2,t.y2)):(o=new R(t.x1,i.y1,t.x2,i.y2),new R(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},ma.prototype.addValue=function(t,e){var o=t.valueFields;m(o.from)||(o.from=o.to),m(o.to)||(o.to=o.from),ya.prototype.addValue.call(this,t,e)},ma.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:G,max:W},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},ma.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},ma.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)},ma);function ma(){ya.apply(this,arguments)}x(h.prototype,Lr,c);var xa,_a,ba,wa=h,Ca=((ba=Mn)&&(Pa.__proto__=ba),((Pa.prototype=Object.create(ba&&ba.prototype)).constructor=Pa).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()},Pa.prototype.createBody=function(){},Pa),Sa=((_a=Ln)&&(Aa.__proto__=_a),((Aa.prototype=Object.create(_a&&_a.prototype)).constructor=Aa).prototype.pointType=function(){return Ca},Aa),f=((xa=r)&&(ka.__proto__=xa),((ka.prototype=Object.create(xa&&xa.prototype)).constructor=ka).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},ka.prototype.createVisual=function(){xa.prototype.createVisual.call(this);var t=this.series.line||{},t=A.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});J(t),this.visual.append(t)},ka);function ka(t,e,o){xa.call(this),this.from=t,this.to=e,this.series=o}function Aa(){_a.apply(this,arguments)}function Pa(){ba.apply(this,arguments)}i(f,{animation:{type:"fadeIn",delay:600}});var Ta,Ma,Oa=f,Ba=((Ma=Pn)&&(La.__proto__=Ma),((La.prototype=Object.create(Ma&&Ma.prototype)).constructor=La).prototype.render=function(){Ma.prototype.render.call(this),this.createSegments()},La.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=wr(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<o;h++){var p=Ki.current.bindPoint(n,h),l=p.valueFields.value,c=p.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=p.valueFields.value=s):(d=u-(p.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(p,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},La.prototype.updateRange=function(t,e){Ma.prototype.updateRange.call(this,{value:e.to},e)},La.prototype.aboveAxis=function(t){return 0<=t.value},La.prototype.plotRange=function(t){return[t.from,t.to]},La.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 Oa(s,p,r),o.push(h),this.append(h)),s=p}}},La),Ra=["area","verticalArea","rangeArea","verticalRangeArea"],Ea=[sr,hr].concat(Ra),c=((Ta=Fs)&&(E.__proto__=Ta),((E.prototype=Object.create(Ta&&Ta.prototype)).constructor=E).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new sn,0<t.length){this.invertAxes=u(t[0].type,[rr,"bullet",hr,"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}}}},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;Ta.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(Os(t,["area","verticalArea"]),e),this.createRangeAreaChart(Os(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Os(t,[nr,rr]),e),this.createRangeBarChart(Os(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Os(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Os(t,"candlestick"),e),this.createBoxPlotChart(Os(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Os(t,"ohlc"),e),this.createWaterfallChart(Os(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Os(t,[sr,hr]),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=(Ms(n.options.type,U)||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 i,t,r,n=(e.data||{}).length;return o._seriesMax=Math.max(o._seriesMax||0,n),m(o.options.min)||m(o.options.max)?(i=o.currentRangeIndices(),t=u(e.type,Ea),(r=x({},e)).data=(r.data||[]).slice(i.min,i.max+1),t&&Vs(r,i,n,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return T(e.data[t])}),r):e},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=Ms(i.type,U),n=t.data,s=i?Bs:qi,a=[];i||e.mapCategories();for(var h=0;h<n.length;h++){var p,l=t.categoryField?s(t.categoryField,n[h],this.chartService.intl):r[h];T(l)&&null!==l&&(a[p=e.totalIndex(l)]=a[p]||{items:[],category:l},a[p].items.push(h))}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 qs(x({},t),Ki.current,Qs.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),h=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=n.aggregatePoints(o.items,e)),o},p=a.min;p<=a.max;p++){var l=h(p);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return u(e.type,Ea)&&Vs(e,a,i.totalCount(),h,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,wr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Ta.prototype.appendChart.call(this,t,e)},E.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=vt([].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 vt(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 Pn(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 ia(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 cs(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 Yr(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 nn(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 wa(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 Sa(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 Ln(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 Un(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 Ba(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=Os(this.series,pr),i=0;i<this.series.length;i++){var r,n=this.series[i];u(n.type,Ra)&&(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}},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,h=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?G:0},n),T(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Rs(n,a[0])?ti:qo)(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},E.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Ra))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 h=i[a];if(u(this.findPane(h.pane),t)){var p=h.name,l=Ms(h.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(p)||o||l,l=(0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max)),new(Ms(h.type,"log")?vi:pi)(l.min,l.max,x({},n,h),this.chartService));if(p){if(this.namedValueAxes[p])throw new Error("Value axis with name "+p+" is already defined");this.namedValueAxes[p]=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 B(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?As(s,p.getValue(r)):As(n,p.getCategory(r))}0===n.length&&As(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Lt(e),originalEvent:e,category:Es(n),value:Es(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){Ia(this.options,t,e),Ia(this.originalOptions,t,e)},E);function E(){Ta.apply(this,arguments)}function La(){Ma.apply(this,arguments)}function Ia(t,e,o){x([].concat(e instanceof qo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}i(c,{categoryAxis:{},valueAxis:{}}),x(c.prototype,Ns);var za=c;function Va(){this._defaultPrevented=!0}(ja=A.Class)&&(Ha.__proto__=ja),((Ha.prototype=Object.create(ja&&ja.prototype)).constructor=Ha).prototype.destroy=function(){this._points=[]},Ha.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))}},Ha.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:Va,visual:t.highlightVisual(),show:e}),i._defaultPrevented)||t.toggleHighlight(e,o)},Ha.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Ha.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};var ja,Da=Ha;function Ha(){ja.call(this),this._points=[]}function Ua(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Fa(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}(Na=A.Class)&&(Ga.__proto__=Na),((Ga.prototype=Object.create(Na&&Na.prototype)).constructor=Ga).prototype.start=function(t){return this._active=Ua(t,this.options.key),this._active},Ga.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Fa(this.axisRanges=t)}},Ga.prototype.end=function(){var t=this._active;return this._active=!1,t},Ga.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)}},Ga.prototype.destroy=function(){delete this.plotArea},Ga.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===y&&!h.options.vertical||e===v&&h.options.vertical)&&(a=h.pan(i))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r};var Na,h=Ga;function Ga(t,e){Na.call(this),this.plotArea=t,this.options=x({},this.options,e)}h.prototype.options={key:"none",lock:"none"};var Wa,qa=h,f=((Wa=A.Class)&&(Xa.__proto__=Wa),((Xa.prototype=Object.create(Wa&&Wa.prototype)).constructor=Xa).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)},Xa.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Xa.prototype.setStyles=function(t){pt(this._marquee,t)},Xa.prototype.start=function(t){if(Ua(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},Xa.prototype._elementOffset=function(){var t=this.chart.element,e=pt(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=Bt(t);return{left:o+t.left,top:e+t.top}},Xa.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Xa.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,Fa(this.axisRanges)},Xa.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)}},Xa.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Xa.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||!T(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Xa.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===y&&(n=e.x1,a=e.width()),r===v&&(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}},Xa);function Xa(t,e){Wa.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}f.prototype.options={key:"shift",lock:"none"};var Ya,Za,Qa,Ka,$a=f,Ja=((Ka=A.Class)&&(sh.__proto__=Ka),((sh.prototype=Object.create(Ka&&Ka.prototype)).constructor=sh).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 Fa(this.axisRanges=i)},sh.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)}},sh.prototype.destroy=function(){delete this.chart},sh),th=((Qa=r)&&(nh.__proto__=Qa),((nh.prototype=Object.create(Qa&&Qa.prototype)).constructor=nh).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new A.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 R),r.renderVisual()}},nh.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ie(t):new R},nh.prototype.renderVisual=function(){this.addVisual()},nh.prototype.createVisual=function(){},nh),eh=((Za=be)&&(rh.__proto__=Za),((rh.prototype=Object.create(Za&&Za.prototype)).constructor=rh).prototype.createContainer=function(){this.container=new Be({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},rh.prototype.createMarker=function(){this.container.append(new Ce(this.markerOptions()))},rh.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return x({},t.markers,{background:e,border:{color:e}})},rh.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new De(t.text,e))},rh.prototype.renderComplete=function(){Za.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=A.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},rh.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},rh.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},rh.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},rh.prototype.eventArgs=function(t){var e=this.options;return{element:Lt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},rh.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()):Za.prototype.renderVisual.call(this)},rh),oh="custom",c=((Ya=r)&&(ih.__proto__=Ya),((ih.prototype=Object.create(Ya&&Ya.prototype)).constructor=ih).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=b;e===oh?i=C:u(e,[k,w])?(i="start"===o?C:"end"===o?S:b,r=e):o&&("start"===o?r=k:"end"===o&&(r=w)),this.container=new be({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 be({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},ih.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new th({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 eh(x({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},ih.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===oh&&"horizontal"!==e||(T(e)?"horizontal"!==e:u(t,[C,S]))},ih.prototype.hasItems=function(){return 0<this.container.children[0].children.length},ih.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===oh?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new R(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},ih.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===w?y:v,a=this.isVertical(),h=t.clone(),p=t.clone(),i=(i!==C&&i!==S||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,v,o.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,y,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},ih.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 R(i,r,i+t.width(),r+t.height()))},ih.prototype.renderVisual=function(){this.hasItems()&&Ya.prototype.renderVisual.call(this)},ih.prototype.createLegendTitle=function(t){var e=x({},{color:D,position:k,align:b},t),o=e.text;t&&!1!==t.visible&&(T(e)&&e.visible&&((t=dt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new De(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},ih.prototype.createTitleLayout=function(){this.layout=new Be({vertical:!0,wrap:!1}),this.container.append(this.layout)},ih.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},ih.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},ih);function ih(t,e){void 0===e&&(e={}),Ya.call(this,t),this.chartService=e,u(this.options.position,[k,S,w,C,oh])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function rh(t){Za.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function nh(t,e){Qa.call(this,t),this.chartService=e}function sh(t,e){Ka.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}i(c,{position:S,items:[],offsetX:0,offsetY:0,margin:P(5),padding:P(5),border:{color:D,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:b}});var ah,hh=c,h=((ah=A.Class)&&(ph.__proto__=ah),((ph.prototype=Object.create(ah&&ah.prototype)).constructor=ph).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},ph.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=Os(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},ph);function ph(){ah.call(this),this._registry=[]}h.current=new h;var lh=h;function ch(t){var e=document.createElement("div");return t&&(e.className=t),e}function uh(t){for(var e=t;e&&!mt(e,"k-handle");)e=e.parentNode;return e}(dh=A.Class)&&(fh.__proto__=dh),((fh.prototype=Object.create(dh&&dh.prototype)).constructor=fh).prototype.onPane=function(t){return this.categoryAxis.pane===t},fh.prototype.createElements=function(){var t=this.options,e=this.wrapper=ch("k-selector"),o=(pt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=ch("k-selection")),i=(this.leftMask=ch("k-mask"),this.rightMask=ch("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(ch("k-selection-bg")),this.leftHandle=ch("k-handle k-left-handle")),r=this.rightHandle=ch("k-handle k-right-handle"),o=(i.appendChild(ch()),r.appendChild(ch()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),pt(o,["borderLeftWidth","borderRightWidth","height"])),n=pt(i,"height").height,s=pt(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},pt(i,{top:(o.height-n)/2}),pt(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},fh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),Mt(this.wrapper,((t={})[fr]=this._mousewheelHandler,t))),this._domEvents=so.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)})},fh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&x(t,{min:Fo(o,t.min),max:Fo(o,t.max),from:Fo(o,t.from),to:Fo(o,t.to)}),pt(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)},fh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Dt(this.wrapper,((t={})[fr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},fh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},fh.prototype._start=function(t){var e=this.options,o=Lt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:uh(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)},fh.prototype._press=function(t){(t=this._state?this._state.moveTarget:uh(Lt(t)))&&Q(t,"k-handle-active")},fh.prototype._move=function(t){var e,o,i,r,n,s,a,h,p,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,h=e.to,p=e.to-e.from,c=pt(this.wrapper,"width").width/(c.categoriesCount()-1),l=Math.round(l/c)*(i?-1:1),o)&&(c=mt(o,"k-left-handle"),u=mt(o,"k-right-handle"),mt(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-l),a-p),e.to=Math.min(e.from+p,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===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e))))},fh.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&$(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},fh.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new B(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()))},fh.prototype._mousewheel=function(t){var e,o=this,i=At(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))},fh.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()},fh.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},fh.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 B(s))||i.min,o.to=r.pointCategoryIndex(new B(n))||i.max,this.move(o.from,o.to),this.trigger("select",this._rangeEventArgs(o))},fh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},fh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},fh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},fh.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=M(i[h]-r.left+n.left),t=(pt(this.leftMask,{width:e}),pt(this.selection,{left:e}),i=this._slot(a),M(o.width-(i[h]-r.left+n.left))),a=(pt(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),pt(this.rightMask,{left:a}),pt(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},fh.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)},fh.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},fh.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),h=this.categoryAxis.options.reverse,h=y+(h?"2":"1"),p=this.categoryAxis.lineBox(),h=Math.abs(p[h]-e.x),e=p.width(),p=M(h/e,2),h=M(p*t),e=M((1-p)*t);if((s=this._state?this._state.range:s).from=_(_(n-h,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},fh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var dh,f=fh;function fh(t,e,o,i){dh.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 ti,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(f,{visible:!0,mousewheel:{zoom:"both"},min:W,max:G});var gh,yh,vh=f,mh=((yh=d)&&(_h.__proto__=yh),((_h.prototype=Object.create(yh&&yh.prototype)).constructor=_h).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,yh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},_h.prototype.hide=function(){delete this._current,yh.prototype.hide.call(this)},_h),c=((gh=d)&&(xh.__proto__=gh),((xh.prototype=Object.create(gh&&gh.prototype)).constructor=xh).prototype.showAt=function(t,e){var o,i=vt(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))},xh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},xh.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 B(t.x,e.y):new B(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},xh);function xh(t,e){gh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function _h(){yh.apply(this,arguments)}i(c,{categoryFormat:"{0:d}"});var bh,wh=c,h=((bh=A.drawing.Animation)&&(Ch.__proto__=bh),((Ch.prototype=Object.create(bh&&bh.prototype)).constructor=Ch).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 A.geometry.Point(1,1))[o]=er,e.transform(A.geometry.transform().scale(t.x,t.y))):this.abort()},Ch.prototype.step=function(t){var e=bt(this.fromScale.x,1,t),t=bt(this.fromScale.y,1,t);this.element.transform(A.geometry.transform().scale(e,t,this.origin))},Ch.prototype.abort=function(){bh.prototype.abort.call(this),this.element.transform(null)},Ch);function Ch(){bh.apply(this,arguments)}i(h,{duration:600}),A.drawing.AnimationFactory.current.register(rr,h);(Sh=A.drawing.Animation)&&(kh.__proto__=Sh),((kh.prototype=Object.create(Sh&&Sh.prototype)).constructor=kh).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(A.geometry.transform().scale(er,er,t))},kh.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.center))};var Sh,f=kh;function kh(){Sh.apply(this,arguments)}i(f,{easing:"easeOutElastic"}),A.drawing.AnimationFactory.current.register("bubble",f);(Ah=A.drawing.Animation)&&(Ph.__proto__=Ah),((Ph.prototype=Object.create(Ah&&Ah.prototype)).constructor=Ph).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Ph.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var Ah,d=Ph;function Ph(){Ah.apply(this,arguments)}i(d,{duration:200,easing:"linear"}),A.drawing.AnimationFactory.current.register("fadeIn",d);(Th=A.drawing.Animation)&&(Mh.__proto__=Th),((Mh.prototype=Object.create(Th&&Th.prototype)).constructor=Mh).prototype.setup=function(){this.element.transform(A.geometry.transform().scale(er,er,this.options.center))},Mh.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.options.center))};var Th,c=Mh;function Mh(){Th.apply(this,arguments)}i(c,{easing:"easeOutElastic",duration:600}),A.drawing.AnimationFactory.current.register(ar,c);var Oh,Bh=c,h=((Oh=Qn)&&(Rh.__proto__=Oh),((Rh.prototype=Object.create(Oh&&Oh.prototype)).constructor=Rh).prototype.render=function(){Oh.prototype.render.call(this),this.renderSegments()},Rh.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Dr:Br)(t,e,o)},Rh.prototype.animationPoints=function(){return Oh.prototype.animationPoints.call(this).concat(this._segments)},Rh.prototype.createMissingValue=function(t,e){if(e===or)return qn((e={x:t.x,y:t.y}).x)||(e.x=0),qn(e.y)||(e.y=0),e},Rh);function Rh(){Oh.apply(this,arguments)}x(h.prototype,Lr);var Eh,Lh=h,f=((Eh=Fs)&&(Ih.__proto__=Eh),((Ih.prototype=Object.create(Eh&&Eh.prototype)).constructor=Ih).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new sn,this.yAxisRangeTracker=new sn},Ih.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(Os(r,"scatter"),i),this.createScatterLineChart(Os(r,"scatterLine"),i),this.createBubbleChart(Os(r,"bubble"),i))}this.createAxes(t)},Ih.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Eh.prototype.appendChart.call(this,t,e)},Ih.prototype.removeAxis=function(t){var e=t.options.name;Eh.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},Ih.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=vt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=vt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Ih.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Qn(this,{series:t,clip:e.options.clip}),e)},Ih.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Lh(this,{series:t,clip:e.options.clip}),e)},Ih.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new os(this,{series:t,clip:e.options.clip}),e)},Ih.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=Ms(a.type,"log"),h=s.query(),p=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||h||p,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&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}p=new(Ms(a.type,U)||!a.type&&i?ui:t?vi:pi)(s.min,s.max,a,this.chartService);if(p.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=p}return this.appendAxis(p),p},Ih.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]},Ih.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new B(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p],c=l.options.vertical?h:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<h.length&&t.trigger(o,{element:Lt(e),originalEvent:e,x:Es(a),y:Es(h)})},Ih.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);zh(this.options,i,o,e),zh(this.originalOptions,i,o,e)},Ih);function Ih(){Eh.apply(this,arguments)}function zh(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}i(f,{xAxis:{},yAxis:{}}),x(f.prototype,Ns);var Vh,jh=f,d=((Vh=r)&&(Uh.__proto__=Vh),((Uh.prototype=Object.create(Vh&&Vh.prototype)).constructor=Uh).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=dt(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===b||"insideEnd"===o.position?(o.color||(o.color=Xt(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 De(r,x({},o,{align:b,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),t),this.append(this.label)))},Uh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Uh.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===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new R(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 R(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=S):(i=t.x-o,n.orientation=C),n.reflow(new R(i,t.y-e,t.x,t.y))))},Uh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Vh.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 A.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 A.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Uh.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),un(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)))},Uh.prototype.createSegment=function(t,e){return e.singleSegment?new A.drawing.Circle(new A.geometry.Circle(new A.geometry.Point(t.center.x,t.center.y),t.radius),e):ye.current.createRing(t,e)},Uh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Vh.prototype.createAnimation.call(this)},Uh.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}}))},Uh.prototype.highlightVisual=function(){return this.visual.children[0]},Uh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new A.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Uh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=jt(e+180),e=M(Math.sin(t),F),t=M(Math.cos(t),F),{horizontal:Math.abs(e)>Hh?b:t<0?S:C,vertical:Math.abs(e)<Dh?b:e<0?w:k})}},Uh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Uh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Uh),Dh=M(jt(30),F),Hh=M(jt(60),F);function Uh(t,e,o){Vh.call(this,o),this.value=t,this.sector=e}i(d,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:P(.5),align:H,zIndex:1,position:"outsideEnd"},animation:{type:ar},highlight:{visible:!0,border:{width:1}},visible:!0}),x(d.prototype,Ar);var Fh,Nh=d,Gh={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)&&dt(h)||dt(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=(r?(i={},e):(i={color:h.color,font:h.font},s.markers||{})).color,qn(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i})}},c=((Fh=r)&&(Wh.__proto__=Fh),((Wh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Wh).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Wh.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,p=Ts(a),l=p.total,c=p.points,p=p.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/p),void 0),f=(T(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==h.length&&Boolean(y.explode),it(a.color)||(a.color=y.color||o[g%i]),t(v,new le(null,0,0,f,m),{owner:this,category:T(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==l?v/l:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},Wh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;br(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Wh.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 Nh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Wh.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,h=s-.85*s,p=new R(n.x1,n.y1,n.x1+s,n.y1+s),s=p.center(),n=n.center(),l=e.series.length,c=[],u=[],e=O(e.padding,h);this.targetBox=t,e=a-5<e?a-5:e,p.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new B(d+p.x1+e,d+p.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(p),y.label);x&&"outsideEnd"===x.options.position&&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=p},Wh.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Wh.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Wh.prototype.distanceBetweenLabels=function(t){var e=zt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=M(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=M(h.y1-n.y2);r.push(s)}return s=M(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Wh.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)},Wh.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},Wh.prototype.reflowLabels=function(t,e){var o,i=zt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var p=0;p<s;p++){var l=e[p],c=l.box;h+=t[p],o=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),l.orientation===S),l.orientation===S?(n.align!==H&&(o=r.radius+r.center.x+a),l.reflow(new R(o+c.width(),h,o,h))):(n.align!==H&&(o=r.center.x-r.radius-a),l.reflow(new R(o-c.width(),h,o,h))),h+=c.height()}},Wh.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Fh.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,h,p,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new A.drawing.Path({stroke:{color:g,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position)&&(r=d.box,n=u.center,l=u.point(f),s=new B(r.x1,r.center().y),p=h=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===S?(p=qh(n,l,s,h=new B(r.x1-t.padding,r.center().y)),s=new B(h.x-4,h.y),(p=p||s).x=Math.min(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===nr||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))):(p=qh(n,l,s,h=new B(r.x2+t.padding,r.center().y)),s=new B(h.x+4,h.y),(p=p||s).x=Math.max(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===nr||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))),g.lineTo(h.x,h.y),this._connectorLines.push(g),this.visual.append(g))}},Wh.prototype.renderVisual=function(){var t,e,o,i;Fh.prototype.renderVisual.call(this),Ft(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(A.geometry.transform().scale(i,i,[e.x,e.y]))},Wh.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}},Wh.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)},Wh.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)},Wh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Wh.prototype.animationDelay=function(t){return 70*t},Wh.prototype.stackRoot=function(){return this},Wh);function Wh(t,e){Fh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function qh(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 B(t.x+(o=n/i)*(e.x-t.x),t.y+o*(e.y-t.y)):r}i(c,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(c.prototype,Gh),c.prototype.isStackRoot=!0;var Xh,Yh,Zh=c,Qh=((Yh=Fs)&&($h.__proto__=Yh),(($h.prototype=Object.create(Yh&&Yh.prototype)).constructor=$h).prototype.render=function(){this.createPieChart(this.series)},$h.prototype.createPieChart=function(t){var e=t[0],t=new Zh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},$h.prototype.appendChart=function(t,e){Yh.prototype.appendChart.call(this,t,e),Tt(this.options.legend.items,t.legendItems)},$h),Lr=((Xh=Nh)&&(Kh.__proto__=Xh),((Kh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Kh).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===b?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new R(e.x,e.y-t/2,e.x,e.y))):Xh.prototype.reflowLabel.call(this))},Kh.prototype.createSegment=function(t,e){return ye.current.createRing(t,e)},Kh);function Kh(){Xh.apply(this,arguments)}function $h(){Yh.apply(this,arguments)}i(Lr,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:ar}}),x(Lr.prototype,Ar);var Jh,tp=Lr,h=((Jh=Zh)&&(ep.__proto__=Jh),((ep.prototype=Object.create(Jh&&Jh.prototype)).constructor=ep).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 tp(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},ep.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=O(o.padding,i-.85*i),a=r-(o=r-5<o?r-5:o),h=0,p=0;p<s;p++){var l=n[p];0===p&&T(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),T(l.size)?a-=l.size:h++,T(l.margin)&&p!==s-1&&(a-=l.margin)}T(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)+O(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Jh.prototype.reflow.call(this,t)},ep.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},ep);function ep(){Jh.apply(this,arguments)}i(h,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var op,ip,rp,np=h,sp=((rp=Qh)&&(pp.__proto__=rp),((pp.prototype=Object.create(rp&&rp.prototype)).constructor=pp).prototype.render=function(){this.createDonutChart(this.series)},pp.prototype.createDonutChart=function(t){var e=t[0],t=new np(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},pp),f=((ip=Fs)&&(hp.__proto__=ip),((hp.prototype=Object.create(ip&&ip.prototype)).constructor=hp).prototype.initFields=function(){this.valueAxisRangeTracker=new sn},hp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},hp.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)},hp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=Mi,{min:.1,max:1}):(t=Pi,{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)},hp.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=P(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,b),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)},hp.prototype.backgroundBox=function(){return this.box},hp.prototype.detachLabels=function(){},hp),d=((op=Qn)&&(ap.__proto__=op),((ap.prototype=Object.create(op&&op.prototype)).constructor=ap).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=B.onCircle(t.center,t.startAngle,e);return new R(t.x,t.y,t.x,t.y)},ap);function ap(){op.apply(this,arguments)}function hp(){ip.apply(this,arguments)}function pp(){rp.apply(this,arguments)}i(d,{clip:!1});var lp,cp=d,c=((lp=Lh)&&(up.__proto__=lp),(up.prototype=Object.create(lp&&lp.prototype)).constructor=up);function up(){lp.apply(this,arguments)}c.prototype.pointSlot=cp.prototype.pointSlot,i(c,{clip:!1});var dp,fp,gp=c,yp=((fp=rn)&&(xp.__proto__=fp),((xp.prototype=Object.create(fp&&fp.prototype)).constructor=xp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},xp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},xp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Ei(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},xp),vp=((dp=Zr)&&(mp.__proto__=dp),((mp.prototype=Object.create(dp&&dp.prototype)).constructor=mp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new A.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},mp);function mp(){dp.apply(this,arguments)}function xp(){fp.apply(this,arguments)}function _p(t,e){return t.value.x-e.value.x}(wp=gp)&&(kp.__proto__=wp),((kp.prototype=Object.create(wp&&wp.prototype)).constructor=kp).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?yp:vp)(t,e,o)},kp.prototype.createMissingValue=function(t,e){var o;return qn(t.x)&&e!==ir&&(o={x:t.x,y:t.y},e===or)&&(o.y=0),o},kp.prototype.seriesMissingValues=function(t){return t.missingValues||or},kp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},kp.prototype.sortPoints=function(t){if(t.sort(_p),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];!o||qn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t};var bp,wp,Cp=kp,Lr=((bp=f)&&(Sp.__proto__=bp),((Sp.prototype=Object.create(bp&&bp.prototype)).constructor=Sp).prototype.createPolarAxis=function(){var t=new wi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Sp.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:j},minorGridLines:{type:j}},this.options.yAxis)},Sp.prototype.createValueAxis=function(){bp.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Sp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Fs.prototype.appendChart.call(this,t,e)},Sp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Os(t,["polarLine"]),e),this.createScatterChart(Os(t,["polarScatter"]),e),this.createAreaChart(Os(t,["polarArea"]),e)},Sp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new gp(this,{series:t}),this.appendChart(t,e))},Sp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new cp(this,{series:t}),this.appendChart(t,e))},Sp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Cp(this,{series:t}),this.appendChart(t,e))},Sp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new B(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Lt(e),x:r,y:i})},Sp.prototype.createCrosshairs=function(){},Sp);function Sp(){bp.apply(this,arguments)}function kp(){wp.apply(this,arguments)}i(Lr,{xAxis:{},yAxis:{}}),x(Lr.prototype,Ns);var Ap,h=Lr,d=((Ap=Yr)&&(Pp.__proto__=Ap),((Pp.prototype=Object.create(Ap&&Ap.prototype)).constructor=Pp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=B.onCircle(t.center,t.middle(),e);return new R(t.x,t.y,t.x,t.y)},Pp.prototype.renderSegments=function(){if(Ap.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=zt(n),r=zt(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i)&&r&&zt(n).linePoints.push(o)}},Pp.prototype.createSegment=function(t,e,o){var o=new("smooth"===e.style?Dr:Br)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==ir||(o.options.closed=!0),o},Pp);function Pp(){Ap.apply(this,arguments)}i(d,{clip:!1,limitPoints:!1});var Tp,Mp,Op,Bp,Rp=d,Ep=((Bp=rn)&&(Dp.__proto__=Bp),((Dp.prototype=Object.create(Bp&&Bp.prototype)).constructor=Dp).prototype.fillToAxes=function(){},Dp),Lp=((Op=Zr)&&(jp.__proto__=Op),((jp.prototype=Object.create(Op&&Op.prototype)).constructor=jp).prototype.fillToAxes=function(){},jp),Ip=((Mp=Rp)&&(Vp.__proto__=Mp),((Vp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Vp).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 Ep(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Lp(t,e,o,r,n)),s},Vp.prototype.seriesMissingValues=function(t){return t.missingValues||or},Vp),c=((Tp=tp)&&(zp.__proto__=Tp),(zp.prototype=Object.create(Tp&&Tp.prototype)).constructor=zp);function zp(t,e){Tp.call(this,t,null,e)}function Vp(){Mp.apply(this,arguments)}function jp(){Op.apply(this,arguments)}function Dp(){Bp.apply(this,arguments)}i(c,{overlay:{gradient:"none"},labels:{distance:10}});var Hp,Up=c,Lr=((Hp=r)&&(Fp.__proto__=Hp),((Fp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Fp).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})},Fp);function Fp(t){Hp.call(this,t),this.forEach=t.rtl?vn:yn}i(Lr,{gap:1,spacing:0});var Np,Gp,Wp=Lr,qp=((Gp=r)&&(Yp.__proto__=Gp),((Yp.prototype=Object.create(Gp&&Gp.prototype)).constructor=Yp).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 R;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Yp),d=((Np=Pn)&&(Xp.__proto__=Np),((Xp.prototype=Object.create(Np&&Np.prototype)).constructor=Xp).prototype.pointType=function(){return Up},Xp.prototype.clusterType=function(){return Wp},Xp.prototype.stackType=function(){return qp},Xp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Xp.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},Xp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Xp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Np.prototype.createAnimation.call(this)},Xp);function Xp(){Np.apply(this,arguments)}function Yp(){Gp.apply(this,arguments)}d.prototype.reflow=kr.prototype.reflow,i(d,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Zp,Qp=d,c=((Zp=f)&&(Kp.__proto__=Zp),((Kp.prototype=Object.create(Zp&&Zp.prototype)).constructor=Kp).prototype.createPolarAxis=function(){var t=new _i(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Kp.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:j},minorGridLines:{type:j}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},Kp.prototype.aggregateCategories=function(){za.prototype.aggregateCategories.call(this,this.panes)},Kp.prototype.createCategoryAxesLabels=function(){za.prototype.createCategoryAxesLabels.call(this,this.panes)},Kp.prototype.filterSeries=function(t){return t},Kp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Os(t,["radarArea"]),e),this.createLineChart(Os(t,["radarLine"]),e),this.createBarChart(Os(t,["radarColumn"]),e)},Kp.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},Kp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Ip(this,this.chartOptions(t)),this.appendChart(t,e))},Kp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Rp(this,this.chartOptions(t)),this.appendChart(t,e))},Kp.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 Qp(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},Kp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Kp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new B(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Lt(e),category:r,value:i})},Kp.prototype.createCrosshairs=function(){},Kp);function Kp(){Zp.apply(this,arguments)}x(c.prototype,Ns,{appendChart:za.prototype.appendChart,aggregateSeries:za.prototype.aggregateSeries,seriesSourcePoints:za.prototype.seriesSourcePoints}),i(c,{categoryAxis:{categories:[]},valueAxis:{}});var $p,Lr=c,d=(($p=r)&&(Jp.__proto__=$p),((Jp.prototype=Object.create($p&&$p.prototype)).constructor=Jp).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new R(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new R(t.x1,e[0].y,t.x2,e[2].y))},Jp.prototype.createVisual=function(){var t=this,e=this.options;$p.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)},Jp.prototype.createPath=function(){var t=this.options,e=t.border;return A.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Jp.prototype.createHighlight=function(t){return A.drawing.Path.fromPoints(this.points,t)},Jp.prototype.highlightVisual=function(){return this.visual.children[0]},Jp.prototype.highlightVisualArgs=function(){var t=A.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Jp.prototype.tooltipAnchor=function(){var t=this.box;return{point:new B(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Jp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Jp);function Jp(t,e,o){$p.call(this,e),this.value=t,this.options.index=o.index}i(d,{color:a,border:{width:1}}),x(d.prototype,Ar);var tl,el=d,f=((tl=r)&&(ol.__proto__=tl),((ol.prototype=Object.create(tl&&tl.prototype)).constructor=ol).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},ol.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=Ts(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(a=p.fields,it(o.color)||(o.color=a.color||e[s%e.length]),a=x({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)}},ol.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;br(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},ol.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 el(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},ol.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=dt(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=Xt(i.color),n.background)||(n.background=i.color),this.evalSegmentOptions(n,t,e),o=new De(s,x({vAlign:n.position},n),r),this.labels.push(o),o},ol.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!==b&&(i=t[o].box.width(),r===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},ol.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var p=s.percentage/a.percentage*e,l=(e-p)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=i.dynamicHeight?o*d:o/n,d=_(d?(e-p*(f/d))/2:f?0:e/2,0,e);g.push(new A.geometry.Point(t.x1+l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new A.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+i.segmentSpacing,p=_(e-2*(l=d),0,e)}},ol.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,h=s?0:(e-e/i.neckRatio)/2,p=((s?e:e-2*h)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?p*d:p/n,d=i.dynamicHeight?o*d:o/n;u.push(new A.geometry.Point(t.x1+h,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-h,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-h-f,t.y1+d+l)),u.push(new A.geometry.Point(t.x1+h+f,t.y1+d+l)),h+=f,l+=d+i.segmentSpacing}},ol.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)}},ol);function ol(t,e){tl.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}i(f,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),x(f.prototype,Gh);var il,rl,nl=f,c=((rl=Fs)&&(al.__proto__=rl),((al.prototype=Object.create(rl&&rl.prototype)).constructor=al).prototype.render=function(){this.createFunnelChart(this.series)},al.prototype.createFunnelChart=function(t){var e=t[0],t=new nl(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)},al.prototype.appendChart=function(t,e){rl.prototype.appendChart.call(this,t,e),Tt(this.options.legend.items,t.legendItems)},al),d=((il=r)&&(sl.__proto__=il),((sl.prototype=Object.create(il&&il.prototype)).constructor=sl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},sl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=dt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Xt(this.color),this.label=new De(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},sl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},sl.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())},sl.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r="roundedRect"===O(e.type,"rect"),o=O(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,Ie(i)},sl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=O(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},sl.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Ce({type:O(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:O(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)},sl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new Ce({type:O(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:O(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},sl.prototype.highlightVisual=function(){return this.rectVisual},sl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},sl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new B(t,e),align:{horizontal:b,vertical:w}}},sl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},sl.prototype.unclipElements=function(){},sl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},sl);function sl(t,e){il.call(this),this.options=e,this.color=e.color||a,this.value=t}function al(){rl.apply(this,arguments)}x(d.prototype,Ar),x(d.prototype,o),d.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var hl,pl=d,f=((hl=r)&&(ll.__proto__=hl),((ll.prototype=Object.create(hl&&hl.prototype)).constructor=ll).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:G,max:W},this._evalSeries=[]},ll.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},ll.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;T(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))}},ll.prototype.addValue=function(t,e){var o;t&&T(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},ll.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=(T(s)||(this._evalSeries[r]=s=br(t,{},n,!0)),t);return s&&br(r=x({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},ll.prototype.pointType=function(){return pl},ll.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},ll.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=(it(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=Object(A.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 pl(t,s));return n.color=a,this.append(n),n},ll.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)},ll.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},ll.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},ll.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),p=0;p<i.data.length;p++){var l=this._bindPoint(i,o,p),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=h.min<=d&&d<=h.max;u&&d&&t(c,x({pointIx:p,series:i,seriesIx:o,dataItem:i.data[p],owner:this},l))}},ll.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},ll.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},ll);function ll(t,e){hl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(f,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),x(f.prototype,{_bindPoint:kr.prototype._bindPoint});var cl,ul=f,o=((cl=Fs)&&(dl.__proto__=cl),((dl.prototype=Object.create(cl&&cl.prototype)).constructor=dl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},dl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},dl.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=Kt(n.categories||[]),a=Kt(r.categories||[]),h=0;h<i.length;h++){var p=Ki.current.bindPoint(o,h).valueFields,l=p.x,p=p.y;s.has(l)||s.add(l),a.has(p)||a.add(p)}n.categories=s.values(),r.categories=a.values()}},dl.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(Os(r,["heatmap"]),i)}},dl.prototype.createHeatmapChart=function(t,e){t=new ul(this,{series:t});this.appendChart(t,e)},dl.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=vt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=vt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},dl.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)},dl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},dl.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],h=this.series,p=0;p<h.length;p++){var l=h[p],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){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(Ms(s.type,U)||!s.type&&i?ti: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},dl.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]},dl.prototype.removeAxis=function(t){var e=t.options.name;cl.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},dl.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new B(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p];As(l.options.vertical?h:a,l.getCategory(r))}0<a.length&&0<h.length&&t.trigger(o,{element:Lt(e),originalEvent:e,x:Es(a),y:Es(h)})},dl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);fl(this.options,i,o,e),fl(this.originalOptions,i,o,e)},dl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},dl);function dl(){cl.apply(this,arguments)}function fl(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}i(o,{xAxis:{},yAxis:{}}),x(o.prototype,Ns);var gl,d=o,f="color",o="first",yl="max",vl=(lh.current.register(za,[rr,nr,sr,hr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),lh.current.register(jh,["scatter","scatterLine","bubble"]),lh.current.register(Qh,[ar]),lh.current.register(sp,["donut"]),lh.current.register(c,["funnel"]),lh.current.register(h,["polarArea","polarLine","polarScatter"]),lh.current.register(Lr,["radarArea","radarColumn","radarLine"]),lh.current.register(d,["heatmap"]),Ki.current.register([rr,nr,sr,hr,"area","verticalArea"],[Y],["category",f,"noteText","errorLow","errorHigh"]),Ki.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",f,"noteText"]),Ki.current.register(["waterfall","horizontalWaterfall"],[Y],["category",f,"noteText","summary"]),Ki.current.register(["polarArea","polarLine","polarScatter"],[y,v],[f]),Ki.current.register(["radarArea","radarColumn","radarLine"],[Y],[f]),Ki.current.register(["funnel"],[Y],["category",f,"visibleInLegend","visible"]),Qs.current.register([rr,nr,sr,hr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:yl,color:o,noteText:o,errorLow:"min",errorHigh:yl}),Qs.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:yl,color:o,noteText:o}),Qs.current.register(["radarArea","radarColumn","radarLine"],{value:yl,color:o}),Ki.current.register(["scatter","scatterLine","bubble"],[y,v],[f,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ki.current.register(["bubble"],[y,v,"size"],[f,"category","noteText"]),Ki.current.register(["heatmap"],[y,v,Y],[f,"noteText"]),Ki.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",f,"downColor","noteText"]),Qs.current.register(["candlestick","ohlc"],{open:yl,high:yl,low:"min",close:yl,color:o,downColor:o,noteText:o}),Ki.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",f,"noteText"]),Qs.current.register(["boxPlot","verticalBoxPlot"],{lower:yl,q1:yl,median:yl,q3:yl,upper:yl,mean:yl,outliers:o,color:o,noteText:o}),Ki.current.register(["bullet","verticalBullet"],["current","target"],["category",f,"visibleInLegend","noteText"]),Qs.current.register(["bullet","verticalBullet"],{current:yl,target:yl,color:o,noteText:o}),Ki.current.register([ar,"donut"],[Y],["category",f,"explode","visibleInLegend","visible"]),["category",Y,y,v]),c=((gl=A.Class)&&(L.__proto__=gl),((L.prototype=Object.create(gl&&gl.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){Q(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=vl,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=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&&Ft(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 Vi(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 Hi(e[o])},L.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Hi(e[t])},L.prototype.plotArea=function(){return new Ui(this._plotArea)},L.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=it(e)?r.filterPoints(e):(st(e)?(o=e.series,i=e.category):o=i=e,"donut"===n.type?ml(r.pointsBySeriesName(o),i):n.type===ar||"funnel"===n.type?ml((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;it(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&T(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&&Rt(e,{width:o.width}),o.height&&Rt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=A.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 Da,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Cl(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}}),wl(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),Cl(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},L.prototype._sharedTooltip=function(){return this._plotArea instanceof za&&this.options.tooltip&&this.options.tooltip.shared},L.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new qa(this._plotArea,t.pannable))},L.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new $a(this,e))},L.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Ja(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(["dragStart",lr,cr])),o=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",ur,dr]),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 mh(this.chartService,t)},L.prototype._createSharedTooltip=function(t){return new wh(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 h=0;h<vl.length;h++)i=n.axisDefaults||{},r=(r=[].concat(n[o=vl[h]+"Axis"])).map(a),n[o]=1<r.length?r:r[0];var p=t,t=e,l=p.series,c=l.length,u=p.seriesDefaults,d=x({},p.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);xl(d),xl(g);for(var y=0;y<c;y++){var v=l[y].type||p.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:p.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 Te(this._modelOptions()),i=(o.chart=this,o._plotArea=e,Ge.buildTitle(t.title)),r=Ge.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return o.append.apply(o,Ge.orderTitles([i,r])),t.legend&&t.legend.visible&&o.append(new hh(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 lh.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 vh(this,r,x({min:i.min,max:i.max},n.select)),e.push(r))}},L.prototype._selectStart=function(t){return this.trigger("selectStart",t)},L.prototype._select=function(t){return this.trigger("select",t)},L.prototype._selectEnd=function(t){return this.trigger("selectEnd",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=Object(A.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={}),"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},L.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,Mt(e,((t={}).contextmenu=this._clickHandler,t[fr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Mt(e,((t={}).mousemove=this._mousemove,t)),this.domEvents=so.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._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger("plotAreaLeave"))},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(dr,{}))},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:_l(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(ur,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(["dragStart",lr,cr])&&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:_l(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(lr,{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(lr,{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(cr,{axisRanges:_l(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,cr),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(ur,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(dr,{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 O(t.rate,.3)},L.prototype._mousewheel=function(t){var e=this,o=At(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:_l(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(ur,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(dr,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(ur,{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,dr)},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=_l(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=Et(t);return this._toModelCoordinates(t.x,t.y)},L.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=pt(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=Bt(this.element);return{left:M(t.x+e.left+o.left),top:M(t.y+e.top+o.top)}},L.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Bt(o),r=this._elementPadding(),o=qt(o).invert(),t=new A.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new B(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){return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Fs)}),this._showInactiveOpacity(t,e),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._showInactiveOpacity=function(t,e){var 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},L.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},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),Mt(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)):(Dt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},L.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;this._trackCrosshairs(e),o.hover&&((o=o.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!o&&(this._plotAreaHovered=!1,this.trigger("plotAreaLeave"))),this._sharedTooltip()&&this._trackSharedTooltip(e,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,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))},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 _t,a=[],h=!1,p=0;p<n;p++){var l=r[p],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,h=c||h;if(c&&0<d)for(var f=(o=Rs(t,qi(l.categoryField,u[0])))?Bs:qi,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=Io);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?Io:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],zt(i))&&i.push(e[r]);return i}(function(t,e){return Io(t[0],e[0])}):a),t.categories=i[0]):h&&(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===Y?r="field":r+="Field",!T(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,[ar,"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)},L.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},L.prototype.updateMouseMoveHandler=function(){var t;Dt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&Mt(this.element,((t={}).mousemove=this._mousemove,t))},L.prototype.applyOptions=function(t,e){wl(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,Dt(this.element,((t={}).contextmenu=this._clickHandler,t[fr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Dt(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={}),gl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new no(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(),Ht.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function ml(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function xl(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 _l(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 bl=["data","categories"];function wl(t,e){for(var o in e){var i,r,n;!u(o,bl)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],T(r))&&((n=null===i)||!T(i)?(delete t[o],n&&delete e[o]):r&&st(i)&&st(r)&&wl(r,i))}}function Cl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}i(c,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:nr,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 Sl,kl=c,Al=((Sl=wh)&&(Tl.__proto__=Sl),((Tl.prototype=Object.create(Sl&&Sl.prototype)).constructor=Tl).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 B(this.plotArea.box.x2,e.center().y):new B(e.center().x,-2),align:i}},Tl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Tl),Pl=[rr,"bullet"];function Tl(){Sl.apply(this,arguments)}function Ml(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 Ol(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Bl(t){return m(t)?[t]:t}(Rl=kl)&&(El.__proto__=Rl),((El.prototype=Object.create(Rl&&Rl.prototype)).constructor=El).prototype._setElementClass=function(t){Q(t,"k-sparkline")},El.prototype._initElement=function(t){Rl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(Rt(t).width)},El.prototype._resize=function(){var t=this.element,e=Ml(t.childNodes);this._initialWidth=Math.floor(Rt(t).width),Ol(t.childNodes,e),Rl.prototype._resize.call(this)},El.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Ml(e.childNodes),i=document.createElement("span"),t=(i.innerHTML=" ",e.appendChild(i),x({width:this._autoWidth,height:Rt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return Rt(e,{width:t.width,height:t.height}),e.removeChild(i),Ol(e.childNodes,o),this.surface&&this.surface.resize(),t},El.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},El.prototype._createPlotArea=function(t){t=Rl.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},El.prototype._calculateWidth=function(t){for(var e=this.options,o=P(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===rr)return 150;if("bullet"===h.type)return 150;if(h.type===ar)return Rt(r).height;var p=a.categoryAxis;p&&(p=p.categoriesCount()*(!a.options.isStacked&&u(h.type,[nr,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,p))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},El.prototype._createSharedTooltip=function(t){return new Al(this._plotArea,t)},El.normalizeOptions=function(t){t=Bl(t);return(t=Z(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:Bl(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Pl)||u(t.seriesDefaults.type,Pl)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Rl,h=El;function El(){Rl.apply(this,arguments)}i(h,{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 Ll,Il=h,zl=((Ll=A.drawing.Animation)&&(Vl.__proto__=Ll),((Vl.prototype=Object.create(Ll&&Ll.prototype)).constructor=Vl).prototype.setup=function(){this._initialOpacity=parseFloat(pt(this.element,"opacity").opacity)},Vl.prototype.step=function(t){pt(this.element,{opacity:String(bt(this._initialOpacity,0,t))})},Vl.prototype.abort=function(){Ll.prototype.abort.call(this),pt(this.element,{display:"none",opacity:String(this._initialOpacity)})},Vl.prototype.cancel=function(){Ll.prototype.abort.call(this),pt(this.element,{opacity:String(this._initialOpacity)})},Vl);function Vl(){Ll.apply(this,arguments)}function jl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}(Dl=A.Class)&&(Hl.__proto__=Dl),((Hl.prototype=Object.create(Dl&&Dl.prototype)).constructor=Hl).prototype.createElements=function(){var t=this.element=jl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=jl("k-tooltip k-chart-tooltip"),o=this.scroll=jl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},Hl.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Oo(Vo(t)+Vo(e-t)/2),h=.4*o.width(),p=o.center().x-h,l=(o.center().x-p)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=dt(r),r=(this.clearHideTimeout(),this._visible||(pt(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,pt(s,{left:o.center().x-s.offsetWidth/2,top:o.y1}),pt(s,["marginTop","borderTopWidth","height"]));pt(n,{width:h,left:p+a*l,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),pt(i,{visibility:"visible"})},Hl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Hl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new zl(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},Hl.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 Dl,Lr=Hl;function Hl(t,e,o){Dl.call(this),this.options=x({},this.options,o),this.container=t,this.chartService=e;o=pt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}i(Lr,{format:"{0:d} - {1:d}",hideDelay:500});var Ul=Lr,Fl="_navigator",Nl=Fl;function Gl(){}(ql=A.Class)&&(Zl.__proto__=ql),((Zl.prototype=Object.create(ql&&ql.prototype)).constructor=Zl).prototype.parseDate=function(t){return Fo(this.chart.chartService.intl,t)},Zl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Zl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Zl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Zl.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=(Gl.prototype=o,new Gl);0!==o.categoriesCount()&&(this.clean(),h.box=o.box,this.selection=new vh(t,h,{min:r,max:i,from:s||r,to:a||i,mousewheel:O(n,{zoom:"left"}),visible:e.visible},new Ct(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new Ul(t.element,t.chartService,{min:r,max:i,template:dt(e.hint),format:e.hint.format}))},Zl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Nl].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()},Zl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(zt(e.panes),t)},Zl.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)},Zl.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?Vo(t.to)-Vo(t.from):Vo(o.options.to)-Vo(o.options.from),r=Oo(_(Vo(e.min),n.min,Vo(n.max)-i)),t=Oo(_(Vo(r)+i,Vo(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))},Zl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Zl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},Zl.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!==Fl&&(n.min=o,n.max=i)}},Zl.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 ti(x({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=Ro(e.min,-e.baseUnitStep,e.baseUnit),t.to=Ro(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},Zl.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))},Zl.prototype._zoomEnd=function(t){this._dragEnd(t)},Zl.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},Zl.prototype._selectStart=function(t){return this.chart._selectStart(t)},Zl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Zl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Zl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Nl]},Zl.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}},Zl.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:Fl}),o.visible||(r.visible=!1,r.height=.1),i.push(r),Zl.attachAxes(t,o),Zl.attachSeries(t,o,e))},Zl.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=0===Os(o,pr).length,o=x({type:"date",pane:Fl,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:Nl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},o,r,{name:Nl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},o,r,{name:Nl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Nl,pane:Fl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Zl.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:Nl,categoryAxis:Nl,autoBind:e.autoBindElements}))};var Wl,ql,Xl=Zl,d=((Wl=kl)&&(Yl.__proto__=Wl),((Yl.prototype=Object.create(Wl&&Wl.prototype)).constructor=Yl).prototype.applyDefaults=function(t,e){var o=Rt(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);Xl.setup(t,e),Wl.prototype.applyDefaults.call(this,t,e)},Yl.prototype._setElementClass=function(t){Q(t,"k-chart k-stockchart")},Yl.prototype.setOptions=function(t){this.destroyNavigator(),Wl.prototype.setOptions.call(this,t)},Yl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Yl.prototype._resize=function(){this.noTransitionsRedraw()},Yl.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Yl.prototype._dirty=function(){var t=this.options,t=vt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Yl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Xl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Wl.prototype._redraw.call(this),t.initSelection()},Yl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Fl?this._unsetActivePoint():Wl.prototype._trackSharedTooltip.call(this,t)},Yl.prototype.bindCategories=function(){Wl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Yl.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Nl?t=i.categories:t&&i.pane===Fl&&(i.categories=t)}},Yl.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Yl.prototype.destroy=function(){this.destroyNavigator(),Wl.prototype.destroy.call(this)},Yl.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Wl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Fl},Yl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Yl);function Yl(){Wl.apply(this,arguments)}function Zl(t){ql.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)),T(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Ct(this,((o={})[lr]="_drag",o[cr]="_dragEnd",o[ur]="_zoom",o[dr]="_zoomEnd",o)),t.addObserver(this.chartObserver)}i(d,{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 Ql=d,Kl=Math.PI/180;function $l(t,e){var o=t.getOrigin(),i=t.getSize(),e=P(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 Jl=A.drawing.Group,tc=A.drawing.Path,ec=A.drawing.Text;function oc(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=tc.fromRect(new A.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new ec(t.text,new A.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=$l(t.bbox().clone(),e.padding),e=tc.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 Jl;return i.append(o),i.append(e),i.append(t),i}function ic(t,e,o){var i=T(t.from)?t.from:W,r=T(t.to)?t.to:G;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function rc(t,e){e=P(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,$l(t,e)}var nc,sc=A.drawing.Path,ac=A.drawing.Surface,yl=((nc=A.Class)&&(hc.__proto__=nc),((hc.prototype=Object.create(nc&&nc.prototype)).constructor=hc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},hc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},hc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},hc.prototype.exportVisual=function(){return this._visuals},hc.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(Z(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},hc.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]},hc.prototype.resize=function(){this.noTransitionsRedraw()},hc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},hc.prototype.redraw=function(){var t=this._surfaceSize(),t=new A.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),rc(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},hc.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},hc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},hc.prototype.setIntlService=function(t){this.contextService.intl=t},hc.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(Z(o)){for(var i=[],r=0;r<o.length;r++)i.push(x({},e.pointer,o[r]));t.pointer=i}},hc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new A.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=rc(e,o.width)),sc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},hc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Rt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=ac.create(o,{type:t.renderAs}))},hc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},hc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},hc.prototype.getSize=function(){return this._getSize()},hc.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}},hc.prototype._defaultSize=function(){return{width:200,height:200}},hc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},hc);function hc(t,e,o,i){void 0===i&&(i={}),nc.call(this),this.element=t,this.theme=o,this.contextService=new no(this,i),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(o),this.redraw()}i(yl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var pc=yl,lc=A.drawing.Path,cc=A.drawing.Group,uc=A.geometry.Point;function dc(t,e,o,i){var r,n,s,a,h,p,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,p=h=a=s=void 0,a=(r=o).position,h=o.tickX,p=o.tickY,r=o.vertical?(s=new uc(h,a),new uc(h+n.size,a)):(s=new uc(a,p),new uc(a,p+n.size)),new lc({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(fc=pi)&&(gc.__proto__=fc),((gc.prototype=Object.create(fc&&fc.prototype)).constructor=gc).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||te(t.min,t.max),t},gc.prototype.initFields=function(){},gc.prototype.render=function(){var t=this.elements=new cc,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},gc.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 cc,a=n.length,h=t.rangeSize||t.minorTicks.size/2,p=0;p<a;p++){var l=ic(n[p],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(lc.fromRect(new A.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},gc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new cc,i=0;i<t.length;i++)o.append(oc(t[i],e.labels));return o},gc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new cc;return 0<t.width&&t.visible&&((t=new lc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},gc.prototype.renderTicks=function(){var t=new cc,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return dc(t,this.getMajorTickPositions(),i,e.majorTicks),dc(t,this.getMinorTickPositions(),i,x({},{skipUnit:o/e.minorUnit},e.minorTicks)),t};var fc,o=gc;function gc(t,e){t=t||{};!T(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),fc.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:D,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:D,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var yc,vc=o,f=((yc=A.Class)&&(mc.__proto__=yc),((mc.prototype=Object.create(yc&&yc.prototype)).constructor=mc).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=T(e._oldValue)?e.value:i,e.value=_(t,i,o),this.elements&&this.repaint()},mc);function mc(t,e){yc.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,T(e.value)?e.value=_(e.value,i,o):e.value=i}i(f,{color:D});var xc,c=f,h=((xc=c)&&(_c.__proto__=xc),((_c.prototype=Object.create(xc&&xc.prototype)).constructor=_c).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=P(i.margin),p=n?p[s?"left":"right"]:p[s?"bottom":"top"],p=s?-p:p;n?(o=new R(r.x1+p,r.y1,r.x1+p,r.y2),s?o.x1-=a:o.x2+=a,"barPointer"!==i.shape&&(t=e=new R(r.x2+p,r.y1-h,r.x2+p,r.y2+h))):(o=new R(r.x1,r.y1-p,r.x2,r.y1-p),s?o.y2+=a:o.y1-=a,"barPointer"!==i.shape&&(t=e=new R(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)},_c.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:T(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},_c.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=P(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},_c);function _c(t,e){xc.call(this,t,e),this.options=x({track:{visible:T(e.track)}},this.options)}i(h,{shape:"barPointer",track:{border:{width:1}},color:D,border:{width:1},opacity:1,margin:P(3),animation:{type:"barPointer"},visible:!0});var bc,wc=h,Lr=((bc=A.drawing.Animation)&&(Cc.__proto__=bc),((Cc.prototype=Object.create(bc&&bc.prototype)).constructor=Cc).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 A.geometry.Point(o.x1,o.y1)),n=this.toScale=new A.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Cc.prototype.step=function(t){var e=bt(this.fromScale.x,this.toScale.x,t),t=bt(this.fromScale.y,this.toScale.y,t);this.element.transform(A.geometry.transform().translate(e,t))},Cc);function Cc(){bc.apply(this,arguments)}i(Lr,{easing:"linear",duration:250}),A.drawing.AnimationFactory.current.register("arrowPointer",Lr);var Sc,kc,Ac=Lr,Pc=A.geometry.Point,Tc=A.drawing.Path,Mc=((kc=wc)&&(Bc.__proto__=kc),((Bc.prototype=Object.create(kc&&kc.prototype)).constructor=Bc).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 Pc(0,0-o),new Pc(0-i*e,0),new Pc(0,0+o)]:[new Pc(0-o,0),new Pc(0,0+i*e),new Pc(0+o,0)]},Bc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ac(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()},Bc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type="arrowPointer",new Tc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(A.geometry.transform().translate(i.x1,i.y1)),this.elements=o},Bc),d=((Sc=A.drawing.Animation)&&(Oc.__proto__=Sc),((Oc.prototype=Object.create(Sc&&Sc.prototype)).constructor=Oc).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)},Oc.prototype.step=function(t){t=bt(this.from,this.to,t);this._set(t)},Oc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Oc);function Oc(){Sc.apply(this,arguments)}function Bc(t,e){kc.call(this,t,e),T(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}i(d,{easing:"linear",speed:250}),A.drawing.AnimationFactory.current.register("barPointer",d);var Rc,Ec,Lc=d,Ic=A.drawing.Group,zc=A.drawing.Path,Vc=((Ec=wc)&&(Hc.__proto__=Ec),((Hc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Hc).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 A.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new A.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]},Hc.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 Lc(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()},Hc.prototype.render=function(){var t=new Ic,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new zc({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},Hc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new zc.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},Hc),jc=A.drawing.Group,yl=((Rc=pc)&&(Dc.__proto__=Rc),((Dc.prototype=Object.create(Rc&&Rc.prototype)).constructor=Dc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new R(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()},Dc.prototype._buildVisual=function(){var t=new jc,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},Dc.prototype._createModel=function(){var t=this.options,e=this.scale=new vc(t.scale,this.contextService);this.pointers=[];for(var o=Z(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=x({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Mc:Vc;this.pointers.push(new n(e,r))}},Dc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Dc.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 R(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new R(t.x1,r.y-e,t.x2,r.y+e))},Dc.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 R(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new R(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Dc.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))},Dc.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)},Dc);function Dc(){Rc.apply(this,arguments)}function Hc(t,e){Ec.call(this,t,e),T(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}i(yl,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Uc=yl,Fc=A.drawing.Arc,Nc=A.drawing.Path,Gc=A.drawing.Group;function Wc(t,e,o,i){var r=new Gc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),p=new A.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Nc({stroke:{color:i.color,width:i.width}}).moveTo(h).lineTo(p))}return r}function qc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}(Xc=pi)&&(Yc.__proto__=Xc),((Yc.prototype=Object.create(Xc&&Xc.prototype)).constructor=Yc).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||te(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Yc.prototype.initFields=function(){},Yc.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()},Yc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!T(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Yc.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},Yc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Yc.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},Yc.prototype.labelsCount=function(){var t=Xc.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Yc.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 Gc,s=.05*o,a=(T(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),h="inside"===a.position,p=T(this.labelElements);h&&(o-=this.ticksSize(),this.hasRanges()&&!p&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,r=P(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)*Kl,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(h?1:-1),m=m.y+Math.sin(x)*(v+d)*(h?1:-1),x=(g.reflow(new R(_-y,m-v,_+y,m+v)),new A.geometry.Point(g.box.x1,g.box.y1)),_=void 0;p?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||A.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=oc(g,t.labels),n.append(_)),this.bbox=A.geometry.Rect.union(this.bbox,_.bbox())}return n},Yc.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=A.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Yc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Gc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var h=t[a],p=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-p!=0&&o.append(this.createRange(p,l,s,h))}}return o},Yc.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new A.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Fc(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Yc.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(qc(r,n,s));for(var a=0;a<o;a++)for(var h=ic(e[a],r,n),p=i.length,l=0;l<p;l++){var c=i[l];if(c.from<=h.from&&h.from<=c.to){i.push(qc(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&i.push(qc(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return i},Yc.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},Yc.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new A.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Yc.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Wc(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Gc),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=Wc(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Yc.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},Yc.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;i&&(a+=n,h=-h),360<=n&&o.max%e==0&&--s;for(var p=[],l=0;l<s;l++)p.push(M(a,3)),a+=h;return M(a)<=t.endAngle&&p.push(a),p},Yc.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)},Yc.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 A.geometry.transform).translate(p,a))}};var Xc,o=Yc;function Yc(t,e){Xc.call(this,0,1,t,e)}i(o,{min:0,max:100,majorTicks:{size:15,align:"inside",color:D,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:D,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Zc,Qc=o,f=((Zc=A.drawing.Animation)&&(Kc.__proto__=Zc),((Kc.prototype=Object.create(Zc&&Zc.prototype)).constructor=Kc).prototype.step=function(t){var e=this.options,t=bt(e.oldAngle,e.newAngle,t);this.element.transform(A.geometry.transform().rotate(t,e.center))},Kc);function Kc(t,e){Zc.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}i(f,{easing:"linear",duration:150}),A.drawing.AnimationFactory.current.register("radialPointer",f);var $c,Jc=f,tu=A.drawing.Circle,eu=A.drawing.Group,ou=A.drawing.Path,h=(($c=c)&&(iu.__proto__=$c),((iu.prototype=Object.create($c&&$c.prototype)).constructor=iu).prototype.setAngle=function(t){this.elements.transform(A.geometry.transform().rotate(t,this.center))},iu.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 Jc(this.elements,x(e.animation,{oldAngle:o,newAngle:t})).play()},iu.prototype.render=function(){var t=this.scale,e=this.options,o=new eu;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(Kl),o},iu.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=A.geometry.Rect.fromPoints(new A.geometry.Point(e.x-o,e.y-o),new A.geometry.Point(e.x+o,e.y+o))},iu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new ou({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},iu.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new A.geometry.Circle(this.center,this.capSize);return new tu(e,{fill:{color:t},stroke:{color:t}})},iu);function iu(){$c.apply(this,arguments)}i(h,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var ru,nu=h,su=A.drawing.Group,Lr=((ru=pc)&&(au.__proto__=ru),((au.prototype=Object.create(ru&&ru.prototype)).constructor=au).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=A.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},au.prototype._buildVisual=function(t,e,o){var i=this._visuals=new su;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},au.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)}},au.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=M(a,3),p=M(-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:M((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)},au.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=A.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},au.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},au.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=A.geometry.Rect.union(r.bbox,n[s].bbox)},au.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Qc(t.scale,this.contextService);this.pointers=[];for(var i=Z(e)?e:[e],r=0;r<i.length;r++){var n=new nu(o,x({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},au);function au(){ru.apply(this,arguments)}i(Lr,{transitions:!0,gaugeArea:{background:""}});var hu,pu=Lr,d=((hu=Qc)&&(lu.__proto__=hu),((lu.prototype=Object.create(hu&&hu.prototype)).constructor=lu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},lu.prototype.hasRanges=function(){return!0},lu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},lu.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},lu);function lu(){hu.apply(this,arguments)}i(d,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var cu,uu=d,yl=((cu=A.drawing.Animation)&&(du.__proto__=cu),((du.prototype=Object.create(cu&&cu.prototype)).constructor=du).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=bt(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=M(bt(i.r,r.r,t)),e=M(bt(i.g,r.g,t)),i=M(bt(i.b,r.b,t)),this.element.stroke(new A.Color(o,e,i).toHex()))},du);function du(t,e){cu.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 A.Color(e),this.color=new A.Color(o))}i(yl,{easing:"linear",duration:150}),A.drawing.AnimationFactory.current.register("radialRangePointer",yl);var fu,gu=yl,o=((fu=c)&&(yu.__proto__=fu),((yu.prototype=Object.create(fu&&fu.prototype)).constructor=yu).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 gu(this,x(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},yu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},yu.prototype.stroke=function(t){this.elements.stroke(t)},yu.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}))},yu.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],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},yu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},yu);function yu(){fu.apply(this,arguments)}i(o,{animation:{type:"radialRangePointer",duration:150}});var vu,mu,xu,_u=o,bu=((xu=pu)&&(ku.__proto__=xu),((ku.prototype=Object.create(xu&&xu.prototype)).constructor=ku).prototype._initTheme=function(t){xu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},ku.prototype._createModel=function(){var t=this.options,e=this.scale=new uu(t.scale,this.contextService),e=new _u(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},ku.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},ku.prototype._setValueOptions=function(t){this.options.value=t},ku.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},ku.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}},ku),wu=((mu=bu)&&(Su.__proto__=mu),((Su.prototype=Object.create(mu&&mu.prototype)).constructor=Su).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,mu.prototype._createModel.call(this)},Su),f=((vu=A.Class)&&(Cu.__proto__=vu),((Cu.prototype=Object.create(vu&&vu.prototype)).constructor=Cu).prototype.initProperties=function(){},Cu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},Cu.prototype.encode=function(t,e,o){t=T(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}},Cu.prototype.initValue=function(){},Cu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},Cu.prototype.addData=function(){},Cu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},Cu);function Cu(t){vu.call(this),this.setOptions(t),this.initProperties()}function Su(){mu.apply(this,arguments)}function ku(){xu.apply(this,arguments)}i(f,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Au,Pu=Object.assign,h=((Au=f)&&(Tu.__proto__=Au),((Tu.prototype=Object.create(Au&&Au.prototype)).constructor=Tu).prototype.initProperties=function(){Au.prototype.initProperties.call(this),Pu(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"})},Tu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Tu.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()},Tu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Tu.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]))},Tu.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},Tu.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Tu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Tu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Tu.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},Tu);function Tu(){Au.apply(this,arguments)}i(h,{addCheckSum:!0});var Mu,Ou,Bu=Object.assign,Lr=((Ou=f)&&(Eu.__proto__=Ou),((Eu.prototype=Object.create(Ou&&Ou.prototype)).constructor=Eu).prototype.initProperties=function(){Ou.prototype.initProperties.call(this),Bu(this,{minBaseUnitLength:.7})},Eu.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()},Eu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Eu.prototype.addBase=function(){},Eu),d=((Mu=Lr)&&(Ru.__proto__=Mu),((Ru.prototype=Object.create(Mu&&Mu.prototype)).constructor=Ru).prototype.initProperties=function(){Mu.prototype.initProperties.call(this),Bu(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"}}})},Ru.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Ru.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))},Ru.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Ru.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Ru.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Ru.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Ru.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Ru.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Ru.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Ru);function Ru(){Mu.apply(this,arguments)}function Eu(){Ou.apply(this,arguments)}i(d,{addCheckSum:!1});var Lu,Iu,zu,Vu,ju,Du,Hu,Uu,Fu,Nu,Gu,Wu={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"]},yl=((Du=d)&&(sd.__proto__=Du),((sd.prototype=Object.create(Du&&Du.prototype)).constructor=sd).prototype.initProperties=function(){Du.prototype.initProperties.call(this),x(this,Wu,{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}}})},sd),qu=Object.assign,c=((ju=Lr)&&(nd.__proto__=ju),((nd.prototype=Object.create(ju&&ju.prototype)).constructor=nd).prototype.initProperties=function(){ju.prototype.initProperties.call(this),qu(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"}})},nd.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},nd.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.")},nd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},nd.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},nd.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},nd.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},nd.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)},nd.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]},nd.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},nd.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},nd.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},nd),o=((Vu=c)&&(rd.__proto__=Vu),((rd.prototype=Object.create(Vu&&Vu.prototype)).constructor=rd).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),x(this,Wu,{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))}})},rd),Xu=/^\d+$/,Yu=Object.assign,Lr=((zu=f)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.prototype.initProperties.call(this),Yu(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},id.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()},id.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()},id.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},id.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},id.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},id.prototype.validate=function(t){if(Xu.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(",")+".")},id.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)},id),Zu=/^\d+$/,Qu=/^[a-z0-9]+$/i,Ku=Object.assign,$u=((Iu=A.Class)&&(od.__proto__=Iu),((od.prototype=Object.create(Iu&&Iu.prototype)).constructor=od).prototype.initProperties=function(){},od.prototype.addStart=function(){},od.prototype.is=function(){},od.prototype.isCode=function(){return!1},od.prototype.move=function(){},od.prototype.pushState=function(){},od),Ju=((Lu=$u)&&(ed.__proto__=Lu),((ed.prototype=Object.create(Lu&&Lu.prototype)).constructor=ed).prototype.initProperties=function(){Lu.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},ed.prototype.addStart=function(){this.encoding.addPattern(this.START)},ed.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},ed.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},ed.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++},ed.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)},ed.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},ed.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},ed.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},ed),td={};function ed(t,e){Lu.call(this,t),this.states=e,this._initMoves(e)}function od(t){Iu.call(this),this.encoding=t,this.initProperties()}function id(){zu.apply(this,arguments)}function rd(){Vu.apply(this,arguments)}function nd(){ju.apply(this,arguments)}function sd(){Du.apply(this,arguments)}function ad(t,e){Hu.call(this,t),this.states=e}function hd(t,e){Uu.call(this,t),this._initSubStates(e)}function pd(){Fu.apply(this,arguments)}function ld(){Nu.apply(this,arguments)}function cd(){Gu.apply(this,arguments)}td.A=((Gu=Ju)&&(cd.__proto__=Gu),((cd.prototype=Object.create(Gu&&Gu.prototype)).constructor=cd).prototype.initProperties=function(){Gu.prototype.initProperties.call(this),Ku(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},cd.prototype.isCode=function(t){return 0<=t&&t<96},cd.prototype.getValue=function(t){return t<32?t+64:t-32},cd),td.B=((Nu=Ju)&&(ld.__proto__=Nu),((ld.prototype=Object.create(Nu&&Nu.prototype)).constructor=ld).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),Ku(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},ld.prototype.isCode=function(t){return 32<=t&&t<128},ld.prototype.getValue=function(t){return t-32},ld),td.C=((Fu=$u)&&(pd.__proto__=Fu),((pd.prototype=Object.create(Fu&&Fu.prototype)).constructor=pd).prototype.initProperties=function(){Fu.prototype.initProperties.call(this),Ku(this,{key:"C",MOVE:99,START:105})},pd.prototype.addStart=function(){this.encoding.addPattern(this.START)},pd.prototype.is=function(t,e){var o=Pd(t,e,4);return(e+4<=t.length||2===t.length)&&Zu.test(o)},pd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},pd.prototype.pushState=function(t){for(var e;(e=Pd(t.value,t.index,2))&&Zu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},pd.prototype.getValue=function(t){return t},pd),td.FNC4=((Uu=$u)&&(hd.__proto__=Uu),((hd.prototype=Object.create(Uu&&Uu.prototype)).constructor=hd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),Ku(this,{key:"FNC4",dependentStates:["A","B"]})},hd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},hd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},hd.prototype.isCode=function(t){return 128<=t&&t<256},hd.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},hd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},hd.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},hd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},hd.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]},hd.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},hd),td.FNC1=((Hu=$u)&&(ad.__proto__=Hu),((ad.prototype=Object.create(Hu&&Hu.prototype)).constructor=ad).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Ku(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})},ad.prototype.addStart=function(){this.encoding[this.startState].addStart()},ad.prototype.is=function(){return u(this.key,this.states)},ad.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},ad.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!Zu.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Qu.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.")},ad.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Pd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},ad.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},ad.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}},ad.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}},ad);(vd=f)&&(Ad.__proto__=vd),((Ad.prototype=Object.create(vd&&vd.prototype)).constructor=Ad).prototype.initProperties=function(){vd.prototype.initProperties.call(this),Ku(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})},Ad.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new td[this.states[t]](this,this.states)},Ad.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},Ad.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())},Ad.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))}},Ad.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Ad.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Ad.prototype.addStop=function(){this.addPattern(this.STOP)},Ad.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Ad.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++},Ad.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 ud,dd,fd,gd,yd,vd,Ju=Ad,$u=((yd=Ju)&&(kd.__proto__=yd),((kd.prototype=Object.create(yd&&yd.prototype)).constructor=kd).prototype.initProperties=function(){yd.prototype.initProperties.call(this),Ku(this,{name:"Code 128 A",states:["A"]})},kd),md=((gd=Ju)&&(Sd.__proto__=gd),((Sd.prototype=Object.create(gd&&gd.prototype)).constructor=Sd).prototype.initProperties=function(){gd.prototype.initProperties.call(this),Ku(this,{name:"Code 128 B",states:["B"]})},Sd),xd=((fd=Ju)&&(Cd.__proto__=fd),((Cd.prototype=Object.create(fd&&fd.prototype)).constructor=Cd).prototype.initProperties=function(){fd.prototype.initProperties.call(this),Ku(this,{name:"Code 128 C",states:["C"]})},Cd),_d=((dd=Ju)&&(wd.__proto__=dd),((wd.prototype=Object.create(dd&&dd.prototype)).constructor=wd).prototype.initProperties=function(){dd.prototype.initProperties.call(this),Ku(this,{name:"Code 128",states:["C","B","A","FNC4"]})},wd),Ju=((ud=Ju)&&(bd.__proto__=ud),((bd.prototype=Object.create(ud&&ud.prototype)).constructor=bd).prototype.initProperties=function(){ud.prototype.initProperties.call(this),Ku(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},bd);function bd(){ud.apply(this,arguments)}function wd(){dd.apply(this,arguments)}function Cd(){fd.apply(this,arguments)}function Sd(){gd.apply(this,arguments)}function kd(){yd.apply(this,arguments)}function Ad(t){vd.call(this,t),this._initStates()}function Pd(t,e,o){return t.substring(e,e+o)}var Td,Md,Od,Bd,Rd,Ed,Ld,Id=Object.assign,zd=((Ld=f)&&(Kd.__proto__=Ld),((Kd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Kd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),Id(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Hd})},Kd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Kd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Kd.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()},Kd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Kd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Kd.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]])},Kd),Vd=((Ed=zd)&&(Qd.__proto__=Ed),((Qd.prototype=Object.create(Ed&&Ed.prototype)).constructor=Qd).prototype.initProperties=function(){Ed.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Qd),jd=((Rd=zd)&&(Zd.__proto__=Rd),((Zd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Zd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Zd),Dd=((Bd=zd)&&(Yd.__proto__=Bd),((Yd.prototype=Object.create(Bd&&Bd.prototype)).constructor=Yd).prototype.initProperties=function(){Bd.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Yd),zd=((Od=zd)&&(Xd.__proto__=Od),((Xd.prototype=Object.create(Od&&Od.prototype)).constructor=Xd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Id(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Xd),Hd={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Ud=Object.assign,f=((Md=f)&&(qd.__proto__=Md),((qd.prototype=Object.create(Md&&Md.prototype)).constructor=qd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),Ud(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},qd.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},qd.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)},qd.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)},qd.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])},qd.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},qd),Fd=Object.assign,Nd=((Td=f)&&(Wd.__proto__=Td),((Wd.prototype=Object.create(Td&&Td.prototype)).constructor=Wd).prototype.initProperties=function(){Td.prototype.initProperties.call(this),Fd(this,{name:"EAN 8"})},Wd.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)},Wd),Gd={code11:h,code39:d,code39extended:yl,code93:c,code93extended:o,code128:_d,code128a:$u,code128b:md,code128c:xd};function Wd(){Td.apply(this,arguments)}function qd(){Md.apply(this,arguments)}function Xd(){Od.apply(this,arguments)}function Yd(){Bd.apply(this,arguments)}function Zd(){Rd.apply(this,arguments)}function Qd(){Ed.apply(this,arguments)}function Kd(){Ld.apply(this,arguments)}function $d(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}Gd["gs1-128"]=Ju,Gd.msimod10=Vd,Gd.msimod11=jd,Gd.msimod1010=Dd,Gd.msimod1110=zd,Gd.postnet=Lr,Gd.ean8=Nd,Gd.ean13=f;(Jd=A.Class)&&(tf.__proto__=Jd),((tf.prototype=Object.create(Jd&&Jd.prototype)).constructor=tf).prototype.destroy=function(){this._destroySurface()},tf.prototype._initElement=function(){Q(this.element,"k-barcode")},tf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},tf.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},tf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},tf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},tf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},tf.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},tf.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)},tf.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},tf.prototype._resize=function(){this.redraw()},tf.prototype.createVisual=function(){this.visual=this._render()},tf.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=P(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new R(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),p=new A.drawing.Group;this.contentBox=s,p.append(this._getBackground(n)),i.visible&&(h-=A.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&&T(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},tf.prototype.exportVisual=function(){return this._render()},tf.prototype._getSize=function(){var t=$d(this.element,this.options.renderAs),e=new A.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},tf.prototype.value=function(t){if(!T(t))return this.options.value;this.options.value=String(t),this.redraw()},tf.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new A.drawing.Group,n=0;n<t.length;n++){var s,a=(s=st(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=A.geometry.Rect.fromPoints(new A.geometry.Point(i,s.y1+o.y1),new A.geometry.Point(i+a,s.y2+o.y1)),s=A.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},tf.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new R(0,0,t.width,t.height).unpad(o.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},tf.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new De(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},tf.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),!Gd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Gd[this.type],this.options=x({},this.options,t)};var Jd,h=tf;function tf(t,e,o){void 0===o&&(o=$t),Jd.call(this),this.options=x({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&T(e.value)&&this.redraw()}i(h,{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 ef(t,e){if(void 0===e&&(e=rf),!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"),Gd[n])return n=new Gd[n],o=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 of=h,rf={width:500,height:100},nf=Object.assign;function sf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function af(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function hf(t){return parseInt(t,2)}(gf=A.Class)&&(Af.__proto__=gf),((Af.prototype=Object.create(gf&&gf.prototype)).constructor=Af).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Af.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}},Af.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var pf,lf,cf,uf,df,ff,gf,yf=Af,vf=((ff=A.Class)&&(kf.__proto__=ff),(kf.prototype=Object.create(ff&&ff.prototype)).constructor=kf),mf=((df=A.Class)&&(Sf.__proto__=df),((Sf.prototype=Object.create(df&&df.prototype)).constructor=Sf).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(ig(i,qf,Xf,Yf,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=ig(i,Zf,Qf,Kf,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=rg(function(t){for(var e=0,o=0;o<t.length;o++)e+=xf[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+=xf[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new vf(e,t)},Sf),d=((uf=A.Class)&&(Cf.__proto__=uf),((Cf.prototype=Object.create(uf&&uf.prototype)).constructor=Cf).prototype.initProperties=function(){nf(this,{modeIndicator:"",bitsInCharacterCount:[]})},Cf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},Cf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},Cf.prototype.getModeCountString=function(t,e){return this.modeIndicator+af(t,this.getBitsCharacterCount(e))},Cf.prototype.encode=function(){},Cf.prototype.getStringBitsLength=function(){},Cf.prototype.getValue=function(){},Cf),yl=((cf=d)&&(wf.__proto__=cf),((wf.prototype=Object.create(cf&&cf.prototype)).constructor=wf).prototype.initProperties=function(){cf.prototype.initProperties.call(this),nf(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},wf.prototype.getValue=function(t){return parseInt(t,10)},wf.prototype.encode=function(t,e){for(var o=sf(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=af(o[r],10);return i+af(o[r],1+3*o[r].length)},wf.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)},wf),c=((lf=d)&&(bf.__proto__=lf),((bf.prototype=Object.create(lf&&lf.prototype)).constructor=bf).prototype.initProperties=function(){lf.prototype.initProperties.call(this),nf(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"})},bf.prototype.getValue=function(t){return this.characters[t]},bf.prototype.encode=function(t,e){for(var o=sf(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=af(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+af(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)},bf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},bf),o=((pf=d)&&(_f.__proto__=pf),((_f.prototype=Object.create(pf&&pf.prototype)).constructor=_f).prototype.initProperties=function(){pf.prototype.initProperties.call(this),nf(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},_f.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+'".')},_f.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=af(this.getValue(t.charAt(i)),8);return o},_f.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},_f),xf={};function _f(){pf.apply(this,arguments)}function bf(){lf.apply(this,arguments)}function wf(){cf.apply(this,arguments)}function Cf(){uf.call(this),this.initProperties()}function Sf(){df.apply(this,arguments)}function kf(t,e){ff.call(this),this.dataString=t,this.version=e}function Af(t){gf.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}xf.numeric=new yl,xf.alphanumeric=new c,xf.byte=new o;(Pf=A.Class)&&(Jf.__proto__=Pf),((Jf.prototype=Object.create(Pf&&Pf.prototype)).constructor=Jf).prototype.initProperties=function(){nf(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Jf.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=rg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new vf(t,e)},Jf.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Jf.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Jf.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=af(t,8);else{for(var e=8-e,r=0;r<o;r++)i=af(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Jf.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var Pf,Tf=Jf,Mf=[{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}}],Of="numeric",Bf="alphanumeric",Rf="byte",Ef={1:0},Lf={0:1},If={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},zf=[1,0,1,1,1],Vf=[1,0,1],jf={L:"01",M:"00",Q:"11",H:"10"},Df=["11101100","00010001"],Hf=93,Uf=[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}],Ff=/^\d+/,Nf=new RegExp("^[A-Z $%*+./:-]+"),Gf=new RegExp("^[A-Z0-9 $%*+./:-]+"),Wf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),qf=8,Xf=5,Yf=8,Zf=17,Qf=9,Kf=16,$f=[[1,0],[1,25,0]];function Jf(){Pf.call(this),this.initProperties(),this.mode=xf[this.encodingMode]}function tg(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function eg(t,e,o,i){for(var r=0;r<Uf.length;r++)t[r][o][i]=Uf[r](o,i)?1^e:parseInt(e,10)}function og(t,e){for(var o,i=$f[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]=Lf[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Ef[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]=af(r[h],8);return a}function ig(t,e,o,i,r){var n,s=Ff.exec(t),s=s?s[0]:"",a=Nf.exec(t),a=a?a[0]:"",h=Gf.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Gf.test(t.charAt(s.length)))?(n=Of,s):h&&(t.length===h.length||h.length>=i||r===Bf)?(n=Bf,s||a):(n=Rf,h?h+Wf.exec(t.substring(h.length))[0]:Wf.exec(t)[0]);return{mode:n,modeString:e}}function rg(t,e){for(var o=0,i=Mf.length-1,r=Math.floor(Mf.length/2);t<Mf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Mf[o][e].totalDataCodewords?r+1:i+1}function ng(t,e,o){var i=hf(e),e=e.length-1,r=t<<e,t=af(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+af(o,e)}function sg(t,e){return parseInt(t.charAt(e),10)}function ag(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&tg(t,sg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&tg(t,sg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)tg(t,sg(e,r-1-i++),n,s);for(tg(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)tg(t,sg(e,r-1-i++),n,s)}function hg(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,tg(t,r=sg(e,e.length-h-1),0+o,s+i),tg(t,r,a+i,0+o)}function pg(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++)tg(t,r=e[a],o+h,i+a),tg(t,r,o+a,i+h),tg(t,r,o+s-h,i+s-a),tg(t,r,o+s-a,i+s-h)}function lg(t,e,o,i){for(var r=o,n=i,s=t[0];tg(t,0,r,i),tg(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function cg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===Hf&&(o[t]+=40)}function ug(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 dg(t,e,o){var o=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?Tf:mf)).getEncodingResult(t,e),r=o.version,n=Mf[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 h=s[a][0],p=0;p<h;p++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=hf(o),i+=8;r.push(c),n.push(og(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+=Df[i],i^=1;return r}(o.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Uf.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,pg(s,zf,0,0),lg(s,[-1,-1],7,7),pg(s,zf,l-7,0),lg(s,[1,-1],l-8,7),pg(s,zf,0,l-7),lg(s,[-1,1],7,l-8),o),s=r;if(!(s<2)){var a,h=i[0],p=h.length,l=Math.floor(s/7),c=[6],u=0;for((s=If[s])?a=(p-13-s)/l:s=a=(p-13)/(l+1),c.push(c[u++]+s);c[u]+a<p;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===h[c[d]][c[f]]&&pg(i,Vf,c[d]-2,c[f]-2)}for(var g=o,y=1,v=g[0].length,m=8;m<v-8;m++)tg(g,y,6,m),tg(g,y,m,6),y^=1;7<=r&&hg(o,af(0,18)),ag(o,af(0,15));for(var x,_,b,w=o,C=t,S=new yf(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(),eg(w,x[A][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)eg(w,0,b.row,b.column);l=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)s[h]=[r[h]=o[h]=0,0],n[h]=[0,0],i[h]=[];for(var p=0;p<a;p++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[p][l],10),i[c][0]===e[p][l]&&p+1<a&&0<=l-1&&e[p+1][l]===i[c][0]&&e[p+1][l-1]===i[c][0]&&(o[c]+=3),cg(c,n,o,0,e[p][l]),cg(c,n,o,1,e[l][p]),ug(c,o,i,e[p][l],s,0),ug(c,o,i,e[l][p],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<o.length;h++)o[h]+=(d=r[h],f=y,g=void 0,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[h]<v&&(v=o[h],u=h);return u}(o),s=o[l];return 7<=r&&hg([s],ng(r,"1111100100101",18)),ag([s],function(t){var e="";if(0===hf(t))return"101010000010010";for(var o=ng(hf(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(jf[e]+af(l,3))),s}for(var fg,gg=1;gg<255;gg++)255<(fg=2*Lf[gg-1])&&(fg^=285),Lf[gg]=fg,Ef[fg]=gg;fg=2*Lf[gg-1]^285,Lf[gg]=fg,Lf[-1]=0;for(var yg=2;yg<=68;yg++){var vg=$f[yg-1];$f[yg]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)o[i+r]=void 0===o[i+r]?(t[i]+(0<=e[r]?e[r]:0))%255:Ef[Lf[o[i+r]]^Lf[(t[i]+e[r])%255]];return o}(vg,[yg,0])}var mg,xg=Math.round,_g=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],bg=[[0,1],[1,1],[1,0]],_d=((mg=A.Class)&&(wg.__proto__=mg),((wg.prototype=Object.create(mg&&mg.prototype)).constructor=wg).prototype.destroy=function(){this._destroySurface()},wg.prototype._initElement=function(){Q(this.element,"k-qrcode")},wg.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},wg.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},wg.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},wg.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},wg.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},wg.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},wg.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},wg.prototype._resize=function(){this.redraw()},wg.prototype.createVisual=function(){this.visual=this._render()},wg.prototype.exportVisual=function(){return this._render()},wg.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 A.drawing.Group);try{n&&(o=dg(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},wg.prototype._renderLogo=function(t,e){var t=xg(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 A.geometry.Rect(new A.geometry.Point(t.x,t.y),new A.geometry.Size(e.width,e.height));return new A.drawing.Image(o,t)},wg.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 A.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),bg,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,bg,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,_g,"#fff")),s},wg.prototype._renderShape=function(t,e,o,i){var r=new A.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},wg.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=$d(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},wg.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},wg.prototype._renderMatrix=function(t,e,o){for(var i=new A.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=xg(o+a*e),h=xg(n),p=xg(o+s*e),l=xg(n+e);i.moveTo(a,h).lineTo(a,l).lineTo(p,l).lineTo(p,h).close()}}return i},wg.prototype._renderBackground=function(t,e){t=new R(0,0,t,t).unpad(e.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},wg.prototype.setOptions=function(t){this.options=nf(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},wg.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},wg.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},wg.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},wg.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}},wg);function wg(t,e,o){void 0===o&&(o=$t),mg.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)}i(_d,{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 Cg(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{dg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var Sg=_d,kg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Ag(t){return t*t}var Pg,Tg,Mg=Math,Og=Mg.abs,Bg=Mg.atan,Rg=Mg.atan2,Eg=Mg.cos,Lg=Mg.sin,Ig=Mg.tan,zg=((Tg=A.Class)&&(Qg.__proto__=Tg),((Qg.prototype=Object.create(Tg&&Tg.prototype)).constructor=Qg).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Qg.prototype.toArray=function(){return[this.lat,this.lng]},Qg.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Qg.prototype.clone=function(){return new Qg(this.lat,this.lng)},Qg.prototype.round=function(t){return this.lng=M(this.lng,t),this.lat=M(this.lat,t),this},Qg.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Qg.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Qg.prototype.destination=function(t,e,o){var e=jt(e),o=o||kg.WGS84,i=jt(this.lat),r=jt(this.lng),t=t/o.a,o=Mg.asin(Lg(i)*Eg(t)+Eg(i)*Lg(t)*Eg(e)),r=r+Rg(Lg(e)*Lg(t)*Eg(i),Eg(t)-Lg(i)*Lg(o));return new Qg(Ot(o),Ot(r))},Qg.prototype.greatCircleTo=function(t,e){var o=Qg.create(void 0),e=e||kg.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,h=jt(o.lng-this.lng),e=Bg((1-a)*Ig(jt(this.lat))),p=Lg(e),l=Eg(e),e=Bg((1-a)*Ig(jt(o.lat))),c=Lg(e),u=Eg(e),d=h,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Lg(d),v=Eg(d),m=Mg.sqrt(Ag(u*y)+Ag(l*c-p*u*v)),x=Rg(m,r=p*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(i=1-Ag(_))&&(b=r-2*p*c/i),d),C=a/16*i*(4+a*(4-3*i)),d=h+(1-C)*a*_*(x+C*m*(b+C*r*(2*Ag(b)-1))),g=Og(d-w)<=this.DISTANCE_CONVERGENCE;var o=i*(Ag(n)-Ag(s))/Ag(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*Ag(b)-1)-n/6*b*(4*Ag(m)-3)*(4*Ag(b)-3))),n=Rg(u*y,l*c-p*u*v),S=Rg(l*y,-p*u+l*c*v);return{distance:M(s*e*(x-o),this.DISTANCE_PRECISION),azimuthFrom:Ot(n),azimuthTo:Ot(S)}},Qg.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Qg.fromLngLat=function(t){return new Qg(t[1],t[0])},Qg.fromLatLng=function(t){return new Qg(t[0],t[1])},Qg.create=function(t,e){if(T(t))return t instanceof Qg?t.clone():1===arguments.length&&2===t.length?Qg.fromLatLng(t):new Qg(t,e)},Qg),Vg=Math,jg=Vg.atan,Dg=Vg.exp,Hg=Vg.pow,Ug=Vg.sin,Fg=Vg.log,Ng=Vg.tan,Gg=A.geometry.Point,Wg=Vg.PI,qg=Wg/2,Xg=Wg/4,Yg=Wg/180,$u=kg.WGS84,md=((Pg=A.Class)&&(Zg.__proto__=Pg),((Zg.prototype=Object.create(Pg&&Pg.prototype)).constructor=Zg).prototype._initOptions=function(t){this.options=x({},this.options,t)},Zg.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Zg.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=jt(e-o)*i,e=this._projectLat(r);return new Gg(t,e)},Zg.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=jt(t),i=Ng(Xg+t/2),t=o*Ug(t),t=Hg((1-t)/(1+t),o/2);return e*Fg(i*t)},Zg.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(Yg*i)+o,o=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=_(i,-this.MAX_LNG,this.MAX_LNG)),new zg(o,i)},Zg.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Dg(-t/o),s=qg-2*jg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=i*Ug(s),h=Hg((1-h)/(1+h),r),h=qg-2*jg(n*h)-s;if(s+=h,Vg.abs(h)<=this.INVERSE_CONVERGENCE)break}return Ot(s)},Zg);function Zg(t){Pg.call(this),this.initProperties(),this._initOptions(t)}function Qg(t,e){Tg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}i(md,{centralMeridian:0,datum:$u});function Kg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function $g(t,e){e.insertBefore(t,e.firstChild)}function Jg(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function ty(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(iy=md)&&(cy.__proto__=iy),((cy.prototype=Object.create(iy&&iy.prototype)).constructor=cy).prototype.initProperties=function(){iy.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},cy.prototype._projectLat=function(t){var e=this.options.datum.a,t=jt(t),t=Ng(Xg+t/2);return e*Fg(t)},cy.prototype._inverseY=function(t){var e=this.options.datum.a,t=Dg(-t/e);return Ot(qg-2*jg(t))};var ey,oy,iy,ry=cy,ny=((oy=A.Class)&&(ly.__proto__=oy),((ly.prototype=Object.create(oy&&oy.prototype)).constructor=ly).prototype.forward=function(t){return new Gg(t.lng,t.lat)},ly.prototype.inverse=function(t){return new zg(t.y,t.x)},(ey=A.Class)&&(py.__proto__=ey),((py.prototype=Object.create(ey&&ey.prototype)).constructor=py).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},py.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},py),sy=(A.Class,A.Class,Object.defineProperty),ay=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),hy=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=uy(o,a,!1),i.browser=uy(t,h,"default"),i.name=uy(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 py(){ey.call(this);var t=this._proj=new ry,t=this.c=2*Wg*t.options.datum.a;this._tm=A.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=A.geometry.transform().scale(t,-t).translate(-.5,-.5)}function ly(){oy.apply(this,arguments)}function cy(){iy.apply(this,arguments)}function uy(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 dy(t,e){return t.bind(e)}function fy(t,e,o,i,r){Ay(t,e,o,i,r)}function gy(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(Z(t=e)?t:(t||"").split(" ")).forEach(function(t){Py(n,t,s,a)})}function yy(t){var e=Sy(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function vy(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function my(){return Number(new Date)}function xy(){}function _y(){this._defaultPrevented=!0}function by(){return!0===this._defaultPrevented}var wy,Cy,Sy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=ky();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},ky=function(){var t=hy(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;var t;if(n.mobileOS.android)return!n.browser.chrome||!(n.browser.version<32||((t=document.querySelector("meta[name=viewport]"))?t.getAttribute("content"):"").match(/user-scalable=no/i))}return!1},n},Ay=function(s,t,a,h,p){(Z(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=h,(e=a)&&it(e)&&!i?n=e:e&&"string"==typeof e&&it(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,sy(t,"currentTarget",{value:e}),sy(t,"delegateTarget",{value:o}),n(t))},Boolean(p))})},Py=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},xd=((Cy=A.Class)&&(Oy.__proto__=Cy),((Oy.prototype=Object.create(Cy&&Cy.prototype)).constructor=Oy).prototype.destroy=function(){this.unbind()},Oy.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]);else 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},Oy.prototype.one=function(t,e){return this.bind(t,e,!0)},Oy.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},Oy.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=_y,n.isDefaultPrevented=by,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},Oy.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},Oy.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)},Oy),Ty=((wy=xd)&&(My.__proto__=wy),((My.prototype=Object.create(wy&&wy.prototype)).constructor=My).prototype._initOptions=function(t){this.options=x({},this.options,t)},My.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},My.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},My.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()},My.prototype.clear=function(){this.items=[],Kg(this.element)},My.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){Kg(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()},My.prototype.hideElement=function(){this.element.style.display="none"},My.prototype.showElement=function(){this.element.style.display=""},My.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},My.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},My.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},My);function My(t,e){wy.call(this),this.element=t,this._initOptions(e),this.items=[],Q(this.element,"k-widget k-attribution")}function Oy(){Cy.call(this),this._events={}}i(Ty,{name:"Attribution",separator:" | "});var By={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function Ry(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+By[t].className+'" aria-label="move '+t+'"><span class="k-icon '+By[t].iconClass+'" /></button>';return ay(t)}(Ey=xd)&&(Iy.__proto__=Ey),((Iy.prototype=Object.create(Ey&&Ey.prototype)).constructor=Iy).prototype.destroy=function(){this.dispose()},Iy.prototype.dispose=function(){gy(this._keyroot,"keydown",this._keydownHandler)},Iy.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)},Iy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Iy.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Iy.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()},Iy.prototype._keydown=function(t){switch(t.which){case Jt.UP:this._pan(0,1),t.preventDefault();break;case Jt.DOWN:this._pan(0,-1),t.preventDefault();break;case Jt.RIGHT:this._pan(1,0),t.preventDefault();break;case Jt.LEFT:this._pan(-1,0),t.preventDefault()}};var Ey,Ly=Iy;function Iy(t,e){Ey.call(this),this.element=t,this._initOptions(e);var t=Ry("up"),e=Ry("right"),o=Ry("down"),i=Ry("left"),t=(this.element.appendChild(t),this.element.appendChild(e),this.element.appendChild(o),this.element.appendChild(i),Q(this.element,"k-widget k-navigator"),fy(this.element,"click",".k-button",dy(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=dy(this._keydown,this),fy(this._keyroot,"keydown",this._keydownHandler)}function zy(t,e){return ay('<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(Ly,{name:"Navigator",panStep:1}),vy(Ly,["pan"]);(Vy=xd)&&(Dy.__proto__=Vy),((Dy.prototype=Object.create(Vy&&Vy.prototype)).constructor=Dy).prototype.destroy=function(){this.element&&gy(this.element,"click",this._clickHandler),this._keyroot&&gy(this._keyroot,"keydown",this._keydownHandler)},Dy.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)},Dy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Dy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Dy.prototype._click=function(t){var e=1;mt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Dy.prototype._keydown=function(t){switch(t.which){case Jt.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Jt.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var Vy,jy=Dy;function Dy(t,e){Vy.call(this),this.element=t,this._initOptions(e);t=zy("in","k-i-plus"),e=zy("out","k-i-minus"),this.element.appendChild(t),this.element.appendChild(e),Q(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),fy(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),fy(this._keyroot,"keydown",this._keydownHandler)}i(jy,{name:"ZoomControl",zoomStep:1}),vy(jy,["change"]);var Hy,Uy,Ju=Math,Fy=Ju.max,Ny=Ju.min,Gy=((Uy=A.Class)&&(Xy.__proto__=Uy),Vd={World:{configurable:!0}},((Xy.prototype=Object.create(Uy&&Uy.prototype)).constructor=Xy).prototype.contains=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),r=O(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},Xy.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 zg(e,o)},Xy.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},Xy.prototype.include=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),t=O(t.lat,t[0]);e.lng=Ny(e.lng,i),e.lat=Fy(e.lat,t),o.lng=Fy(o.lng,i),o.lat=Ny(o.lat,t)},Xy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Xy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new zg(t.lat,e.lng),se:this.se,sw:new zg(e.lat,t.lng)}},Xy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new zg(t.lat,e.lng),e,new zg(e.lat,t.lng)]},Xy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Xy.create=function(t,e){return t instanceof Xy?t:t&&e?new Xy(t,e):t&&4===t.length&&!e?new Xy([t[0],t[1]],[t[2],t[3]]):void 0},Vd.World.get=function(){return new Xy([90,-180],[-90,180])},Object.defineProperties(Xy,Vd),Xy),Wy=((Hy=A.Class)&&(qy.__proto__=Hy),jd={anchor:{configurable:!0}},((qy.prototype=Object.create(Hy&&Hy.prototype)).constructor=qy).prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},qy.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},jd.anchor.get=function(){return this._anchor},jd.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},qy.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(qy.prototype,jd),qy);function qy(t,e){Hy.call(this),this.widgetService=t,this.options=x({},this.options,e),this.offset={x:0,y:0}}function Xy(t,e){Uy.call(this);t=zg.create(t),e=zg.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)}i(Wy,{border:{width:1},opacity:1});(Yy=A.Class)&&(Ky.__proto__=Yy),((Ky.prototype=Object.create(Yy&&Yy.prototype)).constructor=Ky).prototype.destroy=function(){this._deactivate()},Ky.prototype._initOptions=function(t){this.options=x({},this.options,t)},Ky.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Ky.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Ky.prototype.reset=function(){this._beforeReset(),this._reset()},Ky.prototype._reset=function(){this._applyExtent()},Ky.prototype._beforeReset=function(){},Ky.prototype._resize=function(){},Ky.prototype._panEnd=function(){this._applyExtent()},Ky.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!T(t.minZoom)||e>=t.minZoom,e=!T(t.maxZoom)||e<=t.maxZoom,t=Gy.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Ky.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Ky.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)},Ky.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)},Ky.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Ky.prototype._readData=function(){return this.options.data||[]},Ky.prototype._hasData=function(){return this._data&&0<this._data.length},Ky.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Yy,Dd=Ky,Zy=Math,Qy=A.geometry.Point;function Ky(t,e){Yy.call(this),this.support=ky(),this._initOptions(e),this.map=t;e=document.createElement("div");Q(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 $y(t){return it(t)?t:ut.compile(t)}function Jy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(tv=Dd)&&(ev.__proto__=tv),((ev.prototype=Object.create(tv&&tv.prototype)).constructor=ev).prototype.destroy=function(){tv.prototype.destroy.call(this),this._view.destroy(),this._view=null},ev.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},ev.prototype._reset=function(){tv.prototype._reset.call(this),this._updateView(),this._view.reset()},ev.prototype._viewType=function(){return rv},ev.prototype._activate=function(){tv.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=Object(A.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},ev.prototype._deactivate=function(){tv.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},ev.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())},ev.prototype._resize=function(){this._render()},ev.prototype._panEnd=function(t){tv.prototype._panEnd.call(this,t),this._render()},ev.prototype._render=function(){this._updateView(),this._view.render()};var tv,zd=ev;function ev(t,e){tv.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(zd,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(iv=A.Class)&&(av.__proto__=iv),((av.prototype=Object.create(iv&&iv.prototype)).constructor=av).prototype._initOptions=function(t){this.options=x({},this.options,t)},av.prototype.center=function(t){this._center=t},av.prototype.extent=function(t){this._extent=t},av.prototype.viewOrigin=function(t){this._viewOrigin=t},av.prototype.zoom=function(t){this._zoom=t},av.prototype.pointToTileIndex=function(t){return new Qy(Zy.floor(t.x/this.options.tileSize),Zy.floor(t.y/this.options.tileSize))},av.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:Zy.ceil((Zy.abs(e.x)+t.width)/this.options.tileSize),y:Zy.ceil((Zy.abs(e.y)+t.height)/this.options.tileSize)}},av.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}},av.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Qy(e*this.options.tileSize,t*this.options.tileSize)},av.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},av.prototype.destroy=function(){Kg(this.element),this.pool.empty()},av.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},av.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()},av.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},av.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 Qy(M(e.x),M(e.y))),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},av.prototype.wrapIndex=function(t){var e=Zy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},av.prototype.wrapValue=function(t,e){var o=Zy.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var ov,iv,rv=av,nv=((ov=A.Class)&&(sv.__proto__=ov),((sv.prototype=Object.create(ov&&ov.prototype)).constructor=sv).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},sv.prototype._initOptions=function(t){this.options=x({},this.options,t)},sv.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},sv.prototype.show=function(){var t=this.element,e=(t.style.top=Jy(this.options.offset.y),t.style.left=Jy(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},sv.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},sv.prototype.url=function(){return $y(this.options.urlTemplate)(this.urlOptions())},sv.prototype.errorUrl=function(){return $y(this.options.errorUrlTemplate)(this.urlOptions())},sv.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}},sv);function sv(t,e){ov.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function av(t,e){iv.call(this),this.element=t,this._initOptions(e),this.pool=new pv}i(nv,{urlTemplate:"",errorUrlTemplate:""});(hv=A.Class)&&(lv.__proto__=hv),((lv.prototype=Object.create(hv&&hv.prototype)).constructor=lv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},lv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},lv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},lv.prototype._create=function(t){for(var e,o=this._items,i=It(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 nv(i,t),this._items.push(e)),e},lv.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 hv,pv=lv;function lv(){hv.call(this),this._items=[]}i(pv,{maxSize:100});function cv(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var uv,dv,fv,gv,yv,vv,mv,xv=Object.assign,_v="change",bv=((mv=xd)&&(Lv.__proto__=mv),((Lv.prototype=Object.create(mv&&mv.prototype)).constructor=Lv).prototype.captureNext=function(){this.capture=!0},Lv.prototype.cancelCapture=function(){this.capture=!1},Lv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Lv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Lv),wv=((vv=xd)&&(Ev.__proto__=vv),((Ev.prototype=Object.create(vv&&vv.prototype)).constructor=Ev).prototype.makeVirtual=function(){xv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Ev.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Ev.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Ev.prototype.forceEnabled=function(){this.forcedEnabled=!0},Ev.prototype.getSize=function(){return this.container[this.measure]},Ev.prototype.getTotal=function(){return this.element[this.scrollSize]},Ev.prototype.rescale=function(t){this.scale=t},Ev.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(_v,this)},Ev),Cv=((yv=xd)&&(Rv.__proto__=yv),((Rv.prototype=Object.create(yv&&yv.prototype)).constructor=Rv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},Rv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},Rv.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(_v)},Rv),Sv=((gv=xd)&&(Bv.__proto__=gv),((Bv.prototype=Object.create(gv&&gv.prototype)).constructor=Bv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Bv.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(_v,this))},Bv),kv=((fv=A.Class)&&(Ov.__proto__=fv),(Ov.prototype=Object.create(fv&&fv.prototype)).constructor=Ov),Av=((dv=xd)&&(Mv.__proto__=dv),((Mv.prototype=Object.create(dv&&dv.prototype)).constructor=Mv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},Mv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},Mv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},Mv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},Mv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},Mv.prototype.moveTo=function(t){xv(this,t),this.refresh()},Mv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=cv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(_v))},Mv.prototype._saveCoordinates=function(t){this.coordinates=t},Mv),Pv=A.drawing.Group,Lr=((uv=Dd)&&(Tv.__proto__=uv),((Tv.prototype=Object.create(uv&&uv.prototype)).constructor=Tv).prototype.destroy=function(){uv.prototype.destroy.call(this),this.surface.destroy()},Tv.prototype._reset=function(){uv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},Tv.prototype._initRoot=function(){this._root=new Pv,this.surface.draw(this._root)},Tv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},Tv.prototype._resize=function(){this.surface.size(this.map.size())},Tv.prototype._readData=function(){var t=uv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},Tv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Vv(this.map,this.options.style,this));for(var e=new Pv,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},Tv.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof A.drawing.Circle&&this.map.options.renderPointsAsMarkers?T(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},Tv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},Tv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},Tv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},Tv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},Tv.prototype._panEnd=function(t){uv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},Tv.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}))},Tv.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},Tv.prototype._handler=function(e){var o=this;return function(t){t.element&&o.map.trigger(e,o._eventArgs(t))}},Tv.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},Tv.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},Tv.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},Tv.prototype._activate=function(){uv.prototype._activate.call(this),this._panHandler=dy(this._pan,this),this.map.bind("pan",this.panHandler)},Tv.prototype._deactivate=function(){uv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},Tv);function Tv(t,e){uv.call(this,t,e),this._pan=dy(this._pan,this),this.surface=A.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new Av(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}function Mv(t){dv.call(this),this.support=ky(),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=cv(this.x,this.y,this.scale);this.element.style[this.transformStyle]=t,this._saveCoordinates(t)}function Ov(t){fv.call(this);var s,a,h,p=this;xv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new Sv({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new Sv({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=Bt(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 Bv(t){gv.call(this),xv(this,t)}function Rv(t){yv.call(this),this.x=new wv(xv({horizontal:!0},t)),this.y=new wv(xv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(_v,t)}function Ev(t){vv.call(this),this.forcedEnabled=!1,xv(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 Lv(t,e){mv.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,Sy(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,dy(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,dy(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,dy(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,dy(o._release,o))})),o.bind(["press","release"],e||{})}i(Lr,{autoBind:!0,zIndex:100});(zv=A.Class)&&(Dv.__proto__=zv),((Dv.prototype=Object.create(zv&&zv.prototype)).constructor=Dv).prototype.parse=function(t){var e=new Pv,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},Dv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Dv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Dv.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)}},Dv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(zt(e).anchor()))&&(t.options.fill=null)},Dv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Dv.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},Dv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?A.drawing.MultiPath:A.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(zg.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Dv.prototype._loadPoint=function(t,e,o){var e=zg.fromLngLat(e),i=this.locator.locationToView(e),i=new A.geometry.Circle(i,10),i=new A.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var Iv,zv,Vv=Dv,Nd=((Iv=Lr)&&(jv.__proto__=Iv),((jv.prototype=Object.create(Iv&&Iv.prototype)).constructor=jv).prototype._readData=function(){return this.options.data||[]},jv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=yt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=yt(this.options.locationField),s=0;s<i.length;s++){var a,h,p,l=i[s],c=n(l),u=o(l);T(c)&&T(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=zg.create(c),p=this.map.locationToView(c),h=a.map(u),(p=this._createSymbol({center:p,size:h,style:e.style,dataItem:l,location:c})).dataItem=l,p.location=c,p.value=u,this._drawSymbol(p))}}},jv.prototype._scaleType=function(){var t=this.options.scale;return it(t)?t:Fv[t]},jv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=it(e)?e:Nv[e])(t)},jv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},jv.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},jv.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},jv);function jv(){Iv.apply(this,arguments)}function Dv(t,e,o){zv.call(this),this.observer=o,this.locator=t,this.style=e}i(Nd,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Hv,Uv,Fv={sqrt:((Uv=A.Class)&&(Yv.__proto__=Uv),((Yv.prototype=Object.create(Uv&&Uv.prototype)).constructor=Yv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Yv)},Nv={circle:function(t){var e=new A.geometry.Circle(t.center,t.size/2);return new A.drawing.Circle(e,t.style)},square:function(t){var e=new A.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}},Gv=Object.assign,Wv=".k-marker",qv=((Hv=Dd)&&(Xv.__proto__=Hv),((Xv.prototype=Object.create(Hv&&Hv.prototype)).constructor=Xv).prototype.destroy=function(){Hv.prototype.destroy.call(this),gy(this.element,"click",this._markerClickHandler),this.clear()},Xv.prototype.add=function(t){if(!Z(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Xv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Xv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Xv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Xv.prototype._reset=function(){Hv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Xv.prototype.bind=function(t,e){t=Qv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Xv.prototype._addOne=function(t){t=Qv.create(t,this.options);return t.addTo(this),t},Xv.prototype._readData=function(){return this.options.data||[]},Xv.prototype._load=function(t){this._data=t,this.clear();for(var e=yt(this.options.locationField),o=yt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Xv.prototype._markerClick=function(t){var e=t.target._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},Xv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Xv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Xv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Gv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Xv);function Xv(t,e){Hv.call(this,t,e),this._markerClickHandler=dy(this._markerClick,this),fy(this.element,"click",Wv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Yv(t,e){Uv.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(qv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});(Zv=A.Class)&&($v.__proto__=Zv),(($v.prototype=Object.create(Zv&&Zv.prototype)).constructor=$v).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},$v.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},$v.prototype.location=function(t){return t?(this.options.location=zg.create(t).toArray(),this.layer&&this.layer.update(this),this):zg.create(this.options.location)},$v.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=ty(this._anchor.left),this.element.style.top=ty(this._anchor.top)},$v.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},$v.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=dy(this._mouseEnter,this),fy(this.element,"mouseenter",Wv,this._mouseEnterHandler),this._mouseLeaveHandler=dy(this._mouseLeave,this),fy(this.element,"mouseleave",Wv,this._mouseLeaveHandler))},$v.prototype.unbindEvents=function(){this.element&&(gy(this.element,"mouseenter",this._mouseEnterHandler),gy(this.element,"mouseleave",this._mouseLeaveHandler))},$v.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,Q(o=document.createElement("span"),"k-marker k-icon k-i-marker-"+Jg(t.shape||"pin")),t.title&&o.setAttribute("title",t.title),i=t.attributes||{},Object.keys(i).forEach(function(t){o.setAttribute(t,i[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents())},$v.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},$v.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},$v.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},$v.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},$v.create=function(t,e){return t instanceof $v?t:new $v(x({},e,t))};var Zv,Qv=$v,Kv=Object.assign;function $v(t){Zv.call(this),this.options=t||{}}function Jv(t){window.requestAnimationFrame(t)}function tm(t){t.preventDefault()}(om=A.Class)&&(ym.__proto__=om),((ym.prototype=Object.create(om&&om.prototype)).constructor=ym).prototype.tick=function(){},ym.prototype.done=function(){},ym.prototype.onEnd=function(){},ym.prototype.onCancel=function(){},ym.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Jv(this._tickProxy)))},ym.prototype.enabled=function(){return!0},ym.prototype.cancel=function(){this._started=!1,this.onCancel()},ym.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Jv(this._tickProxy))};var em,om,f=ym,im=((em=f)&&(gm.__proto__=em),((gm.prototype=Object.create(em&&em.prototype)).constructor=gm).prototype.done=function(){return this.timePassed()>=this.duration},gm.prototype.timePassed=function(){return Math.min(this.duration,my()-this.startDate)},gm.prototype.moveTo=function(t){var e=this.movable;this.initial=e[this.axis],this.delta=t.location-this.initial,this.duration="number"==typeof t.duration?t.duration:300,this.tick=this._easeProxy(t.ease),this.startDate=my(),this.start()},gm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},gm.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},gm),rm=Object.assign,nm=800,sm=0,am="move",hm="tap",pm="doubleTap",lm="release",cm="gesturechange",um="gestureend",dm="gesturetap",fm={api:0,touch:0,mouse:9,pointer:9};function gm(t){em.call(this),Kv(this,t)}function ym(){om.call(this),this._tickProxy=dy(this._tick,this),this._started=!1}function vm(t){var e,o,i,r=ky(),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}(xm=A.Class)&&(Cm.__proto__=xm),((Cm.prototype=Object.create(xm&&xm.prototype)).constructor=Cm).prototype.move=function(t){var e=t["page"+this.axis],o=my(),i=o-this.timeStamp||1;!e&&this.invalidZeroEvents||(this.delta=e-this.location,this._updateLocationData(t),this.initialDelta=e-this.startLocation,this.velocity=this.delta/i,this.timeStamp=o)},Cm.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var mm,xm,_m=Cm,bm=((mm=A.Class)&&(wm.__proto__=mm),((wm.prototype=Object.create(mm&&mm.prototype)).constructor=wm).prototype.press=function(){this._holdTimeout=setTimeout(dy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},wm.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(hm,t):e._trigger(pm,t),e.userEvents._clicks=0},300))},wm.prototype._hold=function(){this._trigger("hold",this.pressEvent)},wm.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(Bm.current&&Bm.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger(am,t)}},wm.prototype.end=function(t){this.endTime=my(),this._finished||(this._finished=!0,this._trigger(lm,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(hm,t)),clearTimeout(this._holdTimeout),this.dispose())},wm.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)},wm.prototype.skip=function(){this.dispose()},wm.prototype.cancel=function(){this.dispose()},wm.prototype.isMoved=function(){return this._moved},wm.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=my(),this._moved=!0,this._trigger("start",t)},wm.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()},wm.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},wm);function wm(t,e,o){mm.call(this),rm(this,{x:new _m("X",o.location),y:new _m("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||fm[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 Cm(t,e){xm.call(this),this.support=ky(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=my()}function Sm(t){for(var e=Sy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(Om=xd)&&(Wm.__proto__=Om),((Wm.prototype=Object.create(Om&&Om.prototype)).constructor=Wm).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Wm.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,Sm(function(t){e.removeEventListener(t,o.preventIfMoving)})),gy(o.surface,yy("move"),this._surfaceMoveHandler),gy(o.surface,yy("up cancel"),this._surfaceEndHandler),gy(i,yy("down"),this._elementStartHandler),o.useClickAsTap&&gy(i,yy("click"),this._elementClickHandler),t.preventDragEvent&&gy(i,yy("dragstart"),this._elementDragStartHandler),gy(i,yy("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Wm.prototype.capture=function(){Wm.current=this},Wm.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Wm.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case am:a=cm;break;case"end":a=um;break;case hm:a=dm}rm(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,rm(e,{type:a}))},Wm.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Wm.prototype.move=function(t,e){this._apiCall("_move",t,e)},Wm.prototype.end=function(t,e){this._apiCall("_end",t,e)},Wm.prototype._isMultiTouch=function(){return 1<this.touches.length},Wm.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Wm.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Wm.prototype._isMoved=function(){return vt(this.touches,function(t){return t.isMoved()}).length},Wm.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Wm.prototype._start=function(t){var e,o,i=0,r=this.filter,n=vm(t),s=n.length,a=t.which;if(!(a&&1<a||this._maxTouchesReached()))for(Wm.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 bm(this,e,o),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))},Wm.prototype._move=function(t){this._eachTouch("move",t)},Wm.prototype._end=function(t){this._eachTouch("end",t)},Wm.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:my(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Wm.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=vm(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)},Wm.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:xy,preventDefault:xy})},Wm.defaultThreshold=function(t){sm=t},Wm.minHold=function(t){nm=t};var km,Am,Pm,Tm,Mm,Om,Bm=Wm,Rm=Object.assign,Em=Math.abs,Lm="change",Im=((Mm=f)&&(Gm.__proto__=Mm),((Gm.prototype=Object.create(Mm&&Mm.prototype)).constructor=Gm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Gm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Gm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Gm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Gm),zm=((Tm=f)&&(Nm.__proto__=Tm),((Nm.prototype=Object.create(Tm&&Tm.prototype)).constructor=Nm).prototype.onCancel=function(){this.transition.cancel()},Nm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Nm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Nm.prototype.done=function(){return Em(this.velocity)<1},Nm.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),Tm.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(),Tm.prototype.start.call(this)))},Nm.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)},Nm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Nm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Nm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:im.easeOutExpo})},Nm),Vm=((Pm=f)&&(Fm.__proto__=Pm),((Fm.prototype=Object.create(Pm&&Pm.prototype)).constructor=Fm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Fm.prototype.done=function(){return Em(this.offset.y)<5&&Em(this.offset.x)<5},Fm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Fm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Fm.prototype.setCallback=function(t){t&&it(t)&&(this.callback=t)},Fm.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}},Fm),jm=((Am=A.Class)&&(Um.__proto__=Am),((Um.prototype=Object.create(Am&&Am.prototype)).constructor=Um).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)},Um.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Um.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Um),Dm=((km=xd)&&(Hm.__proto__=km),((Hm.prototype=Object.create(km&&km.prototype)).constructor=Hm).prototype._initOptions=function(t){this.options=x({},this.options,t)},Hm.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())},Hm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Hm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Hm.prototype.height=function(){return this.dimensions.y.size},Hm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Hm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Hm.prototype._resize=function(){this._native||this.contentResized()},Hm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Hm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Hm.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)},Hm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Hm.prototype.enable=function(){this.enabled=!0},Hm.prototype.disable=function(){this.enabled=!1},Hm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Em(t)),this.scrollElement.scrollTop(Em(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Hm.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())},Hm.prototype.pullHandled=function(){},Hm.prototype.destroy=function(){var t=this.element;gy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Hm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Hm.prototype._initPullToRefresh=function(){},Hm.prototype._dragEnd=function(){},Hm.prototype._paneChange=function(){},Hm.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new jm({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Lm,function(){s.refresh()}),n.bind(Lm,function(){s.show()}),e[t+"inertia"]=new zm({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})}})},Hm);function Hm(t,e){km.call(this);var n=this,e=(this.element=t,this._initOptions(e),function(t){t=hy(t);return t.ios||t.android}(navigator.userAgent)),e=(n._native=n.options.useNative&&e,ay('<div class="km-scroll-header"/>'));if(n._native)Q(t,"km-native-scroller"),$g(e,t),Rm(n,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",Q(t,"km-scroll-wrapper");var o=ay('<div class="km-scroll-container"/>'),i=t,r=o;for(i.appendChild(r);i.firstChild!==r;)r.appendChild(i.firstChild);$g(e,t);var o=t.children[1],e=new bv(t),s=new Av(o),a=new Cv({element:o,container:t,forcedEnabled:n.options.zoom}),h=this.options.avoidScrolling,p=new Bm(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=Em(t.x.velocity),i=Em(t.y.velocity),r=i<=2*e,e=e<=2*i;i=n.fixedContainer,o=t.event.target,i!==o&&!function(t){if(o)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 kv({movable:s,dimensions:a,userEvents:p,elastic:n.options.elastic}),c=new Im({movable:s,dimensions:a,userEvents:p,tapCapture:e}),u=new Vm({moveTo:function(t){n.scrollTo(t.x,t.y)}});s.bind(Lm,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),fy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),Rm(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 Um(t){Am.call(this);var e="x"===t.axis,o=ay('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');Rm(this,t,{element:o,elementSize:0,movable:new Av(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Lm,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Fm(t){Pm.call(this,t),Rm(this,t,{origin:{},destination:{},offset:{}})}function Nm(t){Tm.call(this);var e=this;Rm(e,t,{transition:new im({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",dy(e.start,e)),e.userEvents.bind("gestureend",dy(e.start,e)),e.userEvents.bind("tap",dy(e.onEnd,e))}function Gm(t){Mm.call(this,t),Rm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Wm(t,e){Om.call(this);var o,i,r,n=ky(),s=(this.support=n,this.options=e=e||{},o=this.filter=e.filter,this.threshold=e.threshold||sm,this.minHold=e.minHold||nm,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);rm(this,{element:t,surface:e.global&&s?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=dy(this._move,this),fy(this.surface,yy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=dy(this._end,this),fy(this.surface,yy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=dy(this._start,this),fy(t,yy("down"),o,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=dy(this._click,this),fy(t,yy("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=tm,fy(t,yy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=dy(this._select,this),fy(t,yy("mousedown"),o,this._elementSelectHandler),this.captureUpIfMoved&&n.eventCapture&&(i=this.surface,r=dy(this.preventIfMoving,this),Sm(function(t){i.addEventListener(t,r,!0)})),this.bind(["press","hold",hm,pm,"start",am,"end",lm,"cancel","gesturestart",cm,um,dm,"select"],e)}i(Dm,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),vy(Dm,["pull","scroll","resize"]);function qm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}qm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Xm=qm,Ym=Math,Zm=Ym.min,Qm=Ym.pow,Km=A.geometry.Point,$m={bubble:Nd,shape:Lr,tile:zd};function Jm(t){var e=[];if(t)for(var o=Jg(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}$m.marker=qv;(tx=xd)&&(I.__proto__=tx),((I.prototype=Object.create(tx&&tx.prototype)).constructor=I).prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),Z(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();gy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler),tx.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=ky(),this.context=i,this.initObserver(i),this.initServices(i),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new ny,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),fy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)},I.prototype._initOptions=function(t){this.options=x({},this.options,t)},I.prototype._initElement=function(t){Q(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Kg(t);t=ay("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){this.widgetService=new Xm(this,t=void 0===t?{}: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||tx.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=T(t)?(t=Ym.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},I.prototype.center=function(t){var e=t?(t=zg.create(t),e=zg.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify("centerChange",{center:this.options.center}),this._reset()),this):zg.create(this.options.center);return e},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(),Kg(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=zg.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},I.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=Km.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},I.prototype.locationToView=function(t){var t=zg.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=Km.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,o=Bt(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=O(t.pageX,t.clientX)-o.left,O(t.pageY,t.clientY)-o.top),new A.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:Zm(e,o),height:Zm(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},I.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=zg.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.widgetService.notify("centerChange",{center:this.options.center}),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=Gy.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Gy(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=Ym.abs(h.x-a.x),h=Ym.abs(h.y-a.y);if(p<=r&&h<=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 Gy(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="."+Jm(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(Q(o=document.createElement("div"),"k-map-controls "+Jm(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 Ty(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Ly(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",dy(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 jy(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 Dm(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",dy(this._scroll,this)),t.bind("scrollEnd",dy(this._scrollEnd,this)),t.userEvents.bind("gesturestart",dy(this._scaleStart,this)),t.userEvents.bind("gestureend",dy(this._scale,this)),t.userEvents.bind("doubleTap",dy(this._doubleTap,this)),t.userEvents.bind("tap",dy(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({},"marker"===e?this.options.markerDefaults:o,t),t=new $m[e](this,o);return"marker"===e&&(this.markers=t),t},I.prototype._createTooltip=function(){return new Wy(this.widgetService,this.options.tooltip)},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&"marker"===t.type}).length||(this.markers=new qv(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 A.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._tooltip.offset=o,this.hideTooltip(),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=my(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},I.prototype._panComplete=function(){return 50<my()-(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 A.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=Ym.log(t)/Ym.log(2);return Ym.round(t)},I.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),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=Qm(2,this.options.minZoom-n),t.dimensions.maxScale=Qm(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=O(t,this.options.zoom);return this.options.minSize*Qm(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),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<At(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}))},I.prototype._toDocumentCoordinates=function(t){var e=Bt(this.element);return{left:M(t.x+e.left),top:M(t.y+e.top)}};var tx,h=I;function I(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),tx.call(this),this._init(t,e,o,i)}i(h,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),vy(h,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);function ex(){return{icon:{border:{width:1}},label:{font:nx,padding:3},line:{length:10,width:2},visible:!0}}function ox(t){return{axisDefaults:{labels:{font:nx},notes:ex(),title:{font:sx,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:ex(),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:sx},subtitle:{font:nx},legend:{labels:{font:nx}}}}var ix,rx=h,d="Arial, Helvetica, sans-serif",nx="12px "+d,sx="16px "+d,ax=(e.d(t,"autoMajorUnit",function(){return te}),e.d(t,"Point",function(){return B}),e.d(t,"Box",function(){return R}),e.d(t,"Ring",function(){return le}),e.d(t,"Sector",function(){return ce}),e.d(t,"ShapeBuilder",function(){return ye}),e.d(t,"ShapeElement",function(){return Ce}),e.d(t,"ChartElement",function(){return r}),e.d(t,"BoxElement",function(){return be}),e.d(t,"RootElement",function(){return Te}),e.d(t,"FloatElement",function(){return Be}),e.d(t,"Text",function(){return Le}),e.d(t,"TextBox",function(){return De}),e.d(t,"Title",function(){return Ge}),e.d(t,"AxisLabel",function(){return Xe}),e.d(t,"Axis",function(){return lo}),e.d(t,"Note",function(){return $e}),e.d(t,"CategoryAxis",function(){return qo}),e.d(t,"DateCategoryAxis",function(){return ti}),e.d(t,"DateValueAxis",function(){return ui}),e.d(t,"NumericAxis",function(){return pi}),e.d(t,"LogarithmicAxis",function(){return vi}),e.d(t,"PolarAxis",function(){return wi}),e.d(t,"RadarCategoryAxis",function(){return _i}),e.d(t,"RadarNumericAxis",function(){return Pi}),e.d(t,"RadarLogarithmicAxis",function(){return Mi}),e.d(t,"CurveProcessor",function(){return Ei}),e.d(t,"Gradients",function(){return Se}),e.d(t,"rectToBox",function(){return Ie}),e.d(t,"Aggregates",function(){return Wi}),e.d(t,"AreaChart",function(){return nn}),e.d(t,"AreaSegment",function(){return Zr}),e.d(t,"AxisGroupRangeTracker",function(){return sn}),e.d(t,"Bar",function(){return gn}),e.d(t,"BarChart",function(){return Pn}),e.d(t,"BarLabel",function(){return cn}),e.d(t,"BoxPlotChart",function(){return Un}),e.d(t,"BoxPlot",function(){return Dn}),e.d(t,"BubbleChart",function(){return os}),e.d(t,"Bullet",function(){return hs}),e.d(t,"BulletChart",function(){return cs}),e.d(t,"CandlestickChart",function(){return Ln}),e.d(t,"Candlestick",function(){return Mn}),e.d(t,"CategoricalChart",function(){return kr}),e.d(t,"CategoricalErrorBar",function(){return xr}),e.d(t,"CategoricalPlotArea",function(){return za}),e.d(t,"Chart",function(){return kl}),e.d(t,"ChartContainer",function(){return ws}),e.d(t,"ClipAnimation",function(){return Fr}),e.d(t,"ClusterLayout",function(){return bn}),e.d(t,"Crosshair",function(){return xs}),e.d(t,"CrosshairTooltip",function(){return ys}),e.d(t,"DefaultAggregates",function(){return Qs}),e.d(t,"DonutChart",function(){return np}),e.d(t,"DonutPlotArea",function(){return sp}),e.d(t,"DonutSegment",function(){return tp}),e.d(t,"ErrorBarBase",function(){return mr}),e.d(t,"ErrorRangeCalculator",function(){return tr}),e.d(t,"Highlight",function(){return Da}),e.d(t,"SharedTooltip",function(){return wh}),e.d(t,"Legend",function(){return hh}),e.d(t,"LegendItem",function(){return eh}),e.d(t,"LegendLayout",function(){return th}),e.d(t,"LineChart",function(){return Yr}),e.d(t,"LinePoint",function(){return Mr}),e.d(t,"LineSegment",function(){return Br}),e.d(t,"Pane",function(){return ks}),e.d(t,"PieAnimation",function(){return Bh}),e.d(t,"PieChart",function(){return Zh}),e.d(t,"PieChartMixin",function(){return Gh}),e.d(t,"PiePlotArea",function(){return Qh}),e.d(t,"PieSegment",function(){return Nh}),e.d(t,"PlotAreaBase",function(){return Fs}),e.d(t,"PlotAreaEventsMixin",function(){return Ns}),e.d(t,"PlotAreaFactory",function(){return lh}),e.d(t,"PointEventsMixin",function(){return Ar}),e.d(t,"RangeBar",function(){return Js}),e.d(t,"RangeBarChart",function(){return ia}),e.d(t,"RangeAreaPoint",function(){return la}),e.d(t,"RangeAreaChart",function(){return wa}),e.d(t,"ScatterChart",function(){return Qn}),e.d(t,"ScatterErrorBar",function(){return Fn}),e.d(t,"ScatterLineChart",function(){return Lh}),e.d(t,"Selection",function(){return vh}),e.d(t,"SeriesAggregator",function(){return qs}),e.d(t,"SeriesBinder",function(){return Ki}),e.d(t,"SplineSegment",function(){return Dr}),e.d(t,"SplineAreaSegment",function(){return rn}),e.d(t,"StackWrap",function(){return Sn}),e.d(t,"Tooltip",function(){return mh}),e.d(t,"OHLCChart",function(){return Sa}),e.d(t,"OHLCPoint",function(){return Ca}),e.d(t,"WaterfallChart",function(){return Ba}),e.d(t,"WaterfallSegment",function(){return Oa}),e.d(t,"XYPlotArea",function(){return jh}),e.d(t,"MousewheelZoom",function(){return Ja}),e.d(t,"ZoomSelection",function(){return $a}),e.d(t,"Pannable",function(){return qa}),e.d(t,"ChartAxis",function(){return Li}),e.d(t,"ChartPane",function(){return Hi}),e.d(t,"ChartPlotArea",function(){return Ui}),e.d(t,"findAxisByName",function(){return Vi}),e.d(t,"anyHasZIndex",function(){return Nr}),e.d(t,"appendIfNotNull",function(){return As}),e.d(t,"areNumbers",function(){return On}),e.d(t,"bindSegments",function(){return Ts}),e.d(t,"categoriesCount",function(){return wr}),e.d(t,"countNumbers",function(){return Ni}),e.d(t,"equalsIgnoreCase",function(){return Ms}),e.d(t,"evalOptions",function(){return br}),e.d(t,"filterSeriesByType",function(){return Os}),e.d(t,"getDateField",function(){return Bs}),e.d(t,"getField",function(){return qi}),e.d(t,"hasGradientOverlay",function(){return un}),e.d(t,"hasValue",function(){return qn}),e.d(t,"isDateAxis",function(){return Rs}),e.d(t,"segmentVisible",function(){return Ps}),e.d(t,"singleItemOrArray",function(){return Es}),e.d(t,"createOutOfRangePoints",function(){return Vs}),e.d(t,"ChartService",function(){return no}),e.d(t,"DomEventsBuilder",function(){return so}),e.d(t,"FormatService",function(){return oo}),e.d(t,"IntlService",function(){return to}),e.d(t,"TemplateService",function(){return ut}),e.d(t,"Sparkline",function(){return Il}),e.d(t,"Navigator",function(){return Xl}),e.d(t,"NavigatorHint",function(){return Ul}),e.d(t,"StockChart",function(){return Ql}),e.d(t,"constants",function(){return V}),e.d(t,"Gauge",function(){return pc}),e.d(t,"LinearGauge",function(){return Uc}),e.d(t,"LinearPointer",function(){return wc}),e.d(t,"ArrowLinearPointer",function(){return Mc}),e.d(t,"BarLinearPointer",function(){return Vc}),e.d(t,"LinearScale",function(){return vc}),e.d(t,"RadialGauge",function(){return pu}),e.d(t,"RadialPointer",function(){return nu}),e.d(t,"RadialScale",function(){return Qc}),e.d(t,"ArcGauge",function(){return bu}),e.d(t,"RangePointer",function(){return _u}),e.d(t,"ArcScale",function(){return uu}),e.d(t,"CircularGauge",function(){return wu}),e.d(t,"Barcode",function(){return of}),e.d(t,"barcodeValidator",function(){return ef}),e.d(t,"QRCode",function(){return Sg}),e.d(t,"qrcodeValidator",function(){return Cg}),e.d(t,"Map",function(){return rx}),e.d(t,"Location",function(){return zg}),e.d(t,"Extent",function(){return Gy}),e.d(t,"addClass",function(){return Q}),e.d(t,"removeClass",function(){return $}),e.d(t,"alignPathToPixel",function(){return J}),e.d(t,"clockwise",function(){return tt}),e.d(t,"convertableToNumber",function(){return ot}),e.d(t,"deepExtend",function(){return x}),e.d(t,"elementStyles",function(){return pt}),e.d(t,"getSpacing",function(){return P}),e.d(t,"getTemplate",function(){return dt}),e.d(t,"getter",function(){return yt}),e.d(t,"grep",function(){return vt}),e.d(t,"hasClasses",function(){return mt}),e.d(t,"HashMap",function(){return _t}),e.d(t,"inArray",function(){return u}),e.d(t,"interpolateValue",function(){return bt}),e.d(t,"InstanceObserver",function(){return Ct}),e.d(t,"isArray",function(){return Z}),e.d(t,"isFunction",function(){return it}),e.d(t,"isNumber",function(){return m}),e.d(t,"isObject",function(){return st}),e.d(t,"isString",function(){return et}),e.d(t,"map",function(){return St}),e.d(t,"mousewheelDelta",function(){return At}),e.d(t,"FontLoader",function(){return Ht}),e.d(t,"setDefaultOptions",function(){return i}),e.d(t,"sparseArrayLimits",function(){return Ut}),e.d(t,"styleValue",function(){return at}),e.d(t,"find",function(){return Ft}),e.d(t,"elementScale",function(){return qt}),e.d(t,"autoTextColor",function(){return Xt}),e.d(t,"createHashSet",function(){return Kt}),e.d(t,"defaultErrorHandler",function(){return $t}),e.d(t,"keys",function(){return Jt}),e.d(t,"append",function(){return Tt}),e.d(t,"bindEvents",function(){return Mt}),e.d(t,"Class",function(){return A.Class}),e.d(t,"defined",function(){return T}),e.d(t,"deg",function(){return Ot}),e.d(t,"elementOffset",function(){return Bt}),e.d(t,"elementSize",function(){return Rt}),e.d(t,"eventCoordinates",function(){return Et}),e.d(t,"eventElement",function(){return Lt}),e.d(t,"hashKey",function(){return It}),e.d(t,"last",function(){return zt}),e.d(t,"limitValue",function(){return _}),e.d(t,"logToConsole",function(){return A.logToConsole}),e.d(t,"objectKey",function(){return Vt}),e.d(t,"rad",function(){return jt}),e.d(t,"round",function(){return M}),e.d(t,"unbindEvents",function(){return Dt}),e.d(t,"valueOrDefault",function(){return O}),e.d(t,"chartBaseTheme",function(){return ox}),t);for(ix in ax)hx(ix,ax[ix])}],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)}}});
|