/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. 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(e,define){define("util/main.min",["kendo.core.min"],e)}(function(){return function(){function e(e){return typeof e!==F}function t(e,t){var n=i(t);return L.round(e*n)/n}function i(e){return e?L.pow(10,e):1}function n(e,t,i){return L.max(L.min(e,i),t)}function o(e){return e*M}function r(e){return e/M}function a(e){return"number"==typeof e&&!isNaN(e)}function s(t,i){return e(t)?t:i}function l(e){return e*e}function c(e){var t,i=[];for(t in e)i.push(t+e[t]);return i.sort().join("")}function h(e){var t,i=2166136261;for(t=0;t<e.length;++t)i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24),i^=e.charCodeAt(t);return i>>>0}function u(e){return h(c(e))}function p(e){var t,i=e.length,n=z,o=O;for(t=0;t<i;t++)o=L.max(o,e[t]),n=L.min(n,e[t]);return{min:n,max:o}}function f(e){return p(e).min}function d(e){return p(e).max}function g(e){return x(e).min}function m(e){return x(e).max}function x(e){var t,i,n,o=z,r=O;for(t=0,i=e.length;t<i;t++)n=e[t],null!==n&&isFinite(n)&&(o=L.min(o,n),r=L.max(r,n));return{min:o===z?void 0:o,max:r===O?void 0:r}}function v(e){if(e)return e[e.length-1]}function y(e,t){return e.push.apply(e,t),e}function _(e){return E.template(e,{useWithBlock:!1,paramName:"d"})}function b(t,i){return e(i)&&null!==i?" "+t+"='"+i+"' ":""}function w(e){var t,i="";for(t=0;t<e.length;t++)i+=b(e[t][0],e[t][1]);return i}function A(t){var i,n,o="";for(i=0;i<t.length;i++)n=t[i][1],e(n)&&(o+=t[i][0]+":"+n+";");if(""!==o)return o}function k(e){return"string"!=typeof e&&(e+="px"),e}function S(e){var t,i,n=[];if(e)for(t=E.toHyphens(e).split("-"),i=0;i<t.length;i++)n.push("k-pos-"+t[i]);return n.join(" ")}function C(t){return""===t||null===t||"none"===t||"transparent"===t||!e(t)}function P(e){for(var t={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},i=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n="";e>0;)e<i[0]?i.shift():(n+=t[i[0]],e-=i[0]);return n}function T(e){var t,i,n,o,r;for(e=e.toLowerCase(),t={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},i=0,n=0,o=0;o<e.length;++o){if(r=t[e.charAt(o)],!r)return null;i+=r,r>n&&(i-=2*n),n=r}return i}function R(e){var t=Object.create(null);return function(){var i,n="";for(i=arguments.length;--i>=0;)n+=":"+arguments[i];return n in t?t[n]:t[n]=e.apply(this,arguments)}}function I(e){for(var t,i,n=[],o=0,r=e.length;o<r;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<r?(i=e.charCodeAt(o++),56320==(64512&i)?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),o--)):n.push(t);return n}function V(e){return e.map(function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}).join("")}function B(e,t){function i(e,i){for(var n=[],o=0,r=0,a=0;o<e.length&&r<i.length;)t(e[o],i[r])<=0?n[a++]=e[o++]:n[a++]=i[r++];return o<e.length&&n.push.apply(n,e.slice(o)),r<i.length&&n.push.apply(n,i.slice(r)),n}return e.length<2?e.slice():function n(e){var t,o,r;return e.length<=1?e:(t=Math.floor(e.length/2),o=e.slice(0,t),r=e.slice(t),o=n(o),r=n(r),i(o,r))}(e)}var L=Math,E=window.kendo,D=E.deepExtend,M=L.PI/180,z=Number.MAX_VALUE,O=-Number.MAX_VALUE,F="undefined",U=Date.now;U||(U=function(){return(new Date).getTime()}),D(E,{util:{MAX_NUM:z,MIN_NUM:O,append:y,arrayLimits:p,arrayMin:f,arrayMax:d,defined:e,deg:r,hashKey:h,hashObject:u,isNumber:a,isTransparent:C,last:v,limitValue:n,now:U,objectKey:c,round:t,rad:o,renderAttr:b,renderAllAttr:w,renderPos:S,renderSize:k,renderStyle:A,renderTemplate:_,sparseArrayLimits:x,sparseArrayMin:g,sparseArrayMax:m,sqr:l,valueOrDefault:s,romanToArabic:T,arabicToRoman:P,memoize:R,ucs2encode:V,ucs2decode:I,mergeSort:B}}),E.drawing.util=E.util,E.dataviz.util=E.util}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("util/text-metrics.min",["kendo.core.min","util/main.min"],e)}(function(){!function(e){function t(){return{width:0,height:0,baseline:0}}function i(e,t,i){return u.current.measure(e,t,i)}function n(e,t){var i=[];if(e.length>0&&document.fonts){try{i=e.map(function(e){return document.fonts.load(e)})}catch(n){r.logToConsole(n)}Promise.all(i).then(t,t)}else t()}var o=document,r=window.kendo,a=r.Class,s=r.util,l=s.defined,c=a.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var i=this,n=i._map,o={key:e,value:t};n[e]=o,i._head?(i._tail.newer=o,o.older=i._tail,i._tail=o):i._head=i._tail=o,i._length>=i._size?(n[i._head.key]=null,i._head=i._head.newer,i._head.older=null):i._length++},get:function(e){var t=this,i=t._map[e];if(i)return i===t._head&&i!==t._tail&&(t._head=i.newer,t._head.older=null),i!==t._tail&&(i.older&&(i.older.newer=i.newer,i.newer.older=i.older),i.older=t._tail,i.newer=null,t._tail.newer=i,t._tail=i),i.value}}),h=e("<div style='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: nowrap!important;' />")[0],u=a.extend({init:function(e){this._cache=new c(1e3),this._initOptions(e)},options:{baselineMarkerSize:1},measure:function(i,n,r){var a,c,u,p,f,d,g,m;if(!i)return t();if(a=s.objectKey(n),c=s.hashKey(i+a),u=this._cache.get(c),u)return u;p=t(),f=r?r:h,d=this._baselineMarker().cloneNode(!1);for(g in n)m=n[g],l(m)&&(f.style[g]=m);return e(f).text(i),f.appendChild(d),o.body.appendChild(f),(i+"").length&&(p.width=f.offsetWidth-this.options.baselineMarkerSize,p.height=f.offsetHeight,p.baseline=d.offsetTop+this.options.baselineMarkerSize),p.width>0&&p.height>0&&this._cache.put(c,p),f.parentNode.removeChild(f),p},_baselineMarker:function(){return e("<div class='k-baseline-marker' style='display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;' />")[0]}});u.current=new u,r.util.TextMetrics=u,r.util.LRUCache=c,r.util.loadFonts=n,r.util.measureText=i}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("util/base64.min",["util/main.min"],e)}(function(){return function(){function e(e){var i,n,o,a,s,l,c,h="",u=0;for(e=t(e);u<e.length;)i=e.charCodeAt(u++),n=e.charCodeAt(u++),o=e.charCodeAt(u++),a=i>>2,s=(3&i)<<4|n>>4,l=(15&n)<<2|o>>6,c=63&o,isNaN(n)?l=c=64:isNaN(o)&&(c=64),h=h+r.charAt(a)+r.charAt(s)+r.charAt(l)+r.charAt(c);return h}function t(e){var t,i,n="";for(t=0;t<e.length;t++)i=e.charCodeAt(t),i<128?n+=o(i):i<2048?(n+=o(192|i>>>6),n+=o(128|63&i)):i<65536&&(n+=o(224|i>>>12),n+=o(128|i>>>6&63),n+=o(128|63&i));return n}var i=window.kendo,n=i.deepExtend,o=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n(i.util,{encodeBase64:e,encodeUTF8:t})}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("mixins/observers.min",["kendo.core.min"],e)}(function(){return function(e){var t=Math,i=window.kendo,n=i.deepExtend,o=e.inArray,r={observers:function(){return this._observers=this._observers||[]},addObserver:function(e){return this._observers?this._observers.push(e):this._observers=[e],this},removeObserver:function(e){var t=this.observers(),i=o(e,t);return i!=-1&&t.splice(i,1),this},trigger:function(e,t){var i,n,o=this._observers;if(o&&!this._suspended)for(n=0;n<o.length;n++)i=o[n],i[e]&&i[e](t);return this},optionsChange:function(e){e=e||{},e.element=this,this.trigger("optionsChange",e)},geometryChange:function(){this.trigger("geometryChange",{element:this})},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=t.max((this._suspended||0)-1,0),this},_observerField:function(e,t){this[e]&&this[e].removeObserver(this),this[e]=t,t.addObserver(this)}};n(i,{mixins:{ObserversMixin:r}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()}),function(e,define){define("kendo.dataviz.chart.min",["kendo.color.min","kendo.data.min","kendo.dataviz.core.min","kendo.dataviz.themes.min","kendo.drawing.min","kendo.userevents.min"],e)}(function(){return function(e,t){function i(){return this}function n(){this._defaults={}}function o(e,t,i,n){var o,r,a=(n.x-i.x)*(e.y-i.y)-(n.y-i.y)*(e.x-i.x),s=(n.y-i.y)*(t.x-e.x)-(n.x-i.x)*(t.y-e.y);return 0!==s&&(r=a/s,o=new ui(e.x+r*(t.x-e.x),e.y+r*(t.y-e.y))),o}function r(e,t){var i,n,o,r=e.series,s=r.length,l=e.seriesDefaults,c=Xt({},e.seriesDefaults),h=t?Xt({},t.seriesDefaults):{},u=Xt({},h);for(a(c),a(u),i=0;i<s;i++)n=r[i].type||e.seriesDefaults.type,o=Xt({data:[]},u,h[n],{tooltip:e.tooltip},c,l[n]),r[i]._defaults=o,r[i]=Xt({},o,r[i])}function a(e){delete e.bar,delete e.column,delete e.rangeColumn,delete e.line,delete e.verticalLine,delete e.pie,delete e.donut,delete e.area,delete e.verticalArea,delete e.scatter,delete e.scatterLine,delete e.bubble,delete e.candlestick,delete e.ohlc,delete e.boxPlot,delete e.bullet,delete e.verticalBullet,delete e.polarArea,delete e.polarLine,delete e.radarArea,delete e.radarLine,delete e.waterfall}function s(e){var t,i,n,o,r=e.series,a=e.seriesColors||[];for(t=0;t<r.length;t++)i=r[t],n=a[t%a.length],i.color=i.color||n,o=i._defaults,o&&(o.color=o.color||n)}function l(e){var t;Et([nn,hr,vr,yr],function(){t=this+"Axes",e[t]&&(e[this+"Axis"]=e[t],delete e[t])})}function c(t,i){var n=(i||{}).axisDefaults||{};Et([nn,hr,vr,yr],function(){var i=this+"Axis",o=[].concat(t[i]),r=t.axisDefaults||{};o=e.map(o,function(e){var t=(e||{}).color,o=Xt({},n,n[i],r,r[i],{line:{color:t},labels:{color:t},title:{color:t}},e);return delete o[i],o}),t[i]=o.length>1?o:o[0]})}function h(e){var t,i=e.length,n=0;for(t=0;t<i;t++)n=Ot.max(n,e[t].data.length);return n}function u(e){return e*e}function p(e,t){if(null===t)return t;var i=Wt(e,!0);return i(t)}function f(e,t){if(null===t)return t;var i="_date_"+e,n=t[i];return n||(n=d(Wt(e,!0)(t)),t[i]=n),n}function d(e){var t,i;if(e instanceof Date)t=e;else if(typeof e===Yo)t=Nt.parseDate(e)||new Date(e);else if(e)if(Dt(e))for(t=[],i=0;i<e.length;i++)t.push(d(e[i]));else t=new Date(e);return t}function g(e){return Dt(e)?zt(e,g):e?d(e).getTime():t}function m(e,t,i,n){var o,r=e;return e&&(e=d(e),o=e.getHours(),i===_r?(r=new Date(e.getFullYear()+t,0,1),Nt.date.adjustDST(r,0)):i===so?(r=new Date(e.getFullYear(),e.getMonth()+t,1),Nt.date.adjustDST(r,o)):i===mr?(r=m(x(e,n),7*t,xn),Nt.date.adjustDST(r,o)):i===xn?(r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),Nt.date.adjustDST(r,o)):i===Hn?(e=new Date(e),e.setUTCMinutes(0,0,0),r=w(e,t*Qo)):i===ao?(r=w(e,t*Ko),r.getSeconds()>0&&r.setSeconds(0)):i===Eo?r=w(e,t*Zo):i===Do&&(r=w(e,t)),i!==Do&&r.getMilliseconds()>0&&r.setMilliseconds(0)),r}function x(e,t){var i=e.getDay(),n=0;if(!isNaN(i))for(t=t||0;i!==t;)0===i?i=6:i--,n++;return w(e,-n*$o)}function v(e,t,i){return e=d(e),m(e,0,t,i)}function y(e,t,i){return e=d(e),e&&v(e,t,i).getTime()===e.getTime()?e:m(e,1,t,i)}function _(e,t){return e.getTime()-t}function b(e,t){var i=e.getTime()-t,n=e.getTimezoneOffset()-t.getTimezoneOffset();return i-n*Ko}function w(e,t){return new Date(e.getTime()+t)}function A(e,t,i){var n;return n=i===_r?t.getFullYear()-e.getFullYear():i===so?12*A(e,t,_r)+t.getMonth()-e.getMonth():Ot.floor(i===xn?_(t,e)/$o:_(t,e)/ir[i])}function k(e,t,i,n){var o,r=d(e),a=d(t);return o=i==so?r.getMonth()-a.getMonth()+12*(r.getFullYear()-a.getFullYear())+S(r,new Date(r.getFullYear(),r.getMonth()),xn)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i==_r?r.getFullYear()-a.getFullYear()+k(r,new Date(r.getFullYear(),0),so,1)/12:i==xn||i==mr?S(r,a,i):_(r,t)/ir[i],o/n}function S(e,t,i){return b(e,t)/ir[i]}function C(e){return 1===e.length?e[0]:e}function P(e){var t,i,n,o=e.length;if(o>0)for(i=0;i<o;i++)n=e[i].contentBox(),t?t.wrap(n):t=n.clone();return t||ii()}function T(e,t){return e&&t?e.toLowerCase()===t.toLowerCase():e===t}function R(e,t){return e&&t?g(e)===g(t):e===t}function I(e,t){null!==t&&e.push(t)}function V(e,t){for(var i,n,o=0,r=t.length-1;o<=r;)if(i=Ot.floor((o+r)/2),n=t[i],n<e)o=i+1;else{if(!(n>e)){for(;R(t[i-1],e);)i--;return i}r=i-1}return t[i]<=e?i:i-1}function B(e){return"number"==typeof e&&!isNaN(e)}function L(e){var t,i,n=e.length,o=0;for(t=0;t<n;t++)i=e[t],B(i)&&o++;return o}function E(e){return L(e)===e.length}function D(e){var t,i,n,o={};for(t=0;t<e.length;t++)i=e[t],n=i.options.name,n&&(o[n]=i.range());return o}function M(e,t,i,n){var o,r,a,s,l,c=!1;if(i=i||{},a=i.excluded=i.excluded||[],s=i.defaults=i.defaults||{},l=i.depth=i.depth||0,!(l>to)){for(o in e)!Ai(o,i.excluded)&&e.hasOwnProperty(o)&&(r=e[o],Zt(r)?(c=!0,n||(e[o]=Mi(r(t),s[o]))):typeof r===vo&&(n||(i.defaults=s[o]),i.depth++,c=M(r,t,i,n)||c,i.depth--));return c}}function z(e,i){var n,o,r,a=[],s=e.groupNameTemplate,l=i.length;if(0===l)return r=Xt({},e),r.visibleInLegend=!1,[r];for(Ri(s)?(Nt.logToConsole("'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"),s&&(n=Kt(s))):(n=Kt(e.name||""),0===n._slotCount&&(n=Kt(Ri(e.name)?"#= group.value #: #= series.name #":"#= group.value #"))),o=0;o<l;o++)r=Xt({},e),Zt(r.color)||(r.color=t),r._groupIx=o,r._groupValue=i[o].value,a.push(r),n&&(r.name=n({series:r,group:i[o]}));return a}function O(e,t){var i,n,o=[];for(t=[].concat(t),i=0;i<e.length;i++)n=e[i],Ai(n.type,t)&&o.push(n);return o}function F(t,i){if(t instanceof Date){for(var n=0,o=i.length;n<o;n++)if(R(i[n],t))return n;return-1}return e.inArray(t,i)}function U(e,t){t=t||_i;for(var i=1,n=e.length;i<n;i++)if(t(e[i],e[i-1])<0){e.sort(t);break}return e}function H(e,t){var i,n=U(e,t),o=n.length,r=o>0?[n[0]]:[];for(t=t||_i,i=1;i<o;i++)0!==t(n[i],Ii(r))&&r.push(n[i]);return r}function N(e,t){var i=e.type,n=t instanceof Date;return!i&&n||T(i,mn)}function j(e){var t,i,n,o,r=[],a=e.length;for(t=0;t<a;t++)for(i=e[t],o=i.length,n=0;n<o;n++)r[n]=r[n]||[],r[n].push(i[n]);return r}function G(e,t){if(e.indexOf(".")>-1)for(var i,n=e.split("."),o="";n.length>1;)o+=n.shift(),i=Nt.getter(o)(t)||{},Nt.setter(o)(t,i),o+="."}function q(e){var t,i,n,o=e.data,r=0;for(t=0;t<o.length;t++)i=oe.current.bindPoint(e,t),n=i.valueFields.value,typeof n===Yo&&(n=parseFloat(n)),B(n)&&i.fields.visible!==!1&&(r+=Ot.abs(n));return r}function Y(e){var t=e.overlay;return t&&t.gradient&&"none"!=t.gradient}function X(e){for(var t=0;t<e.length;t++)if(Ri(e[t].zIndex))return!0}function W(){this._defaultPrevented=!0}function Z(e,t){if(e)for(var i=0;i<e.length;i++)if(e[i].category===t)return[e[i]]}function K(e){return Ri(e)&&null!==e}function Q(e){var t,i,n={};for(i=0;i<e.length;i++)t=e[i],t.axis.options.name&&(n[t.axis.options.name]={min:t.range.min,max:t.range.max});return n}function $(e,t){var i=(t||"").toLowerCase(),n="none"==i&&!(e.ctrlKey||e.shiftKey||e.altKey)||e[i+"Key"];return n}function J(e,t){var i=[];ee(e,i),Nt.util.loadFonts(i,t)}function ee(e,t,i){var n=5;i=i||{depth:0},!e||i.depth>n||!document.fonts||Object.keys(e).forEach(function(n){var o=e[n];"dataSource"!==n&&"$"!==n[0]&&o&&("font"===n?t.push(o):"object"==typeof o&&(i.depth++,ee(o,t,i),i.depth--))})}function te(e,t){var i,n,o,r;for(o in t)i=t[o],n=e[o],Ri(n)&&(r=null===i,r||!Ri(i)?(delete e[o],r&&delete t[o]):n&&Mt(i)&&Mt(i)&&te(n,i))}function ie(e,t){var i,n;for(i=0;i<e.length;i++)if(n=e[i],n&&n.pane===t)return n}var ne,oe,re,ae,se,le,ce,he,ue,pe,fe,de,ge,me,xe,ve,ye,_e,be,we,Ae,ke,Se,Ce,Pe,Te,Re,Ie,Ve,Be,Le,Ee,De,Me,ze,Oe,Fe,Ue,He,Ne,je,Ge,qe,Ye,Xe,We,Ze,Ke,Qe,$e,Je,et,tt,it,nt,ot,rt,at,st,lt,ct,ht,ut,pt,ft,dt,gt,mt,xt,vt,yt,_t,bt,wt,At,kt,St,Ct,Pt,Tt,Rt,It,Vt,Bt,Lt,Et=e.each,Dt=e.isArray,Mt=e.isPlainObject,zt=e.map,Ot=Math,Ft=e.noop,Ut=e.extend,Ht=e.proxy,Nt=window.kendo,jt=Nt.Class,Gt=Nt.Observable,qt=Nt.data.DataSource,Yt=Nt.ui.Widget,Xt=Nt.deepExtend,Wt=Nt.getter,Zt=Nt.isFunction,Kt=Nt.template,Qt=Nt._outerWidth,$t=Nt._outerHeight,Jt=Nt.dataviz,ei=Jt.Axis,ti=Jt.AxisLabel,ii=Jt.Box2D,ni=Jt.BoxElement,oi=Jt.ChartElement,ri=Nt.drawing.Color,ai=Jt.CurveProcessor,si=Jt.FloatElement,li=Jt.Note,ci=Jt.LogarithmicAxis,hi=Jt.NumericAxis,ui=Jt.Point2D,pi=Jt.RootElement,fi=Jt.Ring,di=Jt.ShapeElement,gi=Jt.ShapeBuilder,mi=Jt.TextBox,xi=Jt.Title,vi=Jt.alignPathToPixel,yi=Jt.autoFormat,_i=Jt.dateComparer,bi=Jt.eventTargetElement,wi=Jt.getSpacing,Ai=Jt.inArray,ki=Jt.interpolateValue,Si=Jt.mwDelta,Ci=Jt.round,Pi=Nt.util,Ti=Pi.append,Ri=Pi.defined,Ii=Pi.last,Vi=Pi.limitValue,Bi=Pi.sparseArrayLimits,Li=Pi.sparseArrayMin,Ei=Pi.sparseArrayMax,Di=Pi.renderTemplate,Mi=Pi.valueOrDefault,zi=Jt.geometry,Oi=Jt.drawing,Fi=".kendoChart",Ui="above",Hi="area",Ni="auto",ji="fit",Gi=Jt.AXIS_LABEL_CLICK,qi="bar",Yi=6,Xi=.8,Wi="below",Zi="#000",Ki="both",Qi="bottom",$i="boxPlot",Ji="bubble",en="bullet",tn="candlestick",nn="category",on="center",rn="change",an="circle",sn="contextmenu"+Fi,ln=Jt.CLIP,cn="color",hn="column",un=Jt.COORD_PRECISION,pn="cross",fn="k-",dn="custom",gn="dataBound",mn="date",xn="days",vn=Jt.DEFAULT_FONT,yn=Jt.DEFAULT_HEIGHT,_n=Jt.DEFAULT_PRECISION,bn=Jt.DEFAULT_WIDTH,wn=4,An="donut",kn=50,Sn="drag",Cn="dragEnd",Pn="dragStart",Tn="errorLow",Rn="errorHigh",In="xErrorLow",Vn="xErrorHigh",Bn="yErrorLow",Ln="yErrorHigh",En="fadeIn",Dn="first",Mn="from",zn="funnel",On="glass",Fn="horizontal",Un="horizontalWaterfall",Hn="hours",Nn=Jt.INITIAL_ANIMATION_DURATION,jn="insideBase",Gn="insideEnd",qn="interpolate",Yn="leave",Xn="left",Wn="legendItemClick",Zn="legendItemHover",Kn="line",Qn=8,$n="linear",Jn="log",eo="max",to=5,io=Number.MAX_VALUE,no="min",oo=.01,ro=-Number.MAX_VALUE,ao="minutes",so="months",lo="mouseleave"+Fi,co="mousemove.tracking",ho="mousemove"+Fi,uo=20,po=150,fo="DOMMouseScroll"+Fi+" mousewheel"+Fi,go=Jt.NOTE_CLICK,mo=Jt.NOTE_HOVER,xo="noteText",vo="object",yo="ohlc",_o="outsideEnd",bo="pie",wo=70,Ao="plotAreaClick",ko="plotAreaHover",So="pointer",Co="rangeBar",Po="rangeColumn",To="render",Ro="right",Io="roundedBevel",Vo="roundedGlass",Bo="scatter",Lo="scatterLine",Eo="seconds",Do="milliseconds",Mo="selectStart",zo="select",Oo="selectEnd",Fo="seriesClick",Uo="seriesHover",Ho=Nt.support.browser.msie&&10===Nt.support.browser.version?.001:0,No="step",jo="smooth",Go="stderr",qo="stddev",Yo="string",Xo="summary",Wo=1,Zo=1e3*Wo,Ko=60*Zo,Qo=60*Ko,$o=24*Qo,Jo=7*$o,er=31*$o,tr=365*$o,ir={years:tr,months:er,weeks:Jo,days:$o,hours:Qo,minutes:Ko,seconds:Zo,milliseconds:Wo},nr="to",or="top",rr=150,ar=5,sr=100,lr=100,cr="chart-tooltip-inverse",hr="value",ur="verticalArea",pr="verticalBoxPlot",fr="verticalBullet",dr="verticalLine",gr="waterfall",mr="weeks",xr="#fff",vr="x",yr="y",_r="years",br="zero",wr=3,Ar="zoomStart",kr="zoom",Sr="zoomEnd",Cr=[Do,Eo,ao,Hn,xn,mr,so,_r],Pr=[qi,hn,yo,tn,$i,pr,en,Po,Co,gr,Un],Tr={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"},Rr=Yt.extend({init:function(e,i){var n,o,r=this;Nt.destroy(e),Yt.fn.init.call(r,e),r.element.addClass(fn+this.options.name.toLowerCase()).css("position","relative"),i&&(o=i.dataSource,i.dataSource=t),n=Xt({},r.options,i),r._originalOptions=Xt({},n),r._initTheme(n),r._initSurface(),r.bind(r.events,r.options),r.wrapper=r.element,i&&(i.dataSource=o),r._initDataSource(i),Nt.notify(r,Jt.ui)},_initTheme:function(i){var n,o=this,r=Jt.ui.themes||{},a=i.theme,c=r[a]||r[a.toLowerCase()],h=a&&c?c.chart:{},u=[],p=i.series||[];for(n=0;n<p.length;n++)u.push(e.extend({},p[n]));i.series=u,l(i),o._applyDefaults(i,h),null===i.seriesColors&&(i.seriesColors=t),o.options=Xt({},h,i),s(o.options)},_initDataSource:function(e){var t=this,i=(e||{}).dataSource;t._dataChangeHandler=Ht(t._onDataChanged,t),t.dataSource=qt.create(i).bind(rn,t._dataChangeHandler),t._bindCategories(),i&&(t._hasDataSource=!0),J(e,function(){t._redraw(),t._attachEvents()}),i&&t.options.autoBind&&t.dataSource.fetch()},setDataSource:function(e){var t=this;t.dataSource.unbind(rn,t._dataChangeHandler),t.dataSource=e=qt.create(e),t._hasDataSource=!0,t._hasData=!1,e.bind(rn,t._dataChangeHandler),t.options.autoBind&&e.fetch()},events:[gn,Fo,Uo,Gi,Wn,Zn,Ao,ko,Pn,Sn,Cn,Ar,kr,Sr,Mo,zo,Oo,go,mo,To],items:function(){return e()},options:{name:"Chart",renderAs:"",theme:"default",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},autoBind:!0,seriesDefaults:{type:hn,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},refresh:function(){var e=this;e._applyDefaults(e.options),s(e.options),e._bindSeries(),e._bindCategories(),e.trigger(gn),e._redraw()},getSize:function(){return Nt.dimensions(this.element)},_resize:function(){var e=this.options.transitions;this.options.transitions=!1,this._redraw(),this.options.transitions=e},redraw:function(e){var t,i,n=this;n._applyDefaults(n.options),s(n.options),e?(i=n._model._plotArea,t=i.findPane(e),i.redraw(t)):n._redraw()},getAxis:function(e){var t,i=this._plotArea.axes;for(t=0;t<i.length;t++)if(i[t].options.name===e)return new Bt(i[t])},findAxisByName:function(e){return this.getAxis(e)},plotArea:function(){return new It(this._plotArea)},findPaneByName:function(e){var t,i=this._plotArea.panes;for(t=0;t<i.length;t++)if(i[t].options.name===e)return new Vt(this,i[t])},findPaneByIndex:function(e){var t=this._plotArea.panes;if(t[e])return new Vt(this,t[e])},findSeries:function(e){var t,i=this._plotArea,n=i.srcSeries||i.series;for(t=0;t<n.length;t++)if(e(n[t]))return new Lt(this,n[t])},findSeriesByName:function(e){return this._createSeries({name:e})},findSeriesByIndex:function(e){return this._createSeries({index:e})},_createSeries:function(e){var t=this._seriesOptions(e);if(t)return new Lt(this,t)},_seriesOptions:function(e){var t,i,n=this._plotArea,o=n.srcSeries||n.series;if(Ri(e.index))t=o[e.index];else if(Ri(e.name))for(i=0;i<o.length;i++)if(o[i].name===e.name){t=o[i];break}return t},toggleHighlight:function(e,t){var i,n,o,r=this._plotArea,a=(r.srcSeries||r.series||[])[0];Nt.isFunction(t)?o=r.filterPoints(t):(Mt(t)?(i=t.series,n=t.category):i=n=t,o=a.type===An?Z(r.pointsBySeriesName(i),n):a.type===bo||a.type===zn?Z((r.charts[0]||{}).points,n):r.pointsBySeriesName(i)),o&&this._togglePointsHighlight(e,o)},_togglePointsHighlight:function(e,t){var i,n=this._highlight;for(i=0;i<t.length;i++)n.togglePointHighlight(t[i],e)},showTooltip:function(e){var t,i,n,o=this._sharedTooltip(),r=this._tooltip,a=this._plotArea;Nt.isFunction(e)?(t=a.findPoint(e),t&&o&&(i=t.categoryIx)):o&&Ri(e)&&(i=a.categoryAxis.categoryIndex(e)),o?i>=0&&(n=this._plotArea.pointsByCategoryIndex(i),r.showAt(n)):t&&r.show(t)},hideTooltip:function(){this._tooltip.hide()},_initSurface:function(){var e=this.surface,t=this._surfaceWrap(),i=this.options.chartArea;i.width&&t.css("width",i.width),i.height&&t.css("height",i.height),e&&e.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Oi.Surface.create(t,{type:this.options.renderAs}))},_surfaceWrap:function(){return this.element},_redraw:function(){var e,t=this,i=t._getModel();t._destroyView(),t._model=i,t._plotArea=i._plotArea,i.renderVisual(),this.options.transitions!==!1&&i.traverse(function(e){e.animation&&e.animation.setup()}),t._initSurface(),t.surface.draw(i.visual),this.options.transitions!==!1&&i.traverse(function(e){e.animation&&e.animation.play()}),t._tooltip=t._createTooltip(),t._highlight=new vt(e),t._setupSelection(),t._createPannable(),t._createZoomSelection(),t._createMousewheelZoom(),t._hasDataSource&&!t._hasData&&t.options.autoBind||t.trigger(To)},exportVisual:function(e){var t,i,n,o;return e&&(e.width||e.height)?(i=this.options.chartArea,n=this._originalOptions.chartArea,Xt(i,e),o=this._getModel(),i.width=n.width,i.height=n.height,o.renderVisual(),t=o.visual):t=this.surface.exportVisual(),t},_sharedTooltip:function(){var e=this,t=e.options;return e._plotArea instanceof ut&&t.tooltip.shared},_createPannable:function(){var e=this.options;e.pannable!==!1&&(this._pannable=new Ct(this._plotArea,e.pannable))},_createZoomSelection:function(){var e=this.options.zoomable,t=(e||{}).selection;e!==!1&&t!==!1&&(this._zoomSelection=new Pt(this,t))},_createMousewheelZoom:function(){var e=this.options.zoomable,t=(e||{}).mousewheel;e!==!1&&t!==!1&&(this._mousewheelZoom=new Tt(this,t))},_createTooltip:function(){var e,t=this,i=t.options,n=t.element;return e=t._sharedTooltip()?new bt(n,t._plotArea,i.tooltip):new _t(n,i.tooltip),e.bind(Yn,Ht(t._tooltipleave,t)),e},_tooltipleave:function(){var e=this,t=e._plotArea,i=e._highlight;t.hideCrosshairs(),i.hide()},_applyDefaults:function(e,t){c(e,t),r(e,t)},_getModel:function(){var e,t=this,i=t.options,n=new pi(t._modelOptions());return n.chart=t,xi.buildTitle(i.title,n),e=n._plotArea=t._createPlotArea(),i.legend.visible&&n.append(new le(e.options.legend)),n.append(e),n.reflow(),n},_modelOptions:function(){var e=this,t=e.options,i=e.element,n=Ot.floor(i.height()),o=Ot.floor(i.width());return e._size=null,Xt({width:o||bn,height:n||yn,transitions:t.transitions},t.chartArea)},_createPlotArea:function(e){var t=this,i=t.options;return ne.current.create(e?[]:i.series,i)},_setupSelection:function(){var e,t,i,n,o,r,a=this,s=a._plotArea,l=s.axes,c=a._selections=[];for(a._selectStartHandler||(a._selectStartHandler=Ht(a._selectStart,a),a._selectHandler=Ht(a._select,a),a._selectEndHandler=Ht(a._selectEnd,a)),t=0;t<l.length;t++)i=l[t],r=i.options,i instanceof ce&&r.select&&!r.vertical&&(n=0,o=r.categories.length-1,i instanceof he&&(n=r.categories[n],o=r.categories[o]),r.justified||(i instanceof he?o=m(o,1,r.baseUnit,r.weekStartDay):o++),e=new St(a,i,Xt({min:n,max:o},r.select)),e.bind(Mo,a._selectStartHandler),e.bind(zo,a._selectHandler),e.bind(Oo,a._selectEndHandler),c.push(e))},_selectStart:function(e){return this.trigger(Mo,e)},_select:function(e){return this.trigger(zo,e)},_selectEnd:function(e){return this.trigger(Oo,e)},_attachEvents:function(){var e=this,t=e.element,i=e.surface;i.bind("mouseenter",Ht(e._mouseover,e)),i.bind("mouseleave",Ht(e._mouseout,e)),t.on(sn,Ht(e._click,e)),t.on(fo,Ht(e._mousewheel,e)),t.on(lo,Ht(e._mouseleave,e)),e._mousemove=Nt.throttle(Ht(e._mousemove,e),uo),e._shouldAttachMouseMove()&&t.on(ho,e._mousemove),Nt.UserEvents&&(e._userEvents=new Nt.UserEvents(t,{global:!0,multiTouch:!0,fastTap:!0,tap:Ht(e._tap,e),start:Ht(e._start,e),move:Ht(e._move,e),end:Ht(e._end,e),gesturestart:Ht(e._gesturestart,e),gesturechange:Ht(e._gesturechange,e),gestureend:Ht(e._gestureend,e)}))},_gesturestart:function(e){this._mousewheelZoom&&(this._gestureDistance=e.distance,this._unsetActivePoint(),this.surface.suspendTracking())},_gestureend:function(){this._zooming&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(Sr,{}))},_gesturechange:function(e){var t,i,n,o,r=this,a=r._mousewheelZoom;a&&(e.preventDefault(),t=r._gestureDistance,i=-e.distance/t+1,Ot.abs(i)>=.1&&(i=Ot.round(10*i),r._gestureDistance=e.distance,n={delta:i,axisRanges:D(r._plotArea.axes),originalEvent:e},!r._zooming&&r.trigger(Ar,n)||(r._zooming||(r._zooming=!0),o=n.axisRanges=a.updateRanges(i),o&&!r.trigger(kr,n)&&a.zoom())))},_mouseout:function(e){if(e.element){var t=this._drawingChartElement(e.element,e);t&&t.leave&&t.leave(this,e.originalEvent)}},_start:function(e){var t=this,i=t._events,n=t._eventCoordinates(e);t._plotArea.backgroundContainsPoint(n)&&(Ri(i[Pn]||i[Sn]||i[Cn])&&t._startNavigation(e,n,Pn),t._pannable&&t._pannable.start(e)&&(this.surface.suspendTracking(),this._unsetActivePoint()),t._zoomSelection&&t._zoomSelection.start(e)&&this.trigger(Ar,{axisRanges:D(this._plotArea.axes),originalEvent:e}))},_move:function(e){var t,i,n,o,r,a,s=this,l=s._navState,c=s._pannable,h={};if(c)e.preventDefault(),h=c.move(e),h&&!s.trigger(Sn,{axisRanges:h,originalEvent:e})&&c.pan();else if(l){for(e.preventDefault(),t=l.axes,i=0;i<t.length;i++)n=t[i],o=n.options.name,o&&(r=n.options.vertical?e.y:e.x,a=r.startLocation-r.location,0!==a&&(h[n.options.name]=n.translateRange(a)));l.axisRanges=h,s.trigger(Sn,{axisRanges:h,originalEvent:e})}s._zoomSelection&&s._zoomSelection.move(e)},_end:function(e){var t,i=this._pannable;i&&i.end(e)?(this.surface.resumeTracking(),this.trigger(Cn,{axisRanges:D(this._plotArea.axes),originalEvent:e})):this._endNavigation(e,Cn),this._zoomSelection&&(t=this._zoomSelection.end(e),t&&!this.trigger(kr,{axisRanges:t,originalEvent:e})&&(this._zoomSelection.zoom(),this.trigger(Sr,{axisRanges:t,originalEvent:e})))},_mousewheel:function(e){var t,i,n,o,r,a,s,l=this,c=e.originalEvent,h=Si(e),u=l._navState,p={},f=l._mousewheelZoom,d=l._eventCoordinates(c);if(l._plotArea.backgroundContainsPoint(d))if(f)s={delta:h,axisRanges:D(this._plotArea.axes),originalEvent:e},!l._zooming&&l.trigger(Ar,s)||(e.preventDefault(),l._zooming||(l._unsetActivePoint(),l.surface.suspendTracking(),l._zooming=!0),l._mwTimeout&&clearTimeout(l._mwTimeout),s.axisRanges=p=f.updateRanges(h),p&&!l.trigger(kr,s)&&f.zoom(),l._mwTimeout=setTimeout(function(){l.trigger(Sr,s),l._zooming=!1,l.surface&&l.surface.resumeTracking()},po));else if(u||(t=l._startNavigation(c,d,Ar),t||(u=l._navState)),u){for(i=u.totalDelta||h,u.totalDelta=i+h,n=l._navState.axes,o=0;o<n.length;o++)r=n[o],a=r.options.name,a&&(p[a]=r.scaleRange(-i));l.trigger(kr,{delta:h,axisRanges:p,originalEvent:e}),l._mwTimeout&&clearTimeout(l._mwTimeout),l._mwTimeout=setTimeout(function(){l._endNavigation(e,Sr)},po)}},_startNavigation:function(e,t,i){var n,o,r=this,a=r._model._plotArea,s=a.findPointPane(t),l=a.axes.slice(0);s&&(o=D(l),n=r.trigger(i,{axisRanges:o,originalEvent:e}),n?r._userEvents.cancel():(r._suppressHover=!0,r._unsetActivePoint(),r._navState={axisRanges:o,pane:s,axes:l}))},_endNavigation:function(e,t){var i=this;i._navState&&(i.trigger(t,{axisRanges:i._navState.axisRanges,originalEvent:e}),i._suppressHover=!1,i._navState=null)},_getChartElement:function(e,t){var i=this.surface.eventTarget(e);if(i)return this._drawingChartElement(i,e,t)},_drawingChartElement:function(e,t,i){for(var n;e&&!n;)n=e.chartElement,e=e.parent;if(n)return n.aliasFor&&(n=n.aliasFor(t,this._eventCoordinates(t))),i&&(n=n.closest(i)),n},_eventCoordinates:function(e){var t=this,i=Ri((e.x||{}).client),n=i?e.x.client:e.clientX,o=i?e.y.client:e.clientY;return t._toModelCoordinates(n,o)},_toModelCoordinates:function(t,i){var n=this.element,o=n.offset(),r=parseInt(n.css("paddingLeft"),10),a=parseInt(n.css("paddingTop"),10),s=e(window);return new ui(t-o.left-r+s.scrollLeft(),i-o.top-a+s.scrollTop())},_tap:function(e){var t=this,i=t.surface.eventTarget(e),n=t._drawingChartElement(i,e);t._activePoint===n?t._propagateClick(n,e):(t._startHover(i,e)||t._unsetActivePoint(),t._propagateClick(n,e)),t._supressMouseleave=!0,setTimeout(function(){t._supressMouseleave=!1},0)},_click:function(e){var t=this,i=t._getChartElement(e);t._propagateClick(i,e)},_propagateClick:function(e,t){for(;e;)e.click&&e.click(this,t),e=e.parent},_startHover:function(e,i){var n,o=this,r=o._drawingChartElement(e,i),a=o._tooltip,s=o._highlight,l=o.options.tooltip;if(!o._suppressHover&&s&&!s.isHighlighted(r)&&!o._sharedTooltip())return n=o._drawingChartElement(e,i,function(e){return e.hover&&!(e instanceof ct)}),n&&!n.hover(o,i)?(o._activePoint=n,l=Xt({},l,n.options.tooltip),l.visible&&a.show(n),s.show(n),n):t},_mouseover:function(t){var i=this,n=i._startHover(t.element,t.originalEvent);n&&n.tooltipTracking&&e(document).on(co,Ht(i._mouseMoveTracking,i))},_mouseMoveTracking:function(t){var i,n,o=this,r=o.options,a=o._tooltip,s=o._highlight,l=o._eventCoordinates(t),c=o._activePoint;o._plotArea.box.containsPoint(l)?c&&c.tooltipTracking&&c.series&&c.parent.getNearestPoint&&(n=c.parent.getNearestPoint(l.x,l.y,c.seriesIx),n&&n!=c&&(n.hover(o,t),o._activePoint=n,i=Xt({},r.tooltip,c.options.tooltip),i.visible&&a.show(n),s.show(n))):(e(document).off(co),o._unsetActivePoint())},_mousemove:function(e){var t=this._eventCoordinates(e);this._trackCrosshairs(t),
this._plotArea.hover&&this._plotArea.hover(this,e),this._sharedTooltip()&&this._trackSharedTooltip(t,e)},_trackCrosshairs:function(e){var t,i,n=this._plotArea.crosshairs;for(t=0;t<n.length;t++)i=n[t],i.box.containsPoint(e)?i.showAt(e):i.hide()},_trackSharedTooltip:function(t,i){var n,o,r,a,s=this,l=s.options,c=s._plotArea,h=c.categoryAxis,u=s._tooltip,p=l.tooltip,f=s._highlight;c.box.containsPoint(t)&&(n=h.pointCategoryIndex(t),n!==s._tooltipCategoryIx&&(o=c.pointsByCategoryIndex(n),r=e.map(o,function(e){return e.eventArgs(i)}),a=r[0]||{},a.categoryPoints=r,o.length>0&&!this.trigger(Uo,a)?(p.visible&&u.showAt(o,t),f.show(o)):u.hide(),s._tooltipCategoryIx=n))},_mouseleave:function(t){var i=this,n=i._plotArea,o=i._tooltip,r=i._highlight,a=t.relatedTarget;a&&e(a).closest(o.element).length||i._supressMouseleave||(i._mousemove.cancel(),n.hideCrosshairs(),r.hide(),setTimeout(Ht(o.hide,o),lr),i._tooltipCategoryIx=null)},_unsetActivePoint:function(){var e=this,t=e._tooltip,i=e._highlight;e._activePoint=null,t&&t.hide(),i&&i.hide()},_onDataChanged:function(e){var t,i,n=this,o=n.options,r=n._sourceSeries||o.series,a=r.length,l=n.dataSource.view(),c=(n.dataSource.group()||[]).length>0,h=[];for(t=0;t<a;t++)i=r[t],n._isBindable(i)&&c?(Ti(h,z(i,l)),this._applyGroupVisibleState(h,e)):h.push(i||[]);n._sourceSeries=r,o.series=h,s(n.options),n._bindSeries(),n._bindCategories(),n._hasData=!0,n._deferRedraw()},_applyGroupVisibleState:function(e,t){var i,n;if(t&&t.action)for(i=this._groupVisibleState=this._groupVisibleState||{},n=0;n<e.length;n++)i[e[n]._groupValue]===!1&&(e[n].visible=!1);else delete this._groupVisibleState},_saveGroupVisibleState:function(e){Ri(e._groupValue)&&(this._groupVisibleState||(this._groupVisibleState={}),this._groupVisibleState[e._groupValue]=e.visible)},_deferRedraw:function(){var e=this;Nt.support.vml?(e._clearRedrawTimeout(),e._redrawTimeout=setTimeout(function(){e.surface&&(e.trigger(gn),e._redraw())},0)):(e.trigger(gn),e._redraw())},_clearRedrawTimeout:function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},_bindSeries:function(){var e,t,i,n,o=this,r=o.dataSource.view(),a=o.options.series,s=a.length;for(e=0;e<s;e++)t=a[e],o._isBindable(t)&&(i=t._groupIx,n=Ri(i)?(r[i]||{}).items:r,t.autoBind!==!1&&(t.data=n))},_bindCategories:function(){var e,t,i=this,n=i.dataSource.view()||[],o=(i.dataSource.group()||[]).length>0,r=n,a=i.options,s=[].concat(a.categoryAxis);for(o&&n.length&&(r=n[0].items),e=0;e<s.length;e++)t=s[e],t.autoBind!==!1&&i._bindCategoryAxis(t,r,e)},_bindCategoryAxis:function(e,t,i){var n,o,r,a=(t||[]).length;if(e.field)for(e.categories=[],n=0;n<a;n++)r=t[n],o=p(e.field,r),0===n?(e.categories=[o],e.dataItems=[r]):(e.categories.push(o),e.dataItems.push(r));else this._bindCategoryAxisFromSeries(e,i)},_bindCategoryAxisFromSeries:function(e,t){var i,n,o,r,a,s,l,c,h,u,d,g=this,m=[],x=g.options.series,v=x.length,y={};for(n=0;n<v;n++)if(o=x[n],r=o.categoryAxis===e.name||!o.categoryAxis&&0===t,a=o.data,l=a.length,o.categoryField&&r&&l>0)for(d=N(e,p(o.categoryField,a[0])),u=d?f:p,s=0;s<l;s++)c=a[s],h=u(o.categoryField,c),!d&&y[h]||(m.push([h,c]),d||(y[h]=!0));m.length>0&&(d&&(m=H(m,function(e,t){return _i(e[0],t[0])})),i=j(m),e.categories=i[0],e.dataItems=i[1])},_isBindable:function(e){var t,i,n=oe.current.valueFields(e),o=!0;for(i=0;i<n.length;i++)if(t=n[i],t===hr?t="field":t+="Field",!Ri(e[t])){o=!1;break}return o},_legendItemClick:function(e,t){var i,n,o=this,r=o._plotArea,a=(r.srcSeries||r.series)[e];Ai(a.type,[bo,An,zn])?(n=a.data[t],i=!!Ri(n.visible)&&!n.visible,n.visible=i):(a.visible=!a.visible,this._saveGroupVisibleState(a)),this._noTransitionsRedraw()},_noTransitionsRedraw:function(){var e,t=this.options;t.transitions&&(t.transitions=!1,e=!0),this.redraw(),e&&(t.transitions=!0)},_legendItemHover:function(e,t){var i,n=this,o=n._plotArea,r=n._highlight,a=(o.srcSeries||o.series)[e];i=Ai(a.type,[bo,An,zn])?o.findPoint(function(i){return i.series.index===e&&i.index===t}):o.pointsBySeriesIndex(e),r.show(i)},_shouldAttachMouseMove:function(){var e=this,t=e._events;return e._plotArea.crosshairs.length||e._tooltip&&e._sharedTooltip()||Ri(t[ko])},setOptions:function(i){var n=this,o=i.dataSource;i.dataSource=t,te(n._originalOptions,i),n._originalOptions=Xt(n._originalOptions,i),n.options=Xt({},n._originalOptions),n._sourceSeries=null,e(document).off(ho),Yt.fn._setEvents.call(n,i),n._initTheme(n.options),o&&n.setDataSource(o),n._hasDataSource?n._onDataChanged():(n._bindCategories(),n.redraw()),n._shouldAttachMouseMove()&&n.element.on(ho,n._mousemove)},destroy:function(){var t=this,i=t.dataSource;t.element.off(Fi),i&&i.unbind(rn,t._dataChangeHandler),e(document).off(co),t._userEvents&&t._userEvents.destroy(),t._destroyView(),t.surface.destroy(),t.surface=null,t._clearRedrawTimeout(),Yt.fn.destroy.call(t)},_destroyView:function(){var e=this,t=e._model,i=e._selections;if(t&&(t.destroy(),e._model=null),i)for(;i.length>0;)i.shift().destroy();e._unsetActivePoint(),e._tooltip&&e._tooltip.destroy(),e._highlight&&e._highlight.destroy(),e._zoomSelection&&(e._zoomSelection.destroy(),delete e._zoomSelection),e._pannable&&(e._pannable.destroy(),delete e._pannable),e._mousewheelZoom&&(e._mousewheelZoom.destroy(),delete e._mousewheelZoom)}});Jt.ExportMixin.extend(Rr.fn),Nt.PDFMixin&&Nt.PDFMixin.extend(Rr.fn),ne=jt.extend({init:function(){this._registry=[]},register:function(e,t){this._registry.push({type:e,seriesTypes:t})},create:function(e,t){var i,n,o,r=this._registry,a=r[0];for(i=0;i<r.length;i++)if(n=r[i],o=O(e,n.seriesTypes),o.length>0){a=n;break}return new a.type(o,t)}}),ne.current=new ne,oe=jt.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(e,i,n){var o,r,a=this;for(i=i||[hr],o=0;o<e.length;o++)r=e[o],a._valueFields[r]=i,a._otherFields[r]=n,a._nullValue[r]=a._makeValue(i,null),a._undefinedValue[r]=a._makeValue(i,t)},canonicalFields:function(e){return this.valueFields(e).concat(this.otherFields(e))},valueFields:function(e){return this._valueFields[e.type]||[hr]},otherFields:function(e){return this._otherFields[e.type]||[hr]},bindPoint:function(e,t,i){var n,o,r,a,s,l=this,c=e.data,h=Ri(i)?i:c[t],u={valueFields:{value:h}},p=l.valueFields(e),f=l._otherFields[e.type];return null===h?s=l._nullValue[e.type]:Ri(h)?Dt(h)?(o=h.slice(p.length),s=l._bindFromArray(h,p),n=l._bindFromArray(o,f)):typeof h===vo&&(r=l.sourceFields(e,p),a=l.sourceFields(e,f),s=l._bindFromObject(h,p,r),n=l._bindFromObject(h,f,a)):s=l._undefinedValue[e.type],Ri(s)&&(1===p.length?u.valueFields.value=s[p[0]]:u.valueFields=s),u.fields=n||{},u},_makeValue:function(e,t){var i,n,o={},r=e.length;for(i=0;i<r;i++)n=e[i],o[n]=t;return o},_bindFromArray:function(e,t){var i,n,o={};if(t)for(n=Ot.min(t.length,e.length),i=0;i<n;i++)o[t[i]]=e[i];return o},_bindFromObject:function(e,t,i){var n,o,r,a,s={};if(t)for(o=t.length,i=i||t,n=0;n<o;n++)r=t[n],a=i[n],s[r]=p(a,e);return s},sourceFields:function(e,t){var i,n,o,r,a;if(t)for(n=t.length,r=[],i=0;i<n;i++)o=t[i],a=o===hr?"field":o+"Field",r.push(e[a]||o);return r}}),oe.current=new oe,re=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i,t),this.textBox=new mi(e,i.options),i.append(this.textBox)},options:{position:_o,margin:wi(3),padding:wi(4),color:Zi,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:En,delay:Nn},zIndex:2},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(e){var t=this,i=t.options,n=i.vertical,o=i.aboveAxis,r=t.children[0],a=r.box,s=r.options.padding;r.options.align=n?on:Xn,r.options.vAlign=n?or:on,i.position==Gn?n?(r.options.vAlign=or,!o&&a.height()<e.height()&&(r.options.vAlign=Qi)):r.options.align=o?Ro:Xn:i.position==on?(r.options.vAlign=on,r.options.align=on):i.position==jn?n?r.options.vAlign=o?Qi:or:r.options.align=o?Xn:Ro:i.position==_o&&(n?e=o?new ii(e.x1,e.y1-a.height(),e.x2,e.y1):new ii(e.x1,e.y2,e.x2,e.y2+a.height()):(r.options.align=on,e=o?new ii(e.x2,e.y1,e.x2+a.width(),e.y2):new ii(e.x1-a.width(),e.y1,e.x1,e.y2))),i.rotation||(n?s.left=s.right=(e.width()-r.contentBox.width())/2:s.top=s.bottom=(e.height()-r.contentBox.height())/2),r.reflow(e)},alignToClipBox:function(e){var t,i=this,n=i.options.vertical,o=n?yr:vr,r=o+"1",a=o+"2",s=i.children[0],l=i.parent.box;(l[r]<e[r]||e[a]<l[a])&&(t=s.paddingBox.clone(),t[r]=Ot.max(l[r],e[r]),t[a]=Ot.min(l[a],e[a]),this.reflow(t))}}),ae=ni.extend({init:function(e){var t=this;ni.fn.init.call(t,e),t.createContainer(),t.createMarker(),t.createLabel()},createContainer:function(){var e=this;e.container=new si({vertical:!1,wrap:!1,align:on}),e.append(e.container)},createMarker:function(){this.container.append(new di(this.markerOptions()))},markerOptions:function(){var e=this.options,t=e.markerColor;return Xt({},e.markers,{background:t,border:{color:t}})},createLabel:function(){var e=this,t=e.options,i=Xt({},t.labels);e.container.append(new mi(t.text,i))},renderComplete:function(){var e,t;oi.fn.renderComplete.call(this),e=this.options.cursor||{},t=this._itemOverlay=Oi.Path.fromRect(this.container.box.toRect(),{fill:{color:xr,opacity:0},stroke:null,cursor:e.style||e}),this.appendVisual(t)},click:function(e,t){var i=this.eventArgs(t);e.trigger(Wn,i)||(t.preventDefault(),e._legendItemClick(i.seriesIndex,i.pointIndex))},hover:function(e,t){var i=this.eventArgs(t);return e.trigger(Zn,i)||(t.preventDefault(),e._legendItemHover(i.seriesIndex,i.pointIndex)),!0},leave:function(e){e._unsetActivePoint()},eventArgs:function(e){var t=this.options;return{element:bi(e),text:t.text,series:t.series,seriesIndex:t.series.index,pointIndex:t.pointIndex}},renderVisual:function(){var e=this,t=e.options,i=t.visual;i?(e.visual=i({active:t.active,series:t.series,pointIndex:t.pointIndex,options:{markers:e.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):oi.fn.renderVisual.call(e)}}),se=oi.extend({render:function(){var e,t,i=this.children,n=this.options,o=n.vertical;for(this.visual=new Oi.Layout(null,{spacing:o?0:n.spacing,lineSpacing:o?n.spacing:0,orientation:o?"vertical":"horizontal"}),t=0;t<i.length;t++)e=i[t],e.reflow(new ii),e.renderVisual()},reflow:function(e){this.visual.rect(e.toRect()),this.visual.reflow();var t=this.visual.clippedBBox();this.box=t?Jt.rectToBox(t):new ii},renderVisual:function(){this.addVisual()},createVisual:Ft}),le=oi.extend({init:function(e){var t=this;oi.fn.init.call(t,e),Ai(t.options.position,[or,Ro,Qi,Xn,dn])||(t.options.position=Ro),t.createContainer(),t.createItems()},options:{position:Ro,items:[],labels:{margin:{left:6}},offsetX:0,offsetY:0,margin:wi(5),padding:wi(5),border:{color:Zi,width:0},item:{cursor:So},spacing:6,background:"",zIndex:1,markers:{border:{width:1},width:7,height:7,type:"rect",align:Xn,vAlign:on}},createContainer:function(){var e=this,t=e.options,i=t.align,n=t.position,o=n,r=on;n==dn?o=Xn:Ai(n,[or,Qi])?(o="start"==i?Xn:"end"==i?Ro:on,r=n):i&&("start"==i?r=or:"end"==i&&(r=Qi)),e.container=new ni({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),e.append(e.container)},createItems:function(){var e,t,i,n=this,o=n.options,r=o.items,a=r.length,s=n.isVertical();for(e=new se({vertical:s,spacing:o.spacing}),o.reverse&&(r=r.slice(0).reverse()),t=0;t<a;t++)i=r[t],e.append(new ae(Xt({},{markers:o.markers,labels:o.labels},o.item,i)));e.render(),n.container.append(e)},isVertical:function(){var e=this,t=e.options,i=t.orientation,n=t.position,o=n==dn&&i!=Fn||(Ri(i)?i!=Fn:Ai(n,[Xn,Ro]));return o},hasItems:function(){return this.container.children[0].children.length>0},reflow:function(e){var i=this,n=i.options;return e=e.clone(),i.hasItems()?(n.position===dn?(i.containerCustomReflow(e),i.box=e):i.containerReflow(e),t):(i.box=e,t)},containerReflow:function(e){var t,i=this,n=i.options,o=n.position,r=o==or||o==Qi?vr:yr,a=e.clone(),s=i.container,l=n.width,c=n.height,h=i.isVertical(),u=e.clone();o!=Xn&&o!=Ro||(a.y1=u.y1=0),h&&c?(a.y2=a.y1+c,a.align(u,yr,s.options.vAlign)):!h&&l&&(a.x2=a.x1+l,a.align(u,vr,s.options.align)),s.reflow(a),a=s.box,t=a.clone(),(n.offsetX||n.offsetY)&&(a.translate(n.offsetX,n.offsetY),i.container.reflow(a)),t[r+1]=e[r+1],t[r+2]=e[r+2],i.box=t},containerCustomReflow:function(e){var t=this,i=t.options,n=i.offsetX,o=i.offsetY,r=t.container,a=i.width,s=i.height,l=t.isVertical(),c=e.clone();l&&s?c.y2=c.y1+s:!l&&a&&(c.x2=c.x1+a),r.reflow(c),c=r.box,r.reflow(ii(n,o,n+c.width(),o+c.height()))},renderVisual:function(){this.hasItems()&&oi.fn.renderVisual.call(this)}}),ce=ei.extend({init:function(e){var t=this;e=e||{},this._initFields(),this._initCategories(e),ei.fn.init.call(t,e)},_initFields:function(){this._ticks={},this.outOfRangeMin=0,this.outOfRangeMax=0},_initCategories:function(e){var t,i,n=(e.categories||[]).slice(0),o=Ri(e.min),r=Ri(e.max);e.categories=n,(o||r)&&n.length&&(e.srcCategories=e.categories,t=o?Ot.floor(e.min):0,i=r?e.justified?Ot.floor(e.max)+1:Ot.ceil(e.max):n.length,e.categories=e.categories.slice(t,i))},options:{type:nn,categories:[],vertical:!1,majorGridLines:{visible:!1,width:1,color:Zi},labels:{zIndex:1},justified:!1},rangeIndices:function(){var e,t=this.options,i=t.categories.length||1,n=B(t.min)?t.min%1:0;return e=B(t.max)&&t.max%1!==0&&t.max<this.totalRange().max?i-(1-t.max%1):i-(t.justified?1:0),{min:n,max:e}},totalRangeIndices:function(e){var t,i,n=this.options,o=B(n.min)?n.min:0;return t=B(n.max)?n.max:B(n.min)?o+n.categories.length:(n.srcCategories||n.categories).length-(n.justified?1:0)||1,e&&(i=this.totalRange(),o=Vi(o,0,i.max),t=Vi(t,0,i.max)),{min:o,max:t}},range:function(){var e=this.options;return{min:B(e.min)?e.min:0,max:B(e.max)?e.max:e.categories.length}},totalRange:function(){var e=this.options;return{min:0,max:Ot.max(this._seriesMax||0,(e.srcCategories||e.categories).length)-(e.justified?1:0)}},getScale:function(){var e=this.rangeIndices(),t=e.min,i=e.max,n=this.lineBox(),o=this.options.vertical?n.height():n.width(),r=o/(i-t||1);return r*(this.options.reverse?-1:1)},getTickPositions:function(e){for(var t=this,i=t.options,n=i.vertical,o=t.lineBox(),r=i.reverse,a=t.getScale(),s=t.rangeIndices(),l=s.min,c=s.max,h=l%1!==0?Ot.floor(l/1)+e:l,u=o[(n?yr:vr)+(r?2:1)],p=[];h<=c;)p.push(u+Ci(a*(h-l),un)),h+=e;return p},getLabelsTickPositions:function(){var e=this.getMajorTickPositions().slice(0),t=this.rangeIndices(),i=this.getScale(),n=this.lineBox(),o=this.options,r=o.vertical?yr:vr,a=o.reverse?2:1,s=o.reverse?1:2;return t.min%1!==0&&e.unshift(n[r+a]-i*(t.min%1)),t.max%1!==0&&e.push(n[r+s]+i*(1-t.max%1)),e},labelTickIndex:function(e){var t=e.index,i=this.rangeIndices();return i.min>0&&(t-=Ot.floor(i.min)),t},arrangeLabels:function(){ei.fn.arrangeLabels.call(this),this.hideOutOfRangeLabels()},hideOutOfRangeLabels:function(){var e=this.box,t=this.labels,i=this.options.vertical?yr:vr,n=e[i+1],o=e[i+2],r=t[0],a=Ii(t);t.length&&((r.box[i+1]>o||r.box[i+2]<n)&&(r.options.visible=!1),(a.box[i+1]>o||a.box[i+2]<n)&&(a.options.visible=!1))},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getTicks:function(){var e,t=this,i=t._ticks,n=t.options,o=t.rangeIndices(),r=n.reverse,a=n.justified,s=t.lineBox();return e=s.getHash()+o.min+","+o.max+r+a,i._hash!==e&&(i._hash=e,i.majorTicks=t.getTickPositions(1),i.minorTicks=t.getTickPositions(.5)),i},getSlot:function(e,t,i){var n,o,r=this,a=r.options,s=a.reverse,l=a.justified,c=a.vertical?yr:vr,h=r.lineBox(),u=r.rangeIndices(),p=u.min,f=this.getScale(),d=h[c+(s?2:1)],g=h.clone(),m=!Ri(t);return e=Mi(e,0),t=Mi(t,e),t=Ot.max(t-1,e),t=Ot.max(e,t),n=d+(e-p)*f,o=d+(t+1-p)*f,m&&l&&(o=n),i&&(n=Vi(n,h[c+1],h[c+2]),o=Vi(o,h[c+1],h[c+2])),g[c+1]=s?o:n,g[c+2]=s?n:o,g},slot:function(e,t,i){return"string"==typeof e&&(e=this.categoryIndex(e)),"string"==typeof t&&(t=this.categoryIndex(t)),ei.fn.slot.call(this,e,t,i)},pointCategoryIndex:function(e){var t,i,n,o=this,r=o.options,a=r.reverse,s=r.justified,l=r.vertical?yr:vr,c=o.lineBox(),h=o.rangeIndices(),u=a?h.max:h.min,p=this.getScale(),f=c[l+1],d=c[l+2],g=e[l];return g<f||g>d?null:(t=g-f,i=t/p,i=u+i,n=i%1,s?i=Ot.round(i):0===n&&i>0&&i--,Ot.floor(i))},getCategory:function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.options.categories[t]},categoryIndex:function(e){var t=this.options,i=F(e,t.srcCategories||t.categories);return i-Ot.floor(t.min||0)},translateRange:function(e){var t=this,i=t.options,n=t.lineBox(),o=i.vertical?n.height():n.width(),r=i.categories.length,a=o/r,s=Ci(e/a,_n);return{min:s,max:r+s}},zoomRange:function(e){var t=this.totalRangeIndices(),i=this.totalRange(),n=i.max,o=i.min,r=Vi(t.min+e,o,n),a=Vi(t.max-e,o,n);if(a-r>0)return{min:r,max:a}},scaleRange:function(e){var t=this,i=t.options,n=i.categories.length,o=e*n;return{min:-o,max:n+o}},labelsCount:function(){var e=this.labelsRange();return e.max-e.min},labelsRange:function(){var e,t=this.options,i=t.labels,n=t.justified,o=this.totalRangeIndices(!0),r=o.min,a=o.max,s=Ot.floor(r);return n?(r=Ot.ceil(r),a=Ot.floor(a)):(r=Ot.floor(r),a=Ot.ceil(a)),e=r>i.skip?i.skip+i.step*Ot.ceil((r-i.skip)/i.step):i.skip,{min:e-s,max:(t.categories.length?a+(n?1:0):0)-s}},createAxisLabel:function(e,t){var i=this,n=i.options,o=n.dataItems?n.dataItems[e]:null,r=Mi(n.categories[e],""),a=i.axisLabelText(r,o,t);return new ti(r,a,e,o,t)},shouldRenderNote:function(e){var t=this.options.categories;return t.length&&t.length>e&&e>=0},pan:function(e){var t=this.totalRangeIndices(!0),i=this.getScale(),n=Ci(e/i,_n),o=this.totalRange(),r=t.min+n,a=t.max+n;return this.limitRange(r,a,0,o.max,n)},pointsRange:function(e,t){var i=this,n=i.options,o=n.reverse,r=n.vertical?yr:vr,a=i.lineBox(),s=i.totalRangeIndices(!0),l=this.getScale(),c=a[r+(o?2:1)],h=e[r]-c,u=t[r]-c,p=s.min+h/l,f=s.min+u/l,d=Ot.min(p,f),g=Ot.max(p,f);if(g-d>=oo)return{min:d,max:g}},valueRange:function(){return this.range()}}),he=ce.extend({init:function(e){var t,i,n=this;e=e||{},e=Xt({roundToBaseUnit:!0},e,{categories:d(e.categories),min:d(e.min),max:d(e.max)}),e.userSetBaseUnit=e.userSetBaseUnit||e.baseUnit,e.userSetBaseUnitStep=e.userSetBaseUnitStep||e.baseUnitStep,e.categories&&e.categories.length>0?(t=(e.baseUnit||"").toLowerCase(),i=t!==ji&&!Ai(t,Cr),i&&(e.baseUnit=n.defaultBaseUnit(e)),t!==ji&&e.baseUnitStep!==Ni||n.autoBaseUnit(e),this._groupsStart=m(e.categories[0],0,e.baseUnit,e.weekStartDay),n.groupCategories(e)):e.baseUnit=e.baseUnit||xn,this._initFields(),ei.fn.init.call(n,e)},options:{type:mn,labels:{dateFormats:Tr},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},shouldRenderNote:function(e){var t=this,i=t.range(),n=t.options.categories||[];return _i(e,i.min)>=0&&_i(e,i.max)<=0&&n.length},parseNoteValue:function(e){return d(e)},translateRange:function(e){var t,i,n=this,o=n.options,r=o.baseUnit,a=o.weekStartDay,s=n.lineBox(),l=o.vertical?s.height():s.width(),c=n.range(),h=l/(c.max-c.min),u=Ci(e/h,_n);return c.min&&c.max&&(t=w(o.min||c.min,u),i=w(o.max||c.max,u),c={min:m(t,0,r,a),max:m(i,0,r,a)}),c},scaleRange:function(e){var t,i=this,n=Ot.abs(e),o=i.range(),r=o.min,a=o.max;if(o.min&&o.max){for(;n--;)o=_(r,a),t=Ot.round(.1*o),e<0?(r=w(r,t),a=w(a,-t)):(r=w(r,-t),a=w(a,t));o={min:r,max:a}}return o},defaultBaseUnit:function(e){var t,i,n,o,r,a=e.categories,s=Ri(a)?a.length:0,l=io;for(t=0;t<s;t++)i=a[t],i&&o&&(n=b(i,o),n>0&&(l=Ot.min(l,n),r=l>=tr?_r:l>=er-3*$o?so:l>=Jo?mr:l>=$o?xn:l>=Qo?Hn:l>=Ko?ao:Eo)),o=i;return r||xn},_categoryRange:function(e){var t=e._range;return t||(t=e._range=Bi(e)),t},totalRange:function(){return{min:0,max:this.options.categories.length}},rangeIndices:function(){var e=this.options,t=e.baseUnit,i=e.baseUnitStep||1,n=e.categories,o=this.categoriesRange(),r=d(e.min||o.min),a=d(e.max||o.max),s=0,l=0;return n.length&&(s=k(r,n[0],t,i),l=k(a,n[0],t,i),e.roundToBaseUnit&&(s=Ot.floor(s),l=e.justified?Ot.floor(l):Ot.ceil(l))),{min:s,max:l}},labelsRange:function(){var e=this.options,t=e.labels,i=this.rangeIndices(),n=Ot.floor(i.min),o=Ot.ceil(i.max);return{min:n+t.skip,max:e.categories.length?o+(e.justified?1:0):0}},categoriesRange:function(){var e=this.options,t=this._categoryRange(e.srcCategories||e.categories),i=d(t.max);return!e.justified&&R(i,this._roundToTotalStep(i,e,!1))&&(i=this._roundToTotalStep(i,e,!0,!0)),{min:d(t.min),max:i}},currentRange:function(){var e=this.options,t=e.roundToBaseUnit!==!1,i=this.categoriesRange(),n=e.min,o=e.max;return n||(n=t?this._roundToTotalStep(i.min,e,!1):i.min),o||(o=t?this._roundToTotalStep(i.max,e,!e.justified):i.max),{min:n,max:o}},datesRange:function(){var e=this._categoryRange(this.options.srcCategories||this.options.categories);return{min:d(e.min),max:d(e.max)}},pan:function(e){var t,i,n,o=this,r=o.options,a=r.baseUnit,s=o.lineBox(),l=r.vertical?s.height():s.width(),c=this.currentRange(),h=this.totalLimits(),u=c.min,p=c.max,f=l/(p-u),m=Ci(e/f,_n);if(i=w(u,m),n=w(p,m),t=this.limitRange(g(i),g(n),g(h.min),g(h.max),m))return t.min=d(t.min),t.max=d(t.max),t.baseUnit=a,t.baseUnitStep=r.baseUnitStep||1,t.userSetBaseUnit=r.userSetBaseUnit,t.userSetBaseUnitStep=r.userSetBaseUnitStep,t},pointsRange:function(e,t){var i=ce.fn.pointsRange.call(this,e,t),n=this.currentRange(),o=this.rangeIndices(),r=_(n.max,n.min)/(o.max-o.min),a=this.options,s=w(n.min,i.min*r),l=w(n.min,i.max*r);return{min:s,max:l,baseUnit:a.userSetBaseUnit,baseUnitStep:a.userSetBaseUnitStep}},zoomRange:function(e){var t,i,n,o,r,a,s,l,c,h=this.options,u=this.totalLimits(),p=this.currentRange(),f=h.baseUnit,g=h.baseUnitStep||1,x=h.weekStartDay,v=p.max,y=p.min,b=m(y,e*g,f,x),A=m(v,-e*g,f,x);if(h.userSetBaseUnit==ji)if(t=h.autoBaseUnitSteps,i=h.maxDateGroups,n=F(f,Cr),r=_(A,b),a=Ii(t[f])*i*ir[f],s=_(v,y),r<ir[f]&&f!==Do)f=Cr[n-1],o=Ii(t[f]),l=(s-(i-1)*o*ir[f])/2,b=w(y,l),A=w(v,-l);else if(r>a&&f!==_r){c=0;do{n++,f=Cr[n],c=0,l=2*ir[f];do o=t[f][c],c++;while(c<t[f].length&&l*o<s)}while(f!==_r&&l*o<s);l=(l*o-s)/2,l>0&&(b=w(y,-l),A=w(v,l),b=w(b,Vi(A,u.min,u.max)-A),A=w(A,Vi(b,u.min,u.max)-b))}if(b=d(Vi(b,u.min,u.max)),A=d(Vi(A,u.min,u.max)),b&&A&&_(A,b)>0)return{min:b,max:A,baseUnit:h.userSetBaseUnit,baseUnitStep:h.userSetBaseUnitStep}},totalLimits:function(){var e=this.options,t=this.datesRange(),i=this._roundToTotalStep(d(t.min),e,!1),n=t.max;return e.justified||(n=this._roundToTotalStep(n,e,!0,R(n,this._roundToTotalStep(n,e,!1)))),{min:i,max:n}},range:function(e){e=e||this.options;var t=e.categories,i=e.baseUnit===ji,n=i?Cr[0]:e.baseUnit,o=e.baseUnitStep||1,r={baseUnit:n,baseUnitStep:o,weekStartDay:e.weekStartDay},a=this._categoryRange(t),s=d(e.min||a.min),l=d(e.max||a.max);return{min:this._roundToTotalStep(s,r,!1),max:this._roundToTotalStep(l,r,!0,!0)}},autoBaseUnit:function(e){for(var t,i,n,o=this,r=this._categoryRange(e.categories),a=d(e.min||r.min),s=d(e.max||r.max),l=e.baseUnit===ji,c=0,h=l?Cr[c++]:e.baseUnit,u=s-a,p=u/ir[h],f=p,g=e.maxDateGroups||o.options.maxDateGroups,m=Xt({},o.options.autoBaseUnitSteps,e.autoBaseUnitSteps);!i||p>=g;)if(t=t||m[h].slice(0),n=t.shift())i=n,p=f/i;else{if(h===Ii(Cr)){i=Ot.ceil(f/g);break}if(!l){p>g&&(i=Ot.ceil(f/g));break}h=Cr[c++]||Ii(Cr),f=u/ir[h],t=null}e.baseUnitStep=i,e.baseUnit=h},_timeScale:function(){var e,t,i,n=this,o=n.range(),r=n.options,a=n.lineBox(),s=r.vertical,l=s?a.height():a.width();return r.justified&&r._collapse!==!1?(t=this._categoryRange(r.categories),i=g(t.max),e=d(i)-o.min):e=o.max-o.min,l/e},groupCategories:function(e){var t,i,n=this,o=e.categories,r=d(Ei(o)),a=e.baseUnit,s=e.baseUnitStep||1,l=n.range(e),c=l.max,h=[];for(t=l.min;t<c&&(h.push(t),i=m(t,s,a,e.weekStartDay),!(i>r)||e.max);t=i);e.srcCategories=o,e.categories=h},_roundToTotalStep:function(e,t,i,n){var o,r,a,s,l;return t=t||this.options,o=t.baseUnit,r=t.baseUnitStep||1,a=this._groupsStart,a?(s=k(e,a,o,r),l=i?Ot.ceil(s):Ot.floor(s),n&&l++,m(a,l*r,o,t.weekStartDay)):m(e,i?r:0,o,t.weekStartDay)},createAxisLabel:function(e,t){var i,n,o=this.options,r=o.dataItems?o.dataItems[e]:null,a=o.categories[e],s=o.baseUnit,l=!0,c=t.dateFormats[s];if(o.justified?(i=v(a,s,o.weekStartDay),l=R(i,a)):o.roundToBaseUnit||(l=!R(this.range().max,a)),l&&(t.format=t.format||c,n=this.axisLabelText(a,r,t)))return new ti(a,n,e,r,t)},categoryIndex:function(e){var t=this,i=t.options,n=i.categories,o=-1;return n.length&&(o=Ot.floor(k(d(e),n[0],i.baseUnit,i.baseUnitStep||1))),o},getSlot:function(e,t,i){var n=this;return typeof e===vo&&(e=n.categoryIndex(e)),typeof t===vo&&(t=n.categoryIndex(t)),ce.fn.getSlot.call(n,e,t,i)},valueRange:function(){var e=this.options,t=this._categoryRange(e.srcCategories||e.categories);return{min:d(t.min),max:d(t.max)}}}),ue=ei.extend({init:function(e,t,i){var n=this;i=i||{},Xt(i,{min:d(i.min),max:d(i.max),axisCrossingValue:d(i.axisCrossingValues||i.axisCrossingValue)}),this.seriesMin=d(e),this.seriesMax=d(t),i=n.applyDefaults(this.seriesMin,this.seriesMax,i),ei.fn.init.call(n,i)},options:{type:mn,majorGridLines:{visible:!0,width:1,color:Zi},labels:{dateFormats:Tr}},applyDefaults:function(e,i,n){var o=this,r=n.min||e,a=n.max||i,s=n.baseUnit||(a&&r?o.timeUnits(b(a,r)):Hn),l=ir[s],c=v(g(r)-1,s)||d(a),h=y(g(a)+1,s),u=n.majorUnit?n.majorUnit:t,p=u||Jt.ceil(Jt.autoMajorUnit(c.getTime(),h.getTime()),l)/l,f=A(c,h,s),x=Jt.ceil(f,p),_=x-f,w=Ot.floor(_/2),k=_-w;return n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||m(c,-w,s),n.max=n.max||m(h,k,s),n.minorUnit=n.minorUnit||p/5,n.majorUnit=p,this.totalMin=g(v(g(e)-1,s)),this.totalMax=g(y(g(i)+1,s)),n},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t=this.options;return Ot.floor(A(t.min,t.max,t.baseUnit)/e+1)},getTickPositions:function(e){var t,i,n,o=this.options,r=o.vertical,a=o.reverse,s=this.lineBox(),l=(r?-1:1)*(a?-1:1),c=1===l?1:2,h=s[(r?yr:vr)+c],u=this.getDivisions(e),p=_(o.max,o.min),f=r?s.height():s.width(),d=f/p,g=[h];for(t=1;t<u;t++)i=m(o.min,t*e,o.baseUnit),n=h+_(i,o.min)*d*l,g.push(Ci(n,un));return g},getMajorTickPositions:function(){var e=this;return e.getTickPositions(e.options.majorUnit)},getMinorTickPositions:function(){var e=this;return e.getTickPositions(e.options.minorUnit)},getSlot:function(e,t,i){return hi.fn.getSlot.call(this,d(e),d(t),i)},getValue:function(e){var t=hi.fn.getValue.call(this,e);return null!==t?d(t):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var i,n,o=this.options,r=e*o.majorUnit,a=o.min;return r>0&&(a=m(a,r,o.baseUnit)),i=t.dateFormats[o.baseUnit],t.format=t.format||i,n=this.axisLabelText(a,null,t),new ti(a,n,e,null,t)},timeUnits:function(e){var t=Hn;return e>=tr?t=_r:e>=er?t=so:e>=Jo?t=mr:e>=$o&&(t=xn),t},translateRange:function(e,t){var i=this,n=i.options,o=n.baseUnit,r=n.weekStartDay,a=i.lineBox(),s=n.vertical?a.height():a.width(),l=i.range(),c=s/_(l.max,l.min),h=Ci(e/c,_n),u=w(n.min,h),p=w(n.max,h);return t||(u=m(u,0,o,r),p=m(p,0,o,r)),{min:u,max:p}},scaleRange:function(e){for(var t,i,n=this,o=n.options,r=Ot.abs(e),a=o.min,s=o.max;r--;)t=_(a,s),i=Ot.round(.1*t),e<0?(a=w(a,i),s=w(s,-i)):(a=w(a,-i),s=w(s,i));return{min:a,max:s}},shouldRenderNote:function(e){var t=this.range();return _i(e,t.min)>=0&&_i(e,t.max)<=0},pan:function(e){var t=this.translateRange(e,!0),i=this.limitRange(g(t.min),g(t.max),this.totalMin,this.totalMax);if(i)return{min:d(i.min),max:d(i.max)}},pointsRange:function(e,t){var i=this.getValue(e),n=this.getValue(t),o=Ot.min(i,n),r=Ot.max(i,n);return{min:d(o),max:d(r)}},zoomRange:function(e){var t=this.scaleRange(e),i=d(Vi(g(t.min),this.totalMin,this.totalMax)),n=d(Vi(g(t.max),this.totalMin,this.totalMax));return{min:i,max:n}}}),pe=oi.extend({options:{vertical:!1,gap:0,spacing:0},reflow:function(e){var t,i,n=this,o=n.options,r=o.vertical,a=r?yr:vr,s=n.children,l=o.gap,c=o.spacing,h=s.length,u=h+l+c*(h-1),p=(r?e.height():e.width())/u,f=e[a+1]+p*(l/2);for(i=0;i<h;i++)t=(s[i].box||e).clone(),t[a+1]=f,t[a+2]=f+p,s[i].reflow(t),i<h-1&&(f+=p*c),f+=p}}),fe=oi.extend({options:{vertical:!0},reflow:function(e){var t,i,n,o=this.options,r=o.vertical,a=r?vr:yr,s=this.children,l=this.box=new ii,c=s.length;for(t=0;t<c;t++)i=s[t],i.visible!==!1&&(n=i.box.clone(),n.snapTo(e,a),0===t&&(l=this.box=n.clone()),i.reflow(n),l.wrap(n))}}),de={click:function(e,t){return e.trigger(Fo,this.eventArgs(t))},hover:function(e,t){return e.trigger(Uo,this.eventArgs(t))},eventArgs:function(e){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:bi(e),originalEvent:e,point:this}}},ge={createNote:function(){var e=this,t=e.options.notes,i=e.noteText||t.label.text;t.visible!==!1&&Ri(i)&&null!==i&&(e.note=new li(e.value,i,e.dataItem,e.category,e.series,e.options.notes),e.append(e.note))}},me=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i),i.options=t,i.color=t.color||xr,i.aboveAxis=Mi(i.options.aboveAxis,!0),i.value=e},defaults:{border:{width:1},vertical:!0,overlay:{gradient:On},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}},render:function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},createLabel:function(){var e,t,i=this.options,n=i.labels;n.visible&&(n.template?(t=Kt(n.template),e=t({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series})):e=this.formatValue(n.format),this.label=new re(e,Xt({vertical:i.vertical},i.labels)),this.append(this.label))},formatValue:function(e){return this.owner.formatPointValue(this,e)},reflow:function(e){var t,i,n;if(this.render(),t=this,i=t.label,t.box=e,i&&(i.options.aboveAxis=t.aboveAxis,i.reflow(e)),t.note&&t.note.reflow(e),t.errorBars)for(n=0;n<t.errorBars.length;n++)t.errorBars[n].reflow(e)},createVisual:function(){var e,t=this,i=t.box,n=t.options,o=n.visual;t.visible!==!1&&(oi.fn.createVisual.call(t),o?(e=this.rectVisual=o({category:t.category,dataItem:t.dataItem,value:t.value,sender:t.getChart(),series:t.series,percentage:t.percentage,stackValue:this.stackValue,runningTotal:t.runningTotal,total:t.total,rect:i.toRect(),createVisual:function(){var e=new Oi.Group;return t.createRect(e),e},options:n}),e&&t.visual.append(e)):i.width()>0&&i.height()>0&&t.createRect(t.visual))},createRect:function(e){var i,n,o,r,a=this.options,s=a.border,l=Ri(s.opacity)?s.opacity:a.opacity,c=this.box.toRect();c.size.width=Math.round(c.size.width),i=this.rectVisual=Oi.Path.fromRect(c,{fill:{color:this.color,opacity:a.opacity},stroke:{color:this.getBorderColor(),width:s.width,opacity:l,dashType:s.dashType}}),n=this.box.width(),o=this.box.height(),r=a.vertical?n:o,r>Yi&&(vi(i),(n<1||o<1)&&(i.options.stroke.lineJoin="round")),e.append(i),Y(a)&&e.append(this.createGradientOverlay(i,{baseColor:this.color},Xt({end:a.vertical?t:[0,1]},a.overlay)))},createHighlight:function(e){var t=Oi.Path.fromRect(this.box.toRect(),e);return vi(t)},highlightVisual:function(){return this.rectVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},getBorderColor:function(){var e=this,t=e.options,i=e.color,n=t.border,o=n.color,r=n._brightness||Xi;return Ri(o)||(o=new ri(i).brightness(r).toHex()),o},tooltipAnchor:function(e,t){var i,n,o,r,a=this,s=a.options,l=a.box,c=s.vertical,h=a.aboveAxis,u=a.owner.pane.clipBox()||l;return c?(i=Ot.min(l.x2,u.x2)+ar,n=h?Ot.max(l.y1,u.y1):Ot.min(l.y2,u.y2)-t):(o=Ot.max(l.x1,u.x1),r=Ot.min(l.x2,u.x2),s.isStacked?(i=h?r-e:o,n=Ot.max(l.y1,u.y1)-t-ar):(i=h?r+ar:o-e-ar,n=Ot.max(l.y1,u.y1))),new ui(i,n)},overlapsBox:function(e){return this.box.overlaps(e)}}),Xt(me.fn,de),Xt(me.fn,ge),xe=Oi.Animation.extend({options:{duration:Nn
},setup:function(){var e,t,i=this.element,n=this.options,o=i.bbox();o?(this.origin=n.origin,e=n.vertical?yr:vr,t=this.fromScale=new zi.Point(1,1),t[e]=Ho,i.transform(zi.transform().scale(t.x,t.y))):this.abort()},step:function(e){var t=ki(this.fromScale.x,1,e),i=ki(this.fromScale.y,1,e);this.element.transform(zi.transform().scale(t,i,this.origin))},abort:function(){Oi.Animation.fn.abort.call(this),this.element.transform(null)}}),Oi.AnimationFactory.current.register(qi,xe),ve=Oi.Animation.extend({options:{duration:200,easing:$n},setup:function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},step:function(e){this.element.opacity(e*this.fadeTo)}}),Oi.AnimationFactory.current.register(En,ve),ye=function(e,t,i){var n=this;n.initGlobalRanges(e,t,i)},ye.prototype=ye.fn={percentRegex:/percent(?:\w*)\((\d+)\)/,standardDeviationRegex:RegExp("^"+qo+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),initGlobalRanges:function(e,t,i){var n,o,r,a,s,l=this,c=t.data,h=l.standardDeviationRegex.exec(e);h?(l.valueGetter=l.createValueGetter(t,i),n=l.getAverage(c),o=l.getStandardDeviation(c,n,!1),r=h[1]?parseFloat(h[1]):1,a={low:n.value-o*r,high:n.value+o*r},l.globalRange=function(){return a}):e.indexOf&&e.indexOf(Go)>=0&&(l.valueGetter=l.createValueGetter(t,i),s=l.getStandardError(c,l.getAverage(c)),l.globalRange=function(e){return{low:e-s,high:e+s}})},createValueGetter:function(e,t){var i,n,o,r=e.data,a=oe.current,s=a.valueFields(e),l=Ri(r[0])?r[0]:{};return Dt(l)?(i=t?F(t,s):0,o=Wt("["+i+"]")):B(l)?o=Wt():typeof l===vo&&(n=a.sourceFields(e,s),o=Wt(n[F(t,s)])),o},getErrorRange:function(e,t){var i,n,o,r,a=this;if(Ri(t)){if(a.globalRange)return a.globalRange(e);if(Dt(t))i=e-t[0],n=e+t[1];else if(B(o=parseFloat(t)))i=e-o,n=e+o;else{if(!(o=a.percentRegex.exec(t)))throw Error("Invalid ErrorBar value: "+t);r=e*(parseFloat(o[1])/100),i=e-Ot.abs(r),n=e+Ot.abs(r)}return{low:i,high:n}}},getStandardError:function(e,t){return this.getStandardDeviation(e,t,!0)/Ot.sqrt(t.count)},getStandardDeviation:function(e,t,i){var n,o,r=0,a=e.length,s=i?t.count-1:t.count;for(o=0;o<a;o++)n=this.valueGetter(e[o]),B(n)&&(r+=Ot.pow(n-t.value,2));return Ot.sqrt(r/s)},getAverage:function(e){var t,i,n=0,o=0,r=e.length;for(i=0;i<r;i++)t=this.valueGetter(e[i]),B(t)&&(n+=t,o++);return{value:n/o,count:o}}},_e=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i,t),i.plotArea=e,i.categoryAxis=e.seriesCategoryAxis(t.series[0]),i.valueAxisRanges={},i.points=[],i.categoryPoints=[],i.seriesPoints=[],i.seriesOptions=[],i._evalSeries=[],i.render()},options:{series:[],invertAxes:!1,isStacked:!1,clip:!0},render:function(){var e=this;e.traverseDataPoints(Ht(e.addValue,e))},pointOptions:function(e,t){var i,n=this.seriesOptions[t];return n||(i=this.pointType().fn.defaults,this.seriesOptions[t]=n=Xt({},i,{vertical:!this.options.invertAxes},e)),n},plotValue:function(e){var t,i,n,o,r,a,s,l;if(!e)return 0;if(this.options.isStacked100&&B(e.value)){for(t=e.categoryIx,i=this.categoryPoints[t],n=0,o=[],r=0;r<i.length;r++)if(a=i[r]){if(s=e.series.stack,l=a.series.stack,s&&l&&s.group!==l.group)continue;B(a.value)&&(n+=Ot.abs(a.value),o.push(Ot.abs(a.value)))}if(n>0)return e.value/n}return e.value},plotRange:function(e,t){var i,n,o,r,a,s,l,c,h,u,p,f,d=e.categoryIx,g=this.categoryPoints[d];if(this.options.isStacked){for(t=t||0,i=this.plotValue(e),n=i>=0,o=t,r=!1,a=0;a<g.length&&(s=g[a],e!==s);a++){if(l=e.series.stack,c=s.series.stack,l&&c){if(typeof l===Yo&&l!==c)continue;if(l.group&&l.group!==c.group)continue}h=this.plotValue(s),(h>=0&&n||h<0&&!n)&&(o+=h,i+=h,r=!0,this.options.isStacked100&&(i=Ot.min(i,1)))}return r&&(o-=t),[o,i]}return u=e.series,p=this.seriesValueAxis(u),f=this.categoryAxisCrossingValue(p),[f,e.value||f]},stackLimits:function(e,t){var i,n,o,r,a,s=io,l=ro;for(i=0;i<this.categoryPoints.length;i++)if(n=this.categoryPoints[i])for(o=0;o<n.length;o++)r=n[o],r&&(r.series.stack!==t&&r.series.axis!==e||(a=this.plotRange(r,0)[1],Ri(a)&&isFinite(a)&&(l=Ot.max(l,a),s=Ot.min(s,a))));return{min:s,max:l}},updateStackRange:function(){var e,t,i,n,o,r,a=this,s=a.options.series,l=a.options.isStacked,c={};if(l)for(t=0;t<s.length;t++)i=s[t],n=i.axis,o=n+i.stack,e=c[o],e||(e=a.stackLimits(n,i.stack),r=a.errorTotals,r&&(r.negative.length&&(e.min=Ot.min(e.min,Li(r.negative))),r.positive.length&&(e.max=Ot.max(e.max,Ei(r.positive)))),e.min!==io||e.max!==ro?c[o]=e:e=null),e&&(a.valueAxisRanges[n]=e)},addErrorBar:function(e,t,i){var n,o=this,r=e.value,a=e.series,s=e.seriesIx,l=e.options.errorBars,c=t.fields[Tn],h=t.fields[Rn];B(c)&&B(h)?n={low:c,high:h}:l&&Ri(l.value)&&(o.seriesErrorRanges=o.seriesErrorRanges||[],o.seriesErrorRanges[s]=o.seriesErrorRanges[s]||new ye(l.value,a,hr),n=o.seriesErrorRanges[s].getErrorRange(r,l.value)),n&&(e.low=n.low,e.high=n.high,o.addPointErrorBar(e,i))},addPointErrorBar:function(e,t){var i,n,o,r=this,a=e.series,s=e.low,l=e.high,c=!r.options.invertAxes,h=e.options.errorBars;r.options.isStacked?(n=r.stackedErrorRange(e,t),s=n.low,l=n.high):(o={categoryIx:t,series:a},r.updateRange({value:s},o),r.updateRange({value:l},o)),i=new Te(s,l,c,r,a,h),e.errorBars=[i],e.append(i)},stackedErrorRange:function(e,t){var i=this,n=i.plotRange(e,0)[1]-e.value,o=e.low+n,r=e.high+n;return i.errorTotals=i.errorTotals||{positive:[],negative:[]},o<0&&(i.errorTotals.negative[t]=Ot.min(i.errorTotals.negative[t]||0,o)),r>0&&(i.errorTotals.positive[t]=Ot.max(i.errorTotals.positive[t]||0,r)),{low:o,high:r}},addValue:function(t,i){var n,o,r=this,a=i.categoryIx,s=i.series,l=i.seriesIx,c=r.categoryPoints[a];c||(r.categoryPoints[a]=c=[]),n=r.seriesPoints[l],n||(r.seriesPoints[l]=n=[]),o=r.createPoint(t,i),o&&(e.extend(o,i),o.owner=r,o.dataItem=s.data[a],o.noteText=t.fields.noteText,r.addErrorBar(o,t,a)),r.points.push(o),n.push(o),c.push(o),r.updateRange(t.valueFields,i)},evalPointOptions:function(e,t,i,n,o,r){var a={defaults:o._defaults,excluded:["data","aggregate","_events","tooltip","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];return Ri(s)||(this._evalSeries[r]=s=M(e,{},a,!0)),s&&(e=Xt({},e),M(e,{value:t,category:i,index:n,series:o,dataItem:o.data[n]},a)),e},updateRange:function(e,t){var i=this,n=t.series.axis,o=e.value,r=i.valueAxisRanges[n];isFinite(o)&&null!==o&&(r=i.valueAxisRanges[n]=r||{min:io,max:ro},r.min=Ot.min(r.min,o),r.max=Ot.max(r.max,o))},seriesValueAxis:function(e){var t=this.plotArea,i=e.axis,n=i?t.namedValueAxes[i]:t.valueAxis;if(!n)throw Error("Unable to locate value axis with name "+i);return n},reflow:function(e){var t,i,n,o=this,r=0,a=o.categorySlots=[],s=o.points,l=o.categoryAxis;o.traverseDataPoints(function(e,c){var h,u,p,f,d=c.categoryIx,g=c.series;t=o.pointValue(e),i=o.seriesValueAxis(g),n=s[r++],h=a[d],h||(a[d]=h=o.categorySlot(l,d,i)),n&&(u=o.plotRange(n,i.startValue()),p=i.getSlot(u[0],u[1],!o.options.clip),p?(f=o.pointSlot(h,p),n.aboveAxis=o.aboveAxis(n,i),n.stackValue=u[1],o.options.isStacked100&&(n.percentage=o.plotValue(n)),o.reflowPoint(n,f)):n.visible=!1)}),o.reflowCategories(a),o.box=e},aboveAxis:function(e,t){var i=this.categoryAxisCrossingValue(t),n=e.value;return t.options.reverse?n<i:n>=i},categoryAxisCrossingValue:function(e){var t=this.categoryAxis,i=e.options,n=[].concat(i.axisCrossingValues||i.axisCrossingValue);return n[t.axisIndex||0]||0},reflowPoint:function(e,t){e.reflow(t)},reflowCategories:function(){},pointSlot:function(e,t){var i=this,n=i.options,o=n.invertAxes,r=o?t:e,a=o?e:t;return new ii(r.x1,a.y1,r.x2,a.y2)},categorySlot:function(e,t){return e.getSlot(t)},traverseDataPoints:function(e){var t,i,n,o,r,a=this,s=a.options,l=s.series,c=a.categoryAxis.options.categories||[],u=h(l),p=l.length;for(i=0;i<p;i++)this._outOfRangeCallback(l[i],"_outOfRangeMinPoint",i,e);for(t=0;t<u;t++)for(i=0;i<p;i++)r=l[i],o=c[t],n=this._bindPoint(r,i,t),e(n,{category:o,categoryIx:t,series:r,seriesIx:i});for(i=0;i<p;i++)this._outOfRangeCallback(l[i],"_outOfRangeMaxPoint",i,e)},_outOfRangeCallback:function(e,t,i,n){var o,r,a=e[t];a&&(o=a.categoryIx,r=this._bindPoint(e,i,o,a.item),n(r,{category:a.category,categoryIx:o,series:e,seriesIx:i}))},_bindPoint:function(e,t,i,n){var o,r;return this._bindCache||(this._bindCache=[]),o=this._bindCache[t],o||(o=this._bindCache[t]=[]),r=o[i],r||(r=o[i]=oe.current.bindPoint(e,i,n)),r},formatPointValue:function(e,t){return null===e.value?"":yi(t,e.value)},pointValue:function(e){return e.valueFields.value}}),be=_e.extend({options:{animation:{type:qi}},render:function(){var e=this;_e.fn.render.apply(e),e.updateStackRange()},pointType:function(){return me},clusterType:function(){return pe},stackType:function(){return fe},stackLimits:function(e,t){var i=_e.fn.stackLimits.call(this,e,t);return i},createPoint:function(e,t){var i,n,o,r,a=this,s=t.categoryIx,l=t.category,c=t.series,h=t.seriesIx,u=a.pointValue(e),p=a.options,f=a.children,d=a.options.isStacked,g=a.pointType(),m=a.clusterType(),x=this.pointOptions(c,h),v=x.labels;return d&&v.position==_o&&(v.position=Gn),x.isStacked=d,o=e.fields.color||c.color,u<0&&x.negativeColor&&(o=x.negativeColor),x=a.evalPointOptions(x,u,l,s,c,h),Nt.isFunction(c.color)&&(o=x.color),i=new g(u,x),i.color=o,n=f[s],n||(n=new m({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing}),a.append(n)),d?(r=a.getStackWrap(c,n),r.append(i)):n.append(i),i},getStackWrap:function(e,t){var i,n,o,r=e.stack,a=r?r.group||r:r,s=t.children;if(typeof a===Yo){for(n=0;n<s.length;n++)if(s[n]._stackGroup===a){i=s[n];break}}else i=s[0];return i||(o=this.stackType(),i=new o({vertical:!this.options.invertAxes}),i._stackGroup=a,t.append(i)),i},categorySlot:function(e,t,i){var n,o,r=this,a=r.options,s=e.getSlot(t),l=i.startValue();return a.isStacked&&(o=i.getSlot(l,l,!0),n=a.invertAxes?vr:yr,s[n+1]=s[n+2]=o[n+1]),s},reflowCategories:function(e){var t,i=this,n=i.children,o=n.length;for(t=0;t<o;t++)n[t].reflow(e[t])},createAnimation:function(){this._setAnimationOptions(),oi.fn.createAnimation.call(this),X(this.options.series)&&this._setChildrenAnimation()},_setChildrenAnimation:function(){var e,t,i,n=this.points;for(i=0;i<n.length;i++)e=n[i],t=e.visual,t&&Ri(t.options.zIndex)&&(e.options.animation=this.options.animation,e.createAnimation())},_setAnimationOptions:function(){var e,t,i=this.options,n=i.animation||{};this.options.isStacked?(t=this.seriesValueAxis(i.series[0]),e=t.getSlot(t.startValue())):e=this.categoryAxis.getSlot(0),n.origin=new zi.Point(e.x1,e.y1),n.vertical=!i.invertAxes}}),we=me.extend({defaults:{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}},createLabel:function(){var e=this.options.labels,t=Xt({},e,e.from),i=Xt({},e,e.to);t.visible&&(this.labelFrom=this._createLabel(t),this.append(this.labelFrom)),i.visible&&(this.labelTo=this._createLabel(i),this.append(this.labelTo))},_createLabel:function(e){var t,i;return e.template?(i=Kt(e.template),t=i({dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total,series:this.series})):t=this.formatValue(e.format),new re(t,Xt({vertical:this.options.vertical},e))},reflow:function(e){this.render();var t=this,i=t.labelFrom,n=t.labelTo;t.box=e,i&&(i.options.aboveAxis=t.value.from>t.value.to,i.reflow(e)),n&&(n.options.aboveAxis=t.value.to>t.value.from,n.reflow(e)),t.note&&t.note.reflow(e)}}),Ae=be.extend({pointType:function(){return we},pointValue:function(e){return e.valueFields},formatPointValue:function(e,t){return null===e.value.from&&null===e.value.to?"":yi(t,e.value.from,e.value.to)},plotLimits:_e.fn.plotLimits,plotRange:function(e){return e?[e.value.from,e.value.to]:0},updateRange:function(e,t){var i=this,n=t.series.axis,o=e.from,r=e.to,a=i.valueAxisRanges[n];null!==e&&B(o)&&B(r)&&(a=i.valueAxisRanges[n]=a||{min:io,max:ro},a.min=Ot.min(a.min,o),a.max=Ot.max(a.max,o),a.min=Ot.min(a.min,r),a.max=Ot.max(a.max,r))},aboveAxis:function(e){var t=e.value;return t.from<t.to}}),ke=_e.extend({init:function(e,t){var i=this;i.wrapData(t),_e.fn.init.call(i,e,t)},options:{animation:{type:qi}},wrapData:function(e){var t,i,n,o=e.series;for(t=0;t<o.length;t++)n=o[t],i=n.data,i&&!Dt(i[0])&&typeof i[0]!=vo&&(n.data=[i])},reflowCategories:function(e){var t,i=this,n=i.children,o=n.length;for(t=0;t<o;t++)n[t].reflow(e[t])},plotRange:function(e){var t=e.series,i=this.seriesValueAxis(t),n=this.categoryAxisCrossingValue(i);return[n,e.value.current||n]},createPoint:function(e,t){var i,n,o=this,r=t.categoryIx,a=t.category,s=t.series,l=t.seriesIx,c=e.valueFields,h=o.options,u=o.children,p=Xt({vertical:!h.invertAxes,overlay:s.overlay,categoryIx:r,invertAxes:h.invertAxes},s),f=e.fields.color||s.color;return p=o.evalPointOptions(p,c,a,r,s,l),Nt.isFunction(s.color)&&(f=p.color),i=new Se(c,p),i.color=f,n=u[r],n||(n=new pe({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing}),o.append(n)),n.append(i),i},updateRange:function(e,t){var i=this,n=t.series.axis,o=e.current,r=e.target,a=i.valueAxisRanges[n];Ri(o)&&!isNaN(o)&&Ri(r&&!isNaN(r))&&(a=i.valueAxisRanges[n]=a||{min:io,max:ro},a.min=Ot.min.apply(Ot,[a.min,o,r]),a.max=Ot.max.apply(Ot,[a.max,o,r]))},formatPointValue:function(e,t){return yi(t,e.value.current,e.value.target)},pointValue:function(e){return e.valueFields.current},aboveAxis:function(e){var t=e.value.current;return t>0},createAnimation:function(){var e,t,i=this.points;for(this._setAnimationOptions(),t=0;t<i.length;t++)e=i[t],e.options.animation=this.options.animation,e.createAnimation()},_setAnimationOptions:be.fn._setAnimationOptions}),Se=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i,t),i.aboveAxis=i.options.aboveAxis,i.color=t.color||xr,i.value=e},options:{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}</br>Target: {1}"}},render:function(){var e=this,t=e.options;e._rendered||(e._rendered=!0,Ri(e.value.target)&&(e.target=new Ce({type:t.target.shape,background:t.target.color||e.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:or,align:Ro}),e.target.value=this.value,e.target.dataItem=this.dataItem,e.target.series=this.series,e.append(e.target)),e.createNote())},reflow:function(e){this.render();var t,i=this,n=i.options,o=i.owner,r=i.target,a=n.invertAxes,s=o.seriesValueAxis(i.options),l=o.categorySlot(o.categoryAxis,n.categoryIx,s),c=s.getSlot(i.value.target),h=a?c:l,u=a?l:c;r&&(t=new ii(h.x1,u.y1,h.x2,u.y2),r.options.height=a?t.height():n.target.line.width,r.options.width=a?n.target.line.width:t.width(),r.reflow(t)),i.note&&i.note.reflow(e),i.box=e},createVisual:function(){var e,t;oi.fn.createVisual.call(this),e=this.options,t=Oi.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null}),e.border.width>0&&t.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Mi(e.border.opacity,e.opacity)}),this.bodyVisual=t,vi(t),this.visual.append(t)},createAnimation:function(){this.bodyVisual&&(this.animation=Oi.Animation.create(this.bodyVisual,this.options.animation))},tooltipAnchor:me.fn.tooltipAnchor,createHighlight:function(e){return Oi.Path.fromRect(this.box.toRect(),e)},highlightVisual:function(){return this.bodyVisual},highlightVisualArgs:function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),Xt(Se.fn,de),Xt(Se.fn,ge),Ce=di.extend(),Xt(Ce.fn,de),Pe=oi.extend({init:function(e,t,i,n,o,r){var a=this;a.low=e,a.high=t,a.isVertical=i,a.chart=n,a.series=o,oi.fn.init.call(a,r)},options:{animation:{type:En,delay:Nn},endCaps:!0,line:{width:1},zIndex:1},getAxis:function(){},reflow:function(e){var t,i=this,n=i.options.endCaps,o=i.isVertical,r=i.getAxis(),a=r.getSlot(i.low,i.high),s=e.center(),l=i.getCapsWidth(e,o),c=o?s.x:s.y,h=c-l,u=c+l;o?(t=[ui(s.x,a.y1),ui(s.x,a.y2)],n&&t.push(ui(h,a.y1),ui(u,a.y1),ui(h,a.y2),ui(u,a.y2)),i.box=ii(h,a.y1,u,a.y2)):(t=[ui(a.x1,s.y),ui(a.x2,s.y)],n&&t.push(ui(a.x1,h),ui(a.x1,u),ui(a.x2,h),ui(a.x2,u)),i.box=ii(a.x1,h,a.x2,u)),i.linePoints=t},getCapsWidth:function(e,t){var i=t?e.width():e.height(),n=Ot.min(Ot.floor(i/2),wn)||wn;return n},createVisual:function(){var e=this,t=e.options,i=t.visual;i?e.visual=i({low:e.low,high:e.high,rect:e.box.toRect(),sender:e.getChart(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):e.createDefaultVisual()},createDefaultVisual:function(){var e,t,i=this,n=i.options,o={stroke:{color:n.color,width:n.line.width,dashType:n.line.dashType}},r=i.linePoints;for(oi.fn.createVisual.call(this),e=0;e<r.length;e+=2)t=new Oi.Path(o).moveTo(r[e].x,r[e].y).lineTo(r[e+1].x,r[e+1].y),this.visual.append(t)}}),Te=Pe.extend({getAxis:function(){var e=this,t=e.chart,i=e.series,n=t.seriesValueAxis(i);return n}}),Re=Pe.extend({getAxis:function(){var e=this,t=e.chart,i=e.series,n=t.seriesAxes(i),o=e.isVertical?n.y:n.x;return o}}),Ie=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i),i.value=e,i.options=t,i.aboveAxis=Mi(i.options.aboveAxis,!0),i.tooltipTracking=!0},defaults:{vertical:!0,markers:{visible:!0,background:xr,size:Qn,type:an,border:{width:2},opacity:1},labels:{visible:!1,position:Ui,margin:wi(3),padding:wi(4),animation:{type:En,delay:Nn}},notes:{label:{}},highlight:{markers:{border:{}}}},render:function(){var e,t=this,i=t.options,n=i.markers,o=i.labels,r=t.value;t._rendered||(t._rendered=!0,n.visible&&n.size&&(t.marker=t.createMarker(),t.append(t.marker)),o.visible&&(o.template?(e=Kt(o.template),r=e({dataItem:t.dataItem,category:t.category,value:t.value,percentage:t.percentage,stackValue:this.stackValue,series:t.series})):o.format&&(r=t.formatValue(o.format)),t.label=new mi(r,Xt({align:on,vAlign:on,margin:{left:5,right:5},zIndex:Mi(o.zIndex,this.series.zIndex)},o)),t.append(t.label)),t.createNote(),t.errorBar&&t.append(t.errorBar))},markerBorder:function(){var e=this.options.markers,t=e.background,i=Xt({color:this.color},e.border);return Ri(i.color)||(i.color=new ri(t).brightness(Xi).toHex()),i},createVisual:Ft,createMarker:function(){var e=this.options.markers,t=new di({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:this.markerBorder(),opacity:e.opacity,zIndex:Mi(e.zIndex,this.series.zIndex),animation:e.animation,visual:e.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});return t},markerBox:function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},reflow:function(e){var t,i,n,o,r=this,a=r.options,s=a.vertical,l=r.aboveAxis;if(r.render(),r.box=e,t=e.clone(),s?l?t.y1-=t.height():t.y2+=t.height():l?t.x1+=t.width():t.x2-=t.width(),r._childBox=t,r.marker&&r.marker.reflow(t),r.reflowLabel(t),r.errorBars)for(n=0;n<r.errorBars.length;n++)r.errorBars[n].reflow(t);r.note&&(o=r.markerBox(),a.markers.visible&&a.markers.size||(i=o.center(),o=ii(i.x,i.y,i.x,i.y)),r.note.reflow(o))},reflowLabel:function(e){var t=this,i=t.options,n=t.label,o=i.labels.position;n&&(o=o===Ui?or:o,o=o===Wi?Qi:o,n.reflow(e),n.box.alignTo(t.markerBox(),o),n.reflow(n.box))},createHighlight:function(){var e=this.options.highlight,t=e.markers,i=this.markerBorder().color,n=this.options.markers,o=new di({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:t.color||i,border:{color:t.border.color,width:t.border.width,opacity:Mi(t.border.opacity,1)},opacity:Mi(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},highlightVisual:function(){return(this.marker||{}).visual},highlightVisualArgs:function(){var e,t,i,n,o,r=this.marker;return r?(t=r.paddingBox.toRect(),e=r.visual):(i=this.options.markers.size,n=i/2,o=this.box.center(),t=new zi.Rect([o.x-n,o.y-n],[i,i])),{options:this.options,rect:t,visual:e}},tooltipAnchor:function(e,t){var i=this,n=i.markerBox(),o=i.aboveAxis,r=n.x2+ar,a=o?n.y1-t:n.y2,s=i.owner.pane.clipBox(),l=!s||s.overlaps(n);if(l)return ui(r,a)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)},overlapsBox:function(e){var t=this.markerBox();return t.overlaps(e)}}),Xt(Ie.fn,de),Xt(Ie.fn,ge),Ve=Ie.extend({init:function(e,t){var i=this;Ie.fn.init.call(i,e,t),i.category=e.category},defaults:{labels:{position:on},highlight:{opacity:1,border:{width:1,opacity:1}}},createHighlight:function(){var e=this.options.highlight,t=e.border,i=this.options.markers,n=this.box.center(),o=i.size/2-t.width/2,r=new Oi.Circle(new zi.Circle([n.x,n.y],o),{stroke:{color:t.color||new ri(i.background).brightness(Xi).toHex(),width:t.width,opacity:t.opacity},fill:{color:i.background,opacity:e.opacity}});return r}}),Be=oi.extend({init:function(e,t,i){var n=this;oi.fn.init.call(n),n.linePoints=e,n.series=t,n.seriesIx=i},options:{closed:!1},points:function(e){var t,i,n=this,o=n.linePoints.concat(e||[]),r=[];for(t=0,i=o.length;t<i;t++)o[t].visible!==!1&&r.push(o[t]._childBox.toRect().center());return r},createVisual:function(){var e,t=this.options,i=this.series,n=i._defaults,o=i.color;Zt(o)&&n&&(o=n.color),e=Oi.Path.fromPoints(this.points(),{stroke:{color:o,width:i.width,opacity:i.opacity,dashType:i.dashType},zIndex:i.zIndex}),t.closed&&e.close(),this.visual=e},aliasFor:function(e,t){var i=this,n=i.seriesIx;return i.parent.getNearestPoint(t.x,t.y,n)}}),Le={renderSegments:function(){var e,t,i,n,o,r,a,s,l=this,c=l.options,h=c.series,u=l.seriesPoints,p=u.length;for(this._segments=[],t=0;t<p;t++){for(e=h[t],i=l.sortPoints(u[t]),a=i.length,n=[],r=0;r<a;r++)o=i[r],o?n.push(o):l.seriesMissingValues(e)!==qn&&(n.length>1&&(s=l.createSegment(n,e,t,s),this._addSegment(s)),n=[]);n.length>1&&(s=l.createSegment(n,e,t,s),this._addSegment(s))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(e){this._segments.push(e),e.parent=this},sortPoints:function(e){return e},seriesMissingValues:function(e){var t=e.missingValues,i=!t&&this.options.isStacked;return i?br:t||qn},getNearestPoint:function(e,t,i){var n,o,r,a,s,l=new ui(e,t),c=this.seriesPoints[i],h=io;for(o=0;o<c.length;o++)r=c[o],r&&Ri(r.value)&&null!==r.value&&r.visible!==!1&&(a=r.box,s=a.center().distanceTo(l),s<h&&(n=r,h=s));return n}},Ee={createAnimation:function(){var e,t,i=this.getRoot();i&&(i.options||{}).transitions!==!1&&(e=i.box,t=Oi.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Me(t,{box:e}),X(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(e){var t,i,n=this.animationPoints();for(i=0;i<n.length;i++)t=n[i],t&&t.visual&&Ri(t.visual.options.zIndex)&&t.visual.clip(e)}},De=_e.extend({render:function(){var e=this;_e.fn.render.apply(e),e.updateStackRange(),e.renderSegments()},pointType:function(){return Ie},createPoint:function(e,t){var i,n,o,r=this,a=t.categoryIx,s=t.category,l=t.series,c=t.seriesIx,h=e.valueFields.value,u=r.seriesMissingValues(l);if(!Ri(h)||null===h){if(u!==br)return null;h=0}return n=this.pointOptions(l,c),n=r.evalPointOptions(n,h,s,a,l,c),o=e.fields.color||l.color,Nt.isFunction(l.color)&&(o=n.color),i=new Ie(h,n),i.color=o,r.append(i),i},plotRange:function(e){var t,i,n,o,r=this.plotValue(e);if(this.options.isStacked)for(t=e.categoryIx,i=this.categoryPoints[t],n=0;n<i.length&&(o=i[n],e!==o);n++)r+=this.plotValue(o),this.options.isStacked100&&(r=Ot.min(r,1));return[r,r]},createSegment:function(e,t,i){var n,o=t.style;return new(n=o===No?ze:o===jo?Oe:Be)(e,t,i)},animationPoints:function(){var e,t=this.points,i=[];for(e=0;e<t.length;e++)i.push((t[e]||{}).marker);return i.concat(this._segments)}}),Xt(De.fn,Le,Ee),Me=Oi.Animation.extend({options:{duration:Nn},setup:function(){this._setEnd(this.options.box.x1)},step:function(e){var t=this.options.box;this._setEnd(ki(t.x1,t.x2,e))},_setEnd:function(e){var t=this.element,i=t.segments,n=i[1].anchor(),o=i[2].anchor();t.suspend(),n.setX(e),t.resume(),o.setX(e)}}),Oi.AnimationFactory.current.register(ln,Me),ze=Be.extend({points:function(e){var t,i=this;return t=i.calculateStepPoints(i.linePoints),e&&e.length&&(t=t.concat(i.calculateStepPoints(e).reverse())),t},calculateStepPoints:function(e){var t,i,n,o,r,a=this,s=a.parent,l=s.plotArea,c=l.seriesCategoryAxis(a.series),h=s.seriesMissingValues(a.series)===qn,u=e.length,p=c.options.reverse,f=c.options.vertical,d=p?2:1,g=p?1:2,m=[];for(n=1;n<u;n++)t=e[n-1],i=e[n],o=t.markerBox().center(),r=i.markerBox().center(),c.options.justified?(m.push(new zi.Point(o.x,o.y)),m.push(f?new zi.Point(o.x,r.y):new zi.Point(r.x,o.y)),m.push(new zi.Point(r.x,r.y))):f?(m.push(new zi.Point(o.x,t.box[yr+d])),m.push(new zi.Point(o.x,t.box[yr+g])),h&&m.push(new zi.Point(o.x,i.box[yr+d])),m.push(new zi.Point(r.x,i.box[yr+d])),m.push(new zi.Point(r.x,i.box[yr+g]))):(m.push(new zi.Point(t.box[vr+d],o.y)),m.push(new zi.Point(t.box[vr+g],o.y)),h&&m.push(new zi.Point(i.box[vr+d],o.y)),m.push(new zi.Point(i.box[vr+d],r.y)),m.push(new zi.Point(i.box[vr+g],r.y)));return m||[]}}),Oe=Be.extend({createVisual:function(){var e,t,i,n=this.series,o=n._defaults,r=n.color;Zt(r)&&o&&(r=o.color),e=new ai(this.options.closed),t=e.process(this.points()),i=new Oi.Path({stroke:{color:r,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),i.segments.push.apply(i.segments,t),this.visual=i}}),Fe={points:function(){var e,t,i=this,n=i.parent,o=n.plotArea,r=n.options.invertAxes,a=n.seriesValueAxis(i.series),s=a.lineBox(),l=o.seriesCategoryAxis(i.series),c=l.lineBox(),h=r?c.x1:c.y1,u=i.stackPoints,p=i._linePoints(u),f=r?vr:yr;return h=Vi(h,s[f+1],s[f+2]),!i.stackPoints&&p.length>1&&(e=p[0],t=Ii(p),r?(p.unshift(new zi.Point(h,e.y)),p.push(new zi.Point(h,t.y))):(p.unshift(new zi.Point(e.x,h)),p.push(new zi.Point(t.x,h)))),p},createVisual:function(){var e=this.series,t=e._defaults,i=e.color;Zt(i)&&t&&(i=t.color),this.visual=new Oi.Group({zIndex:e.zIndex}),this.createArea(i),this.createLine(i)},createLine:function(e){var t,i=this.series,n=Xt({color:e,opacity:i.opacity},i.line);n.visible!==!1&&n.width>0&&(t=Oi.Path.fromPoints(this._linePoints(),{stroke:{color:n.color,width:n.width,opacity:n.opacity,dashType:n.dashType,lineCap:"butt"}}),this.visual.append(t))},createArea:function(e){var t=this.series,i=Oi.Path.fromPoints(this.points(),{fill:{color:e,opacity:t.opacity},stroke:null});this.visual.append(i)}},Ue=Be.extend({init:function(e,t,i,n){var o=this;o.stackPoints=t,Be.fn.init.call(o,e,i,n)},_linePoints:Be.fn.points}),Xt(Ue.fn,Fe),He=De.extend({createSegment:function(e,t,i,n){var o,r,a,s=this,l=s.options,c=l.isStacked,h=(t.line||{}).style;return c&&i>0&&n&&(a=this.seriesMissingValues(t),o="gap"!=a?n.linePoints:this._gapStackPoints(e,i,h),h!==No&&(o=o.slice(0).reverse())),h===jo?new Ne(e,n,c,t,i):new(r=h===No?je:Ue)(e,o,t,i)},reflow:function(e){var t,i,n,o;if(De.fn.reflow.call(this,e),t=this._stackPoints)for(o=0;o<t.length;o++)i=t[o],n=this.categoryAxis.getSlot(i.categoryIx),i.reflow(n)},_gapStackPoints:function(e,t,i){var n,o,r,a,s=this.seriesPoints,l=e[0].categoryIx,c=l+e.length,h=[];for(this._stackPoints=this._stackPoints||[],a=l;a<c;a++){n=t;do n--,o=s[n][a];while(n>0&&!o);o?(i!==No&&a>l&&!s[n][a-1]&&h.push(this._previousSegmentPoint(a,a-1,n)),h.push(o),i!==No&&a+1<c&&!s[n][a+1]&&h.push(this._previousSegmentPoint(a,a+1,n))):(r=this._createGapStackPoint(a),this._stackPoints.push(r),h.push(r))}return h},_previousSegmentPoint:function(e,t,i){for(var n,o=this.seriesPoints;i>0&&!n;)i--,n=o[i][t];return n?n=o[i][e]:(n=this._createGapStackPoint(e),this._stackPoints.push(n)),n},_createGapStackPoint:function(e){var t=this.pointOptions({},0),i=new Ie(0,t);return i.categoryIx=e,i.series={},i},seriesMissingValues:function(e){return e.missingValues||br}}),Ne=Ue.extend({init:function(e,t,i,n,o){var r=this;r.prevSegment=t,r.isStacked=i,Be.fn.init.call(r,e,n,o)},strokeSegments:function(){var e,t,i=this._strokeSegments;return i||(e=new ai(this.options.closed),t=Be.fn.points.call(this),i=this._strokeSegments=e.process(t)),i},createVisual:function(){var e=this.series,t=e._defaults,i=e.color;Zt(i)&&t&&(i=t.color),this.visual=new Oi.Group({zIndex:e.zIndex}),this.createFill({fill:{color:i,opacity:e.opacity},stroke:null}),this.createStroke({stroke:Xt({color:i,opacity:e.opacity,lineCap:"butt"},e.line)})},createFill:function(t){var i,n,o,r,a,s=this.strokeSegments(),l=s.slice(0),c=this.prevSegment;this.isStacked&&c&&(i=c.strokeSegments(),n=Ii(i).anchor(),l.push(new Oi.Segment(n,n,Ii(s).anchor())),o=e.map(i,function(e){return new Oi.Segment(e.anchor(),e.controlOut(),e.controlIn())}).reverse(),Ti(l,o),r=l[0].anchor(),l.push(new Oi.Segment(r,r,Ii(o).anchor()))),a=new Oi.Path(t),a.segments.push.apply(a.segments,l),this.closeFill(a),this.visual.append(a)},closeFill:function(e){var t=this,i=t.parent,n=t.prevSegment,o=i.plotArea,r=i.options.invertAxes,a=i.seriesValueAxis(t.series),s=a.lineBox(),l=o.seriesCategoryAxis(t.series),c=l.lineBox(),h=r?c.x1:c.y1,u=r?vr:yr,p=t.strokeSegments(),f=p[0].anchor(),d=Ii(p).anchor();h=Vi(h,s[u+1],s[u+2]),i.options.isStacked&&n||!(p.length>1)||(r?e.lineTo(h,d.y).lineTo(h,f.y):e.lineTo(d.x,h).lineTo(f.x,h))},createStroke:function(e){if(e.stroke.width>0){var t=new Oi.Path(e);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)}}}),je=ze.extend({init:function(e,t,i,n){var o=this;o.stackPoints=t,ze.fn.init.call(o,e,i,n)},_linePoints:ze.fn.points}),Xt(je.fn,Fe),Ge=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i,t),i.plotArea=e,i.xAxisRanges={},i.yAxisRanges={},i.points=[],i.seriesPoints=[],i.seriesOptions=[],i._evalSeries=[],i.render()},options:{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0},render:function(){var e=this;e.traverseDataPoints(Ht(e.addValue,e))},addErrorBar:function(e,t,i){var n,o=this,r=e.value[t],a=t+"Value",s=t+"ErrorLow",l=t+"ErrorHigh",c=i.seriesIx,h=i.series,u=e.options.errorBars,p=i[s],f=i[l];B(r)&&(B(p)&&B(f)&&(n={low:p,high:f}),u&&Ri(u[a])&&(o.seriesErrorRanges=o.seriesErrorRanges||{x:[],y:[]},o.seriesErrorRanges[t][c]=o.seriesErrorRanges[t][c]||new ye(u[a],h,t),n=o.seriesErrorRanges[t][c].getErrorRange(r,u[a])),n&&o.addPointErrorBar(n,e,t))},addPointErrorBar:function(e,t,i){var n,o=this,r=e.low,a=e.high,s=t.series,l=i===yr,c=t.options.errorBars,h={};t[i+"Low"]=r,t[i+"High"]=a,t.errorBars=t.errorBars||[],n=new Re(r,a,l,o,s,c),t.errorBars.push(n),t.append(n),h[i]=r,o.updateRange(h,s),h[i]=a,o.updateRange(h,s)},addValue:function(e,t){var i,n=this,o=e.x,r=e.y,a=t.seriesIx,s=this.options.series[a],l=this.seriesMissingValues(s),c=n.seriesPoints[a];K(o)&&K(r)||(e=this.createMissingValue(e,l)),e&&(i=n.createPoint(e,t),i&&(Ut(i,t),n.addErrorBar(i,vr,t),n.addErrorBar(i,yr,t)),n.updateRange(e,t.series)),n.points.push(i),c.push(i)},seriesMissingValues:function(e){return e.missingValues},createMissingValue:Ft,updateRange:function(e,t){var i=this,n=e.x,o=e.y,r=t.xAxis,a=t.yAxis,s=i.xAxisRanges[r],l=i.yAxisRanges[a];K(n)&&(s=i.xAxisRanges[r]=s||{min:io,max:ro},typeof n===Yo&&(n=d(n)),s.min=Ot.min(s.min,n),s.max=Ot.max(s.max,n)),K(o)&&(l=i.yAxisRanges[a]=l||{min:io,max:ro},typeof o===Yo&&(o=d(o)),l.min=Ot.min(l.min,o),l.max=Ot.max(l.max,o))},evalPointOptions:function(e,t,i){var n=i.series,o=i.seriesIx,r={defaults:n._defaults,excluded:["data","tooltip","tempate","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[o];return Ri(a)||(this._evalSeries[o]=a=M(e,{},r,!0)),a&&(e=Xt({},e),M(e,{value:t,series:n,dataItem:i.dataItem},r)),e},pointType:function(){return Ie},pointOptions:function(e,t){var i,n=this.seriesOptions[t];return n||(i=this.pointType().fn.defaults,this.seriesOptions[t]=n=Xt({},i,{markers:{opacity:e.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},e)),n},createPoint:function(e,t){var i,n=this,o=t.series,r=this.pointOptions(o,t.seriesIx),a=t.color||o.color;return r=n.evalPointOptions(r,e,t),Nt.isFunction(o.color)&&(a=r.color),i=new Ie(e,r),i.color=a,n.append(i),i},seriesAxes:function(e){var t=this.plotArea,i=e.xAxis,n=i?t.namedXAxes[i]:t.axisX,o=e.yAxis,r=o?t.namedYAxes[o]:t.axisY;if(!n)throw Error("Unable to locate X axis with name "+i);if(!r)throw Error("Unable to locate Y axis with name "+o);
return{x:n,y:r}},reflow:function(e){var t,i,n=this,o=n.points,r=0,a=!n.options.clip;n.traverseDataPoints(function(e,s){t=o[r++],i=n.seriesAxes(s.series);var l,c=i.x.getSlot(e.x,e.x,a),h=i.y.getSlot(e.y,e.y,a);t&&(c&&h?(l=n.pointSlot(c,h),t.reflow(l)):t.visible=!1)}),n.box=e},pointSlot:function(e,t){return new ii(e.x1,t.y1,e.x2,t.y2)},traverseDataPoints:function(e){var t,i,n,o,r,a,s,l=this,c=l.options,h=c.series,u=l.seriesPoints;for(i=0;i<h.length;i++)for(n=h[i],o=u[i],o||(u[i]=[]),t=0;t<n.data.length;t++)r=this._bindPoint(n,i,t),a=r.valueFields,s=r.fields,e(a,Xt({pointIx:t,series:n,seriesIx:i,dataItem:n.data[t],owner:l},s))},_bindPoint:_e.fn._bindPoint,formatPointValue:function(e,t){var i=e.value;return yi(t,i.x,i.y)},animationPoints:function(){var e,t=this.points,i=[];for(e=0;e<t.length;e++)i.push((t[e]||{}).marker);return i}}),Xt(Ge.fn,Ee),qe=Ge.extend({render:function(){var e=this;Ge.fn.render.call(e),e.renderSegments()},createSegment:function(e,t,i){var n,o=t.style;return new(n=o===jo?Oe:Be)(e,t,i)},animationPoints:function(){var e=Ge.fn.animationPoints.call(this);return e.concat(this._segments)},createMissingValue:function(e,t){if(t===br){var i={x:e.x,y:e.y};return K(i.x)||(i.x=0),K(i.y)||(i.y=0),i}}}),Xt(qe.fn,Le),Ye=Ge.extend({init:function(e,t){this._maxSize=ro,Ge.fn.init.call(this,e,t)},options:{tooltip:{format:"{3}"},labels:{format:"{3}"}},addValue:function(e,t){null!==e.size&&(e.size>0||e.size<0&&t.series.negativeValues.visible)?(this._maxSize=Ot.max(this._maxSize,Ot.abs(e.size)),Ge.fn.addValue.call(this,e,t)):(this.points.push(null),this.seriesPoints[t.seriesIx].push(null))},reflow:function(e){var t=this;t.updateBubblesSize(e),Ge.fn.reflow.call(t,e)},pointType:function(){return Ve},createPoint:function(e,t){var i,n,o=this,r=t.series,a=r.data.length,s=t.pointIx*(Nn/a),l={delay:s,duration:Nn-s,type:Ji},c=t.color||r.color;return e.size<0&&r.negativeValues.visible&&(c=Mi(r.negativeValues.color,c)),n=Xt({labels:{animation:{delay:s,duration:Nn-s}}},this.pointOptions(r,t.seriesIx),{markers:{type:an,border:r.border,opacity:r.opacity,animation:l}}),n=o.evalPointOptions(n,e,t),Nt.isFunction(r.color)&&(c=n.color),n.markers.background=c,i=new Ve(e,n),i.color=c,o.append(i),i},updateBubblesSize:function(e){var t,i,n,o,r,a,s,l,c,h,u,p,f,d,g,m,x,v=this,y=v.options,_=y.series,b=Ot.min(e.width(),e.height());for(t=0;t<_.length;t++)for(n=_[t],o=v.seriesPoints[t],r=n.minSize||Ot.max(.02*b,10),a=n.maxSize||.2*b,s=r/2,l=a/2,c=Ot.PI*s*s,h=Ot.PI*l*l,u=h-c,p=u/v._maxSize,i=0;i<o.length;i++)f=o[i],f&&(d=Ot.abs(f.value.size)*p,g=Ot.sqrt((c+d)/Ot.PI),m=Mi(f.options.zIndex,0),x=m+(1-g/l),Xt(f.options,{zIndex:x,markers:{size:2*g,zIndex:x},labels:{zIndex:x+1}}))},formatPointValue:function(e,t){var i=e.value;return yi(t,i.x,i.y,i.size,e.category)},createAnimation:Ft,createVisual:Ft}),Xe=oi.extend({init:function(e,t){oi.fn.init.call(this,t),this.value=e},options:{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:On},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{4:d}</th><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:{}}},reflow:function(e){var t,i,n,o=this,r=o.options,a=o.owner,s=o.value,l=a.seriesValueAxis(r),c=[];i=l.getSlot(s.open,s.close),n=l.getSlot(s.low,s.high),i.x1=n.x1=e.x1,i.x2=n.x2=e.x2,o.realBody=i,t=n.center().x,c.push([[t,n.y1],[t,i.y1]]),c.push([[t,i.y2],[t,n.y2]]),o.lines=c,o.box=n.clone().wrap(i),o._rendered||(o._rendered=!0,o.createNote()),o.reflowNote()},reflowNote:function(){var e=this;e.note&&e.note.reflow(e.box)},createVisual:function(){oi.fn.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mainVisual:function(e){var t=new Oi.Group;return this.createBody(t,e),this.createLines(t,e),t},createBody:function(e,i){var n=Oi.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:i.opacity},stroke:null});i.border.width>0&&n.options.set("stroke",{color:this.getBorderColor(),width:i.border.width,dashType:i.border.dashType,opacity:Mi(i.border.opacity,i.opacity)}),vi(n),e.append(n),Y(i)&&e.append(this.createGradientOverlay(n,{baseColor:this.color},Xt({end:i.vertical?t:[0,1]},i.overlay)))},createLines:function(e,t){this.drawLines(e,t,this.lines,t.line)},drawLines:function(e,t,i,n){var o,r,a;if(i)for(o={stroke:{color:n.color||this.color,opacity:Mi(n.opacity,t.opacity),width:n.width,dashType:n.dashType,lineCap:"butt"}},r=0;r<i.length;r++)a=Oi.Path.fromPoints(i[r],o),vi(a),e.append(a)},getBorderColor:function(){var e=this,t=e.options,i=t.border,n=i.color;return Ri(n)||(n=new ri(e.color).brightness(i._brightness).toHex()),n},createOverlay:function(){var e=Oi.Path.fromRect(this.box.toRect(),{fill:{color:xr,opacity:0},stroke:null});this.visual.append(e)},createHighlight:function(){var e,t=this.options.highlight,i=this.color;return this.color=t.color||this.color,e=this.mainVisual(Xt({},this.options,{line:{color:this.getBorderColor()}},t)),this.color=i,e},highlightVisual:function(){return this._mainVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},tooltipAnchor:function(){var e=this,t=e.box,i=e.owner.pane.clipBox()||t;return new ui(t.x2+ar,Ot.max(t.y1,i.y1)+ar)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)},overlapsBox:function(e){return this.box.overlaps(e)}}),Xt(Xe.fn,de),Xt(Xe.fn,ge),We=_e.extend({options:{},reflowCategories:function(e){var t,i=this,n=i.children,o=n.length;for(t=0;t<o;t++)n[t].reflow(e[t])},addValue:function(e,t){var i,n,o=this,r=t.categoryIx,a=t.category,s=t.series,l=t.seriesIx,c=o.options,h=e.valueFields,u=o.children,p=o.splitValue(h),f=E(p),d=o.categoryPoints[r],g=s.data[r];d||(o.categoryPoints[r]=d=[]),f&&(i=o.createPoint(e,t)),n=u[r],n||(n=new pe({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),o.append(n)),i&&(o.updateRange(h,t),n.append(i),i.categoryIx=r,i.category=a,i.series=s,i.seriesIx=l,i.owner=o,i.dataItem=g,i.noteText=e.fields.noteText),o.points.push(i),d.push(i)},pointType:function(){return Xe},createPoint:function(e,t){var i,n=this,o=t.categoryIx,r=t.category,a=t.series,s=t.seriesIx,l=e.valueFields,c=Xt({},a),h=n.pointType(),u=e.fields.color||a.color;return c=n.evalPointOptions(c,l,r,o,a,s),a.type==tn&&l.open>l.close&&(u=e.fields.downColor||a.downColor||a.color),Nt.isFunction(a.color)&&(u=c.color),c.vertical=!n.options.invertAxes,i=new h(l,c),i.color=u,i},splitValue:function(e){return[e.low,e.open,e.close,e.high]},updateRange:function(e,t){var i=this,n=t.series.axis,o=i.valueAxisRanges[n],r=i.splitValue(e);o=i.valueAxisRanges[n]=o||{min:io,max:ro},o=i.valueAxisRanges[n]={min:Ot.min.apply(Ot,r.concat([o.min])),max:Ot.max.apply(Ot,r.concat([o.max]))}},formatPointValue:function(e,t){var i=e.value;return yi(t,i.open,i.high,i.low,i.close,e.category)},animationPoints:function(){return this.points}}),Xt(We.fn,Ee),Ze=Xe.extend({reflow:function(e){var t,i,n,o,r=this,a=r.options,s=r.owner,l=r.value,c=s.seriesValueAxis(a),h=[],u=[],p=[];o=c.getSlot(l.low,l.high),i=c.getSlot(l.open,l.open),n=c.getSlot(l.close,l.close),i.x1=n.x1=o.x1=e.x1,i.x2=n.x2=o.x2=e.x2,t=o.center().x,h.push([i.x1,i.y1]),h.push([t,i.y1]),u.push([t,n.y1]),u.push([n.x2,n.y1]),p.push([t,o.y1]),p.push([t,o.y2]),r.lines=[h,u,p],r.box=o.clone().wrap(i.clone().wrap(n)),r.reflowNote()},createBody:e.noop}),Ke=We.extend({pointType:function(){return Ze}}),Qe=We.extend({addValue:function(e,t){var i,n,o=this,r=t.categoryIx,a=t.category,s=t.series,l=t.seriesIx,c=o.options,h=o.children,u=e.valueFields,p=o.splitValue(u),f=E(p),d=o.categoryPoints[r],g=s.data[r];d||(o.categoryPoints[r]=d=[]),f&&(i=o.createPoint(e,t)),n=h[r],n||(n=new pe({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing}),o.append(n)),i&&(o.updateRange(u,t),n.append(i),i.categoryIx=r,i.category=a,i.series=s,i.seriesIx=l,i.owner=o,i.dataItem=g),o.points.push(i),d.push(i)},pointType:function(){return this.options.invertAxes?Je:$e},splitValue:function(e){return[e.lower,e.q1,e.median,e.q3,e.upper]},updateRange:function(e,t){var i=this,n=t.series.axis,o=i.valueAxisRanges[n],r=i.splitValue(e).concat(i.filterOutliers(e.outliers));Ri(e.mean)&&(r=r.concat(e.mean)),o=i.valueAxisRanges[n]=o||{min:io,max:ro},o=i.valueAxisRanges[n]={min:Ot.min.apply(Ot,r.concat([o.min])),max:Ot.max.apply(Ot,r.concat([o.max]))}},formatPointValue:function(e,t){var i=e.value;return yi(t,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,e.category)},filterOutliers:function(e){var t,i,n=(e||[]).length,o=[];for(t=0;t<n;t++)i=e[t],Ri(i)&&I(o,i);return o}}),$e=Xe.extend({init:function(e,t){var i=this;oi.fn.init.call(i,t),i.value=e,i.createNote()},options:{border:{_brightness:.8},line:{width:2},mean:{width:2,dashType:"dash"},overlay:{gradient:On},tooltip:{format:"<table style='text-align: left;'><th colspan='2'>{6:d}</th><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:Qn,type:pn,background:xr,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:Qn,type:an,background:xr,border:{width:2,opacity:1},opacity:0}},reflow:function(e){var t,i,n,o,r=this,a=r.options,s=r.owner,l=r.value,c=s.seriesValueAxis(a);r.boxSlot=i=c.getSlot(l.q1,l.q3),r.realBody=i,r.reflowBoxSlot(e),r.whiskerSlot=t=c.getSlot(l.lower,l.upper),r.reflowWhiskerSlot(e),n=c.getSlot(l.median),l.mean&&(o=c.getSlot(l.mean),r.meanPoints=r.calcMeanPoints(e,o)),r.whiskerPoints=r.calcWhiskerPoints(i,t),r.medianPoints=r.calcMedianPoints(e,n),r.box=t.clone().wrap(i),r.reflowNote()},reflowBoxSlot:function(e){this.boxSlot.x1=e.x1,this.boxSlot.x2=e.x2},reflowWhiskerSlot:function(e){this.whiskerSlot.x1=e.x1,this.whiskerSlot.x2=e.x2},calcMeanPoints:function(e,t){return[[[e.x1,t.y1],[e.x2,t.y1]]]},calcWhiskerPoints:function(e,t){var i=t.center().x;return[[[i-5,t.y1],[i+5,t.y1],[i,t.y1],[i,e.y1]],[[i-5,t.y2],[i+5,t.y2],[i,t.y2],[i,e.y2]]]},calcMedianPoints:function(e,t){return[[[e.x1,t.y1],[e.x2,t.y1]]]},renderOutliers:function(e){var t,i,n,o,r=this,a=e.markers||{},s=r.value,l=s.outliers||[],c=3*Ot.abs(s.q3-s.q1),h=[];for(o=0;o<l.length;o++)n=l[o],a=n<s.q3+c&&n>s.q1-c?e.outliers:e.extremes,t=Xt({},a.border),Ri(t.color)||(t.color=Ri(r.color)?r.color:new ri(a.background).brightness(Xi).toHex()),i=new di({type:a.type,width:a.size,height:a.size,rotation:a.rotation,background:a.background,border:t,opacity:a.opacity}),i.value=n,h.push(i);return this.reflowOutliers(h),h},reflowOutliers:function(e){var i,n,o,r=this.owner.seriesValueAxis(this.options),a=this.box.center();for(i=0;i<e.length;i++)n=e[i].value,o=r.getSlot(n),this.options.vertical?o.move(a.x):o.move(t,a.y),this.box=this.box.wrap(o),e[i].reflow(o)},mainVisual:function(e){var t,i,n=Xe.fn.mainVisual.call(this,e),o=this.renderOutliers(e);for(t=0;t<o.length;t++)i=o[t].getElement(),i&&n.append(i);return n},createLines:function(e,t){this.drawLines(e,t,this.whiskerPoints,t.line),this.drawLines(e,t,this.medianPoints,t.median),this.drawLines(e,t,this.meanPoints,t.mean)},getBorderColor:function(){return this.color?this.color:Xe.getBorderColor.call(this)}}),Xt($e.fn,de),Je=$e.extend({reflowBoxSlot:function(e){this.boxSlot.y1=e.y1,this.boxSlot.y2=e.y2},reflowWhiskerSlot:function(e){this.whiskerSlot.y1=e.y1,this.whiskerSlot.y2=e.y2},calcMeanPoints:function(e,t){return[[[t.x1,e.y1],[t.x1,e.y2]]]},calcWhiskerPoints:function(e,t){var i=t.center().y;return[[[t.x1,i-5],[t.x1,i+5],[t.x1,i],[e.x1,i]],[[t.x2,i-5],[t.x2,i+5],[t.x2,i],[e.x2,i]]]},calcMedianPoints:function(e,t){return[[[t.x1,e.y1],[t.x1,e.y2]]]}}),et=oi.extend({init:function(e,t,i){var n=this;n.value=e,n.sector=t,oi.fn.init.call(n,i)},options:{color:xr,overlay:{gradient:Io},border:{width:.5},labels:{visible:!1,distance:35,font:vn,margin:wi(.5),align:an,zIndex:1,position:_o},animation:{type:bo},highlight:{visible:!0,border:{width:1}},visible:!0},render:function(){var e,t=this,i=t.options,n=i.labels,o=t.value;t._rendered||t.visible===!1||(t._rendered=!0,n.template?(e=Kt(n.template),o=e({dataItem:t.dataItem,category:t.category,value:t.value,series:t.series,percentage:t.percentage})):n.format&&(o=yi(n.format,o)),n.visible&&o&&(t.label=new mi(o,Xt({},n,{align:on,vAlign:"",animation:{type:En,delay:t.animationDelay}})),t.append(t.label)))},reflow:function(e){var t=this;t.render(),t.box=e,t.reflowLabel()},reflowLabel:function(){var e,t,i,n,o=this,r=o.sector.clone(),a=o.options,s=o.label,l=a.labels,c=l.distance,h=r.middle();s&&(n=s.box.height(),i=s.box.width(),l.position==on?(r.r=Ot.abs((r.r-n)/2)+n,e=r.point(h),s.reflow(ii(e.x,e.y-n/2,e.x,e.y))):l.position==Gn?(r.r=r.r-n/2,e=r.point(h),s.reflow(ii(e.x,e.y-n/2,e.x,e.y))):(e=r.clone().expand(c).point(h),e.x>=r.c.x?(t=e.x+i,s.orientation=Ro):(t=e.x-i,s.orientation=Xn),s.reflow(ii(t,e.y-n,e.x,e.y))))},createVisual:function(){var e,t,i=this,n=i.sector,o=i.options;oi.fn.createVisual.call(this),i.value&&(o.visual?(e=(n.startAngle+180)%360,t=o.visual({category:i.category,dataItem:i.dataItem,value:i.value,series:i.series,percentage:i.percentage,center:new zi.Point(n.c.x,n.c.y),radius:n.r,innerRadius:n.ir,startAngle:e,endAngle:e+n.angle,options:o,createVisual:function(){var e=new Oi.Group;return i.createSegmentVisual(e),e}}),t&&i.visual.append(t)):i.createSegmentVisual(i.visual))},createSegmentVisual:function(e){var t,i=this,n=i.sector,o=i.options,r=o.border||{},a=r.width>0?{stroke:{color:r.color,width:r.width,opacity:r.opacity,dashType:r.dashType}}:{},s=o.color,l={color:s,opacity:o.opacity};t=i.createSegment(n,Xt({fill:l,stroke:{opacity:o.opacity},zIndex:o.zIndex},a)),e.append(t),Y(o)&&e.append(this.createGradientOverlay(t,{baseColor:s,fallbackFill:l},Xt({center:[n.c.x,n.c.y],innerRadius:n.ir,radius:n.r,userSpace:!0},o.overlay)))},createSegment:function(e,t){return t.singleSegment?new Oi.Circle(new zi.Circle(new zi.Point(e.c.x,e.c.y),e.r),t):gi.current.createRing(e,t)},createAnimation:function(){var e=this.options,t=this.sector.c;Xt(e,{animation:{center:[t.x,t.y],delay:this.animationDelay}}),oi.fn.createAnimation.call(this)},createHighlight:function(e){var t=this,i=t.options.highlight||{},n=i.border||{};return t.createSegment(t.sector,Xt({},e,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:n.opacity,width:n.width,color:n.color}}))},highlightVisual:function(){return this.visual.children[0]},highlightVisualArgs:function(){var e=this.sector;return{options:this.options,radius:e.r,innerRadius:e.ir,center:new zi.Point(e.c.x,e.c.y),startAngle:e.startAngle,endAngle:e.angle+e.startAngle,visual:this.visual}},tooltipAnchor:function(e,t){var i=this,n=i.sector.adjacentBox(ar,e,t);return new ui(n.x1,n.y1)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),Xt(et.fn,de),tt={createLegendItem:function(e,t,i){var n,o,r,a,s,l=this,c=l.options.legend||{},h=c.labels||{},u=c.inactiveItems||{},p=u.labels||{};i&&i.visibleInLegend!==!1&&(s=i.visible!==!1,n=i.category||"",o=s?h.template:p.template||h.template,o&&(n=Kt(o)({text:n,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:e})),s?(a={},r=t.color):(a={color:p.color,font:p.font},r=(u.markers||{}).color),n&&l.legendItems.push({pointIndex:i.index,text:n,series:i.series,markerColor:r,labels:a}))}},it=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i,t),i.plotArea=e,i.points=[],i.legendItems=[],i.render()},options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4},inactiveItems:{markers:{},labels:{}}},render:function(){var e=this;e.traverseDataPoints(Ht(e.addValue,e))},traverseDataPoints:function(e){var t,i,n,o,r,a,s,l,c,h,u,p,f,d=this,g=d.options,m=d.plotArea.options.seriesColors||[],x=m.length,v=g.series,y=v.length,_=0;for(o=0;o<y;o++){for(t=v[o],a=t.data,u=q(t),s=360/u,p=Ri(t.startAngle)?t.startAngle:g.startAngle,o!=y-1&&t.labels.position==_o&&(t.labels.position=on),f=0;f<a.length;f++)i=oe.current.bindPoint(t,f),l=i.valueFields.value,c=Ot.abs(l),n=i.fields,r=c*s,h=1!=a.length&&!!n.explode,Zt(t.color)||(t.color=n.color||m[f%x]),e(l,new fi(null,0,0,p,r),{owner:d,category:n.category||"",index:_,series:t,seriesIx:o,dataItem:a[f],percentage:0!==u?c/u:0,explode:h,visibleInLegend:n.visibleInLegend,visible:n.visible,zIndex:y-o,animationDelay:d.animationDelay(f,o,y)}),i.fields.visible!==!1&&(p+=r),_++;_=0}},evalSegmentOptions:function(e,t,i){var n=i.series;M(e,{value:t,series:n,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:n._defaults,excluded:["data","template","visual","toggle"]})},addValue:function(e,t,i){var n,o=this,r=Xt({},i.series,{index:i.index});o.evalSegmentOptions(r,e,i),o.createLegendItem(e,r,i),i.visible!==!1&&(n=new et(e,t,r),Ut(n,i),o.append(n),o.points.push(n))},reflow:function(e){var t,i,n,o,r,a,s,l,c=this,h=c.options,u=e.clone(),p=5,f=Ot.min(u.width(),u.height()),d=f/2,g=f-.85*f,m=Mi(h.padding,g),x=ii(u.x1,u.y1,u.x1+f,u.y1+f),v=x.center(),y=c.seriesConfigs||[],_=u.center(),b=c.points,w=b.length,A=h.series.length,k=[],S=[];for(m=m>d-p?d-p:m,x.translate(_.x-v.x,_.y-v.y),a=d-m,l=ui(a+x.x1+m,a+x.y1+m),s=0;s<w;s++)o=b[s],r=o.sector,r.r=a,r.c=l,i=o.seriesIx,y.length&&(t=y[i],r.ir=t.ir,r.r=t.r),i==A-1&&o.explode&&(r.c=r.clone().radius(.15*r.r).point(r.middle())),o.reflow(x),n=o.label,n&&n.options.position===_o&&i==A-1&&(n.orientation===Ro?S.push(n):k.push(n));k.length>0&&(k.sort(c.labelComparator(!0)),c.leftLabelsReflow(k)),S.length>0&&(S.sort(c.labelComparator(!1)),c.rightLabelsReflow(S)),c.box=x},leftLabelsReflow:function(e){var t=this,i=t.distanceBetweenLabels(e);t.distributeLabels(i,e)},rightLabelsReflow:function(e){var t=this,i=t.distanceBetweenLabels(e);t.distributeLabels(i,e)},distanceBetweenLabels:function(e){var t,i,n,o=this,r=o.points,a=r[r.length-1],s=a.sector,l=e[0].box,c=e.length-1,h=s.r+a.options.labels.distance,u=[];for(i=Ci(l.y1-(s.c.y-h-l.height()-l.height()/2)),u.push(i),n=0;n<c;n++)l=e[n].box,t=e[n+1].box,i=Ci(t.y1-l.y2),u.push(i);return i=Ci(s.c.y+h-e[c].box.y2-e[c].box.height()/2),u.push(i),u},distributeLabels:function(e,t){var i,n,o,r,a=this,s=e.length;for(r=0;r<s;r++)for(n=o=r,i=-e[r];i>0&&(n>=0||o<s);)i=a._takeDistance(e,r,--n,i),i=a._takeDistance(e,r,++o,i);a.reflowLabels(e,t)},_takeDistance:function(e,t,i,n){if(e[i]>0){var o=Ot.min(e[i],n);n-=o,e[i]-=o,e[t]+=o}return n},reflowLabels:function(e,t){var i,n,o,r,a=this,s=a.points,l=s[s.length-1],c=l.sector,h=t.length,u=l.options.labels,p=u.distance,f=c.c.y-(c.r+p)-t[0].box.height();for(e[0]+=2,r=0;r<h;r++)i=t[r],f+=e[r],o=i.box,n=a.hAlignLabel(o.x2,c.clone().expand(p),f,f+o.height(),i.orientation==Ro),i.orientation==Ro?(u.align!==an&&(n=c.r+c.c.x+p),i.reflow(ii(n+o.width(),f,n,f))):(u.align!==an&&(n=c.c.x-c.r-p),i.reflow(ii(n-o.width(),f,n,f))),f+=o.height()},createVisual:function(){var e,t,i,n,r,a,s,l,c,h,u,p,f,d,g,m=this,x=m.options,v=x.connectors,y=m.points,_=y.length,b=4;for(oi.fn.createVisual.call(this),this._connectorLines=[],l=0;l<_;l++)r=y[l],i=r.sector,n=i.middle(),s=r.label,a={seriesId:r.seriesIx},t=(r.options.connectors||{}).color||v.color,s&&(e=new Oi.Path({stroke:{color:t,width:v.width},animation:{type:En,delay:r.animationDelay}}),s.options.position===_o&&0!==r.value&&(c=s.box,h=i.c,u=i.point(n),p=ui(c.x1,c.center().y),u=i.clone().expand(v.padding).point(n),e.moveTo(u.x,u.y),s.orientation==Ro?(d=ui(c.x1-v.padding,c.center().y),g=o(h,u,p,d),p=ui(d.x-b,d.y),g=g||p,g.x=Ot.min(g.x,p.x),m.pointInCircle(g,i.c,i.r+b)||g.x<i.c.x?(f=i.c.x+i.r+b,r.options.labels.align!==hn?f<p.x?e.lineTo(f,u.y):e.lineTo(u.x+2*b,u.y):e.lineTo(f,u.y),e.lineTo(p.x,d.y)):(g.y=d.y,e.lineTo(g.x,g.y))):(d=ui(c.x2+v.padding,c.center().y),g=o(h,u,p,d),p=ui(d.x+b,d.y),g=g||p,g.x=Ot.max(g.x,p.x),m.pointInCircle(g,i.c,i.r+b)||g.x>i.c.x?(f=i.c.x-i.r-b,r.options.labels.align!==hn?f>p.x?e.lineTo(f,u.y):e.lineTo(u.x-2*b,u.y):e.lineTo(f,u.y),e.lineTo(p.x,d.y)):(g.y=d.y,e.lineTo(g.x,g.y))),e.lineTo(d.x,d.y),this._connectorLines.push(e),this.visual.append(e)))},labelComparator:function(e){return e=e?-1:1,function(t,i){return t=(t.parent.sector.middle()+270)%360,i=(i.parent.sector.middle()+270)%360,(t-i)*e}},hAlignLabel:function(e,t,i,n,o){var r=t.c.x,a=t.c.y,s=t.r,l=Ot.min(Ot.abs(a-i),Ot.abs(a-n));return l>s?e:r+Ot.sqrt(s*s-l*l)*(o?1:-1)},pointInCircle:function(e,t,i){return u(t.x-e.x)+u(t.y-e.y)<u(i)},formatPointValue:function(e,t){return yi(t,e.value)},animationDelay:function(e){return e*wo}}),Xt(it.fn,tt),nt=et.extend({options:{overlay:{gradient:Vo},labels:{position:on},animation:{type:bo}},reflowLabel:function(){var e,t,i=this,n=i.sector.clone(),o=i.options,r=i.label,a=o.labels,s=n.middle();r&&(t=r.box.height(),a.position==on?(n.r-=(n.r-n.ir)/2,e=n.point(s),r.reflow(new ii(e.x,e.y-t/2,e.x,e.y))):et.fn.reflowLabel.call(i))},createSegment:function(e,t){return gi.current.createRing(e,t)}}),Xt(nt.fn,de),ot=it.extend({options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4}},addValue:function(e,t,i){var n,o=this,r=Xt({},i.series,{index:i.index});o.evalSegmentOptions(r,e,i),o.createLegendItem(e,r,i),e&&i.visible!==!1&&(n=new nt(e,t,r),Ut(n,i),o.append(n),o.points.push(n))},reflow:function(e){var t,i,n,o,r,a,s=this,l=s.options,c=e.clone(),h=5,u=Ot.min(c.width(),c.height()),p=u/2,f=u-.85*u,d=Mi(l.padding,f),g=l.series,m=g.length,x=0,v=0,y=0,_=0;for(s.seriesConfigs=[],d=d>p-h?p-h:d,n=p-d,r=0;r<m;r++)t=g[r],0===r&&Ri(t.holeSize)&&(i=t.holeSize,n-=t.holeSize),Ri(t.size)?n-=t.size:x++,Ri(t.margin)&&r!=m-1&&(n-=t.margin);for(Ri(i)||(_=(p-d)/(m+.75),i=.75*_,n-=i),y=i,r=0;r<m;r++)t=g[r],o=Mi(t.size,n/x),y+=v,a=y+o,s.seriesConfigs.push({ir:y,r:a}),v=t.margin||0,y=a;it.fn.reflow.call(s,e)},animationDelay:function(e,t,i){return e*kn+Nn*(t+1)/(i+1)}}),rt=be.extend({render:function(){be.fn.render.call(this),this.createSegments()},traverseDataPoints:function(e){var t,i,n,o,r,a,s,l,c,u,p=this.options.series,f=this.categoryAxis.options.categories||[],d=h(p),g=!this.options.invertAxes;for(t=0;t<p.length;t++)for(i=p[t],n=0,o=0,r=0;r<d;r++)a=oe.current.bindPoint(i,r),s=a.valueFields.value,l=a.fields.summary,c=n,l?"total"===l.toLowerCase()?(a.valueFields.value=n,c=0,u=n):(a.valueFields.value=o,u=c-o,o=0):B(s)&&(o+=s,n+=s,u=n),e(a,{category:f[r],categoryIx:r,series:i,seriesIx:t,total:n,runningTotal:o,from:c,to:u,isVertical:g})},updateRange:function(e,t){be.fn.updateRange.call(this,{value:t.to},t)},aboveAxis:function(e){return e.value>=0},plotRange:function(e){return[e.from,e.to]},createSegments:function(){var e,t,i,n,o,r,a,s=this.options.series,l=this.seriesPoints,c=this.segments=[];for(e=0;e<s.length;e++)if(t=s[e],i=l[e])for(o=0;o<i.length;o++)r=i[o],r&&n&&(a=new at(n,r,t),c.push(a),this.append(a)),n=r}}),at=oi.extend({init:function(e,t,i){var n=this;oi.fn.init.call(n),n.from=e,n.to=t,n.series=i},options:{animation:{type:En,delay:Nn}},linePoints:function(){var e,t,i=[],n=this.from,o=n.box,r=this.to.box;return n.isVertical?(e=n.aboveAxis?o.y1:o.y2,i.push([o.x1,e],[r.x2,e])):(t=n.aboveAxis?o.x2:o.x1,i.push([t,o.y1],[t,r.y2])),i},createVisual:function(){var e,t;oi.fn.createVisual.call(this),e=this.series.line||{},t=Oi.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}}),vi(t),this.visual.append(t)}}),st=ni.extend({init:function(e){var t=this;ni.fn.init.call(t,e),e=t.options,t.id=Nt.guid(),t.createTitle(),t.content=new oi,t.chartContainer=new lt({},t),t.append(t.content),t.axes=[],t.charts=[]},options:{zIndex:-1,shrinkToFit:!0,title:{align:Xn},visible:!0},createTitle:function(){var e=this,t=e.options.title;typeof t===vo&&(t=Xt({},t,{align:t.position,position:or})),e.title=xi.buildTitle(t,e,st.fn.options.title)},appendAxis:function(e){var t=this;t.content.append(e),t.axes.push(e),e.pane=t},appendChart:function(e){var t=this;t.chartContainer.parent!==t.content&&t.content.append(t.chartContainer),t.charts.push(e),t.chartContainer.append(e),e.pane=t},empty:function(){var e,t=this,i=t.parent;if(i){for(e=0;e<t.axes.length;e++)i.removeAxis(t.axes[e]);for(e=0;e<t.charts.length;e++)i.removeChart(t.charts[e])}t.axes=[],t.charts=[],t.content.destroy(),t.content.children=[],t.chartContainer.children=[]},reflow:function(e){var t,i=this;Ii(i.children)===i.content&&(t=i.children.pop()),ni.fn.reflow.call(i,e),t&&i.children.push(t),i.title&&(i.contentBox.y1+=i.title.box.height())},visualStyle:function(){var e=ni.fn.visualStyle.call(this);return e.zIndex=-10,e},renderComplete:function(){this.options.visible&&this.createGridLines()},stackRoot:i,clipRoot:i,createGridLines:function(){var e,t,i,n,o,r,a=this,s=a.axes,l=s.concat(a.parent.axes),c=[],h=[];for(t=0;t<s.length;t++)for(n=s[t],o=n.options.vertical,e=o?c:h,i=0;i<l.length;i++)0===e.length&&(r=l[i],o!==r.options.vertical&&Ti(e,n.createGridLines(r)))},refresh:function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=e.proxy(this.createGradient,this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete()},chartsBox:function(){var e,t,i,n,o,r=this.axes,a=r.length,s=new ii;for(n=0;n<a;n++)i=r[n],e=i.options.vertical?yr:vr,t=i.lineBox(),s[e+1]=t[e+1],s[e+2]=t[e+2];if(0===s.x2)for(o=this.parent.axes,a=o.length,n=0;n<a;n++)i=o[n],i.options.vertical||(t=i.lineBox(),s.x1=t.x1,s.x2=t.x2);return s},clipBox:function(){return this.chartContainer.clipBox}}),lt=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i,e),i.pane=t},shouldClip:function(){var e,t=this,i=t.children,n=i.length;for(e=0;e<n;e++)if(i[e].options.clip===!0)return!0;return!1},_clipBox:function(){return this.pane.chartsBox()},createVisual:function(){var e,t,i;this.visual=new Oi.Group({zIndex:0}),this.shouldClip()&&(e=this.clipBox=this._clipBox(),t=e.toRect(),i=Oi.Path.fromRect(t),this.visual.clip(i),this.unclipLabels())},stackRoot:i,unclipLabels:function(){var e,t,i,n,o,r,a,s=this,l=s.children,c=s.clipBox;for(i=0;i<l.length;i++)for(e=l[i].points||{},o=e.length,n=0;n<o;n++)t=e[n],t&&t.overlapsBox&&t.overlapsBox(c)&&(r=t.label,a=t.note,r&&r.options.visible&&(r.alignToClipBox&&r.alignToClipBox(c),r.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0))},destroy:function(){oi.fn.destroy.call(this),delete this.parent}}),ct=oi.extend({init:function(e,t){var i=this;oi.fn.init.call(i,t),i.series=e,i.initSeries(),i.charts=[],i.options.legend.items=[],i.axes=[],i.crosshairs=[],i.createPanes(),i.render(),i.createCrosshairs()},options:{series:[],plotArea:{margin:{}},background:"",border:{color:Zi,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}},initSeries:function(){var e,t,i=this.series;for(e=0;e<i.length;e++)t=i[e],t.index=e},createPanes:function(){function e(e,t){"string"==typeof e.title&&(e.title={text:e.title}),e.title=Xt({},t.title,e.title)}var t,i,n,o=this,r={title:{color:(o.options.title||{}).color}},a=[],s=o.options.panes||[],l=Ot.max(s.length,1);for(t=0;t<l;t++)n=s[t]||{},e(n,r),i=new st(n),i.paneIndex=t,a.push(i),o.append(i);o.panes=a},createCrosshairs:function(e){var t,i,n,o,r,a=this;for(e=e||a.panes,t=0;t<e.length;t++)for(n=e[t],i=0;i<n.axes.length;i++)o=n.axes[i],o.options.crosshair&&o.options.crosshair.visible&&(r=new wt(o,o.options.crosshair),a.crosshairs.push(r),n.content.append(r))},removeCrosshairs:function(e){var t,i,n=this,o=n.crosshairs,r=e.axes;for(t=o.length-1;t>=0;t--)for(i=0;i<r.length;i++)if(o[t].axis===r[i]){o.splice(t,1);break}},hideCrosshairs:function(){var e,t=this.crosshairs;for(e=0;e<t.length;e++)t[e].hide()},findPane:function(e){var t,i,n=this,o=n.panes;for(t=0;t<o.length;t++)if(o[t].options.name===e){i=o[t];break}return i||o[0]},findPointPane:function(e){var t,i,n=this,o=n.panes;for(t=0;t<o.length;t++)if(o[t].box.containsPoint(e)){i=o[t];break}return i},appendAxis:function(e){var t=this,i=t.findPane(e.options.pane);i.appendAxis(e),t.axes.push(e),e.plotArea=t},removeAxis:function(e){var t,i,n=this,o=[];for(t=0;t<n.axes.length;t++)i=n.axes[t],e!==i?o.push(i):i.destroy();n.axes=o},appendChart:function(e,t){var i=this;i.charts.push(e),t?t.appendChart(e):i.append(e)},removeChart:function(e){var t,i,n=this,o=[];for(t=0;t<n.charts.length;t++)i=n.charts[t],i!==e?o.push(i):i.destroy();n.charts=o},addToLegend:function(e){var t,i,n,o,r,a,s,l,c,h=e.length,u=[],p=this.options.legend,f=p.labels||{},d=p.inactiveItems||{},g=d.labels||{};for(t=0;t<h;t++)i=e[t],l=i.visible!==!1,i.visibleInLegend!==!1&&(n=i.name||"",c=l?f.template:g.template||f.template,c&&(n=Kt(c)({text:n,series:i})),o=i.color,s=i._defaults,Zt(o)&&s&&(o=s.color),l?(r={},a=o):(r={color:g.color,font:g.font},a=d.markers.color),n&&u.push({text:n,labels:r,markerColor:a,series:i,active:l}));Ti(p.items,u)},groupAxes:function(e){var t,i,n,o,r=[],a=[];for(n=0;n<e.length;n++)for(t=e[n].axes,o=0;o<t.length;o++)i=t[o],i.options.vertical?a.push(i):r.push(i);return{x:r,y:a,any:r.concat(a)}},groupSeriesByPane:function(){var e,t,i,n=this,o=n.series,r={};for(e=0;e<o.length;e++)i=o[e],t=n.seriesPaneName(i),r[t]?r[t].push(i):r[t]=[i];return r},filterVisibleSeries:function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],i.visible!==!1&&n.push(i);return n},reflow:function(e){var t=this,i=t.options.plotArea,n=t.panes,o=wi(i.margin);t.box=e.clone().unpad(o),t.reflowPanes(),t.reflowAxes(n),t.reflowCharts(n)},redraw:function(e){var t,i=this;for(e=[].concat(e),this.initSeries(),t=0;t<e.length;t++)i.removeCrosshairs(e[t]),e[t].empty();for(i.render(e),i.reflowAxes(i.panes),i.reflowCharts(e),i.createCrosshairs(e),t=0;t<e.length;t++)e[t].refresh()},axisCrossingValues:function(e,t){var i,n=e.options,o=[].concat(n.axisCrossingValues||n.axisCrossingValue),r=t.length-o.length,a=o[0]||0;for(i=0;i<r;i++)o.push(a);return o},alignAxisTo:function(e,t,i,n){var o=e.getSlot(i,i,!0),r=e.options.reverse?2:1,a=t.getSlot(n,n,!0),s=t.options.reverse?2:1,l=e.box.translate(a[vr+s]-o[vr+r],a[yr+s]-o[yr+r]);e.pane!==t.pane&&l.translate(0,e.pane.box.y1-t.pane.box.y1),e.reflow(l)},alignAxes:function(e,t){var i,n,o,r,a,s,l=this,c=e[0],h=t[0],u=l.axisCrossingValues(c,t),p=l.axisCrossingValues(h,e),f={},d={},g={},m={};for(s=0;s<t.length;s++)a=t[s],o=a.pane,r=o.id,i=ie(e,o)||c,n=u,i!==c&&(n=l.axisCrossingValues(i,t)),l.alignAxisTo(a,i,p[s],n[s]),a.options._overlap||(Ci(a.lineBox().x1)===Ci(i.lineBox().x1)&&(f[r]&&a.reflow(a.box.alignTo(f[r].box,Xn).translate(-a.options.margin,0)),f[r]=a),Ci(a.lineBox().x2)===Ci(i.lineBox().x2)&&(a._mirrored||(a.options.labels.mirror=!a.options.labels.mirror,a._mirrored=!0),l.alignAxisTo(a,i,p[s],n[s]),d[r]&&a.reflow(a.box.alignTo(d[r].box,Ro).translate(a.options.margin,0)),d[r]=a),0!==s&&h.pane===a.pane&&(a.alignTo(h),a.reflow(a.box)));for(s=0;s<e.length;s++)a=e[s],o=a.pane,r=o.id,i=ie(t,o)||h,n=p,i!==h&&(n=l.axisCrossingValues(i,e)),l.alignAxisTo(a,i,u[s],n[s]),a.options._overlap||(Ci(a.lineBox().y1)===Ci(i.lineBox().y1)&&(a._mirrored||(a.options.labels.mirror=!a.options.labels.mirror,a._mirrored=!0),l.alignAxisTo(a,i,u[s],n[s]),g[r]&&a.reflow(a.box.alignTo(g[r].box,or).translate(0,-a.options.margin)),g[r]=a),Ci(a.lineBox().y2,un)===Ci(i.lineBox().y2,un)&&(m[r]&&a.reflow(a.box.alignTo(m[r].box,Qi).translate(0,a.options.margin)),m[r]=a),0!==s&&(a.alignTo(c),a.reflow(a.box)))},shrinkAxisWidth:function(e){var t,i,n,o=this,r=o.groupAxes(e).any,a=P(r),s=0;for(t=0;t<e.length;t++)i=e[t],i.axes.length>0&&(s=Ot.max(s,a.width()-i.contentBox.width()));if(0!==s)for(t=0;t<r.length;t++)n=r[t],n.options.vertical||n.reflow(n.box.shrink(s,0))},shrinkAxisHeight:function(e){var t,i,n,o,r,a,s;for(t=0;t<e.length;t++)if(i=e[t],n=i.axes,o=Ot.max(0,P(n).height()-i.contentBox.height()),0!==o){for(r=0;r<n.length;r++)a=n[r],a.options.vertical&&a.reflow(a.box.shrink(0,o));s=!0}return s},fitAxes:function(e){var t,i,n,o,r,a,s,l,c=this,h=c.groupAxes(e).any,u=0;for(s=0;s<e.length;s++)if(r=e[s],
t=r.axes,i=r.contentBox,t.length>0)for(n=P(t),u=Ot.max(u,i.x1-n.x1),o=Ot.max(i.y1-n.y1,i.y2-n.y2),l=0;l<t.length;l++)a=t[l],a.reflow(a.box.translate(0,o));for(s=0;s<h.length;s++)a=h[s],a.reflow(a.box.translate(u,0))},reflowAxes:function(e){var t,i=this,n=i.groupAxes(e);for(t=0;t<e.length;t++)i.reflowPaneAxes(e[t]);n.x.length>0&&n.y.length>0&&(i.alignAxes(n.x,n.y),i.shrinkAxisWidth(e),i.autoRotateAxisLabels(n),i.alignAxes(n.x,n.y),i.shrinkAxisWidth(e)&&i.alignAxes(n.x,n.y),i.shrinkAxisHeight(e),i.alignAxes(n.x,n.y),i.shrinkAxisHeight(e)&&i.alignAxes(n.x,n.y),i.fitAxes(e))},autoRotateAxisLabels:function(e){var t,i,n,o=this.axes,r=this.panes;for(i=0;i<o.length;i++)t=o[i],t.autoRotateLabels()&&(n=!0);if(n){for(i=0;i<r.length;i++)this.reflowPaneAxes(r[i]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(r))}},reflowPaneAxes:function(e){var t,i=e.axes,n=i.length;if(n>0)for(t=0;t<n;t++)i[t].reflow(e.contentBox)},reflowCharts:function(e){var t,i,n=this,o=n.charts,r=o.length,a=n.box;for(i=0;i<r;i++)t=o[i].pane,t&&!Ai(t,e)||o[i].reflow(a)},reflowPanes:function(){var e,t,i,n,o,r=this,a=r.box,s=r.panes,l=s.length,c=a.height(),h=l,u=0,p=a.y1;for(e=0;e<l;e++)t=s[e],n=t.options.height,t.options.width=a.width(),t.options.height?(n.indexOf&&n.indexOf("%")&&(o=parseInt(n,10)/100,t.options.height=o*a.height()),t.reflow(a.clone()),c-=t.options.height):u++;for(e=0;e<l;e++)t=s[e],t.options.height||(t.options.height=c/u);for(e=0;e<l;e++)t=s[e],i=a.clone().move(a.x1,p),t.reflow(i),h--,p+=t.options.height},backgroundBox:function(){var e,t,i,n,o,r,a=this,s=a.axes,l=s.length;for(i=0;i<l;i++)for(o=s[i],n=0;n<l;n++)r=s[n],o.options.vertical!==r.options.vertical&&(e=o.lineBox().clone().wrap(r.lineBox()),t=t?t.wrap(e):e);return t||a.box},chartsBoxes:function(){var e,t=this.panes,i=[];for(e=0;e<t.length;e++)i.push(t[e].chartsBox());return i},addBackgroundPaths:function(e){var t,i=this.chartsBoxes();for(t=0;t<i.length;t++)e.paths.push(Oi.Path.fromRect(i[t].toRect()))},backgroundContainsPoint:function(e){var t,i=this.chartsBoxes();for(t=0;t<i.length;t++)if(i[t].containsPoint(e))return!0},createVisual:function(){var e,t,i,n,o;oi.fn.createVisual.call(this),e=this.options.plotArea,t=e.border||{},i=e.background,n=e.opacity,Pi.isTransparent(i)&&(i=xr,n=0),o=this._bgVisual=new Oi.MultiPath({fill:{color:i,opacity:n},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}),this.addBackgroundPaths(o),this.appendVisual(o)},pointsByCategoryIndex:function(e){var t,i,n,o,r,a=this.charts,s=[];if(null!==e)for(t=0;t<a.length;t++)if(r=a[t],"_navigator"!==r.pane.options.name&&(n=a[t].categoryPoints[e],n&&n.length))for(i=0;i<n.length;i++)o=n[i],o&&Ri(o.value)&&null!==o.value&&s.push(o);return s},pointsBySeriesIndex:function(e){return this.filterPoints(function(t){return t.series.index===e})},pointsBySeriesName:function(e){return this.filterPoints(function(t){return t.series.name===e})},filterPoints:function(e){var t,i,n,o,r,a=this.charts,s=[];for(n=0;n<a.length;n++)for(r=a[n],t=r.points,o=0;o<t.length;o++)i=t[o],i&&e(i)&&s.push(i);return s},findPoint:function(e){var t,i,n,o,r,a=this.charts;for(n=0;n<a.length;n++)for(r=a[n],t=r.points,o=0;o<t.length;o++)if(i=t[o],i&&e(i))return i},paneByPoint:function(e){var t,i,n=this,o=n.panes;for(i=0;i<o.length;i++)if(t=o[i],t.box.containsPoint(e))return t}}),ht={hover:function(e,t){this._dispatchEvent(e,t,ko)},click:function(e,t){this._dispatchEvent(e,t,Ao)}},ut=ct.extend({init:function(e,t){var i,n,o=this;if(o.namedCategoryAxes={},o.namedValueAxes={},o.valueAxisRangeTracker=new pt,e.length>0)for(o.invertAxes=Ai(e[0].type,[qi,en,dr,ur,Co,Un,pr]),i=0;i<e.length;i++)if(n=e[i].stack,n&&"100%"===n.type){o.stack100=!0;break}ct.fn.init.call(o,e,t)},options:{categoryAxis:{categories:[]},valueAxis:{}},render:function(e){var t=this;e=e||t.panes,t.createCategoryAxes(e),t.aggregateCategories(e),t.createCategoryAxesLabels(e),t.createCharts(e),t.createValueAxes(e)},removeAxis:function(e){var t=this,i=e.options.name;ct.fn.removeAxis.call(t,e),e instanceof ce?delete t.namedCategoryAxes[i]:(t.valueAxisRangeTracker.reset(i),delete t.namedValueAxes[i]),e===t.categoryAxis&&delete t.categoryAxis,e===t.valueAxis&&delete t.valueAxis},createCharts:function(e){var t,i,n,o,r,a,s=this.groupSeriesByPane();for(t=0;t<e.length;t++)if(i=e[t],n=s[i.options.name||"default"]||[],this.addToLegend(n),o=this.filterVisibleSeries(n))for(r=this.groupSeriesByCategoryAxis(o),a=0;a<r.length;a++)this.createChartGroup(r[a],i)},createChartGroup:function(e,t){this.createAreaChart(O(e,[Hi,ur]),t),this.createBarChart(O(e,[hn,qi]),t),this.createRangeBarChart(O(e,[Po,Co]),t),this.createBulletChart(O(e,[en,fr]),t),this.createCandlestickChart(O(e,tn),t),this.createBoxPlotChart(O(e,[$i,pr]),t),this.createOHLCChart(O(e,yo),t),this.createWaterfallChart(O(e,[gr,Un]),t),this.createLineChart(O(e,[Kn,dr]),t)},aggregateCategories:function(e){var t,i,n,o,r,a=this,s=a.srcSeries||a.series,l=[];for(t=0;t<s.length;t++)i=s[t],n=a.seriesCategoryAxis(i),o=a.findPane(n.options.pane),r=T(n.options.type,mn),(r||i.categoryField)&&Ai(o,e)?i=a.aggregateSeries(i,n):(B(n.options.min)||B(n.options.max))&&(i=a.filterSeries(i,n)),l.push(i);a.srcSeries=s,a.series=l},filterSeries:function(e,t){var i,n,o,r=t.totalRangeIndices(),a=t.options.justified,s=Ai(e.type,[Kn,dr,Hi,ur]);return r.min=B(t.options.min)?Ot.floor(r.min):0,r.max=B(t.options.max)?a?Ot.floor(r.max)+1:Ot.ceil(r.max):e.data.length,e=Xt({},e),s&&(n=r.min-1,o=t.options.srcCategories||[],n>=0&&n<e.data.length&&(i=n,e._outOfRangeMinPoint={item:e.data[i],category:o[i],categoryIx:-1}),r.max<e.data.length&&(i=r.max,e._outOfRangeMaxPoint={item:e.data[i],category:o[i],categoryIx:r.max-r.min})),t._seriesMax=Ot.max(t._seriesMax||0,e.data.length),e.data=(e.data||[]).slice(r.min,r.max),e},aggregateSeries:function(e,t){var i,o,r,a,s,l,c,h=t.options,u=T(t.options.type,mn),d=h.categories,g=h.srcCategories||d,m=e.data,x=[],v=Xt({},e),y=Xt({},e),_=h.dataItems||[],b=p,w=Pi.MIN_NUM,A=Pi.MAX_NUM,k=Ai(e.type,[Kn,dr,Hi,ur]);for(v.data=a=[],u&&(b=f),i=0;i<m.length;i++)o=e.categoryField?b(e.categoryField,m[i]):g[i],Ri(o)&&(r=t.categoryIndex(o),0<=r&&r<d.length?(x[r]=x[r]||[],x[r].push(i)):k&&(r<0?r==w?l.points.push(i):r>w&&(w=r,l={category:o,points:[i]}):r>=d.length&&(r==A?c.points.push(i):r<A&&(A=r,c={category:o,points:[i]}))));for(s=new Rt(y,oe.current,n.current),i=0;i<d.length;i++)a[i]=s.aggregatePoints(x[i],d[i]),x[i]&&(_[i]=a[i]);return l&&a.length&&(v._outOfRangeMinPoint={item:s.aggregatePoints(l.points,l.category),categoryIx:w,category:l.category}),c&&a.length&&(v._outOfRangeMaxPoint={item:s.aggregatePoints(c.points,c.category),categoryIx:A,category:c.category}),t.options.dataItems=_,v},appendChart:function(e,t){for(var i=this,n=e.options.series,o=i.seriesCategoryAxis(n[0]),r=o.options.categories,a=Ot.max(0,h(n)-r.length);a--;)r.push("");i.valueAxisRangeTracker.update(e.valueAxisRanges),ct.fn.appendChart.call(i,e,t)},seriesPaneName:function(t){var i=this,n=i.options,o=t.axis,r=[].concat(n.valueAxis),a=e.grep(r,function(e){return e.name===o})[0],s=n.panes||[{}],l=(s[0]||{}).name||"default",c=(a||{}).pane||l;return c},seriesCategoryAxis:function(e){var t=this,i=e.categoryAxis,n=i?t.namedCategoryAxes[i]:t.categoryAxis;if(!n)throw Error("Unable to locate category axis with name "+i);return n},stackableChartOptions:function(e,t){var i=e.stack,n=i&&"100%"===i.type,o=t.options.clip;return{isStacked:i,isStacked100:n,clip:o}},groupSeriesByCategoryAxis:function(t){function i(i,n){return e.grep(t,function(e){return 0===n&&!e.categoryAxis||e.categoryAxis==i})}var n,o,r,a={},s=e.map(t,function(e){var t=e.categoryAxis||"$$default$$";if(!a.hasOwnProperty(t))return a[t]=!0,t}),l=[];for(n=0;n<s.length;n++)o=s[n],r=i(o,n),0!==r.length&&l.push(r);return l},createBarChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new be(i,Ut({series:e,invertAxes:i.invertAxes,gap:n.gap,spacing:n.spacing},i.stackableChartOptions(n,t)));i.appendChart(o,t)}},createRangeBarChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new Ae(i,{series:e,invertAxes:i.invertAxes,gap:n.gap,spacing:n.spacing});i.appendChart(o,t)}},createBulletChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new ke(i,{series:e,invertAxes:i.invertAxes,gap:n.gap,spacing:n.spacing,clip:t.options.clip});i.appendChart(o,t)}},createLineChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new De(i,Ut({invertAxes:i.invertAxes,series:e},i.stackableChartOptions(n,t)));i.appendChart(o,t)}},createAreaChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new He(i,Ut({invertAxes:i.invertAxes,series:e},i.stackableChartOptions(n,t)));i.appendChart(o,t)}},createOHLCChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new Ke(i,{invertAxes:i.invertAxes,gap:n.gap,series:e,spacing:n.spacing,clip:t.options.clip});i.appendChart(o,t)}},createCandlestickChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new We(i,{invertAxes:i.invertAxes,gap:n.gap,series:e,spacing:n.spacing,clip:t.options.clip});i.appendChart(o,t)}},createBoxPlotChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new Qe(i,{invertAxes:i.invertAxes,gap:n.gap,series:e,spacing:n.spacing,clip:t.options.clip});i.appendChart(o,t)}},createWaterfallChart:function(e,t){if(0!==e.length){var i=this,n=e[0],o=new rt(i,{series:e,invertAxes:i.invertAxes,gap:n.gap,spacing:n.spacing});i.appendChart(o,t)}},axisRequiresRounding:function(e,t){var i,n,o,r,a=this,s=O(a.series,Pr);for(i=0;i<a.series.length;i++)o=a.series[i],o.type!==Kn&&o.type!==Hi||(r=o.line,r&&r.style===No&&s.push(o));for(i=0;i<s.length;i++)if(n=s[i].categoryAxis||"",n===e||!n&&0===t)return!0},aggregatedAxis:function(e,t){var i,n,o=this,r=o.series;for(i=0;i<r.length;i++)if(n=r[i].categoryAxis||"",(n===e||!n&&0===t)&&r[i].categoryField)return!0},createCategoryAxesLabels:function(){var e,t=this.axes;for(e=0;e<t.length;e++)t[e]instanceof ce&&t[e].createLabels()},createCategoryAxes:function(e){var t,i,n,o,r,a,s,l,c=this,h=c.invertAxes,u=[].concat(c.options.categoryAxis),p=[];for(t=0;t<u.length;t++)if(i=u[t],n=c.findPane(i.pane),Ai(n,e)){if(a=i.name,o=i.categories||[],r=i.type||"",i=Xt({vertical:h,axisCrossingValue:h?io:0,_deferLabels:!0},i),Ri(i.justified)||(i.justified=c.isJustified()),c.axisRequiresRounding(a,t)&&(i.justified=!1),s=N(i,o[0])?new he(i):new ce(i),a){if(c.namedCategoryAxes[a])throw Error("Category axis with name "+a+" is already defined");c.namedCategoryAxes[a]=s}s.axisIndex=t,p.push(s),c.appendAxis(s)}l=c.categoryAxis||p[0],c.categoryAxis=l,h?c.axisY=l:c.axisX=l},isJustified:function(){var e,t,i=this,n=i.series;for(e=0;e<n.length;e++)if(t=n[e],!Ai(t.type,[Hi,ur]))return!1;return!0},createValueAxes:function(e){var t,i,n,o,r,a,s,l,c,h=this,u=h.valueAxisRangeTracker,p=u.query(),f=[].concat(h.options.valueAxis),d=h.invertAxes,g={vertical:!d},m=[];for(h.stack100&&(g.roundToMajorUnit=!1,g.labels={format:"P0"}),c=0;c<f.length;c++)if(t=f[c],i=h.findPane(t.pane),Ai(i,e)){if(l=t.name,s=T(t.type,Jn)?{min:.1,max:1}:{min:0,max:1},r=u.query(l)||p||s,0===c&&r&&p&&(r.min=Ot.min(r.min,p.min),r.max=Ot.max(r.max,p.max)),a=T(t.type,Jn)?ci:hi,n=new a(r.min,r.max,Xt({},g,t)),l){if(h.namedValueAxes[l])throw Error("Value axis with name "+l+" is already defined");h.namedValueAxes[l]=n}n.axisIndex=c,m.push(n),h.appendAxis(n)}o=h.valueAxis||m[0],h.valueAxis=o,d?h.axisX=o:h.axisY=o},_dispatchEvent:function(e,t,i){var n,o,r,a=this,s=e._eventCoordinates(t),l=new ui(s.x,s.y),c=a.pointPane(l),h=[],u=[];if(c){for(n=c.axes,o=0;o<n.length;o++)r=n[o],r.getValue?I(u,r.getValue(l)):I(h,r.getCategory(l));0===h.length&&I(h,a.categoryAxis.getCategory(l)),h.length>0&&u.length>0&&e.trigger(i,{element:bi(t),originalEvent:t,category:C(h),value:C(u)})}},pointPane:function(e){var t,i,n=this,o=n.panes;for(i=0;i<o.length;i++)if(t=o[i],t.contentBox.containsPoint(e))return t},updateAxisOptions:function(e,t){var i=[].concat(e instanceof ce?this.options.categoryAxis:this.options.valueAxis);Xt(i[e.axisIndex],t)}}),Xt(ut.fn,ht),pt=jt.extend({init:function(){var e=this;e.axisRanges={}},update:function(e){var t,i,n,o=this,r=o.axisRanges;for(n in e)t=r[n],i=e[n],r[n]=t=t||{min:io,max:ro},t.min=Ot.min(t.min,i.min),t.max=Ot.max(t.max,i.max)},reset:function(e){this.axisRanges[e]=t},query:function(e){return this.axisRanges[e]}}),ft=ct.extend({init:function(e,t){var i=this;i.namedXAxes={},i.namedYAxes={},i.xAxisRangeTracker=new pt,i.yAxisRangeTracker=new pt,ct.fn.init.call(i,e,t)},options:{xAxis:{},yAxis:{}},render:function(e){var t,i,n,o,r=this,a=r.groupSeriesByPane();for(e=e||r.panes,t=0;t<e.length;t++)i=e[t],n=a[i.options.name||"default"]||[],r.addToLegend(n),o=r.filterVisibleSeries(n),o&&(r.createScatterChart(O(o,Bo),i),r.createScatterLineChart(O(o,Lo),i),r.createBubbleChart(O(o,Ji),i));r.createAxes(e)},appendChart:function(e,t){var i=this;i.xAxisRangeTracker.update(e.xAxisRanges),i.yAxisRangeTracker.update(e.yAxisRanges),ct.fn.appendChart.call(i,e,t)},removeAxis:function(e){var t=this,i=e.options.name;ct.fn.removeAxis.call(t,e),e.options.vertical?(t.yAxisRangeTracker.reset(i),delete t.namedYAxes[i]):(t.xAxisRangeTracker.reset(i),delete t.namedXAxes[i]),e===t.axisX&&delete t.axisX,e===t.axisY&&delete t.axisY},seriesPaneName:function(t){var i=this,n=i.options,o=t.xAxis,r=[].concat(n.xAxis),a=e.grep(r,function(e){return e.name===o})[0],s=t.yAxis,l=[].concat(n.yAxis),c=e.grep(l,function(e){return e.name===s})[0],h=n.panes||[{}],u=h[0].name||"default",p=(a||{}).pane||(c||{}).pane||u;return p},createScatterChart:function(e,t){var i=this;e.length>0&&i.appendChart(new Ge(i,{series:e,clip:t.options.clip}),t)},createScatterLineChart:function(e,t){var i=this;e.length>0&&i.appendChart(new qe(i,{series:e,clip:t.options.clip}),t)},createBubbleChart:function(e,t){var i=this;e.length>0&&i.appendChart(new Ye(i,{series:e,clip:t.options.clip}),t)},createXYAxis:function(e,t,i){var n,o,r,a,s,l,c,h,u=this,p=e.name,f=t?u.namedYAxes:u.namedXAxes,d=t?u.yAxisRangeTracker:u.xAxisRangeTracker,g=Xt({},e,{vertical:t}),m=T(g.type,Jn),x=d.query(),v=m?{min:.1,max:1}:{min:0,max:1},y=d.query(p)||x||v,_=u.series,b=[g.min,g.max];for(r=0;r<_.length;r++)if(a=_[r],s=a[t?"yAxis":"xAxis"],s==g.name||0===i&&!s){l=oe.current.bindPoint(a,0).valueFields,b.push(l[t?"y":"x"]);break}for(0===i&&x&&(y.min=Ot.min(y.min,x.min),y.max=Ot.max(y.max,x.max)),h=0;h<b.length;h++)if(b[h]instanceof Date){c=!0;break}if(o=T(g.type,mn)||!g.type&&c?ue:m?ci:hi,n=new o(y.min,y.max,g),p){if(f[p])throw Error((t?"Y":"X")+" axis with name "+p+" is already defined");f[p]=n}return u.appendAxis(n),n},createAxes:function(e){var t,i=this,n=i.options,o=[].concat(n.xAxis),r=[],a=[].concat(n.yAxis),s=[];Et(o,function(n){t=i.findPane(this.pane),Ai(t,e)&&r.push(i.createXYAxis(this,!1,n))}),Et(a,function(n){t=i.findPane(this.pane),Ai(t,e)&&s.push(i.createXYAxis(this,!0,n))}),i.axisX=i.axisX||r[0],i.axisY=i.axisY||s[0]},_dispatchEvent:function(e,t,i){var n,o,r,a,s=this,l=e._eventCoordinates(t),c=new ui(l.x,l.y),h=s.axes,u=h.length,p=[],f=[];for(n=0;n<u;n++)o=h[n],a=o.options.vertical?f:p,r=o.getValue(c),null!==r&&a.push(r);p.length>0&&f.length>0&&e.trigger(i,{element:bi(t),originalEvent:t,x:C(p),y:C(f)})},updateAxisOptions:function(e,t){var i=e.options.vertical,n=this.groupAxes(this.panes),o=F(e,i?n.y:n.x),r=[].concat(i?this.options.yAxis:this.options.xAxis)[o];Xt(r,t)}}),Xt(ft.fn,ht),dt=ct.extend({render:function(){var e=this,t=e.series;e.createPieChart(t)},createPieChart:function(e){var t=this,i=e[0],n=new it(t,{series:e,padding:i.padding,startAngle:i.startAngle,connectors:i.connectors,legend:t.options.legend});t.appendChart(n)},appendChart:function(e,t){ct.fn.appendChart.call(this,e,t),Ti(this.options.legend.items,e.legendItems)}}),gt=dt.extend({render:function(){var e=this,t=e.series;e.createDonutChart(t)},createDonutChart:function(e){var t=this,i=e[0],n=new ot(t,{series:e,padding:i.padding,connectors:i.connectors,legend:t.options.legend});t.appendChart(n)}}),mt=Oi.Animation.extend({options:{easing:"easeOutElastic",duration:Nn},setup:function(){this.element.transform(zi.transform().scale(Ho,Ho,this.options.center))},step:function(e){this.element.transform(zi.transform().scale(e,e,this.options.center))}}),Oi.AnimationFactory.current.register(bo,mt),xt=Oi.Animation.extend({options:{easing:"easeOutElastic"},setup:function(){var e=this.center=this.element.bbox().center();this.element.transform(zi.transform().scale(Ho,Ho,e))},step:function(e){this.element.transform(zi.transform().scale(e,e,this.center))}}),Oi.AnimationFactory.current.register(Ji,xt),vt=jt.extend({init:function(){this._points=[]},destroy:function(){this._points=[]},show:function(e){var t,i;for(e=[].concat(e),this.hide(),t=0;t<e.length;t++)i=e[t],i&&i.toggleHighlight&&i.hasHighlight()&&(this.togglePointHighlight(i,!0),this._points.push(i))},togglePointHighlight:function(e,t){var i,n=(e.options.highlight||{}).toggle;n?(i={category:e.category,series:e.series,dataItem:e.dataItem,value:e.value,stackValue:e.stackValue,preventDefault:W,visual:e.highlightVisual(),show:t},n(i),i._defaultPrevented||e.toggleHighlight(t)):e.toggleHighlight(t)},hide:function(){for(var e=this._points;e.length;)this.togglePointHighlight(e.pop(),!1)},isHighlighted:function(e){var t,i,n=this._points;for(t=0;t<n.length;t++)if(i=n[t],e==i)return!0;return!1}}),yt=Gt.extend({init:function(t,i){var n,o,r=this;Gt.fn.init.call(r),r.options=Xt({},r.options,i),r.chartElement=t,r.template=yt.template,r.template||(r.template=yt.template=Di("<div class='"+fn+"tooltip "+fn+"chart-tooltip' style='display:none; position: absolute; font: #= d.font #;border: #= d.border.width #px solid;opacity: #= d.opacity #; filter: alpha(opacity=#= d.opacity * 100 #);'></div>")),n=wi(r.options.padding||{},"auto"),r.element=e(r.template(r.options)).css({"padding-top":n.top,"padding-right":n.right,"padding-bottom":n.bottom,"padding-left":n.left}),r.move=Ht(r.move,r),r._mouseleave=Ht(r._mouseleave,r),o=Nt.format("[{0}='content'],[{0}='scroller']",Nt.attr("role")),r._mobileScroller=t.closest(o).data("kendoMobileScroller")},destroy:function(){this._clearShowTimeout(),this.element&&(this.element.off(lo).remove(),this.element=null)},options:{border:{width:1},opacity:1,animation:{duration:rr}},move:function(){var e,t=this,i=t.options,n=t.element;t.anchor&&t.element&&(e=t._offset(),t.visible||n.css({top:e.top,left:e.left}),t.visible=!0,t._ensureElement(document.body),n.stop(!0,!0).show().animate({left:e.left,top:e.top},i.animation.duration))},_clearShowTimeout:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)},_padding:function(){if(!this._chartPadding){var e=this.chartElement;this._chartPadding={top:parseInt(e.css("paddingTop"),10),left:parseInt(e.css("paddingLeft"),10)}}return this._chartPadding},_offset:function(){var t,i,n=this,o=n._measure(),r=n.anchor,a=n._padding(),s=n.chartElement.offset(),l=Ci(r.y+a.top+s.top),c=Ci(r.x+a.left+s.left),h=Nt.support.zoomLevel(),u=e(window),p=window.pageYOffset||document.documentElement.scrollTop||0,f=window.pageXOffset||document.documentElement.scrollLeft||0,d=(this._mobileScroller||{}).movable;return d&&1!==d.scale?(t=zi.transform().scale(d.scale,d.scale,[d.x,d.y]),i=new zi.Point(c,l).transform(t),c=i.x,l=i.y):(l+=n._fit(l-p,o.height,$t(u)/h),c+=n._fit(c-f,o.width,Qt(u)/h)),{top:l,left:c}},setStyle:function(e,t){var i,n,o=e.background,r=e.border.color;t&&(i=t.color||t.options.color,o=Mi(o,i),r=Mi(r,i)),Ri(e.color)||(n=new ri(o).percBrightness(),this.element.toggleClass(fn+cr,n>180)),this.element.css({backgroundColor:o,borderColor:r,font:e.font,color:e.color,opacity:e.opacity,borderWidth:e.border.width})},show:function(){this._clearShowTimeout(),this.showTimeout=setTimeout(this.move,sr)},hide:function(){var e=this;clearTimeout(e.showTimeout),e._hideElement(),e.visible&&(e.point=null,e.visible=!1,e.index=null)},_measure:function(){this._ensureElement();var e={width:Qt(this.element),height:$t(this.element)};return e},_ensureElement:function(){this.element&&this.element.appendTo(document.body).on(lo,this._mouseleave)},_mouseleave:function(t){var i=t.relatedTarget,n=this.chartElement[0];i&&i!==n&&!e.contains(n,i)&&(this.trigger(Yn),this.hide())},_hideElement:function(){var e=this,t=this.element;t&&t.fadeOut({always:function(){e.visible||t.off(lo).remove()}})},_pointContent:function(e){var t,i,n=this,o=Xt({},n.options,e.options.tooltip);return Ri(e.value)&&(t=""+e.value),o.template?(i=Kt(o.template),t=i({value:e.value,category:e.category,series:e.series,dataItem:e.dataItem,percentage:e.percentage,runningTotal:e.runningTotal,total:e.total,low:e.low,high:e.high,xLow:e.xLow,xHigh:e.xHigh,yLow:e.yLow,yHigh:e.yHigh})):o.format&&(t=e.formatValue(o.format)),t},_pointAnchor:function(e){var t=this._measure();return e.tooltipAnchor(t.width,t.height)},_fit:function(e,t,i){var n=0;return e+t>i&&(n=i-(e+t)),e<0&&(n=-e),n}}),_t=yt.extend({show:function(e){var t=this,i=Xt({},t.options,e.options.tooltip);e&&e.tooltipAnchor&&t.element&&(t.element.html(t._pointContent(e)),t.anchor=t._pointAnchor(e),t.anchor?(t.setStyle(i,e),yt.fn.show.call(t,e)):t.hide())}}),bt=yt.extend({init:function(e,t,i){var n=this;yt.fn.init.call(n,e,i),n.plotArea=t},options:{sharedTemplate:"<table><th colspan='2'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr># if(point.series.name) { # <td> #= point.series.name #:</td># } #<td>#= content(point) #</td></tr># } #</table>",categoryFormat:"{0:d}"},showAt:function(t,i){var n,o,r;t=e.grep(t,function(e){var t=e.series.tooltip,i=t&&t.visible===!1;return!i}),t.length>0&&(n=t[0],o=this.plotArea.categoryAxis.getSlot(n.categoryIx),r=this._content(t,n.category),this.element.html(r),this.anchor=i?this._slotAnchor(i,o):this._defaultAnchor(n,o),this.setStyle(this.options,n),yt.fn.show.call(this))},_slotAnchor:function(e,t){var i,n=this,o=n.plotArea,r=o.categoryAxis,a=this._measure(),s=e.y-a.height/2;return i=r.options.vertical?ui(e.x,s):ui(t.center().x,s)},_defaultAnchor:function(e,t){var i,n=e.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=n.center(),a=t.center(),s=this._measure();return i=o?new ui(r.x,a.y):new ui(a.x,r.y),i.x-=s.width/2,i.y-=s.height/2,i},_content:function(e,t){var i,n,o=this;return i=Nt.template(o.options.sharedTemplate),n=i({points:e,category:t,categoryText:yi(o.options.categoryFormat,t),content:o._pointContent})}}),wt=oi.extend({init:function(e,t){oi.fn.init.call(this,t),this.axis=e,this.stickyMode=e instanceof ce},options:{color:Zi,width:1,zIndex:-1,tooltip:{visible:!1}},showAt:function(e){this.point=e,this.moveLine(),this.line.visible(!0);var t=this.options.tooltip;t.visible&&(this.tooltip||(this.tooltip=new At(this,Xt({},t,{stickyMode:this.stickyMode}))),this.tooltip.showAt(e))},hide:function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},moveLine:function(){var e,t,i,n=this,o=n.axis,r=o.options.vertical,a=n.getBox(),s=n.point,l=r?yr:vr;t=new zi.Point(a.x1,a.y1),i=r?new zi.Point(a.x2,a.y1):new zi.Point(a.x1,a.y2),s&&(n.stickyMode?(e=o.getSlot(o.pointCategoryIndex(s)),t[l]=i[l]=e.center()[l]):t[l]=i[l]=s[l]),n.box=a,this.line.moveTo(t).lineTo(i)},getBox:function(){var e,t,i,n=this,o=n.axis,r=o.pane.axes,a=r.length,s=o.options.vertical,l=o.lineBox().clone(),c=s?vr:yr;for(i=0;i<a;i++)t=r[i],t.options.vertical!=s&&(e?e.wrap(t.lineBox()):e=t.lineBox().clone());return l[c+1]=e[c+1],l[c+2]=e[c+2],l},createVisual:function(){oi.fn.createVisual.call(this);var e=this.options;this.line=new Oi.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},destroy:function(){var e=this;e.tooltip&&e.tooltip.destroy(),oi.fn.destroy.call(e)}}),At=yt.extend({init:function(e,t){var i=this,n=e.axis.getRoot().chart.element;i.crosshair=e,yt.fn.init.call(i,n,Xt({},i.options,{background:e.axis.plotArea.options.seriesColors[0]},t)),i.setStyle(i.options)},options:{padding:10},showAt:function(e){var t=this,i=t.element;i&&(t.point=e,t.element.html(t.content(e)),t.anchor=t.getAnchor(),t.move())},move:function(){var e=this,t=e.element,i=e._offset();e._ensureElement(),t.css({top:i.top,left:i.left}).show()},content:function(e){var t,i,n,o=this,r=o.options,a=o.crosshair.axis,s=a.options;return i=t=a[r.stickyMode?"getCategory":"getValue"](e),r.template?(n=Kt(r.template),t=n({value:i})):r.format?t=yi(r.format,i):s.type===mn&&(t=yi(s.labels.dateFormats[s.baseUnit],i)),t},getAnchor:function(){var e,t=this,i=t.options,n=i.position,o=this.crosshair,r=!o.axis.options.vertical,a=o.line.bbox(),s=this._measure(),l=s.width/2,c=s.height/2,h=i.padding;return e=r?n===Qi?a.bottomLeft().translate(-l,h):a.topLeft().translate(-l,-s.height-h):n===Xn?a.topLeft().translate(-s.width-h,-c):a.topRight().translate(h,-c)},hide:function(){this.element.hide(),this.point=null},destroy:function(){yt.fn.destroy.call(this),this.point=null}}),kt={min:function(e){var t,i,n=io,o=e.length;for(t=0;t<o;t++)i=e[t],B(i)&&(n=Ot.min(n,i));return n===io?e[0]:n},max:function(e){var t,i,n=ro,o=e.length;for(t=0;t<o;t++)i=e[t],B(i)&&(n=Ot.max(n,i));return n===ro?e[0]:n},sum:function(e){var t,i,n=e.length,o=0;for(t=0;t<n;t++)i=e[t],B(i)&&(o+=i);return o},sumOrNull:function(e){var t=null;return L(e)&&(t=kt.sum(e)),t},count:function(e){var t,i,n=e.length,o=0;for(t=0;t<n;t++)i=e[t],null!==i&&Ri(i)&&o++;return o},avg:function(e){var t=e[0],i=L(e);return i>0&&(t=kt.sum(e)/i),t},first:function(e){var t,i,n=e.length;for(t=0;t<n;t++)if(i=e[t],null!==i&&Ri(i))return i;return e[0]}},n.prototype={register:function(e,t){for(var i=0;i<e.length;i++)this._defaults[e[i]]=t},query:function(e){return this._defaults[e]}},n.current=new n,St=Gt.extend({init:function(t,i,n){var o,r,a=this,s=t.element,l=i.lineBox(),c=a.getValueAxis(i),h=c.lineBox(),u="."+fn;Gt.fn.init.call(a),a.options=Xt({},a.options,n),n=a.options,a.chart=t,a.chartElement=s,a.categoryAxis=i,a._dateAxis=a.categoryAxis instanceof he,a.valueAxis=c,a._dateAxis&&Xt(n,{min:d(n.min),max:d(n.max),from:d(n.from),to:d(n.to)}),a.template=St.template,a.template||(a.template=St.template=Di("<div class='"+fn+"selector' style='width: #= d.width #px; height: #= d.height #px; top: #= d.offset.top #px; left: #= d.offset.left #px;'><div class='"+fn+"mask'></div><div class='"+fn+"mask'></div><div class='"+fn+"selection'><div class='"+fn+"selection-bg'></div><div class='"+fn+"handle "+fn+"leftHandle'><div></div></div><div class='"+fn+"handle "+fn+"rightHandle'><div></div></div></div></div>")),r={left:parseInt(s.css("paddingLeft"),10),right:parseInt(s.css("paddingTop"),10)},a.options=Xt({},{width:l.width(),height:h.height(),padding:r,offset:{left:h.x2+r.left,top:h.y1+r.right},from:n.min,to:n.max},n),a.options.visible&&(a.wrapper=o=e(a.template(a.options)).appendTo(s),a.selection=o.find(u+"selection"),a.leftMask=o.find(u+"mask").first(),a.rightMask=o.find(u+"mask").last(),a.leftHandle=o.find(u+"leftHandle"),a.rightHandle=o.find(u+"rightHandle"),a.options.selection={border:{left:parseFloat(a.selection.css("border-left-width"),10),right:parseFloat(a.selection.css("border-right-width"),10)}},a.leftHandle.css("top",(a.selection.height()-a.leftHandle.height())/2),a.rightHandle.css("top",(a.selection.height()-a.rightHandle.height())/2),a.set(a._index(n.from),a._index(n.to)),a.bind(a.events,a.options),a.wrapper[0].style.cssText=a.wrapper[0].style.cssText,a.options.mousewheel!==!1?a.wrapper.on(fo,Ht(a._mousewheel,a)):a.wrapper.on(fo,function(e){e.stopPropagation()}),Nt.UserEvents?a.userEvents=new Nt.UserEvents(a.wrapper,{global:!0,stopPropagation:!0,multiTouch:!0,fastTap:!0,press:Ht(a._press,a),start:Ht(a._start,a),move:Ht(a._move,a),end:Ht(a._end,a),tap:Ht(a._tap,a),gesturestart:Ht(a._gesturechange,a),gesturechange:Ht(a._gesturechange,a)}):a.leftHandle.add(a.rightHandle).removeClass(fn+"handle"))},events:[Mo,zo,Oo],options:{visible:!0,mousewheel:{zoom:Ki},min:ro,max:io},destroy:function(){var e=this,t=e.userEvents;t&&t.destroy(),clearTimeout(e._mwTimeout),e._state=null,e.wrapper&&e.wrapper.remove()},_rangeEventArgs:function(e){var t=this;return{axis:t.categoryAxis.options,from:t._value(e.from),to:t._value(e.to)}},_start:function(t){var i,n=this,o=n.options,r=e(t.event.target);!n._state&&r&&(n.chart._unsetActivePoint(),n._state={moveTarget:r.parents(".k-handle").add(r).first(),startLocation:t.x?t.x.location:0,range:{from:n._index(o.from),to:n._index(o.to)}},i=n._rangeEventArgs({from:n._index(o.from),to:n._index(o.to)}),n.trigger(Mo,i)&&(n.userEvents.cancel(),n._state=null))},_press:function(t){var i,n;this._state?i=this._state.moveTarget:(n=e(t.event.target),i=n.parents(".k-handle").add(n).first()),i.addClass("k-handle-active")},_move:function(e){if(this._state){var t=this,i=t._state,n=t.options,o=t.categoryAxis.options.categories,r=t._index(n.from),a=t._index(n.to),s=t._index(n.min),l=t._index(n.max),c=i.startLocation-e.x.location,h=i.range,u={from:h.from,to:h.to},p=h.to-h.from,f=i.moveTarget,d=t.wrapper.width()/(o.length-1),g=Ot.round(c/d);f&&(e.preventDefault(),f.is(".k-selection, .k-selection-bg")?(h.from=Ot.min(Ot.max(s,r-g),l-p),h.to=Ot.min(h.from+p,l)):f.is(".k-leftHandle")?(h.from=Ot.min(Ot.max(s,r-g),l-1),h.to=Ot.max(h.from+1,h.to)):f.is(".k-rightHandle")&&(h.to=Ot.min(Ot.max(s+1,a-g),l),h.from=Ot.min(h.to-1,h.from)),h.from===u.from&&h.to===u.to||(t.move(h.from,h.to),t.trigger(zo,t._rangeEventArgs(h))))}},_end:function(){var e,t=this._state.range;this._state&&(e=this._state.moveTarget,e&&e.removeClass("k-handle-active"),delete this._state),this.set(t.from,t.to),this.trigger(Oo,this._rangeEventArgs(t))},_gesturechange:function(e){if(this._state){var t=this,i=t.chart,n=t._state,o=t.options,r=t.categoryAxis,a=n.range,s=i._toModelCoordinates(e.touches[0].x.location).x,l=i._toModelCoordinates(e.touches[1].x.location).x,c=Ot.min(s,l),h=Ot.max(s,l);e.preventDefault(),n.moveTarget=null,a.from=r.pointCategoryIndex(new Jt.Point2D(c))||o.min,a.to=r.pointCategoryIndex(new Jt.Point2D(h))||o.max,t.move(a.from,a.to)}},_tap:function(e){var t=this,i=t.options,n=t.chart._eventCoordinates(e),o=t.categoryAxis,r=o.pointCategoryIndex(new Jt.Point2D(n.x,o.box.y1)),a=t._index(i.from),s=t._index(i.to),l=t._index(i.min),c=t._index(i.max),h=s-a,u=a+h/2,p=Ot.round(u-r),f={},d=3===e.event.which;t._state||d||(e.preventDefault(),t.chart._unsetActivePoint(),o.options.justified||p--,f.from=Ot.min(Ot.max(l,a-p),c-h),f.to=Ot.min(f.from+h,c),t._start(e),t._state&&(t._state.range=f,t.trigger(zo,t._rangeEventArgs(f)),t._end()))},_mousewheel:function(e){var t,i=this,n=i.options,o=Si(e);i._start({event:{target:i.selection}}),i._state&&(t=i._state.range,e.preventDefault(),e.stopPropagation(),Ot.abs(o)>1&&(o*=wr),n.mousewheel.reverse&&(o*=-1),i.expand(o)&&i.trigger(zo,{axis:i.categoryAxis.options,delta:o,originalEvent:e,from:i._value(t.from),to:i._value(t.to)}),i._mwTimeout&&clearTimeout(i._mwTimeout),i._mwTimeout=setTimeout(function(){i._end()},po))},_index:function(e){var t=e;return e instanceof Date&&(t=this.categoryAxis.categoryIndex(e)),t},_value:function(e){var t=this.categoryAxis.options.categories,i=e;return this._dateAxis&&(i=e>t.length-1?this.options.max:t[Ot.ceil(e)]),i},_slot:function(e){var t=this.categoryAxis,i=this._index(e);return t.getSlot(i,i,!0)},move:function(e,t){var i,n,o,r,a=this,s=a.options,l=s.offset,c=s.padding,h=s.selection.border;o=a._slot(e),i=Ci(o.x1-l.left+c.left),a.leftMask.width(i),a.selection.css("left",i),o=a._slot(t),n=Ci(s.width-(o.x1-l.left+c.left)),a.rightMask.width(n),r=s.width-n,r!=s.width&&(r+=h.right),a.rightMask.css("left",r),a.selection.width(Ot.max(s.width-(i+n)-h.right,0))},set:function(e,t){var i=this,n=i.options,o=i._index(n.min),r=i._index(n.max);e=Vi(i._index(e),o,r),t=Vi(i._index(t),e+1,r),n.visible&&i.move(e,t),n.from=i._value(e),n.to=i._value(t)},expand:function(e){var t=this,i=t.options,n=t._index(i.min),o=t._index(i.max),r=i.mousewheel.zoom,a=t._index(i.from),s=t._index(i.to),l={from:a,to:s},c=Xt({},l);if(t._state&&(l=t._state.range),r!==Ro&&(l.from=Vi(Vi(a-e,0,s-1),n,o)),r!==Xn&&(l.to=Vi(Vi(s+e,l.from+1,o),n,o)),l.from!==c.from||l.to!==c.to)return t.set(l.from,l.to),
!0},getValueAxis:function(e){var t,i,n=e.pane.axes,o=n.length;for(t=0;t<o;t++)if(i=n[t],i.options.vertical!==e.options.vertical)return i}}),Ct=jt.extend({init:function(e,t){this.plotArea=e,this.options=Xt({},this.options,t)},options:{key:"none",lock:"none"},start:function(e){return this._active=$(e.event,this.options.key)},move:function(e){if(this._active){var t=this.axisRanges=this._panAxes(e,vr).concat(this._panAxes(e,yr));if(t.length)return this.axisRanges=t,Q(t)}},end:function(){var e=this._active;return this._active=!1,e},pan:function(){var e,t,i=this.plotArea,n=this.axisRanges;if(n.length){for(t=0;t<n.length;t++)e=n[t],i.updateAxisOptions(e.axis,e.range);i.redraw(i.panes)}},destroy:function(){delete this.plotArea},_panAxes:function(e,t){var i,n,o,r,a=this.plotArea,s=-e[t].delta,l=(this.options.lock||"").toLowerCase(),c=[];if(0!==s&&(l||"").toLowerCase()!=t)for(i=a.axes,r=0;r<i.length;r++)n=i[r],(t==vr&&!n.options.vertical||t==yr&&n.options.vertical)&&(o=n.pan(s),o&&(o.limitRange=!0,c.push({axis:n,range:o})));return c}}),Pt=jt.extend({init:function(t,i){this.chart=t,this.options=Xt({},this.options,i),this._marquee=e("<div class='k-marquee'><div class='k-marquee-color'></div></div>")},options:{key:"shift",lock:"none"},start:function(e){var t,i,n,o,r;return!!($(e.event,this.options.key)&&(t=this.chart,i=t._toModelCoordinates(e.x.client,e.y.client),n=this._zoomPane=t._plotArea.paneByPoint(i),n&&n.clipBox()))&&(o=n.clipBox().clone(),r=this._elementOffset(),o.translate(r.left,r.top),this._zoomPaneClipBox=o,this._marquee.appendTo(document.body).css({left:e.x.client+1,top:e.y.client+1,width:0,height:0}),!0)},_elementOffset:function(){var e=this.chart.element,t=e.offset();return{left:parseInt(e.css("paddingTop"),10)+t.left,top:parseInt(e.css("paddingLeft"),10)+t.top}},move:function(e){var t,i=this._zoomPane;i&&(t=this._selectionPosition(e),this._marquee.css(t))},end:function(e){var t,i,n,o,r=this._zoomPane;if(r)return t=this._elementOffset(),i=this._selectionPosition(e),i.left-=t.left,i.top-=t.top,n={x:i.left,y:i.top},o={x:i.left+i.width,y:i.top+i.height},this._updateAxisRanges(n,o),this._marquee.remove(),delete this._zoomPane,Q(this.axisRanges)},zoom:function(){var e,t,i,n=this.axisRanges;if(n&&n.length){for(e=this.chart._plotArea,i=0;i<n.length;i++)t=n[i],e.updateAxisOptions(t.axis,t.range);e.redraw(e.panes)}},destroy:function(){this._marquee.remove(),delete this._marquee,delete this.chart},_updateAxisRanges:function(e,t){var i,n,o,r,a=(this.options.lock||"").toLowerCase(),s=[],l=this._zoomPane.axes;for(o=0;o<l.length;o++)i=l[o],n=i.options.vertical,a==vr&&!n||a===yr&&n||(r=i.pointsRange(e,t),r&&s.push({axis:i,range:r}));this.axisRanges=s},_selectionPosition:function(e){var t=(this.options.lock||"").toLowerCase(),i=Ot.min(e.x.startLocation,e.x.location),n=Ot.min(e.y.startLocation,e.y.location),o=Ot.abs(e.x.initialDelta),r=Ot.abs(e.y.initialDelta),a=this._zoomPaneClipBox;return t==vr&&(i=a.x1,o=a.width()),t==yr&&(n=a.y1,r=a.height()),e.x.location>a.x2&&(o=a.x2-e.x.startLocation),e.x.location<a.x1&&(o=e.x.startLocation-a.x1),e.y.location>a.y2&&(r=a.y2-e.y.startLocation),e.y.location<a.y1&&(r=e.y.startLocation-a.y1),{left:Ot.max(i,a.x1),top:Ot.max(n,a.y1),width:o,height:r}}}),Tt=jt.extend({init:function(e,t){this.chart=e,this.options=Xt({},this.options,t)},updateRanges:function(e){var t,i,n,o,r=(this.options.lock||"").toLowerCase(),a=[],s=this.chart._plotArea.axes;for(n=0;n<s.length;n++)t=s[n],i=t.options.vertical,r==vr&&!i||r===yr&&i||(o=t.zoomRange(-e),o&&a.push({axis:t,range:o}));return this.axisRanges=a,Q(a)},zoom:function(){var e,t,i,n=this.axisRanges;if(n&&n.length){for(e=this.chart._plotArea,i=0;i<n.length;i++)t=n[i],e.updateAxisOptions(t.axis,t.range);e.redraw(e.panes)}},destroy:function(){delete this.chart}}),Rt=function(e,t,i){var n,o,r,a=this,s=t.canonicalFields(e),l=t.valueFields(e),c=t.sourceFields(e,s),h=a._seriesFields=[],u=i.query(e.type),p=e.aggregate||u;for(a._series=e,a._binder=t,n=0;n<s.length;n++){if(o=s[n],typeof p===vo)r=p[o];else{if(0!==n&&!Ai(o,l))break;r=p}r&&h.push({canonicalName:o,name:c[n],transform:Zt(r)?r:kt[r]})}},Rt.prototype={aggregatePoints:function(e,t){var i,n,o,r,a,s=this,l=s._bindPoints(e||[]),c=s._series,h=s._seriesFields,u=l.dataItems[0],p={};for(!u||B(u)||Dt(u)||(a=function(){},a.prototype=u,p=new a),i=0;i<h.length;i++){if(n=h[i],o=s._bindField(l.values,n.canonicalName),r=n.transform(o,c,l.dataItems,t),!(null===r||typeof r!==vo||Ri(r.length)||r instanceof Date)){p=r;break}Ri(r)&&(G(n.name,p),Nt.setter(n.name)(p,r))}return p},_bindPoints:function(e){var t,i,n=this,o=n._binder,r=n._series,a=[],s=[];for(t=0;t<e.length;t++)i=e[t],a.push(o.bindPoint(r,i)),s.push(r.data[i]);return{values:a,dataItems:s}},_bindField:function(e,t){var i,n,o,r,a=[],s=e.length;for(i=0;i<s;i++)n=e[i],r=n.valueFields,o=Ri(r[t])?r[t]:n.fields[t],a.push(o);return a}},It=jt.extend({init:function(e){this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}}),Vt=jt.extend({init:function(e,t){this._chart=e,this._pane=t,this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this.name=t.options.name},series:function(){var e,t=this._chart,i=t._plotArea.groupSeriesByPane(),n=i[this.name||"default"],o=[];if(n)for(e=0;e<n.length;e++)o.push(new Lt(t,n[e]));return o}}),Bt=jt.extend({init:function(e){this._axis=e,this.options=e.options},value:function(e){var t=this._axis,i=t.getCategory?t.getCategory(e):t.getValue(e);return i},slot:function(e,t,i){return Ri(i)||(i=!0),this._axis.slot(e,t,i)},range:function(){return this._axis.range()},valueRange:function(){return this._axis.valueRange()}}),Lt=jt.extend({init:function(e,t){this._chart=e,this._options=t},points:function(e){var t,i,n=this._points;return n||(t=this._seriesOptions(),i=this._chart._plotArea,this._points=n=i.pointsBySeriesIndex(t.index)),Nt.isFunction(e)&&(n=this._filterPoints(n,e)),n},data:function(e){var t,i,n,o,r=this._seriesOptions();return e&&(t=this._chart,i=t._plotArea,r.data=e,r.categoryField&&(n=i.seriesCategoryAxis(r),o=[].concat(t.options.categoryAxis),t._bindCategoryAxisFromSeries(o[n.axisIndex],n.axisIndex)),t._noTransitionsRedraw(),this._clearFields()),r.data},findPoint:function(e){var t,i=this.points();for(t=0;t<i.length;t++)if(e(i[t]))return i[t]},toggleHighlight:function(e,t){t=t?Nt.isFunction(t)?this.points(t):Dt(t)?t:[t]:this.points(),this._chart._togglePointsHighlight(e,t)},toggleVisibility:function(e,t){var i,n,o=this._chart,r=this._seriesOptions(),a=Nt.isFunction(t);if(a)if(Ai(r.type,[bo,An,zn]))for(i=this._filterData(t),n=0;n<i.length;n++)i[n].visible=e;else r.visible=function(i){return!t(i.dataItem)||e};else r.visible=e,o._saveGroupVisibleState(r);o._noTransitionsRedraw(),this._clearFields()},_filterData:function(e){var t,i=this._seriesOptions().data,n=i.length,o=[];for(t=0;t<n;t++)e(i[t])&&o.push(i[t]);return o},_filterPoints:function(e,t){var i,n=[],o=e.length;for(i=0;i<o;i++)t(e[i])&&n.push(e[i]);return n},_seriesOptions:function(){var e=this._series;return e||(e=this._series=this._chart._seriesOptions(this._options)),e},_clearFields:function(){delete this._points,delete this._series}}),Ut(e.easing,{easeOutElastic:function(e,t,i,n){var o=1.70158,r=0,a=n;return 0===e?i:1===e?i+n:(r||(r=.5),a<Ot.abs(n)?(a=n,o=r/4):o=r/(2*Ot.PI)*Ot.asin(n/a),a*Ot.pow(2,-10*e)*Ot.sin((1*e-o)*(1.1*Ot.PI)/r)+n+i)}}),Jt.ui.plugin(Rr),ne.current.register(ut,[qi,hn,Kn,dr,Hi,ur,tn,yo,en,fr,$i,pr,Po,Co,gr,Un]),ne.current.register(ft,[Bo,Lo,Ji]),ne.current.register(dt,[bo]),ne.current.register(gt,[An]),oe.current.register([qi,hn,Kn,dr,Hi,ur],[hr],[nn,cn,xo,Tn,Rn]),oe.current.register([Po,Co],[Mn,nr],[nn,cn,xo]),oe.current.register([gr,Un],[hr],[nn,cn,xo,Xo]),n.current.register([qi,hn,Kn,dr,Hi,ur,gr,Un],{value:eo,color:Dn,noteText:Dn,errorLow:no,errorHigh:eo}),n.current.register([Po,Co],{from:no,to:eo,color:Dn,noteText:Dn}),oe.current.register([Bo,Lo,Ji],[vr,yr],[cn,xo,In,Vn,Bn,Ln]),oe.current.register([Ji],[vr,yr,"size"],[cn,nn,xo]),oe.current.register([tn,yo],["open","high","low","close"],[nn,cn,"downColor",xo]),n.current.register([tn,yo],{open:eo,high:eo,low:no,close:eo,color:Dn,downColor:Dn,noteText:Dn}),oe.current.register([$i,pr],["lower","q1","median","q3","upper","mean","outliers"],[nn,cn,xo]),n.current.register([$i,pr],{lower:eo,q1:eo,median:eo,q3:eo,upper:eo,mean:eo,outliers:Dn,color:Dn,noteText:Dn}),oe.current.register([en,fr],["current","target"],[nn,cn,"visibleInLegend",xo]),n.current.register([en,fr],{current:eo,target:eo,color:Dn,noteText:Dn}),oe.current.register([bo,An],[hr],[nn,cn,"explode","visibleInLegend","visible"]),Xt(Jt,{EQUALLY_SPACED_SERIES:Pr,Aggregates:kt,AreaChart:He,AreaSegment:Ue,AxisGroupRangeTracker:pt,Bar:me,BarChart:be,BarLabel:re,BubbleChart:Ye,Bullet:Se,BulletChart:ke,CandlestickChart:We,Candlestick:Xe,CategoricalChart:_e,CategoricalErrorBar:Te,CategoricalPlotArea:ut,CategoryAxis:ce,ChartAxis:Bt,ChartContainer:lt,ChartPane:Vt,ChartPlotArea:It,ChartSeries:Lt,ClipAnimation:Me,ClusterLayout:pe,Crosshair:wt,CrosshairTooltip:At,DateCategoryAxis:he,DateValueAxis:ue,DefaultAggregates:n,DonutChart:ot,DonutPlotArea:gt,DonutSegment:nt,ErrorBarBase:Pe,ErrorRangeCalculator:ye,Highlight:vt,SharedTooltip:bt,Legend:le,LegendItem:ae,LegendLayout:se,LineChart:De,LinePoint:Ie,LineSegment:Be,Pane:st,PieAnimation:mt,PieChart:it,PieChartMixin:tt,PiePlotArea:dt,PieSegment:et,PlotAreaBase:ct,PlotAreaEventsMixin:ht,PlotAreaFactory:ne,PointEventsMixin:de,RangeBar:we,RangeBarChart:Ae,ScatterChart:Ge,ScatterErrorBar:Re,ScatterLineChart:qe,Selection:St,SeriesAggregator:Rt,SeriesBinder:oe,ShapeElement:di,SplineSegment:Oe,SplineAreaSegment:Ne,StackWrap:fe,Tooltip:_t,OHLCChart:Ke,OHLCPoint:Ze,WaterfallChart:rt,WaterfallSegment:at,XYPlotArea:ft,MousewheelZoom:Tt,ZoomSelection:Pt,Pannable:Ct,addDuration:m,areNumbers:E,axisGroupBox:P,categoriesCount:h,ceilDate:y,countNumbers:L,duration:A,ensureTree:G,indexOf:F,isNumber:B,floorDate:v,filterSeriesByType:O,hasValue:K,lteDateIndex:V,evalOptions:M,seriesTotal:q,singleItemOrArray:C,sortDates:U,startOfWeek:x,transpose:j,toDate:d,toTime:g,uniqueDates:H})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,i){(i||t)()});
//# sourceMappingURL=kendo.dataviz.chart.min.js.map
