text: /** 
   * Kendo UI v2018.2.620 (http://www.telerik.com/kendo-ui)                                                                                                                                               
   * Copyright 2018 Telerik EAD. All rights reserved.                                                                                                                                                     
   *                                                                                                                                                                                                      
   * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
   * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
   * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
                                                                                                                                                                                                         
  
  */
  !function(t,define){define("util/text-metrics.min",["kendo.core.min"],t)}(function(){!function(t){function i(t){return(t+"").replace(a,l)}function n(t){var i,n=[];for(i in t)n.push(i+t[i]);return n.sort().join("")}function e(t){var i,n=2166136261;for(i=0;i<t.length;++i)n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24),n^=t.charCodeAt(i);return n>>>0}function o(){return{width:0,height:0,baseline:0}}function r(t,i,n){return c.current.measure(t,i,n)}var s,a,l,h,u,c;window.kendo.util=window.kendo.util||{},s=kendo.Class.extend({init:function(t){this._size=t,this._length=0,this._map={}},put:function(t,i){var n=this._map,e={key:t,value:i};n[t]=e,this._head?(this._tail.newer=e,e.older=this._tail,this._tail=e):this._head=this._tail=e,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(t){var i=this._map[t];if(i)return i===this._head&&i!==this._tail&&(this._head=i.newer,this._head.older=null),i!==this._tail&&(i.older&&(i.older.newer=i.newer,i.newer.older=i.older),i.older=this._tail,i.newer=null,this._tail.newer=i,this._tail=i),i.value}}),a=/\r?\n|\r|\t/g,l=" ",h={baselineMarkerSize:1},"undefined"!=typeof document&&(u=document.createElement("div"),u.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;"),c=kendo.Class.extend({init:function(i){this._cache=new s(1e3),this.options=t.extend({},h,i)},measure:function(t,r,s){var a,l,h,c,f,p,d,m,g;if(void 0===s&&(s={}),!t)return o();if(a=n(r),l=e(t+a),h=this._cache.get(l))return h;c=o(),f=s.box||u,p=this._baselineMarker().cloneNode(!1);for(d in r)m=r[d],void 0!==m&&(f.style[d]=m);return g=s.normalizeText!==!1?i(t):t+"",f.textContent=g,f.appendChild(p),document.body.appendChild(f),g.length&&(c.width=f.offsetWidth-this.options.baselineMarkerSize,c.height=f.offsetHeight,c.baseline=p.offsetTop+this.options.baselineMarkerSize),c.width>0&&c.height>0&&this._cache.put(l,c),f.parentNode.removeChild(f),c},_baselineMarker:function(){var t=document.createElement("div");return t.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",t}}),c.current=new c,kendo.deepExtend(kendo.util,{LRUCache:s,TextMetrics:c,measureText:r,objectKey:n,hashKey:e,normalizeText:i})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,i,n){(n||i)()}),function(t,define){define("dataviz/core/kendo-core.min",["kendo.core.min","kendo.drawing.min"],t)}(function(){!function(t){function i(t){return Array.isArray(t)}function n(t,n){var e,o,r=i(n)?n:[n];for(e=0;e<r.length;e++)o=r[e],t.className.indexOf(o)===-1&&(t.className+=" "+o)}function e(t,i){t&&t.className&&(t.className=t.className.replace(i,"").replace(ui," "))}function o(t){var i,n=.5;for(t.options.stroke&&kendo.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2===0&&(n=0),i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(n,n);return t}function r(t,i){return-t.x*i.y+t.y*i.x<0}function s(t){return"number"==typeof t&&!isNaN(t)}function a(t){return typeof t===oi}function l(t){return s(t)||a(t)&&isFinite(t)}function h(t){return"object"==typeof t}function u(t){return s(t)?t+"px":t}function c(t){return ci.test(t)}function f(t,n){var e,o,r,s,l,f=a(n)?[n]:n;if(i(f)){for(e={},o=window.getComputedStyle(t),r=0;r<f.length;r++)s=f[r],e[s]=c(s)?parseFloat(o[s]):o[s];return e}if(h(n))for(l in n)t.style[l]=u(n[l])}function p(t,i){void 0===i&&(i=0);var n={top:0,right:0,bottom:0,left:0};return"number"==typeof t?n[At]=n[_t]=n[It]=n[Pt]=t:(n[At]=t[At]||i,n[_t]=t[_t]||i,n[It]=t[It]||i,n[Pt]=t[Pt]||i),n}function d(t){void 0===t&&(t={});var i;return t.template?t.template=i=wi.compile(t.template):jt(t.content)&&(i=t.content),i}function m(t,i){var n,e=t.length,o=[];for(n=0;n<e;n++)i(t[n])&&o.push(t[n]);return o}function g(t,i){var n,e;if(t.className)for(n=i.split(" "),e=0;e<n.length;e++)if(t.className.indexOf(n[e])!==-1)return!0}function x(t,i){if(i)return i.indexOf(t)!==-1}function v(t,i,n){return kendo.drawing.util.round(t+(i-t)*n,Dt)}function b(t,i){var n,e,o=t.length,r=[];for(n=0;n<o;n++)e=i(t[n]),kendo.drawing.util.defined(e)&&r.push(e);return r}function y(t){var i=0;return t.wheelDelta&&(i=-t.wheelDelta/120,i=i>0?Math.ceil(i):Math.floor(i)),t.detail&&(i=kendo.drawing.util.round(t.detail/3)),i}function w(t,i){var n=t.prototype;n.options=n.options?Rt({},n.options,i):i}function M(t){var i,n,e,o=Gt,r=Et;for(i=0,n=t.length;i<n;i++)e=t[i],null!==e&&isFinite(e)&&(o=Math.min(o,e),r=Math.max(r,e));return{min:o===Gt?void 0:o,max:r===Et?void 0:r}}function k(t,i,n,e,o){var r=Vi(o);return new Fi(n+(t-n)*Math.cos(r)+(i-e)*Math.sin(r),e-(t-n)*Math.sin(r)+(i-e)*Math.cos(r))}function T(t,i){return t-i}function S(t,i){var n,e,o,r,s,a,l,h,u;return t.x1===i.x1&&t.y1===i.y1&&t.x2===i.x2&&t.y2===i.y2?i:(n=Math.min(t.x1,i.x1),e=Math.max(t.x1,i.x1),o=Math.min(t.x2,i.x2),r=Math.max(t.x2,i.x2),s=Math.min(t.y1,i.y1),a=Math.max(t.y1,i.y1),l=Math.min(t.y2,i.y2),h=Math.max(t.y2,i.y2),u=[],u[0]=new Ni(e,s,o,a),u[1]=new Ni(n,a,e,l),u[2]=new Ni(o,a,r,l),u[3]=new Ni(e,l,o,h),t.x1===n&&t.y1===s||i.x1===n&&i.y1===s?(u[4]=new Ni(n,s,e,a),u[5]=new Ni(o,l,r,h)):(u[4]=new Ni(o,s,r,a),u[5]=new Ni(n,l,e,h)),m(u,function(t){return t.height()>0&&t.width()>0})[0])}function R(i){var n,e,o=i.stops,r=i.innerRadius/i.radius*100,s=o.length,a=[];for(n=0;n<s;n++)e=t.extend({},o[n]),e.offset=(e.offset*(100-r)+r)/100,a.push(e);return a}function j(t){var i=t.origin,n=t.bottomRight();return new Ni(i.x,i.y,n.x,n.y)}function L(t,i){var n=t.tickX,e=t.tickY,r=t.position,s=new xt({stroke:{width:i.width,color:i.color}});return t.vertical?s.moveTo(n,r).lineTo(n+i.size,r):s.moveTo(r,e).lineTo(r,e+i.size),o(s),s}function U(t,i){var n=t.lineStart,e=t.lineEnd,r=t.position,s=new xt({stroke:{width:i.width,color:i.color,dashType:i.dashType}});return t.vertical?s.moveTo(n,r).lineTo(e,r):s.moveTo(r,n).lineTo(r,e),o(s),s}function B(t,i){var n=t.getTime()-i,e=t.getTimezoneOffset()-i.getTimezoneOffset();return n-e*kn}function A(t,i){return new Date(t.getTime()+i)}function I(t){var i;return t instanceof Date?i=t:t&&(i=new Date(t)),i}function P(t,i){var n,e;if(void 0===i&&(i=0),n=0,e=t.getDay(),!isNaN(e))for(;e!==i;)0===e?e=6:e--,n++;return A(t,-n*Sn)}function _(t,i){return 0===i&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function C(t,i){var n,e=new Date(t);return e.setMinutes(0,0,0),n=(t.getTimezoneOffset()-e.getTimezoneOffset())*kn,A(e,n+i*Tn)}function z(t,i,n,e){var o,r,s=t;return t&&(o=I(t),r=o.getHours(),n===yn?(s=new Date(o.getFullYear()+i,0,1),_(s,0)):n===bn?(s=new Date(o.getFullYear(),o.getMonth()+i,1),_(s,r)):n===vn?(s=z(P(o,e),7*i,xn),_(s,r)):n===xn?(s=new Date(o.getFullYear(),o.getMonth(),o.getDate()+i),_(s,r)):n===gn?s=C(o,i):n===mn?(s=A(o,i*kn),s.getSeconds()>0&&s.setSeconds(0)):n===dn?s=A(o,i*Mn):n===pn&&(s=A(o,i)),n!==pn&&s.getMilliseconds()>0&&s.setMilliseconds(0)),s}function V(t,i,n){return z(I(t),0,i,n)}function D(t,i,n){var e=I(t);return e&&V(e,i,n).getTime()===e.getTime()?e:z(e,1,i,n)}function G(t,i){return t&&i?t.getTime()-i.getTime():-1}function E(t,i){return t.getTime()-i}function O(t){var n,e;if(i(t)){for(n=[],e=0;e<t.length;e++)n.push(O(t[e]));return n}if(t)return I(t).getTime()}function F(t,i){return t&&i?O(t)===O(i):t===i}function N(t,i,n){return B(t,i)/Un[n]}function H(t,i,n,e){var o,r=I(t),s=I(i);return o=n===bn?r.getMonth()-s.getMonth()+12*(r.getFullYear()-s.getFullYear())+N(r,new Date(r.getFullYear(),r.getMonth()),xn)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():n===yn?r.getFullYear()-s.getFullYear()+H(r,new Date(r.getFullYear(),0),bn,1)/12:n===xn||n===vn?N(r,s,n):E(r,i)/Un[n],o/e}function Y(t,i,n){var e;return e=n===yn?i.getFullYear()-t.getFullYear():n===bn?12*Y(t,i,yn)+i.getMonth()-t.getMonth():n===xn?Math.floor(E(i,t)/Sn):Math.floor(E(i,t)/Un[n])}function X(t,i){for(var n,e,o=0,r=i.length-1;o<=r;)if(n=Math.floor((o+r)/2),e=i[n],e<t)o=n+1;else{if(!(e>t)){for(;F(i[n-1],t);)n--;return n}r=n-1}return i[n]<=t?n:n-1}function q(t,i){var n;return n=a(i)?t.parseDate(i)||I(i):I(i)}function K(t,n){var e,o;if(i(n)){for(e=[],o=0;o<n.length;o++)e.push(q(t,n[o]));return e}return q(t,n)}function W(t,i){var n,e;if(t instanceof Date){for(n=i.length,e=0;e<n;e++)if(F(i[e],t))return e;return-1}return i.indexOf(t)}function Q(t,i){var n,e,o,r=Di(i-t,Xt-1);if(0===r){if(0===i)return.1;r=Math.abs(i)}return n=Math.pow(10,Math.floor(Math.log(r)/Math.log(10))),e=Di(r/n,Xt),o=1,o=e<1.904762?.2:e<4.761904?.5:e<9.523809?1:2,Di(n*o,Xt)}function J(t,i,n){var e,o,r;if(!t&&!i)return 0;if(t>=0&&i>=0){if(o=t===i?0:t,r=(i-o)/i,n===!1||!n&&r>_n)return 0;e=Math.max(0,o-(i-o)/2)}else e=t;return e}function Z(t,i,n){var e,o,r;if(!t&&!i)return 1;if(t<=0&&i<=0){if(o=t===i?0:i,r=Math.abs((o-t)/o),n===!1||!n&&r>_n)return 0;e=Math.min(0,o-(t-o)/2)}else e=i;return e}function $(t,i){return Di(Math.floor(t/i)*i,Xt)}function tt(t,i){return Di(Math.ceil(t/i)*i,Xt)}function it(t){return Math.max(Math.min(t,In),-In)}function nt(t,i,n){var e=n.narrowRange,o=J(t,i,e),r=Z(t,i,e),s=Q(o,r),a={majorUnit:s};return n.roundToMajorUnit!==!1&&(o<0&&rt(o,s,1/3)&&(o-=s),r>0&&rt(r,s,1/3)&&(r+=s)),a.min=$(o,s),a.max=tt(r,s),a}function et(t,i){return{min:Li(i.min)?Math.min(t.min,i.min):t.min,max:Li(i.max)?Math.max(t.max,i.max):t.max,majorUnit:t.majorUnit}}function ot(t,i){var n,e,o,r,s=i;return i&&(n=Li(i.min),e=Li(i.max),o=n||e,o&&i.min===i.max&&(i.min>0?i.min=0:i.max=1),i.majorUnit?(t.min=$(t.min,i.majorUnit),t.max=tt(t.max,i.majorUnit)):o&&(s=Rt(t,i),t.majorUnit=Q(s.min,s.max))),t.minorUnit=(s.majorUnit||t.majorUnit)/5,r=Rt(t,s),r.min>=r.max&&(n&&!e?r.max=r.min+r.majorUnit:!n&&e&&(r.min=r.max-r.majorUnit)),r}function rt(t,i,n){var e=Di(Math.abs(t%i),Xt),o=i*(1-n);return 0===e||e>o}function st(t){var i=gn;return t>=Ln?i=yn:t>=jn?i=bn:t>=Rn?i=vn:t>=Sn&&(i=xn),i}function at(t,i,n){var e=n.min||t,o=n.max||i,r=n.baseUnit||(o&&e?st(B(o,e)):gn),s=Un[r],a=V(O(e)-1,r)||I(o),l=D(O(o)+1,r),h=n.majorUnit?n.majorUnit:void 0,u=h||tt(Q(a.getTime(),l.getTime()),s)/s,c=Y(a,l,r),f=tt(c,u),p=f-c,d=Math.floor(p/2),m=p-d;return n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||r,n.min=n.min||z(a,-d,r),n.max=n.max||z(l,m,r),n.minorUnit=n.minorUnit||u/5,n.majorUnit=u,n}function lt(t,i,n,e){var o=n.min,r=n.max;return Li(n.axisCrossingValue)&&n.axisCrossingValue<=0&&ct(),Li(e.max)?e.max<=0&&ct():r=i,Li(e.min)?e.min<=0&&ct():o=t,{min:o,max:r}}function ht(t,i,n){var e=n.majorUnit,o=t;return t<=0?o=i<=1?Math.pow(e,-2):1:n.narrowRange||(o=Math.pow(e,Math.floor(ft(t,e)))),o}function ut(t,i){var n,e=Di(ft(t,i),Xt)%1;return n=t<=0?i:0!==e&&(e<.3||e>.9)?Math.pow(i,ft(t,i)+.2):Math.pow(i,Math.ceil(ft(t,i)))}function ct(){throw Error("Non positive values cannot be used for a logarithmic axis")}function ft(t,i){return Math.log(t)/Math.log(i)}function pt(t,i){return 180-Math.abs(Math.abs(t-i)-180)}function dt(t){return t<=0?-1:1}var mt,gt,xt,vt,bt,yt,wt,Mt,kt,Tt,St,Rt,jt,Lt,Ut,Bt,At,It,Pt,_t,Ct,zt,Vt,Dt,Gt,Et,Ot,Ft,Nt,Ht,Yt,Xt,qt,Kt,Wt,Qt,Jt,Zt,$t,ti,ii,ni,ei,oi,ri,si,ai,li,hi,ui,ci,fi,pi,di,mi,gi,xi,vi,bi,yi,wi,Mi,ki,Ti,Si,Ri,ji,Li,Ui,Bi,Ai,Ii,Pi,_i,Ci,zi,Vi,Di,Gi,Ei,Oi,Fi,Ni,Hi,Yi,Xi,qi,Ki,Wi,Qi,Ji,Zi,$i,tn,nn,en,on,rn,sn,an,ln,hn,un,cn,fn,pn,dn,mn,gn,xn,vn,bn,yn,wn,Mn,kn,Tn,Sn,Rn,jn,Ln,Un,Bn,An,In,Pn,_n,Cn,zn,Vn,Dn,Gn,En,On,Fn,Nn,Hn,Yn,Xn,qn,Kn,Wn,Qn,Jn,Zn;window.kendo.dataviz=window.kendo.dataviz||{},mt=kendo.drawing,gt=mt.util,xt=mt.Path,vt=mt.Group,bt=kendo.Class,yt=kendo.geometry,wt=yt.Rect,Mt=yt.Circle,kt=yt.transform,Tt=yt.Segment,St=kendo.dataviz,Rt=kendo.deepExtend,jt=kendo.isFunction,Lt=kendo.getter,Ut="x",Bt="y",At="top",It="bottom",Pt="left",_t="right",Ct="center",zt="width",Vt="height",Dt=3,Gt=Number.MAX_VALUE,Et=-Number.MAX_VALUE,Ot=600,Ft=400,Nt="#fff",Ht="#000",Yt="12px sans-serif",Xt=10,qt="axisLabelClick",Kt="noteClick",Wt="noteHover",Qt="outside",Jt="none",Zt="circle",$t="triangle",ti="cross",ii="arc",ni="inside",ei="value",oi="string",ri="object",si="date",ai=/\{\d+:?/,li=100,hi={X:Ut,Y:Bt,WIDTH:zt,HEIGHT:Vt,DEFAULT_HEIGHT:Ft,DEFAULT_WIDTH:Ot,TOP:At,LEFT:Pt,BOTTOM:It,RIGHT:_t,CENTER:Ct,COORD_PRECISION:Dt,DEFAULT_PRECISION:Xt,CIRCLE:Zt,TRIANGLE:$t,CROSS:ti,MAX_VALUE:Gt,MIN_VALUE:Et,WHITE:Nt,BLACK:Ht,DEFAULT_FONT:Yt,AXIS_LABEL_CLICK:qt,OUTSIDE:Qt,INSIDE:ni,NONE:Jt,NOTE_CLICK:Kt,NOTE_HOVER:Wt,VALUE:ei,STRING:oi,OBJECT:ri,DATE:si,ARC:ii,FORMAT_REGEX:ai,HIGHLIGHT_ZINDEX:li},ui=/\s+/g,ci=/width|height|top|left|bottom|right/i,fi={format:function(t,i){return i},toString:function(t){return t},parseDate:function(t){return new Date(t)}},pi=fi,di=bt.extend({}),di.register=function(t){pi=t},Object.defineProperties&&Object.defineProperties(di,{implementation:{get:function(){return pi}}}),mi=/\{(\d+)(:[^\}]+)?\}/g,gi=bt.extend({init:function(t){this._intlService=t},auto:function(t){for(var i,n=[],e=arguments.length-1;e-- >0;)n[e]=arguments[e+1];return i=this.intlService,a(t)&&t.match(ai)?i.format.apply(i,[t].concat(n)):i.toString(n[0],t)},localeAuto:function(t,i,n){var e,o=this.intlService;return e=a(t)&&t.match(ai)?t.replace(mi,function(t,e,r){var s=i[parseInt(e,10)];return o.toString(s,r?r.substring(1):"",n)}):o.toString(i[0],t,n)}}),Object.defineProperties&&Object.defineProperties(gi.fn,{intlService:{get:function(){return this._intlService||di.implementation}}}),xi=bt.extend({init:function(t,i){void 0===i&&(i={}),this._intlService=i.intlService,this.sender=i.sender||t,this.format=new gi(i.intlService),this.chart=t,this.rtl=i.rtl},notify:function(t,i){this.chart.trigger(t,i)}}),Object.defineProperties&&Object.defineProperties(xi.fn,{intl:{get:function(){return this._intlService||di.implementation}}}),bi=bt.extend({}),bi.register=function(t){vi=t},bi.create=function(t,i){if(vi)return vi.create(t,i)},yi={compile:function(t){return t}},wi=bt.extend({}),wi.register=function(t){yi=t},wi.compile=function(t){return yi.compile(t)},Mi={ChartService:xi,DomEventsBuilder:bi,FormatService:gi,IntlService:di,TemplateService:wi},ki="trigger",Ti=bt.extend({init:function(t,i){this.observer=t,this.handlerMap=Rt({},this.handlerMap,i)},trigger:function(t,i){var n,e=this,o=e.observer,r=e.handlerMap;return r[t]?n=this.callObserver(r[t],i):o[ki]&&(n=this.callObserver(ki,t,i)),n},callObserver:function(t){for(var i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return this.observer[t].apply(this.observer,i)},requiresHandlers:function(t){var i,n=this;if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(i=0;i<t.length;i++)if(n.handlerMap[t[i]])return!0}}),Si=kendo.drawing.util,Ri=Si.append,ji=Si.bindEvents,Li=Si.defined,Ui=Si.deg,Bi=Si.elementOffset,Ai=Si.elementSize,Ii=Si.eventElement,Pi=Si.eventCoordinates,_i=Si.last,Ci=Si.limitValue,zi=Si.objectKey,Vi=Si.rad,Di=Si.round,Gi=Si.unbindEvents,Ei=Si.valueOrDefault,Oi=bt.extend({}),Oi.fetchFonts=function(t,i,n){void 0===n&&(n={depth:0});var e=5;!t||n.depth>e||!document.fonts||Object.keys(t).forEach(function(e){var o=t[e];"dataSource"!==e&&"$"!==e[0]&&o&&("font"===e?i.push(o):"object"==typeof o&&(n.depth++,Oi.fetchFonts(o,i,n),n.depth--))})},Oi.loadFonts=function(t,i){var n=[];if(t.length>0&&document.fonts){try{n=t.map(function(t){return document.fonts.load(t)})}catch(e){kendo.logToConsole(e)}Promise.all(n).then(i,i)}else i()},Oi.preloadFonts=function(t,i){var n=[];Oi.fetchFonts(t,n),Oi.loadFonts(n,i)},Fi=bt.extend({init:function(t,i){this.x=t||0,this.y=i||0},clone:function(){return new Fi(this.x,this.y)},equals:function(t){return t&&this.x===t.x&&this.y===t.y},rotate:function(t,i){var n=Vi(i),e=Math.cos(n),o=Math.sin(n),r=t.x,s=t.y,a=this,l=a.x,h=a.y;return this.x=Di(r+(l-r)*e+(h-s)*o,Dt),this.y=Di(s+(h-s)*e-(l-r)*o,Dt),this},multiply:function(t){return this.x*=t,this.y*=t,this},distanceTo:function(t){var i=this.x-t.x,n=this.y-t.y;return Math.sqrt(i*i+n*n)}}),Fi.onCircle=function(t,i,n){var e=Vi(i);return new Fi(t.x-n*Math.cos(e),t.y-n*Math.sin(e))},Ni=bt.extend({init:function(t,i,n,e){this.x1=t||0,this.y1=i||0,this.x2=n||0,this.y2=e||0},equals:function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},width:function(){return this.x2-this.x1},height:function(){return this.y2-this.y1},translate:function(t,i){return this.x1+=t,this.x2+=t,this.y1+=i,this.y2+=i,this},move:function(t,i){var n=this.height(),e=this.width();return Li(t)&&(this.x1=t,this.x2=this.x1+e),Li(i)&&(this.y1=i,this.y2=this.y1+n),this},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},wrapPoint:function(t){var n=i(t),e=n?t[0]:t.x,o=n?t[1]:t.y;return this.wrap(new Ni(e,o,e,o)),this},snapTo:function(t,i){return i!==Ut&&i||(this.x1=t.x1,this.x2=t.x2),i!==Bt&&i||(this.y1=t.y1,this.y2=t.y2),this},alignTo:function(t,i){var n,e,o=this.height(),r=this.width(),s=i===At||i===It?Bt:Ut,a=s===Bt?o:r;return i===Ct?(n=t.center(),e=this.center(),this.x1+=n.x-e.x,this.y1+=n.y-e.y):this[s+1]=i===At||i===Pt?t[s+1]-a:t[s+2],this.x2=this.x1+r,this.y2=this.y1+o,this},shrink:function(t,i){return this.x2-=t,this.y2-=i,this},expand:function(t,i){return this.shrink(-t,-i),this},pad:function(t){var i=p(t);return this.x1-=i.left,this.x2+=i.right,this.y1-=i.top,this.y2+=i.bottom,this},unpad:function(t){var i=p(t);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,this.pad(i)},clone:function(){return new Ni(this.x1,this.y1,this.x2,this.y2)},center:function(){return new Fi(this.x1+this.width()/2,this.y1+this.height()/2)},containsPoint:function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},points:function(){return[new Fi(this.x1,this.y1),new Fi(this.x2,this.y1),new Fi(this.x2,this.y2),new Fi(this.x1,this.y2)]},getHash:function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},overlaps:function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},rotate:function(t){var i=this.width(),n=this.height(),e=this.center(),o=e.x,r=e.y,s=k(0,0,o,r,t),a=k(i,0,o,r,t),l=k(i,n,o,r,t),h=k(0,n,o,r,t);return i=Math.max(s.x,a.x,l.x,h.x)-Math.min(s.x,a.x,l.x,h.x),n=Math.max(s.y,a.y,l.y,h.y)-Math.min(s.y,a.y,l.y,h.y),this.x2=this.x1+i,this.y2=this.y1+n,this},toRect:function(){return new wt([this.x1,this.y1],[this.width(),this.height()])},hasSize:function(){return 0!==this.width()&&0!==this.height()},align:function(t,i,n){var e=i+1,o=i+2,r=i===Ut?zt:Vt,s=this[r]();x(n,[Pt,At])?(this[e]=t[e],this[o]=this[e]+s):x(n,[_t,It])?(this[o]=t[o],this[e]=this[o]-s):n===Ct&&(this[e]=t[e]+(t[r]()-s)/2,this[o]=this[e]+s)}}),Hi=bt.extend({init:function(t,i,n,e,o){this.center=t,this.innerRadius=i,this.radius=n,this.startAngle=e,this.angle=o},clone:function(){return new Hi(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},middle:function(){return this.startAngle+this.angle/2},setRadius:function(t,i){return i?this.innerRadius=t:this.radius=t,this},point:function(t,i){var n=Vi(t),e=Math.cos(n),o=Math.sin(n),r=i?this.innerRadius:this.radius,s=Di(this.center.x-e*r,Dt),a=Di(this.center.y-o*r,Dt);return new Fi(s,a)},adjacentBox:function(t,i,n){var e=this.clone().expand(t),o=e.middle(),r=e.point(o),s=i/2,a=n/2,l=Math.sin(Vi(o)),h=Math.cos(Vi(o)),u=r.x-s,c=r.y-a;return Math.abs(l)<.9&&(u+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(c+=a*-l/Math.abs(l)),new Ni(u,c,u+i,c+n)},containsPoint:function(t){var i=this.center,n=this.innerRadius,e=this.radius,o=this.startAngle,s=this.startAngle+this.angle,a=t.x-i.x,l=t.y-i.y,h=new Fi(a,l),u=this.point(o),c=new Fi(u.x-i.x,u.y-i.y),f=this.point(s),p=new Fi(f.x-i.x,f.y-i.y),d=Di(a*a+l*l,Dt);return(c.equals(h)||r(c,h))&&!r(p,h)&&d>=n*n&&d<=e*e},getBBox:function(){var t,i,n,e=this,o=new Ni(Gt,Gt,Et,Et),r=Di(this.startAngle%360),s=Di((r+this.angle)%360),a=this.innerRadius,l=[0,90,180,270,r,s].sort(T),h=l.indexOf(r),u=l.indexOf(s);for(t=r===s?l:h<u?l.slice(h,u+1):[].concat(l.slice(0,u+1),l.slice(h,l.length)),i=0;i<t.length;i++)n=e.point(t[i]),o.wrapPoint(n),o.wrapPoint(n,a);return a||o.wrapPoint(this.center),o},expand:function(t){return this.radius+=t,this}}),Yi=Hi.extend({init:function(t,i,n,e){Hi.fn.init.call(this,t,0,i,n,e)},expand:function(t){return Hi.fn.expand.call(this,t)},clone:function(){return new Yi(this.center,this.radius,this.startAngle,this.angle)},setRadius:function(t){return this.radius=t,this}}),Xi=.001,qi=bt.extend({createRing:function(t,i){var n,e,o,r,s,a,l=t.startAngle+180,h=t.angle+l;return t.angle>0&&l===h&&(h+=Xi),n=new yt.Point(t.center.x,t.center.y),e=Math.max(t.radius,0),o=Math.max(t.innerRadius,0),r=new yt.Arc(n,{startAngle:l,endAngle:h,radiusX:e,radiusY:e}),s=xt.fromArc(r,i).close(),o?(r.radiusX=r.radiusY=o,a=r.pointAt(h),s.lineTo(a.x,a.y),s.arc(h,l,o,o,!0)):s.lineTo(n.x,n.y),s}}),qi.current=new qi,Ki=bt.extend({init:function(t){this.children=[],this.options=Rt({},this.options,t)},reflow:function(t){var i,n,e,o=this.children;for(n=0;n<o.length;n++)e=o[n],e.reflow(t),i=i?i.wrap(e.box):e.box.clone();this.box=i||t},destroy:function(){var t,i=this.children;for(this.animation&&this.animation.destroy(),t=0;t<i.length;t++)i[t].destroy()},getRoot:function(){var t=this.parent;return t?t.getRoot():null},getSender:function(){var t=this.getService();if(t)return t.sender},getService:function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},translateChildren:function(t,i){var n,e=this.children,o=e.length;for(n=0;n<o;n++)e[n].box.translate(t,i)},append:function(){var t,i,n=arguments,e=this;for(t=0;t<arguments.length;t++)i=n[t],e.children.push(i),i.parent=e},renderVisual:function(){this.options.visible!==!1&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},addVisual:function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},renderChildren:function(){var t,i=this.children,n=i.length;for(t=0;t<n;t++)i[t].renderVisual()},createVisual:function(){this.visual=new vt({zIndex:this.options.zIndex,visible:Ei(this.options.visible,!0)})},createAnimation:function(){this.visual&&(this.animation=mt.Animation.create(this.visual,this.options.animation))},appendVisual:function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):Li(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},clipRoot:function(){return this.parent?this.parent.clipRoot():this},stackRoot:function(){return this.parent?this.parent.stackRoot():this},stackVisual:function(t){var i,n,e,o=t.options.zIndex||0,r=this.visual.children,s=r.length;for(i=0;i<s&&(n=r[i],e=Ei(n.options.zIndex,0),!(e>o));i++);this.visual.insert(i,t)},traverse:function(t){var i,n,e=this.children,o=e.length;for(i=0;i<o;i++)n=e[i],t(n),n.traverse&&n.traverse(t)},closest:function(t){for(var i=this,n=!1;i&&!n;)n=t(i),n||(i=i.parent);if(n)return i},renderComplete:function(){},hasHighlight:function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&t.visible===!1)},toggleHighlight:function(i){var n,e=this,o=(this.options||{}).highlight||{},r=o.visual,s=this._highlight;if(!s){if(n={fill:{color:Nt,opacity:.2},stroke:{color:Nt,width:1,opacity:.2}},r){if(s=this._highlight=r(t.extend(this.highlightVisualArgs(),{createVisual:function(){return e.createHighlight(n)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total})),!s)return}else s=this._highlight=this.createHighlight(n);Li(s.options.zIndex)||(s.options.zIndex=Ei(o.zIndex,this.options.zIndex)),this.appendVisual(s)}s.visible(i)},createGradientOverlay:function(i,n,e){var o=new xt(t.extend({stroke:{color:"none"},fill:this.createGradient(e),closed:i.options.closed},n));return o.segments.elements(i.segments.elements()),o},createGradient:function(t){if(this.parent)return this.parent.createGradient(t)}}),Ki.prototype.options={},Wi=Ki.extend({init:function(t){Ki.fn.init.call(this,t),this.options.margin=p(this.options.margin),this.options.padding=p(this.options.padding)},reflow:function(t){var i,n,e,o,r=this,s=this.options,a=s.width,l=s.height,h=s.shrinkToFit,u=a&&l,c=s.margin,f=s.padding,p=s.border.width,d=function(){r.align(t,Ut,s.align),r.align(t,Bt,s.vAlign),r.paddingBox=i.clone().unpad(c).unpad(p)},m=t.clone();for(u&&(m.x2=m.x1+a,m.y2=m.y1+l),h&&m.unpad(c).unpad(p).unpad(f),Ki.fn.reflow.call(this,m),i=u?this.box=new Ni(0,0,a,l):this.box,h&&u?(d(),m=this.contentBox=this.paddingBox.clone().unpad(f)):(m=this.contentBox=i.clone(),i.pad(f).pad(p).pad(c),d()),this.translateChildren(i.x1-m.x1+c.left+p+f.left,i.y1-m.y1+c.top+p+f.top),n=this.children,e=0;e<n.length;e++)o=n[e],o.reflow(o.box)},align:function(t,i,n){this.box.align(t,i,n)},hasBox:function(){var t=this.options;return t.border.width||t.background},createVisual:function(){Ki.fn.createVisual.call(this);var t=this.options;t.visible&&this.hasBox()&&this.visual.append(xt.fromRect(this.paddingBox.toRect(),this.visualStyle()))},visualStyle:function(){var t=this.options,i=t.border||{};return{stroke:{width:i.width,color:i.color,opacity:Ei(i.opacity,t.opacity),dashType:i.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}}}),w(Wi,{align:Pt,vAlign:At,margin:{},padding:{},border:{color:Ht,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0}),Qi=Wi.extend({init:function(t,i){Wi.fn.init.call(this,t),this.pointData=i},getElement:function(){var t,i,n=this,e=n.options,o=n.paddingBox,r=e.type,s=e.rotation,a=o.center(),l=o.width()/2;return e.visible&&this.hasBox()?(t=this.visualStyle(),r===Zt?i=new mt.Circle(new Mt([Di(o.x1+l,Dt),Di(o.y1+o.height()/2,Dt)],l),t):r===$t?i=xt.fromPoints([[o.x1+l,o.y1],[o.x1,o.y2],[o.x2,o.y2]],t).close():r===ti?(i=new mt.MultiPath(t),i.moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),i.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):i=xt.fromRect(o.toRect(),t),s&&i.transform(kt().rotate(-s,[a.x,a.y])),i.options.zIndex=e.zIndex,i):null},createElement:function(){var t,i=this,n=this.options.visual,e=this.pointData||{};return t=n?n({value:e.value,dataItem:e.dataItem,sender:this.getSender(),series:e.series,category:e.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return i.getElement()}}):this.getElement()},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}},createVisual:function(){this.visual=this.createElement()}}),w(Qi,{type:Zt,align:Ct,vAlign:Ct}),Ji="linear",Zi="radial",$i={glass:{type:Ji,rotation:0,stops:[{offset:0,color:Nt,opacity:0},{offset:.25,color:Nt,opacity:.3},{offset:1,color:Nt,opacity:0}]},sharpBevel:{type:Zi,stops:[{offset:0,color:Nt,opacity:.55},{offset:.65,color:Nt,opacity:0},{offset:.95,color:Nt,opacity:.25}]},roundedBevel:{type:Zi,stops:[{offset:.33,color:Nt,opacity:.06},{offset:.83,color:Nt,opacity:.2},{offset:.95,color:Nt,opacity:0}]},roundedGlass:{type:Zi,supportVML:!1,stops:[{offset:0,color:Nt,opacity:0},{offset:.5,color:Nt,opacity:.3},{offset:.99,color:Nt,opacity:0}]},sharpGlass:{type:Zi,supportVML:!1,stops:[{offset:0,color:Nt,opacity:.2},{offset:.15,color:Nt,opacity:.15},{offset:.17,color:Nt,opacity:.35},{offset:.85,color:Nt,opacity:.05},{offset:.87,color:Nt,opacity:.15},{offset:.99,color:Nt,opacity:0}]},bubbleShadow:{type:Zi,center:[.5,.5],radius:.5}},tn=Ki.extend({init:function(t){Ki.fn.init.call(this,t);var i=this.options;i.width=parseInt(i.width,10),i.height=parseInt(i.height,10),this.gradients={}},reflow:function(){var t,i=this,n=i.options,e=i.children,o=new Ni(0,0,n.width,n.height);for(this.box=o.unpad(n.margin),t=0;t<e.length;t++)e[t].reflow(o),o=S(o,e[t].box)||new Ni},createVisual:function(){this.visual=new vt,this.createBackground()},createBackground:function(){var t=this.options,i=t.border||{},n=this.box.clone().pad(t.margin).unpad(i.width),e=xt.fromRect(n.toRect(),{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(e)},getRoot:function(){return this},createGradient:function(i){var n,e,o=this.gradients,r=zi(i),s=$i[i.gradient];return o[r]?n=o[r]:(e=t.extend({},s,i),"linear"===s.type?n=new mt.LinearGradient(e):(i.innerRadius&&(e.stops=R(e)),n=new mt.RadialGradient(e),n.supportVML=s.supportVML!==!1),o[r]=n),n}}),w(tn,{width:Ot,height:Ft,background:Nt,border:{color:Ht,width:0},margin:p(5),zIndex:-2}),nn=Ki.extend({init:function(t){Ki.fn.init.call(this,t),this._initDirection()},_initDirection:function(){var t=this.options;t.vertical?(this.groupAxis=Ut,this.elementAxis=Bt,this.groupSizeField=zt,this.elementSizeField=Vt,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=Bt,this.elementAxis=Ut,this.groupSizeField=Vt,this.elementSizeField=zt,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},reflow:function(t){this.box=t.clone(),this.reflowChildren()},reflowChildren:function(){var t,i,n,e,o,r,s,a,l,h,u,c=this,f=this,p=f.box,d=f.elementAxis,m=f.groupAxis,g=f.elementSizeField,x=f.groupSizeField,v=this.groupOptions(),b=v.groups,y=v.groupsSize,w=v.maxGroupElementsSize,M=b.length,k=p[m+1]+this.alignStart(y,p[x]());if(M){for(t=k,i=0;i<M;i++){for(n=b[i],e=n.groupElements,o=p[d+1],r=e.length,s=0;s<r;s++)a=e[s],l=c.elementSize(a),h=t+c.alignStart(l[x],n.groupSize),u=new Ni,u[m+1]=h,u[m+2]=h+l[x],u[d+1]=o,u[d+2]=o+l[g],a.reflow(u),o+=l[g]+c.elementSpacing;t+=n.groupSize+c.groupSpacing}p[m+1]=k,p[m+2]=k+y,p[d+2]=p[d+1]+w}},alignStart:function(t,i){var n=0,e=this.options.align;return e===_t||e===It?n=i-t:e===Ct&&(n=(i-t)/2),n},groupOptions:function(){var t,i,n,e=this,o=this,r=o.box,s=o.children,a=o.elementSizeField,l=o.groupSizeField,h=o.elementSpacing,u=o.groupSpacing,c=Di(r[a]()),f=s.length,p=[],d=0,m=0,g=0,x=0,v=[];for(t=0;t<f;t++)i=s[t],i.box||i.reflow(r),n=e.elementSize(i),e.options.wrap&&Di(m+h+n[a])>c&&(p.push({groupElements:v,groupSize:d,groupElementsSize:m}),x=Math.max(x,m),g+=u+d,d=0,m=0,v=[]),d=Math.max(d,n[l]),m>0&&(m+=h),m+=n[a],v.push(i);return p.push({groupElements:v,groupSize:d,groupElementsSize:m}),x=Math.max(x,m),g+=d,{groups:p,groupsSize:g,maxGroupElementsSize:x}},elementSize:function(t){return{width:t.box.width(),height:t.box.height()}},createVisual:function(){}}),w(nn,{vertical:!0,wrap:!0,vSpacing:0,spacing:0}),en=mt.Text,on=Ki.extend({init:function(t,i){Ki.fn.init.call(this,i),this.content=t,this.reflow(new Ni)},reflow:function(t){var i=this.options,n=i.size=gt.measureText(this.content,{font:i.font});this.baseline=n.baseline,this.box=new Ni(t.x1,t.y1,t.x1+n.width,t.y1+n.height)},createVisual:function(){var t=this.options,i=t.font,n=t.color,e=t.opacity,o=t.cursor;this.visual=new en(this.content,this.box.toRect().topLeft(),{font:i,fill:{color:n,opacity:e},cursor:o})}}),w(on,{font:Yt,color:Ht}),rn=/\n/m,sn=Wi.extend({init:function(t,i){Wi.fn.init.call(this,i),this.content=t,this._initContainer(),this.options._autoReflow!==!1&&this.reflow(new Ni)},_initContainer:function(){var t,i,n=this.options,e=(this.content+"").split(rn),o=new nn({vertical:!0,align:n.align,wrap:!1}),r=Rt({},n,{opacity:1,animation:null});for(this.container=o,this.append(o),t=0;t<e.length;t++)i=new on(e[t].trim(),r),o.append(i)},reflow:function(t){var i,n,e,o,r=this.options,s=r.visual;this.container.options.align=r.align,s&&!this._boxReflow?(i=t,i.hasSize()||(this._boxReflow=!0,this.reflow(i),this._boxReflow=!1,i=this.box),n=this.visual=s(this.visualContext(i)),n&&(i=j(n.clippedBBox()||new wt),n.options.zIndex=r.zIndex),this.box=this.contentBox=this.paddingBox=i):(Wi.fn.reflow.call(this,t),r.rotation&&(e=p(r.margin),o=this.box.unpad(e),this.targetBox=t,this.normalBox=o.clone(),o=this.rotate(),o.translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=o.clone(),o.pad(e)))},createVisual:function(){var t,i=this.options;i.visible&&(this.visual=new vt({
  transform:this.rotationTransform(),zIndex:i.zIndex,noclip:i.noclip}),this.hasBox()&&(t=xt.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t)))},renderVisual:function(){if(this.options.visual){var t=this.visual;t&&!Li(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else Wi.fn.renderVisual.call(this)},visualOptions:function(){var t=this.options;return{background:t.background,border:t.border,color:t.color,font:t.font,margin:t.margin,padding:t.padding,visible:t.visible}},visualContext:function(t){var i=this;return{text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return i._boxReflow=!0,i.reflow(t),i._boxReflow=!1,i.getDefaultVisual()}}},getDefaultVisual:function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},rotate:function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,Ut,t.align),this.align(this.targetBox,Bt,t.vAlign),this.box},rotationTransform:function(){var t,i,n,e,o=this.options.rotation;return o?(t=this.normalBox.center(),i=t.x,n=t.y,e=this.rotatedBox.center(),kt().translate(e.x-i,e.y-n).rotate(o,[i,n])):null}}),an=Ki.extend({init:function(i){Ki.fn.init.call(this,i),this.append(new sn(this.options.text,t.extend({},this.options,{vAlign:this.options.position})))},reflow:function(t){Ki.fn.reflow.call(this,t),this.box.snapTo(t,Ut)}}),an.buildTitle=function(i,n,e){var o,r=i;return"string"==typeof i&&(r={text:i}),r=t.extend({visible:!0},e,r),r&&r.visible&&r.text&&(o=new an(r),n.append(o)),o},w(an,{color:Ht,position:At,align:Ct,margin:p(5),padding:p(5)}),ln=sn.extend({init:function(t,i,n,e,o){sn.fn.init.call(this,i,o),this.text=i,this.value=t,this.index=n,this.dataItem=e,this.reflow(new Ni)},visualContext:function(t){var i=sn.fn.visualContext.call(this,t);return i.value=this.value,i.dataItem=this.dataItem,i.format=this.options.format,i.culture=this.options.culture,i},click:function(t,i){t.trigger(qt,{element:Ii(i),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},rotate:function(){var t,i;return this.options.alignRotation!==Ct?(t=this.normalBox.toRect(),i=this.rotationTransform(),this.box=j(t.bbox(i.matrix()))):sn.fn.rotate.call(this),this.box},rotationTransform:function(){var t,i,n,e,o,r,s,a,l,h,u,c,f,p,d,m,g,x,v=this.options,b=v.rotation;return b?v.alignRotation===Ct?sn.fn.rotationTransform.call(this):(t=kt().rotate(b).matrix(),i=this.normalBox.toRect(),n=this.targetBox.toRect(),e=v.rotationOrigin||At,o=e===At||e===It?Ut:Bt,r=e===At||e===It?Bt:Ut,s=e===At||e===Pt?n.origin:n.bottomRight(),a=i.topLeft().transformCopy(t),l=i.topRight().transformCopy(t),h=i.bottomRight().transformCopy(t),u=i.bottomLeft().transformCopy(t),c=wt.fromPoints(a,l,h,u),f={},f[r]=n.origin[r]-c.origin[r],p=Math.abs(a[r]+f[r]-s[r]),d=Math.abs(l[r]+f[r]-s[r]),Di(p,Xt)===Di(d,Xt)?(m=a,g=l):d<p?(m=l,g=h):(m=a,g=u),x=m[o]+(g[o]-m[o])/2,f[o]=n.center()[o]-x,kt().translate(f.x,f.y).rotate(b)):null}}),w(ln,{_autoReflow:!1}),hn=7,un="#fff",cn=Wi.extend({init:function(t,i,n){Wi.fn.init.call(this,i),this.fields=t,this.chartService=n,this.render()},hide:function(){this.options.visible=!1},show:function(){this.options.visible=!0},render:function(){var t,i,n,e,o,r,s,a,l,h=this.options;h.visible&&(t=h.label,i=h.icon,n=new Ni,e=i.size,o=this.fields.text,Li(t)&&t.visible&&(a=d(t),a?o=a(this.fields):t.format&&(o=this.chartService.format.auto(t.format,o)),t.color||(t.color=t.position===ni?un:i.background),this.label=new sn(o,Rt({},t)),t.position!==ni||Li(e)||(i.type===Zt?e=Math.max(this.label.box.width(),this.label.box.height()):(r=this.label.box.width(),s=this.label.box.height()),n.wrap(this.label.box))),i.width=r||e||hn,i.height=s||e||hn,l=new Qi(Rt({},i)),this.marker=l,this.append(l),this.label&&this.append(this.label),l.reflow(new Ni),this.wrapperBox=n.wrap(l.box))},reflow:function(t){var i,n,e,o=this,r=o.options,s=o.label,a=o.marker,l=o.wrapperBox,h=t.center(),u=r.line.length,c=r.position;r.visible&&(x(c,[Pt,_t])?c===Pt?(e=l.alignTo(t,c).translate(-u,t.center().y-l.center().y),r.line.visible&&(i=[t.x1,h.y],this.linePoints=[i,[e.x2,h.y]],n=e.clone().wrapPoint(i))):(e=l.alignTo(t,c).translate(u,t.center().y-l.center().y),r.line.visible&&(i=[t.x2,h.y],this.linePoints=[i,[e.x1,h.y]],n=e.clone().wrapPoint(i))):c===It?(e=l.alignTo(t,c).translate(t.center().x-l.center().x,u),r.line.visible&&(i=[h.x,t.y2],this.linePoints=[i,[h.x,e.y1]],n=e.clone().wrapPoint(i))):(e=l.alignTo(t,c).translate(t.center().x-l.center().x,-u),r.line.visible&&(i=[h.x,t.y1],this.linePoints=[i,[h.x,e.y2]],n=e.clone().wrapPoint(i))),a&&a.reflow(e),s&&(s.reflow(e),a&&(r.label.position===Qt&&s.box.alignTo(a.box,c),s.reflow(s.box))),this.contentBox=e,this.targetBox=t,this.box=n||e)},createVisual:function(){Wi.fn.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},renderVisual:function(){var i=this,n=this.options,e=n.visual;n.visible&&e?(this.visual=e(t.extend(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:n.background,border:n.background,icon:n.icon,label:n.label,line:n.line,position:n.position,visible:n.visible},createVisual:function(){i.createVisual(),i.renderChildren();var t=i.visual;return delete i.visual,t}})),this.addVisual()):Wi.fn.renderVisual.call(this)},createLine:function(){var t,i=this.options.line;this.linePoints&&(t=xt.fromPoints(this.linePoints,{stroke:{color:i.color,width:i.width,dashType:i.dashType}}),o(t),this.visual.append(t))},click:function(t,i){var n=this.eventArgs(i);t.trigger(Kt,n)||i.preventDefault()},hover:function(t,i){var n=this.eventArgs(i);t.trigger(Wt,n)||i.preventDefault()},leave:function(t){t._unsetActivePoint()},eventArgs:function(i){var n=this.options;return t.extend(this.fields,{element:Ii(i),text:Li(n.label)?n.label.text:"",visual:this.visual})}}),w(cn,{icon:{visible:!0,type:Zt},label:{position:ni,visible:!0,align:Ct,vAlign:Ct},line:{visible:!0},visible:!0,position:At,zIndex:2}),fn=Ki.extend({init:function(t,i){void 0===i&&(i=new xi),Ki.fn.init.call(this,t),this.chartService=i,this.options.visible||(this.options=Rt({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=Rt({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==Jt},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=Rt({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==Jt},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()},labelsRange:function(){return{min:this.options.labels.skip,max:this.labelsCount()}},createLabels:function(){var t,i,n,e,o=this,r=this.options,s=r.vertical?_t:Ct,a=Rt({},r.labels,{align:s,zIndex:r.zIndex}),l=Math.max(1,a.step);if(this.children=m(this.children,function(t){return!(t instanceof ln)}),this.labels=[],a.visible)for(t=this.labelsRange(),i=a.rotation,h(i)&&(a.alignRotation=i.align,a.rotation=i.angle),"auto"===a.rotation&&(a.rotation=0,r.autoRotateLabels=!0),n=t.min;n<t.max;n+=l)e=o.createAxisLabel(n,a),e&&(o.append(e),o.labels.push(e))},lineBox:function(){var t=this,i=t.options,n=t.box,e=i.vertical,o=i.labels.mirror,r=o?n.x1:n.x2,s=o?n.y2:n.y1,a=i.line.width||0;return e?new Ni(r,n.y1,r,n.y2-a):new Ni(n.x1,s,n.x2-a,s)},createTitle:function(){var t,i=this.options,n=Rt({rotation:i.vertical?-90:0,text:"",zIndex:1,visualSize:!0},i.title);n.visible&&n.text&&(t=new sn(n.text,n),this.append(t),this.title=t)},createNotes:function(){var t,i,n,e=this,o=this.options,r=o.notes,s=r.data||[];for(this.notes=[],t=0;t<s.length;t++)i=Rt({},r,s[t]),i.value=e.parseNoteValue(i.value),n=new cn({value:i.value,text:i.label.text,dataItem:i},i,e.chartService),n.options.visible&&(Li(n.options.position)?o.vertical&&!x(n.options.position,[Pt,_t])?n.options.position=o.reverse?Pt:_t:o.vertical||x(n.options.position,[At,It])||(n.options.position=o.reverse?It:At):n.options.position=o.vertical?o.reverse?Pt:_t:o.reverse?It:At,e.append(n),e.notes.push(n))},parseNoteValue:function(t){return t},renderVisual:function(){Ki.fn.renderVisual.call(this),this.createPlotBands()},createVisual:function(){Ki.fn.createVisual.call(this),this.createBackground(),this.createLine()},gridLinesVisual:function(){var t=this._gridLines;return t||(t=this._gridLines=new vt({zIndex:-2}),this.appendVisual(this._gridLines)),t},createTicks:function(t){function i(i,n,r){var a,l=i.length,h=Math.max(1,n.step);if(n.visible)for(a=n.skip;a<l;a+=h)Li(r)&&a%r===0||(s.tickX=o?e.x2:e.x2-n.size,s.tickY=o?e.y1-n.size:e.y1,s.position=i[a],t.append(L(s,n)))}var n=this.options,e=this.lineBox(),o=n.labels.mirror,r=n.majorTicks.visible?n.majorUnit:0,s={vertical:n.vertical};i(this.getMajorTickPositions(),n.majorTicks),i(this.getMinorTickPositions(),n.minorTicks,r/n.minorUnit)},createLine:function(){var t,i,n=this.options,e=n.line,r=this.lineBox();e.width>0&&e.visible&&(t=new xt({stroke:{width:e.width,color:e.color,dashType:e.dashType}}),t.moveTo(r.x1,r.y1).lineTo(r.x2,r.y2),n._alignLines&&o(t),i=this._lineGroup=new vt,i.append(t),this.visual.append(i),this.createTicks(i))},getActualTickSize:function(){var t=this.options,i=0;return t.majorTicks.visible&&t.minorTicks.visible?i=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?i=t.majorTicks.size:t.minorTicks.visible&&(i=t.minorTicks.size),i},createBackground:function(){var t=this,i=t.options,n=t.box,e=i.background;e&&(this._backgroundPath=xt.fromRect(n.toRect(),{fill:{color:e},stroke:null}),this.visual.append(this._backgroundPath))},createPlotBands:function(){var t,i,n,e,o,r,s,a,l=this,h=this.options,u=h.plotBands||[],c=h.vertical,f=this.plotArea;if(0!==u.length){for(t=this._plotbandGroup=new vt({zIndex:-1}),i=m(this.pane.axes,function(t){return t.options.vertical!==l.options.vertical})[0],n=0;n<u.length;n++)e=u[n],o=void 0,r=void 0,c?(o=(i||f.axisX).lineBox(),r=l.getSlot(e.from,e.to,!0)):(o=l.getSlot(e.from,e.to,!0),r=(i||f.axisY).lineBox()),0!==o.width()&&0!==r.height()&&(s=new wt([o.x1,r.y1],[o.width(),r.height()]),a=xt.fromRect(s,{fill:{color:e.color,opacity:e.opacity},stroke:null}),t.append(a));this.appendVisual(t)}},createGridLines:function(t){function i(t,i,n){var e,o,r=t.length,s=Math.max(1,i.step);if(i.visible)for(e=i.skip;e<r;e+=s)o=Di(t[e]),x(o,f)||e%n===0||a&&u===o||(c.position=o,p.append(U(c,i)),f.push(o))}var n=this.options,e=n.minorGridLines,o=n.majorGridLines,r=n.minorUnit,s=n.vertical,a=t.options.line.visible,l=o.visible?n.majorUnit:0,h=t.lineBox(),u=h[s?"y1":"x1"],c={lineStart:h[s?"x1":"y1"],lineEnd:h[s?"x2":"y2"],vertical:s},f=[],p=this.gridLinesVisual();return i(this.getMajorTickPositions(),o),i(this.getMinorTickPositions(),e,l/r),p.children},reflow:function(t){var i,n,e=this,o=e.options,r=e.labels,s=e.title,a=o.vertical,l=r.length,h=a?zt:Vt,u=s?s.box[h]():0,c=this.getActualTickSize()+o.margin+u,f=(this.getRoot()||{}).box||t,p=f[h](),d=0;for(i=0;i<l;i++)n=r[i].box[h](),n+c<=p&&(d=Math.max(d,n));this.box=a?new Ni(t.x1,t.y1,t.x1+d+c,t.y2):new Ni(t.x1,t.y1,t.x2,t.y1+d+c),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},getLabelsTickPositions:function(){return this.getMajorTickPositions()},labelTickIndex:function(t){return t.index},arrangeLabels:function(){var t,i,n,e,o,r,s,a,l,h,u,c=this,f=this,p=f.options,d=f.labels,m=!p.justified,g=p.vertical,x=this.lineBox(),v=p.labels.mirror,b=this.getLabelsTickPositions(),y=this.getActualTickSize()+p.margin;for(t=0;t<d.length;t++)i=d[t],n=c.labelTickIndex(i),e=g?i.box.height():i.box.width(),o=b[n]-e/2,r=void 0,s=void 0,a=void 0,g?(m&&(s=b[n],a=b[n+1],l=s+(a-s)/2,o=l-e/2),h=x.x2,v?(h+=y,i.options.rotationOrigin=Pt):(h-=y+i.box.width(),i.options.rotationOrigin=_t),r=i.box.move(h,o)):(m?(s=b[n],a=b[n+1]):(s=o,a=o+e),u=x.y1,v?(u-=y+i.box.height(),i.options.rotationOrigin=It):(u+=y,i.options.rotationOrigin=At),r=new Ni(s,u,a,u+i.box.height())),i.reflow(r)},autoRotateLabels:function(){var t,i,n,e,o,r,s;if(this.options.autoRotateLabels&&!this.options.vertical){for(t=this.getMajorTickPositions(),i=this.labels,e=0;e<i.length;e++)if(o=Math.abs(t[e+1]-t[e]),r=i[e].box,r.width()>o){if(r.height()>o){n=-90;break}n=-45}if(n){for(s=0;s<i.length;s++)i[s].options.rotation=n,i[s].reflow(new Ni);return!0}}},arrangeTitle:function(){var t=this,i=t.options,n=t.title,e=i.labels.mirror,o=i.vertical;n&&(o?(n.options.align=e?_t:Pt,n.options.vAlign=n.options.position):(n.options.align=n.options.position,n.options.vAlign=e?At:It),n.reflow(this.box))},arrangeNotes:function(){var t,i,n,e,o=this;for(t=0;t<this.notes.length;t++)i=o.notes[t],n=i.options.value,e=void 0,Li(n)?(o.shouldRenderNote(n)?i.show():i.hide(),e=o.noteSlot(n)):i.hide(),i.reflow(e||o.lineBox())},noteSlot:function(t){return this.getSlot(t)},alignTo:function(t){var i=t.lineBox(),n=this.options.vertical,e=n?Bt:Ut;this.box.snapTo(i,e),n?this.box.shrink(0,this.lineBox().height()-i.height()):this.box.shrink(this.lineBox().width()-i.width(),0),this.box[e+1]-=this.lineBox()[e+1]-i[e+1],this.box[e+2]-=this.lineBox()[e+2]-i[e+2]},axisLabelText:function(t,i,n){var e=d(n),o=t;return e?o=e({value:t,dataItem:i,format:n.format,culture:n.culture}):n.format&&(o=this.chartService.format.localeAuto(n.format,[t],n.culture)),o},slot:function(t,i,n){var e=this.getSlot(t,i,n);if(e)return e.toRect()},contentBox:function(){var t,i=this.box.clone(),n=this.labels;return n.length&&(n[0].options.visible&&i.wrap(n[0].box),t=n[n.length-1],t.options.visible&&i.wrap(t.box)),i},limitRange:function(t,i,n,e,o){var r,s,a,l=this.options;return t<n&&o<0&&(!Li(l.min)||l.min<=n)||e<i&&o>0&&(!Li(l.max)||e<=l.max)?null:i<n&&o>0||e<t&&o<0?{min:t,max:i}:(r=i-t,s=t,a=i,t<n?(s=Ci(t,n,e),a=Ci(t+r,n+r,e)):i>e&&(a=Ci(i,n,e),s=Ci(i-r,n,e-r)),{min:s,max:a})},valueRange:function(){return{min:this.seriesMin,max:this.seriesMax}}}),w(fn,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Ht,visible:!0},title:{visible:!0,position:Ct},majorTicks:{align:Qt,size:4,skip:0,step:1},minorTicks:{align:Qt,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:Qt,minorTickType:Jt,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Ht,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1}),pn="milliseconds",dn="seconds",mn="minutes",gn="hours",xn="days",vn="weeks",bn="months",yn="years",wn=1,Mn=1e3,kn=60*Mn,Tn=60*kn,Sn=24*Tn,Rn=7*Sn,jn=31*Sn,Ln=365*Sn,Un={years:Ln,months:jn,weeks:Rn,days:Sn,hours:Tn,minutes:kn,seconds:Mn,milliseconds:wn},Bn=.01,An=fn.extend({init:function(t,i){fn.fn.init.call(this,t,i),this._ticks={},this._initCategories(this.options)},_initCategories:function(t){var i,n,e=(t.categories||[]).slice(0),o=Li(t.min),r=Li(t.max);t.categories=e,(o||r)&&e.length&&(t.srcCategories=t.categories,i=o?Math.floor(t.min):0,n=r?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,n))},rangeIndices:function(){var t,i=this.options,n=i.categories.length||1,e=s(i.min)?i.min%1:0;return t=s(i.max)&&i.max%1!==0&&i.max<this.totalRange().max?n-(1-i.max%1):n-(i.justified?1:0),{min:e,max:t}},totalRangeIndices:function(t){var i,n,e=this.options,o=s(e.min)?e.min:0;return i=s(e.max)?e.max:s(e.min)?o+e.categories.length:(e.srcCategories||e.categories).length-(e.justified?1:0)||1,t&&(n=this.totalRange(),o=Ci(o,0,n.max),i=Ci(i,0,n.max)),{min:o,max:i}},range:function(){var t=this.options;return{min:s(t.min)?t.min:0,max:s(t.max)?t.max:t.categories.length}},totalRange:function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,(t.srcCategories||t.categories).length)-(t.justified?1:0)}},getScale:function(){var t=this.rangeIndices(),i=t.min,n=t.max,e=this.lineBox(),o=this.options.vertical?e.height():e.width(),r=o/(n-i||1);return r*(this.options.reverse?-1:1)},getTickPositions:function(t){for(var i=this.options,n=i.vertical,e=i.reverse,o=this.rangeIndices(),r=o.min,s=o.max,a=this.lineBox(),l=this.getScale(),h=a[(n?Bt:Ut)+(e?2:1)],u=[],c=r%1!==0?Math.floor(r/1)+t:r;c<=s;)u.push(h+Di(l*(c-r),Dt)),c+=t;return u},getLabelsTickPositions:function(){var t=this.getMajorTickPositions().slice(0),i=this.rangeIndices(),n=this.getScale(),e=this.lineBox(),o=this.options,r=o.vertical?Bt:Ut,s=o.reverse?2:1,a=o.reverse?1:2;return i.min%1!==0&&t.unshift(e[r+s]-n*(i.min%1)),i.max%1!==0&&t.push(e[r+a]+n*(1-i.max%1)),t},labelTickIndex:function(t){var i=this.rangeIndices(),n=t.index;return i.min>0&&(n-=Math.floor(i.min)),n},arrangeLabels:function(){fn.fn.arrangeLabels.call(this),this.hideOutOfRangeLabels()},hideOutOfRangeLabels:function(){var t,i,n,e,o,r=this,s=r.box,a=r.labels;a.length&&(t=this.options.vertical?Bt:Ut,i=s[t+1],n=s[t+2],e=a[0],o=_i(a),(e.box[t+1]>n||e.box[t+2]<i)&&(e.options.visible=!1),(o.box[t+1]>n||o.box[t+2]<i)&&(o.options.visible=!1))},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getTicks:function(){var t=this.options,i=t.reverse,n=t.justified,e=this._ticks,o=this.rangeIndices(),r=this.lineBox(),s=r.getHash()+o.min+","+o.max+i+n;return e._hash!==s&&(e._hash=s,e.majorTicks=this.getTickPositions(1),e.minorTicks=this.getTickPositions(.5)),e},getSlot:function(t,i,n){var e,o,r=this.options,s=r.reverse,a=r.justified,l=r.vertical,h=this.rangeIndices(),u=h.min,c=l?Bt:Ut,f=this.lineBox(),p=this.getScale(),d=f[c+(s?2:1)],m=f.clone(),g=!Li(i),x=Ei(t,0),v=Ei(i,x);return v=Math.max(v-1,x),v=Math.max(x,v),e=d+(x-u)*p,o=d+(v+1-u)*p,g&&a&&(o=e),n&&(e=Ci(e,f[c+1],f[c+2]),o=Ci(o,f[c+1],f[c+2])),m[c+1]=s?o:e,m[c+2]=s?e:o,m},limitSlot:function(t){var i=this.options.vertical,n=i?Bt:Ut,e=this.lineBox(),o=t.clone();return o[n+1]=Ci(t[n+1],e[n+1],e[n+2]),o[n+2]=Ci(t[n+2],e[n+1],e[n+2]),o},slot:function(t,i,n){var e=t,o=i;return"string"==typeof e&&(e=this.categoryIndex(e)),"string"==typeof o&&(o=this.categoryIndex(o)),fn.fn.slot.call(this,e,o,n)},pointCategoryIndex:function(t){var i,n,e=this.options,o=e.reverse,r=e.justified,s=e.vertical,a=s?Bt:Ut,l=this.lineBox(),h=this.rangeIndices(),u=o?h.max:h.min,c=this.getScale(),f=l[a+1],p=l[a+2],d=t[a];return d<f||d>p?null:(i=u+(d-f)/c,n=i%1,r?i=Math.round(i):0===n&&i>0&&i--,Math.floor(i))},getCategory:function(t){var i=this.pointCategoryIndex(t);return null===i?null:this.options.categories[i]},categoryIndex:function(t){var i=this.options,n=W(t,i.srcCategories||i.categories);return n-Math.floor(i.min||0)},translateRange:function(t){var i=this.options,n=this.lineBox(),e=i.vertical?n.height():n.width(),o=i.categories.length,r=e/o,s=Di(t/r,Xt);return{min:s,max:o+s}},zoomRange:function(t){var i=this.totalRangeIndices(),n=this.totalRange(),e=n.min,o=n.max,r=Ci(i.min+t,e,o),s=Ci(i.max-t,e,o);if(s-r>0)return{min:r,max:s}},scaleRange:function(t){var i=this.options.categories.length,n=t*i;return{min:-n,max:i+n}},labelsCount:function(){var t=this.labelsRange();return t.max-t.min},labelsRange:function(){var t,i=this.options,n=i.justified,e=i.labels,o=this.totalRangeIndices(!0),r=o.min,s=o.max,a=Math.floor(r);return n?(r=Math.ceil(r),s=Math.floor(s)):(r=Math.floor(r),s=Math.ceil(s)),t=r>e.skip?e.skip+e.step*Math.ceil((r-e.skip)/e.step):e.skip,{min:t-a,max:(i.categories.length?s+(n?1:0):0)-a}},createAxisLabel:function(t,i){var n=this.options,e=n.dataItems?n.dataItems[t]:null,o=Ei(n.categories[t],""),r=this.axisLabelText(o,e,i);return new ln(o,r,t,e,i)},shouldRenderNote:function(t){var i=this.totalRangeIndices();return Math.floor(i.min)<=t&&t<=Math.ceil(i.max)},noteSlot:function(t){var i=this.options,n=t-Math.floor(i.min||0);return this.getSlot(n)},arrangeNotes:function(){fn.fn.arrangeNotes.call(this),this.hideOutOfRangeNotes()},hideOutOfRangeNotes:function(){var t,i,n,e,o,r=this,s=r.notes,a=r.box;if(s&&s.length)for(t=this.options.vertical?Bt:Ut,i=a[t+1],n=a[t+2],e=0;e<s.length;e++)o=s[e],o.box&&(n<o.box[t+1]||o.box[t+2]<i)&&o.hide()},pan:function(t){var i=this.totalRangeIndices(!0),n=this.getScale(),e=Di(t/n,Xt),o=this.totalRange(),r=i.min+e,s=i.max+e;return this.limitRange(r,s,0,o.max,e)},pointsRange:function(t,i){var n=this.options,e=n.reverse,o=n.vertical,r=o?Bt:Ut,s=this.lineBox(),a=this.totalRangeIndices(!0),l=this.getScale(),h=s[r+(e?2:1)],u=t[r]-h,c=i[r]-h,f=a.min+u/l,p=a.min+c/l,d=Math.min(f,p),m=Math.max(f,p);if(m-d>=Bn)return{min:d,max:m}},valueRange:function(){return this.range()}}),w(An,{type:"category",categories:[],vertical:!1,majorGridLines:{visible:!1,width:1,color:Ht},labels:{zIndex:1},justified:!1,_deferLabels:!0}),In=3e5,Pn={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"},_n=.2,Cn="auto",zn=[pn,dn,mn,gn,xn,vn,bn,yn],Vn="fit",Dn=An.extend({init:function(t,i){var n,e,o,r;An.fn.init.call(this,t,i),n=i.intl,e=this.options,e=Rt({roundToBaseUnit:!0},e,{categories:K(n,e.categories),min:q(n,e.min),max:q(n,e.max)}),e.userSetBaseUnit=e.userSetBaseUnit||e.baseUnit,e.userSetBaseUnitStep=e.userSetBaseUnitStep||e.baseUnitStep,e.categories&&e.categories.length>0?(o=(e.baseUnit||"").toLowerCase(),r=o!==Vn&&!x(o,zn),r&&(e.baseUnit=this.defaultBaseUnit(e)),o!==Vn&&e.baseUnitStep!==Cn||this.autoBaseUnit(e),this._groupsStart=z(e.categories[0],0,e.baseUnit,e.weekStartDay),this.groupCategories(e)):e.baseUnit=e.baseUnit||xn,this.options=e},_initCategories:function(){},shouldRenderNote:function(t){var i=this.range(),n=this.options.categories||[];return G(t,i.min)>=0&&G(t,i.max)<=0&&n.length},parseNoteValue:function(t){return q(this.chartService.intl,t)},noteSlot:function(t){return this.getSlot(t)},translateRange:function(t){var i,n,e=this.options,o=e.baseUnit,r=e.weekStartDay,s=e.vertical,a=this.lineBox(),l=s?a.height():a.width(),h=this.range(),u=l/(h.max-h.min),c=Di(t/u,Xt);return h.min&&h.max&&(i=A(e.min||h.min,c),n=A(e.max||h.max,c),h={min:z(i,0,o,r),max:z(n,0,o,r)}),h},scaleRange:function(t){var i,n,e=Math.abs(t),o=this.range(),r=o.min,s=o.max;if(r&&s){for(;e--;)i=E(r,s),n=Math.round(.1*i),t<0?(r=A(r,n),s=A(s,-n)):(r=A(r,-n),s=A(s,n));o={min:r,max:s}}return o},defaultBaseUnit:function(t){var i,n,e,o,r,s=t.categories,a=Li(s)?s.length:0,l=Gt;for(e=0;e<a;e++)o=s[e],o&&i&&(r=B(o,i),r>0&&(l=Math.min(l,r),n=l>=Ln?yn:l>=jn-3*Sn?bn:l>=Rn?vn:l>=Sn?xn:l>=Tn?gn:l>=kn?mn:dn)),i=o;return n||xn},_categoryRange:function(t){var i=t._range;return i||(i=t._range=M(t)),i},totalRange:function(){return{min:0,max:this.options.categories.length}},rangeIndices:function(){var t=this.options,i=t.categories,n=t.baseUnit,e=t.baseUnitStep||1,o=this.categoriesRange(),r=I(t.min||o.min),s=I(t.max||o.max),a=0,l=0;return i.length&&(a=H(r,i[0],n,e),l=H(s,i[0],n,e),t.roundToBaseUnit&&(a=Math.floor(a),l=t.justified?Math.floor(l):Math.ceil(l))),{min:a,max:l}},labelsRange:function(){var t=this.options,i=t.labels,n=this.rangeIndices(),e=Math.floor(n.min),o=Math.ceil(n.max);return{min:e+i.skip,max:t.categories.length?o+(t.justified?1:0):0}},categoriesRange:function(){var t=this.options,i=this._categoryRange(t.srcCategories||t.categories),n=I(i.max);return!t.justified&&F(n,this._roundToTotalStep(n,t,!1))&&(n=this._roundToTotalStep(n,t,!0,!0)),{min:I(i.min),max:n}},currentRange:function(){var t=this.options,i=t.roundToBaseUnit!==!1,n=this.categoriesRange(),e=t.min,o=t.max;return e||(e=i?this._roundToTotalStep(n.min,t,!1):n.min),o||(o=i?this._roundToTotalStep(n.max,t,!t.justified):n.max),{min:e,max:o}},datesRange:function(){var t=this._categoryRange(this.options.srcCategories||this.options.categories);return{min:I(t.min),max:I(t.max)}},pan:function(t){var i=this.options,n=this.lineBox(),e=i.vertical?n.height():n.width(),o=this.currentRange(),r=o.min,s=o.max,a=this.totalLimits(),l=e/(s-r),h=Di(t/l,Xt),u=A(r,h),c=A(s,h),f=this.limitRange(O(u),O(c),O(a.min),O(a.max),h);if(f)return f.min=I(f.min),f.max=I(f.max),f.baseUnit=i.baseUnit,f.baseUnitStep=i.baseUnitStep||1,f.userSetBaseUnit=i.userSetBaseUnit,f.userSetBaseUnitStep=i.userSetBaseUnitStep,f},pointsRange:function(t,i){var n=An.fn.pointsRange.call(this,t,i),e=this.currentRange(),o=this.rangeIndices(),r=E(e.max,e.min)/(o.max-o.min),s=this.options,a=A(e.min,n.min*r),l=A(e.min,n.max*r);return{min:a,max:l,baseUnit:s.userSetBaseUnit,baseUnitStep:s.userSetBaseUnitStep}},zoomRange:function(t){var i,n,e,o,r,s,a,l,h,u=this.options,c=this.totalLimits(),f=u.weekStartDay,p=u.baseUnit,d=u.baseUnitStep||1,m=this.currentRange(),g=m.min,x=m.max,v=z(g,t*d,p,f),b=z(x,-t*d,p,f);if(u.userSetBaseUnit===Vn)if(i=u.autoBaseUnitSteps,n=u.maxDateGroups,e=_i(i[p])*n*Un[p],o=E(x,g),r=E(b,v),s=zn.indexOf(p),r<Un[p]&&p!==pn)p=zn[s-1],a=_i(i[p]),l=(o-(n-1)*a*Un[p])/2,v=A(g,l),b=A(x,-l);else if(r>e&&p!==yn){h=0;do{s++,p=zn[s],h=0,l=2*Un[p];do a=i[p][h],h++;while(h<i[p].length&&l*a<o)}while(p!==yn&&l*a<o);l=(l*a-o)/2,l>0&&(v=A(g,-l),b=A(x,l),v=A(v,Ci(b,c.min,c.max)-b),b=A(b,Ci(v,c.min,c.max)-v))}if(v=I(Ci(v,c.min,c.max)),b=I(Ci(b,c.min,c.max)),v&&b&&E(b,v)>0)return{min:v,max:b,baseUnit:u.userSetBaseUnit,baseUnitStep:u.userSetBaseUnitStep}},totalLimits:function(){var t=this.options,i=this.datesRange(),n=this._roundToTotalStep(I(i.min),t,!1),e=i.max;return t.justified||(e=this._roundToTotalStep(e,t,!0,F(e,this._roundToTotalStep(e,t,!1)))),{min:n,max:e}},range:function(t){var i=t||this.options,n=i.categories,e=i.baseUnit===Vn,o=e?zn[0]:i.baseUnit,r=i.baseUnitStep||1,s={baseUnit:o,baseUnitStep:r,weekStartDay:i.weekStartDay},a=this._categoryRange(n),l=I(i.min||a.min),h=I(i.max||a.max);return{min:this._roundToTotalStep(l,s,!1),max:this._roundToTotalStep(h,s,!0,!0)}},autoBaseUnit:function(t){for(var i,n,e,o=this._categoryRange(t.categories),r=I(t.max||o.max)-I(t.min||o.min),s=t.maxDateGroups||this.options.maxDateGroups,a=t.baseUnit===Vn,l=0,h=a?zn[l++]:t.baseUnit,u=r/Un[h],c=u,f=Rt({},this.options.autoBaseUnitSteps,t.autoBaseUnitSteps);!n||u>=s;)if(i=i||f[h].slice(0),e=i.shift())n=e,u=c/n;else{if(h===_i(zn)){n=Math.ceil(c/s);break}if(!a){u>s&&(n=Math.ceil(c/s));break}h=zn[l++]||_i(zn),c=r/Un[h],i=null}t.baseUnitStep=n,t.baseUnit=h},groupCategories:function(t){var i,n,e=t.categories,o=t.baseUnit,r=t.baseUnitStep||1,s=I(M(e).max),a=this.range(t),l=a.min,h=a.max,u=[];for(n=l;n<h&&(u.push(n),i=z(n,r,o,t.weekStartDay),!(i>s)||t.max);n=i);t.srcCategories=e,t.categories=u},_roundToTotalStep:function(t,i,n,e){var o,r,s=i||this.options,a=s.baseUnit,l=s.baseUnitStep||1,h=this._groupsStart;return h?(o=H(t,h,a,l),r=n?Math.ceil(o):Math.floor(o),e&&r++,z(h,r*l,a,s.weekStartDay)):z(t,n?l:0,a,s.weekStartDay)},createAxisLabel:function(t,i){var n,e,o=this.options,r=o.dataItems?o.dataItems[t]:null,s=o.categories[t],a=o.baseUnit,l=i.dateFormats[a],h=!0;if(o.justified?(n=V(s,a,o.weekStartDay),h=F(n,s)):o.roundToBaseUnit||(h=!F(this.range().max,s)),h&&(i.format=i.format||l,e=this.axisLabelText(s,r,i)))return new ln(s,e,t,r,i)},categoryIndex:function(t){var i=this.options,n=i.categories,e=-1;return n.length&&(e=Math.floor(H(I(t),n[0],i.baseUnit,i.baseUnitStep||1))),e},getSlot:function(t,i,n){var e=t,o=i;return typeof e===ri&&(e=this.categoryIndex(e)),typeof o===ri&&(o=this.categoryIndex(o)),An.fn.getSlot.call(this,e,o,n)},valueRange:function(){var t=this.options,i=this._categoryRange(t.srcCategories||t.categories);return{min:I(i.min),max:I(i.max)}}}),w(Dn,{type:si,labels:{dateFormats:Pn},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}),Gn=Math.pow(10,-Xt+1),En=fn.extend({init:function(t,i,n,e){var o=nt(t,i,n),r=et(o,n);fn.fn.init.call(this,ot(o,n),e),this.totalMin=r.min,this.totalMax=r.max,this.totalMajorUnit=r.majorUnit,this.seriesMin=t,this.seriesMax=i},startValue:function(){return 0},range:function(){var t=this.options;return{min:t.min,max:t.max}},getDivisions:function(t){var i,n;return 0===t?1:(i=this.options,n=i.max-i.min,Math.floor(Di(n/t,Dt))+1)},getTickPositions:function(t,i){var n,e=this.options,o=e.vertical,r=e.reverse,s=this.lineBox(),a=o?s.height():s.width(),l=e.max-e.min,h=a/l,u=t*h,c=this.getDivisions(t),f=(o?-1:1)*(r?-1:1),p=1===f?1:2,d=[],m=s[(o?Bt:Ut)+p],g=0;for(i&&(g=i/t),n=0;n<c;n++)n%g!==0&&d.push(Di(m,Dt)),m+=u*f;return d},getMajorTickPositions:function(){return this.getTickPositions(this.options.majorUnit)},getMinorTickPositions:function(){return this.getTickPositions(this.options.minorUnit)},getSlot:function(t,i,n){var e,o,r,s,a,l,h,u,c,f,p,d,m,g;return void 0===n&&(n=!1),e=this.options,o=e.vertical,r=e.reverse,s=o?Bt:Ut,a=this.lineBox(),l=a[s+(r?2:1)],h=o?a.height():a.width(),u=r?-1:1,c=u*(h/(e.max-e.min)),f=new Ni(a.x1,a.y1,a.x1,a.y1),p=t,d=i,Li(p)||(p=d||0),Li(d)||(d=p||0),n&&(p=Math.max(Math.min(p,e.max),e.min),d=Math.max(Math.min(d,e.max),e.min)),o?(m=e.max-Math.max(p,d),g=e.max-Math.min(p,d)):(m=Math.min(p,d)-e.min,g=Math.max(p,d)-e.min),f[s+1]=it(l+c*(r?g:m)),f[s+2]=it(l+c*(r?m:g)),f},getValue:function(t){var i,n=this.options,e=n.vertical,o=n.reverse,r=+n.max,s=+n.min,a=e?Bt:Ut,l=this.lineBox(),h=l[a+(o?2:1)],u=e?l.height():l.width(),c=o?-1:1,f=c*(t[a]-h),p=(r-s)/u,d=f*p;return f<0||f>u?null:(i=e?r-d:s+d,Di(i,Xt))},translateRange:function(t){var i=this.options,n=i.vertical,e=i.reverse,o=i.max,r=i.min,s=this.lineBox(),a=n?s.height():s.width(),l=o-r,h=a/l,u=Di(t/h,Xt);return!n&&!e||n&&e||(u=-u),{min:r+u,max:o+u}},scaleRange:function(t){var i=this.options,n=-t*i.majorUnit;return{min:i.min-n,max:i.max+n}},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(t,i){var n=this.options,e=Di(n.min+t*n.majorUnit,Xt),o=this.axisLabelText(e,null,i);return new ln(e,o,t,null,i)},shouldRenderNote:function(t){var i=this.range();return i.min<=t&&t<=i.max},pan:function(t){var i=this.translateRange(t);return this.limitRange(i.min,i.max,this.totalMin,this.totalMax)},pointsRange:function(t,i){var n=this.getValue(t),e=this.getValue(i),o=Math.min(n,e),r=Math.max(n,e);if(this.isValidRange(o,r))return{min:o,max:r}},zoomRange:function(t){var i=this,n=i.totalMin,e=i.totalMax,o=this.scaleRange(t),r=Ci(o.min,n,e),s=Ci(o.max,n,e);if(this.isValidRange(r,s))return{min:r,max:s}},isValidRange:function(t,i){return i-t>Gn}}),w(En,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Ht},labels:{format:"#.####################"},zIndex:1}),On=fn.extend({init:function(t,i,n,e){var o=I(t),r=I(i),s=e.intl,a=n||{};a=Rt(a||{},{min:q(s,a.min),max:q(s,a.max),axisCrossingValue:K(s,a.axisCrossingValues||a.axisCrossingValue)}),a=at(o,r,a),fn.fn.init.call(this,a,e),this.intlService=s,this.seriesMin=o,this.seriesMax=r,this.totalMin=O(V(O(o)-1,a.baseUnit)),this.totalMax=O(D(O(r)+1,a.baseUnit))},range:function(){var t=this.options;return{min:t.min,max:t.max}},getDivisions:function(t){var i=this.options;return Math.floor(Y(i.min,i.max,i.baseUnit)/t+1)},getTickPositions:function(t){var i,n,e,o=this.options,r=o.vertical,s=this.lineBox(),a=(r?-1:1)*(o.reverse?-1:1),l=1===a?1:2,h=s[(r?Bt:Ut)+l],u=this.getDivisions(t),c=E(o.max,o.min),f=r?s.height():s.width(),p=f/c,d=[h];for(i=1;i<u;i++)n=z(o.min,i*t,o.baseUnit),e=h+E(n,o.min)*p*a,d.push(Di(e,Dt));return d},getMajorTickPositions:function(){return this.getTickPositions(this.options.majorUnit)},getMinorTickPositions:function(){return this.getTickPositions(this.options.minorUnit)},getSlot:function(t,i,n){return En.prototype.getSlot.call(this,q(this.intlService,t),q(this.intlService,i),n)},getValue:function(t){var i=En.prototype.getValue.call(this,t);return null!==i?I(i):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(t,i){var n,e,o=this.options,r=t*o.majorUnit,s=o.min;return r>0&&(s=z(s,r,o.baseUnit)),n=i.dateFormats[o.baseUnit],i.format=i.format||n,e=this.axisLabelText(s,null,i),new ln(s,e,t,null,i)},translateRange:function(t,i){var n=this.options,e=n.baseUnit,o=n.weekStartDay,r=this.lineBox(),s=n.vertical?r.height():r.width(),a=this.range(),l=s/E(a.max,a.min),h=Di(t/l,Xt),u=A(n.min,h),c=A(n.max,h);
  return i||(u=z(u,0,e,o),c=z(c,0,e,o)),{min:u,max:c}},scaleRange:function(t){for(var i,n,e=this.options,o=e.min,r=e.max,s=Math.abs(t);s--;)i=E(o,r),n=Math.round(.1*i),t<0?(o=A(o,n),r=A(r,-n)):(o=A(o,-n),r=A(r,n));return{min:o,max:r}},shouldRenderNote:function(t){var i=this.range();return G(t,i.min)>=0&&G(t,i.max)<=0},pan:function(t){var i=this.translateRange(t,!0),n=this.limitRange(O(i.min),O(i.max),this.totalMin,this.totalMax);if(n)return{min:I(n.min),max:I(n.max)}},pointsRange:function(t,i){var n=this.getValue(t),e=this.getValue(i),o=Math.min(n,e),r=Math.max(n,e);return{min:I(o),max:I(r)}},zoomRange:function(t){var i=this.scaleRange(t),n=I(Ci(O(i.min),this.totalMin,this.totalMax)),e=I(Ci(O(i.max),this.totalMin,this.totalMax));return{min:n,max:e}}}),w(On,{type:si,majorGridLines:{visible:!0,width:1,color:Ht},labels:{dateFormats:Pn}}),Fn=10,Nn=fn.extend({init:function(t,i,n,e){var o=Rt({majorUnit:Fn,min:t,max:i},n),r=o.majorUnit,s=ut(i,r),a=ht(t,i,o),l=lt(a,s,o,n);o.max=l.max,o.min=l.min,o.minorUnit=n.minorUnit||Di(r-1,Xt),fn.fn.init.call(this,o,e),this.totalMin=Li(n.min)?Math.min(a,n.min):a,this.totalMax=Li(n.max)?Math.max(s,n.max):s,this.logMin=Di(ft(l.min,r),Xt),this.logMax=Di(ft(l.max,r),Xt),this.seriesMin=t,this.seriesMax=i,this.createLabels()},startValue:function(){return this.options.min},getSlot:function(t,i,n){var e,o,r=this,s=r.options,a=r.logMin,l=r.logMax,h=s.reverse,u=s.vertical,c=s.majorUnit,f=u?Bt:Ut,p=this.lineBox(),d=p[f+(h?2:1)],m=u?p.height():p.width(),g=h?-1:1,x=g*(m/(l-a)),v=new Ni(p.x1,p.y1,p.x1,p.y1),b=t,y=i;return Li(b)||(b=y||1),Li(y)||(y=b||1),b<=0||y<=0?null:(n&&(b=Math.max(Math.min(b,s.max),s.min),y=Math.max(Math.min(y,s.max),s.min)),b=ft(b,c),y=ft(y,c),u?(e=l-Math.max(b,y),o=l-Math.min(b,y)):(e=Math.min(b,y)-a,o=Math.max(b,y)-a),v[f+1]=it(d+x*(h?o:e)),v[f+2]=it(d+x*(h?e:o)),v)},getValue:function(t){var i,n=this,e=n.options,o=n.logMin,r=n.logMax,s=e.reverse,a=e.vertical,l=e.majorUnit,h=this.lineBox(),u=a===s?1:-1,c=1===u?1:2,f=a?h.height():h.width(),p=(r-o)/f,d=a?Bt:Ut,m=h[d+c],g=u*(t[d]-m),x=g*p;return g<0||g>f?null:(i=o+x,Di(Math.pow(l,i),Xt))},range:function(){var t=this.options;return{min:t.min,max:t.max}},scaleRange:function(t){var i=this.options.majorUnit,n=-t;return{min:Math.pow(i,this.logMin-n),max:Math.pow(i,this.logMax+n)}},translateRange:function(t){var i=this,n=i.options,e=i.logMin,o=i.logMax,r=n.reverse,s=n.vertical,a=n.majorUnit,l=this.lineBox(),h=s?l.height():l.width(),u=h/(o-e),c=Di(t/u,Xt);return!s&&!r||s&&r||(c=-c),{min:Math.pow(a,e+c),max:Math.pow(a,o+c)}},labelsCount:function(){var t=Math.floor(this.logMax),i=Math.floor(t-this.logMin)+1;return i},getMajorTickPositions:function(){var t=[];return this.traverseMajorTicksPositions(function(i){t.push(i)},{step:1,skip:0}),t},createTicks:function(t){function i(i,n){h.tickX=s?a.x2:a.x2-n.size,h.tickY=s?a.y1-n.size:a.y1,h.position=i,t.append(L(h,n))}var n=this.options,e=n.majorTicks,o=n.minorTicks,r=n.vertical,s=n.labels.mirror,a=this.lineBox(),l=[],h={vertical:r};return e.visible&&this.traverseMajorTicksPositions(i,e),o.visible&&this.traverseMinorTicksPositions(i,o),l},createGridLines:function(t){function i(t,i){x(t,l)||(a.position=t,h.append(U(a,i)),l.push(t))}var n=this.options,e=n.minorGridLines,o=n.majorGridLines,r=n.vertical,s=t.lineBox(),a={lineStart:s[r?"x1":"y1"],lineEnd:s[r?"x2":"y2"],vertical:r},l=[],h=this.gridLinesVisual();return o.visible&&this.traverseMajorTicksPositions(i,o),e.visible&&this.traverseMinorTicksPositions(i,e),h.children},traverseMajorTicksPositions:function(t,i){var n,e,o=this._lineOptions(),r=o.lineStart,s=o.step,a=this,l=a.logMin,h=a.logMax;for(n=Math.ceil(l)+i.skip;n<=h;n+=i.step)e=Di(r+s*(n-l),Xt),t(e,i)},traverseMinorTicksPositions:function(t,i){var n,e,o,r,s,a=this,l=this.options,h=l.min,u=l.max,c=l.minorUnit,f=l.majorUnit,p=this._lineOptions(),d=p.lineStart,m=p.step,g=this,x=g.logMin,v=g.logMax,b=Math.floor(x);for(n=b;n<v;n++)for(e=a._minorIntervalOptions(n),o=i.skip;o<c&&(r=e.value+o*e.minorStep,!(r>u));o+=i.step)r>=h&&(s=Di(d+m*(ft(r,f)-x),Xt),t(s,i))},createAxisLabel:function(t,i){var n=Math.ceil(this.logMin+t),e=Math.pow(this.options.majorUnit,n),o=this.axisLabelText(e,null,i);return new ln(e,o,t,null,i)},shouldRenderNote:function(t){var i=this.range();return i.min<=t&&t<=i.max},pan:function(t){var i=this.translateRange(t);return this.limitRange(i.min,i.max,this.totalMin,this.totalMax,-t)},pointsRange:function(t,i){var n=this.getValue(t),e=this.getValue(i),o=Math.min(n,e),r=Math.max(n,e);return{min:o,max:r}},zoomRange:function(t){var i=this,n=i.options,e=i.totalMin,o=i.totalMax,r=this.scaleRange(t),s=Ci(r.min,e,o),a=Ci(r.max,e,o),l=n.majorUnit,h=a>s&&n.min&&n.max&&Di(ft(n.max,l)-ft(n.min,l),Xt)<1,u=!(n.min===e&&n.max===o)&&Di(ft(a,l)-ft(s,l),Xt)>=1;if(h||u)return{min:s,max:a}},_minorIntervalOptions:function(t){var i=this.options,n=i.minorUnit,e=i.majorUnit,o=Math.pow(e,t),r=Math.pow(e,t+1),s=r-o,a=s/n;return{value:o,minorStep:a}},_lineOptions:function(){var t=this.options,i=t.reverse,n=t.vertical,e=n?Bt:Ut,o=this.lineBox(),r=n===i?1:-1,s=1===r?1:2,a=n?o.height():o.width(),l=r*(a/(this.logMax-this.logMin)),h=o[e+s];return{step:l,lineStart:h,lineBox:o}}}),w(Nn,{type:"log",majorUnit:Fn,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Ht},zIndex:1,_deferLabels:!0}),Hn={createGridLines:function(t){var i,n,e=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],s=!1;return e.majorGridLines.visible&&(i=this.majorGridLineAngles(t),s=!0,r=this.renderMajorGridLines(i,o,e.majorGridLines)),e.minorGridLines.visible&&(n=this.minorGridLineAngles(t,s),Ri(r,this.renderMinorGridLines(n,o,e.minorGridLines,t,s))),r},renderMajorGridLines:function(t,i,n){return this.renderGridLines(t,i,n)},renderMinorGridLines:function(t,i,n,e,o){var r=this.radiusCallback&&this.radiusCallback(i,e,o);return this.renderGridLines(t,i,n,r)},renderGridLines:function(t,i,n,e){var o,r,s={stroke:{width:n.width,color:n.color,dashType:n.dashType}},a=this.box.center(),l=new Mt([a.x,a.y],i),h=this.gridLinesVisual();for(o=0;o<t.length;o++)r=new xt(s),e&&(l.radius=e(t[o])),r.moveTo(l.center).lineTo(l.pointAt(t[o]+180)),h.append(r);return h.children},gridLineAngles:function(t,i,n,e,o){var r=this,s=this.intervals(i,n,e,o),a=t.options,l=a.visible&&(a.line||{}).visible!==!1;return b(s,function(t){var i=r.intervalAngle(t);if(!l||90!==i)return i})}},Yn=An.extend({range:function(){return{min:0,max:this.options.categories.length}},reflow:function(t){this.box=t,this.reflowLabels()},lineBox:function(){return this.box},reflowLabels:function(){var t,i,n=this,e=this,o=e.labels,r=e.options.labels,s=r.skip||0,a=r.step||1,l=new Ni;for(t=0;t<o.length;t++)o[t].reflow(l),i=o[t].box,o[t].reflow(n.getSlot(s+t*a).adjacentBox(0,i.width(),i.height()))},intervals:function(t,i,n,e){var o,r,s,a,l,h,u,c,f;for(void 0===e&&(e=!1),o=this.options,r=o.categories.length,s=r/t||1,a=360/s,l=i||0,h=n||1,u=[],c=0,f=l;f<s;f+=h)c=o.reverse?360-f*a:f*a,c=Di(c,Dt)%360,e&&x(c,e)||u.push(c);return u},majorIntervals:function(){return this.intervals(1)},minorIntervals:function(){return this.intervals(.5)},intervalAngle:function(t){return(360+t+this.options.startAngle)%360},majorAngles:function(){var t=this;return b(this.majorIntervals(),function(i){return t.intervalAngle(i)})},createLine:function(){return[]},majorGridLineAngles:function(t){var i=this.options.majorGridLines;return this.gridLineAngles(t,1,i.skip,i.step)},minorGridLineAngles:function(t,i){var n=this.options,e=n.minorGridLines,o=n.majorGridLines,r=i?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,e.skip,e.step,r)},radiusCallback:function(t,i,n){var e,o,r,s;if(i.options.type!==ii)return e=Vi(360/(2*this.options.categories.length)),o=Math.cos(e)*t,r=this.majorAngles(),s=function(i){return!n&&x(i,r)?t:o}},createPlotBands:function(){var t,i,n,e,o,r,s,a=this,l=this.options.plotBands||[],h=this._plotbandGroup=new vt({zIndex:-1});for(t=0;t<l.length;t++)i=l[t],n=a.plotBandSlot(i),e=a.getSlot(i.from),o=i.from-Math.floor(i.from),n.startAngle+=o*e.angle,r=Math.ceil(i.to)-i.to,n.angle-=(r+o)*e.angle,s=qi.current.createRing(n,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}),h.append(s);this.appendVisual(h)},plotBandSlot:function(t){return this.getSlot(t.from,t.to-1)},getSlot:function(t,i){var n,e,o,r,s=this.options,a=s.justified,l=this.box,h=this.majorAngles(),u=h.length,c=360/u,f=t;return s.reverse&&!a&&(f=(f+1)%u),f=Ci(Math.floor(f),0,u-1),n=h[f],a&&(n-=c/2,n<0&&(n+=360)),e=Ci(Math.ceil(i||f),f,u-1),o=e-f+1,r=c*o,new Hi(l.center(),0,l.height()/2,n,r)},slot:function(t,i){var n=this.getSlot(t,i),e=n.startAngle+180,o=e+n.angle;return new yt.Arc([n.center.x,n.center.y],{startAngle:e,endAngle:o,radiusX:n.radius,radiusY:n.radius})},pointCategoryIndex:function(t){var i,n,e=this,o=this.options.categories.length,r=null;for(i=0;i<o;i++)if(n=e.getSlot(i),n.containsPoint(t)){r=i;break}return r}}),w(Yn,{startAngle:90,labels:{margin:p(10)},majorGridLines:{visible:!0},justified:!0}),Rt(Yn.prototype,Hn),Xn=fn.extend({init:function(t,i){fn.fn.init.call(this,t,i);var n=this.options;n.minorUnit=n.minorUnit||n.majorUnit/2},getDivisions:function(t){return En.prototype.getDivisions.call(this,t)-1},reflow:function(t){this.box=t,this.reflowLabels()},reflowLabels:function(){var t,i,n=this,e=this,o=e.options,r=e.labels,s=e.options.labels,a=s.skip||0,l=s.step||1,h=new Ni,u=this.intervals(o.majorUnit,a,l);for(t=0;t<r.length;t++)r[t].reflow(h),i=r[t].box,r[t].reflow(n.getSlot(u[t]).adjacentBox(0,i.width(),i.height()))},lineBox:function(){return this.box},intervals:function(t,i,n,e){var o,r,s,a,l,h,u;for(void 0===e&&(e=!1),o=this.options.min,r=this.getDivisions(t),s=[],a=i||0,l=n||1,h=a;h<r;h+=l)u=(360+o+h*t)%360,e&&x(u,e)||s.push(u);return s},majorIntervals:function(){return this.intervals(this.options.majorUnit)},minorIntervals:function(){return this.intervals(this.options.minorUnit)},intervalAngle:function(t){return(540-t-this.options.startAngle)%360},createLine:function(){return[]},majorGridLineAngles:function(t){var i=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,i.skip,i.step)},minorGridLineAngles:function(t,i){var n=this.options,e=n.minorGridLines,o=n.majorGridLines,r=i?this.intervals(n.majorUnit,o.skip,o.step):null;return this.gridLineAngles(t,n.minorUnit,e.skip,e.step,r)},plotBandSlot:function(t){return this.getSlot(t.from,t.to)},getSlot:function(t,i){var n,e=this,o=e.options,r=e.box,s=o.startAngle,a=Ci(t,o.min,o.max),l=Ci(i||a,a,o.max);return o.reverse&&(a*=-1,l*=-1),a=(540-a-s)%360,l=(540-l-s)%360,l<a&&(n=a,a=l,l=n),new Hi(r.center(),0,r.height()/2,a,l-a)},slot:function(t,i){var n,e,o,r,s,a,l;return void 0===i&&(i=t),n=this.options,e=360-n.startAngle,o=this.getSlot(t,i),r=Math.min(t,i),s=Math.max(t,i),n.reverse?(a=r,l=s):(a=360-s,l=360-r),a=(a+e)%360,l=(l+e)%360,new yt.Arc([o.center.x,o.center.y],{startAngle:a,endAngle:l,radiusX:o.radius,radiusY:o.radius})},getValue:function(t){var i=this.options,n=this.box.center(),e=t.x-n.x,o=t.y-n.y,r=Math.round(Ui(Math.atan2(o,e))),s=i.startAngle;return i.reverse||(r*=-1,s*=-1),(r+s+360)%360},valueRange:function(){return{min:0,max:2*Math.PI}}}),w(Xn,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:p(10)},majorGridLines:{color:Ht,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),Rt(Xn.prototype,Hn,{createPlotBands:Yn.prototype.createPlotBands,majorAngles:Yn.prototype.majorAngles,range:En.prototype.range,labelsCount:En.prototype.labelsCount,createAxisLabel:En.prototype.createAxisLabel}),qn={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t,i,n,e,o,r,s,a,l,h,u=this,c=this.options,f=c.majorGridLines.type,p=c.plotBands;for(void 0===p&&(p=[]),t=this.plotArea.polarAxis,i=t.majorAngles(),n=t.box.center(),e=this._plotbandGroup=new vt({zIndex:-1}),o=0;o<p.length;o++)r=p[o],s={fill:{color:r.color,opacity:r.opacity},stroke:{opacity:r.opacity}},a=u.getSlot(r.from,r.to,!0),l=new Hi(n,n.y-a.y2,n.y-a.y1,0,360),h=void 0,h=f===ii?qi.current.createRing(l,s):xt.fromPoints(u.plotBandPoints(l,i),s).close(),e.append(h);this.appendVisual(e)},plotBandPoints:function(t,i){var n,e=[],o=[],r=[t.center.x,t.center.y],s=new Mt(r,t.innerRadius),a=new Mt(r,t.radius);for(n=0;n<i.length;n++)e.push(s.pointAt(i[n]+180)),o.push(a.pointAt(i[n]+180));return e.reverse(),e.push(e[0]),o.push(o[0]),o.concat(e)},createGridLines:function(t){var i,n=this.options,e=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),s=[];return n.majorGridLines.visible&&(s=this.renderGridLines(r,e,o,n.majorGridLines)),n.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),Ri(s,this.renderGridLines(r,i,o,n.minorGridLines))),s},renderGridLines:function(t,i,n,e){var o,r,s,a,l,h,u,c={stroke:{width:e.width,color:e.color,dashType:e.dashType}},f=e.skip;for(void 0===f&&(f=0),o=e.step,void 0===o&&(o=0),r=this.gridLinesVisual(),s=f;s<i.length;s+=o)if(a=t.y-i[s],a>0)if(l=new Mt([t.x,t.y],a),e.type===ii)r.append(new mt.Circle(l,c));else{for(h=new xt(c),u=0;u<n.length;u++)h.lineTo(l.pointAt(n[u]+180));h.close(),r.append(h)}return r.children},getValue:function(t){var i,n,e,o,r,s,a,l=this.lineBox(),h=this.plotArea.polarAxis,u=h.majorAngles(),c=h.box.center(),f=t.distanceTo(c),p=f;return this.options.majorGridLines.type!==ii&&u.length>1&&(i=t.x-c.x,n=t.y-c.y,e=(Ui(Math.atan2(n,i))+540)%360,u.sort(function(t,i){return pt(t,e)-pt(i,e)}),o=pt(u[0],u[1])/2,r=pt(e,u[0]),s=90-o,a=180-r-s,p=f*(Math.sin(Vi(a))/Math.sin(Vi(s)))),this.axisType().prototype.getValue.call(this,new Fi(l.x1,l.y2-p))}},Kn=En.extend({radarMajorGridLinePositions:function(){return this.getTickPositions(this.options.majorUnit)},radarMinorGridLinePositions:function(){var t=this.options,i=0;return t.majorGridLines.visible&&(i=t.majorUnit),this.getTickPositions(t.minorUnit,i)},axisType:function(){return En}}),Rt(Kn.prototype,qn),Wn=Nn.extend({radarMajorGridLinePositions:function(){var t=[];return this.traverseMajorTicksPositions(function(i){t.push(i)},this.options.majorGridLines),t},radarMinorGridLinePositions:function(){var t=[];return this.traverseMinorTicksPositions(function(i){t.push(i)},this.options.minorGridLines),t},axisType:function(){return Nn}}),Rt(Wn.prototype,qn),Qn=.333,Jn=.01,Zn=bt.extend({init:function(t){this.closed=t},process:function(t){var i,n,e,o,r,s,a,l,h,u,c,f,p,d,m=this,g=t.slice(0),x=[],v=this.closed,b=g.length;if(b>2&&(this.removeDuplicates(0,g),b=g.length),b<2||2===b&&g[0].equals(g[1]))return x;for(i=g[0],n=g[1],e=g[2],x.push(new Tt(i));i.equals(g[b-1]);)v=!0,g.pop(),b--;if(2===b)return o=this.tangent(i,n,Ut,Bt),_i(x).controlOut(this.firstControlPoint(o,i,n,Ut,Bt)),x.push(new Tt(n,this.secondControlPoint(o,i,n,Ut,Bt))),x;for(v?(i=g[b-1],n=g[0],e=g[1],a=this.controlPoints(i,n,e),r=a[1],s=a[0]):(l=this.tangent(i,n,Ut,Bt),r=this.firstControlPoint(l,i,n,Ut,Bt)),h=r,u=0;u<=b-3;u++)m.removeDuplicates(u,g),b=g.length,u+3<=b&&(i=g[u],n=g[u+1],e=g[u+2],c=m.controlPoints(i,n,e),_i(x).controlOut(h),h=c[1],f=c[0],x.push(new Tt(n,f)));return v?(i=g[b-2],n=g[b-1],e=g[0],p=this.controlPoints(i,n,e),_i(x).controlOut(h),x.push(new Tt(n,p[0])),_i(x).controlOut(p[1]),x.push(new Tt(e,s))):(d=this.tangent(n,e,Ut,Bt),_i(x).controlOut(h),x.push(new Tt(e,this.secondControlPoint(d,n,e,Ut,Bt)))),x},removeDuplicates:function(t,i){for(;i[t+1]&&(i[t].equals(i[t+1])||i[t+1].equals(i[t+2]));)i.splice(t+1,1)},invertAxis:function(t,i,n){var e,o,r=!1;return t.x===i.x?r=!0:i.x===n.x?(i.y<n.y&&t.y<=i.y||n.y<i.y&&i.y<=t.y)&&(r=!0):(e=this.lineFunction(t,i),o=this.calculateFunction(e,n.x),t.y<=i.y&&n.y<=o||i.y<=t.y&&n.y>=o||(r=!0)),r},isLine:function(t,i,n){var e=this.lineFunction(t,i),o=this.calculateFunction(e,n.x);return t.x===i.x&&i.x===n.x||Di(o,1)===Di(n.y,1)},lineFunction:function(t,i){var n=(i.y-t.y)/(i.x-t.x),e=t.y-n*t.x;return[e,n]},controlPoints:function(t,i,n){var e,o,r,s,a,l,h=Ut,u=Bt,c=!1,f=!1;return this.isLine(t,i,n)?e=this.tangent(t,i,Ut,Bt):(o={x:this.isMonotonicByField(t,i,n,Ut),y:this.isMonotonicByField(t,i,n,Bt)},o.x&&o.y?(e=this.tangent(t,n,Ut,Bt),c=!0):(this.invertAxis(t,i,n)&&(h=Bt,u=Ut),o[h]?e=0:(r=n[u]<t[u]&&t[u]<=i[u]||t[u]<n[u]&&i[u]<=t[u]?dt((n[u]-t[u])*(i[h]-t[h])):-dt((n[h]-t[h])*(i[u]-t[u])),e=Jn*r,f=!0))),s=this.secondControlPoint(e,t,i,h,u),f&&(a=h,h=u,u=a),l=this.firstControlPoint(e,i,n,h,u),c&&(this.restrictControlPoint(t,i,s,e),this.restrictControlPoint(i,n,l,e)),[s,l]},restrictControlPoint:function(t,i,n,e){t.y<i.y?i.y<n.y?(n.x=t.x+(i.y-t.y)/e,n.y=i.y):n.y<t.y&&(n.x=i.x-(i.y-t.y)/e,n.y=t.y):n.y<i.y?(n.x=t.x-(t.y-i.y)/e,n.y=i.y):t.y<n.y&&(n.x=i.x+(t.y-i.y)/e,n.y=t.y)},tangent:function(t,i,n,e){var o,r=i[n]-t[n],s=i[e]-t[e];return o=0===r?0:s/r},isMonotonicByField:function(t,i,n,e){return n[e]>i[e]&&i[e]>t[e]||n[e]<i[e]&&i[e]<t[e]},firstControlPoint:function(t,i,n,e,o){var r=i[e],s=n[e],a=(s-r)*Qn;return this.point(r+a,i[o]+a*t,e,o)},secondControlPoint:function(t,i,n,e,o){var r=i[e],s=n[e],a=(s-r)*Qn;return this.point(s-a,n[o]-a*t,e,o)},point:function(t,i,n,e){var o=new yt.Point;return o[n]=t,o[e]=i,o},calculateFunction:function(t,i){var n,e=t.length,o=0;for(n=0;n<e;n++)o+=Math.pow(i,n)*t[n];return o}}),St.Gradients=$i,kendo.deepExtend(kendo.dataviz,{constants:hi,services:Mi,autoMajorUnit:Q,Point:Fi,Box:Ni,Ring:Hi,Sector:Yi,ShapeBuilder:qi,ShapeElement:Qi,ChartElement:Ki,BoxElement:Wi,RootElement:tn,FloatElement:nn,Text:on,TextBox:sn,Title:an,AxisLabel:ln,Axis:fn,Note:cn,CategoryAxis:An,DateCategoryAxis:Dn,DateValueAxis:On,NumericAxis:En,LogarithmicAxis:Nn,PolarAxis:Xn,RadarCategoryAxis:Yn,RadarNumericAxis:Kn,RadarLogarithmicAxis:Wn,CurveProcessor:Zn,rectToBox:j,addClass:n,removeClass:e,alignPathToPixel:o,clockwise:r,convertableToNumber:l,deepExtend:Rt,elementStyles:f,getSpacing:p,getTemplate:d,getter:Lt,grep:m,hasClasses:g,inArray:x,interpolateValue:v,InstanceObserver:Ti,isArray:i,isFunction:jt,isNumber:s,isObject:h,isString:a,map:b,mousewheelDelta:y,FontLoader:Oi,setDefaultOptions:w,sparseArrayLimits:M,styleValue:u,append:Ri,bindEvents:ji,Class:bt,defined:Li,deg:Ui,elementOffset:Bi,elementSize:Ai,eventElement:Ii,eventCoordinates:Pi,last:_i,limitValue:Ci,logToConsole:kendo.logToConsole,objectKey:zi,rad:Vi,round:Di,unbindEvents:Gi,valueOrDefault:Ei,absoluteDateDiff:B,addDuration:z,addTicks:A,ceilDate:D,dateComparer:G,dateDiff:E,dateEquals:F,dateIndex:H,duration:Y,floorDate:V,lteDateIndex:X,startOfWeek:P,toDate:I,parseDate:q,parseDates:K,toTime:O})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,i,n){(n||i)()}),function(t,define){define("dataviz/core/core.min",["dataviz/core/kendo-core.min"],t)}(function(){!function(t){var i=kendo.dataviz,n=i.services,e=kendo.drawing;i.ExportMixin={extend:function(t,i){if(!t.exportVisual)throw Error("Mixin target has no exportVisual method defined.");t.exportSVG=this.exportSVG,t.exportImage=this.exportImage,t.exportPDF=this.exportPDF,i||(t.svg=this.svg,t.imageDataURL=this.imageDataURL)},exportSVG:function(t){return e.exportSVG(this.exportVisual(),t)},exportImage:function(t){return e.exportImage(this.exportVisual(t),t)},exportPDF:function(t){return e.exportPDF(this.exportVisual(),t)},svg:function(){if(e.svg.Surface)return e.svg.exportGroup(this.exportVisual());throw Error("SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface")},imageDataURL:function(){var i,n,o;if(!kendo.support.canvas)return null;if(e.canvas.Surface)return i=t("<div />").css({display:"none",width:this.element.width(),height:this.element.height()}).appendTo(document.body),n=new e.canvas.Surface(i[0]),n.draw(this.exportVisual()),o=n._rootElement.toDataURL(),n.destroy(),i.remove(),o;throw Error("Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface")}},n.IntlService.register({format:function(t){return kendo.format.apply(null,[t].concat(Array.prototype.slice.call(arguments,1)))},toString:kendo.toString,parseDate:kendo.parseDate}),n.TemplateService.register({compile:kendo.template}),i.Point2D=i.Point,i.Box2D=i.Box,i.mwDelta=function(t){return i.mousewheelDelta(t.originalEvent)}}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(t,i,n){(n||i)()}),function(t,define){define("kendo.dataviz.core.min",["dataviz/core/kendo-core.min","dataviz/core/core.min"],t)}(function(){},"function"==typeof define&&define.amd?define:function(t,i,n){(n||i)()});
  //# sourceMappingURL=kendo.dataviz.core.min.js.map
  