@progress/kendo-charts 1.16.1-dev.202101080910 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/chart.js +2 -2
- package/dist/es/chart/plotarea/plotarea-base.js +14 -12
- package/dist/es2015/chart/chart.js +2 -2
- package/dist/es2015/chart/plotarea/plotarea-base.js +14 -12
- package/dist/npm/main.js +17 -15
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
package/dist/cdn/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define(["@progress/kendo-drawing"],e):"object"==typeof exports?exports.KendoCharts=e(require("@progress/kendo-drawing")):t.KendoCharts=e(t["@progress/kendo-drawing"])}(window,(function(t){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(e,i){e.exports=t},function(t,e,i){"use strict";i.r(e),i.d(e,"autoMajorUnit",(function(){return Ut})),i.d(e,"Point",(function(){return Ht})),i.d(e,"Box",(function(){return Nt})),i.d(e,"Ring",(function(){return Xt})),i.d(e,"Sector",(function(){return Yt})),i.d(e,"ShapeBuilder",(function(){return Zt})),i.d(e,"ShapeElement",(function(){return ee})),i.d(e,"ChartElement",(function(){return $t})),i.d(e,"BoxElement",(function(){return Qt})),i.d(e,"RootElement",(function(){return ne})),i.d(e,"FloatElement",(function(){return ae})),i.d(e,"Text",(function(){return le})),i.d(e,"TextBox",(function(){return fe})),i.d(e,"Title",(function(){return ge})),i.d(e,"AxisLabel",(function(){return ve})),i.d(e,"Axis",(function(){return Ae})),i.d(e,"Note",(function(){return xe})),i.d(e,"CategoryAxis",(function(){return qe})),i.d(e,"DateCategoryAxis",(function(){return ti})),i.d(e,"DateValueAxis",(function(){return hi})),i.d(e,"NumericAxis",(function(){return ai})),i.d(e,"LogarithmicAxis",(function(){return fi})),i.d(e,"PolarAxis",(function(){return mi})),i.d(e,"RadarCategoryAxis",(function(){return yi})),i.d(e,"RadarNumericAxis",(function(){return wi})),i.d(e,"RadarLogarithmicAxis",(function(){return Si})),i.d(e,"CurveProcessor",(function(){return Pi})),i.d(e,"Gradients",(function(){return ie})),i.d(e,"rectToBox",(function(){return ce})),i.d(e,"ChartAxis",(function(){return Ci})),i.d(e,"ChartPane",(function(){return Ri})),i.d(e,"ChartPlotArea",(function(){return Oi})),i.d(e,"findAxisByName",(function(){return Ti})),i.d(e,"Aggregates",(function(){return Vi})),i.d(e,"AreaChart",(function(){return Co})),i.d(e,"AreaSegment",(function(){return Ao})),i.d(e,"AxisGroupRangeTracker",(function(){return To})),i.d(e,"Bar",(function(){return Io})),i.d(e,"BarChart",(function(){return Uo})),i.d(e,"BarLabel",(function(){return Ro})),i.d(e,"BoxPlotChart",(function(){return Ko})),i.d(e,"BoxPlot",(function(){return Wo})),i.d(e,"BubbleChart",(function(){return rr})),i.d(e,"Bullet",(function(){return pr})),i.d(e,"BulletChart",(function(){return lr})),i.d(e,"CandlestickChart",(function(){return Xo})),i.d(e,"Candlestick",(function(){return Go})),i.d(e,"CategoricalChart",(function(){return oo})),i.d(e,"CategoricalErrorBar",(function(){return Qi})),i.d(e,"CategoricalPlotArea",(function(){return gn})),i.d(e,"Chart",(function(){return Ks})),i.d(e,"ChartContainer",(function(){return mr})),i.d(e,"ClipAnimation",(function(){return mo})),i.d(e,"ClusterLayout",(function(){return zo})),i.d(e,"Crosshair",(function(){return yr})),i.d(e,"CrosshairTooltip",(function(){return dr})),i.d(e,"DefaultAggregates",(function(){return Nr})),i.d(e,"DonutChart",(function(){return as})),i.d(e,"DonutPlotArea",(function(){return ps})),i.d(e,"DonutSegment",(function(){return ns})),i.d(e,"ErrorBarBase",(function(){return Ji})),i.d(e,"ErrorRangeCalculator",(function(){return Di})),i.d(e,"Highlight",(function(){return vn})),i.d(e,"SharedTooltip",(function(){return zn})),i.d(e,"Legend",(function(){return Tn})),i.d(e,"LegendItem",(function(){return Pn})),i.d(e,"LegendLayout",(function(){return kn})),i.d(e,"LineChart",(function(){return wo})),i.d(e,"LinePoint",(function(){return ao})),i.d(e,"LineSegment",(function(){return ho})),i.d(e,"Pane",(function(){return _r})),i.d(e,"PieAnimation",(function(){return Hn})),i.d(e,"PieChart",(function(){return is})),i.d(e,"PieChartMixin",(function(){return Qn})),i.d(e,"PiePlotArea",(function(){return os})),i.d(e,"PieSegment",(function(){return Jn})),i.d(e,"PlotAreaBase",(function(){return Fr})),i.d(e,"PlotAreaEventsMixin",(function(){return Dr})),i.d(e,"PlotAreaFactory",(function(){return Rn})),i.d(e,"PointEventsMixin",(function(){return ro})),i.d(e,"RangeBar",(function(){return Xr})),i.d(e,"RangeBarChart",(function(){return Wr})),i.d(e,"RangeAreaPoint",(function(){return $r})),i.d(e,"RangeAreaChart",(function(){return rn})),i.d(e,"ScatterChart",(function(){return tr})),i.d(e,"ScatterErrorBar",(function(){return $o})),i.d(e,"ScatterLineChart",(function(){return Nn})),i.d(e,"Selection",(function(){return Vn})),i.d(e,"SeriesAggregator",(function(){return Hr})),i.d(e,"SeriesBinder",(function(){return zi})),i.d(e,"SplineSegment",(function(){return go})),i.d(e,"SplineAreaSegment",(function(){return Po})),i.d(e,"StackWrap",(function(){return Fo})),i.d(e,"Tooltip",(function(){return Bn})),i.d(e,"OHLCChart",(function(){return sn})),i.d(e,"OHLCPoint",(function(){return nn})),i.d(e,"WaterfallChart",(function(){return hn})),i.d(e,"WaterfallSegment",(function(){return pn})),i.d(e,"XYPlotArea",(function(){return Yn})),i.d(e,"MousewheelZoom",(function(){return Sn})),i.d(e,"ZoomSelection",(function(){return An})),i.d(e,"Pannable",(function(){return _n})),i.d(e,"anyHasZIndex",(function(){return xo})),i.d(e,"appendIfNotNull",(function(){return wr})),i.d(e,"areNumbers",(function(){return No})),i.d(e,"bindSegments",(function(){return Sr})),i.d(e,"categoriesCount",(function(){return eo})),i.d(e,"countNumbers",(function(){return ji})),i.d(e,"equalsIgnoreCase",(function(){return kr})),i.d(e,"evalOptions",(function(){return to})),i.d(e,"filterSeriesByType",(function(){return Pr})),i.d(e,"getDateField",(function(){return Cr})),i.d(e,"getField",(function(){return Bi})),i.d(e,"hasGradientOverlay",(function(){return Oo})),i.d(e,"hasValue",(function(){return Jo})),i.d(e,"isDateAxis",(function(){return Tr})),i.d(e,"segmentVisible",(function(){return Ar})),i.d(e,"singleItemOrArray",(function(){return Mr})),i.d(e,"createOutOfRangePoints",(function(){return Ir})),i.d(e,"ChartService",(function(){return K})),i.d(e,"DomEventsBuilder",(function(){return J})),i.d(e,"FormatService",(function(){return X})),i.d(e,"IntlService",(function(){return H})),i.d(e,"TemplateService",(function(){return et})),i.d(e,"Sparkline",(function(){return oa})),i.d(e,"Navigator",(function(){return ca})),i.d(e,"NavigatorHint",(function(){return aa})),i.d(e,"StockChart",(function(){return fa})),i.d(e,"constants",(function(){return o})),i.d(e,"Gauge",(function(){return ka})),i.d(e,"LinearGauge",(function(){return Za})),i.d(e,"LinearPointer",(function(){return La})),i.d(e,"ArrowLinearPointer",(function(){return Ua})),i.d(e,"BarLinearPointer",(function(){return Xa})),i.d(e,"LinearScale",(function(){return ja})),i.d(e,"RadialGauge",(function(){return up})),i.d(e,"RadialPointer",(function(){return hp})),i.d(e,"RadialScale",(function(){return ip})),i.d(e,"ArcGauge",(function(){return xp})),i.d(e,"RangePointer",(function(){return mp})),i.d(e,"ArcScale",(function(){return dp})),i.d(e,"addClass",(function(){return _})),i.d(e,"removeClass",(function(){return A})),i.d(e,"alignPathToPixel",(function(){return k})),i.d(e,"clockwise",(function(){return P})),i.d(e,"convertableToNumber",(function(){return M})),i.d(e,"deepExtend",(function(){return j})),i.d(e,"elementStyles",(function(){return z})),i.d(e,"getSpacing",(function(){return E})),i.d(e,"getTemplate",(function(){return it})),i.d(e,"getter",(function(){return nt})),i.d(e,"grep",(function(){return st})),i.d(e,"hasClasses",(function(){return at})),i.d(e,"HashMap",(function(){return ht})),i.d(e,"inArray",(function(){return lt})),i.d(e,"interpolateValue",(function(){return ct})),i.d(e,"InstanceObserver",(function(){return ft})),i.d(e,"isArray",(function(){return b})),i.d(e,"isFunction",(function(){return R})),i.d(e,"isNumber",(function(){return C})),i.d(e,"isObject",(function(){return I})),i.d(e,"isString",(function(){return T})),i.d(e,"map",(function(){return dt})),i.d(e,"mousewheelDelta",(function(){return gt})),i.d(e,"FontLoader",(function(){return It})),i.d(e,"setDefaultOptions",(function(){return Vt})),i.d(e,"sparseArrayLimits",(function(){return Bt})),i.d(e,"styleValue",(function(){return V})),i.d(e,"find",(function(){return Lt})),i.d(e,"elementScale",(function(){return Dt})),i.d(e,"append",(function(){return vt})),i.d(e,"bindEvents",(function(){return mt})),i.d(e,"Class",(function(){return S.Class})),i.d(e,"defined",(function(){return xt})),i.d(e,"deg",(function(){return bt})),i.d(e,"elementOffset",(function(){return _t})),i.d(e,"elementSize",(function(){return wt})),i.d(e,"eventElement",(function(){return At})),i.d(e,"eventCoordinates",(function(){return St})),i.d(e,"last",(function(){return kt})),i.d(e,"limitValue",(function(){return Pt})),i.d(e,"logToConsole",(function(){return S.logToConsole})),i.d(e,"objectKey",(function(){return Ct})),i.d(e,"rad",(function(){return Tt})),i.d(e,"round",(function(){return Mt})),i.d(e,"unbindEvents",(function(){return Rt})),i.d(e,"valueOrDefault",(function(){return Ot})),i.d(e,"chartBaseTheme",(function(){return kp}));var o={};i.r(o),i.d(o,"NAVIGATOR_AXIS",(function(){return ha})),i.d(o,"NAVIGATOR_PANE",(function(){return pa}));var r="arc",n="#000",s="bottom",a="center",p="circle",h="date",l=/\{\d+:?/,c="left",u=Number.MAX_VALUE,f=-Number.MAX_VALUE,d="right",g="top",y="value",v="#fff",m="x",x="y";function b(t){return Array.isArray(t)}function _(t,e){for(var i=b(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var w=/\s+/g;function A(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(w," "))}var S=i(0);function k(t){var e=.5;t.options.stroke&&S.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function P(t,e){return-t.x*e.y+t.y*e.x<0}function C(t){return"number"==typeof t&&!isNaN(t)}function T(t){return"string"==typeof t}function M(t){return C(t)||T(t)&&isFinite(t)}function R(t){return"function"==typeof t}function O(t,e){for(var i in e){var o=e[i],r=typeof o,n=void 0;if((n="object"===r&&null!==o?o.constructor:null)&&n!==Array)if(o instanceof Date)t[i]=new Date(o.getTime());else if(R(o.clone))t[i]=o.clone();else{var s=t[i];t[i]="object"==typeof s&&s||{},O(t[i],o)}else"undefined"!==r&&(t[i]=o)}return t}function j(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)O(t,e[o]);return t}function I(t){return"object"==typeof t}function V(t){return C(t)?t+"px":t}var B=/width|height|top|left|bottom|right/i;function L(t){return B.test(t)}function z(t,e){var i=T(e)?[e]:e;if(b(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=L(s)?parseFloat(r[s]):r[s]}return o}if(I(e))for(var a in e)t.style[a]=V(e[a])}function E(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i.top=i[d]=i[s]=i[c]=t:(i.top=t.top||e,i[d]=t[d]||e,i[s]=t[s]||e,i[c]=t[c]||e),i}var F={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},D=function(){},U={implementation:{configurable:!0}};D.register=function(t){F=t},U.implementation.get=function(){return F},Object.defineProperties(D,U);var H=D,G=/\{(\d+)(:[^\}]+)?\}/g,N=function(t){this._intlService=t},q={intl:{configurable:!0}};q.intl.get=function(){return this._intlService||H.implementation},q.intl.set=function(t){this._intlService=t},N.prototype.auto=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var o=this.intl;return T(t)&&t.match(l)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},N.prototype.localeAuto=function(t,e,i){var o=this.intl;return T(t)&&t.match(l)?t.replace(G,(function(t,r,n){var s=e[parseInt(r,10)];return o.toString(s,n?n.substring(1):"",i)})):o.toString(e[0],t,i)},Object.defineProperties(N.prototype,q);var X=N,Y=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new X(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},W={intl:{configurable:!0}};W.intl.get=function(){return this._intlService||H.implementation},W.intl.set=function(t){this._intlService=t,this.format.intl=t},Y.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Y.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Y.prototype,W);var Z,K=Y,$=function(){};$.register=function(t){Z=t},$.create=function(t,e){if(Z)return Z.create(t,e)};var J=$,Q={compile:function(t){return t}},tt=function(){};tt.register=function(t){Q=t},tt.compile=function(t){return Q.compile(t)};var et=tt;function it(t){var e;return void 0===t&&(t={}),t.template?t.template=e=et.compile(t.template):R(t.content)&&(e=t.content),e}var ot=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,rt={};function nt(t){if(rt[t])return rt[t];var e=[];return t.replace(ot,(function(t,i,o,r){e.push(S.drawing.util.defined(i)?i:o||r)})),rt[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},rt[t]}function st(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function at(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(-1!==t.className.indexOf(i[o]))return!0}rt[void 0]=function(t){return t};var pt=function(){this._map={}};pt.prototype.get=function(t){return this._map[this._key(t)]},pt.prototype.set=function(t,e){this._map[this._key(t)]=e},pt.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ht=pt;function lt(t,e){if(e)return-1!==e.indexOf(t)}function ct(t,e,i){return S.drawing.util.round(t+(e-t)*i,3)}var ut=function(t,e){this.observer=t,this.handlerMap=j({},this.handlerMap,e)};ut.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o.trigger&&(i=this.callObserver("trigger",t,e)),i},ut.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},ut.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var ft=ut;function dt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);S.drawing.util.defined(n)&&o.push(n)}return o}function gt(t){var e=0;return t.wheelDelta&&(e=(e=-t.wheelDelta/120)>0?Math.ceil(e):Math.floor(e)),t.detail&&(e=S.drawing.util.round(t.detail/3)),e}var yt=S.drawing.util,vt=yt.append,mt=yt.bindEvents,xt=yt.defined,bt=yt.deg,_t=yt.elementOffset,wt=yt.elementSize,At=yt.eventElement,St=yt.eventCoordinates,kt=yt.last,Pt=yt.limitValue,Ct=yt.objectKey,Tt=yt.rad,Mt=yt.round,Rt=yt.unbindEvents,Ot=yt.valueOrDefault,jt=function(){};jt.fetchFonts=function(t,e,i){void 0===i&&(i={depth:0});!t||i.depth>5||!document.fonts||Object.keys(t).forEach((function(o){var r=t[o];"dataSource"!==o&&"$"!==o[0]&&r&&("font"===o?e.push(r):"object"==typeof r&&(i.depth++,jt.fetchFonts(r,e,i),i.depth--))}))},jt.loadFonts=function(t,e){var i=[];if(t.length>0&&document.fonts){try{i=t.map((function(t){return document.fonts.load(t)}))}catch(t){Object(S.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},jt.preloadFonts=function(t,e){var i=[];jt.fetchFonts(t,i),jt.loadFonts(i,e)};var It=jt;function Vt(t,e){var i=t.prototype;i.options?i.options=j({},i.options,e):i.options=e}function Bt(t){for(var e=u,i=f,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===u?void 0:e,max:i===f?void 0:i}}function Lt(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var zt=S.geometry.Matrix,Et=/matrix\((.*)\)/;function Ft(t){var e=getComputedStyle(t).transform;return"none"===e?zt.unit():function(t){var e=t.match(Et);if(null===e||2!==e.length)return zt.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(zt,[null].concat(i)))}(e)}function Dt(t){if(!t)return zt.unit();for(var e=Ft(t),i=t.parentElement;i;){var o=Ft(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}function Ut(t,e){var i=Mt(e-t,9);if(0===i){if(0===e)return.1;i=Math.abs(e)}var o=Math.pow(10,Math.floor(Math.log(i)/Math.log(10))),r=Mt(i/o,10);return Mt(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}var Ht=function(t){function e(e,i){t.call(this),this.x=e||0,this.y=i||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var i=Tt(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Mt(n+(a-n)*o+(p-s)*r,3),this.y=Mt(s+(p-s)*o-(a-n)*r,3),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},e.onCircle=function(t,i,o){var r=Tt(i);return new e(t.x-o*Math.cos(r),t.y-o*Math.sin(r))},e}(S.Class);function Gt(t,e,i,o,r){var n=Tt(r);return new Ht(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}var Nt=function(t){function e(e,i,o,r){t.call(this),this.x1=e||0,this.y1=i||0,this.x2=o||0,this.y2=r||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var i=this.height(),o=this.width();return xt(t)&&(this.x1=t,this.x2=this.x1+o),xt(e)&&(this.y1=e,this.y2=this.y1+i),this},e.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},e.prototype.wrapPoint=function(t){var i=b(t),o=i?t[0]:t.x,r=i?t[1]:t.y;return this.wrap(new e(o,r,o,r)),this},e.prototype.snapTo=function(t,e){return e!==m&&e||(this.x1=t.x1,this.x2=t.x2),e!==x&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var i=this.height(),o=this.width(),r=e===g||e===s?x:m,n=r===x?i:o;if(e===a){var p=t.center(),h=this.center();this.x1+=p.x-h.x,this.y1+=p.y-h.y}else this[r+1]=e===g||e===c?t[r+1]-n:t[r+2];return this.x2=this.x1+o,this.y2=this.y1+i,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=E(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=E(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new Ht(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new Ht(this.x1,this.y1),new Ht(this.x2,this.y1),new Ht(this.x2,this.y2),new Ht(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=Gt(0,0,r,n,t),a=Gt(e,0,r,n,t),p=Gt(e,i,r,n,t),h=Gt(0,i,r,n,t);return e=Math.max(s.x,a.x,p.x,h.x)-Math.min(s.x,a.x,p.x,h.x),i=Math.max(s.y,a.y,p.y,h.y)-Math.min(s.y,a.y,p.y,h.y),this.x2=this.x1+e,this.y2=this.y1+i,this},e.prototype.toRect=function(){return new S.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,i){var o=e+1,r=e+2,n=e===m?"width":"height",p=this[n]();lt(i,[c,g])?(this[o]=t[o],this[r]=this[o]+p):lt(i,[d,s])?(this[r]=t[r],this[o]=this[r]-p):i===a&&(this[o]=t[o]+(t[n]()-p)/2,this[r]=this[o]+p)},e}(S.Class);function qt(t,e){return t-e}var Xt=function(t){function e(e,i,o,r,n){t.call(this),this.center=e,this.innerRadius=i,this.radius=o,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var i=Tt(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=Mt(this.center.x-o*n,3),a=Mt(this.center.y-r*n,3);return new Ht(s,a)},e.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/2,p=Math.sin(Tt(r)),h=Math.cos(Tt(r)),l=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(l+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(c+=a*-p/Math.abs(p)),new Nt(l,c,l+e,c+i)},e.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new Ht(s,a),h=this.point(r),l=new Ht(h.x-e.x,h.y-e.y),c=this.point(n),u=new Ht(c.x-e.x,c.y-e.y),f=Mt(s*s+a*a,3);return(l.equals(p)||P(l,p))&&!P(u,p)&&f>=i*i&&f<=o*o},e.prototype.getBBox=function(){var t,e=new Nt(u,u,f,f),i=Mt(this.startAngle%360),o=Mt((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(qt),s=n.indexOf(i),a=n.indexOf(o);t=i===o?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var h=this.point(t[p]);e.wrapPoint(h),e.wrapPoint(h,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(S.Class),Yt=function(t){function e(e,i,o,r){t.call(this,e,0,i,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(Xt),Wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;t.angle>0&&i===o&&(o+=.001);var r=new S.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new S.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),p=S.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var h=a.pointAt(o);p.lineTo(h.x,h.y),p.arc(o,i,s,s,!0)}else p.lineTo(r.x,r.y);return p},e}(S.Class);Wt.current=new Wt;var Zt=Wt,Kt=function(t){function e(e){t.call(this),this.children=[],this.options=j({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},e.prototype.createVisual=function(){this.visual=new S.drawing.Group({zIndex:this.options.zIndex,visible:Ot(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=S.drawing.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):xt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,i=t.options.zIndex||0,o=this.visual.children,r=o.length;for(e=0;e<r;e++){var n=o[e];if(Ot(n.options.zIndex,0)>i)break}this.visual.insert(e,t)},e.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},e.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},e.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:v,opacity:e||.2},stroke:{color:v,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);xt(n.options.zIndex)||(n.options.zIndex=Ot(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,i){var o=new S.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(S.Class);Kt.prototype.options={};var $t=Kt,Jt=function(t){function e(e){t.call(this,e),this.options.margin=E(this.options.margin),this.options.padding=E(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=function(){o.align(e,m,r.align),o.align(e,x,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)},f=e.clone();p&&(f.x2=f.x1+n,f.y2=f.y1+s),a&&f.unpad(h).unpad(c).unpad(l),t.prototype.reflow.call(this,f),i=p?this.box=new Nt(0,0,n,s):this.box,a&&p?(u(),f=this.contentBox=this.paddingBox.clone().unpad(l)):(f=this.contentBox=i.clone(),i.pad(l).pad(c).pad(h),u()),this.translateChildren(i.x1-f.x1+h.left+c+l.left,i.y1-f.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var y=d[g];y.reflow(y.box)}},e.prototype.align=function(t,e,i){this.box.align(t,e,i)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(S.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Ot(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}($t);Vt(Jt,{align:c,vAlign:g,margin:{},padding:{},border:{color:n,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Qt=Jt,te=function(t){function e(e,i){t.call(this,e),this.pointData=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,i=t.type,o=t.rotation,r=e.center(),n=e.width()/2;if(!t.visible||!this.hasBox())return null;var s,a=this.visualStyle();return i===p?s=new S.drawing.Circle(new S.geometry.Circle([Mt(e.x1+n,3),Mt(e.y1+e.height()/2,3)],n),a):"triangle"===i?s=S.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],a).close():"cross"===i?((s=new S.drawing.MultiPath(a)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),s.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):s=S.drawing.Path.fromRect(e.toRect(),a),o&&s.transform(S.geometry.transform().rotate(-o,[r.x,r.y])),s.options.zIndex=t.zIndex,s},e.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement()},e}(Qt);Vt(te,{type:p,align:a,vAlign:a});var ee=te,ie={glass:{type:"linear",rotation:0,stops:[{offset:0,color:v,opacity:0},{offset:.25,color:v,opacity:.3},{offset:1,color:v,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:v,opacity:.55},{offset:.65,color:v,opacity:0},{offset:.95,color:v,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:v,opacity:.06},{offset:.83,color:v,opacity:.2},{offset:.95,color:v,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:0},{offset:.5,color:v,opacity:.3},{offset:.99,color:v,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:.2},{offset:.15,color:v,opacity:.15},{offset:.17,color:v,opacity:.35},{offset:.85,color:v,opacity:.05},{offset:.87,color:v,opacity:.15},{offset:.99,color:v,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function oe(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new Nt(o,s,r,a),l[1]=new Nt(i,a,o,p),l[2]=new Nt(r,a,n,p),l[3]=new Nt(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(l[4]=new Nt(i,s,o,a),l[5]=new Nt(r,p,n,h)):(l[4]=new Nt(r,s,n,a),l[5]=new Nt(i,p,o,h)),st(l,(function(t){return t.height()>0&&t.width()>0}))[0]}var re=function(t){function e(e){t.call(this,e);var i=this.options;i.width=parseInt(i.width,10),i.height=parseInt(i.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,i=new Nt(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=oe(i,e[o].box)||new Nt},e.prototype.createVisual=function(){this.visual=new S.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),o=S.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(o)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,i=this.gradients,o=Ct(t),r=ie[t.gradient];if(i[o])e=i[o];else{var n=Object.assign({},r,t);"linear"===r.type?e=new S.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,i=t.innerRadius/t.radius*100,o=e.length,r=[],n=0;n<o;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-i)+i)/100,r.push(s)}return r}(n)),(e=new S.drawing.RadialGradient(n)).supportVML=!1!==r.supportVML),i[o]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new Nt(0,0,t.width,t.height)},e}($t);Vt(re,{width:600,height:400,background:v,border:{color:n,width:0},margin:E(5),zIndex:-2});var ne=re,se=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=m,this.elementAxis=x,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=x,this.elementAxis=m,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,i=this.groupAxis,o=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,l=t[i+1]+this.alignStart(a,t[r]());if(h){for(var c=l,u=0;u<h;u++){for(var f=s[u],d=f.groupElements,g=t[e+1],y=d.length,v=0;v<y;v++){var m=d[v],x=this.elementSize(m),b=c+this.alignStart(x[r],f.groupSize),_=new Nt;_[i+1]=b,_[i+2]=b+x[r],_[e+1]=g,_[e+2]=g+x[o],m.reflow(_),g+=x[o]+this.elementSpacing}c+=f.groupSize+this.groupSpacing}t[i+1]=l,t[i+2]=l+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===d||o===s?i=e-t:o===a&&(i=(e-t)/2),i},e.prototype.groupOptions=function(){for(var t=this.box,e=this.children,i=this.elementSizeField,o=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Mt(t[i]()),a=e.length,p=[],h=0,l=0,c=0,u=0,f=[],d=0;d<a;d++){var g=e[d];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&Mt(l+r+y[i])>s&&(p.push({groupElements:f,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,h=0,l=0,f=[]),h=Math.max(h,y[o]),l>0&&(l+=r),l+=y[i],f.push(g)}return p.push({groupElements:f,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}($t);Vt(se,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var ae=se,pe=S.drawing.Text,he=function(t){function e(e,i){t.call(this,i),this.content=e,this.reflow(new Nt)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.size=S.drawing.util.measureText(this.content,{font:e.font});this.baseline=i.baseline,this.box=new Nt(t.x1,t.y1,t.x1+i.width,t.y1+i.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor;this.visual=new pe(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r})},e}($t);Vt(he,{font:"12px sans-serif",color:n});var le=he;function ce(t){var e=t.origin,i=t.bottomRight();return new Nt(e.x,e.y,i.x,i.y)}var ue=/\n/m,fe=function(t){function e(e,i,o){t.call(this,i),this.content=e,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new Nt)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(ue),i=new ae({vertical:!0,align:t.align,wrap:!1}),o=j({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new le(e[r].trim(),o);i.append(n)}},e.prototype.reflow=function(e){var i=this.options,o=i.visual;if(this.container.options.align=i.align,o&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=o(this.visualContext(r));n&&(r=ce(n.clippedBBox()||new S.geometry.Rect),n.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),i.rotation){var s=E(i.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new S.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=S.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!xt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,m,t.align),this.align(this.targetBox,x,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,r=this.rotatedBox.center();return S.geometry.transform().translate(r.x-i,r.y-o).rotate(t,[i,o])},e}(Qt),de=function(t){function e(e){t.call(this,e),this.append(new fe(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,m)},e.buildTitle=function(t,i,o){var r,n=t;return"string"==typeof t&&(n={text:t}),(n=Object.assign({visible:!0},o,n))&&n.visible&&n.text&&(r=new e(n),i.append(r)),r},e}($t);Vt(de,{color:n,position:g,align:a,margin:E(5),padding:E(5)});var ge=de,ye=function(t){function e(e,i,o,r,n){t.call(this,i,n),this.text=i,this.value=e,this.index=o,this.dataItem=r,this.reflow(new Nt)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var i=t.prototype.visualContext.call(this,e);return i.value=this.value,i.dataItem=this.dataItem,i.format=this.options.format,i.culture=this.options.culture,i},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:At(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==a){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=ce(e.bbox(i.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,i=e.rotation;if(!i)return null;if(e.alignRotation===a)return t.prototype.rotationTransform.call(this);var o=S.geometry.transform().rotate(i).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),p=e.rotationOrigin||g,h=p===g||p===s?m:x,l=p===g||p===s?x:m,u=p===g||p===c?n.origin:n.bottomRight(),f=r.topLeft().transformCopy(o),d=r.topRight().transformCopy(o),y=r.bottomRight().transformCopy(o),v=r.bottomLeft().transformCopy(o),b=S.geometry.Rect.fromPoints(f,d,y,v),_={};_[l]=n.origin[l]-b.origin[l];var w,A,k=Math.abs(f[l]+_[l]-u[l]),P=Math.abs(d[l]+_[l]-u[l]);Mt(k,10)===Mt(P,10)?(w=f,A=d):P<k?(w=d,A=y):(w=f,A=v);var C=w[h]+(A[h]-w[h])/2;return _[h]=n.center()[h]-C,S.geometry.transform().translate(_.x,_.y).rotate(i)},e}(fe);Vt(ye,{_autoReflow:!1});var ve=ye,me=function(t){function e(e,i,o){t.call(this,i),this.fields=e,this.chartService=o,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var i,o,r=e.label,n=e.icon,s=new Nt,a=function(){return t},h=n.size,l=this.fields.text;if(xt(r)&&r.visible){var c=it(r);c?l=c(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color="inside"===r.position?"#fff":n.background),this.label=new fe(l,j({},r)),this.label.aliasFor=a,"inside"!==r.position||xt(h)||(n.type===p?h=Math.max(this.label.box.width(),this.label.box.height()):(i=this.label.box.width(),o=this.label.box.height()),s.wrap(this.label.box))}n.width=i||h||7,n.height=o||h||7;var u=new ee(j({},n));u.aliasFor=a,this.marker=u,this.append(u),this.label&&this.append(this.label),u.reflow(new Nt),this.wrapperBox=s.wrap(u.box)}},e.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,a=this.marker,p=this.wrapperBox,h=t.center(),l=r.line.length,u=r.position;r.visible&&(lt(u,[c,d])?u===c?(o=p.alignTo(t,u).translate(-l,t.center().y-p.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[o.x2,h.y]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,u).translate(l,t.center().y-p.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[o.x1,h.y]],i=o.clone().wrapPoint(e))):u===s?(o=p.alignTo(t,u).translate(t.center().x-p.center().x,l),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,o.y1]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,u).translate(t.center().x-p.center().x,-l),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,o.y2]],i=o.clone().wrapPoint(e))),a&&a.reflow(o),n&&(n.reflow(o),a&&("outside"===r.label.position&&n.box.alignTo(a.box,u),n.reflow(n.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;i.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:i.background,border:i.background,icon:i.icon,label:i.label,line:i.line,position:i.position,visible:i.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=S.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});k(e),this.visual.append(e)}},e.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},e.prototype.out=function(t,e){var i=this.eventArgs(e);t.trigger("noteLeave",i)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:At(t),text:xt(e.label)?e.label.text:"",visual:this.visual})},e}(Qt);Vt(me,{icon:{visible:!0,type:p},label:{position:"inside",visible:!0,align:a,vAlign:a},line:{visible:!0},visible:!0,position:g,zIndex:2});var xe=me;function be(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new S.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),k(n),n}function _e(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,n=new S.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(i,r).lineTo(o,r):n.moveTo(r,i).lineTo(r,o),k(n),n}var we=function(t){function e(e,i){void 0===i&&(i=new K),t.call(this,e),this.chartService=i,this.options.visible||(this.options=j({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.minorTickType},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.majorTickType},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?d:a,i=j({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){var r=this.labelsRange(),n=i.rotation;I(n)&&(i.alignRotation=n.align,i.rotation=n.angle),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var s=r.min;s<r.max;s+=o){var p=this.createAxisLabel(s,i);p&&(this.append(p),this.labels.push(p))}}},e.prototype.clearLabels=function(){this.children=st(this.children,(function(t){return!(t instanceof ve)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=st(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,n=o?e.y2:e.y1,s=t.line.width||0;return i?new Nt(r,e.y1,r,e.y2-s):new Nt(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=j({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var i=new fe(e.text,e);this.append(i),this.title=i}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=j({},e,i[o]);r.value=this.parseNoteValue(r.value);var n=new xe({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(xt(n.options.position)?t.vertical&&!lt(n.options.position,[c,d])?n.options.position=t.reverse?c:d:t.vertical||lt(n.options.position,[g,s])||(n.options.position=t.reverse?s:g):t.vertical?n.options.position=t.reverse?c:d:n.options.position=t.reverse?s:g,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new S.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,i=this.lineBox(),o=e.labels.mirror,r=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,r,s){var a=e.length,p=Math.max(1,r.step);if(r.visible)for(var h=r.skip;h<a;h+=p)xt(s)&&h%s==0||(n.tickX=o?i.x2:i.x2-r.size,n.tickY=o?i.y1-r.size:i.y1,n.position=e[h],t.append(be(n,r)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,r/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();if(e.width>0&&e.visible){var o=new S.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});o.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&k(o);var r=this._lineGroup=new S.drawing.Group;r.append(o),this.visual.append(r),this.createTicks(r)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,i=t.background;i&&(this._backgroundPath=S.drawing.Path.fromRect(e.toRect(),{fill:{color:i},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,i=e.plotBands||[],o=e.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),s=st(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<i.length;a++){var p=i[a],h=void 0,l=void 0,u=p.label,f=void 0;if(o?(h=(s||r.axisX).lineBox(),l=this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),l=(s||r.axisY).lineBox()),u&&(u.vAlign=u.position||c,f=this.createPlotBandLabel(u,p,new Nt(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()){var d=new S.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),g=S.drawing.Path.fromRect(d,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(g),f&&n.append(f)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;if(xt(t)&&t.visible){var n=it(t);n?r=n({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)}return(o=new fe(r,t)).reflow(i),o.renderVisual(),o.visual},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=o.visible?e.majorUnit:0,p=t.lineBox(),h=p[n?"y1":"x1"],l={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function f(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var a=Mt(t[n]);lt(a,c)||n%i==0||s&&h===a||(l.position=a,u.append(_e(l,e)),c.push(a))}}return f(this.getMajorTickPositions(),o),f(this.getMinorTickPositions(),i,a/r),u.children},e.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?"width":"height",a=o?o.box[s]():0,p=this.getActualTickSize()+e.margin+a,h=((this.getRoot()||{}).box||t)[s](),l=0,c=0;c<n;c++){var u=i[c].box[s]();u+p<=h&&(l=Math.max(l,u))}this.box=r?new Nt(t.x1,t.y1,t.x1+l+p,t.y2):new Nt(t.x1,t.y1,t.x2,t.y1+l+p),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=this.lineBox(),n=t.labels.mirror,a=this.getLabelsTickPositions(),p=this.getActualTickSize()+t.margin,h=0;h<e.length;h++){var l=e[h],u=this.labelTickIndex(l),f=o?l.box.height():l.box.width(),y=a[u]-f/2,v=void 0,m=void 0,x=void 0;if(o){if(i)y=(m=a[u])+((x=a[u+1])-m)/2-f/2;var b=r.x2;n?(b+=p,l.options.rotationOrigin=c):(b-=p+l.box.width(),l.options.rotationOrigin=d),v=l.box.move(b,y)}else{i?(m=a[u],x=a[u+1]):(m=y,x=y+f);var _=r.y1;n?(_-=p+l.box.height(),l.options.rotationOrigin=s):(_+=p,l.options.rotationOrigin=g),v=new Nt(m,_,x,_+l.box.height())}l.reflow(v)}},e.prototype.autoRotateLabels=function(){if(this.options.autoRotateLabels&&!this.options.vertical){for(var t,e=this.getMajorTickPositions(),i=this.labels,o=0;o<i.length;o++){var r=Math.abs(e[o+1]-e[o]),n=i[o].box;if(n.width()>r){if(n.height()>r){t=-90;break}t=-45}}if(t){for(var s=0;s<i.length;s++)i[s].options.rotation=t,i[s].reflow(new Nt);return!0}}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,o=t.vertical;e&&(o?(e.options.align=i?d:c,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?g:s),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;xt(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,o=i?x:m;this.box.snapTo(e,o),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[o+1]-=this.lineBox()[o+1]-e[o+1],this.box[o+2]-=this.lineBox()[o+2]-e[o+2]},e.prototype.axisLabelText=function(t,e,i){var o=it(i),r=t;return o?r=o({value:t,dataItem:e,format:i.format,culture:i.culture}):i.format&&(r=this.chartService.format.localeAuto(i.format,[t],i.culture)),r},e.prototype.slot=function(t,e,i){var o=this.getSlot(t,e,i);if(o)return o.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var i=this.options.vertical?x:m;if(this.chartService.isPannable(i)){var o=this.maxLabelOffset();t[i+1]-=o.start,t[i+2]+=o.end}else{e[0].options.visible&&t.wrap(e[0].box);var r=e[e.length-1];r.options.visible&&t.wrap(r.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,i=t.reverse,o=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?x:m,s=this.labels,a=i?1:0,p=i?0:1,h=0,l=0,c=0;c<s.length;c++){var u=s[c],f=this.labelTickIndex(u),d=void 0,g=void 0;o?(d=r[f+a],g=r[f+p]):d=g=r[f],h=Math.max(h,d-u.box[n+1]),l=Math.max(l,u.box[n+2]-g)}return{start:h,end:l}},e.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!xt(n.min)||n.min<=i)||o<e&&r>0&&(!xt(n.max)||o<=n.max))return null;if(e<i&&r>0||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<i&&r<0?(a=Pt(t,i,o),p=Pt(t+s,i+s,o)):e>o&&r>0&&(p=Pt(e,i,o),a=Pt(e-s,i,o-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}($t);Vt(we,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:n,visible:!0},title:{visible:!0,position:a},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:"none",majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:n,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Ae=we,Se="days",ke="years",Pe={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function Ce(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function Te(t,e){return new Date(t.getTime()+e)}function Me(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Re(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Oe(t,e,i,o){var r=t;if(t){var n=Me(t),s=n.getHours();i===ke?Re(r=new Date(n.getFullYear()+e,0,1),0):"months"===i?Re(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===i?Re(r=Oe(function(t,e){void 0===e&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return Te(t,864e5*-i)}(n,o),7*e,Se),s):i===Se?Re(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):"hours"===i?r=function(t,e){var i=new Date(t);i.setMinutes(0,0,0);var o=6e4*(t.getTimezoneOffset()-i.getTimezoneOffset());return Te(i,o+36e5*e)}(n,e):"minutes"===i?(r=Te(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===i?r=Te(n,1e3*e):"milliseconds"===i&&(r=Te(n,e)),"milliseconds"!==i&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function je(t,e,i){return Oe(Me(t),0,e,i)}function Ie(t,e,i){var o=Me(t);return o&&je(o,e,i).getTime()===o.getTime()?o:Oe(o,1,e,i)}function Ve(t,e){return t&&e?t.getTime()-e.getTime():-1}function Be(t,e){return t.getTime()-e}function Le(t){if(b(t)){for(var e=[],i=0;i<t.length;i++)e.push(Le(t[i]));return e}if(t)return Me(t).getTime()}function ze(t,e){return t&&e?Le(t)===Le(e):t===e}function Ee(t,e,i){return Ce(t,e)/Pe[i]}function Fe(t,e,i,o){var r=Me(t),n=Me(e);return("months"===i?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+Ee(r,new Date(r.getFullYear(),r.getMonth()),Se)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===ke?r.getFullYear()-n.getFullYear()+Fe(r,new Date(r.getFullYear(),0),"months",1)/12:i===Se||"weeks"===i?Ee(r,n,i):Be(r,e)/Pe[i])/o}function De(t,e,i){return i===ke?e.getFullYear()-t.getFullYear():"months"===i?12*De(t,e,ke)+e.getMonth()-t.getMonth():i===Se?Math.floor(Be(e,t)/864e5):Math.floor(Be(e,t)/Pe[i])}function Ue(t,e){return T(e)&&t.parseDate(e)||Me(e)}function He(t,e){if(b(e)){for(var i=[],o=0;o<e.length;o++)i.push(Ue(t,e[o]));return i}return Ue(t,e)}function Ge(t,e){return C(t.weekStartDay)?t.weekStartDay:e.firstDay?e.firstDay():0}var Ne=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],i=xt(t.min),o=xt(t.max);if(t.srcCategories=t.categories=e,(i||o)&&e.length){var r,n=i?Math.floor(t.min):0;r=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,r)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:C(t.min)?t.min%1:0,max:C(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.totalRangeIndices=function(t){var e,i=this.options,o=C(i.min)?i.min:0;if(e=C(i.max)?i.max:C(i.min)?o+i.categories.length:this.totalRange().max||1,t){var r=this.totalRange();o=Pt(o,0,r.max),e=Pt(e,0,r.max)}return{min:o,max:e}},e.prototype.range=function(){var t=this.options;return{min:C(t.min)?t.min:0,max:C(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(i-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:i}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length){var i=this.options.vertical?x:m,o=t[i+1],r=t[i+2],n=e[0],s=kt(e);(n.box[i+1]>r||n.box[i+2]<o)&&(n.options.visible=!1),(s.box[i+1]>r||s.box[i+2]<o)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,o=e.max,r=Math.ceil(o),n=Math.floor(i),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(i?x:m)+(o?2:1)],h=this.tickIndices(t),l=[],c=0;c<h.length;c++)l.push(p+Mt(n*(h[c]-a),3));return l},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),r=o.getHash()+i.min+","+i.max+t.reverse+t.justified;if(e._hash!==r){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=r,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?x:m,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,n=o.justified,s=o.vertical,a=this.scaleOptions(),p=a.scale,h=a.box,l=a.min,c=s?x:m,u=h[c+(r?2:1)],f=h.clone(),d=!xt(e),g=Ot(t,0),y=Ot(e,g);y=Math.max(y-1,g);var v=u+(g-l)*p,b=u+((y=Math.max(g,y))+1-l)*p;return d&&n&&(b=v),i&&(v=Pt(v,h[c+1],h[c+2]),b=Pt(b,h[c+1],h[c+2])),f[c+1]=r?b:v,f[c+2]=r?v:b,f},e.prototype.limitSlot=function(t){var e=this.options.vertical?x:m,i=this.lineBox(),o=t.clone();return o[e+1]=Pt(t[e+1],i[e+1],i[e+2]),o[e+2]=Pt(t[e+2],i[e+1],i[e+2]),o},e.prototype.slot=function(e,i,o){var r=Math.floor(this.options.min||0),n=e,s=i;return"string"==typeof n?n=this.categoryIndex(n):C(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):C(s)&&(s-=r),t.prototype.slot.call(this,n,s,o)},e.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?x:m,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,h=n.max,l=i?h:p,c=a[r+1],u=a[r+2],f=t[r];if(f<c||f>u)return null;var d=l+(f-c)/s,g=d%1;return o?d=Math.round(d):0===g&&d>0&&d--,Math.floor(d)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=e.categories.length,n=Mt(t/(o/r),10);return{min:n,max:r+n}},e.prototype.zoomRange=function(t){var e=this.totalRangeIndices(),i=this.totalRange(),o=i.min,r=i.max,n=Pt(e.min+t,o,r),s=Pt(e.max-t,o,r);if(s-n>0)return{min:n,max:s}},e.prototype.scaleRange=function(t){var e=this.options.categories.length,i=t*e;return{min:-i,max:e+i}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.totalRangeIndices(!0),r=o.min,n=o.max,s=Math.floor(r);return e?(r=Math.ceil(r),n=Math.floor(n)):(r=Math.floor(r),n=Math.ceil(n)),{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems?i.dataItems[t]:null,r=Ot(i.categories[t],""),n=this.axisLabelText(r,o,e);return new ve(r,n,t,o,e)},e.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,i=t-Math.floor(e.min||0);return this.getSlot(i)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?x:m,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},e.prototype.pan=function(t){var e=this.totalRangeIndices(!0),i=this.scaleOptions().scale,o=Mt(t/i,10),r=this.totalRange(),n=e.min+o,s=e.max+o;return this.limitRange(n,s,0,r.max,o)},e.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?x:m,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(o?2:1)],h=t[r]-p,l=e[r]-p,c=n.min+h/a,u=n.min+l/a,f=Math.min(c,u),d=Math.max(c,u);if(d-f>=.01)return{min:f,max:d}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var i=e.length,o=0;o<i;o++)if(ze(e[o],t))return o;return-1}return e.indexOf(t)}(t,e.srcCategories)},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return C(t.min)&&(e=Math.floor(t.min)),{min:e,max:C(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ht,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(Ae);Vt(Ne,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:n},labels:{zIndex:1},justified:!1,_deferLabels:!0});var qe=Ne,Xe={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"},Ye=["milliseconds","seconds","minutes","hours",Se,"weeks","months",ke];function We(t){var e=t._range;return e||((e=t._range=Bt(t)).min=Me(e.min),e.max=Me(e.max)),e}var Ze=function(t){this.options=t};Ze.prototype.displayIndices=function(){return{min:0,max:1}},Ze.prototype.displayRange=function(){return{}},Ze.prototype.total=function(){return{}},Ze.prototype.valueRange=function(){return{}},Ze.prototype.valueIndex=function(){return-1},Ze.prototype.values=function(){return[]},Ze.prototype.totalIndex=function(){return-1},Ze.prototype.valuesCount=function(){return 0},Ze.prototype.totalCount=function(){return 0},Ze.prototype.dateAt=function(){return null};var Ke=function(t,e,i){this.options=i,i.baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=Oe(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&ze(e,n)&&!i.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=i.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=o?this.valueStart:a;var p=i.max;p?(this.valueEnd=this.roundToTotalStep(p,!1,!r&&ze(p,this.roundToTotalStep(p))?-1:0),this.displayEnd=o?this.roundToTotalStep(p,!r):i.max):(this.valueEnd=n,this.displayEnd=o||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))};function $e(t,e,i){for(var o,r,n,s=We(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l="fit"===t.baseUnit,c=e?Ye.indexOf(e):0,u=l?Ye[c++]:t.baseUnit,f=a/Pe[u],d=f;!r||f>=h;){o=o||p[u].slice(0);do{n=o.shift()}while(n&&e===u&&n<i);if(n)f=d/(r=n);else{if(u===kt(Ye)){r=Math.ceil(d/h);break}if(!l){f>h&&(r=Math.ceil(d/h));break}u=Ye[c++]||kt(Ye),d=a/Pe[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function Je(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!lt(e,Ye)&&function(t){for(var e,i,o=t.categories,r=xt(o)?o.length:0,n=u,s=0;s<r;s++){var a=o[s];if(a&&e){var p=Ce(a,e);p>0&&(i=(n=Math.min(n,p))>=31536e6?ke:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Se:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=i||Se}(t),"fit"!==e&&"auto"!==t.baseUnitStep||$e(t),t}Ke.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ke.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,i=t.baseUnitStep,o=Fe(this.displayStart,this.valueStart,e,i),r=Fe(this.displayEnd,this.valueStart,e,i);this._indices={min:o,max:r}}return this._indices},Ke.prototype.total=function(){return{min:this.start,max:this.end}},Ke.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ke.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ke.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Fe(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ke.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Fe(t,this.start,e.baseUnit,e.baseUnitStep))},Ke.prototype.dateIndex=function(t){var e=this.options;return Fe(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ke.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ke.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=Oe(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ke.prototype.dateAt=function(t,e){var i=this.options;return Oe(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},Ke.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,a=this.start,p=Fe(t,a,r,n),h=e?Math.ceil(p):Math.floor(p);return i&&(h+=i),Oe(a,h*n,r,s)};var Qe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];if(r._parsed||((r=He(i,r))._parsed=!0),o=j({roundToBaseUnit:!0},o,{categories:r,min:Ue(i,o.min),max:Ue(i,o.max),weekStartDay:Ge(o,i)}),e.panning&&e.isPannable(o.vertical?x:m)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,this.options=o,o.srcCategories=r,r.length>0){var n=We(r),s=o.maxDivisions;if(this.dataRange=new Ke(n.min,n.max,Je(o)),s){var a=this.dataRange.displayRange(),p=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),h=this.dataRange.options;$e(p,h.baseUnit,h.baseUnitStep),this.divisionRange=new Ke(n.min,n.max,p)}else this.divisionRange=this.dataRange}else o.baseUnit=o.baseUnit||Se,this.dataRange=this.divisionRange=new Ze(o)},e.prototype.tickIndices=function(e){var i=this.dataRange,o=this.divisionRange,r=o.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=o.values(),a=0;this.options.justified||(s=s.concat(o.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(i.dateIndex(s[p])+a),1!==e&&p>=1){var h=n.length-1;n.splice(p,0,n[h-1]+(n[h]-n[h-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return Ve(t,e.min)>=0&&Ve(t,e.max)<=0&&i.length},e.prototype.parseNoteValue=function(t){return Ue(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),h=Mt(t/p,10);if(a.min&&a.max){var l=Te(e.min||a.min,h),c=Te(e.max||a.max,h);a={min:Oe(l,0,i,o),max:Oe(c,0,i,o)}}return a},e.prototype.scaleRange=function(t){var e=Math.abs(t),i=this.range(),o=i.min,r=i.max;if(o&&r){for(;e--;){var n=Be(o,r),s=Math.round(.1*n);t<0?(o=Te(o,s),r=Te(r,-s)):(o=Te(o,-s),r=Te(r,s))}i={min:o,max:r}}return i},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Mt(t/(o/(s-n)),10)*(e.reverse?-1:1),h=Te(n,p),l=Te(s,p),c=this.limitRange(Le(h),Le(l),Le(a.min),Le(a.max),p);return c?(c.min=Me(c.min),c.max=Me(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,i){if(this.isEmpty())return null;var o=t.prototype.pointsRange.call(this,e,i),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Be(r.max,r.min)/(n.max-n.min),a=this.options;return{min:Te(r.min,o.min*s),max:Te(r.min,o.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.zoomRange=function(t){if(this.isEmpty())return null;var e=this.options,i="fit"===e.userSetBaseUnit,o=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.options,p=a.weekStartDay,h=a.baseUnit,l=a.baseUnitStep,c=Oe(n,t*l,h,p),u=Oe(s,-t*l,h,p);if(i){var f,d,g=e.autoBaseUnitSteps,y=e.maxDateGroups,v=kt(g[h])*y*Pe[h],m=Be(s,n),x=Be(u,c),b=Ye.indexOf(h);if(x<Pe[h]&&"milliseconds"!==h)h=Ye[b-1],c=Te(n,d=(m-(y-1)*(f=kt(g[h]))*Pe[h])/2),u=Te(s,-d);else if(x>v&&h!==ke){var _=0;do{b++,h=Ye[b],_=0,d=2*Pe[h];do{f=g[h][_],_++}while(_<g[h].length&&d*f<m)}while(h!==ke&&d*f<m);(d=(d*f-m)/2)>0&&(c=Te(n,-d),u=Te(s,d),c=Te(c,Pt(u,o.min,o.max)-u),u=Te(u,Pt(c,o.min,o.max)-c))}}return c<o.min&&(c=o.min),u>o.max&&(u=o.max),c&&u&&Be(u,c)>0?{min:c,max:u,baseUnit:e.userSetBaseUnit||e.baseUnit,baseUnitStep:e.userSetBaseUnitStep||e.baseUnitStep}:void 0},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||n;var s=this.axisLabelText(r,o,e);if(s)return new ve(r,s,t,o,e)},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,i){var o=this.dataRange,r=t,n=e;r instanceof Date&&(r=o.dateIndex(r)),n instanceof Date&&(n=o.dateIndex(n));var s=this.getSlot(r,n,i);if(s)return s.toRect()},e.prototype.getSlot=function(e,i,o){var r=e,n=i;return"object"==typeof r&&(r=this.categoryIndex(r)),"object"==typeof n&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,o)},e.prototype.valueRange=function(){var t=We(this.options.srcCategories);return{min:Me(t.min),max:Me(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=We(t.srcCategories);return new Ke(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(qe);Vt(Qe,{type:h,labels:{dateFormats:Xe},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});var ti=Qe;function ei(t,e){return Mt(Math.floor(t/e)*e,10)}function ii(t,e){return Mt(Math.ceil(t/e)*e,10)}function oi(t){return Math.max(Math.min(t,3e5),-3e5)}var ri=Math.pow(10,-9),ni=function(t){function e(e,i,o,r){t.call(this,Object.assign({},o,{seriesMin:e,seriesMax:i}),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,i){var o=i.narrowRange,r=function(t,e,i){if(!t&&!e)return 0;var o;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===i||!i&&(e-r)/e>.2)return 0;o=Math.max(0,r-(e-r)/2)}else o=t;return o}(t,e,o),n=function(t,e,i){if(!t&&!e)return 1;var o;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===i||!i&&n>.2)return 0;o=Math.min(0,r-(t-r)/2)}else o=e;return o}(t,e,o),s=Ut(r,n),a={majorUnit:s};!1!==i.roundToMajorUnit&&(r<0&&si(r,s,1/3)&&(r-=s),n>0&&si(n,s,1/3)&&(n+=s));return a.min=ei(r,s),a.max=ii(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:xt(e.min)?Math.min(t.min,e.min):t.min,max:xt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var i,o,r=e;if(e){!function(t,e){for(var i=0;i<e.length;i++){var o=e[i];null===t[o]&&(t[o]=void 0)}}(e,["min","max"]),i=xt(e.min),o=xt(e.max);var n=i||o;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=ei(t.min,e.majorUnit),t.max=ii(t.max,e.majorUnit)):n&&(r=j(t,e),t.majorUnit=Ut(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=j(t,r);s.min>=s.max&&(i&&!o?s.max=s.min+s.majorUnit:!i&&o&&(s.min=s.max-s.majorUnit));return s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,i=e.max-e.min;return Math.floor(Mt(i/t,3))+1},e.prototype.getTickPositions=function(t,e){var i=this.options,o=i.vertical,r=i.reverse,n=this.lineBox(),s=t*((o?n.height():n.width())/(i.max-i.min)),a=this.getDivisions(t),p=(o?-1:1)*(r?-1:1),h=[],l=n[(o?x:m)+(1===p?1:2)],c=0;e&&(c=e/t);for(var u=0;u<a;u++)u%c!=0&&h.push(Mt(l,3)),l+=s*p;return h},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o,r,n=this.options,s=n.vertical,a=n.reverse,p=s?x:m,h=this.lineBox(),l=h[p+(a?2:1)],c=(a?-1:1)*((s?h.height():h.width())/(n.max-n.min)),u=new Nt(h.x1,h.y1,h.x1,h.y1),f=t,d=e;return xt(f)||(f=d||0),xt(d)||(d=f||0),i&&(f=Math.max(Math.min(f,n.max),n.min),d=Math.max(Math.min(d,n.max),n.min)),s?(o=n.max-Math.max(f,d),r=n.max-Math.min(f,d)):(o=Math.min(f,d)-n.min,r=Math.max(f,d)-n.min),u[p+1]=oi(l+c*(a?r:o)),u[p+2]=oi(l+c*(a?o:r)),u},e.prototype.getValue=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=Number(e.max),n=Number(e.min),s=i?x:m,a=this.lineBox(),p=a[s+(o?2:1)],h=i?a.height():a.width(),l=(o?-1:1)*(t[s]-p),c=l*((r-n)/h);return l<0||l>h?null:Mt(i?r-c:n+c,10)},e.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,s=this.lineBox(),a=i?s.height():s.width(),p=Mt(t/(a/(r-n)),10);return!i&&!o||i&&o||(p=-p),{min:n+p,max:r+p,offset:p}},e.prototype.scaleRange=function(t){var e=this.options,i=-t*e.majorUnit;return{min:e.min-i,max:e.max+i}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=Mt(i.min+t*i.majorUnit,10),r=this.axisLabelText(o,null,e);return new ve(o,r,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.zoomRange=function(t){var e=this.totalMin,i=this.totalMax,o=this.scaleRange(t),r=Pt(o.min,e,i),n=Pt(o.max,e,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.isValidRange=function(t,e){return e-t>ri},e}(Ae);function si(t,e,i){var o=Mt(Math.abs(t%e),10);return 0===o||o>e*(1-i)}Vt(ni,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},labels:{format:"#.####################"},zIndex:1});var ai=ni,pi=function(t){function e(e,i,o,r){var n=Me(e),s=Me(i),a=r.intl,p=o||{};p=function(t,e,i){var o=i.min||t,r=i.max||e,n=i.baseUnit||(r&&o?function(t){var e="hours";t>=31536e6?e=ke:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Se);return e}(Ce(r,o)):"hours"),s=Pe[n],a=i.weekStartDay||0,p=je(Le(o)-1,n,a)||Me(r),h=Ie(Le(r)+1,n,a),l=(i.majorUnit?i.majorUnit:void 0)||ii(Ut(p.getTime(),h.getTime()),s)/s,c=De(p,h,n),u=ii(c,l)-c,f=Math.floor(u/2),d=u-f;i.baseUnit||delete i.baseUnit;return i.baseUnit=i.baseUnit||n,i.min=i.min||Oe(p,-f,n,a),i.max=i.max||Oe(h,d,n,a),i.minorUnit=i.minorUnit||l/5,i.majorUnit=l,i}(n,s,p=j(p||{},{min:Ue(a,p.min),max:Ue(a,p.max),axisCrossingValue:He(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ge(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var h=p.weekStartDay||0;this.totalMin=Le(je(Le(n)-1,p.baseUnit,h)),this.totalMax=Le(Ie(Le(s)+1,p.baseUnit,h))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(De(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=this.lineBox(),r=(i?-1:1)*(e.reverse?-1:1),n=o[(i?x:m)+(1===r?1:2)],s=this.getDivisions(t),a=Be(e.max,e.min),p=(i?o.height():o.width())/a,h=e.weekStartDay||0,l=[n],c=1;c<s;c++){var u=n+Be(Oe(e.min,c*t,e.baseUnit,h),e.min)*p*r;l.push(Mt(u,3))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){return ai.prototype.getSlot.call(this,Ue(this.intlService,t),Ue(this.intlService,e),i)},e.prototype.getValue=function(t){var e=ai.prototype.getValue.call(this,t);return null!==e?Me(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=t*i.majorUnit,r=i.weekStartDay||0,n=i.min;o>0&&(n=Oe(n,o,i.baseUnit,r));var s=e.dateFormats[i.baseUnit];e.format=e.format||s;var a=this.axisLabelText(n,null,e);return new ve(n,a,t,null,e)},e.prototype.translateRange=function(t,e){var i=this.options,o=i.baseUnit,r=i.weekStartDay||0,n=this.lineBox(),s=i.vertical?n.height():n.width(),a=this.range(),p=s/Be(a.max,a.min),h=Mt(t/p,10)*(i.reverse?-1:1),l=Te(i.min,h),c=Te(i.max,h);return e||(l=Oe(l,0,o,r),c=Oe(c,0,o,r)),{min:l,max:c,offset:h}},e.prototype.scaleRange=function(t){for(var e=this.options,i=e.min,o=e.max,r=Math.abs(t);r--;){var n=Be(i,o),s=Math.round(.1*n);t<0?(i=Te(i,s),o=Te(o,-s)):(i=Te(i,-s),o=Te(o,s))}return{min:i,max:o}},e.prototype.shouldRenderNote=function(t){var e=this.range();return Ve(t,e.min)>=0&&Ve(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),i=this.limitRange(Le(e.min),Le(e.max),this.totalMin,this.totalMax,e.offset);if(i)return{min:Me(i.min),max:Me(i.max)}},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);return{min:Me(r),max:Me(n)}},e.prototype.zoomRange=function(t){var e=this.scaleRange(t);return{min:Me(Pt(Le(e.min),this.totalMin,this.totalMax)),max:Me(Pt(Le(e.max),this.totalMin,this.totalMax))}},e}(Ae);Vt(pi,{type:h,majorGridLines:{visible:!0,width:1,color:n},labels:{dateFormats:Xe}});var hi=pi,li=function(t){function e(e,i,o,r){var n=j({majorUnit:10,min:e,max:i},o),s=n.majorUnit,a=function(t,e){var i,o=Mt(ui(t,e),10)%1;i=t<=0?e:0!==o&&(o<.3||o>.9)?Math.pow(e,ui(t,e)+.2):Math.pow(e,Math.ceil(ui(t,e)));return i}(i,s),p=function(t,e,i){var o=i.majorUnit,r=t;t<=0?r=e<=1?Math.pow(o,-2):1:i.narrowRange||(r=Math.pow(o,Math.floor(ui(t,o))));return r}(e,i,n),h=function(t,e,i,o){var r=i.min,n=i.max;xt(i.axisCrossingValue)&&i.axisCrossingValue<=0&&ci();xt(o.max)?o.max<=0&&ci():n=e;xt(o.min)?o.min<=0&&ci():r=t;return{min:r,max:n}}(p,a,n,o);n.max=h.max,n.min=h.min,n.minorUnit=o.minorUnit||Mt(s-1,10),t.call(this,n,r),this.totalMin=xt(o.min)?Math.min(p,o.min):p,this.totalMax=xt(o.max)?Math.max(a,o.max):a,this.logMin=Mt(ui(h.min,s),10),this.logMax=Mt(ui(h.max,s),10),this.seriesMin=e,this.seriesMax=i,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,i){var o,r,n=this.options,s=this.logMin,a=this.logMax,p=n.reverse,h=n.vertical,l=n.majorUnit,c=h?x:m,u=this.lineBox(),f=u[c+(p?2:1)],d=(p?-1:1)*((h?u.height():u.width())/(a-s)),g=new Nt(u.x1,u.y1,u.x1,u.y1),y=t,v=e;return xt(y)||(y=v||1),xt(v)||(v=y||1),y<=0||v<=0?null:(i&&(y=Math.max(Math.min(y,n.max),n.min),v=Math.max(Math.min(v,n.max),n.min)),y=ui(y,l),v=ui(v,l),h?(o=a-Math.max(y,v),r=a-Math.min(y,v)):(o=Math.min(y,v)-s,r=Math.max(y,v)-s),g[c+1]=oi(f+d*(p?r:o)),g[c+2]=oi(f+d*(p?o:r)),g)},e.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n===r?1:-1,h=1===p?1:2,l=n?a.height():a.width(),c=(o-i)/l,u=n?x:m,f=a[u+h],d=p*(t[u]-f);if(d<0||d>l)return null;var g=i+d*c;return Mt(Math.pow(s,g),10)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.scaleRange=function(t){var e=this.options.majorUnit,i=-t;return{min:Math.pow(e,this.logMin-i),max:Math.pow(e,this.logMax+i)}},e.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n?a.height():a.width(),h=Mt(t/(p/(o-i)),10);return!n&&!r||n&&r||(h=-h),{min:Math.pow(s,i+h),max:Math.pow(s,o+h),offset:h}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,i=e.majorTicks,o=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,i){a.tickX=n?s.x2:s.x2-i.size,a.tickY=n?s.y1-i.size:s.y1,a.position=e,t.append(be(a,i))}return i.visible&&this.traverseMajorTicksPositions(p,i),o.visible&&this.traverseMinorTicksPositions(p,o),[]},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.vertical,n=t.lineBox(),s={lineStart:n[r?"x1":"y1"],lineEnd:n[r?"x2":"y2"],vertical:r},a=[],p=this.gridLinesVisual();function h(t,e){lt(t,a)||(s.position=t,p.append(_e(s,e)),a.push(t))}return o.visible&&this.traverseMajorTicksPositions(h,o),i.visible&&this.traverseMinorTicksPositions(h,i),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this._lineOptions(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step){t(Mt(o+r*(a-n),10),e)}},e.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,a=this._lineOptions(),p=a.lineStart,h=a.step,l=this.logMin,c=this.logMax,u=Math.floor(l);u<c;u++)for(var f=this._minorIntervalOptions(u),d=e.skip;d<n;d+=e.step){var g=f.value+d*f.minorStep;if(g>r)break;if(g>=o)t(Mt(p+h*(ui(g,s)-l),10),e)}},e.prototype.createAxisLabel=function(t,e){var i=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,i),r=this.axisLabelText(o,null,e);return new ve(o,r,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e);return{min:Math.min(i,o),max:Math.max(i,o)}},e.prototype.zoomRange=function(t){var e=this.options,i=this.totalMin,o=this.totalMax,r=this.scaleRange(t),n=Pt(r.min,i,o),s=Pt(r.max,i,o),a=e.majorUnit,p=s>n&&e.min&&e.max&&Mt(ui(e.max,a)-ui(e.min,a),10)<1,h=!(e.min===i&&e.max===o)&&Mt(ui(s,a)-ui(n,a),10)>=1;if(p||h)return{min:n,max:s}},e.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,r=Math.pow(o,t);return{value:r,minorStep:(Math.pow(o,t+1)-r)/i}},e.prototype._lineOptions=function(){var t=this.options,e=t.reverse,i=t.vertical,o=i?x:m,r=this.lineBox(),n=i===e?1:-1,s=1===n?1:2;return{step:n*((i?r.height():r.width())/(this.logMax-this.logMin)),lineStart:r[o+s],lineBox:r}},e}(Ae);function ci(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function ui(t,e){return Math.log(t)/Math.log(e)}Vt(li,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},zIndex:1,_deferLabels:!0});var fi=li,di={createGridLines:function(t){var e,i,o=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,o.majorGridLines)),o.minorGridLines.visible&&(i=this.minorGridLineAngles(t,s),vt(n,this.renderMinorGridLines(i,r,o.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){var n=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,n)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=this.box.center(),s=new S.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var h=new S.drawing.Path(r);o&&(s.radius=o(t[p])),h.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(h)}return a.children},gridLineAngles:function(t,e,i,o,r){var n=this,s=this.intervals(e,i,o,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return dt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new Nt,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=i||1,p=[],h=0,l=e||0;l<n;l+=a)h=r.reverse?360-l*s:l*s,h=Mt(h,3)%360,o&<(h,o)||p.push(h);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return dt(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,n)},e.prototype.radiusCallback=function(t,e,i){if(e.options.type!==r){var o=Tt(360/(2*this.options.categories.length)),n=Math.cos(o)*t,s=this.majorAngles(),a=function(e){return!i&<(e,s)?t:n};return a}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from);r.startAngle+=s*n.angle;var a=Math.ceil(o.to)-o.to;r.angle-=(a+s)*n.angle;var p=Zt.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;i.reverse&&!o&&(p=(p+1)%s);var h=n[p=Pt(Math.floor(p),0,s-1)];o&&(h-=a/2)<0&&(h+=360);var l=a*(Pt(Math.ceil(e||p),p,s-1)-p+1);return new Xt(r.center(),0,r.height()/2,h,l)},e.prototype.slot=function(t,e){var i=this.getSlot(t,e),o=i.startAngle+180,r=o+i.angle;return new S.geometry.Arc([i.center.x,i.center.y],{startAngle:o,endAngle:r,radiusX:i.radius,radiusY:i.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++){if(this.getSlot(o).containsPoint(t)){i=o;break}}return i},e}(qe);Vt(gi,{startAngle:90,labels:{margin:E(10)},majorGridLines:{visible:!0},justified:!0}),j(gi.prototype,di);var yi=gi,vi=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.minorUnit=o.minorUnit||o.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return ai.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,r=i.step||1,n=new Nt,s=this.intervals(t.majorUnit,o,r),a=0;a<e.length;a++){e[a].reflow(n);var p=e[a].box;e[a].reflow(this.getSlot(s[a]).adjacentBox(0,p.width(),p.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;o&<(h,o)||s.push(h)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,n=Pt(t,i.min,i.max),s=Pt(e||n,n,i.max);if(i.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new Xt(o.center(),0,o.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var i,o,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return r.reverse?(i=a,o=p):(i=360-p,o=360-a),i=(i+n)%360,o=(o+n)%360,new S.geometry.Arc([s.center.x,s.center.y],{startAngle:i,endAngle:o,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,r=t.y-i.y,n=Math.round(bt(Math.atan2(r,o))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(Ae);Vt(vi,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:E(10)},majorGridLines:{color:n,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),j(vi.prototype,di,{createPlotBands:yi.prototype.createPlotBands,majorAngles:yi.prototype.majorAngles,range:ai.prototype.range,labelsCount:ai.prototype.labelsCount,createAxisLabel:ai.prototype.createAxisLabel});var mi=vi;function xi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var bi={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var o=this.plotArea.polarAxis,n=o.majorAngles(),s=o.box.center(),a=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),p=0;p<i.length;p++){var h=i[p],l={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},c=this.getSlot(h.from,h.to,!0),u=new Xt(s,s.y-c.y2,s.y-c.y1,0,360),f=void 0;f=e===r?Zt.current.createRing(u,l):S.drawing.Path.fromPoints(this.plotBandPoints(u,n),l).close(),a.append(f)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new S.geometry.Circle(r,t.innerRadius),s=new S.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();vt(n,this.renderGridLines(r,s,o,e.minorGridLines))}return n},renderGridLines:function(t,e,i,o){var n={stroke:{width:o.width,color:o.color,dashType:o.dashType}},s=o.skip;void 0===s&&(s=0);var a=o.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),h=s;h<e.length;h+=a){var l=t.y-e[h];if(l>0){var c=new S.geometry.Circle([t.x,t.y],l);if(o.type===r)p.append(new S.drawing.Circle(c,n));else{for(var u=new S.drawing.Path(n),f=0;f<i.length;f++)u.lineTo(c.pointAt(i[f]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),i=this.plotArea.polarAxis,o=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;if(this.options.majorGridLines.type!==r&&o.length>1){var p=t.x-n.x,h=t.y-n.y,l=(bt(Math.atan2(h,p))+540)%360;o.sort((function(t,e){return xi(t,l)-xi(e,l)}));var c=90-xi(o[0],o[1])/2,u=180-xi(l,o[0])-c;a=s*(Math.sin(Tt(u))/Math.sin(Tt(c)))}return this.axisType().prototype.getValue.call(this,new Ht(e.x1,e.y2-a))}},_i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(ai);j(_i.prototype,bi);var wi=_i,Ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(fi);j(Ai.prototype,bi);var Si=Ai;function ki(t){return t<=0?-1:1}var Pi=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(r>2&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s,a=e[0],p=e[1],h=e[2];for(i.push(new S.geometry.Segment(a));a.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){var l=this.tangent(a,p,m,x);return kt(i).controlOut(this.firstControlPoint(l,a,p,m,x)),i.push(new S.geometry.Segment(p,this.secondControlPoint(l,a,p,m,x))),i}if(o){a=e[r-1],p=e[0],h=e[1];var c=this.controlPoints(a,p,h);n=c[1],s=c[0]}else{var u=this.tangent(a,p,m,x);n=this.firstControlPoint(u,a,p,m,x)}for(var f=n,d=0;d<=r-3;d++)if(this.removeDuplicates(d,e),d+3<=(r=e.length)){a=e[d],p=e[d+1],h=e[d+2];var g=this.controlPoints(a,p,h);kt(i).controlOut(f),f=g[1];var y=g[0];i.push(new S.geometry.Segment(p,y))}if(o){a=e[r-2],p=e[r-1],h=e[0];var v=this.controlPoints(a,p,h);kt(i).controlOut(f),i.push(new S.geometry.Segment(p,v[0])),kt(i).controlOut(v[1]),i.push(new S.geometry.Segment(h,s))}else{var b=this.tangent(p,h,m,x);kt(i).controlOut(f),i.push(new S.geometry.Segment(h,this.secondControlPoint(b,p,h,m,x)))}return i},e.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},e.prototype.invertAxis=function(t,e,i){var o=!1;if(t.x===e.x)o=!0;else if(e.x===i.x)(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(o=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,i.x);t.y<=e.y&&i.y<=n||e.y<=t.y&&i.y>=n||(o=!0)}return o},e.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),r=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||Mt(r,1)===Mt(i.y,1)},e.prototype.lineFunction=function(t,e){var i=(e.y-t.y)/(e.x-t.x);return[t.y-i*t.x,i]},e.prototype.controlPoints=function(t,e,i){var o,r=m,n=x,s=!1,a=!1;if(this.isLine(t,e,i))o=this.tangent(t,e,m,x);else{var p={x:this.isMonotonicByField(t,e,i,m),y:this.isMonotonicByField(t,e,i,x)};if(p.x&&p.y)o=this.tangent(t,i,m,x),s=!0;else if(this.invertAxis(t,e,i)&&(r=x,n=m),p[r])o=0;else o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?ki((i[n]-t[n])*(e[r]-t[r])):-ki((i[r]-t[r])*(e[n]-t[n]))),a=!0}var h=this.secondControlPoint(o,t,e,r,n);if(a){var l=r;r=n,n=l}var c=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,c,o)),[h,c]},e.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},e.prototype.tangent=function(t,e,i,o){var r,n=e[i]-t[i],s=e[o]-t[o];return r=0===n?0:s/n,r},e.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},e.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],s=.333*(i[o]-n);return this.point(n+s,e[r]+s*t,o,r)},e.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],s=i[o],a=.333*(s-n);return this.point(s-a,i[r]-a*t,o,r)},e.prototype.point=function(t,e,i,o){var r=new S.geometry.Point;return r[i]=t,r[o]=e,r},e.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o},e}(S.Class),Ci=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis,i=e.getCategory?e.getCategory(t):e.getValue(t);return i},e.prototype.slot=function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(S.Class);function Ti(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Ci(e[i])}var Mi=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};Mi.prototype.findAxisByName=function(t){return Ti(t,this._pane.axes)};var Ri=Mi,Oi=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(S.Class);function ji(t){for(var e=t.length,i=0,o=0;o<e;o++){C(t[o])&&i++}return i}var Ii={min:function(t){for(var e=t.length,i=u,o=0;o<e;o++){var r=t[o];C(r)&&(i=Math.min(i,r))}return i===u?t[0]:i},max:function(t){for(var e=t.length,i=f,o=0;o<e;o++){var r=t[o];C(r)&&(i=Math.max(i,r))}return i===f?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];C(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return ji(t)&&(e=Ii.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&xt(r)&&i++}return i},avg:function(t){var e=ji(t),i=t[0];return e>0&&(i=Ii.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&xt(o))return o}return t[0]}},Vi=Ii;function Bi(t,e){return null===e?e:nt(t)(e)}var Li=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,i){void 0===e&&(e=[y]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[y]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[y]},e.prototype.bindPoint=function(t,e,i){var o,r,n=t.data,s=xt(i)?i:n[e],a={valueFields:{value:s}},p=this.valueFields(t),h=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(xt(s)){if(Array.isArray(s)){var l=s.slice(p.length);r=this._bindFromArray(s,p),o=this._bindFromArray(l,h)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,h);r=this._bindFromObject(s,p,c),o=this._bindFromObject(s,h,u)}}else r=this._undefinedValue[t.type];return xt(r)&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=o||{},a},e.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++){i[t[r]]=e}return i},e.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},e.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=Bi(a,t))}return o},e.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===y?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},e}(S.Class);Li.current=new Li;var zi=Li,Ei=/percent(?:\w*)\((\d+)\)/,Fi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Di=function(t){function e(e,i,o){t.call(this),this.initGlobalRanges(e,i,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,i){var o=e.data,r=Fi.exec(t);if(r){this.valueGetter=this.createValueGetter(e,i);var n=this.getAverage(o),s=this.getStandardDeviation(o,n,!1),a=r[1]?parseFloat(r[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,i);var h=this.getStandardError(o,this.getAverage(o));this.globalRange=function(t){return{low:t-h,high:t+h}}}},e.prototype.createValueGetter=function(t,e){var i,o=t.data,r=zi.current,n=r.valueFields(t),s=xt(o[0])?o[0]:{};if(b(s))i=nt("["+(e?n.indexOf(e):0)+"]");else if(C(s))i=nt();else if("object"==typeof s){i=nt(r.sourceFields(t,n)[n.indexOf(e)])}return i},e.prototype.getErrorRange=function(t,e){var i,o,r;if(!xt(e))return null;if(this.globalRange)return this.globalRange(t);if(b(e))i=t-e[0],o=t+e[1];else if(C(r=parseFloat(e)))i=t-r,o=t+r;else{if(!(r=Ei.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);i=t-Math.abs(n),o=t+Math.abs(n)}return{low:i,high:o}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,r=i?e.count-1:e.count,n=0,s=0;s<o;s++){var a=this.valueGetter(t[s]);C(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},e.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);C(n)&&(i+=n,o++)}return{value:i/o,count:o}},e}(S.Class),Ui=S.support.browser||{},Hi=Ui.msie?.001:0,Gi="zero",Ni="bar",qi="column",Xi="line",Yi="pie",Wi="verticalLine",Zi=[Ni,qi,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],Ki="DOMMouseScroll mousewheel",$i=function(t){function e(e,i,o,r,n,s){t.call(this,s),this.low=e,this.high=i,this.isVertical=o,this.chart=r,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,o),a=o?n.x:n.y,p=a-s,h=a+s;o?(e=[new Ht(n.x,r.y1),new Ht(n.x,r.y2)],i&&e.push(new Ht(p,r.y1),new Ht(h,r.y1),new Ht(p,r.y2),new Ht(h,r.y2)),this.box=new Nt(p,r.y1,h,r.y2)):(e=[new Ht(r.x1,n.y),new Ht(r.x2,n.y)],i&&e.push(new Ht(r.x1,p),new Ht(r.x1,h),new Ht(r.x2,p),new Ht(r.x2,h)),this.box=new Nt(r.x1,p,r.x2,h)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var i=e?t.width():t.height();return Math.min(Math.floor(i/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,i=e.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},e.prototype.createDefaultVisual=function(){var e=this.options,i=this.linePoints,o={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<i.length;r+=2){var n=new S.drawing.Path(o).moveTo(i[r].x,i[r].y).lineTo(i[r+1].x,i[r+1].y);k(n),this.visual.append(n)}},e}($t);Vt($i,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Ji=$i,Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(Ji);function to(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!1);var r=i.defaults=i.defaults||{},n=i.depth=i.depth||0,s=!1;if(i.excluded=i.excluded||[],n>5)return null;for(var a in t)if(!lt(a,i.excluded)&&t.hasOwnProperty(a)){var p=t[a];R(p)?(s=!0,o||(t[a]=Ot(p(e),r[a]))):I(p)&&(o||(i.defaults=r[a]),i.depth++,s=to(p,e,i,o)||s,i.depth--)}return s}function eo(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var io=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(i.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=j({},o,{vertical:!this.options.invertAxes},t)}return i},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&C(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s=i[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;C(s.value)&&(r+=Math.abs(s.value),o.push(Math.abs(s.value)))}}if(r>0)return t.value/r}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var o=this.plotValue(t),r=o>=0,n=e,s=!1,a=0;a<i.length;a++){var p=i[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if("string"==typeof h&&h!==l)continue;if(h.group&&h.group!==l.group)continue}var c=this.plotValue(p);(c>=0&&r||c<0&&!r)&&(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=t.series,f=this.seriesValueAxis(u),d=this.categoryAxisCrossingValue(f);return[d,M(t.value)?t.value:d]},e.prototype.stackLimits=function(t,e){for(var i=u,o=f,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];xt(p)&&isFinite(p)&&(o=Math.max(o,p),i=Math.min(i,p))}}}return{min:i,max:o}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,p=o[a];if(!p){p=this.stackLimits(s,n.stack);var h=this.errorTotals;h&&(h.negative.length&&(p.min=Math.min(p.min,Bt(h.negative).min)),h.positive.length&&(p.max=Math.max(p.max,Bt(h.positive).max))),p.min!==u||p.max!==f?o[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,h=e.fields.errorHigh;C(p)&&C(h)?o={low:p,high:h}:a&&xt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Di(a.value,n,y),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},e.prototype.addPointErrorBar=function(t,e){var i=!this.options.invertAxes,o=t.options.errorBars,r=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:r};this.updateRange({value:n},p),this.updateRange({value:s},p)}var h=new Qi(n,s,i,this,r,o);t.errorBars=[h],t.append(h)},e.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,r=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:o,high:r}},e.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i];n||(this.categoryPoints[i]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,xt(a.dataItem)||(a.dataItem=o.data[i]),this.addErrorBar(a,t,i)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,i,o,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];xt(a)||(this._evalSeries[n]=a=to(t,{},s,!0));var p=t;return a&&to(p=j({},p),{value:e,category:i,index:o,series:r,dataItem:r.data[o]},s),p},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.value,r=this.valueAxisRanges[i];isFinite(o)&&null!==o&&((r=this.valueAxisRanges[i]=r||{min:u,max:f}).min=Math.min(r.min,o),r.max=Math.max(r.max,o))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,i=t.axis,o=i?e.namedValueAxes[i]:e.valueAxis;if(!o)throw new Error("Unable to locate value axis with name "+i);return o},e.prototype.reflow=function(t){var e=this,i=this.categorySlots=[],o=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,h=e.seriesValueAxis(p),l=o[n++],c=i[a];if(c||(i[a]=c=e.categorySlot(r,a,h)),l){var u=e.plotRange(l,h.startValue()),f=e.valueSlot(h,u);if(f){var d=e.pointSlot(c,f);l.aboveAxis=e.aboveAxis(l,h),l.stackValue=u[1],e.options.isStacked100&&(l.percentage=e.plotValue(l)),e.reflowPoint(l,d)}else l.visible=!1}})),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(kt(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),o=t.value;return e.options.reverse?o<i:o>=i},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,i=t.options;return[].concat(i.axisCrossingValues||i.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,r=i?t:e;return new Nt(o.x1,r.y1,o.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=eo(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},e.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];if(r){var n=r.categoryIx;o(this._bindPoint(t,i,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:i,dataItem:r.item})}},e.prototype._bindPoint=function(t,e,i,o){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];r||(r=this._bindCache[e]=[]);var n=r[i];return n||(n=r[i]=zi.current.bindPoint(t,i,o)),n},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}($t);Vt(io,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var oo=io,ro={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:At(t),originalEvent:t,point:this}}},no={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&xt(e)&&null!==e&&(this.note=new xe({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},so=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Ot(this.options.aboveAxis,!0),this.tooltipTracking=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options,e=t.markers,i=t.labels;if(!this._rendered){if(this._rendered=!0,e.visible&&e.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible){var o=it(i),r=this.pointData(),n=this.value;o?n=o(r):i.format&&(n=this.formatValue(i.format)),this.label=new fe(n,j({align:a,vAlign:a,margin:{left:5,right:5},zIndex:Ot(i.zIndex,this.series.zIndex)},i),r),this.append(this.label)}this.createNote(),this.errorBar&&this.append(this.errorBar)}},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,i=j({color:this.color},t.border);return xt(i.color)||(i.color=new S.Color(e).brightness(.8).toHex()),i},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new ee({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Ot(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render(),this.box=t;var r=t.clone();if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new Nt(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,i=this.label,o=e.labels.position;i&&(o="below"===(o="above"===o?g:o)?s:o,i.reflow(t),i.box.alignTo(this.markerBox(),o),i.reflow(i.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),r=new ee({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Ot(t.border.opacity,1)},opacity:Ot(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,i=this.marker;if(i)e=i.paddingBox.toRect(),t=i.visual;else{var o=this.options.markers.size,r=o/2,n=this.box.center();e=new S.geometry.Rect([n.x-r,n.y-r],[o,o])}return{options:this.options,rect:e,visual:t}},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o,r=t.x2+5;return this.aboveAxis?(i=t.y1,o=s):(i=t.y2,o=g),{point:new Ht(r,i),align:{horizontal:"left",vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}($t);so.prototype.defaults={vertical:!0,markers:{visible:!0,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:E(3),padding:E(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},j(so.prototype,ro),j(so.prototype,no);var ao=so,po=function(t){function e(e,i,o){t.call(this),this.linePoints=e,this.series=i,this.seriesIx=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},e.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!xt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;R(i)&&o&&(i=o.color);var r=S.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&r.close(),this.visual=r},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}($t);Vt(po,{closed:!1});var ho=po;function lo(t,e,i,o,r){var n=t.box,s=new S.geometry.Point;return s[e]=n[e+i],s[o]=n[o+r],s}var co={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,r=e.reverse,n=o?m:x,s=o?x:m,a=r?2:1,p=a,h=lo(t[0],n,a,s,p),l=[h],c=1;c<t.length;c++){var u=lo(t[c],n,a,s,p);if(h[n]!==u[n]){var f=new S.geometry.Point;f[n]=h[n],f[s]=u[s],l.push(f,u)}h=u}return i?h!==kt(l)&&l.push(h):l.push(lo(kt(t),n,a,s,r?1:2)),l}},uo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(ho);j(uo.prototype,co);var fo=uo,go=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;R(i)&&e&&(i=e.color);var o=new Pi(this.options.closed).process(this.points()),r=new S.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,o),this.visual=r},e}(ho),yo={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):"interpolate"!==this.seriesMissingValues(s)&&(h.length>1&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}h.length>1&&(t=this.createSegment(h,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?Gi:e||"interpolate"},getNearestPoint:function(t,e,i){for(var o,r=new Ht(t,e),n=this.seriesPoints[i],s=u,a=0;a<n.length;a++){var p=n[a];if(p&&xt(p.value)&&null!==p.value&&!1!==p.visible){var h=p.box.center().distanceTo(r);h<s&&(o=p,s=h)}}return o}},vo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(ct(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),r=i[2].anchor();e.suspend(),o.setX(t),e.resume(),r.setX(t)},e}(S.drawing.Animation);Vt(vo,{duration:600}),S.drawing.AnimationFactory.current.register("clip",vo);var mo=vo;function xo(t){for(var e=0;e<t.length;e++)if(xt(t[e].zIndex))return!0}var bo={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),i=S.drawing.Path.fromRect(e.toRect());this.visual.clip(i),this.animation=new mo(i,{box:e}),xo(this.options.series)&&this._setChildrenAnimation(i)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&xt(o.visual.options.zIndex)&&o.visual.clip(t)}}},_o=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return ao},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),a=t.valueFields.value;if(!xt(a)||null===a){if(s!==Gi)return null;a=0}var p=this.pointOptions(r,n);p=this.evalPointOptions(p,a,o,i,r,n);var h=t.fields.color||r.color;R(r.color)&&(h=p.color);var l=new ao(a,p);return l.color=h,this.append(l),l},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},e.prototype.createSegment=function(t,e,i){var o=e.style;return new("step"===o?fo:"smooth"===o?go:ho)(t,e,i)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},e}(oo);j(_o.prototype,yo,bo);var wo=_o,Ao=function(t){function e(e,i,o,r,n){t.call(this,e,i,o),this.prevSegment=r,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;R(o)&&e&&(o=e.color),this.visual=new S.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),i.width>0&&!1!==i.visible&&this.createStroke({stroke:j({color:o,opacity:t.opacity,lineCap:"butt"},i)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new S.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new S.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment();if(o){var r=this.stackSegments();vt(i,r)}var n=new S.drawing.Path(t);n.segments.push.apply(n.segments,i),!o&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),n=o.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=kt(s).anchor(),h=i?n.x1:n.y1;i?t.lineTo(h,p.y).lineTo(h,a.y):t.lineTo(p.x,h).lineTo(a.x,h)},e}(ho),So=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(Ao);j(So.prototype,co);var ko=So,Po=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new Pi(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;i>=0;i--){var o=t[i];e.push(new S.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},e}(Ao),Co=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;s&&i>0&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a));return new("step"===a?ko:"smooth"===a?Po:Ao)(t,e,i,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var i=this._stackPoints;if(i)for(var o=0;o<i.length;o++){var r=i[o],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,n=t.length;r<0&&(r=0,n--);var s=r+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<s;h++){var l=h+a,c=e,u=void 0;do{u=o[--c][l]}while(c>0&&!u);if(u)"step"!==i&&h>r&&!o[c][l-1]&&p.push(this._previousSegmentPoint(h,l,l-1,c)),p.push(u),"step"!==i&&h+1<s&&!o[c][l+1]&&p.push(this._previousSegmentPoint(h,l,l+1,c));else{var f=this._createGapStackPoint(h);this._stackPoints.push(f),p.push(f)}}return p},e.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;s>0&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),i=new ao(0,e);return i.categoryIx=t,i.series={},i},e.prototype.seriesMissingValues=function(t){return t.missingValues||Gi},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(wo),To=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var i in t){var o=t[i],r=e[i];e[i]=r=r||{min:u,max:f},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(S.Class),Mo=function(t){function e(e,i,o){t.call(this,i),this.textBox=new fe(e,this.options,o),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,p=r.box,h=r.options.padding,l=t;n.align=i?a:c,n.vAlign=i?g:a,"insideEnd"===e.position?i?(n.vAlign=g,!o&&p.height()<t.height()&&(n.vAlign=s)):n.align=o?d:c:e.position===a?(n.vAlign=a,n.align=a):"insideBase"===e.position?i?n.vAlign=o?s:g:n.align=o?c:d:"outsideEnd"===e.position&&(i?l=o?new Nt(t.x1,t.y1-p.height(),t.x2,t.y1):new Nt(t.x1,t.y2,t.x2,t.y2+p.height()):(n.align=a,l=o?new Nt(t.x2,t.y1,t.x2+p.width(),t.y2):new Nt(t.x1-p.width(),t.y1,t.x1,t.y2))),e.rotation||(i?h.left=h.right=(l.width()-r.contentBox.width())/2:h.top=h.bottom=(l.height()-r.contentBox.height())/2),r.reflow(l)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?x:m,i=e+"1",o=e+"2",r=this.children[0],n=this.parent.box;if(n[i]<t[i]||t[o]<n[o]){var s=r.paddingBox.clone();s[i]=Math.max(n[i],t[i]),s[o]=Math.min(n[o],t[o]),this.reflow(s)}},e}($t);Vt(Mo,{position:"outsideEnd",margin:E(3),padding:E(4),color:n,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var Ro=Mo;function Oo(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var jo=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||v,this.aboveAxis=Ot(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options,e=t.labels;if(e.visible){var i,o=this.pointData(),r=it(e);i=r?r(o):this.formatValue(e.format),this.label=new Ro(i,j({vertical:t.vertical},e),o),this.append(this.label)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},e.prototype.createVisual=function(){var e=this,i=this.box,o=this.options,r=o.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),r){var n=this.rectVisual=r({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:i.toRect(),createVisual:function(){var t=new S.drawing.Group;return e.createRect(t),t},options:o});n&&this.visual.append(n)}else i.width()>0&&i.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,i=e.border,o=xt(i.opacity)?i.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=S.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(k(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Oo(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return k(S.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,o=e.color;return xt(o)||(o=new S.Color(t).brightness(i).toHex()),o},e.prototype.tooltipAnchor=function(){var t,e,i=this.options,o=this.box,r=this.aboveAxis,n=this.owner.pane.clipBox()||o,a=c,p=g;if(i.vertical)t=Math.min(o.x2,n.x2)+5,r?e=Math.max(o.y1,n.y1):(e=Math.min(o.y2,n.y2),p=s);else{var h=Math.max(o.x1,n.x1),l=Math.min(o.x2,n.x2);i.isStacked?(p=s,r?(a=d,t=l):t=h,e=Math.max(o.y1,n.y1)-5):(r?t=l+5:(t=h-5,a=d),e=Math.max(o.y1,n.y1))}return{point:new Ht(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},e}($t);j(jo.prototype,ro),j(jo.prototype,no),jo.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Io=jo;function Vo(t,e){t.forEach(e)}function Bo(t,e){for(var i=t.length,o=i-1;o>=0;o--)e(t[o],o-i-1)}var Lo=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Bo:Vo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.gap,r=e.spacing,n=this.children,s=n.length,a=i?x:m,p=s+o+r*(s-1),h=(i?t.height():t.width())/p,l=t[a+1]+h*(o/2);this.forEach(n,(function(e,i){var o=(e.box||t).clone();o[a+1]=l,o[a+2]=l+h,e.reflow(o),i<s-1&&(l+=h*r),l+=h}))},e}($t);Vt(Lo,{vertical:!1,gap:0,spacing:0});var zo=Lo,Eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?m:x,i=this.children,o=i.length,r=this.box=new Nt,n=0;n<o;n++){var s=i[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(r=this.box=a.clone()),s.reflow(a),r.wrap(a)}}},e}($t);Vt(Eo,{vertical:!0});var Fo=Eo,Do=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return Io},e.prototype.clusterType=function(){return zo},e.prototype.stackType=function(){return Fo},e.prototype.stackLimits=function(e,i){return t.prototype.stackLimits.call(this,e,i)},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),l=this.pointOptions(r,n),c=l.labels;p&&"outsideEnd"===c.position&&(c.position="insideEnd"),l.isStacked=p;var u=t.fields.color||r.color;h<0&&l.negativeColor&&(u=l.negativeColor),l=this.evalPointOptions(l,h,o,i,r,n),R(r.color)&&(u=l.color);var f=new(this.pointType())(h,l);f.color=u;var d=a[i];d||(d=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(d));p?this.getStackWrap(r,d).append(f):d.append(f);return f},e.prototype.getStackWrap=function(t,e){var i,o=t.stack,r=o&&o.group||o,n=e.children;if("string"==typeof r){for(var s=0;s<n.length;s++)if(n[s]._stackGroup===r){i=n[s];break}}else i=n[0];i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=r,e.append(i));return i},e.prototype.categorySlot=function(t,e,i){var o=this.options,r=t.getSlot(e),n=i.startValue();if(o.isStacked){var s=i.getSlot(n,n,!0),a=o.invertAxes?m:x;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),xo(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&xt(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};if(e.isStacked){var o=this.seriesValueAxis(e.series[0]);t=o.getSlot(o.startValue())}else t=this.categoryAxis.getSlot(0);i.origin=new S.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e}(oo);Vt(Do,{animation:{type:Ni}});var Uo=Do,Ho=function(t){function e(e,i){t.call(this,i),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=o.getSlot(i.open,i.close),n=o.getSlot(i.low,i.high);r.x1=n.x1=t.x1,r.x2=n.x2=t.x2,this.realBody=r;var s=n.center().x,a=[];a.push([[s,n.y1],[s,r.y1]]),a.push([[s,r.y2],[s,n.y2]]),this.lines=a,this.box=n.clone().wrap(r),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new S.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var i=S.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Ot(e.border.opacity,e.opacity)}),k(i),t.append(i),Oo(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:Ot(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=S.drawing.Path.fromPoints(i[n],r);k(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return xt(e)||(e=new S.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=S.drawing.Path.fromRect(this.box.toRect(),{fill:{color:v,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var i=this.mainVisual(j({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,i},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Ht(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:c,vertical:g}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}($t);Vt(Ho,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),j(Ho.prototype,ro),j(Ho.prototype,no);var Go=Ho;function No(t){return ji(t)===t.length}var qo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=No(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));var f=a[o];f||(f=new zo({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(f)),i&&(this.updateRange(h,e),f.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return Go},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=j({},r),h=t.fields.color||r.color;p=this.evalPointOptions(p,a,o,i,r,n),"candlestick"===r.type&&a.open>a.close&&(h=t.fields.downColor||r.downColor||r.color),R(r.color)&&(h=p.color),p.vertical=!this.options.invertAxes;var l=new s(a,p);return l.color=h,l},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.splitValue(t),r=this.valueAxisRanges[i];r=this.valueAxisRanges[i]=r||{min:u,max:f},r=this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(oo);j(qo.prototype,bo);var Xo=qo,Yo=function(t){function e(e,i){t.call(this,e,i),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i,o=this.options,r=this.value,n=this.owner.seriesValueAxis(o);this.boxSlot=i=n.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);var s=n.getSlot(r.median);if(r.mean){var a=n.getSlot(r.mean);this.meanPoints=this.calcMeanPoints(t,a)}this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,s),this.box=e.clone().wrap(i),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,i=e.outliers||[],o=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<i.length;s++){var a=i[s],p=j({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);xt(p.color)||(xt(this.color)?p.color=this.color:p.color=new S.Color(n.background).brightness(.8).toHex());var h=new ee({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});h.value=a,r.push(h)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,n=e.getSlot(r);this.options.vertical?n.move(i.x):n.move(void 0,i.y),this.box=this.box.wrap(n),t[o].reflow(n)}},e.prototype.mainVisual=function(e){for(var i=t.prototype.mainVisual.call(this,e),o=this.renderOutliers(e),r=0;r<o.length;r++){var n=o[r].getElement();n&&i.append(n)}return i},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Go);Vt(Yo,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:v,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:p,background:v,border:{width:2,opacity:1},opacity:0}}),j(Yo.prototype,ro);var Wo=Yo,Zo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(Wo),Ko=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=No(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));var f=a[o];f||(f=new zo({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(f)),i&&(this.updateRange(h,e),f.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return this.options.invertAxes?Zo:Wo},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.valueAxisRanges[i],r=this.splitValue(t).concat(this.filterOutliers(t.outliers));xt(t.mean)&&(r=r.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:u,max:f},o=this.valueAxisRanges[i]={min:Math.min.apply(Math,r.concat([o.min])),max:Math.max.apply(Math,r.concat([o.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];xt(r)&&null!==r&&i.push(r)}return i},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Xo),$o=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(Ji);function Jo(t){return xt(t)&&null!==t}var Qo=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=i.seriesIx,h=i.series,l=t.options.errorBars,c=i[s],u=i[a];C(r)&&(C(c)&&C(u)&&(o={low:c,high:u}),l&&xt(l[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new Di(l[n],h,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,l[n])),o&&this.addPointErrorBar(o,t,e))},e.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===x,p={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];var h=new $o(o,r,a,this,n,s);e.errorBars.push(h),e.append(h),p[i]=o,this.updateRange(p,n),p[i]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],h=t;Jo(o)&&Jo(r)||(h=this.createMissingValue(h,a)),h&&((i=this.createPoint(h,e))&&(Object.assign(i,e),this.addErrorBar(i,m,e),this.addErrorBar(i,x,e)),this.updateRange(h,e.series)),this.points.push(i),p.push(i)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[o],p=this.yAxisRanges[r];Jo(n)&&(a=this.xAxisRanges[o]=a||{min:u,max:f},T(n)&&(n=Ue(i,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),Jo(s)&&(p=this.yAxisRanges[r]=p||{min:u,max:f},T(s)&&(s=Ue(i,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];xt(s)||(this._evalSeries[r]=s=to(t,{},n,!0));var a=t;return s&&to(a=j({},t),{value:e,series:o,dataItem:i.dataItem},n),a},e.prototype.pointType=function(){return ao},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=j({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return i},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;o=this.evalPointOptions(o,t,e),R(i.color)&&(r=o.color);var n=new ao(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,o),h=a.y.getSlot(t.y,t.y,o);if(s)if(p&&h){var l=e.pointSlot(p,h);s.reflow(l)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new Nt(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,o,n),a=s.valueFields,p=s.fields;t(a,j({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}($t);Vt(Qo,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),j(Qo.prototype,bo,{_bindPoint:oo.prototype._bindPoint});var tr=Qo,er=function(t){function e(e,i){t.call(this,e,i),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new S.drawing.Group,s=new S.drawing.Circle(new S.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),a=new S.drawing.Circle(new S.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new S.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,a),n},e}(ao);er.prototype.defaults=j({},er.prototype.defaults,{labels:{position:a},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),er.prototype.defaults.highlight.zIndex=void 0;var ir=er,or=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=f,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,i){null!==e.size&&(e.size>0||e.size<0&&i.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,i)):(this.points.push(null),this.seriesPoints[i.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return ir},e.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,r=e.pointIx*(600/o),n={delay:r,duration:600-r,type:"bubble"},s=e.color||i.color;t.size<0&&i.negativeValues.visible&&(s=Ot(i.negativeValues.color,s));var a=j({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:p,border:i.border,opacity:i.opacity,animation:n}});a=this.evalPointOptions(a,t,e),R(i.color)&&(s=a.color),a.markers.background=s;var h=new ir(t,a);return h.color=s,this.append(h),h},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c=n[l];if(c){var u=Math.abs(c.value.size)*h,f=Math.sqrt((p+u)/Math.PI),d=Ot(c.options.zIndex,0)+(1-f/a);j(c.options,{zIndex:d,markers:{size:2*f,zIndex:d},labels:{zIndex:d+1}})}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(tr);Vt(or,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var rr=or,nr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ee);j(nr.prototype,ro);var sr=nr,ar=function(t){function e(e,i){t.call(this,i),this.aboveAxis=this.options.aboveAxis,this.color=i.color||v,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,xt(this.value.target)&&(this.target=new sr({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:g,align:d}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},e.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),s=o.categorySlot(o.categoryAxis,e.categoryIx,n),a=n.getSlot(this.value.target),p=r?a:s,h=r?s:a;if(i){var l=new Nt(p.x1,h.y1,p.x2,h.y2);i.options.height=r?l.height():e.target.line.width,i.options.width=r?e.target.line.width:l.width(),i.reflow(l)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,i=S.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&i.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Ot(e.border.opacity,e.opacity)}),this.bodyVisual=i,k(i),this.visual.append(i)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=S.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return S.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}($t);ar.prototype.tooltipAnchor=Io.prototype.tooltipAnchor,Vt(ar,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),j(ar.prototype,ro),j(ar.prototype,no);var pr=ar,hr=function(t){function e(e,i){!function(t){for(var e=t.series,i=0;i<e.length;i++){var o=e[i],r=o.data;!r||b(r[0])||I(r[0])||(o.data=[r])}}(i),t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.plotRange=function(t){var e=t.series,i=this.seriesValueAxis(e),o=this.categoryAxisCrossingValue(i);return[o,t.value.current||o]},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,h=j({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),l=t.fields.color||r.color;h=this.evalPointOptions(h,p,o,i,r,n),R(r.color)&&(l=h.color);var c=new pr(p,h);c.color=l;var u=a[i];return u||(u=new zo({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(c),c},e.prototype.updateRange=function(t,e){var i=t.current,o=t.target,r=e.series.axis,n=this.valueAxisRanges[r];xt(i)&&!isNaN(i)&&xt(o&&!isNaN(o))&&((n=this.valueAxisRanges[r]=n||{min:u,max:f}).min=Math.min(n.min,i,o),n.max=Math.max(n.max,i,o))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},e}(oo);hr.prototype._setAnimationOptions=Uo.prototype._setAnimationOptions,Vt(hr,{animation:{type:Ni}});var lr=hr,cr=function(t){function e(e,i){t.call(this),this.chartService=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;if(e){var r=e.color||e.options.color;i=Ot(i,r),o=Ot(o,r)}var n=E(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:V(t.border.width),paddingTop:V(n.top),paddingBottom:V(n.bottom),paddingLeft:V(n.left),paddingRight:V(n.right)}},e.prototype.show=function(t,e,i){t.format=e.format;var o=this.getStyle(e,i);t.style=o,!xt(e.color)&&new S.Color(o.backgroundColor).percBrightness()>180&&(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},e.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(S.Class);Vt(cr,{border:{width:1},opacity:1});var ur=cr,fr=function(t){function e(e,i,o){t.call(this,e,o),this.crosshair=i,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===h&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},e.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,i,o=this.crosshair,r=this.options,n=r.position,p=r.padding,h=!o.axis.options.vertical,l=o.line.bbox();return h?(t=a,n===s?(e=g,i=l.bottomLeft().translate(0,p)):(e=s,i=l.topLeft().translate(0,-p))):(e=a,n===c?(t=d,i=l.topLeft().translate(-p,0)):(t=c,i=l.topRight().translate(p,0))),{point:i,align:{horizontal:t,vertical:e}}},e}(ur);Vt(fr,{padding:10});var dr=fr,gr=function(t){function e(e,i,o){t.call(this,o),this.axis=i,this.stickyMode=i instanceof qe;var r=this.options.tooltip;r.visible&&(this.tooltip=new dr(e,this,j({},r,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,i=this.point,o=e.options.vertical,r=this.getBox(),n=o?x:m,s=new S.geometry.Point(r.x1,r.y1);if(t=o?new S.geometry.Point(r.x2,r.y1):new S.geometry.Point(r.x1,r.y2),i)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(i));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=i[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?m:x,a=0;a<o;a++){var p=i[a];p.options.vertical!==r&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new S.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}($t);Vt(gr,{color:n,width:2,zIndex:-1,tooltip:{visible:!1}});var yr=gr,vr=function(t){function e(e,i){t.call(this,e),this.pane=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new S.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=S.drawing.Path.fromRect(t);k(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s=o[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}($t);vr.prototype.isStackRoot=!0;var mr=vr,xr=function(t){function e(e){t.call(this,e),this.id="pane"+br++,this.createTitle(),this.content=new $t,this.chartContainer=new mr({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;I(t)&&(t=j({},t,{align:t.position,position:g})),this.title=ge.buildTitle(t,this,e.prototype.options.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var i;kt(this.children)===this.content&&(i=this.children.pop()),t.prototype.reflow.call(this,e),i&&this.children.push(i),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),i=[],o=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?i:o,p=0;p<e.length;p++)if(0===a.length){var h=e[p];s!==h.options.vertical&&vt(a,n.createGridLines(h))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new Nt,o=0;o<e;o++){var r=t[o],n=r.options.vertical?x:m,s=r.lineBox();i[n+1]=s[n+1],i[n+2]=s[n+2]}if(0===i.x2)for(var a=this.parent.axes,p=a.length,h=0;h<p;h++){var l=a[h];if(!l.options.vertical){var c=l.lineBox();i.x1=c.x1,i.x2=c.x2}}return i},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Ri(this),index:this.paneIndex,name:this.options.name})},e}(Qt),br=1;xr.prototype.isStackRoot=!0,Vt(xr,{zIndex:-1,shrinkToFit:!0,title:{align:c},visible:!0});var _r=xr;function wr(t,e){null!==e&&t.push(e)}function Ar(t,e,i){var o=e.visible;if(xt(o))return o;var r=t.pointVisibility;return r?r[i]:void 0}function Sr(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=zi.current.bindPoint(t,n),a=s.valueFields.value;T(a)&&(a=parseFloat(a)),C(a)?(s.visible=!1!==Ar(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function kr(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Pr(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];lt(n.type,o)&&i.push(n)}return i}function Cr(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=Ue(i,nt(t)(e)),e[o]=r),r}function Tr(t,e){var i=t.type,o=e instanceof Date;return!i&&o||kr(i,h)}function Mr(t){return 1===t.length?t[0]:t}var Rr=/area/i;function Or(t,e){var i=zi.current.bindPoint(t,null,e).valueFields;for(var o in i)if(M(i[o]))return!0}function jr(t){var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=o;do{p(l+=r)&&(e=Or(h,(i=a(l)).item))}while(n<=l&&l<=s&&!e);if(e)return i}function Ir(t,e,i,o,r){var n=e.min,s=e.max,a=n>0&&n<i,p=s+1<i;if(a||p){var h,l,c;if("interpolate"!==function(t){return t.missingValues?t.missingValues:Rr.test(t.type)||t.stack?Gi:"interpolate"}(t))a&&(h=o(n-1)),p&&(l=o(s+1));else a&&(h=Or(t,(c=o(n-1)).item)?c:jr({start:n,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),p&&(l=Or(t,(c=o(s+1)).item)?c:jr({start:s,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}));h&&(t._outOfRangeMinPoint=h),l&&(t._outOfRangeMaxPoint=l)}}var Vr=function(t){function e(e,i,o){t.call(this,i),this.initFields(e,i),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=i,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.createPanes=function(){var t={title:{color:(this.options.title||{}).color}},e=[],i=this.options.panes||[],o=Math.max(i.length,1);function r(t,e){T(t.title)&&(t.title={text:t.title}),t.title=j({},e.title,t.title)}for(var n=0;n<o;n++){var s=i[n]||{};r(s,t);var a=new _r(s);a.paneIndex=n,e.push(a),this.append(a)}this.panes=e},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o];if(r.options.crosshair&&r.options.crosshair.visible){var n=new yr(this.chartService,r,r.options.crosshair);this.crosshairs.push(n),i.content.append(n)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;o>=0;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},e.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p=t[a],h=!1!==p.visible;if(!1!==p.visibleInLegend){var l=p.name,c=h?it(o):it(n)||it(o);c&&(l=c({text:Jo(l)?l:"",series:p}));var u=p._defaults,f=p.color;R(f)&&u&&(f=u.color);var d=void 0,g=void 0;h?(d={},g=f):(d={color:n.color,font:n.font},g=r.markers.color),Jo(l)&&""!==l&&s.push({text:l,labels:d,markerColor:g,series:p,active:h})}}vt(i.items,s)},e.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];s.options.vertical?i.push(s):e.push(s)}return{x:e,y:i,any:e.concat(i)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,o=E(e.margin);this.box=t.clone().unpad(o),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var i=this.getRoot();i&&i.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var r=0;r<e.length;r++)e[r].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var i=t.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=e.length-o.length,n=o[0]||0,s=0;s<r;s++)o.push(n);return o},e.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,s=e.getSlot(o,o,!0),a=e.options.reverse?2:1,p=t.box.translate(s[m+a]-r[m+n],s[x+a]-r[x+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),a={},p={},h={},l={},u=0;u<e.length;u++){var f=e[u],y=f.pane,v=y.id,m=!1!==f.options.visible,x=zr(t,y)||i,b=r;x!==i&&(b=this.axisCrossingValues(x,e)),this.alignAxisTo(f,x,n[u],b[u]),f.options._overlap||(Mt(f.lineBox().x1)===Mt(x.lineBox().x1)&&(a[v]&&f.reflow(f.box.alignTo(a[v].box,c).translate(-f.options.margin,0)),m&&(a[v]=f)),Mt(f.lineBox().x2)===Mt(x.lineBox().x2)&&(f._mirrored||(f.options.labels.mirror=!f.options.labels.mirror,f._mirrored=!0),this.alignAxisTo(f,x,n[u],b[u]),p[v]&&f.reflow(f.box.alignTo(p[v].box,d).translate(f.options.margin,0)),m&&(p[v]=f)),0!==u&&o.pane===f.pane&&(f.alignTo(o),f.reflow(f.box)))}for(var _=0;_<t.length;_++){var w=t[_],A=w.pane,S=A.id,k=!1!==w.options.visible,P=zr(e,A)||o,C=n;P!==o&&(C=this.axisCrossingValues(P,t)),this.alignAxisTo(w,P,r[_],C[_]),w.options._overlap||(Mt(w.lineBox().y1)===Mt(P.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,P,r[_],C[_]),h[S]&&w.reflow(w.box.alignTo(h[S].box,g).translate(0,-w.options.margin)),k&&(h[S]=w)),Mt(w.lineBox().y2,3)===Mt(P.lineBox().y2,3)&&(l[S]&&w.reflow(w.box.alignTo(l[S].box,s).translate(0,w.options.margin)),k&&(l[S]=w)),0!==_&&(w.alignTo(i),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Lr(e),o=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,Lr(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},e.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,s=r.contentBox;if(n.length>0){var a=Lr(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);i=Math.max(i,s.x1-a.x1);for(var h=0;h<n.length;h++){var l=n[h];l.reflow(l.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(i,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=Er(i),r=0;r<o.length;r++){o[r].autoRotateLabels()&&(e=!0)}if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(i>0)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!lt(n,t)||e[r].reflow(o)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var h=parseInt(p,10)/100;a.options.height=h*t.height()}a.reflow(t.clone()),o-=a.options.height}else r++}for(var l=0;l<i;l++){var c=e[l];c.options.height||(c.options.height=o/r)}for(var u=0;u<i;u++){var f=e[u],d=t.clone().move(t.x1,n);f.reflow(d),n+=f.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,i=e.length,o=0;o<i;o++)for(var r=e[o],n=0;n<i;n++){var s=e[n];if(r.options.vertical!==s.options.vertical){var a=r.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(S.drawing.Path.fromRect(e[i].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,i=this.options.plotArea,o=i.opacity,r=i.background,n=i.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&xt(e)||(r=v,o=0);var s=this._bgVisual=new S.drawing.MultiPath({fill:{color:r,opacity:o},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++){if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&xt(s.value)&&null!==s.value&&i.push(s)}}}return i},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},e.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,i=t.y;this.detachAxisGroupLabels(i,e),this.detachAxisGroupLabels(e,i)},e.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=zr(e,n)||e[0],a=o+i,p=this.createLabelAxis(r,a,s);if(p){i++;var h=n.axes.indexOf(r)+i;n.appendAxisAt(p,h)}}},e.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n="end"!==r&&"start"!==r,s=o.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=i.options.vertical?a.x:a.y,h=this.axisCrossingValues(i,p),l="end"===r,c=i.range(),u=l?c.max:c.min;if(Pt(h[e],c.min,c.max)-u==0)return null;h.splice(e+1,0,u),i.options.axisCrossingValues=h;var f=t.clone();return t.clear(),f.options.name=void 0,f.options.line.visible=!1,f.options.crosshair=void 0,f.options.notes=void 0,f.options.plotBands=void 0,f},e}($t);function Br(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Lr(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;if(n||Br(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new Nt}function zr(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var Er=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};Vt(Vr,{series:[],plotArea:{margin:{}},background:"",border:{color:n,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Fr=Vr,Dr={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Ur(t,e,i){var o=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),xt(o[r])||(o[r]={}),o=o[r];r=n.shift()}o[r]=i}var Hr=function(t){function e(e,i,o){t.call(this);var r=i.canonicalFields(e),n=i.valueFields(e),s=i.sourceFields(e,r),a=this._seriesFields=[],p=o.query(e.type),h=e.aggregate||p;this._series=e,this._binder=i;for(var l=0;l<r.length;l++){var c=r[l],u=void 0;if(I(h))u=h[c];else{if(0!==l&&!lt(c,n))break;u=h}u&&a.push({canonicalName:c,name:s[l],transform:R(u)?u:Vi[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};if(n&&!C(n)&&!b(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<o.length;p++){var h=o[p],l=this._bindField(r.values,h.canonicalName),c=h.transform(l,i,r.dataItems,e);if(!(null===c||!I(c)||xt(c.length)||c instanceof Date)){s=c;break}xt(c)&&Ur(h.name,s,c)}return s},e.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},e.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,a=void 0;a=xt(s[e])?s[e]:n.fields[e],i.push(a)}return i},e}(S.Class),Gr=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(S.Class);Gr.current=new Gr;var Nr=Gr,qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=j({},t,t.from),i=j({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),i.visible&&(this.labelTo=this._createLabel(i),this.append(this.labelTo))},e.prototype._createLabel=function(t){var e,i=it(t),o=this.pointData();return e=i?i(o):this.formatValue(t.format),new Ro(e,j({vertical:this.options.vertical},t),o)},e.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},e}(Io);qr.prototype.defaults=j({},qr.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Xr=qr,Yr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Xr},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,n=this.valueAxisRanges[i];null!==t&&C(o)&&C(r)&&((n=this.valueAxisRanges[i]=n||{min:u,max:f}).min=Math.min(n.min,o),n.max=Math.max(n.max,o),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Uo);Yr.prototype.plotLimits=oo.prototype.plotLimits;var Wr=Yr,Zr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(ao),Kr=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Ot(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,i=t.labels,o=this.value,r=this.fromPoint=new Zr(o,j({},this.options,{labels:i.from,markers:e.from})),n=this.toPoint=new Zr(o,j({},this.options,{labels:i.to,markers:e.to}));this.copyFields(r),this.copyFields(n),this.append(r),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,i=t.to;this.positionLabels(e,i),this.fromPoint.reflow(e),this.toPoint.reflow(i),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new S.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o,r=this.box,n=r.center();return this.options.vertical?(e=n.x,i=r.y1-5,o=s):(e=r.x2+5,i=n.y,o=a),{point:new Ht(e,i),align:{horizontal:"left",vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var i,o,r=this.options,n=r.labels,s=r.vertical;"auto"===n.position&&(s?e.y1<=t.y1?(o="above",i="below"):(o="below",i="above"):e.x1<=t.x1?(o=c,i=d):(o=d,i=c),n.from&&n.from.position||(this.fromPoint.options.labels.position=i),n.to&&n.to.position||(this.toPoint.options.labels.position=o))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e}($t);j(Kr.prototype,ro),j(Kr.prototype,no),Kr.prototype.defaults={markers:{visible:!1,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,margin:E(3),padding:E(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:v,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var $r=Kr,Jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new S.drawing.Path(t),i=new S.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),i.segments.push.apply(i.segments,this.stackSegments()),this.visual.append(e),this.visual.append(i)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(Ao),Qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new Pi).process(this.toGeometryPoints(t))},e}(Jr),tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(Jr);j(tn.prototype,co);var en=tn,on=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return $r},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Jo(s.from)&&!Jo(s.to)){if(this.seriesMissingValues(r)!==Gi)return null;s={from:0,to:0}}var a=this.pointOptions(r,n);a=this.evalPointOptions(a,s,o,i,r,n);var p=t.fields.color||r.color;R(r.color)&&(p=a.color);var h=new $r(s,a);return h.color=p,this.append(h),h},e.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?Qr:"step"===o?en:Jr)(t,e,i)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),o=t.getSlot(e[1],e[1],!this.options.clip);if(i&&o)return{from:i,to:o}},e.prototype.pointSlot=function(t,e){var i,o,r=e.from,n=e.to;return this.options.invertAxes?(i=new Nt(r.x1,t.y1,r.x2,t.y2),o=new Nt(n.x1,t.y1,n.x2,t.y2)):(i=new Nt(t.x1,r.y1,t.x2,r.y2),o=new Nt(t.x1,n.y1,t.x2,n.y2)),{from:i,to:o}},e.prototype.addValue=function(e,i){var o=e.valueFields;C(o.from)||(o.from=o.to),C(o.to)||(o.to=o.from),t.prototype.addValue.call(this,e,i)},e.prototype.updateRange=function(t,e){if(null!==t&&C(t.from)&&C(t.to)){var i=e.series.axis,o=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:u,max:f},r=t.from,n=t.to;o.min=Math.min(o.min,r,n),o.max=Math.max(o.max,r,n)}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.from,i.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},e}(oo);j(on.prototype,yo,bo);var rn=on,nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=o.getSlot(i.low,i.high),p=o.getSlot(i.open,i.open),h=o.getSlot(i.close,i.close);p.x1=h.x1=a.x1=t.x1,p.x2=h.x2=a.x2=t.x2;var l=a.center().x;r.push([p.x1,p.y1]),r.push([l,p.y1]),n.push([l,h.y1]),n.push([h.x2,h.y1]),s.push([l,a.y1]),s.push([l,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Go),sn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return nn},e}(Xo),an=function(t){function e(e,i,o){t.call(this),this.from=e,this.to=i,this.series=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,i=this.to.box,o=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;o.push([e.x1,r],[i.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;o.push([n,e.y1],[n,i.y2])}return o},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},i=S.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});k(i),this.visual.append(i)},e}($t);Vt(an,{animation:{type:"fadeIn",delay:600}});var pn=an,hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=eo(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<i;p++){var h=zi.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,f=void 0;c?"total"===c.toLowerCase()?(h.valueFields.value=s,u=0,f=s):(h.valueFields.value=a,f=u-a,a=0):C(l)&&(a+=l,f=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:f,isVertical:o})}},e.prototype.updateRange=function(e,i){t.prototype.updateRange.call(this,{value:i.to},i)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var h=new pn(s,p,r);i.push(h),this.append(h)}s=p}}},e}(Uo),ln=["area","verticalArea","rangeArea","verticalRangeArea"],cn=[Xi,Wi].concat(ln),un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new To,t.length>0){this.invertAxes=lt(t[0].type,[Ni,"bullet",Wi,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof qe?delete this.namedCategoryAxes[i]:(this.valueAxisRangeTracker.reset(i),delete this.namedValueAxes[i]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],o)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(Pr(t,["area","verticalArea"]),e),this.createRangeAreaChart(Pr(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Pr(t,[qi,Ni]),e),this.createRangeBarChart(Pr(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Pr(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Pr(t,"candlestick"),e),this.createBoxPlotChart(Pr(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Pr(t,"ohlc"),e),this.createWaterfallChart(Pr(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Pr(t,[Xi,Wi]),e)},e.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r=e[o],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(kr(n.options.type,h)||r.categoryField)&<(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n),i.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},e.prototype.filterSeries=function(t,e){var i=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,i),!C(e.options.min)&&!C(e.options.max))return t;var o=e.currentRangeIndices(),r=lt(t.type,cn),n=j({},t);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&Ir(n,o,i,(function(i){return{item:t.data[i],category:e.categoryAt(i,!0),categoryIx:i-o.min}}),(function(e){return xt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=kr(o.type,h),s=t.data,a=n?Cr:Bi,p=[];n||e.mapCategories();for(var l=0;l<s.length;l++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[l],this.chartService.intl):r[l],xt(c)&&null!==c){var u=e.totalIndex(c);p[u]=p[u]||{items:[],category:c},p[u].items.push(l)}}return this._currentPointsCache[i]=p,p},e.prototype.aggregateSeries=function(t,e){if(!t.data.length)return t;for(var i=this.seriesSourcePoints(t,e),o=j({},t),r=new Hr(j({},t),zi.current,Nr.current),n=o.data=[],s=e.options.dataItems||[],a=e.currentRangeIndices(),p=function(t){var o=t-a.min,n=i[t];if(n||(n=i[t]={}),n.categoryIx=o,!n.item){var s=e.categoryAt(t,!0);n.category=s,n.item=r.aggregatePoints(n.items,s)}return n},h=a.min;h<=a.max;h++){var l=p(h);n[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return lt(o.type,cn)&&Ir(o,a,e.totalCount(),p,(function(t){return i[t]})),e.options.dataItems=s,o},e.prototype.appendChart=function(e,i){var o=e.options.series,r=this.seriesCategoryAxis(o[0]),n=r.options.categories,s=Math.max(0,eo(o)-n.length);if(s>0)for(n=r.options.categories=r.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,o=st([].concat(e.valueAxis),(function(t){return t.name===i}))[0],r=((e.panes||[{}])[0]||{}).name||"default";return(o||{}).pane||r},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,i=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!i)throw new Error("Unable to locate category axis with name "+e);return i},e.prototype.stackableChartOptions=function(t,e){var i=t.stack;return{isStacked:i,isStacked100:i&&"100%"===i.type,clip:e.options.clip}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";i.hasOwnProperty(r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=dn(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Uo(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Wr(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var i=t[0],o=new lr(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=t[0],o=new wo(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=t[0],o=new Co(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var i=new rn(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var i=t[0],o=new sn(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var i=t[0],o=new Xo(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var i=t[0],o=new Ko(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var i=t[0],o=new hn(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var i=Pr(this.series,Zi),o=0;o<this.series.length;o++){var r=this.series[o];if(lt(r.type,ln)){var n=r.line;n&&"step"===n.style&&i.push(r)}}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof qe&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(lt(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=j({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?u:0},n),xt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=Tr(n,a[0])?new ti(n,this.chartService):new qe(n,this.chartService),i[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,o.push(p),this.appendAxis(p)}}var h=this.categoryAxis||o[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!lt(t[e].type,ln))return!1}return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var p=o[a];if(lt(this.findPane(p.pane),t)){var h=p.name,l=kr(p.type,"log")?{min:.1,max:1}:{min:0,max:1},c=e.query(h)||i||l;0===a&&c&&i&&(c.min=Math.min(c.min,i.min),c.max=Math.max(c.max,i.max));var u=new(kr(p.type,"log")?fi:ai)(c.min,c.max,j({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var f=this.valueAxis||s[0];this.valueAxis=f,r?this.axisX=f:this.axisY=f},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,h=0;h<p.length;h++){var l=p[h];l.getValue?wr(a,l.getValue(r)):wr(s,l.getCategory(r))}0===s.length&&wr(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(i,{element:At(e),originalEvent:e,category:Mr(s),value:Mr(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},e.prototype.updateAxisOptions=function(t,e){fn(this.options,t,e),fn(this.originalOptions,t,e)},e}(Fr);function fn(t,e,i){j([].concat(e instanceof qe?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}function dn(t,e,i){return st(t,(function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))}Vt(un,{categoryAxis:{},valueAxis:{}}),j(un.prototype,Dr);var gn=un;function yn(){this._defaultPrevented=!0}var vn=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},e.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;if(o){var r={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:yn,visual:t.highlightVisual(),show:e};o(r),r._defaultPrevented||t.toggleHighlight(e,i)}else t.toggleHighlight(e,i)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++){if(t===e[i])return!0}return!1},e}(S.Class);function mn(t,e){var i=(e||"").toLowerCase(),o=t.event;return"none"===i&&!(o.ctrlKey||o.shiftKey||o.altKey)||o[i+"Key"]}function xn(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}var bn=function(t){function e(e,i){t.call(this),this.plotArea=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=mn(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,m).concat(this._panAxes(t,x));if(e.length)return this.axisRanges=e,xn(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==o&&(r||"").toLowerCase()!==e)for(var s=i.axes,a=0;a<s.length;a++){var p=s[a];if(e===m&&!p.options.vertical||e===x&&p.options.vertical){var h=p.pan(o);h&&(h.limitRange=!0,n.push({axis:p,range:h}))}}return n},e}(S.Class);bn.prototype.options={key:"none",lock:"none"};var _n=bn,wn=function(t){function e(e,i){t.call(this),this.chart=e,this.options=j({},this.options,i),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){z(this._marquee,t)},e.prototype.start=function(t){if(mn(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),o=this._zoomPane=e._plotArea.paneByPoint(i),r=o?o.chartsBox().clone():null;if(o&&r){var n=this._elementOffset();return r.translate(n.left,n.top),this._zoomPaneClipBox=r,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},e.prototype._elementOffset=function(){var t=this.chart.element,e=z(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop,r=_t(t);return{left:i+r.left,top:o+r.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),i=this._selectionPosition(t);i.left-=e.left,i.top-=e.top;var o={x:i.left,y:i.top},r={x:i.left+i.width,y:i.top+i.height};return this._updateAxisRanges(o,r),this.removeElement(),delete this._zoomPane,xn(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((i!==m||a)&&(i!==x||!a)&&xt(s.axisIndex)){var p=s.pointsRange(t,e);p&&o.push({axis:s,range:p})}}this.axisRanges=o},e.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,o),a=Math.min(i.y,r),p=Math.abs(i.x-o),h=Math.abs(i.y-r);return n===m&&(s=e.x1,p=e.width()),n===x&&(a=e.y1,h=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(h=e.y2-i.y),r<e.y1&&(h=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:h}},e}(S.Class);wn.prototype.options={key:"shift",lock:"none"};var An=wn,Sn=function(t){function e(e,i){t.call(this),this.chart=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t){for(var e=(this.options.lock||"").toLowerCase(),i=[],o=this.chart._plotArea.axes,r=0;r<o.length;r++){var n=o[r],s=n.options.vertical;if((e!==m||s)&&(e!==x||!s)&&n.zoomRange){var a=n.zoomRange(-t);a&&i.push({axis:n,range:a})}}return this.axisRanges=i,xn(i)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(S.Class),kn=function(t){function e(e,i){t.call(this,e),this.chartService=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new S.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":"horizontal",reverse:e.rtl,alignItems:i?"start":"center"});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new Nt),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?ce(e):new Nt},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}($t),Pn=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new ae({vertical:!1,wrap:!1,align:a,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new ee(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return j({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=j({},t.labels);this.container.append(new fe(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},i=this._itemOverlay=S.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:v,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(i)},e.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger("legendItemClick",i)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);return t.trigger("legendItemHover",i)||t._legendItemHover(i.seriesIndex,i.pointIndex),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:At(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;o?(this.visual=o({active:i.active,series:i.series,sender:this.getSender(),pointIndex:i.pointIndex,options:{markers:this.markerOptions(),labels:i.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):t.prototype.renderVisual.call(this)},e}(Qt),Cn=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,e),this.chartService=i,lt(this.options.position,[g,d,s,c,"custom"])||(this.options.position=d),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=a;"custom"===e?o=c:lt(e,[g,s])?(o="start"===i?c:"end"===i?d:a,r=e):i&&("start"===i?r=g:"end"===i&&(r=s)),this.container=new Qt({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Qt({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,i=this.isVertical(),o=new kn({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.items;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s];o.append(new Pn(j({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}o.render(),this.itemsContainer.append(o)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,i=t.position;return"custom"===i&&"horizontal"!==e||(xt(e)?"horizontal"!==e:lt(i,[c,d]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.reflow=function(t){var e=this.options,i=t.clone();this.hasItems()?("custom"===e.position?(this.containerCustomReflow(i),this.box=i):this.containerReflow(i),this.hasTitle()&&this.title.reflow(new Nt(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=i},e.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,a=o===g||o===s?m:x,p=this.isVertical(),h=t.clone(),l=t.clone();o!==c&&o!==d||(l.y1=h.y1=0),p&&n?(l.y2=l.y1+n,l.align(h,x,i.options.vAlign)):!p&&r&&(l.x2=l.x1+r,l.align(h,m,i.options.align)),i.reflow(l);var u=(l=i.box).clone();(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),i.reflow(l)),u[a+1]=t[a+1],u[a+2]=t[a+2],this.box=u},e.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),i.reflow(p),p=i.box,i.reflow(new Nt(o,r,o+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=j({},{color:n,position:g,align:a},t),i=e.text;if(t&&!1!==t.visible){if(xt(e)&&e.visible){var o=it(e);o?i=o({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))}this.title=new fe(i,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new ae({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===s?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}($t);Vt(Cn,{position:d,items:[],offsetX:0,offsetY:0,margin:E(5),padding:E(5),border:{color:n,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:c,vAlign:a}});var Tn=Cn,Mn=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,i){for(var o,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if((o=Pr(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(o,e,i)},e}(S.Class);Mn.current=new Mn;var Rn=Mn;function On(t){var e=document.createElement("div");return t&&(e.className=t),e}function jn(t){for(var e=t;e&&!at(e,"k-handle");)e=e.parentNode;return e}var In=function(t){function e(e,i,o,r){t.call(this);var n=e.element;this.options=j({},this.options,o),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=i,this._dateAxis=this.categoryAxis instanceof ti,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=On("k-selector");z(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=On("k-selection");this.leftMask=On("k-mask"),this.rightMask=On("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(On("k-selection-bg"));var o=this.leftHandle=On("k-handle k-left-handle"),r=this.rightHandle=On("k-handle k-right-handle");o.appendChild(On()),r.appendChild(On()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=z(i,["borderLeftWidth","borderRightWidth","height"]),s=z(o,"height").height,a=z(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},z(o,{top:(n.height-s)/2}),z(r,{top:(n.height-a)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),mt(this.wrapper,((t={})[Ki]=this._mousewheelHandler,t))),this._domEvents=J.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&j(t,{min:Ue(i,t.min),max:Ue(i,t.max),from:Ue(i,t.from),to:Ue(i,t.to)});var o=z(this.chartElement,["paddingLeft","paddingTop"]),r=o.paddingLeft,n=o.paddingTop;this.options=j({},{width:e.width(),height:e.height()+.1,padding:{left:r,top:n},offset:{left:e.x1+r,top:e.y1+n},from:t.min,to:t.max},t)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Rt(this.wrapper,((t={})[Ki]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._start=function(t){var e=this.options,i=At(t);if(!this._state&&i){this.chart._unsetActivePoint(),this._state={moveTarget:jn(i)||i,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger("selectStart",o)&&(this._state=null)}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:jn(At(t)))&&_(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this._state,i=this.options,o=this.categoryAxis,r=e.range,n=e.moveTarget,s=o.options.reverse,a=this._index(i.from),p=this._index(i.to),h=this._index(i.min),l=this._index(i.max),c=e.startLocation-t.x.location,u=r.from,f=r.to,d=r.to-r.from,g=z(this.wrapper,"width").width/(o.categoriesCount()-1),y=Math.round(c/g)*(s?-1:1);if(n){var v=at(n,"k-left-handle"),m=at(n,"k-right-handle");at(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(h,a-y),l-d),r.to=Math.min(r.from+d,l)):v&&!s||m&&s?(r.from=Math.min(Math.max(h,a-y),l-1),r.to=Math.max(r.from+1,r.to)):(v&&s||m&&!s)&&(r.to=Math.min(Math.max(h+1,p-y),l),r.from=Math.min(r.to-1,r.from)),r.from===u&&r.to===f||(this.move(r.from,r.to),this.trigger("select",this._rangeEventArgs(r)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&A(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger("selectEnd",this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new Ht(o.x,i.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),h=s-n,l=n+h/2,c={},u=3===t.event.which,f=Math.round(l-r);this._state||u||(this.chart._unsetActivePoint(),i.options.justified||f--,c.from=Math.min(Math.max(a,n-f),p-h),c.to=Math.min(c.from+h,p),this._start(t),this._state&&(this._state.range=c,this.trigger("select",this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,i=gt(t);if(this._start({target:this.selection}),this._state){var o=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(i)>1&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger("select",{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(o.from),to:this._value(o.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var i=this._rangeEventArgs(this._state.range);this.trigger("selectStart",i)?this._state=null:t.preventDefault()},e.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){var e=this.chart,i=this._state,o=this.options,r=this.categoryAxis,n=i.range,s=e._toModelCoordinates(t.touches[0].x.location).x,a=e._toModelCoordinates(t.touches[1].x.location).x,p=Math.min(s,a),h=Math.max(s,a);t.preventDefault(),n.from=r.pointCategoryIndex(new Ht(p))||o.min,n.to=r.pointCategoryIndex(new Ht(h))||o.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,i=this._index(t);return e.getSlot(i,i,!0)},e.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?e:t,p=o?t:e,h="x"+(o?2:1),l=this._slot(a),c=Mt(l[h]-r.left+n.left);z(this.leftMask,{width:c}),z(this.selection,{left:c}),l=this._slot(p);var u=Mt(i.width-(l[h]-r.left+n.left));z(this.rightMask,{width:u});var f=i.width-u;f!==i.width&&(f+=s.right),z(this.rightMask,{left:f}),z(this.selection,{width:Math.max(i.width-(c+u)-s.right,0)})},e.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=Pt(this._index(t),o,r),s=Pt(this._index(e),n+1,r);i.visible&&this.move(n,s),i.from=this._value(n),i.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=j({},a);if(this._state&&(a=this._state.range),r!==d&&(a.from=Pt(Pt(n-t,0,s-1),i,o)),r!==c&&(a.to=Pt(Pt(s+t,a.from+1,o),i,o)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(S.Class);Vt(In,{visible:!0,mousewheel:{zoom:"both"},min:f,max:u});var Vn=In,Bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var i=j({},this.options,e.options.tooltip),o=e.tooltipAnchor();o?(this._current=e,t.prototype.show.call(this,{point:e,anchor:o},i,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(ur),Ln=function(t){function e(e,i){t.call(this,e.chartService,i),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var i=st(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(i.length>0){var o=i[0],r=this.plotArea.categoryAxis.getSlot(o.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(o,r);this.show({anchor:n,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=i.center(),n=e.center();return{point:o?new Ht(r.x,n.y):new Ht(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(ur);Vt(Ln,{categoryFormat:"{0:d}"});var zn=Ln,En=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var i=e.vertical?x:m,o=this.fromScale=new S.geometry.Point(1,1);o[i]=Hi,t.transform(S.geometry.transform().scale(o.x,o.y))}else this.abort()},e.prototype.step=function(t){var e=ct(this.fromScale.x,1,t),i=ct(this.fromScale.y,1,t);this.element.transform(S.geometry.transform().scale(e,i,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(S.drawing.Animation);Vt(En,{duration:600}),S.drawing.AnimationFactory.current.register(Ni,En);var Fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(S.geometry.transform().scale(Hi,Hi,t))},e.prototype.step=function(t){this.element.transform(S.geometry.transform().scale(t,t,this.center))},e}(S.drawing.Animation);Vt(Fn,{easing:"easeOutElastic"}),S.drawing.AnimationFactory.current.register("bubble",Fn);var Dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(S.drawing.Animation);Vt(Dn,{duration:200,easing:"linear"}),S.drawing.AnimationFactory.current.register("fadeIn",Dn);var Un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(S.geometry.transform().scale(Hi,Hi,this.options.center))},e.prototype.step=function(t){this.element.transform(S.geometry.transform().scale(t,t,this.options.center))},e}(S.drawing.Animation);Vt(Un,{easing:"easeOutElastic",duration:600}),S.drawing.AnimationFactory.current.register(Yi,Un);var Hn=Un,Gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,i){return new("smooth"===e.style?go:ho)(t,e,i)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===Gi){var i={x:t.x,y:t.y};return Jo(i.x)||(i.x=0),Jo(i.y)||(i.y=0),i}},e}(tr);j(Gn.prototype,yo);var Nn=Gn,qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new To,this.yAxisRangeTracker=new To},e.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(Pr(n,"scatter"),o),this.createScatterLineChart(Pr(n,"scatterLine"),o),this.createBubbleChart(Pr(n,"bubble"),o))}this.createAxes(t)},e.prototype.appendChart=function(e,i){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(i),delete this.namedYAxes[i]):(this.xAxisRangeTracker.reset(i),delete this.namedXAxes[i]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=st([].concat(e.xAxis),(function(t){return t.name===i}))[0],r=t.yAxis,n=st([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new tr(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new Nn(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new rr(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=j({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=kr(a.type,"log"),l=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},u=s.query(r)||l||c,f=[a.min,a.max],d=this.series,g=0;g<d.length;g++){var y=d[g],v=y[e?"yAxis":"xAxis"];if(v===a.name||0===i&&!v){var m=zi.current.bindPoint(y,0).valueFields;f.push(m[e?"y":"x"]);break}}0===i&&l&&(u.min=Math.min(u.min,l.min),u.max=Math.max(u.max,l.max));for(var x=0;x<f.length;x++)if(f[x]instanceof Date){o=!0;break}var b=new(kr(a.type,h)||!a.type&&o?hi:p?fi:ai)(u.min,u.max,a,this.chartService);if(b.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++){lt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s))}for(var a=0;a<r.length;a++){lt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,u=l.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(i,{element:At(e),originalEvent:e,x:Mr(a),y:Mr(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Xn(this.options,r,i,e),Xn(this.originalOptions,r,i,e)},e}(Fr);function Xn(t,e,i,o){j([].concat(i?t.yAxis:t.xAxis)[e],o)}Vt(qn,{xAxis:{},yAxis:{}}),j(qn.prototype,Dr);var Yn=qn,Wn=function(t){function e(e,i,o){t.call(this,o),this.value=e,this.sector=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.labels,e=this.owner.chartService,i=this.value;if(!this._rendered&&!1!==this.visible){this._rendered=!0;var o=it(t),r=this.pointData();if(o?i=o(r):t.format&&(i=e.format.auto(t.format,i)),t.visible&&(i||0===i)){if(t.position===a||"insideEnd"===t.position){if(!t.color){var s=new S.Color(this.options.color).percBrightness();t.color=s>180?n:v}t.background||(t.background=this.options.color)}else{var p=e.theme.seriesDefaults.labels;t.color=t.color||p.color,t.background=t.background||p.background}this.label=new fe(i,j({},t,{align:a,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),r),this.append(this.label)}}},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,i=this.sector.clone(),o=t.distance,r=i.middle();if(e){var n,s=e.box.height(),p=e.box.width();if(t.position===a)i.radius=Math.abs((i.radius-s)/2)+s,n=i.point(r),e.reflow(new Nt(n.x,n.y-s/2,n.x,n.y));else if("insideEnd"===t.position)i.radius=i.radius-s/2,n=i.point(r),e.reflow(new Nt(n.x,n.y-s/2,n.x,n.y));else{var h;(n=i.clone().expand(o).point(r)).x>=i.center.x?(h=n.x+p,e.orientation=d):(h=n.x-p,e.orientation=c),e.reflow(new Nt(h,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,i=this.sector,o=this.options;if(t.prototype.createVisual.call(this),this.value)if(o.visual){var r=(i.startAngle+180)%360,n=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new S.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:r,endAngle:r+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new S.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=o.width>0?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,s={color:n,opacity:i.opacity},a=this.createSegment(e,j({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(a),Oo(i)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},j({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new S.drawing.Circle(new S.geometry.Circle(new S.geometry.Point(t.center.x,t.center.y),t.radius),e):Zt.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,i=this.sector.center;j(e,{animation:{center:[i.x,i.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,j({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new S.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:$n(e+180)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e}($t),Zn=Mt(Tt(30),10),Kn=Mt(Tt(60),10);function $n(t){var e=Tt(t),i=Mt(Math.sin(e),10),o=Mt(Math.cos(e),10);return{horizontal:Math.abs(i)>Kn?a:o<0?d:c,vertical:Math.abs(i)<Zn?a:i<0?s:g}}Vt(Wn,{color:v,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:E(.5),align:p,zIndex:1,position:"outsideEnd"},animation:{type:Yi},highlight:{visible:!0,border:{width:1}},visible:!0}),j(Wn.prototype,ro);var Jn=Wn,Qn={createLegendItem:function(t,e,i){var o=this.options.legend||{},r=o.labels||{},n=o.inactiveItems||{},s=n.labels||{};if(i&&!1!==i.visibleInLegend){var a,p,h=!1!==i.visible,l=h?it(r):it(s)||it(r),c=i.category;l&&(c=l({text:c,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),h?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),Jo(c)&&""!==c&&this.legendItems.push({active:h,pointIndex:i.index,text:c,series:i.series,markerColor:p,labels:a})}}},ts=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,i=this.plotArea.options.seriesColors;void 0===i&&(i=[]);for(var o=i.length,r=e.series,n=r.length,s=0;s<n;s++){var p=r[s],h=p.data,l=Sr(p),c=l.total,u=l.points,f=l.count,d=360/c,g=void 0;isFinite(d)||(g=360/f);var y=void 0;y=xt(p.startAngle)?p.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===p.labels.position&&(p.labels.position=a);for(var v=0;v<u.length;v++){var m=u[v];if(m){var x=m.fields,b=m.value,_=m.visible,w=0!==b?g||b*d:0,A=1!==h.length&&Boolean(x.explode);R(p.color)||(p.color=x.color||i[v%o]),t(m.valueFields.value,new Xt(null,0,0,y,w),{owner:this,category:xt(x.category)?x.category:"",index:v,series:p,seriesIx:s,dataItem:h[v],percentage:0!==c?b/c:0,explode:A,visibleInLegend:x.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==_&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;to(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle"]})},e.prototype.addValue=function(t,e,i){var o=j({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Jn(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs;void 0===o&&(o=[]);var r=i.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new Nt(n.x1,n.y1,n.x1+s,n.y1+s),l=h.center(),c=n.center(),u=e.series.length,f=[],g=[],y=Ot(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,h.translate(c.x-l.x,c.y-l.y);for(var v=a-y,m=new Ht(v+h.x1+y,v+h.y1+y),x=0;x<r;x++){var b=i[x],_=b.sector,w=b.seriesIx;if(_.radius=v,_.center=m,o.length){var A=o[w];_.innerRadius=A.innerRadius,_.radius=A.radius}w===u-1&&b.explode&&(_.center=_.clone().setRadius(.15*_.radius).point(_.middle())),b.reflow(h);var S=b.label;S&&"outsideEnd"===S.options.position&&w===u-1&&(S.orientation===d?g.push(S):f.push(S))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=h},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=kt(this.points),i=e.sector,o=t.length-1,r=i.radius+e.options.labels.distance,n=[],s=t[0].box,a=Mt(s.y1-(i.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<o;p++){var h=t[p+1].box;s=t[p].box,a=Mt(h.y1-s.y2),n.push(a)}return a=Mt(i.center.y+r-t[o].box.y2-t[o].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;r>0&&(i>=0||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,i,o){var r=o;if(t[i]>0){var n=Math.min(t[i],r);r-=n,t[i]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var i,o=kt(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var l=0;l<s;l++){var c=e[l],u=c.box;h+=t[l],i=this.hAlignLabel(u.x2,r.clone().expand(a),h,h+u.height(),c.orientation===d),c.orientation===d?(n.align!==p&&(i=r.radius+r.center.x+a),c.reflow(new Nt(i+u.width(),h,i,h))):(n.align!==p&&(i=r.center.x-r.radius-a),c.reflow(new Nt(i-u.width(),h,i,h))),h+=u.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,i=this.points,o=i.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<o;r++){var n=i[r],s=n.sector,a=n.label,p=s.middle(),h=(n.options.connectors||{}).color||e.color;if(a){var l=new S.drawing.Path({stroke:{color:h,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===a.options.position){var c=a.box,u=s.center,f=s.point(p),g=new Ht(c.x1,c.center().y),y=void 0,v=void 0,m=void 0;f=s.clone().expand(e.padding).point(p),l.moveTo(f.x,f.y),a.orientation===d?(m=es(u,f,g,v=new Ht(c.x1-e.padding,c.center().y)),g=new Ht(v.x-4,v.y),(m=m||g).x=Math.min(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(y=s.center.x+s.radius+4,n.options.labels.align!==qi?y<g.x?l.lineTo(y,f.y):l.lineTo(f.x+8,f.y):l.lineTo(y,f.y),l.lineTo(g.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))):(m=es(u,f,g,v=new Ht(c.x2+e.padding,c.center().y)),g=new Ht(v.x+4,v.y),(m=m||g).x=Math.max(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(y=s.center.x-s.radius-4,n.options.labels.align!==qi?y>g.x?l.lineTo(y,f.y):l.lineTo(f.x-8,f.y):l.lineTo(y,f.y),l.lineTo(g.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))),l.lineTo(v.x,v.y),this._connectorLines.push(l),this.visual.append(l)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),Lt(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,i=this.box.center(),o=this.visual.bbox();if(!o)return;var r=o.bottomRight(),n=Math.min((i.y-e.y1)/(i.y-o.origin.y),(e.y2-i.y)/(r.y-i.y),(i.x-e.x1)/(i.x-o.origin.x),(e.x2-i.x)/(r.x-i.x));n<1&&this.visual.transform(S.geometry.transform().scale(n,n,[i.x,i.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,i){return((t.parent.sector.middle()+270)%360-(i.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,a=s.x,p=s.y,h=Math.min(Math.abs(p-i),Math.abs(p-o));return h>n?t:a+Math.sqrt(n*n-h*h)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}($t);function es(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),s=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new Ht(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}Vt(ts,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),j(ts.prototype,Qn),ts.prototype.isStackRoot=!0;var is=ts,os=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],i=new is(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),vt(this.options.legend.items,e.legendItems)},e}(Fr),rs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();if(i){var n=i.box.height();if(e.position===a){o.radius-=(o.radius-o.innerRadius)/2;var s=o.point(r);i.reflow(new Nt(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Zt.current.createRing(t,e)},e}(Jn);Vt(rs,{overlay:{gradient:"roundedGlass"},labels:{position:a},animation:{type:Yi}}),j(rs.prototype,ro);var ns=rs,ss=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,i){var o=j({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible){var r=new ns(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var i,o=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=o.series,h=p.length,l=Ot(o.padding,a),c=s-(l=l>s-5?s-5:l),u=0,f=0;f<h;f++){var d=p[f];0===f&&xt(d.holeSize)&&(i=d.holeSize,c-=d.holeSize),xt(d.size)?c-=d.size:u++,xt(d.margin)&&f!==h-1&&(c-=d.margin)}xt(i)||(c-=i=.75*((s-l)/(h+.75)));var g,y=i,v=0;this.seriesConfigs=[];for(var m=0;m<h;m++){var x=p[m];g=(y+=v)+Ot(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},e}(is);Vt(ss,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var as=ss,ps=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],i=new as(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e}(os),hs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new To},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,o=t.getSlot(i),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-o.x1,r.y-o.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,i=this.valueAxisRangeTracker,o=i.query(),r=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});"log"===r.type?(t=Si,e={min:.1,max:1}):(t=wi,e={min:0,max:1});var n=i.query(name)||o||e;n&&o&&(n.min=Math.min(n.min,o.min),n.max=Math.max(n.max,o.max));var s=new t(n.min,n.max,r,this.chartService);this.valueAxis=s,this.appendAxis(s)},e.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),n=E(t.padding||{},r),s=o.clone().unpad(n),p=s.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(s,x,a);var h=p.clone().shrink(0,p.height()/2);i.reflow(p),e.reflow(h);var l=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:l})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Fr),ls=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=Ht.onCircle(t.center,t.startAngle,i);return new Nt(o.x,o.y,o.x,o.y)},e}(tr);Vt(ls,{clip:!1});var cs=ls,us=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Nn);us.prototype.pointSlot=cs.prototype.pointSlot,Vt(us,{clip:!1});var fs=us,ds=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),i=new Pi(!1),o=this.points();o.push(e),(t=this._strokeSegments=i.process(o)).pop()}return t},e}(Po),gs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),i=new S.geometry.Segment([e.x,e.y]);t.segments.unshift(i),t.segments.push(i)},e}(Ao);function ys(t,e){return t.value.x-e.value.x}var vs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i){return"smooth"===(e.line||{}).style?new ds(t,e,i):new gs(t,e,i)},e.prototype.createMissingValue=function(t,e){var i;return Jo(t.x)&&"interpolate"!==e&&(i={x:t.x,y:t.y},e===Gi&&(i.y=0)),i},e.prototype.seriesMissingValues=function(t){return t.missingValues||Gi},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort(ys),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];if(i)Jo(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},e}(fs),ms=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new mi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return j(t,{majorGridLines:{type:r},minorGridLines:{type:r}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Fr.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Pr(t,["polarLine"]),e),this.createScatterChart(Pr(t,["polarScatter"]),e),this.createAreaChart(Pr(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new fs(this,{series:t});this.appendChart(i,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var i=new cs(this,{series:t});this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new vs(this,{series:t});this.appendChart(i,e)}},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:At(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(hs);Vt(ms,{xAxis:{},yAxis:{}}),j(ms.prototype,Dr);var xs=ms;var bs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=Ht.onCircle(t.center,t.middle(),i);return new Nt(o.x,o.y,o.x,o.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),i=0;i<e.length;i++){var o=e[i];if(o&&o.length>1){var r=o[0].linePoints[0],n=kt(o),s=kt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&kt(o).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?go:ho)(t,e,i),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(o.options.closed=!0),o},e}(wo);Vt(bs,{clip:!1,limitPoints:!1});var _s=bs,ws=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Po),As=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Ao),Ss=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&i>0&&o&&(n=o.linePoints.slice(0),r=o),"smooth"===p?(s=new ws(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new As(t,e,i,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||Gi},e}(_s),ks=function(t){function e(e,i){t.call(this,e,null,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ns);Vt(ks,{overlay:{gradient:"none"},labels:{distance:10}});var Ps=ks,Cs=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Bo:Vo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.children,o=e.gap,r=e.spacing,n=i.length,s=n+o+r*(n-1),a=t.angle/s,p=t.startAngle+a*(o/2);this.forEach(i,(function(e){var i=t.clone();i.startAngle=p,i.angle=a,e.sector&&(i.radius=e.sector.radius),e.reflow(i),e.sector=i,p+=a+a*r}))},e}($t);Vt(Cs,{gap:1,spacing:0});var Ts=Cs,Ms=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new Nt;for(var s=r;s>=0&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}($t),Rs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Ps},e.prototype.clusterType=function(){return Ts},e.prototype.stackType=function(){return Ms},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var i=t.clone(),o=t.center.y;return i.radius=o-e.y1,i.innerRadius=o-e.y2,i},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Uo);Rs.prototype.reflow=oo.prototype.reflow,Vt(Rs,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Os=Rs,js=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new yi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&j(t,{majorGridLines:{type:r},minorGridLines:{type:r}}),this._isStacked100&&j(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),j(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){gn.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){gn.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Pr(t,["radarArea"]),e),this.createLineChart(Pr(t,["radarLine"]),e),this.createBarChart(Pr(t,["radarColumn"]),e)},e.prototype.chartOptions=function(t){var e={series:t},i=t[0];if(i){var o=this.filterVisibleSeries(t),r=i.stack;e.isStacked=r&&o.length>1,e.isStacked100=r&&"100%"===r.type&&o.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Ss(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new _s(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=this.chartOptions(t);o.gap=i.gap,o.spacing=i.spacing;var r=new Os(this,o);this.appendChart(r,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:At(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(hs);j(js.prototype,Dr,{appendChart:gn.prototype.appendChart,aggregateSeries:gn.prototype.aggregateSeries,seriesSourcePoints:gn.prototype.seriesSourcePoints}),Vt(js,{categoryAxis:{categories:[]},valueAxis:{}});var Is=js,Vs=function(t){function e(e,i,o){t.call(this,i),this.value=e,this.options.index=o.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.points,i=this.children[0];this.box=new Nt(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new Nt(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,i=this,o=this.options;t.prototype.createVisual.call(this),(e=o.visual?o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:o,sender:this.getSender(),createVisual:function(){return i.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return S.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return S.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=S.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Ht(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}($t);Vt(Vs,{color:v,border:{width:1}}),j(Vs.prototype,ro);var Bs=Vs,Ls=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var i=t.series[0],o=i.data;if(o)for(var r=Sr(i),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var h=p.fields;R(i.color)||(i.color=h.color||e[a%e.length]),h=j({index:a,owner:this,series:i,dataItem:o[a],percentage:p.value/n},h,{visible:p.visible});var l=p.valueFields.value,c=this.createSegment(l,h),u=this.createLabel(l,h);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;to(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual"]})},e.prototype.createSegment=function(t,e){var i=j({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){var o=new Bs(t,i,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},e.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=j({},this.options.labels,i.labels),s=t;if(r.visible){var a=it(r),p={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};if(a?s=a(p):r.format&&(s=this.plotArea.chartService.format.auto(r.format,s)),!r.color){var h=new S.Color(i.color).percBrightness();r.color=h>180?n:v,r.background||(r.background=i.color)}this.evalSegmentOptions(r,t,e);var l=new fe(s,j({vAlign:r.position},r),p);return this.labels.push(l),l}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o=t[i].options.align;if(o!==a){var r=t[i].box.width();o===c?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var f=r[u].percentage,d=r[u+1],g=d?d.percentage:f,y=r[u].points=[],v=o.dynamicHeight?i*f:i/n,m=void 0;m=Pt(m=f?(e-h*(g/f))/2:g?0:e/2,0,e),y.push(new S.geometry.Point(t.x1+l,t.y1+c)),y.push(new S.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new S.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new S.geometry.Point(t.x1+m,t.y1+v+c)),l=m,c+=v+o.segmentSpacing,h=Pt(e-2*m,0,e)}},e.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,p=s?0:(e-e/o.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],f=r[c].percentage,d=o.dynamicHeight?h*f:h/n,g=o.dynamicHeight?i*f:i/n;u.push(new S.geometry.Point(t.x1+p,t.y1+l)),u.push(new S.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new S.geometry.Point(t.x1+e-p-d,t.y1+g+l)),u.push(new S.geometry.Point(t.x1+p+d,t.y1+g+l)),p+=d,l+=g+o.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},e}($t);Vt(Ls,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:a,position:a,zIndex:1}}),j(Ls.prototype,Qn);var zs=Ls,Es=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createFunnelChart(this.series)},e.prototype.createFunnelChart=function(t){var e=t[0],i=new zs(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),vt(this.options.legend.items,e.legendItems)},e}(Fr),Fs="color",Ds="first",Us="max";Rn.current.register(gn,[Ni,qi,Xi,Wi,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),Rn.current.register(Yn,["scatter","scatterLine","bubble"]),Rn.current.register(os,[Yi]),Rn.current.register(ps,["donut"]),Rn.current.register(Es,["funnel"]),Rn.current.register(xs,["polarArea","polarLine","polarScatter"]),Rn.current.register(Is,["radarArea","radarColumn","radarLine"]),zi.current.register([Ni,qi,Xi,Wi,"area","verticalArea"],[y],["category",Fs,"noteText","errorLow","errorHigh"]),zi.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",Fs,"noteText"]),zi.current.register(["waterfall","horizontalWaterfall"],[y],["category",Fs,"noteText","summary"]),zi.current.register(["polarArea","polarLine","polarScatter"],[m,x],[Fs]),zi.current.register(["radarArea","radarColumn","radarLine"],[y],[Fs]),zi.current.register(["funnel"],[y],["category",Fs,"visibleInLegend","visible"]),Nr.current.register([Ni,qi,Xi,Wi,"area","verticalArea","waterfall","horizontalWaterfall"],{value:Us,color:Ds,noteText:Ds,errorLow:"min",errorHigh:Us}),Nr.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:Us,color:Ds,noteText:Ds}),Nr.current.register(["radarArea","radarColumn","radarLine"],{value:Us,color:Ds}),zi.current.register(["scatter","scatterLine","bubble"],[m,x],[Fs,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),zi.current.register(["bubble"],[m,x,"size"],[Fs,"category","noteText"]),zi.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",Fs,"downColor","noteText"]),Nr.current.register(["candlestick","ohlc"],{open:Us,high:Us,low:"min",close:Us,color:Ds,downColor:Ds,noteText:Ds}),zi.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",Fs,"noteText"]),Nr.current.register(["boxPlot","verticalBoxPlot"],{lower:Us,q1:Us,median:Us,q3:Us,upper:Us,mean:Us,outliers:Ds,color:Ds,noteText:Ds}),zi.current.register(["bullet","verticalBullet"],["current","target"],["category",Fs,"visibleInLegend","noteText"]),Nr.current.register(["bullet","verticalBullet"],{current:Us,target:Us,color:Ds,noteText:Ds}),zi.current.register([Yi,"donut"],[y],["category",Fs,"explode","visibleInLegend","visible"]);var Hs=["category",y,m,x],Gs=function(t){function e(e,i,o,r){var n=this;void 0===r&&(r={}),t.call(this),this.observers=[],this.addObserver(r.observer),this.chartService=new K(this,r),this.chartService.theme=o,this._initElement(e);var s=j({},this.options,i);this._originalOptions=j({},s),this._theme=o,this._initTheme(s,o),this._initHandlers(),this._initSurface(),this.bindCategories(),It.preloadFonts(i,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},e.prototype._setElementClass=function(t){_(t,"k-chart")},e.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i,function(t){for(var e=Hs,i=0;i<e.length;i++){var o=e[i]+"Axes";t[o]&&(t[e[i]+"Axis"]=t[o],delete t[o])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=j({},e,t),this.applySeriesColors()},e.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},e.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=e.width>0||e.height>0;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Lt(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,i=e.findPane(t);e.redraw(i)}else this._redraw()},e.prototype.getAxis=function(t){return Ti(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new Ri(e[i])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Ri(e[t])},e.prototype.plotArea=function(){return new Oi(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var i,o,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];R(e)?i=n.filterPoints(e):(I(e)?(o=e.series,r=e.category):o=r=e,i="donut"===s.type?Ns(n.pointsBySeriesName(o),r):s.type===Yi||"funnel"===s.type?Ns((n.charts[0]||{}).points,r):n.pointsBySeriesName(o));i&&this.togglePointsHighlight(t,i)},e.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},e.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(R(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&xt(t)&&(i=n.categoryAxis.categoryIndex(t)),o){if(i>=0){var s=this._plotArea.pointsByCategoryIndex(i);r.showAt(s)}}else e&&r.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&wt(e,{width:i.width}),i.height&&wt(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=S.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.setup()})),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new vn,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Zs(this._plotArea.panes),this._navState||this._cancelDomEvents()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var i=this.options,o=j({},t.options,{chartArea:{width:t.width,height:t.height}});Ws(this._originalOptions,o),this.options=j({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),Zs(r._plotArea.panes),e=r.visual,this.options=i}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof gn&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new _n(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new An(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Sn(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==i||this.requiresHandlers(["dragStart","drag","dragEnd"])),n=(!1===e||!1===o)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),s=this.element;this._dragZoomEnabled&&r&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||r&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!r,!n)},e.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Bn(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new zn(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var i,o,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||o.color,r=j({},n,n[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[i],r}for(var a=0;a<Hs.length;a++)i=Hs[a]+"Axis",o=t.axisDefaults||{},r=(r=[].concat(t[i])).map(s),t[i]=r.length>1?r:r[0]}(t,e),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=j({},t.seriesDefaults),s=e?j({},e.seriesDefaults):{},a=j({},s);qs(n),qs(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,l=j({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=l,i[p]=j({},l,i[p]),i[p].data=i[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new ne(this._modelOptions());return i.chart=this,i._plotArea=e,ge.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new Tn(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return j({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return Rn.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o=t[i],r=o.options;if(o instanceof qe&&r.select&&!r.vertical){var n=o.range(),s=new Vn(this,o,j({min:n.min,max:n.max},r.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger("selectStart",t)},e.prototype._select=function(t){return this.trigger("select",t)},e.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(S.throttle)(this._mousemove.bind(this),20)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point)),e.sender=this;for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},e.prototype._attachEvents=function(){var t,e,i=this.element;this._touchAction=i.style.touchAction,mt(i,((t={}).contextmenu=this._clickHandler,t[Ki]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&mt(i,((e={}).mousemove=this._mousemove,e)),this.domEvents=J.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger("zoomEnd",{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var i=this._gestureDistance,o=-t.distance/i+1;if(Math.abs(o)>=.1){o=Math.round(10*o),this._gestureDistance=t.distance;var r={delta:o,axisRanges:Xs(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger("zoomStart",r))this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(o))&&!this.trigger("zoom",r)&&e.zoom()}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart","drag","dragEnd"])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Xs(this._plotArea.axes),originalEvent:t}))},e.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger("drag",{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,h=p.startLocation-p.location;0!==h&&(r[a.options.name]=a.translateRange(h))}}e.axisRanges=r,this.trigger("drag",{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger("dragEnd",{axisRanges:Xs(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,"dragEnd"),this._zoomSelection){var i=this._zoomSelection.end(t);i&&!this.trigger("zoom",{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger("zoomEnd",{axisRanges:i,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var i=this._eventCoordinates(t),o=this._plotArea.paneByPoint(i);if(o)for(var r=0;r<e.length;r++)if(e[r].onPane(o))return!0},e.prototype._mousewheel=function(t){var e=this,i=gt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Xs(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i),n.axisRanges&&!this.trigger("zoom",n)&&o.zoom(),this._mwTimeout=setTimeout((function(){e.trigger("zoomEnd",n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(!s)this._startNavigation(t,r,"zoomStart")||(s=this._navState);if(s){var a=s.totalDelta||i;s.totalDelta=a+i;for(var p=this._navState.axes,h={},l=0;l<p.length;l++){var c=p[l],u=c.options.name;u&&(h[u]=c.scaleRange(-a))}this.trigger("zoom",{delta:i,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,"zoomEnd")}),150)}}},e.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),n=o.axes.slice(0);if(r){var s=Xs(n);this.trigger(i,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:s,pane:r,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},e.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),i&&(o=o.closest(i))&&o.aliasFor&&(o=o.aliasFor()),o},e.prototype._eventCoordinates=function(t){var e=St(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=z(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,i=t.paddingTop;this._padding={top:i,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=_t(this.element);return{left:Mt(t.x+e.left+i.left),top:Mt(t.y+e.top+i.top)}},e.prototype._toModelCoordinates=function(t,e){var i=this.element,o=_t(i),r=this._elementPadding(),n=Dt(i).invert(),s=new S.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(n);return new Ht(s.x,s.y)},e.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var i=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof Fr)})),o=this._activePoint,r=this._plotArea.series.length>1,n=this._hasInactiveOpacity();return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover?(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),n?this._displayInactiveOpacity(i,r):this._highlight.show(i))):!i&&n&&(r&&this._activеChartInstance&&(this._updateSeriesOpacity(i,!0),this._applySeriesOpacity(this._activеChartInstance.children,null,!0),this._activеChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),i},e.prototype._displayTooltip=function(t){j({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},e.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activеChartInstance=this._chartInstanceFromPoint(t);if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t);else{var r;if(!o.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,o))&&r.length&&this._highlight.show(r,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},e.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},e.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||o;if(s&&n.visual){var a=o?o.opacity:n.series.opacity;(s!==e||i)&&n.visual.opacity(i?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,i,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,i=this._startHover(t.element,t.originalEvent);i&&i.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),mt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,i=this.options,o=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(s)){if(n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint){var a=n.parent.getNearestPoint(s.x,s.y,n.seriesIx);if(a&&a!==n)if(this._activePoint=a,!a.hover(this,t))j({},i.tooltip,a.options.tooltip).visible&&o.show(a),r.show(a)}}else Rt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;if(this._trackCrosshairs(e),i.hover){var o=i.backgroundContainsPoint(e);o?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!o&&(this.trigger("plotAreaLeave"),i.hovered=!1)}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},e.prototype._trackSharedTooltip=function(t,e,i){if(!this._suppressHover){var o=this.options.tooltip,r=this._plotArea,n=this._plotArea.categoryAxis,s=this._tooltip,a=this._highlight;if(r.backgroundContainsPoint(t)){var p=n.pointCategoryIndex(t);if(p!==this._tooltipCategoryIx||!this._sharedHighlight&&i){var h=r.pointsByCategoryIndex(p),l=h.map((function(t){return t.eventArgs(e)})),c=l[0]||{};c.categoryPoints=l,h.length>0&&!this.trigger("seriesHover",c)?(o.visible&&s.showAt(h,t),a.show(h),this._sharedHighlight=!0):s.hide(),this._tooltipCategoryIx=p}else i&&this._sharedHighlight&&(a.hide(),s.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(a.hide(),s.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._tooltip,i=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,i&&i.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){for(var i,o=this.options.series,r=o.length,n=new ht,s=[],a=!1,p=0;p<r;p++){var h=o[p],l=h.categoryAxis===t.name||!h.categoryAxis&&0===e,c=h.data,u=c.length,f=h.categoryField&&l;if(a=f||a,f&&u>0)for(var d=(i=Tr(t,Bi(h.categoryField,c[0])))?Cr:Bi,g=0;g<u;g++){var y=c[g],v=d(h.categoryField,y,this.chartService.intl);!i&&n.get(v)||(s.push([v,y]),i||n.set(v,!0))}}if(s.length>0){i&&(s=function(t,e){void 0===e&&(e=Ve);for(var i=function(t,e){void 0===e&&(e=Ve);for(var i=1,o=t.length;i<o;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}(t,e),o=i.length,r=o>0?[i[0]]:[],n=1;n<o;n++)0!==e(i[n],kt(r))&&r.push(i[n]);return r}(s,(function(t,e){return Ve(t[0],e[0])})));var m=function(t){for(var e=t.length,i=[],o=0;o<e;o++)for(var r=t[o],n=r.length,s=0;s<n;s++)i[s]=i[s]||[],i[s].push(r[s]);return i}(s);t.categories=m[0]}else a&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=zi.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===y?r="field":r+="Field",!xt(t[r])){i=!1;break}}return i},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){var i,o=this._plotArea,r=this._highlight,n=(o.srcSeries||o.series)[t];if(i=lt(n.type,[Yi,"donut","funnel"])?o.findPoint((function(i){return i.series.index===t&&i.index===e})):o.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible){var s=o.series.length>1,a=i[0];this._displayInactiveOpacity(a,s,i)}else r.show(i)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},e.prototype.updateMouseMoveHandler=function(){var t,e;Rt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&mt(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){Ws(this._originalOptions,t),this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Rt(this.element,((t={}).contextmenu=this._clickHandler,t[Ki]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Rt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},e}(S.Class);function Ns(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function qs(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Xs(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var Ys=["data","categories"];function Ws(t,e){for(var i in e)if(!lt(i,Ys)&&e.hasOwnProperty(i)){var o=e[i],r=t[i];if(xt(r)){var n=null===o;n||!xt(o)?(delete t[i],n&&delete e[i]):r&&I(o)&&I(r)&&Ws(r,o)}}}function Zs(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}Vt(Gs,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:qi,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var Ks=Gs,$s=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new Ht(this.plotArea.box.x2,e.center().y):new Ht(e.center().x,-2),align:o}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(zn),Js=[Ni,"bullet"];function Qs(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function ta(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function ea(t){return C(t)?[t]:t}var ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){_(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(wt(e).width)},e.prototype._resize=function(){var e=this.element,i=Qs(e.childNodes);this._initialWidth=Math.floor(wt(e).width),ta(e.childNodes,i),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Qs(e.childNodes),o=document.createElement("span");o.innerHTML=" ",e.appendChild(o);var r=j({width:this._autoWidth,height:wt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return wt(e,{width:r.width,height:r.height}),e.removeChild(o),ta(e.childNodes,i),this.surface&&this.surface.resize(),r},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var i=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(i),i},e.prototype._calculateWidth=function(t){for(var e=this.options,i=E(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],p=(a.options.series||[])[0];if(p){if(p.type===Ni)return 150;if("bullet"===p.type)return 150;if(p.type===Yi)return wt(r).height;var h=a.categoryAxis;if(h){var l=h.categoriesCount()*(!a.options.isStacked&<(p.type,[qi,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,l)}}}var c=n*e.pointWidth;return c>0&&(c+=i.left+i.right),c},e.prototype._createSharedTooltip=function(t){return new $s(this._plotArea,t)},e.normalizeOptions=function(t){var e=ea(t);return(e=b(e)?{seriesDefaults:{data:e}}:j({},e)).series||(e.series=[{data:ea(e.data)}]),j(e,{seriesDefaults:{type:e.type}}),(lt(e.series[0].type,Js)||lt(e.seriesDefaults.type,Js))&&(e=j({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(Ks);Vt(ia,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var oa=ia,ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(z(this.element,"opacity").opacity)},e.prototype.step=function(t){z(this.element,{opacity:String(ct(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),z(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),z(this.element,{opacity:String(this._initialOpacity)})},e}(S.drawing.Animation);function na(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var sa=function(t){function e(e,i,o){t.call(this),this.options=j({},this.options,o),this.container=e,this.chartService=i;var r=z(e,["paddingLeft","paddingTop"]);this.chartPadding={top:r.paddingTop,left:r.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=na("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=na("k-tooltip k-chart-tooltip"),i=this.scroll=na("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(i)},e.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Me(Le(t)+Le(e-t)/2),p=.4*i.width(),h=i.center().x-p,l=(i.center().x-h)/(r.max-r.min),c=a-r.min,u=this.chartService.intl.format(r.format,t,e),f=it(r);this.clearHideTimeout(),this._visible||(z(o,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(u=f({from:t,to:e})),s.innerHTML=u,z(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});var d=z(s,["marginTop","borderTopWidth","height"]);z(n,{width:p,left:h+c*l,top:i.y1+d.marginTop+d.borderTopWidth+d.height/2}),z(o,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new ra(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},e}(S.Class);Vt(sa,{format:"{0:d} - {1:d}",hideDelay:500});var aa=sa,pa="_navigator",ha=pa;function la(){}var ca=function(t){function e(e){var i;t.call(this),this.chart=e;var o=this.options=j({},this.options,e.options.navigator),r=o.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),xt(o.hint.visible)||(o.hint.visible=o.visible),this.chartObserver=new ft(this,((i={}).drag="_drag",i.dragEnd="_dragEnd",i.zoom="_zoom",i.zoomEnd="_zoomEnd",i)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ue(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,i=this.options,o=this.mainAxis(),r=o.roundedRange(),n=r.min,s=r.max,a=i.select,p=a.from,h=a.to,l=a.mousewheel,c=(t=o,la.prototype=t,new la);0!==o.categoriesCount()&&(this.clean(),c.box=o.box,this.selection=new Vn(e,c,{min:n,max:s,from:p||n,to:h||s,mousewheel:Ot(l,{zoom:"left"}),visible:i.visible},new ft(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),i.hint.visible&&(this.hint=new aa(e.element,e.chartService,{min:n,max:s,template:it(i.hint),format:i.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[ha].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},r=o.from||e;r<e&&(r=e);var n=o.to||i;n>i&&(n=i),this.options.select=j({},o,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(kt(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},e.prototype._drag=function(t){var e,i=this.chart,o=this.selection,r=i._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=i._plotArea.categoryAxis,h=t.axisRanges[p.options.name],l=this.options.select;if(h&&!a&&o){e=l.from&&l.to?Le(l.to)-Le(l.from):Le(o.options.to)-Le(o.options.from);var c=Me(Pt(Le(h.min),s.min,Le(s.max)-e)),u=Me(Pt(Le(c)+e,Le(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(c,u),this.showHint(c,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,o=this.options.select;o.from=e,o.to=i},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,i=t.from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==pa&&(n.min=i,n.max=o)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var i=this.mainAxis(),o={from:e.from,to:e.to};if("category"!==i.options.type){var r=new ti(j({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;o.from=Oe(r.min,-r.baseUnitStep,r.baseUnit),o.to=Oe(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",o)}},e.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,i=this.selection,o=this.options,r=o.select,n=o.liveDrag,s=this.mainAxis(),a=t.delta;if(i){var p=s.categoryIndex(i.options.from),h=s.categoryIndex(i.options.to);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),h-p>1?(i.expand(a),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta).min),n&&(this.filterAxes(),this.redrawSlaves()),i.set(r.from,r.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[ha]},e.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},e.setup=function(t,i){if(void 0===t&&(t={}),void 0===i&&(i={}),!t.__navi){t.__navi=!0;var o=j({},i.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=j({},o.pane,{name:pa});o.visible||(n.visible=!1,n.height=.1),r.push(n),e.attachAxes(t,o),e.attachSeries(t,o,i)}},e.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),n=0===Pr(i,Zi).length,s=j({type:"date",pane:pa,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;o.push(j({},s,{maxDateGroups:200},a,{name:ha,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),j({},s,a,{name:ha+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),j({},s,a,{name:ha+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(j({name:ha,pane:pa,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(j({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:ha,categoryAxis:ha,autoBind:e.autoBindElements}))},e}(S.Class),ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,i){var o=wt(this.element).width||600,r=i,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}};r&&(r=j({},r,n)),ca.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){_(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=st([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,i=this._seriesCount!==e;return this._seriesCount=e,i},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new ca(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var i=this._plotArea.paneByPoint(e);i&&i.options.name===pa?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===ha?t=o.categories:t&&o.pane===pa&&(o.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var i=this._eventCoordinates(e),o=this._plotArea.paneByPoint(i);return t.prototype._stopChartHandlers.call(this,e)||o&&o.options.name===pa},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(Ks);Vt(ua,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var fa=ua,da=Math.PI/180;function ga(t,e){var i=t.getOrigin(),o=t.getSize(),r=E(e);return t.setOrigin([i.x-r.left,i.y-r.top]),t.setSize([o.width+(r.left+r.right),o.height+(r.top+r.bottom)]),t}var ya=S.drawing.Group,va=S.drawing.Path,ma=S.drawing.Text;function xa(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",s=va.fromRect(new S.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),a=new ma(t.text,new S.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),p=ga(a.bbox().clone(),e.padding),h=va.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),l=new ya;return l.append(s),l.append(h),l.append(a),l}function ba(t,e,i){var o=xt(t.from)?t.from:f,r=xt(t.to)?t.to:u;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function _a(t,e){var i=E(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,ga(t,i)}var wa=S.drawing.Path,Aa=S.drawing.Surface,Sa=function(t){function e(e,i,o,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=o,this.contextService=new K(this,r),this._originalOptions=j({},this.options,i),this.options=j({},this._originalOptions),this._initTheme(o),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(b(t))for(var r=0;r<t.length;r++)C(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},e.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new S.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var i=_a(e.bbox(),this._gaugeAreaMargin);this.reflow(i)},e.prototype.setOptions=function(t,e){this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=j({},e,this.options);var i=this.options,o=i.pointer;if(b(o)){for(var r=[],n=0;n<o.length;n++)r.push(j({},e.pointer,o[n]));i.pointer=r}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},o=new S.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,i.width>0&&(o=_a(o,i.width)),wa.fromRect(o,{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();wt(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Aa.create(i,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&j(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,o=t.offsetHeight;return i||(i=e.width),o||(o=e.height),{width:i,height:o}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(S.Class);Vt(Sa,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var ka=Sa,Pa=S.drawing.Path,Ca=S.drawing.Group,Ta=S.geometry.Point;function Ma(t,e){var i,o,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(i=new Ta(n,r),o=new Ta(n+e.size,r)):(i=new Ta(r,s),o=new Ta(r,s+e.size)),new Pa({stroke:{color:e.color,width:e.width}}).moveTo(i).lineTo(o)}function Ra(t,e,i,o){var r=e.length;if(o.visible)for(var n=i.mirror,s=i.lineBox,a=o.skip;a<r;a+=o.step)a%o.skipUnit!=0&&(i.tickX=n?s.x2:s.x2-o.size,i.tickY=n?s.y1-o.size:s.y1,i.position=e[a],t.append(Ma(i,o)))}var Oa=function(t){function e(e,i){var o=e||{};!xt(o.reverse)&&!1===o.vertical&&(i||{}).rtl&&(o=Object.assign({},o,{reverse:!0})),t.call(this,0,1,o,i),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=j({},this.options,t);return(e=j({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||Ut(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Ca,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Ca,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=ba(n[h],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,f=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):f.y2+=p*(r?-1:1),s.append(Pa.fromRect(new S.geometry.Rect([u.x1,f.y1],[u.x2-u.x1,f.y2-f.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Ca,o=0;o<t.length;o++)i.append(xa(t[o],e.labels));return i},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Ca;if(t.width>0&&t.visible){var o=new Pa({stroke:{color:t.color,dashType:t.dashType,width:t.width}});o.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(o)}return i},e.prototype.renderTicks=function(){var t=new Ca,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Ra(t,this.getMajorTickPositions(),o,e.majorTicks),Ra(t,this.getMinorTickPositions(),o,j({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e}(ai);Vt(Oa,{min:0,max:50,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var ja=Oa,Ia=function(t){function e(e,i){t.call(this);var o=e.options,r=o.min,n=o.max,s=this.options=j({},this.options,i);s.fill=s.color,this.scale=e,xt(s.value)?s.value=Pt(s.value,r,n):s.value=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,r=o.min,n=o.max;e._oldValue=xt(e._oldValue)?e.value:r,e.value=Pt(t,r,n),this.elements&&this.repaint()},e}(S.Class);Vt(Ia,{color:n});var Va=Ia,Ba=function(t){function e(e,i){t.call(this,e,i),this.options=j({track:{visible:xt(i.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=o.track.size||o.size,l=o.size/2,c=E(o.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(i=new Nt(p.x1+u,p.y1,p.x1+u,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new Nt(p.x2+u,p.y1-l,p.x2+u,p.y2+l))):(i=new Nt(p.x1,p.y1-u,p.x2,p.y1-u),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new Nt(p.x1-l,p.y1-u,p.x2+l,p.y1-u))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:xt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,o=i.mirror,r=i.vertical,n=E(e.margin);return r?n[o?"left":"right"]:n[o?"bottom":"top"]},e}(Va);Vt(Ba,{shape:"barPointer",track:{border:{width:1}},color:n,border:{width:1},opacity:1,margin:E(3),animation:{type:"barPointer"},visible:!0});var La=Ba,za=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e);var s=this.fromScale=new S.geometry.Point(i.x1,i.y1),a=this.toScale=new S.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=ct(this.fromScale.x,this.toScale.x,t),i=ct(this.fromScale.y,this.toScale.y,t);this.element.transform(S.geometry.transform().translate(e,i))},e}(S.drawing.Animation);Vt(za,{easing:"linear",duration:250}),S.drawing.AnimationFactory.current.register("arrowPointer",za);var Ea=za,Fa=S.geometry.Point,Da=S.drawing.Path,Ua=function(t){function e(e,i){t.call(this,e,i),xt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new Fa(0,0-i),new Fa(0-o*e,0),new Fa(0,0+i)]:[new Fa(0-i,0),new Fa(0,0+o*e),new Fa(0+i,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=new Ea(this.elements,j(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type="arrowPointer";var r=new Da({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),n=t.getSlot(e.value);return r.transform(S.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(La),Ha=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?x:m,i=this.to=t.newPoints[0][e],o=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-o)/t.speed*1e3,1)),this._set(o)},e.prototype.step=function(t){var e=ct(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},e}(S.drawing.Animation);Vt(Ha,{easing:"linear",speed:250}),S.drawing.AnimationFactory.current.register("barPointer",Ha);var Ga=Ha,Na=S.drawing.Group,qa=S.drawing.Path,Xa=function(t){function e(e,i){t.call(this,e,i),xt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,n=o.vertical,s=r===n?-1:1,a=i.size*s,p=e.getSlot(e.options.min),h=e.getSlot(t),l=n?x:m,c=n?m:x,u=this._margin()*s,f=new S.geometry.Point;f[l]=p[l+"1"],f[c]=p[c+"1"];var d=new S.geometry.Point;d[l]=h[l+"1"],d[c]=h[c+"1"],n?(f.translate(u,0),d.translate(u,0)):(f.translate(0,u),d.translate(0,u));var g=d.clone(),y=f.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[f,d,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue);o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close();var n=new Ga(o,j(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new Na,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var i=this.pointerPath=new qa({stroke:e.stroke,fill:e.fill});return t.append(i),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new qa.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(La),Ya=S.drawing.Group,Wa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,r=new Nt(i,o,i+t.width(),o+t.height());this.scale.reflow(r),this._shrinkScaleWidth(r);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new Ya,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new ja(t.scale,this.contextService);this.pointers=[];var i=t.pointer;i=b(i)?i:[i];for(var o=0;o<i.length;o++){var r=j({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Ua:Xa;this.pointers.push(new n(e,r))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return i.options.vertical?(e=n.width()/2,n=new Nt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new Nt(t.x1,r.y-e,t.x2,r.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new Nt(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new Nt(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var i=e.contentBox().width()-t.width();i>0&&(e.box.shrink(i,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(ka);Vt(Wa,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Za=Wa,Ka=S.drawing.Arc,$a=S.drawing.Path,Ja=S.drawing.Group;function Qa(t,e,i,o){var r=new Ja,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new S.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new $a({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(h))}return r}function tp(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var ep=function(t){function e(e,i){t.call(this,0,1,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=j({},this.options,t);return e.majorUnit=e.majorUnit||Ut(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var i=this.renderArc(t,e);this.bbox=i.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),i=Math.min(t.height(),t.width())/2;if(!xt(this.bbox))return this.render(e,i);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-i)/(o-i)*a:(t-i)/(o-i)*a+n)+180},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,o=0;return e.visible&&(o=e.size),i.visible&&(o=Math.max(i.size,o)),o},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new Ja,s=.05*i;xt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=xt(this.labelElements);p&&(i-=this.ticksSize(),this.hasRanges()&&!h&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,c=l.length,u=E(a.padding),f=(u.left+u.right)/2,d=(u.top+u.bottom)/2,g=0;g<c;g++){var y=l[g],v=y.box.width()/2,m=y.box.height()/2,x=o[g],b=(x-180)*da,_=e.pointAt(x),w=_.x+Math.cos(b)*(v+f)*(p?1:-1),A=_.y+Math.sin(b)*(m+d)*(p?1:-1);y.reflow(new Nt(w-v,A-m,w+v,A+m));var k=new S.geometry.Point(y.box.x1,y.box.y1),P=void 0;if(h){var C=(P=this.labelElements.children[g]).bbox().origin,T=P.transform()||S.geometry.transform();T.translate(k.x-C.x,k.y-C.y),P.transform(T)}else P=xa(y,t.labels),n.append(P);this.bbox=S.geometry.Rect.union(this.bbox,P.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,i=e.rangeDistance,o=e.rangeSize,r=this.getRangeRadius();"inside"===this.options.labels.position&&(r+=o+i);for(var n=r+o/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=S.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Ja;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,s=o.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var h=t[p],l=this.slotAngle(h[n?"to":"from"]),c=this.slotAngle(h[n?"from":"to"]);c-l!=0&&i.append(this.createRange(l,c,a,h))}}return i},e.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,n=new S.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new Ka(n,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(tp(r,n,s));for(var a=0;a<i;a++)for(var p=ba(e[a],r,n),h=o.length,l=0;l<h;l++){var c=o[l];if(c.from<=p.from&&p.from<=c.to){o.push(tp(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(tp(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-o-i:t.getRadiusX()-i},e.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new S.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Qa(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new Ja;o.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,"outside"===e.labels.position){var s=i.getRadiusX();i.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Qa(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;o>=0;o--)o%i==0&&t.splice(o,1);return t},e.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;o&&(a+=n,p=-p);for(var h=[],l=0;l<s;l++)h.push(Mt(a,3)),a+=p;return Mt(a)<=t.endAngle&&h.push(a),h},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&"outside"===this.options.labels.position&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,h=a.x-p[0].anchor().x,l=a.y-p[0].anchor().y;t[s].transform((new S.geometry.transform).translate(h,l))}},e}(ai);Vt(ep,{min:0,max:100,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var ip=ep,op=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.duration=Math.max(Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=ct(e.oldAngle,e.newAngle,t);this.element.transform(S.geometry.transform().rotate(i,e.center))},e}(S.drawing.Animation);Vt(op,{easing:"linear",duration:150}),S.drawing.AnimationFactory.current.register("radialPointer",op);var rp=op,np=S.drawing.Circle,sp=S.drawing.Group,ap=S.drawing.Path,pp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(S.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(o):new rp(this.elements,j(e.animation,{oldAngle:i,newAngle:o})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=new sp;return!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(da),i},e.prototype.reflow=function(t){var e=this.center=t.center,i=Pt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*i,r=this.capSize=Math.round(o*this.options.cap.size);this.bbox=S.geometry.Rect.fromPoints(new S.geometry.Point(e.x-r,e.y-r),new S.geometry.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,o=new ap({fill:{color:i},stroke:{color:i,width:.5}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,i=new S.geometry.Circle(this.center,this.capSize);return new np(i,{fill:{color:e},stroke:{color:e}})},e}(Va);Vt(pp,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var hp=pp,lp=S.drawing.Group,cp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=S.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,i){var o=this._visuals=new lp;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},e.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),h=Mt(p,3),l=Mt(-p,3),c=0,u=0;!(!(u++<100)||(c=n===o?c+1:0)>5||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||l!==r&&0<=(o=this.getPlotBox(l,t,s))&&o<=2||(r=e>0&&o>0?2*h:e<0&&o<0?2*l:Mt((h+l)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,i>0?(l=r,o=i):(h=r,e=i)},e.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=S.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,r=e.y-i.y,n=this.scale,s=this.pointers;n.arc.center.x-=o,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=S.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new ip(t.scale,this.contextService);this.pointers=[];for(var o=b(e)?e:[e],r=0;r<o.length;r++){var n=new hp(i,j({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(ka);Vt(cp,{transitions:!0,gaugeArea:{background:""}});var up=cp,fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),n=this.slotAngle(o?t:e),s=this.createRange(r,n,this.getRangeRadius(),i);return this.ranges.append(s),s},e}(ip);Vt(fp,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var dp=fp,gp=function(t){function e(e,i){t.call(this,e,i);var o=this.options,r=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=Pt(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new S.Color(n),this.color=new S.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=this.startColor,o=this.color,r=ct(e.oldAngle,e.newAngle,t);if(this.element.angle(r),o){var n=Mt(ct(i.r,o.r,t)),s=Mt(ct(i.g,o.g,t)),a=Mt(ct(i.b,o.b,t));this.element.stroke(new S.Color(n,s,a).toHex())}},e}(S.drawing.Animation);Vt(gp,{easing:"linear",duration:150}),S.drawing.AnimationFactory.current.register("radialRangePointer",gp);var yp=gp,vp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(o),this.stroke(this.currentColor())):(this.animation=new yp(this,j(e.animation,{oldAngle:i,newAngle:o})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,n=o.color,s=o.value,a=C(s)?s:e;if(r)for(var p=0;p<r.length;p++){var h=r[p],l=h.color,c=h.from;void 0===c&&(c=e);var u=h.to;if(void 0===u&&(u=i),c<=a&&a<=u)return l}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Va);Vt(vp,{animation:{type:"radialRangePointer",duration:150}});var mp=vp,xp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new dp(t.scale,this.contextService),i=new mp(e,j({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[i]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,n=o.y-e/2;if(t<i.width){var s=r+t;r=Math.max(r,0),s>i.width&&(r-=s-i.width)}if(e<i.height){var a=this.scale.bbox,p=a.bottomRight().y,h=n+e;n=Math.max(n,a.origin.y),h>p&&(n-=h-p)}return{left:r,top:n}},e}(up),bp="Arial, Helvetica, sans-serif",_p="12px "+bp,wp="16px "+bp,Ap=function(){return{icon:{border:{width:1}},label:{font:_p,padding:3},line:{length:10,width:2},visible:!0}},Sp=function(t){return{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Ap(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}}},kp=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:_p},notes:Ap(),title:{font:wp,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Sp(t),title:{font:wp},legend:{labels:{font:_p}}}}}])}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define(["@progress/kendo-drawing"],e):"object"==typeof exports?exports.KendoCharts=e(require("@progress/kendo-drawing")):t.KendoCharts=e(t["@progress/kendo-drawing"])}(window,(function(t){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(e,i){e.exports=t},function(t,e,i){"use strict";i.r(e),i.d(e,"autoMajorUnit",(function(){return Ut})),i.d(e,"Point",(function(){return Ht})),i.d(e,"Box",(function(){return Nt})),i.d(e,"Ring",(function(){return Xt})),i.d(e,"Sector",(function(){return Yt})),i.d(e,"ShapeBuilder",(function(){return Zt})),i.d(e,"ShapeElement",(function(){return ee})),i.d(e,"ChartElement",(function(){return $t})),i.d(e,"BoxElement",(function(){return Qt})),i.d(e,"RootElement",(function(){return ne})),i.d(e,"FloatElement",(function(){return ae})),i.d(e,"Text",(function(){return le})),i.d(e,"TextBox",(function(){return fe})),i.d(e,"Title",(function(){return ge})),i.d(e,"AxisLabel",(function(){return ve})),i.d(e,"Axis",(function(){return Ae})),i.d(e,"Note",(function(){return xe})),i.d(e,"CategoryAxis",(function(){return qe})),i.d(e,"DateCategoryAxis",(function(){return ti})),i.d(e,"DateValueAxis",(function(){return hi})),i.d(e,"NumericAxis",(function(){return ai})),i.d(e,"LogarithmicAxis",(function(){return fi})),i.d(e,"PolarAxis",(function(){return mi})),i.d(e,"RadarCategoryAxis",(function(){return yi})),i.d(e,"RadarNumericAxis",(function(){return wi})),i.d(e,"RadarLogarithmicAxis",(function(){return Si})),i.d(e,"CurveProcessor",(function(){return Pi})),i.d(e,"Gradients",(function(){return ie})),i.d(e,"rectToBox",(function(){return ce})),i.d(e,"ChartAxis",(function(){return Ci})),i.d(e,"ChartPane",(function(){return Ri})),i.d(e,"ChartPlotArea",(function(){return Oi})),i.d(e,"findAxisByName",(function(){return Ti})),i.d(e,"Aggregates",(function(){return Vi})),i.d(e,"AreaChart",(function(){return Co})),i.d(e,"AreaSegment",(function(){return Ao})),i.d(e,"AxisGroupRangeTracker",(function(){return To})),i.d(e,"Bar",(function(){return Io})),i.d(e,"BarChart",(function(){return Uo})),i.d(e,"BarLabel",(function(){return Ro})),i.d(e,"BoxPlotChart",(function(){return Ko})),i.d(e,"BoxPlot",(function(){return Wo})),i.d(e,"BubbleChart",(function(){return rr})),i.d(e,"Bullet",(function(){return pr})),i.d(e,"BulletChart",(function(){return lr})),i.d(e,"CandlestickChart",(function(){return Xo})),i.d(e,"Candlestick",(function(){return Go})),i.d(e,"CategoricalChart",(function(){return oo})),i.d(e,"CategoricalErrorBar",(function(){return Qi})),i.d(e,"CategoricalPlotArea",(function(){return gn})),i.d(e,"Chart",(function(){return Ks})),i.d(e,"ChartContainer",(function(){return mr})),i.d(e,"ClipAnimation",(function(){return mo})),i.d(e,"ClusterLayout",(function(){return zo})),i.d(e,"Crosshair",(function(){return yr})),i.d(e,"CrosshairTooltip",(function(){return dr})),i.d(e,"DefaultAggregates",(function(){return Nr})),i.d(e,"DonutChart",(function(){return as})),i.d(e,"DonutPlotArea",(function(){return ps})),i.d(e,"DonutSegment",(function(){return ns})),i.d(e,"ErrorBarBase",(function(){return Ji})),i.d(e,"ErrorRangeCalculator",(function(){return Di})),i.d(e,"Highlight",(function(){return vn})),i.d(e,"SharedTooltip",(function(){return zn})),i.d(e,"Legend",(function(){return Tn})),i.d(e,"LegendItem",(function(){return Pn})),i.d(e,"LegendLayout",(function(){return kn})),i.d(e,"LineChart",(function(){return wo})),i.d(e,"LinePoint",(function(){return ao})),i.d(e,"LineSegment",(function(){return ho})),i.d(e,"Pane",(function(){return _r})),i.d(e,"PieAnimation",(function(){return Hn})),i.d(e,"PieChart",(function(){return is})),i.d(e,"PieChartMixin",(function(){return Qn})),i.d(e,"PiePlotArea",(function(){return os})),i.d(e,"PieSegment",(function(){return Jn})),i.d(e,"PlotAreaBase",(function(){return Fr})),i.d(e,"PlotAreaEventsMixin",(function(){return Dr})),i.d(e,"PlotAreaFactory",(function(){return Rn})),i.d(e,"PointEventsMixin",(function(){return ro})),i.d(e,"RangeBar",(function(){return Xr})),i.d(e,"RangeBarChart",(function(){return Wr})),i.d(e,"RangeAreaPoint",(function(){return $r})),i.d(e,"RangeAreaChart",(function(){return rn})),i.d(e,"ScatterChart",(function(){return tr})),i.d(e,"ScatterErrorBar",(function(){return $o})),i.d(e,"ScatterLineChart",(function(){return Nn})),i.d(e,"Selection",(function(){return Vn})),i.d(e,"SeriesAggregator",(function(){return Hr})),i.d(e,"SeriesBinder",(function(){return zi})),i.d(e,"SplineSegment",(function(){return go})),i.d(e,"SplineAreaSegment",(function(){return Po})),i.d(e,"StackWrap",(function(){return Fo})),i.d(e,"Tooltip",(function(){return Bn})),i.d(e,"OHLCChart",(function(){return sn})),i.d(e,"OHLCPoint",(function(){return nn})),i.d(e,"WaterfallChart",(function(){return hn})),i.d(e,"WaterfallSegment",(function(){return pn})),i.d(e,"XYPlotArea",(function(){return Yn})),i.d(e,"MousewheelZoom",(function(){return Sn})),i.d(e,"ZoomSelection",(function(){return An})),i.d(e,"Pannable",(function(){return _n})),i.d(e,"anyHasZIndex",(function(){return xo})),i.d(e,"appendIfNotNull",(function(){return wr})),i.d(e,"areNumbers",(function(){return No})),i.d(e,"bindSegments",(function(){return Sr})),i.d(e,"categoriesCount",(function(){return eo})),i.d(e,"countNumbers",(function(){return ji})),i.d(e,"equalsIgnoreCase",(function(){return kr})),i.d(e,"evalOptions",(function(){return to})),i.d(e,"filterSeriesByType",(function(){return Pr})),i.d(e,"getDateField",(function(){return Cr})),i.d(e,"getField",(function(){return Bi})),i.d(e,"hasGradientOverlay",(function(){return Oo})),i.d(e,"hasValue",(function(){return Jo})),i.d(e,"isDateAxis",(function(){return Tr})),i.d(e,"segmentVisible",(function(){return Ar})),i.d(e,"singleItemOrArray",(function(){return Mr})),i.d(e,"createOutOfRangePoints",(function(){return Ir})),i.d(e,"ChartService",(function(){return K})),i.d(e,"DomEventsBuilder",(function(){return J})),i.d(e,"FormatService",(function(){return X})),i.d(e,"IntlService",(function(){return H})),i.d(e,"TemplateService",(function(){return et})),i.d(e,"Sparkline",(function(){return oa})),i.d(e,"Navigator",(function(){return ca})),i.d(e,"NavigatorHint",(function(){return aa})),i.d(e,"StockChart",(function(){return fa})),i.d(e,"constants",(function(){return o})),i.d(e,"Gauge",(function(){return ka})),i.d(e,"LinearGauge",(function(){return Za})),i.d(e,"LinearPointer",(function(){return La})),i.d(e,"ArrowLinearPointer",(function(){return Ua})),i.d(e,"BarLinearPointer",(function(){return Xa})),i.d(e,"LinearScale",(function(){return ja})),i.d(e,"RadialGauge",(function(){return up})),i.d(e,"RadialPointer",(function(){return hp})),i.d(e,"RadialScale",(function(){return ip})),i.d(e,"ArcGauge",(function(){return xp})),i.d(e,"RangePointer",(function(){return mp})),i.d(e,"ArcScale",(function(){return dp})),i.d(e,"addClass",(function(){return _})),i.d(e,"removeClass",(function(){return A})),i.d(e,"alignPathToPixel",(function(){return k})),i.d(e,"clockwise",(function(){return P})),i.d(e,"convertableToNumber",(function(){return M})),i.d(e,"deepExtend",(function(){return j})),i.d(e,"elementStyles",(function(){return z})),i.d(e,"getSpacing",(function(){return E})),i.d(e,"getTemplate",(function(){return it})),i.d(e,"getter",(function(){return nt})),i.d(e,"grep",(function(){return st})),i.d(e,"hasClasses",(function(){return at})),i.d(e,"HashMap",(function(){return ht})),i.d(e,"inArray",(function(){return lt})),i.d(e,"interpolateValue",(function(){return ct})),i.d(e,"InstanceObserver",(function(){return ft})),i.d(e,"isArray",(function(){return b})),i.d(e,"isFunction",(function(){return R})),i.d(e,"isNumber",(function(){return C})),i.d(e,"isObject",(function(){return I})),i.d(e,"isString",(function(){return T})),i.d(e,"map",(function(){return dt})),i.d(e,"mousewheelDelta",(function(){return gt})),i.d(e,"FontLoader",(function(){return It})),i.d(e,"setDefaultOptions",(function(){return Vt})),i.d(e,"sparseArrayLimits",(function(){return Bt})),i.d(e,"styleValue",(function(){return V})),i.d(e,"find",(function(){return Lt})),i.d(e,"elementScale",(function(){return Dt})),i.d(e,"append",(function(){return vt})),i.d(e,"bindEvents",(function(){return mt})),i.d(e,"Class",(function(){return S.Class})),i.d(e,"defined",(function(){return xt})),i.d(e,"deg",(function(){return bt})),i.d(e,"elementOffset",(function(){return _t})),i.d(e,"elementSize",(function(){return wt})),i.d(e,"eventElement",(function(){return At})),i.d(e,"eventCoordinates",(function(){return St})),i.d(e,"last",(function(){return kt})),i.d(e,"limitValue",(function(){return Pt})),i.d(e,"logToConsole",(function(){return S.logToConsole})),i.d(e,"objectKey",(function(){return Ct})),i.d(e,"rad",(function(){return Tt})),i.d(e,"round",(function(){return Mt})),i.d(e,"unbindEvents",(function(){return Rt})),i.d(e,"valueOrDefault",(function(){return Ot})),i.d(e,"chartBaseTheme",(function(){return kp}));var o={};i.r(o),i.d(o,"NAVIGATOR_AXIS",(function(){return ha})),i.d(o,"NAVIGATOR_PANE",(function(){return pa}));var r="arc",n="#000",s="bottom",a="center",p="circle",h="date",l=/\{\d+:?/,c="left",u=Number.MAX_VALUE,f=-Number.MAX_VALUE,d="right",g="top",y="value",v="#fff",m="x",x="y";function b(t){return Array.isArray(t)}function _(t,e){for(var i=b(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var w=/\s+/g;function A(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(w," "))}var S=i(0);function k(t){var e=.5;t.options.stroke&&S.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function P(t,e){return-t.x*e.y+t.y*e.x<0}function C(t){return"number"==typeof t&&!isNaN(t)}function T(t){return"string"==typeof t}function M(t){return C(t)||T(t)&&isFinite(t)}function R(t){return"function"==typeof t}function O(t,e){for(var i in e){var o=e[i],r=typeof o,n=void 0;if((n="object"===r&&null!==o?o.constructor:null)&&n!==Array)if(o instanceof Date)t[i]=new Date(o.getTime());else if(R(o.clone))t[i]=o.clone();else{var s=t[i];t[i]="object"==typeof s&&s||{},O(t[i],o)}else"undefined"!==r&&(t[i]=o)}return t}function j(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)O(t,e[o]);return t}function I(t){return"object"==typeof t}function V(t){return C(t)?t+"px":t}var B=/width|height|top|left|bottom|right/i;function L(t){return B.test(t)}function z(t,e){var i=T(e)?[e]:e;if(b(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=L(s)?parseFloat(r[s]):r[s]}return o}if(I(e))for(var a in e)t.style[a]=V(e[a])}function E(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i.top=i[d]=i[s]=i[c]=t:(i.top=t.top||e,i[d]=t[d]||e,i[s]=t[s]||e,i[c]=t[c]||e),i}var F={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},D=function(){},U={implementation:{configurable:!0}};D.register=function(t){F=t},U.implementation.get=function(){return F},Object.defineProperties(D,U);var H=D,G=/\{(\d+)(:[^\}]+)?\}/g,N=function(t){this._intlService=t},q={intl:{configurable:!0}};q.intl.get=function(){return this._intlService||H.implementation},q.intl.set=function(t){this._intlService=t},N.prototype.auto=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var o=this.intl;return T(t)&&t.match(l)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},N.prototype.localeAuto=function(t,e,i){var o=this.intl;return T(t)&&t.match(l)?t.replace(G,(function(t,r,n){var s=e[parseInt(r,10)];return o.toString(s,n?n.substring(1):"",i)})):o.toString(e[0],t,i)},Object.defineProperties(N.prototype,q);var X=N,Y=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new X(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},W={intl:{configurable:!0}};W.intl.get=function(){return this._intlService||H.implementation},W.intl.set=function(t){this._intlService=t,this.format.intl=t},Y.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Y.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Y.prototype,W);var Z,K=Y,$=function(){};$.register=function(t){Z=t},$.create=function(t,e){if(Z)return Z.create(t,e)};var J=$,Q={compile:function(t){return t}},tt=function(){};tt.register=function(t){Q=t},tt.compile=function(t){return Q.compile(t)};var et=tt;function it(t){var e;return void 0===t&&(t={}),t.template?t.template=e=et.compile(t.template):R(t.content)&&(e=t.content),e}var ot=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,rt={};function nt(t){if(rt[t])return rt[t];var e=[];return t.replace(ot,(function(t,i,o,r){e.push(S.drawing.util.defined(i)?i:o||r)})),rt[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},rt[t]}function st(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function at(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(-1!==t.className.indexOf(i[o]))return!0}rt[void 0]=function(t){return t};var pt=function(){this._map={}};pt.prototype.get=function(t){return this._map[this._key(t)]},pt.prototype.set=function(t,e){this._map[this._key(t)]=e},pt.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ht=pt;function lt(t,e){if(e)return-1!==e.indexOf(t)}function ct(t,e,i){return S.drawing.util.round(t+(e-t)*i,3)}var ut=function(t,e){this.observer=t,this.handlerMap=j({},this.handlerMap,e)};ut.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o.trigger&&(i=this.callObserver("trigger",t,e)),i},ut.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},ut.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var ft=ut;function dt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);S.drawing.util.defined(n)&&o.push(n)}return o}function gt(t){var e=0;return t.wheelDelta&&(e=(e=-t.wheelDelta/120)>0?Math.ceil(e):Math.floor(e)),t.detail&&(e=S.drawing.util.round(t.detail/3)),e}var yt=S.drawing.util,vt=yt.append,mt=yt.bindEvents,xt=yt.defined,bt=yt.deg,_t=yt.elementOffset,wt=yt.elementSize,At=yt.eventElement,St=yt.eventCoordinates,kt=yt.last,Pt=yt.limitValue,Ct=yt.objectKey,Tt=yt.rad,Mt=yt.round,Rt=yt.unbindEvents,Ot=yt.valueOrDefault,jt=function(){};jt.fetchFonts=function(t,e,i){void 0===i&&(i={depth:0});!t||i.depth>5||!document.fonts||Object.keys(t).forEach((function(o){var r=t[o];"dataSource"!==o&&"$"!==o[0]&&r&&("font"===o?e.push(r):"object"==typeof r&&(i.depth++,jt.fetchFonts(r,e,i),i.depth--))}))},jt.loadFonts=function(t,e){var i=[];if(t.length>0&&document.fonts){try{i=t.map((function(t){return document.fonts.load(t)}))}catch(t){Object(S.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},jt.preloadFonts=function(t,e){var i=[];jt.fetchFonts(t,i),jt.loadFonts(i,e)};var It=jt;function Vt(t,e){var i=t.prototype;i.options?i.options=j({},i.options,e):i.options=e}function Bt(t){for(var e=u,i=f,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===u?void 0:e,max:i===f?void 0:i}}function Lt(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var zt=S.geometry.Matrix,Et=/matrix\((.*)\)/;function Ft(t){var e=getComputedStyle(t).transform;return"none"===e?zt.unit():function(t){var e=t.match(Et);if(null===e||2!==e.length)return zt.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(zt,[null].concat(i)))}(e)}function Dt(t){if(!t)return zt.unit();for(var e=Ft(t),i=t.parentElement;i;){var o=Ft(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}function Ut(t,e){var i=Mt(e-t,9);if(0===i){if(0===e)return.1;i=Math.abs(e)}var o=Math.pow(10,Math.floor(Math.log(i)/Math.log(10))),r=Mt(i/o,10);return Mt(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}var Ht=function(t){function e(e,i){t.call(this),this.x=e||0,this.y=i||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},e.prototype.rotate=function(t,e){var i=Tt(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=Mt(n+(a-n)*o+(p-s)*r,3),this.y=Mt(s+(p-s)*o-(a-n)*r,3),this},e.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},e.prototype.distanceTo=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},e.onCircle=function(t,i,o){var r=Tt(i);return new e(t.x-o*Math.cos(r),t.y-o*Math.sin(r))},e}(S.Class);function Gt(t,e,i,o,r){var n=Tt(r);return new Ht(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}var Nt=function(t){function e(e,i,o,r){t.call(this),this.x1=e||0,this.y1=i||0,this.x2=o||0,this.y2=r||0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},e.prototype.width=function(){return this.x2-this.x1},e.prototype.height=function(){return this.y2-this.y1},e.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},e.prototype.move=function(t,e){var i=this.height(),o=this.width();return xt(t)&&(this.x1=t,this.x2=this.x1+o),xt(e)&&(this.y1=e,this.y2=this.y1+i),this},e.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},e.prototype.wrapPoint=function(t){var i=b(t),o=i?t[0]:t.x,r=i?t[1]:t.y;return this.wrap(new e(o,r,o,r)),this},e.prototype.snapTo=function(t,e){return e!==m&&e||(this.x1=t.x1,this.x2=t.x2),e!==x&&e||(this.y1=t.y1,this.y2=t.y2),this},e.prototype.alignTo=function(t,e){var i=this.height(),o=this.width(),r=e===g||e===s?x:m,n=r===x?i:o;if(e===a){var p=t.center(),h=this.center();this.x1+=p.x-h.x,this.y1+=p.y-h.y}else this[r+1]=e===g||e===c?t[r+1]-n:t[r+2];return this.x2=this.x1+o,this.y2=this.y1+i,this},e.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},e.prototype.expand=function(t,e){return this.shrink(-t,-e),this},e.prototype.pad=function(t){var e=E(t);return this.x1-=e.left,this.x2+=e.right,this.y1-=e.top,this.y2+=e.bottom,this},e.prototype.unpad=function(t){var e=E(t);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,this.pad(e)},e.prototype.clone=function(){return new e(this.x1,this.y1,this.x2,this.y2)},e.prototype.center=function(){return new Ht(this.x1+this.width()/2,this.y1+this.height()/2)},e.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},e.prototype.points=function(){return[new Ht(this.x1,this.y1),new Ht(this.x2,this.y1),new Ht(this.x2,this.y2),new Ht(this.x1,this.y2)]},e.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},e.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},e.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=Gt(0,0,r,n,t),a=Gt(e,0,r,n,t),p=Gt(e,i,r,n,t),h=Gt(0,i,r,n,t);return e=Math.max(s.x,a.x,p.x,h.x)-Math.min(s.x,a.x,p.x,h.x),i=Math.max(s.y,a.y,p.y,h.y)-Math.min(s.y,a.y,p.y,h.y),this.x2=this.x1+e,this.y2=this.y1+i,this},e.prototype.toRect=function(){return new S.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},e.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},e.prototype.align=function(t,e,i){var o=e+1,r=e+2,n=e===m?"width":"height",p=this[n]();lt(i,[c,g])?(this[o]=t[o],this[r]=this[o]+p):lt(i,[d,s])?(this[r]=t[r],this[o]=this[r]-p):i===a&&(this[o]=t[o]+(t[n]()-p)/2,this[r]=this[o]+p)},e}(S.Class);function qt(t,e){return t-e}var Xt=function(t){function e(e,i,o,r,n){t.call(this),this.center=e,this.innerRadius=i,this.radius=o,this.startAngle=r,this.angle=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},e.prototype.middle=function(){return this.startAngle+this.angle/2},e.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},e.prototype.point=function(t,e){var i=Tt(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=Mt(this.center.x-o*n,3),a=Mt(this.center.y-r*n,3);return new Ht(s,a)},e.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/2,p=Math.sin(Tt(r)),h=Math.cos(Tt(r)),l=n.x-s,c=n.y-a;return Math.abs(p)<.9&&(l+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(c+=a*-p/Math.abs(p)),new Nt(l,c,l+e,c+i)},e.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,p=new Ht(s,a),h=this.point(r),l=new Ht(h.x-e.x,h.y-e.y),c=this.point(n),u=new Ht(c.x-e.x,c.y-e.y),f=Mt(s*s+a*a,3);return(l.equals(p)||P(l,p))&&!P(u,p)&&f>=i*i&&f<=o*o},e.prototype.getBBox=function(){var t,e=new Nt(u,u,f,f),i=Mt(this.startAngle%360),o=Mt((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(qt),s=n.indexOf(i),a=n.indexOf(o);t=i===o?n:s<a?n.slice(s,a+1):[].concat(n.slice(0,a+1),n.slice(s,n.length));for(var p=0;p<t.length;p++){var h=this.point(t[p]);e.wrapPoint(h),e.wrapPoint(h,r)}return r||e.wrapPoint(this.center),e},e.prototype.expand=function(t){return this.radius+=t,this},e}(S.Class),Yt=function(t){function e(e,i,o,r){t.call(this,e,0,i,o,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expand=function(e){return t.prototype.expand.call(this,e)},e.prototype.clone=function(){return new e(this.center,this.radius,this.startAngle,this.angle)},e.prototype.setRadius=function(t){return this.radius=t,this},e}(Xt),Wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;t.angle>0&&i===o&&(o+=.001);var r=new S.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),a=new S.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),p=S.drawing.Path.fromArc(a,e).close();if(s){a.radiusX=a.radiusY=s;var h=a.pointAt(o);p.lineTo(h.x,h.y),p.arc(o,i,s,s,!0)}else p.lineTo(r.x,r.y);return p},e}(S.Class);Wt.current=new Wt;var Zt=Wt,Kt=function(t){function e(e){t.call(this),this.children=[],this.options=j({},this.options,this.initUserOptions(e))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){return t},e.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},e.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},e.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},e.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},e.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},e.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},e.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},e.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},e.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this,this.parent&&this.parent.appendVisual(this.visual))},e.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},e.prototype.createVisual=function(){this.visual=new S.drawing.Group({zIndex:this.options.zIndex,visible:Ot(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=S.drawing.Animation.create(this.visual,this.options.animation))},e.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):xt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},e.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},e.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},e.prototype.stackVisual=function(t){var e,i=t.options.zIndex||0,o=this.visual.children,r=o.length;for(e=0;e<r;e++){var n=o[e];if(Ot(n.options.zIndex,0)>i)break}this.visual.insert(e,t)},e.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},e.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},e.prototype.renderComplete=function(){},e.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},e.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:v,opacity:e||.2},stroke:{color:v,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);xt(n.options.zIndex)||(n.options.zIndex=Ot(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,i){var o=new S.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},e.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},e.prototype.supportsPointInactiveOpacity=function(){return!0},e}(S.Class);Kt.prototype.options={};var $t=Kt,Jt=function(t){function e(e){t.call(this,e),this.options.margin=E(this.options.margin),this.options.padding=E(this.options.padding)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=function(){o.align(e,m,r.align),o.align(e,x,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)},f=e.clone();p&&(f.x2=f.x1+n,f.y2=f.y1+s),a&&f.unpad(h).unpad(c).unpad(l),t.prototype.reflow.call(this,f),i=p?this.box=new Nt(0,0,n,s):this.box,a&&p?(u(),f=this.contentBox=this.paddingBox.clone().unpad(l)):(f=this.contentBox=i.clone(),i.pad(l).pad(c).pad(h),u()),this.translateChildren(i.x1-f.x1+h.left+c+l.left,i.y1-f.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var y=d[g];y.reflow(y.box)}},e.prototype.align=function(t,e,i){this.box.align(t,e,i)},e.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(S.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},e.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Ot(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}($t);Vt(Jt,{align:c,vAlign:g,margin:{},padding:{},border:{color:n,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Qt=Jt,te=function(t){function e(e,i){t.call(this,e),this.pointData=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){var t=this.options,e=this.paddingBox,i=t.type,o=t.rotation,r=e.center(),n=e.width()/2;if(!t.visible||!this.hasBox())return null;var s,a=this.visualStyle();return i===p?s=new S.drawing.Circle(new S.geometry.Circle([Mt(e.x1+n,3),Mt(e.y1+e.height()/2,3)],n),a):"triangle"===i?s=S.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],a).close():"cross"===i?((s=new S.drawing.MultiPath(a)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),s.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):s=S.drawing.Path.fromRect(e.toRect(),a),o&&s.transform(S.geometry.transform().rotate(-o,[r.x,r.y])),s.options.zIndex=t.zIndex,s},e.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},e.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},e.prototype.createVisual=function(){this.visual=this.createElement()},e}(Qt);Vt(te,{type:p,align:a,vAlign:a});var ee=te,ie={glass:{type:"linear",rotation:0,stops:[{offset:0,color:v,opacity:0},{offset:.25,color:v,opacity:.3},{offset:1,color:v,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:v,opacity:.55},{offset:.65,color:v,opacity:0},{offset:.95,color:v,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:v,opacity:.06},{offset:.83,color:v,opacity:.2},{offset:.95,color:v,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:0},{offset:.5,color:v,opacity:.3},{offset:.99,color:v,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:v,opacity:.2},{offset:.15,color:v,opacity:.15},{offset:.17,color:v,opacity:.35},{offset:.85,color:v,opacity:.05},{offset:.87,color:v,opacity:.15},{offset:.99,color:v,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function oe(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new Nt(o,s,r,a),l[1]=new Nt(i,a,o,p),l[2]=new Nt(r,a,n,p),l[3]=new Nt(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(l[4]=new Nt(i,s,o,a),l[5]=new Nt(r,p,n,h)):(l[4]=new Nt(r,s,n,a),l[5]=new Nt(i,p,o,h)),st(l,(function(t){return t.height()>0&&t.width()>0}))[0]}var re=function(t){function e(e){t.call(this,e);var i=this.options;i.width=parseInt(i.width,10),i.height=parseInt(i.height,10),this.gradients={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t=this.options,e=this.children,i=new Nt(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=oe(i,e[o].box)||new Nt},e.prototype.createVisual=function(){this.visual=new S.drawing.Group,this.createBackground()},e.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),o=S.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(o)},e.prototype.getRoot=function(){return this},e.prototype.createGradient=function(t){var e,i=this.gradients,o=Ct(t),r=ie[t.gradient];if(i[o])e=i[o];else{var n=Object.assign({},r,t);"linear"===r.type?e=new S.drawing.LinearGradient(n):(t.innerRadius&&(n.stops=function(t){for(var e=t.stops,i=t.innerRadius/t.radius*100,o=e.length,r=[],n=0;n<o;n++){var s=Object.assign({},e[n]);s.offset=(s.offset*(100-i)+i)/100,r.push(s)}return r}(n)),(e=new S.drawing.RadialGradient(n)).supportVML=!1!==r.supportVML),i[o]=e}return e},e.prototype.cleanGradients=function(){var t=this.gradients;for(var e in t)t[e]._observers=[]},e.prototype.size=function(){var t=this.options;return new Nt(0,0,t.width,t.height)},e}($t);Vt(re,{width:600,height:400,background:v,border:{color:n,width:0},margin:E(5),zIndex:-2});var ne=re,se=function(t){function e(e){t.call(this,e),this._initDirection()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=m,this.elementAxis=x,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=x,this.elementAxis=m,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},e.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},e.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,i=this.groupAxis,o=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,l=t[i+1]+this.alignStart(a,t[r]());if(h){for(var c=l,u=0;u<h;u++){for(var f=s[u],d=f.groupElements,g=t[e+1],y=d.length,v=0;v<y;v++){var m=d[v],x=this.elementSize(m),b=c+this.alignStart(x[r],f.groupSize),_=new Nt;_[i+1]=b,_[i+2]=b+x[r],_[e+1]=g,_[e+2]=g+x[o],m.reflow(_),g+=x[o]+this.elementSpacing}c+=f.groupSize+this.groupSpacing}t[i+1]=l,t[i+2]=l+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===d||o===s?i=e-t:o===a&&(i=(e-t)/2),i},e.prototype.groupOptions=function(){for(var t=this.box,e=this.children,i=this.elementSizeField,o=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Mt(t[i]()),a=e.length,p=[],h=0,l=0,c=0,u=0,f=[],d=0;d<a;d++){var g=e[d];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&Mt(l+r+y[i])>s&&(p.push({groupElements:f,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,h=0,l=0,f=[]),h=Math.max(h,y[o]),l>0&&(l+=r),l+=y[i],f.push(g)}return p.push({groupElements:f,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}($t);Vt(se,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var ae=se,pe=S.drawing.Text,he=function(t){function e(e,i){t.call(this,i),this.content=e,this.reflow(new Nt)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.size=S.drawing.util.measureText(this.content,{font:e.font});this.baseline=i.baseline,this.box=new Nt(t.x1,t.y1,t.x1+i.width,t.y1+i.height)},e.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor;this.visual=new pe(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r})},e}($t);Vt(he,{font:"12px sans-serif",color:n});var le=he;function ce(t){var e=t.origin,i=t.bottomRight();return new Nt(e.x,e.y,i.x,i.y)}var ue=/\n/m,fe=function(t){function e(e,i,o){t.call(this,i),this.content=e,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new Nt)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initContainer=function(){var t=this.options,e=String(this.content).split(ue),i=new ae({vertical:!0,align:t.align,wrap:!1}),o=j({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new le(e[r].trim(),o);i.append(n)}},e.prototype.reflow=function(e){var i=this.options,o=i.visual;if(this.container.options.align=i.align,o&&!this._boxReflow){var r=e;r.hasSize()||(this._boxReflow=!0,this.reflow(r),this._boxReflow=!1,r=this.box);var n=this.visual=o(this.visualContext(r));n&&(r=ce(n.clippedBBox()||new S.geometry.Rect),n.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=r}else if(t.prototype.reflow.call(this,e),i.rotation){var s=E(i.margin),a=this.box.unpad(s);this.targetBox=e,this.normalBox=a.clone(),(a=this.rotate()).translate(s.left-s.right,s.top-s.bottom),this.rotatedBox=a.clone(),a.pad(s)}},e.prototype.createVisual=function(){var t=this.options;if(this.visual=new S.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=S.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle());this.visual.append(e)}},e.prototype.renderVisual=function(){if(this.options.visible)if(this.options.visual){var e=this.visual;e&&!xt(e.options.noclip)&&(e.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()}else t.prototype.renderVisual.call(this)},e.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},e.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},e.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,m,t.align),this.align(this.targetBox,x,t.vAlign),this.box},e.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,r=this.rotatedBox.center();return S.geometry.transform().translate(r.x-i,r.y-o).rotate(t,[i,o])},e}(Qt),de=function(t){function e(e){t.call(this,e),this.append(new fe(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(e){t.prototype.reflow.call(this,e),this.box.snapTo(e,m)},e.buildTitle=function(t,i,o){var r,n=t;return"string"==typeof t&&(n={text:t}),(n=Object.assign({visible:!0},o,n))&&n.visible&&n.text&&(r=new e(n),i.append(r)),r},e}($t);Vt(de,{color:n,position:g,align:a,margin:E(5),padding:E(5)});var ge=de,ye=function(t){function e(e,i,o,r,n){t.call(this,i,n),this.text=i,this.value=e,this.index=o,this.dataItem=r,this.reflow(new Nt)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.visualContext=function(e){var i=t.prototype.visualContext.call(this,e);return i.value=this.value,i.dataItem=this.dataItem,i.format=this.options.format,i.culture=this.options.culture,i},e.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:At(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},e.prototype.rotate=function(){if(this.options.alignRotation!==a){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=ce(e.bbox(i.matrix()))}else t.prototype.rotate.call(this);return this.box},e.prototype.rotationTransform=function(){var e=this.options,i=e.rotation;if(!i)return null;if(e.alignRotation===a)return t.prototype.rotationTransform.call(this);var o=S.geometry.transform().rotate(i).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),p=e.rotationOrigin||g,h=p===g||p===s?m:x,l=p===g||p===s?x:m,u=p===g||p===c?n.origin:n.bottomRight(),f=r.topLeft().transformCopy(o),d=r.topRight().transformCopy(o),y=r.bottomRight().transformCopy(o),v=r.bottomLeft().transformCopy(o),b=S.geometry.Rect.fromPoints(f,d,y,v),_={};_[l]=n.origin[l]-b.origin[l];var w,A,k=Math.abs(f[l]+_[l]-u[l]),P=Math.abs(d[l]+_[l]-u[l]);Mt(k,10)===Mt(P,10)?(w=f,A=d):P<k?(w=d,A=y):(w=f,A=v);var C=w[h]+(A[h]-w[h])/2;return _[h]=n.center()[h]-C,S.geometry.transform().translate(_.x,_.y).rotate(i)},e}(fe);Vt(ye,{_autoReflow:!1});var ve=ye,me=function(t){function e(e,i,o){t.call(this,i),this.fields=e,this.chartService=o,this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hide=function(){this.options.visible=!1},e.prototype.show=function(){this.options.visible=!0},e.prototype.render=function(){var t=this,e=this.options;if(e.visible){var i,o,r=e.label,n=e.icon,s=new Nt,a=function(){return t},h=n.size,l=this.fields.text;if(xt(r)&&r.visible){var c=it(r);c?l=c(this.fields):r.format&&(l=this.chartService.format.auto(r.format,l)),r.color||(r.color="inside"===r.position?"#fff":n.background),this.label=new fe(l,j({},r)),this.label.aliasFor=a,"inside"!==r.position||xt(h)||(n.type===p?h=Math.max(this.label.box.width(),this.label.box.height()):(i=this.label.box.width(),o=this.label.box.height()),s.wrap(this.label.box))}n.width=i||h||7,n.height=o||h||7;var u=new ee(j({},n));u.aliasFor=a,this.marker=u,this.append(u),this.label&&this.append(this.label),u.reflow(new Nt),this.wrapperBox=s.wrap(u.box)}},e.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,a=this.marker,p=this.wrapperBox,h=t.center(),l=r.line.length,u=r.position;r.visible&&(lt(u,[c,d])?u===c?(o=p.alignTo(t,u).translate(-l,t.center().y-p.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[o.x2,h.y]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,u).translate(l,t.center().y-p.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[o.x1,h.y]],i=o.clone().wrapPoint(e))):u===s?(o=p.alignTo(t,u).translate(t.center().x-p.center().x,l),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,o.y1]],i=o.clone().wrapPoint(e))):(o=p.alignTo(t,u).translate(t.center().x-p.center().x,-l),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,o.y2]],i=o.clone().wrapPoint(e))),a&&a.reflow(o),n&&(n.reflow(o),a&&("outside"===r.label.position&&n.box.alignTo(a.box,u),n.reflow(n.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;i.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:i.background,border:i.background,icon:i.icon,label:i.label,line:i.line,position:i.position,visible:i.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):t.prototype.renderVisual.call(this)},e.prototype.createLine=function(){var t=this.options.line;if(this.linePoints){var e=S.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});k(e),this.visual.append(e)}},e.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},e.prototype.out=function(t,e){var i=this.eventArgs(e);t.trigger("noteLeave",i)},e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:At(t),text:xt(e.label)?e.label.text:"",visual:this.visual})},e}(Qt);Vt(me,{icon:{visible:!0,type:p},label:{position:"inside",visible:!0,align:a,vAlign:a},line:{visible:!0},visible:!0,position:g,zIndex:2});var xe=me;function be(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new S.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),k(n),n}function _e(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,n=new S.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?n.moveTo(i,r).lineTo(o,r):n.moveTo(r,i).lineTo(r,o),k(n),n}var we=function(t){function e(e,i){void 0===i&&(i=new K),t.call(this,e),this.chartService=i,this.options.visible||(this.options=j({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.minorTickType},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:"none"!==this.options.majorTickType},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},e.prototype.createLabels=function(){var t=this.options,e=t.vertical?d:a,i=j({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){var r=this.labelsRange(),n=i.rotation;I(n)&&(i.alignRotation=n.align,i.rotation=n.angle),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var s=r.min;s<r.max;s+=o){var p=this.createAxisLabel(s,i);p&&(this.append(p),this.labels.push(p))}}},e.prototype.clearLabels=function(){this.children=st(this.children,(function(t){return!(t instanceof ve)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=st(this.children,(function(e){return e!==t.title})),this.title=void 0)},e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},e.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,n=o?e.y2:e.y1,s=t.line.width||0;return i?new Nt(r,e.y1,r,e.y2-s):new Nt(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=j({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var i=new fe(e.text,e);this.append(i),this.title=i}},e.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=j({},e,i[o]);r.value=this.parseNoteValue(r.value);var n=new xe({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(xt(n.options.position)?t.vertical&&!lt(n.options.position,[c,d])?n.options.position=t.reverse?c:d:t.vertical||lt(n.options.position,[g,s])||(n.options.position=t.reverse?s:g):t.vertical?n.options.position=t.reverse?c:d:n.options.position=t.reverse?s:g,this.append(n),this.notes.push(n))}},e.prototype.parseNoteValue=function(t){return t},e.prototype.renderVisual=function(){t.prototype.renderVisual.call(this),this.createPlotBands()},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this.createBackground(),this.createLine()},e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new S.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},e.prototype.createTicks=function(t){var e=this.options,i=this.lineBox(),o=e.labels.mirror,r=e.majorTicks.visible?e.majorUnit:0,n={vertical:e.vertical};function s(e,r,s){var a=e.length,p=Math.max(1,r.step);if(r.visible)for(var h=r.skip;h<a;h+=p)xt(s)&&h%s==0||(n.tickX=o?i.x2:i.x2-r.size,n.tickY=o?i.y1-r.size:i.y1,n.position=e[h],t.append(be(n,r)))}s(this.getMajorTickPositions(),e.majorTicks),s(this.getMinorTickPositions(),e.minorTicks,r/e.minorUnit)},e.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();if(e.width>0&&e.visible){var o=new S.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});o.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&k(o);var r=this._lineGroup=new S.drawing.Group;r.append(o),this.visual.append(r),this.createTicks(r)}},e.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},e.prototype.createBackground=function(){var t=this.options,e=this.box,i=t.background;i&&(this._backgroundPath=S.drawing.Path.fromRect(e.toRect(),{fill:{color:i},stroke:null}),this.visual.append(this._backgroundPath))},e.prototype.createPlotBands=function(){var t=this,e=this.options,i=e.plotBands||[],o=e.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),s=st(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],a=0;a<i.length;a++){var p=i[a],h=void 0,l=void 0,u=p.label,f=void 0;if(o?(h=(s||r.axisX).lineBox(),l=this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),l=(s||r.axisY).lineBox()),u&&(u.vAlign=u.position||c,f=this.createPlotBandLabel(u,p,new Nt(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()){var d=new S.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),g=S.drawing.Path.fromRect(d,{fill:{color:p.color,opacity:p.opacity},stroke:null});n.append(g),f&&n.append(f)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;if(xt(t)&&t.visible){var n=it(t);n?r=n({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)}return(o=new fe(r,t)).reflow(i),o.renderVisual(),o.visual},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,s=t.options.line.visible,a=o.visible?e.majorUnit:0,p=t.lineBox(),h=p[n?"y1":"x1"],l={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},c=[],u=this.gridLinesVisual();function f(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var a=Mt(t[n]);lt(a,c)||n%i==0||s&&h===a||(l.position=a,u.append(_e(l,e)),c.push(a))}}return f(this.getMajorTickPositions(),o),f(this.getMinorTickPositions(),i,a/r),u.children},e.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?"width":"height",a=o?o.box[s]():0,p=this.getActualTickSize()+e.margin+a,h=((this.getRoot()||{}).box||t)[s](),l=0,c=0;c<n;c++){var u=i[c].box[s]();u+p<=h&&(l=Math.max(l,u))}this.box=r?new Nt(t.x1,t.y1,t.x1+l+p,t.y2):new Nt(t.x1,t.y1,t.x2,t.y1+l+p),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},e.prototype.labelTickIndex=function(t){return t.index},e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=this.lineBox(),n=t.labels.mirror,a=this.getLabelsTickPositions(),p=this.getActualTickSize()+t.margin,h=0;h<e.length;h++){var l=e[h],u=this.labelTickIndex(l),f=o?l.box.height():l.box.width(),y=a[u]-f/2,v=void 0,m=void 0,x=void 0;if(o){if(i)y=(m=a[u])+((x=a[u+1])-m)/2-f/2;var b=r.x2;n?(b+=p,l.options.rotationOrigin=c):(b-=p+l.box.width(),l.options.rotationOrigin=d),v=l.box.move(b,y)}else{i?(m=a[u],x=a[u+1]):(m=y,x=y+f);var _=r.y1;n?(_-=p+l.box.height(),l.options.rotationOrigin=s):(_+=p,l.options.rotationOrigin=g),v=new Nt(m,_,x,_+l.box.height())}l.reflow(v)}},e.prototype.autoRotateLabels=function(){if(this.options.autoRotateLabels&&!this.options.vertical){for(var t,e=this.getMajorTickPositions(),i=this.labels,o=0;o<i.length;o++){var r=Math.abs(e[o+1]-e[o]),n=i[o].box;if(n.width()>r){if(n.height()>r){t=-90;break}t=-45}}if(t){for(var s=0;s<i.length;s++)i[s].options.rotation=t,i[s].reflow(new Nt);return!0}}},e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,o=t.vertical;e&&(o?(e.options.align=i?d:c,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?g:s),e.reflow(this.box))},e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;xt(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,o=i?x:m;this.box.snapTo(e,o),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[o+1]-=this.lineBox()[o+1]-e[o+1],this.box[o+2]-=this.lineBox()[o+2]-e[o+2]},e.prototype.axisLabelText=function(t,e,i){var o=it(i),r=t;return o?r=o({value:t,dataItem:e,format:i.format,culture:i.culture}):i.format&&(r=this.chartService.format.localeAuto(i.format,[t],i.culture)),r},e.prototype.slot=function(t,e,i){var o=this.getSlot(t,e,i);if(o)return o.toRect()},e.prototype.contentBox=function(){var t=this.box.clone(),e=this.labels;if(e.length){var i=this.options.vertical?x:m;if(this.chartService.isPannable(i)){var o=this.maxLabelOffset();t[i+1]-=o.start,t[i+2]+=o.end}else{e[0].options.visible&&t.wrap(e[0].box);var r=e[e.length-1];r.options.visible&&t.wrap(r.box)}}return t},e.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,i=t.reverse,o=this.labelsBetweenTicks(),r=this.getLabelsTickPositions(),n=e?x:m,s=this.labels,a=i?1:0,p=i?0:1,h=0,l=0,c=0;c<s.length;c++){var u=s[c],f=this.labelTickIndex(u),d=void 0,g=void 0;o?(d=r[f+a],g=r[f+p]):d=g=r[f],h=Math.max(h,d-u.box[n+1]),l=Math.max(l,u.box[n+2]-g)}return{start:h,end:l}},e.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!xt(n.min)||n.min<=i)||o<e&&r>0&&(!xt(n.max)||o<=n.max))return null;if(e<i&&r>0||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,p=e;return t<i&&r<0?(a=Pt(t,i,o),p=Pt(t+s,i+s,o)):e>o&&r>0&&(p=Pt(e,i,o),a=Pt(e-s,i,o-s)),{min:a,max:p}},e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},e.prototype.labelsBetweenTicks=function(){return!this.options.justified},e.prototype.prepareUserOptions=function(){},e}($t);Vt(we,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:n,visible:!0},title:{visible:!0,position:a},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:"none",majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:n,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Ae=we,Se="days",ke="years",Pe={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function Ce(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function Te(t,e){return new Date(t.getTime()+e)}function Me(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Re(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function Oe(t,e,i,o){var r=t;if(t){var n=Me(t),s=n.getHours();i===ke?Re(r=new Date(n.getFullYear()+e,0,1),0):"months"===i?Re(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===i?Re(r=Oe(function(t,e){void 0===e&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return Te(t,864e5*-i)}(n,o),7*e,Se),s):i===Se?Re(r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+e),s):"hours"===i?r=function(t,e){var i=new Date(t);i.setMinutes(0,0,0);var o=6e4*(t.getTimezoneOffset()-i.getTimezoneOffset());return Te(i,o+36e5*e)}(n,e):"minutes"===i?(r=Te(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===i?r=Te(n,1e3*e):"milliseconds"===i&&(r=Te(n,e)),"milliseconds"!==i&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function je(t,e,i){return Oe(Me(t),0,e,i)}function Ie(t,e,i){var o=Me(t);return o&&je(o,e,i).getTime()===o.getTime()?o:Oe(o,1,e,i)}function Ve(t,e){return t&&e?t.getTime()-e.getTime():-1}function Be(t,e){return t.getTime()-e}function Le(t){if(b(t)){for(var e=[],i=0;i<t.length;i++)e.push(Le(t[i]));return e}if(t)return Me(t).getTime()}function ze(t,e){return t&&e?Le(t)===Le(e):t===e}function Ee(t,e,i){return Ce(t,e)/Pe[i]}function Fe(t,e,i,o){var r=Me(t),n=Me(e);return("months"===i?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+Ee(r,new Date(r.getFullYear(),r.getMonth()),Se)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===ke?r.getFullYear()-n.getFullYear()+Fe(r,new Date(r.getFullYear(),0),"months",1)/12:i===Se||"weeks"===i?Ee(r,n,i):Be(r,e)/Pe[i])/o}function De(t,e,i){return i===ke?e.getFullYear()-t.getFullYear():"months"===i?12*De(t,e,ke)+e.getMonth()-t.getMonth():i===Se?Math.floor(Be(e,t)/864e5):Math.floor(Be(e,t)/Pe[i])}function Ue(t,e){return T(e)&&t.parseDate(e)||Me(e)}function He(t,e){if(b(e)){for(var i=[],o=0;o<e.length;o++)i.push(Ue(t,e[o]));return i}return Ue(t,e)}function Ge(t,e){return C(t.weekStartDay)?t.weekStartDay:e.firstDay?e.firstDay():0}var Ne=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this._ticks={}},e.prototype.categoriesHash=function(){return""},e.prototype.clone=function(){var t=new e(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},e.prototype.initUserOptions=function(t){var e=t.categories||[],i=xt(t.min),o=xt(t.max);if(t.srcCategories=t.categories=e,(i||o)&&e.length){var r,n=i?Math.floor(t.min):0;r=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(n,r)}return t},e.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:C(t.min)?t.min%1:0,max:C(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},e.prototype.totalRangeIndices=function(t){var e,i=this.options,o=C(i.min)?i.min:0;if(e=C(i.max)?i.max:C(i.min)?o+i.categories.length:this.totalRange().max||1,t){var r=this.totalRange();o=Pt(o,0,r.max),e=Pt(e,0,r.max)}return{min:o,max:e}},e.prototype.range=function(){var t=this.options;return{min:C(t.min)?t.min:0,max:C(t.max)?t.max:this.totalRange().max}},e.prototype.roundedRange=function(){return this.range()},e.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},e.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(i-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:i}},e.prototype.arrangeLabels=function(){t.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},e.prototype.hideOutOfRangeLabels=function(){var t=this.box,e=this.labels;if(e.length){var i=this.options.vertical?x:m,o=t[i+1],r=t[i+2],n=e[0],s=kt(e);(n.box[i+1]>r||n.box[i+2]<o)&&(n.options.visible=!1),(s.box[i+1]>r||s.box[i+2]<o)&&(s.options.visible=!1)}},e.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},e.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},e.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},e.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,o=e.max,r=Math.ceil(o),n=Math.floor(i),s=[];n<=r;)s.push(n),n+=t;return s},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,p=s[(i?x:m)+(o?2:1)],h=this.tickIndices(t),l=[],c=0;c<h.length;c++)l.push(p+Mt(n*(h[c]-a),3));return l},e.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),r=o.getHash()+i.min+","+i.max+t.reverse+t.justified;if(e._hash!==r){var n=t.minorTicks.visible||t.minorGridLines.visible;e._hash=r,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=n?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]}return e},e.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?x:m,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&s>=0;)s--;return t.slice(n,s+1)},e.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,n=o.justified,s=o.vertical,a=this.scaleOptions(),p=a.scale,h=a.box,l=a.min,c=s?x:m,u=h[c+(r?2:1)],f=h.clone(),d=!xt(e),g=Ot(t,0),y=Ot(e,g);y=Math.max(y-1,g);var v=u+(g-l)*p,b=u+((y=Math.max(g,y))+1-l)*p;return d&&n&&(b=v),i&&(v=Pt(v,h[c+1],h[c+2]),b=Pt(b,h[c+1],h[c+2])),f[c+1]=r?b:v,f[c+2]=r?v:b,f},e.prototype.limitSlot=function(t){var e=this.options.vertical?x:m,i=this.lineBox(),o=t.clone();return o[e+1]=Pt(t[e+1],i[e+1],i[e+2]),o[e+2]=Pt(t[e+2],i[e+1],i[e+2]),o},e.prototype.slot=function(e,i,o){var r=Math.floor(this.options.min||0),n=e,s=i;return"string"==typeof n?n=this.categoryIndex(n):C(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):C(s)&&(s-=r),t.prototype.slot.call(this,n,s,o)},e.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?x:m,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,h=n.max,l=i?h:p,c=a[r+1],u=a[r+2],f=t[r];if(f<c||f>u)return null;var d=l+(f-c)/s,g=d%1;return o?d=Math.round(d):0===g&&d>0&&d--,Math.floor(d)},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.options.categories[e]},e.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},e.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},e.prototype.categoriesCount=function(){return(this.options.categories||[]).length},e.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=e.categories.length,n=Mt(t/(o/r),10);return{min:n,max:r+n}},e.prototype.zoomRange=function(t){var e=this.totalRangeIndices(),i=this.totalRange(),o=i.min,r=i.max,n=Pt(e.min+t,o,r),s=Pt(e.max-t,o,r);if(s-n>0)return{min:n,max:s}},e.prototype.scaleRange=function(t){var e=this.options.categories.length,i=t*e;return{min:-i,max:e+i}},e.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},e.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.totalRangeIndices(!0),r=o.min,n=o.max,s=Math.floor(r);return e?(r=Math.ceil(r),n=Math.floor(n)):(r=Math.floor(r),n=Math.ceil(n)),{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-s,max:(t.categories.length?n+(e?1:0):0)-s}},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems?i.dataItems[t]:null,r=Ot(i.categories[t],""),n=this.axisLabelText(r,o,e);return new ve(r,n,t,o,e)},e.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},e.prototype.noteSlot=function(t){var e=this.options,i=t-Math.floor(e.min||0);return this.getSlot(i)},e.prototype.arrangeNotes=function(){t.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},e.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?x:m,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},e.prototype.pan=function(t){var e=this.totalRangeIndices(!0),i=this.scaleOptions().scale,o=Mt(t/i,10),r=this.totalRange(),n=e.min+o,s=e.max+o;return this.limitRange(n,s,0,r.max,o)},e.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?x:m,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(o?2:1)],h=t[r]-p,l=e[r]-p,c=n.min+h/a,u=n.min+l/a,f=Math.min(c,u),d=Math.max(c,u);if(d-f>=.01)return{min:f,max:d}},e.prototype.valueRange=function(){return this.range()},e.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var i=e.length,o=0;o<i;o++)if(ze(e[o],t))return o;return-1}return e.indexOf(t)}(t,e.srcCategories)},e.prototype.currentRangeIndices=function(){var t=this.options,e=0;return C(t.min)&&(e=Math.floor(t.min)),{min:e,max:C(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},e.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ht,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},e.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e}(Ae);Vt(Ne,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:n},labels:{zIndex:1},justified:!1,_deferLabels:!0});var qe=Ne,Xe={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"},Ye=["milliseconds","seconds","minutes","hours",Se,"weeks","months",ke];function We(t){var e=t._range;return e||((e=t._range=Bt(t)).min=Me(e.min),e.max=Me(e.max)),e}var Ze=function(t){this.options=t};Ze.prototype.displayIndices=function(){return{min:0,max:1}},Ze.prototype.displayRange=function(){return{}},Ze.prototype.total=function(){return{}},Ze.prototype.valueRange=function(){return{}},Ze.prototype.valueIndex=function(){return-1},Ze.prototype.values=function(){return[]},Ze.prototype.totalIndex=function(){return-1},Ze.prototype.valuesCount=function(){return 0},Ze.prototype.totalCount=function(){return 0},Ze.prototype.dateAt=function(){return null};var Ke=function(t,e,i){this.options=i,i.baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=Oe(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&ze(e,n)&&!i.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=i.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=o?this.valueStart:a;var p=i.max;p?(this.valueEnd=this.roundToTotalStep(p,!1,!r&&ze(p,this.roundToTotalStep(p))?-1:0),this.displayEnd=o?this.roundToTotalStep(p,!r):i.max):(this.valueEnd=n,this.displayEnd=o||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))};function $e(t,e,i){for(var o,r,n,s=We(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l="fit"===t.baseUnit,c=e?Ye.indexOf(e):0,u=l?Ye[c++]:t.baseUnit,f=a/Pe[u],d=f;!r||f>=h;){o=o||p[u].slice(0);do{n=o.shift()}while(n&&e===u&&n<i);if(n)f=d/(r=n);else{if(u===kt(Ye)){r=Math.ceil(d/h);break}if(!l){f>h&&(r=Math.ceil(d/h));break}u=Ye[c++]||kt(Ye),d=a/Pe[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function Je(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!lt(e,Ye)&&function(t){for(var e,i,o=t.categories,r=xt(o)?o.length:0,n=u,s=0;s<r;s++){var a=o[s];if(a&&e){var p=Ce(a,e);p>0&&(i=(n=Math.min(n,p))>=31536e6?ke:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Se:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=i||Se}(t),"fit"!==e&&"auto"!==t.baseUnitStep||$e(t),t}Ke.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ke.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,i=t.baseUnitStep,o=Fe(this.displayStart,this.valueStart,e,i),r=Fe(this.displayEnd,this.valueStart,e,i);this._indices={min:o,max:r}}return this._indices},Ke.prototype.total=function(){return{min:this.start,max:this.end}},Ke.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ke.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ke.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Fe(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ke.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Fe(t,this.start,e.baseUnit,e.baseUnitStep))},Ke.prototype.dateIndex=function(t){var e=this.options;return Fe(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ke.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ke.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=Oe(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ke.prototype.dateAt=function(t,e){var i=this.options;return Oe(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},Ke.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,a=this.start,p=Fe(t,a,r,n),h=e?Math.ceil(p):Math.floor(p);return i&&(h+=i),Oe(a,h*n,r,s)};var Qe=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(Object.assign({},this.options),this.chartService);return t.createLabels(),t},e.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},e.prototype.initUserOptions=function(t){return t},e.prototype.initFields=function(){t.prototype.initFields.call(this);var e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];if(r._parsed||((r=He(i,r))._parsed=!0),o=j({roundToBaseUnit:!0},o,{categories:r,min:Ue(i,o.min),max:Ue(i,o.max),weekStartDay:Ge(o,i)}),e.panning&&e.isPannable(o.vertical?x:m)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,this.options=o,o.srcCategories=r,r.length>0){var n=We(r),s=o.maxDivisions;if(this.dataRange=new Ke(n.min,n.max,Je(o)),s){var a=this.dataRange.displayRange(),p=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:a.min,max:a.max,maxDateGroups:s}),h=this.dataRange.options;$e(p,h.baseUnit,h.baseUnitStep),this.divisionRange=new Ke(n.min,n.max,p)}else this.divisionRange=this.dataRange}else o.baseUnit=o.baseUnit||Se,this.dataRange=this.divisionRange=new Ze(o)},e.prototype.tickIndices=function(e){var i=this.dataRange,o=this.divisionRange,r=o.valuesCount();if(!this.options.maxDivisions||!r)return t.prototype.tickIndices.call(this,e);var n=[],s=o.values(),a=0;this.options.justified||(s=s.concat(o.dateAt(r)),a=.5);for(var p=0;p<s.length;p++)if(n.push(i.dateIndex(s[p])+a),1!==e&&p>=1){var h=n.length-1;n.splice(p,0,n[h-1]+(n[h]-n[h-1])*e)}return n},e.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return Ve(t,e.min)>=0&&Ve(t,e.max)<=0&&i.length},e.prototype.parseNoteValue=function(t){return Ue(this.chartService.intl,t)},e.prototype.noteSlot=function(t){return this.getSlot(t)},e.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),s=r?n.height():n.width(),a=this.range(),p=s/(a.max-a.min),h=Mt(t/p,10);if(a.min&&a.max){var l=Te(e.min||a.min,h),c=Te(e.max||a.max,h);a={min:Oe(l,0,i,o),max:Oe(c,0,i,o)}}return a},e.prototype.scaleRange=function(t){var e=Math.abs(t),i=this.range(),o=i.min,r=i.max;if(o&&r){for(;e--;){var n=Be(o,r),s=Math.round(.1*n);t<0?(o=Te(o,s),r=Te(r,-s)):(o=Te(o,-s),r=Te(r,s))}i={min:o,max:r}}return i},e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},e.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.total(),p=Mt(t/(o/(s-n)),10)*(e.reverse?-1:1),h=Te(n,p),l=Te(s,p),c=this.limitRange(Le(h),Le(l),Le(a.min),Le(a.max),p);return c?(c.min=Me(c.min),c.max=Me(c.max),c.baseUnit=e.baseUnit,c.baseUnitStep=e.baseUnitStep||1,c.userSetBaseUnit=e.userSetBaseUnit,c.userSetBaseUnitStep=e.userSetBaseUnitStep,c):void 0},e.prototype.pointsRange=function(e,i){if(this.isEmpty())return null;var o=t.prototype.pointsRange.call(this,e,i),r=this.dataRange.displayRange(),n=this.dataRange.displayIndices(),s=Be(r.max,r.min)/(n.max-n.min),a=this.options;return{min:Te(r.min,o.min*s),max:Te(r.min,o.max*s),baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep}},e.prototype.zoomRange=function(t){if(this.isEmpty())return null;var e=this.options,i="fit"===e.userSetBaseUnit,o=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.options,p=a.weekStartDay,h=a.baseUnit,l=a.baseUnitStep,c=Oe(n,t*l,h,p),u=Oe(s,-t*l,h,p);if(i){var f,d,g=e.autoBaseUnitSteps,y=e.maxDateGroups,v=kt(g[h])*y*Pe[h],m=Be(s,n),x=Be(u,c),b=Ye.indexOf(h);if(x<Pe[h]&&"milliseconds"!==h)h=Ye[b-1],c=Te(n,d=(m-(y-1)*(f=kt(g[h]))*Pe[h])/2),u=Te(s,-d);else if(x>v&&h!==ke){var _=0;do{b++,h=Ye[b],_=0,d=2*Pe[h];do{f=g[h][_],_++}while(_<g[h].length&&d*f<m)}while(h!==ke&&d*f<m);(d=(d*f-m)/2)>0&&(c=Te(n,-d),u=Te(s,d),c=Te(c,Pt(u,o.min,o.max)-u),u=Te(u,Pt(c,o.min,o.max)-c))}}return c<o.min&&(c=o.min),u>o.max&&(u=o.max),c&&u&&Be(u,c)>0?{min:c,max:u,baseUnit:e.userSetBaseUnit||e.baseUnit,baseUnitStep:e.userSetBaseUnitStep||e.baseUnitStep}:void 0},e.prototype.range=function(){return this.dataRange.displayRange()},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||n;var s=this.axisLabelText(r,o,e);if(s)return new ve(r,s,t,o,e)},e.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},e.prototype.slot=function(t,e,i){var o=this.dataRange,r=t,n=e;r instanceof Date&&(r=o.dateIndex(r)),n instanceof Date&&(n=o.dateIndex(n));var s=this.getSlot(r,n,i);if(s)return s.toRect()},e.prototype.getSlot=function(e,i,o){var r=e,n=i;return"object"==typeof r&&(r=this.categoryIndex(r)),"object"==typeof n&&(n=this.categoryIndex(n)),t.prototype.getSlot.call(this,r,n,o)},e.prototype.valueRange=function(){var t=We(this.options.srcCategories);return{min:Me(t.min),max:Me(t.max)}},e.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},e.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},e.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},e.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},e.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},e.prototype.getCategory=function(t){var e=this.pointCategoryIndex(t);return null===e?null:this.dataRange.dateAt(e)},e.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},e.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},e.prototype.totalRange=function(){return this.dataRange.total()},e.prototype.totalCount=function(){return this.dataRange.totalCount()},e.prototype.isEmpty=function(){return!this.options.srcCategories.length},e.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=We(t.srcCategories);return new Ke(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(qe);Vt(Qe,{type:h,labels:{dateFormats:Xe},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});var ti=Qe;function ei(t,e){return Mt(Math.floor(t/e)*e,10)}function ii(t,e){return Mt(Math.ceil(t/e)*e,10)}function oi(t){return Math.max(Math.min(t,3e5),-3e5)}var ri=Math.pow(10,-9),ni=function(t){function e(e,i,o,r){t.call(this,Object.assign({},o,{seriesMin:e,seriesMax:i}),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=function(t,e,i){var o=i.narrowRange,r=function(t,e,i){if(!t&&!e)return 0;var o;if(t>=0&&e>=0){var r=t===e?0:t;if(!1===i||!i&&(e-r)/e>.2)return 0;o=Math.max(0,r-(e-r)/2)}else o=t;return o}(t,e,o),n=function(t,e,i){if(!t&&!e)return 1;var o;if(t<=0&&e<=0){var r=t===e?0:e,n=Math.abs((r-t)/r);if(!1===i||!i&&n>.2)return 0;o=Math.min(0,r-(t-r)/2)}else o=e;return o}(t,e,o),s=Ut(r,n),a={majorUnit:s};!1!==i.roundToMajorUnit&&(r<0&&si(r,s,1/3)&&(r-=s),n>0&&si(n,s,1/3)&&(n+=s));return a.min=ei(r,s),a.max=ii(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:xt(e.min)?Math.min(t.min,e.min):t.min,max:xt(e.max)?Math.max(t.max,e.max):t.max,majorUnit:t.majorUnit}}(e,t),function(t,e){var i,o,r=e;if(e){!function(t,e){for(var i=0;i<e.length;i++){var o=e[i];null===t[o]&&(t[o]=void 0)}}(e,["min","max"]),i=xt(e.min),o=xt(e.max);var n=i||o;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=ei(t.min,e.majorUnit),t.max=ii(t.max,e.majorUnit)):n&&(r=j(t,e),t.majorUnit=Ut(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=j(t,r);s.min>=s.max&&(i&&!o?s.max=s.min+s.majorUnit:!i&&o&&(s.min=s.max-s.majorUnit));return s}(e,t)},e.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return 0},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,i=e.max-e.min;return Math.floor(Mt(i/t,3))+1},e.prototype.getTickPositions=function(t,e){var i=this.options,o=i.vertical,r=i.reverse,n=this.lineBox(),s=t*((o?n.height():n.width())/(i.max-i.min)),a=this.getDivisions(t),p=(o?-1:1)*(r?-1:1),h=[],l=n[(o?x:m)+(1===p?1:2)],c=0;e&&(c=e/t);for(var u=0;u<a;u++)u%c!=0&&h.push(Mt(l,3)),l+=s*p;return h},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o,r,n=this.options,s=n.vertical,a=n.reverse,p=s?x:m,h=this.lineBox(),l=h[p+(a?2:1)],c=(a?-1:1)*((s?h.height():h.width())/(n.max-n.min)),u=new Nt(h.x1,h.y1,h.x1,h.y1),f=t,d=e;return xt(f)||(f=d||0),xt(d)||(d=f||0),i&&(f=Math.max(Math.min(f,n.max),n.min),d=Math.max(Math.min(d,n.max),n.min)),s?(o=n.max-Math.max(f,d),r=n.max-Math.min(f,d)):(o=Math.min(f,d)-n.min,r=Math.max(f,d)-n.min),u[p+1]=oi(l+c*(a?r:o)),u[p+2]=oi(l+c*(a?o:r)),u},e.prototype.getValue=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=Number(e.max),n=Number(e.min),s=i?x:m,a=this.lineBox(),p=a[s+(o?2:1)],h=i?a.height():a.width(),l=(o?-1:1)*(t[s]-p),c=l*((r-n)/h);return l<0||l>h?null:Mt(i?r-c:n+c,10)},e.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,s=this.lineBox(),a=i?s.height():s.width(),p=Mt(t/(a/(r-n)),10);return!i&&!o||i&&o||(p=-p),{min:n+p,max:r+p,offset:p}},e.prototype.scaleRange=function(t){var e=this.options,i=-t*e.majorUnit;return{min:e.min-i,max:e.max+i}},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=Mt(i.min+t*i.majorUnit,10),r=this.axisLabelText(o,null,e);return new ve(o,r,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.zoomRange=function(t){var e=this.totalMin,i=this.totalMax,o=this.scaleRange(t),r=Pt(o.min,e,i),n=Pt(o.max,e,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.isValidRange=function(t,e){return e-t>ri},e}(Ae);function si(t,e,i){var o=Mt(Math.abs(t%e),10);return 0===o||o>e*(1-i)}Vt(ni,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},labels:{format:"#.####################"},zIndex:1});var ai=ni,pi=function(t){function e(e,i,o,r){var n=Me(e),s=Me(i),a=r.intl,p=o||{};p=function(t,e,i){var o=i.min||t,r=i.max||e,n=i.baseUnit||(r&&o?function(t){var e="hours";t>=31536e6?e=ke:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Se);return e}(Ce(r,o)):"hours"),s=Pe[n],a=i.weekStartDay||0,p=je(Le(o)-1,n,a)||Me(r),h=Ie(Le(r)+1,n,a),l=(i.majorUnit?i.majorUnit:void 0)||ii(Ut(p.getTime(),h.getTime()),s)/s,c=De(p,h,n),u=ii(c,l)-c,f=Math.floor(u/2),d=u-f;i.baseUnit||delete i.baseUnit;return i.baseUnit=i.baseUnit||n,i.min=i.min||Oe(p,-f,n,a),i.max=i.max||Oe(h,d,n,a),i.minorUnit=i.minorUnit||l/5,i.majorUnit=l,i}(n,s,p=j(p||{},{min:Ue(a,p.min),max:Ue(a,p.max),axisCrossingValue:He(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:Ge(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var h=p.weekStartDay||0;this.totalMin=Le(je(Le(n)-1,p.baseUnit,h)),this.totalMax=Le(Ie(Le(s)+1,p.baseUnit,h))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.getDivisions=function(t){var e=this.options;return Math.floor(De(e.min,e.max,e.baseUnit)/t+1)},e.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=this.lineBox(),r=(i?-1:1)*(e.reverse?-1:1),n=o[(i?x:m)+(1===r?1:2)],s=this.getDivisions(t),a=Be(e.max,e.min),p=(i?o.height():o.width())/a,h=e.weekStartDay||0,l=[n],c=1;c<s;c++){var u=n+Be(Oe(e.min,c*t,e.baseUnit,h),e.min)*p*r;l.push(Mt(u,3))}return l},e.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},e.prototype.getSlot=function(t,e,i){return ai.prototype.getSlot.call(this,Ue(this.intlService,t),Ue(this.intlService,e),i)},e.prototype.getValue=function(t){var e=ai.prototype.getValue.call(this,t);return null!==e?Me(e):null},e.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},e.prototype.createAxisLabel=function(t,e){var i=this.options,o=t*i.majorUnit,r=i.weekStartDay||0,n=i.min;o>0&&(n=Oe(n,o,i.baseUnit,r));var s=e.dateFormats[i.baseUnit];e.format=e.format||s;var a=this.axisLabelText(n,null,e);return new ve(n,a,t,null,e)},e.prototype.translateRange=function(t,e){var i=this.options,o=i.baseUnit,r=i.weekStartDay||0,n=this.lineBox(),s=i.vertical?n.height():n.width(),a=this.range(),p=s/Be(a.max,a.min),h=Mt(t/p,10)*(i.reverse?-1:1),l=Te(i.min,h),c=Te(i.max,h);return e||(l=Oe(l,0,o,r),c=Oe(c,0,o,r)),{min:l,max:c,offset:h}},e.prototype.scaleRange=function(t){for(var e=this.options,i=e.min,o=e.max,r=Math.abs(t);r--;){var n=Be(i,o),s=Math.round(.1*n);t<0?(i=Te(i,s),o=Te(o,-s)):(i=Te(i,-s),o=Te(o,s))}return{min:i,max:o}},e.prototype.shouldRenderNote=function(t){var e=this.range();return Ve(t,e.min)>=0&&Ve(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),i=this.limitRange(Le(e.min),Le(e.max),this.totalMin,this.totalMax,e.offset);if(i)return{min:Me(i.min),max:Me(i.max)}},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e),r=Math.min(i,o),n=Math.max(i,o);return{min:Me(r),max:Me(n)}},e.prototype.zoomRange=function(t){var e=this.scaleRange(t);return{min:Me(Pt(Le(e.min),this.totalMin,this.totalMax)),max:Me(Pt(Le(e.max),this.totalMin,this.totalMax))}},e}(Ae);Vt(pi,{type:h,majorGridLines:{visible:!0,width:1,color:n},labels:{dateFormats:Xe}});var hi=pi,li=function(t){function e(e,i,o,r){var n=j({majorUnit:10,min:e,max:i},o),s=n.majorUnit,a=function(t,e){var i,o=Mt(ui(t,e),10)%1;i=t<=0?e:0!==o&&(o<.3||o>.9)?Math.pow(e,ui(t,e)+.2):Math.pow(e,Math.ceil(ui(t,e)));return i}(i,s),p=function(t,e,i){var o=i.majorUnit,r=t;t<=0?r=e<=1?Math.pow(o,-2):1:i.narrowRange||(r=Math.pow(o,Math.floor(ui(t,o))));return r}(e,i,n),h=function(t,e,i,o){var r=i.min,n=i.max;xt(i.axisCrossingValue)&&i.axisCrossingValue<=0&&ci();xt(o.max)?o.max<=0&&ci():n=e;xt(o.min)?o.min<=0&&ci():r=t;return{min:r,max:n}}(p,a,n,o);n.max=h.max,n.min=h.min,n.minorUnit=o.minorUnit||Mt(s-1,10),t.call(this,n,r),this.totalMin=xt(o.min)?Math.min(p,o.min):p,this.totalMax=xt(o.max)?Math.max(a,o.max):a,this.logMin=Mt(ui(h.min,s),10),this.logMax=Mt(ui(h.max,s),10),this.seriesMin=e,this.seriesMax=i,this.createLabels()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},e.prototype.startValue=function(){return this.options.min},e.prototype.getSlot=function(t,e,i){var o,r,n=this.options,s=this.logMin,a=this.logMax,p=n.reverse,h=n.vertical,l=n.majorUnit,c=h?x:m,u=this.lineBox(),f=u[c+(p?2:1)],d=(p?-1:1)*((h?u.height():u.width())/(a-s)),g=new Nt(u.x1,u.y1,u.x1,u.y1),y=t,v=e;return xt(y)||(y=v||1),xt(v)||(v=y||1),y<=0||v<=0?null:(i&&(y=Math.max(Math.min(y,n.max),n.min),v=Math.max(Math.min(v,n.max),n.min)),y=ui(y,l),v=ui(v,l),h?(o=a-Math.max(y,v),r=a-Math.min(y,v)):(o=Math.min(y,v)-s,r=Math.max(y,v)-s),g[c+1]=oi(f+d*(p?r:o)),g[c+2]=oi(f+d*(p?o:r)),g)},e.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n===r?1:-1,h=1===p?1:2,l=n?a.height():a.width(),c=(o-i)/l,u=n?x:m,f=a[u+h],d=p*(t[u]-f);if(d<0||d>l)return null;var g=i+d*c;return Mt(Math.pow(s,g),10)},e.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},e.prototype.scaleRange=function(t){var e=this.options.majorUnit,i=-t;return{min:Math.pow(e,this.logMin-i),max:Math.pow(e,this.logMax+i)}},e.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n?a.height():a.width(),h=Mt(t/(p/(o-i)),10);return!n&&!r||n&&r||(h=-h),{min:Math.pow(s,i+h),max:Math.pow(s,o+h),offset:h}},e.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},e.prototype.getMajorTickPositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),{step:1,skip:0}),t},e.prototype.createTicks=function(t){var e=this.options,i=e.majorTicks,o=e.minorTicks,r=e.vertical,n=e.labels.mirror,s=this.lineBox(),a={vertical:r};function p(e,i){a.tickX=n?s.x2:s.x2-i.size,a.tickY=n?s.y1-i.size:s.y1,a.position=e,t.append(be(a,i))}return i.visible&&this.traverseMajorTicksPositions(p,i),o.visible&&this.traverseMinorTicksPositions(p,o),[]},e.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.vertical,n=t.lineBox(),s={lineStart:n[r?"x1":"y1"],lineEnd:n[r?"x2":"y2"],vertical:r},a=[],p=this.gridLinesVisual();function h(t,e){lt(t,a)||(s.position=t,p.append(_e(s,e)),a.push(t))}return o.visible&&this.traverseMajorTicksPositions(h,o),i.visible&&this.traverseMinorTicksPositions(h,i),p.children},e.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this._lineOptions(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step){t(Mt(o+r*(a-n),10),e)}},e.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,a=this._lineOptions(),p=a.lineStart,h=a.step,l=this.logMin,c=this.logMax,u=Math.floor(l);u<c;u++)for(var f=this._minorIntervalOptions(u),d=e.skip;d<n;d+=e.step){var g=f.value+d*f.minorStep;if(g>r)break;if(g>=o)t(Mt(p+h*(ui(g,s)-l),10),e)}},e.prototype.createAxisLabel=function(t,e){var i=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,i),r=this.axisLabelText(o,null,e);return new ve(o,r,t,null,e)},e.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},e.prototype.pan=function(t){var e=this.translateRange(t);return this.limitRange(e.min,e.max,this.totalMin,this.totalMax,e.offset)},e.prototype.pointsRange=function(t,e){var i=this.getValue(t),o=this.getValue(e);return{min:Math.min(i,o),max:Math.max(i,o)}},e.prototype.zoomRange=function(t){var e=this.options,i=this.totalMin,o=this.totalMax,r=this.scaleRange(t),n=Pt(r.min,i,o),s=Pt(r.max,i,o),a=e.majorUnit,p=s>n&&e.min&&e.max&&Mt(ui(e.max,a)-ui(e.min,a),10)<1,h=!(e.min===i&&e.max===o)&&Mt(ui(s,a)-ui(n,a),10)>=1;if(p||h)return{min:n,max:s}},e.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,r=Math.pow(o,t);return{value:r,minorStep:(Math.pow(o,t+1)-r)/i}},e.prototype._lineOptions=function(){var t=this.options,e=t.reverse,i=t.vertical,o=i?x:m,r=this.lineBox(),n=i===e?1:-1,s=1===n?1:2;return{step:n*((i?r.height():r.width())/(this.logMax-this.logMin)),lineStart:r[o+s],lineBox:r}},e}(Ae);function ci(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function ui(t,e){return Math.log(t)/Math.log(e)}Vt(li,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:n},zIndex:1,_deferLabels:!0});var fi=li,di={createGridLines:function(t){var e,i,o=this.options,r=Math.abs(this.box.center().y-t.lineBox().y1),n=[],s=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),s=!0,n=this.renderMajorGridLines(e,r,o.majorGridLines)),o.minorGridLines.visible&&(i=this.minorGridLineAngles(t,s),vt(n,this.renderMinorGridLines(i,r,o.minorGridLines,t,s))),n},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){var n=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,n)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=this.box.center(),s=new S.geometry.Circle([n.x,n.y],e),a=this.gridLinesVisual(),p=0;p<t.length;p++){var h=new S.drawing.Path(r);o&&(s.radius=o(t[p])),h.moveTo(s.center).lineTo(s.pointAt(t[p]+180)),a.append(h)}return a.children},gridLineAngles:function(t,e,i,o,r){var n=this,s=this.intervals(e,i,o,r),a=t.options,p=a.visible&&!1!==(a.line||{}).visible;return dt(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.range=function(){return{min:0,max:this.options.categories.length}},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.lineBox=function(){return this.box},e.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new Nt,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options,n=r.categories.length/t||1,s=360/n,a=i||1,p=[],h=0,l=e||0;l<n;l+=a)h=r.reverse?360-l*s:l*s,h=Mt(h,3)%360,o&<(h,o)||p.push(h);return p},e.prototype.majorIntervals=function(){return this.intervals(1)},e.prototype.minorIntervals=function(){return this.intervals(.5)},e.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},e.prototype.majorAngles=function(){var t=this;return dt(this.majorIntervals(),(function(e){return t.intervalAngle(e)}))},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(1,r.skip,r.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,n)},e.prototype.radiusCallback=function(t,e,i){if(e.options.type!==r){var o=Tt(360/(2*this.options.categories.length)),n=Math.cos(o)*t,s=this.majorAngles(),a=function(e){return!i&<(e,s)?t:n};return a}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from);r.startAngle+=s*n.angle;var a=Math.ceil(o.to)-o.to;r.angle-=(a+s)*n.angle;var p=Zt.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(p)}this.appendVisual(e)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},e.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,p=t;i.reverse&&!o&&(p=(p+1)%s);var h=n[p=Pt(Math.floor(p),0,s-1)];o&&(h-=a/2)<0&&(h+=360);var l=a*(Pt(Math.ceil(e||p),p,s-1)-p+1);return new Xt(r.center(),0,r.height()/2,h,l)},e.prototype.slot=function(t,e){var i=this.getSlot(t,e),o=i.startAngle+180,r=o+i.angle;return new S.geometry.Arc([i.center.x,i.center.y],{startAngle:o,endAngle:r,radiusX:i.radius,radiusY:i.radius})},e.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++){if(this.getSlot(o).containsPoint(t)){i=o;break}}return i},e}(qe);Vt(gi,{startAngle:90,labels:{margin:E(10)},majorGridLines:{visible:!0},justified:!0}),j(gi.prototype,di);var yi=gi,vi=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.minorUnit=o.minorUnit||o.majorUnit/2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDivisions=function(t){return ai.prototype.getDivisions.call(this,t)-1},e.prototype.reflow=function(t){this.box=t,this.reflowLabels()},e.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,r=i.step||1,n=new Nt,s=this.intervals(t.majorUnit,o,r),a=0;a<e.length;a++){e[a].reflow(n);var p=e[a].box;e[a].reflow(this.getSlot(s[a]).adjacentBox(0,p.width(),p.height()))}},e.prototype.lineBox=function(){return this.box},e.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;o&<(h,o)||s.push(h)}return s},e.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},e.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},e.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},e.prototype.createLine=function(){return[]},e.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},e.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,n=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,n)},e.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},e.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,n=Pt(t,i.min,i.max),s=Pt(e||n,n,i.max);if(i.reverse&&(n*=-1,s*=-1),(s=(540-s-r)%360)<(n=(540-n-r)%360)){var a=n;n=s,s=a}return new Xt(o.center(),0,o.height()/2,n,s-n)},e.prototype.slot=function(t,e){void 0===e&&(e=t);var i,o,r=this.options,n=360-r.startAngle,s=this.getSlot(t,e),a=Math.min(t,e),p=Math.max(t,e);return r.reverse?(i=a,o=p):(i=360-p,o=360-a),i=(i+n)%360,o=(o+n)%360,new S.geometry.Arc([s.center.x,s.center.y],{startAngle:i,endAngle:o,radiusX:s.radius,radiusY:s.radius})},e.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,r=t.y-i.y,n=Math.round(bt(Math.atan2(r,o))),s=e.startAngle;return e.reverse||(n*=-1,s*=-1),(n+s+360)%360},e.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e}(Ae);Vt(vi,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:E(10)},majorGridLines:{color:n,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),j(vi.prototype,di,{createPlotBands:yi.prototype.createPlotBands,majorAngles:yi.prototype.majorAngles,range:ai.prototype.range,labelsCount:ai.prototype.labelsCount,createAxisLabel:ai.prototype.createAxisLabel});var mi=vi;function xi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var bi={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var o=this.plotArea.polarAxis,n=o.majorAngles(),s=o.box.center(),a=this._plotbandGroup=new S.drawing.Group({zIndex:-1}),p=0;p<i.length;p++){var h=i[p],l={fill:{color:h.color,opacity:h.opacity},stroke:{opacity:h.opacity}},c=this.getSlot(h.from,h.to,!0),u=new Xt(s,s.y-c.y2,s.y-c.y1,0,360),f=void 0;f=e===r?Zt.current.createRing(u,l):S.drawing.Path.fromPoints(this.plotBandPoints(u,n),l).close(),a.append(f)}this.appendVisual(a)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new S.geometry.Circle(r,t.innerRadius),s=new S.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),n=[];if(e.majorGridLines.visible&&(n=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible){var s=this.radarMinorGridLinePositions();vt(n,this.renderGridLines(r,s,o,e.minorGridLines))}return n},renderGridLines:function(t,e,i,o){var n={stroke:{width:o.width,color:o.color,dashType:o.dashType}},s=o.skip;void 0===s&&(s=0);var a=o.step;void 0===a&&(a=0);for(var p=this.gridLinesVisual(),h=s;h<e.length;h+=a){var l=t.y-e[h];if(l>0){var c=new S.geometry.Circle([t.x,t.y],l);if(o.type===r)p.append(new S.drawing.Circle(c,n));else{for(var u=new S.drawing.Path(n),f=0;f<i.length;f++)u.lineTo(c.pointAt(i[f]+180));u.close(),p.append(u)}}}return p.children},getValue:function(t){var e=this.lineBox(),i=this.plotArea.polarAxis,o=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;if(this.options.majorGridLines.type!==r&&o.length>1){var p=t.x-n.x,h=t.y-n.y,l=(bt(Math.atan2(h,p))+540)%360;o.sort((function(t,e){return xi(t,l)-xi(e,l)}));var c=90-xi(o[0],o[1])/2,u=180-xi(l,o[0])-c;a=s*(Math.sin(Tt(u))/Math.sin(Tt(c)))}return this.axisType().prototype.getValue.call(this,new Ht(e.x1,e.y2-a))}},_i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},e.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},e.prototype.axisType=function(){return t},e}(ai);j(_i.prototype,bi);var wi=_i,Ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radarMajorGridLinePositions=function(){var t=[];return this.traverseMajorTicksPositions((function(e){t.push(e)}),this.options.majorGridLines),t},e.prototype.radarMinorGridLinePositions=function(){var t=[];return this.traverseMinorTicksPositions((function(e){t.push(e)}),this.options.minorGridLines),t},e.prototype.axisType=function(){return t},e}(fi);j(Ai.prototype,bi);var Si=Ai;function ki(t){return t<=0?-1:1}var Pi=function(t){function e(e){t.call(this),this.closed=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(r>2&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s,a=e[0],p=e[1],h=e[2];for(i.push(new S.geometry.Segment(a));a.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){var l=this.tangent(a,p,m,x);return kt(i).controlOut(this.firstControlPoint(l,a,p,m,x)),i.push(new S.geometry.Segment(p,this.secondControlPoint(l,a,p,m,x))),i}if(o){a=e[r-1],p=e[0],h=e[1];var c=this.controlPoints(a,p,h);n=c[1],s=c[0]}else{var u=this.tangent(a,p,m,x);n=this.firstControlPoint(u,a,p,m,x)}for(var f=n,d=0;d<=r-3;d++)if(this.removeDuplicates(d,e),d+3<=(r=e.length)){a=e[d],p=e[d+1],h=e[d+2];var g=this.controlPoints(a,p,h);kt(i).controlOut(f),f=g[1];var y=g[0];i.push(new S.geometry.Segment(p,y))}if(o){a=e[r-2],p=e[r-1],h=e[0];var v=this.controlPoints(a,p,h);kt(i).controlOut(f),i.push(new S.geometry.Segment(p,v[0])),kt(i).controlOut(v[1]),i.push(new S.geometry.Segment(h,s))}else{var b=this.tangent(p,h,m,x);kt(i).controlOut(f),i.push(new S.geometry.Segment(h,this.secondControlPoint(b,p,h,m,x)))}return i},e.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},e.prototype.invertAxis=function(t,e,i){var o=!1;if(t.x===e.x)o=!0;else if(e.x===i.x)(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(o=!0);else{var r=this.lineFunction(t,e),n=this.calculateFunction(r,i.x);t.y<=e.y&&i.y<=n||e.y<=t.y&&i.y>=n||(o=!0)}return o},e.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),r=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||Mt(r,1)===Mt(i.y,1)},e.prototype.lineFunction=function(t,e){var i=(e.y-t.y)/(e.x-t.x);return[t.y-i*t.x,i]},e.prototype.controlPoints=function(t,e,i){var o,r=m,n=x,s=!1,a=!1;if(this.isLine(t,e,i))o=this.tangent(t,e,m,x);else{var p={x:this.isMonotonicByField(t,e,i,m),y:this.isMonotonicByField(t,e,i,x)};if(p.x&&p.y)o=this.tangent(t,i,m,x),s=!0;else if(this.invertAxis(t,e,i)&&(r=x,n=m),p[r])o=0;else o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?ki((i[n]-t[n])*(e[r]-t[r])):-ki((i[r]-t[r])*(e[n]-t[n]))),a=!0}var h=this.secondControlPoint(o,t,e,r,n);if(a){var l=r;r=n,n=l}var c=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,c,o)),[h,c]},e.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},e.prototype.tangent=function(t,e,i,o){var r,n=e[i]-t[i],s=e[o]-t[o];return r=0===n?0:s/n,r},e.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},e.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],s=.333*(i[o]-n);return this.point(n+s,e[r]+s*t,o,r)},e.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],s=i[o],a=.333*(s-n);return this.point(s-a,i[r]-a*t,o,r)},e.prototype.point=function(t,e,i,o){var r=new S.geometry.Point;return r[i]=t,r[o]=e,r},e.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o},e}(S.Class),Ci=function(t){function e(e){t.call(this),this._axis=e,this.options=e.options}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this._axis,i=e.getCategory?e.getCategory(t):e.getValue(t);return i},e.prototype.slot=function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},e.prototype.range=function(){return this._axis.range()},e.prototype.valueRange=function(){return this._axis.valueRange()},e}(S.Class);function Ti(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Ci(e[i])}var Mi=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};Mi.prototype.findAxisByName=function(t){return Ti(t,this._pane.axes)};var Ri=Mi,Oi=function(t){function e(e){t.call(this),this._plotArea=e,this.visual=e.visual,this.backgroundVisual=e._bgVisual}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(S.Class);function ji(t){for(var e=t.length,i=0,o=0;o<e;o++){C(t[o])&&i++}return i}var Ii={min:function(t){for(var e=t.length,i=u,o=0;o<e;o++){var r=t[o];C(r)&&(i=Math.min(i,r))}return i===u?t[0]:i},max:function(t){for(var e=t.length,i=f,o=0;o<e;o++){var r=t[o];C(r)&&(i=Math.max(i,r))}return i===f?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];C(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return ji(t)&&(e=Ii.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&xt(r)&&i++}return i},avg:function(t){var e=ji(t),i=t[0];return e>0&&(i=Ii.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&xt(o))return o}return t[0]}},Vi=Ii;function Bi(t,e){return null===e?e:nt(t)(e)}var Li=function(t){function e(){t.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e,i){void 0===e&&(e=[y]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},e.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},e.prototype.valueFields=function(t){return this._valueFields[t.type]||[y]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[y]},e.prototype.bindPoint=function(t,e,i){var o,r,n=t.data,s=xt(i)?i:n[e],a={valueFields:{value:s}},p=this.valueFields(t),h=this._otherFields[t.type];if(null===s)r=this._nullValue[t.type];else if(xt(s)){if(Array.isArray(s)){var l=s.slice(p.length);r=this._bindFromArray(s,p),o=this._bindFromArray(l,h)}else if("object"==typeof s){var c=this.sourceFields(t,p),u=this.sourceFields(t,h);r=this._bindFromObject(s,p,c),o=this._bindFromObject(s,h,u)}}else r=this._undefinedValue[t.type];return xt(r)&&(1===p.length?a.valueFields.value=r[p[0]]:a.valueFields=r),a.fields=o||{},a},e.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++){i[t[r]]=e}return i},e.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},e.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=Bi(a,t))}return o},e.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===y?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},e}(S.Class);Li.current=new Li;var zi=Li,Ei=/percent(?:\w*)\((\d+)\)/,Fi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Di=function(t){function e(e,i,o){t.call(this),this.initGlobalRanges(e,i,o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initGlobalRanges=function(t,e,i){var o=e.data,r=Fi.exec(t);if(r){this.valueGetter=this.createValueGetter(e,i);var n=this.getAverage(o),s=this.getStandardDeviation(o,n,!1),a=r[1]?parseFloat(r[1]):1,p={low:n.value-s*a,high:n.value+s*a};this.globalRange=function(){return p}}else if(t.indexOf&&t.indexOf("stderr")>=0){this.valueGetter=this.createValueGetter(e,i);var h=this.getStandardError(o,this.getAverage(o));this.globalRange=function(t){return{low:t-h,high:t+h}}}},e.prototype.createValueGetter=function(t,e){var i,o=t.data,r=zi.current,n=r.valueFields(t),s=xt(o[0])?o[0]:{};if(b(s))i=nt("["+(e?n.indexOf(e):0)+"]");else if(C(s))i=nt();else if("object"==typeof s){i=nt(r.sourceFields(t,n)[n.indexOf(e)])}return i},e.prototype.getErrorRange=function(t,e){var i,o,r;if(!xt(e))return null;if(this.globalRange)return this.globalRange(t);if(b(e))i=t-e[0],o=t+e[1];else if(C(r=parseFloat(e)))i=t-r,o=t+r;else{if(!(r=Ei.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var n=t*(parseFloat(r[1])/100);i=t-Math.abs(n),o=t+Math.abs(n)}return{low:i,high:o}},e.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},e.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,r=i?e.count-1:e.count,n=0,s=0;s<o;s++){var a=this.valueGetter(t[s]);C(a)&&(n+=Math.pow(a-e.value,2))}return Math.sqrt(n/r)},e.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);C(n)&&(i+=n,o++)}return{value:i/o,count:o}},e}(S.Class),Ui=S.support.browser||{},Hi=Ui.msie?.001:0,Gi="zero",Ni="bar",qi="column",Xi="line",Yi="pie",Wi="verticalLine",Zi=[Ni,qi,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],Ki="DOMMouseScroll mousewheel",$i=function(t){function e(e,i,o,r,n,s){t.call(this,s),this.low=e,this.high=i,this.isVertical=o,this.chart=r,this.series=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,o),a=o?n.x:n.y,p=a-s,h=a+s;o?(e=[new Ht(n.x,r.y1),new Ht(n.x,r.y2)],i&&e.push(new Ht(p,r.y1),new Ht(h,r.y1),new Ht(p,r.y2),new Ht(h,r.y2)),this.box=new Nt(p,r.y1,h,r.y2)):(e=[new Ht(r.x1,n.y),new Ht(r.x2,n.y)],i&&e.push(new Ht(r.x1,p),new Ht(r.x1,h),new Ht(r.x2,p),new Ht(r.x2,h)),this.box=new Nt(r.x1,p,r.x2,h)),this.linePoints=e},e.prototype.getCapsWidth=function(t,e){var i=e?t.width():t.height();return Math.min(Math.floor(i/2),4)||4},e.prototype.createVisual=function(){var t=this,e=this.options,i=e.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},e.prototype.createDefaultVisual=function(){var e=this.options,i=this.linePoints,o={stroke:{color:e.color,width:e.line.width,dashType:e.line.dashType}};t.prototype.createVisual.call(this);for(var r=0;r<i.length;r+=2){var n=new S.drawing.Path(o).moveTo(i[r].x,i[r].y).lineTo(i[r+1].x,i[r+1].y);k(n),this.visual.append(n)}},e}($t);Vt($i,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Ji=$i,Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},e}(Ji);function to(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!1);var r=i.defaults=i.defaults||{},n=i.depth=i.depth||0,s=!1;if(i.excluded=i.excluded||[],n>5)return null;for(var a in t)if(!lt(a,i.excluded)&&t.hasOwnProperty(a)){var p=t[a];R(p)?(s=!0,o||(t[a]=Ot(p(e),r[a]))):I(p)&&(o||(i.defaults=r[a]),i.depth++,s=to(p,e,i,o)||s,i.depth--)}return s}function eo(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var io=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.categoryAxis=e.seriesCategoryAxis(i.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=j({},o,{vertical:!this.options.invertAxes},t)}return i},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&C(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s=i[n];if(s){var a=t.series.stack,p=s.series.stack;if(a&&p&&a.group!==p.group)continue;C(s.value)&&(r+=Math.abs(s.value),o.push(Math.abs(s.value)))}}if(r>0)return t.value/r}return t.value},e.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var o=this.plotValue(t),r=o>=0,n=e,s=!1,a=0;a<i.length;a++){var p=i[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if("string"==typeof h&&h!==l)continue;if(h.group&&h.group!==l.group)continue}var c=this.plotValue(p);(c>=0&&r||c<0&&!r)&&(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=t.series,f=this.seriesValueAxis(u),d=this.categoryAxisCrossingValue(f);return[d,M(t.value)?t.value:d]},e.prototype.stackLimits=function(t,e){for(var i=u,o=f,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];if(a&&(a.series.stack===e||a.series.axis===t)){var p=this.plotRange(a,0)[1];xt(p)&&isFinite(p)&&(o=Math.max(o,p),i=Math.min(i,p))}}}return{min:i,max:o}},e.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,p=o[a];if(!p){p=this.stackLimits(s,n.stack);var h=this.errorTotals;h&&(h.negative.length&&(p.min=Math.min(p.min,Bt(h.negative).min)),h.positive.length&&(p.max=Math.max(p.max,Bt(h.positive).max))),p.min!==u||p.max!==f?o[a]=p:p=null}p&&(this.valueAxisRanges[s]=p)}},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,h=e.fields.errorHigh;C(p)&&C(h)?o={low:p,high:h}:a&&xt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Di(a.value,n,y),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},e.prototype.addPointErrorBar=function(t,e){var i=!this.options.invertAxes,o=t.options.errorBars,r=t.series,n=t.low,s=t.high;if(this.options.isStacked){var a=this.stackedErrorRange(t,e);n=a.low,s=a.high}else{var p={categoryIx:e,series:r};this.updateRange({value:n},p),this.updateRange({value:s},p)}var h=new Qi(n,s,i,this,r,o);t.errorBars=[h],t.append(h)},e.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,r=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),r>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,r)),{low:o,high:r}},e.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i];n||(this.categoryPoints[i]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);var a=this.createPoint(t,e);a&&(Object.assign(a,e),a.owner=this,a.noteText=t.fields.noteText,xt(a.dataItem)||(a.dataItem=o.data[i]),this.addErrorBar(a,t,i)),this.points.push(a),s.push(a),n.push(a),this.updateRange(t.valueFields,e)},e.prototype.evalPointOptions=function(t,e,i,o,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];xt(a)||(this._evalSeries[n]=a=to(t,{},s,!0));var p=t;return a&&to(p=j({},p),{value:e,category:i,index:o,series:r,dataItem:r.data[o]},s),p},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.value,r=this.valueAxisRanges[i];isFinite(o)&&null!==o&&((r=this.valueAxisRanges[i]=r||{min:u,max:f}).min=Math.min(r.min,o),r.max=Math.max(r.max,o))},e.prototype.seriesValueAxis=function(t){var e=this.plotArea,i=t.axis,o=i?e.namedValueAxes[i]:e.valueAxis;if(!o)throw new Error("Unable to locate value axis with name "+i);return o},e.prototype.reflow=function(t){var e=this,i=this.categorySlots=[],o=this.points,r=this.categoryAxis,n=0;this.traverseDataPoints((function(t,s){var a=s.categoryIx,p=s.series,h=e.seriesValueAxis(p),l=o[n++],c=i[a];if(c||(i[a]=c=e.categorySlot(r,a,h)),l){var u=e.plotRange(l,h.startValue()),f=e.valueSlot(h,u);if(f){var d=e.pointSlot(c,f);l.aboveAxis=e.aboveAxis(l,h),l.stackValue=u[1],e.options.isStacked100&&(l.percentage=e.plotValue(l)),e.reflowPoint(l,d)}else l.visible=!1}})),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},e.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},e.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(kt(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},e.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},e.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),o=t.value;return e.options.reverse?o<i:o>=i},e.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,i=t.options;return[].concat(i.axisCrossingValues||i.axisCrossingValue)[e.axisIndex||0]||0},e.prototype.reflowPoint=function(t,e){t.reflow(e)},e.prototype.reflowCategories=function(){},e.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,r=i?t:e;return new Nt(o.x1,r.y1,o.x2,r.y2)},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=eo(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},e.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];if(r){var n=r.categoryIx;o(this._bindPoint(t,i,n,r.item),{category:r.category,categoryIx:n,series:t,seriesIx:i,dataItem:r.item})}},e.prototype._bindPoint=function(t,e,i,o){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];r||(r=this._bindCache[e]=[]);var n=r[i];return n||(n=r[i]=zi.current.bindPoint(t,i,o)),n},e.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},e.prototype.pointValue=function(t){return t.valueFields.value},e}($t);Vt(io,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var oo=io,ro={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:At(t),originalEvent:t,point:this}}},no={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&xt(e)&&null!==e&&(this.note=new xe({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},so=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Ot(this.options.aboveAxis,!0),this.tooltipTracking=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options,e=t.markers,i=t.labels;if(!this._rendered){if(this._rendered=!0,e.visible&&e.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible){var o=it(i),r=this.pointData(),n=this.value;o?n=o(r):i.format&&(n=this.formatValue(i.format)),this.label=new fe(n,j({align:a,vAlign:a,margin:{left:5,right:5},zIndex:Ot(i.zIndex,this.series.zIndex)},i),r),this.append(this.label)}this.createNote(),this.errorBar&&this.append(this.errorBar)}},e.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,i=j({color:this.color},t.border);return xt(i.color)||(i.color=new S.Color(e).brightness(.8).toHex()),i},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new ee({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Ot(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},e.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},e.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render(),this.box=t;var r=t.clone();if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);if(this.note){var s=this.markerBox();if(!e.markers.visible||!e.markers.size){var a=s.center();s=new Nt(a.x,a.y,a.x,a.y)}this.note.reflow(s)}},e.prototype.reflowLabel=function(t){var e=this.options,i=this.label,o=e.labels.position;i&&(o="below"===(o="above"===o?g:o)?s:o,i.reflow(t),i.box.alignTo(this.markerBox(),o),i.reflow(i.box))},e.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),r=new ee({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Ot(t.border.opacity,1)},opacity:Ot(t.opacity,1)});return r.reflow(this._childBox),r.getElement()},e.prototype.highlightVisual=function(){return(this.marker||{}).visual},e.prototype.highlightVisualArgs=function(){var t,e,i=this.marker;if(i)e=i.paddingBox.toRect(),t=i.visual;else{var o=this.options.markers.size,r=o/2,n=this.box.center();e=new S.geometry.Rect([n.x-r,n.y-r],[o,o])}return{options:this.options,rect:e,visual:t}},e.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o,r=t.x2+5;return this.aboveAxis?(i=t.y1,o=s):(i=t.y2,o=g),{point:new Ht(r,i),align:{horizontal:"left",vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},e.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},e}($t);so.prototype.defaults={vertical:!0,markers:{visible:!0,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:E(3),padding:E(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},j(so.prototype,ro),j(so.prototype,no);var ao=so,po=function(t){function e(e,i,o){t.call(this),this.linePoints=e,this.series=i,this.seriesIx=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.toGeometryPoints(this.linePoints)},e.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},e.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!xt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},e.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;R(i)&&o&&(i=o.color);var r=S.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&r.close(),this.visual=r},e.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e}($t);Vt(po,{closed:!1});var ho=po;function lo(t,e,i,o,r){var n=t.box,s=new S.geometry.Point;return s[e]=n[e+i],s[o]=n[o+r],s}var co={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,r=e.reverse,n=o?m:x,s=o?x:m,a=r?2:1,p=a,h=lo(t[0],n,a,s,p),l=[h],c=1;c<t.length;c++){var u=lo(t[c],n,a,s,p);if(h[n]!==u[n]){var f=new S.geometry.Point;f[n]=h[n],f[s]=u[s],l.push(f,u)}h=u}return i?h!==kt(l)&&l.push(h):l.push(lo(kt(t),n,a,s,r?1:2)),l}},uo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.points=function(){return this.calculateStepPoints(this.linePoints)},e}(ho);j(uo.prototype,co);var fo=uo,go=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;R(i)&&e&&(i=e.color);var o=new Pi(this.options.closed).process(this.points()),r=new S.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});r.segments.push.apply(r.segments,o),this.visual=r},e}(ho),yo={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):"interpolate"!==this.seriesMissingValues(s)&&(h.length>1&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}h.length>1&&(t=this.createSegment(h,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){var e=t.missingValues;return!e&&this.options.isStacked?Gi:e||"interpolate"},getNearestPoint:function(t,e,i){for(var o,r=new Ht(t,e),n=this.seriesPoints[i],s=u,a=0;a<n.length;a++){var p=n[a];if(p&&xt(p.value)&&null!==p.value&&!1!==p.visible){var h=p.box.center().distanceTo(r);h<s&&(o=p,s=h)}}return o}},vo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._setEnd(this.options.box.x1)},e.prototype.step=function(t){var e=this.options.box;this._setEnd(ct(e.x1,e.x2,t))},e.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),r=i[2].anchor();e.suspend(),o.setX(t),e.resume(),r.setX(t)},e}(S.drawing.Animation);Vt(vo,{duration:600}),S.drawing.AnimationFactory.current.register("clip",vo);var mo=vo;function xo(t){for(var e=0;e<t.length;e++)if(xt(t[e].zIndex))return!0}var bo={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),i=S.drawing.Path.fromRect(e.toRect());this.visual.clip(i),this.animation=new mo(i,{box:e}),xo(this.options.series)&&this._setChildrenAnimation(i)}},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&xt(o.visual.options.zIndex)&&o.visual.clip(t)}}},_o=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return ao},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),a=t.valueFields.value;if(!xt(a)||null===a){if(s!==Gi)return null;a=0}var p=this.pointOptions(r,n);p=this.evalPointOptions(p,a,o,i,r,n);var h=t.fields.color||r.color;R(r.color)&&(h=p.color);var l=new ao(a,p);return l.color=h,this.append(l),l},e.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},e.prototype.createSegment=function(t,e,i){var o=e.style;return new("step"===o?fo:"smooth"===o?go:ho)(t,e,i)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},e}(oo);j(_o.prototype,yo,bo);var wo=_o,Ao=function(t){function e(e,i,o,r,n){t.call(this,e,i,o),this.prevSegment=r,this.stackPoints=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;R(o)&&e&&(o=e.color),this.visual=new S.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),i.width>0&&!1!==i.visible&&this.createStroke({stroke:j({color:o,opacity:t.opacity,lineCap:"butt"},i)})},e.prototype.strokeSegments=function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},e.prototype.stackSegments=function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},e.prototype.segmentsFromPoints=function(t){return t.map((function(t){return new S.geometry.Segment(t)}))},e.prototype.createStroke=function(t){var e=new S.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},e.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},e.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment();if(o){var r=this.stackSegments();vt(i,r)}var n=new S.drawing.Path(t);n.segments.push.apply(n.segments,i),!o&&e.length>1&&this.fillToAxes(n),this.visual.append(n)},e.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),n=o.getSlot(r,r,!0),s=this.strokeSegments(),a=s[0].anchor(),p=kt(s).anchor(),h=i?n.x1:n.y1;i?t.lineTo(h,p.y).lineTo(h,a.y):t.lineTo(p.x,h).lineTo(a.x,h)},e}(ho),So=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},e.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},e}(Ao);j(So.prototype,co);var ko=So,Po=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){var t=new Pi(this.options.closed),e=this.points();return t.process(e)},e.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;i>=0;i--){var o=t[i];e.push(new S.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},e}(Ao),Co=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;s&&i>0&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a));return new("step"===a?ko:"smooth"===a?Po:Ao)(t,e,i,r,n)},e.prototype.reflow=function(e){t.prototype.reflow.call(this,e);var i=this._stackPoints;if(i)for(var o=0;o<i.length;o++){var r=i[o],n=this.categoryAxis.getSlot(r.categoryIx);r.reflow(n)}},e.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,n=t.length;r<0&&(r=0,n--);var s=r+n,a=this.seriesOptions[0]._outOfRangeMinPoint?1:0,p=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<s;h++){var l=h+a,c=e,u=void 0;do{u=o[--c][l]}while(c>0&&!u);if(u)"step"!==i&&h>r&&!o[c][l-1]&&p.push(this._previousSegmentPoint(h,l,l-1,c)),p.push(u),"step"!==i&&h+1<s&&!o[c][l+1]&&p.push(this._previousSegmentPoint(h,l,l+1,c));else{var f=this._createGapStackPoint(h);this._stackPoints.push(f),p.push(f)}}return p},e.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;s>0&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},e.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),i=new ao(0,e);return i.categoryIx=t,i.series={},i},e.prototype.seriesMissingValues=function(t){return t.missingValues||Gi},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(wo),To=function(t){function e(){t.call(this),this.axisRanges={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(t){var e=this.axisRanges;for(var i in t){var o=t[i],r=e[i];e[i]=r=r||{min:u,max:f},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},e.prototype.reset=function(t){this.axisRanges[t]=void 0},e.prototype.query=function(t){return this.axisRanges[t]},e}(S.Class),Mo=function(t){function e(e,i,o){t.call(this,i),this.textBox=new fe(e,this.options,o),this.append(this.textBox)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,p=r.box,h=r.options.padding,l=t;n.align=i?a:c,n.vAlign=i?g:a,"insideEnd"===e.position?i?(n.vAlign=g,!o&&p.height()<t.height()&&(n.vAlign=s)):n.align=o?d:c:e.position===a?(n.vAlign=a,n.align=a):"insideBase"===e.position?i?n.vAlign=o?s:g:n.align=o?c:d:"outsideEnd"===e.position&&(i?l=o?new Nt(t.x1,t.y1-p.height(),t.x2,t.y1):new Nt(t.x1,t.y2,t.x2,t.y2+p.height()):(n.align=a,l=o?new Nt(t.x2,t.y1,t.x2+p.width(),t.y2):new Nt(t.x1-p.width(),t.y1,t.x1,t.y2))),e.rotation||(i?h.left=h.right=(l.width()-r.contentBox.width())/2:h.top=h.bottom=(l.height()-r.contentBox.height())/2),r.reflow(l)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?x:m,i=e+"1",o=e+"2",r=this.children[0],n=this.parent.box;if(n[i]<t[i]||t[o]<n[o]){var s=r.paddingBox.clone();s[i]=Math.max(n[i],t[i]),s[o]=Math.min(n[o],t[o]),this.reflow(s)}},e}($t);Vt(Mo,{position:"outsideEnd",margin:E(3),padding:E(4),color:n,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var Ro=Mo;function Oo(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var jo=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||v,this.aboveAxis=Ot(this.options.aboveAxis,!0),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},e.prototype.createLabel=function(){var t=this.options,e=t.labels;if(e.visible){var i,o=this.pointData(),r=it(e);i=r?r(o):this.formatValue(e.format),this.label=new Ro(i,j({vertical:t.vertical},e),o),this.append(this.label)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},e.prototype.createVisual=function(){var e=this,i=this.box,o=this.options,r=o.visual;if(!1!==this.visible)if(t.prototype.createVisual.call(this),r){var n=this.rectVisual=r({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:i.toRect(),createVisual:function(){var t=new S.drawing.Group;return e.createRect(t),t},options:o});n&&this.visual.append(n)}else i.width()>0&&i.height()>0&&this.createRect(this.visual)},e.prototype.createRect=function(t){var e=this.options,i=e.border,o=xt(i.opacity)?i.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=S.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),s=this.box.width(),a=this.box.height();if((e.vertical?s:a)>6&&(k(n),(s<1||a<1)&&(n.options.stroke.lineJoin="round")),t.append(n),Oo(e)){var p=this.createGradientOverlay(n,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay));t.append(p)}},e.prototype.createHighlight=function(t){return k(S.drawing.Path.fromRect(this.box.toRect(),t))},e.prototype.highlightVisual=function(){return this.rectVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},e.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,o=e.color;return xt(o)||(o=new S.Color(t).brightness(i).toHex()),o},e.prototype.tooltipAnchor=function(){var t,e,i=this.options,o=this.box,r=this.aboveAxis,n=this.owner.pane.clipBox()||o,a=c,p=g;if(i.vertical)t=Math.min(o.x2,n.x2)+5,r?e=Math.max(o.y1,n.y1):(e=Math.min(o.y2,n.y2),p=s);else{var h=Math.max(o.x1,n.x1),l=Math.min(o.x2,n.x2);i.isStacked?(p=s,r?(a=d,t=l):t=h,e=Math.max(o.y1,n.y1)-5):(r?t=l+5:(t=h-5,a=d),e=Math.max(o.y1,n.y1))}return{point:new Ht(t,e),align:{horizontal:a,vertical:p}}},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},e}($t);j(jo.prototype,ro),j(jo.prototype,no),jo.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Io=jo;function Vo(t,e){t.forEach(e)}function Bo(t,e){for(var i=t.length,o=i-1;o>=0;o--)e(t[o],o-i-1)}var Lo=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Bo:Vo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.gap,r=e.spacing,n=this.children,s=n.length,a=i?x:m,p=s+o+r*(s-1),h=(i?t.height():t.width())/p,l=t[a+1]+h*(o/2);this.forEach(n,(function(e,i){var o=(e.box||t).clone();o[a+1]=l,o[a+2]=l+h,e.reflow(o),i<s-1&&(l+=h*r),l+=h}))},e}($t);Vt(Lo,{vertical:!1,gap:0,spacing:0});var zo=Lo,Eo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){for(var e=this.options.vertical?m:x,i=this.children,o=i.length,r=this.box=new Nt,n=0;n<o;n++){var s=i[n];if(!1!==s.visible){var a=s.box.clone();a.snapTo(t,e),0===n&&(r=this.box=a.clone()),s.reflow(a),r.wrap(a)}}},e}($t);Vt(Eo,{vertical:!0});var Fo=Eo,Do=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return Io},e.prototype.clusterType=function(){return zo},e.prototype.stackType=function(){return Fo},e.prototype.stackLimits=function(e,i){return t.prototype.stackLimits.call(this,e,i)},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),l=this.pointOptions(r,n),c=l.labels;p&&"outsideEnd"===c.position&&(c.position="insideEnd"),l.isStacked=p;var u=t.fields.color||r.color;h<0&&l.negativeColor&&(u=l.negativeColor),l=this.evalPointOptions(l,h,o,i,r,n),R(r.color)&&(u=l.color);var f=new(this.pointType())(h,l);f.color=u;var d=a[i];d||(d=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(d));p?this.getStackWrap(r,d).append(f):d.append(f);return f},e.prototype.getStackWrap=function(t,e){var i,o=t.stack,r=o&&o.group||o,n=e.children;if("string"==typeof r){for(var s=0;s<n.length;s++)if(n[s]._stackGroup===r){i=n[s];break}}else i=n[0];i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=r,e.append(i));return i},e.prototype.categorySlot=function(t,e,i){var o=this.options,r=t.getSlot(e),n=i.startValue();if(o.isStacked){var s=i.getSlot(n,n,!0),a=o.invertAxes?m:x;r[a+1]=r[a+2]=s[a+1]}return r},e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.createAnimation=function(){this._setAnimationOptions(),t.prototype.createAnimation.call(this),xo(this.options.series)&&this._setChildrenAnimation()},e.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&xt(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},e.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};if(e.isStacked){var o=this.seriesValueAxis(e.series[0]);t=o.getSlot(o.startValue())}else t=this.categoryAxis.getSlot(0);i.origin=new S.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e}(oo);Vt(Do,{animation:{type:Ni}});var Uo=Do,Ho=function(t){function e(e,i){t.call(this,i),this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=o.getSlot(i.open,i.close),n=o.getSlot(i.low,i.high);r.x1=n.x1=t.x1,r.x2=n.x2=t.x2,this.realBody=r;var s=n.center().x,a=[];a.push([[s,n.y1],[s,r.y1]]),a.push([[s,r.y2],[s,n.y2]]),this.lines=a,this.box=n.clone().wrap(r),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},e.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},e.prototype.createVisual=function(){t.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},e.prototype.mainVisual=function(t){var e=new S.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var i=S.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Ot(e.border.opacity,e.opacity)}),k(i),t.append(i),Oo(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)))},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},e.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:Ot(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=S.drawing.Path.fromPoints(i[n],r);k(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return xt(e)||(e=new S.Color(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=S.drawing.Path.fromRect(this.box.toRect(),{fill:{color:v,opacity:0},stroke:null});this.visual.append(t)},e.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;var i=this.mainVisual(j({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,i},e.prototype.highlightVisual=function(){return this._mainVisual},e.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},e.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Ht(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:c,vertical:g}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}($t);Vt(Ho,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),j(Ho.prototype,ro),j(Ho.prototype,no);var Go=Ho;function No(t){return ji(t)===t.length}var qo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=No(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));var f=a[o];f||(f=new zo({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(f)),i&&(this.updateRange(h,e),f.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return Go},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=j({},r),h=t.fields.color||r.color;p=this.evalPointOptions(p,a,o,i,r,n),"candlestick"===r.type&&a.open>a.close&&(h=t.fields.downColor||r.downColor||r.color),R(r.color)&&(h=p.color),p.vertical=!this.options.invertAxes;var l=new s(a,p);return l.color=h,l},e.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.splitValue(t),r=this.valueAxisRanges[i];r=this.valueAxisRanges[i]=r||{min:u,max:f},r=this.valueAxisRanges[i]={min:Math.min.apply(Math,o.concat([r.min])),max:Math.max.apply(Math,o.concat([r.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},e.prototype.animationPoints=function(){return this.points},e}(oo);j(qo.prototype,bo);var Xo=qo,Yo=function(t){function e(e,i){t.call(this,e,i),this.createNote()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e,i,o=this.options,r=this.value,n=this.owner.seriesValueAxis(o);this.boxSlot=i=n.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);var s=n.getSlot(r.median);if(r.mean){var a=n.getSlot(r.mean);this.meanPoints=this.calcMeanPoints(t,a)}this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,s),this.box=e.clone().wrap(i),this.reflowNote()},e.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},e.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},e.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},e.prototype.renderOutliers=function(t){for(var e=this.value,i=e.outliers||[],o=3*Math.abs(e.q3-e.q1),r=[],n=t.markers||{},s=0;s<i.length;s++){var a=i[s],p=j({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);xt(p.color)||(xt(this.color)?p.color=this.color:p.color=new S.Color(n.background).brightness(.8).toHex());var h=new ee({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});h.value=a,r.push(h)}return this.reflowOutliers(r),r},e.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,n=e.getSlot(r);this.options.vertical?n.move(i.x):n.move(void 0,i.y),this.box=this.box.wrap(n),t[o].reflow(n)}},e.prototype.mainVisual=function(e){for(var i=t.prototype.mainVisual.call(this,e),o=this.renderOutliers(e),r=0;r<o.length;r++){var n=o[r].getElement();n&&i.append(n)}return i},e.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},e.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color?this.color:t.prototype.getBorderColor.call(this)},e}(Go);Vt(Yo,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:v,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:p,background:v,border:{width:2,opacity:1},opacity:0}}),j(Yo.prototype,ro);var Wo=Yo,Zo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},e.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},e.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},e.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},e}(Wo),Ko=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=No(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));var f=a[o];f||(f=new zo({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(f)),i&&(this.updateRange(h,e),f.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return this.options.invertAxes?Zo:Wo},e.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.valueAxisRanges[i],r=this.splitValue(t).concat(this.filterOutliers(t.outliers));xt(t.mean)&&(r=r.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:u,max:f},o=this.valueAxisRanges[i]={min:Math.min.apply(Math,r.concat([o.min])),max:Math.max.apply(Math,r.concat([o.max]))}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},e.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];xt(r)&&null!==r&&i.push(r)}return i},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Xo),$o=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},e}(Ji);function Jo(t){return xt(t)&&null!==t}var Qo=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this._initFields(),this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=i.seriesIx,h=i.series,l=t.options.errorBars,c=i[s],u=i[a];C(r)&&(C(c)&&C(u)&&(o={low:c,high:u}),l&&xt(l[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new Di(l[n],h,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,l[n])),o&&this.addPointErrorBar(o,t,e))},e.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===x,p={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];var h=new $o(o,r,a,this,n,s);e.errorBars.push(h),e.append(h),p[i]=o,this.updateRange(p,n),p[i]=r,this.updateRange(p,n)},e.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],a=this.seriesMissingValues(s),p=this.seriesPoints[n],h=t;Jo(o)&&Jo(r)||(h=this.createMissingValue(h,a)),h&&((i=this.createPoint(h,e))&&(Object.assign(i,e),this.addErrorBar(i,m,e),this.addErrorBar(i,x,e)),this.updateRange(h,e.series)),this.points.push(i),p.push(i)},e.prototype.seriesMissingValues=function(t){return t.missingValues},e.prototype.createMissingValue=function(){},e.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,a=this.xAxisRanges[o],p=this.yAxisRanges[r];Jo(n)&&(a=this.xAxisRanges[o]=a||{min:u,max:f},T(n)&&(n=Ue(i,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),Jo(s)&&(p=this.yAxisRanges[r]=p||{min:u,max:f},T(s)&&(s=Ue(i,s)),p.min=Math.min(p.min,s),p.max=Math.max(p.max,s))},e.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];xt(s)||(this._evalSeries[r]=s=to(t,{},n,!0));var a=t;return s&&to(a=j({},t),{value:e,series:o,dataItem:i.dataItem},n),a},e.prototype.pointType=function(){return ao},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=j({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)}return i},e.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color;o=this.evalPointOptions(o,t,e),R(i.color)&&(r=o.color);var n=new ao(t,o);return n.color=r,this.append(n),n},e.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,r=e?o.namedXAxes[e]:o.axisX,n=i?o.namedYAxes[i]:o.axisY;if(!r)throw new Error("Unable to locate X axis with name "+e);if(!n)throw new Error("Unable to locate Y axis with name "+i);return{x:r,y:n}},e.prototype.reflow=function(t){var e=this,i=this.points,o=!this.options.clip,r=0;this.traverseDataPoints((function(t,n){var s=i[r++],a=e.seriesAxes(n.series),p=a.x.getSlot(t.x,t.x,o),h=a.y.getSlot(t.y,t.y,o);if(s)if(p&&h){var l=e.pointSlot(p,h);s.reflow(l)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new Nt(t.x1,e.y1,t.x2,e.y2)},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,o,n),a=s.valueFields,p=s.fields;t(a,j({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},p))}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e}($t);Vt(Qo,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),j(Qo.prototype,bo,{_bindPoint:oo.prototype._bindPoint});var tr=Qo,er=function(t){function e(e,i){t.call(this,e,i),this.category=e.category}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new S.drawing.Group,s=new S.drawing.Circle(new S.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),a=new S.drawing.Circle(new S.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new S.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,a),n},e}(ao);er.prototype.defaults=j({},er.prototype.defaults,{labels:{position:a},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),er.prototype.defaults.highlight.zIndex=void 0;var ir=er,or=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initFields=function(){this._maxSize=f,t.prototype._initFields.call(this)},e.prototype.addValue=function(e,i){null!==e.size&&(e.size>0||e.size<0&&i.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(e.size)),t.prototype.addValue.call(this,e,i)):(this.points.push(null),this.seriesPoints[i.seriesIx].push(null))},e.prototype.reflow=function(e){this.updateBubblesSize(e),t.prototype.reflow.call(this,e)},e.prototype.pointType=function(){return ir},e.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,r=e.pointIx*(600/o),n={delay:r,duration:600-r,type:"bubble"},s=e.color||i.color;t.size<0&&i.negativeValues.visible&&(s=Ot(i.negativeValues.color,s));var a=j({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:p,border:i.border,opacity:i.opacity,animation:n}});a=this.evalPointOptions(a,t,e),R(i.color)&&(s=a.color),a.markers.background=s;var h=new ir(t,a);return h.color=s,this.append(h),h},e.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c=n[l];if(c){var u=Math.abs(c.value.size)*h,f=Math.sqrt((p+u)/Math.PI),d=Ot(c.options.zIndex,0)+(1-f/a);j(c.options,{zIndex:d,markers:{size:2*f,zIndex:d},labels:{zIndex:d+1}})}}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},e.prototype.createAnimation=function(){},e.prototype.createVisual=function(){},e}(tr);Vt(or,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var rr=or,nr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ee);j(nr.prototype,ro);var sr=nr,ar=function(t){function e(e,i){t.call(this,i),this.aboveAxis=this.options.aboveAxis,this.color=i.color||v,this.value=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,xt(this.value.target)&&(this.target=new sr({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:g,align:d}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},e.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),s=o.categorySlot(o.categoryAxis,e.categoryIx,n),a=n.getSlot(this.value.target),p=r?a:s,h=r?s:a;if(i){var l=new Nt(p.x1,h.y1,p.x2,h.y2);i.options.height=r?l.height():e.target.line.width,i.options.width=r?e.target.line.width:l.width(),i.reflow(l)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,i=S.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&i.options.set("stroke",{color:e.border.color||this.color,width:e.border.width,dashType:e.border.dashType,opacity:Ot(e.border.opacity,e.opacity)}),this.bodyVisual=i,k(i),this.visual.append(i)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=S.drawing.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return S.drawing.Path.fromRect(this.box.toRect(),t)},e.prototype.highlightVisual=function(){return this.bodyVisual},e.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}($t);ar.prototype.tooltipAnchor=Io.prototype.tooltipAnchor,Vt(ar,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),j(ar.prototype,ro),j(ar.prototype,no);var pr=ar,hr=function(t){function e(e,i){!function(t){for(var e=t.series,i=0;i<e.length;i++){var o=e[i],r=o.data;!r||b(r[0])||I(r[0])||(o.data=[r])}}(i),t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},e.prototype.plotRange=function(t){var e=t.series,i=this.seriesValueAxis(e),o=this.categoryAxisCrossingValue(i);return[o,t.value.current||o]},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,h=j({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),l=t.fields.color||r.color;h=this.evalPointOptions(h,p,o,i,r,n),R(r.color)&&(l=h.color);var c=new pr(p,h);c.color=l;var u=a[i];return u||(u=new zo({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(c),c},e.prototype.updateRange=function(t,e){var i=t.current,o=t.target,r=e.series.axis,n=this.valueAxisRanges[r];xt(i)&&!isNaN(i)&&xt(o&&!isNaN(o))&&((n=this.valueAxisRanges[r]=n||{min:u,max:f}).min=Math.min(n.min,i,o),n.max=Math.max(n.max,i,o))},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},e.prototype.pointValue=function(t){return t.valueFields.current},e.prototype.aboveAxis=function(t){return t.value.current>0},e.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},e}(oo);hr.prototype._setAnimationOptions=Uo.prototype._setAnimationOptions,Vt(hr,{animation:{type:Ni}});var lr=hr,cr=function(t){function e(e,i){t.call(this),this.chartService=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;if(e){var r=e.color||e.options.color;i=Ot(i,r),o=Ot(o,r)}var n=E(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:V(t.border.width),paddingTop:V(n.top),paddingBottom:V(n.bottom),paddingLeft:V(n.left),paddingRight:V(n.right)}},e.prototype.show=function(t,e,i){t.format=e.format;var o=this.getStyle(e,i);t.style=o,!xt(e.color)&&new S.Color(o.backgroundColor).percBrightness()>180&&(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},e.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},e.prototype.destroy=function(){delete this.chartService},e}(S.Class);Vt(cr,{border:{width:1},opacity:1});var ur=cr,fr=function(t){function e(e,i,o){t.call(this,e,o),this.crosshair=i,this.formatService=e.format,this.initAxisName()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initAxisName=function(){var t,e=this.crosshair.axis;t=e.plotArea.categoryAxis?e.getCategory?"categoryAxis":"valueAxis":e.options.vertical?"yAxis":"xAxis",this.axisName=t},e.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===h&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},e.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},e.prototype.getAnchor=function(){var t,e,i,o=this.crosshair,r=this.options,n=r.position,p=r.padding,h=!o.axis.options.vertical,l=o.line.bbox();return h?(t=a,n===s?(e=g,i=l.bottomLeft().translate(0,p)):(e=s,i=l.topLeft().translate(0,-p))):(e=a,n===c?(t=d,i=l.topLeft().translate(-p,0)):(t=c,i=l.topRight().translate(p,0))),{point:i,align:{horizontal:t,vertical:e}}},e}(ur);Vt(fr,{padding:10});var dr=fr,gr=function(t){function e(e,i,o){t.call(this,o),this.axis=i,this.stickyMode=i instanceof qe;var r=this.options.tooltip;r.visible&&(this.tooltip=new dr(e,this,j({},r,{stickyMode:this.stickyMode})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},e.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},e.prototype.moveLine=function(){var t,e=this.axis,i=this.point,o=e.options.vertical,r=this.getBox(),n=o?x:m,s=new S.geometry.Point(r.x1,r.y1);if(t=o?new S.geometry.Point(r.x2,r.y1):new S.geometry.Point(r.x1,r.y2),i)if(this.stickyMode){var a=e.getSlot(e.pointCategoryIndex(i));s[n]=t[n]=a.center()[n]}else s[n]=t[n]=i[n];this.box=r,this.line.moveTo(s).lineTo(t)},e.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),s=r?m:x,a=0;a<o;a++){var p=i[a];p.options.vertical!==r&&(t?t.wrap(p.lineBox()):t=p.lineBox().clone())}return n[s+1]=t[s+1],n[s+2]=t[s+2],n},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options;this.line=new S.drawing.Path({stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),t.prototype.destroy.call(this)},e}($t);Vt(gr,{color:n,width:2,zIndex:-1,tooltip:{visible:!1}});var yr=gr,vr=function(t){function e(e,i){t.call(this,e),this.pane=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},e.prototype._clipBox=function(){return this.pane.chartsBox()},e.prototype.createVisual=function(){if(this.visual=new S.drawing.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=S.drawing.Path.fromRect(t);k(e),this.visual.clip(e),this.unclipLabels()}},e.prototype.stackRoot=function(){return this},e.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s=o[n];if(s&&!1!==s.visible&&s.overlapsBox&&s.overlapsBox(e))if(s.unclipElements)s.unclipElements();else{var a=s.label,p=s.note;a&&a.options.visible&&(a.alignToClipBox&&a.alignToClipBox(e),a.options.noclip=!0),p&&p.options.visible&&(p.options.noclip=!0)}}},e.prototype.destroy=function(){t.prototype.destroy.call(this),delete this.parent},e}($t);vr.prototype.isStackRoot=!0;var mr=vr,xr=function(t){function e(e){t.call(this,e),this.id="pane"+br++,this.createTitle(),this.content=new $t,this.chartContainer=new mr({},this),this.append(this.content),this.axes=[],this.charts=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTitle=function(){var t=this.options.title;I(t)&&(t=j({},t,{align:t.position,position:g})),this.title=ge.buildTitle(t,this,e.prototype.options.title)},e.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},e.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},e.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},e.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},e.prototype.reflow=function(e){var i;kt(this.children)===this.content&&(i=this.children.pop()),t.prototype.reflow.call(this,e),i&&this.children.push(i),this.title&&(this.contentBox.y1+=this.title.box.height())},e.prototype.visualStyle=function(){var e=t.prototype.visualStyle.call(this);return e.zIndex=-10,e},e.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},e.prototype.stackRoot=function(){return this},e.prototype.clipRoot=function(){return this},e.prototype.createGridLines=function(){for(var t=this.axes,e=t.concat(this.parent.axes),i=[],o=[],r=0;r<t.length;r++)for(var n=t[r],s=n.options.vertical,a=s?i:o,p=0;p<e.length;p++)if(0===a.length){var h=e[p];s!==h.options.vertical&&vt(a,n.createGridLines(h))}},e.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),this.content.parent=this,this.title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},e.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new Nt,o=0;o<e;o++){var r=t[o],n=r.options.vertical?x:m,s=r.lineBox();i[n+1]=s[n+1],i[n+2]=s[n+2]}if(0===i.x2)for(var a=this.parent.axes,p=a.length,h=0;h<p;h++){var l=a[h];if(!l.options.vertical){var c=l.lineBox();i.x1=c.x1,i.x2=c.x2}}return i},e.prototype.clipBox=function(){return this.chartContainer.clipBox},e.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Ri(this),index:this.paneIndex,name:this.options.name})},e}(Qt),br=1;xr.prototype.isStackRoot=!0,Vt(xr,{zIndex:-1,shrinkToFit:!0,title:{align:c},visible:!0});var _r=xr;function wr(t,e){null!==e&&t.push(e)}function Ar(t,e,i){var o=e.visible;if(xt(o))return o;var r=t.pointVisibility;return r?r[i]:void 0}function Sr(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=zi.current.bindPoint(t,n),a=s.valueFields.value;T(a)&&(a=parseFloat(a)),C(a)?(s.visible=!1!==Ar(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function kr(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Pr(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];lt(n.type,o)&&i.push(n)}return i}function Cr(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=Ue(i,nt(t)(e)),e[o]=r),r}function Tr(t,e){var i=t.type,o=e instanceof Date;return!i&&o||kr(i,h)}function Mr(t){return 1===t.length?t[0]:t}var Rr=/area/i;function Or(t,e){var i=zi.current.bindPoint(t,null,e).valueFields;for(var o in i)if(M(i[o]))return!0}function jr(t){var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=o;do{p(l+=r)&&(e=Or(h,(i=a(l)).item))}while(n<=l&&l<=s&&!e);if(e)return i}function Ir(t,e,i,o,r){var n=e.min,s=e.max,a=n>0&&n<i,p=s+1<i;if(a||p){var h,l,c;if("interpolate"!==function(t){return t.missingValues?t.missingValues:Rr.test(t.type)||t.stack?Gi:"interpolate"}(t))a&&(h=o(n-1)),p&&(l=o(s+1));else a&&(h=Or(t,(c=o(n-1)).item)?c:jr({start:n,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),p&&(l=Or(t,(c=o(s+1)).item)?c:jr({start:s,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}));h&&(t._outOfRangeMinPoint=h),l&&(t._outOfRangeMaxPoint=l)}}var Vr=function(t){function e(e,i,o){t.call(this,i),this.initFields(e,i),this.series=e,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=i,this.createPanes(),this.render(),this.createCrosshairs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){},e.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},e.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=j({title:{color:t.color}},e),s=0;s<o;s++){var a=j({},n,i[s]);T(a.title)&&(a.title=j({text:a.title},n.title));var p=new _r(a);p.paneIndex=s,r.push(p),this.append(p)}this.panes=r},e.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o];if(r.options.crosshair&&r.options.crosshair.visible){var n=new yr(this.chartService,r,r.options.crosshair);this.crosshairs.push(n),i.content.append(n)}}},e.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;o>=0;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},e.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},e.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},e.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},e.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},e.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},e.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},e.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},e.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p=t[a],h=!1!==p.visible;if(!1!==p.visibleInLegend){var l=p.name,c=h?it(o):it(n)||it(o);c&&(l=c({text:Jo(l)?l:"",series:p}));var u=p._defaults,f=p.color;R(f)&&u&&(f=u.color);var d=void 0,g=void 0;h?(d={},g=f):(d={color:n.color,font:n.font},g=r.markers.color),Jo(l)&&""!==l&&s.push({text:l,labels:d,markerColor:g,series:p,active:h})}}vt(i.items,s)},e.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];s.options.vertical?i.push(s):e.push(s)}return{x:e,y:i,any:e.concat(i)}},e.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},e.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},e.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,o=E(e.margin);this.box=t.clone().unpad(o),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},e.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();var i=this.getRoot();i&&i.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var r=0;r<e.length;r++)e[r].refresh()},e.prototype.axisCrossingValues=function(t,e){for(var i=t.options,o=[].concat(i.axisCrossingValues||i.axisCrossingValue),r=e.length-o.length,n=o[0]||0,s=0;s<r;s++)o.push(n);return o},e.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,s=e.getSlot(o,o,!0),a=e.options.reverse?2:1,p=t.box.translate(s[m+a]-r[m+n],s[x+a]-r[x+n]);t.pane!==e.pane&&p.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(p)},e.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),a={},p={},h={},l={},u=0;u<e.length;u++){var f=e[u],y=f.pane,v=y.id,m=!1!==f.options.visible,x=zr(t,y)||i,b=r;x!==i&&(b=this.axisCrossingValues(x,e)),this.alignAxisTo(f,x,n[u],b[u]),f.options._overlap||(Mt(f.lineBox().x1)===Mt(x.lineBox().x1)&&(a[v]&&f.reflow(f.box.alignTo(a[v].box,c).translate(-f.options.margin,0)),m&&(a[v]=f)),Mt(f.lineBox().x2)===Mt(x.lineBox().x2)&&(f._mirrored||(f.options.labels.mirror=!f.options.labels.mirror,f._mirrored=!0),this.alignAxisTo(f,x,n[u],b[u]),p[v]&&f.reflow(f.box.alignTo(p[v].box,d).translate(f.options.margin,0)),m&&(p[v]=f)),0!==u&&o.pane===f.pane&&(f.alignTo(o),f.reflow(f.box)))}for(var _=0;_<t.length;_++){var w=t[_],A=w.pane,S=A.id,k=!1!==w.options.visible,P=zr(e,A)||o,C=n;P!==o&&(C=this.axisCrossingValues(P,t)),this.alignAxisTo(w,P,r[_],C[_]),w.options._overlap||(Mt(w.lineBox().y1)===Mt(P.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,P,r[_],C[_]),h[S]&&w.reflow(w.box.alignTo(h[S].box,g).translate(0,-w.options.margin)),k&&(h[S]=w)),Mt(w.lineBox().y2,3)===Mt(P.lineBox().y2,3)&&(l[S]&&w.reflow(w.box.alignTo(l[S].box,s).translate(0,w.options.margin)),k&&(l[S]=w)),0!==_&&(w.alignTo(i),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Lr(e),o=0,r=0;r<t.length;r++){var n=t[r];n.axes.length>0&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},e.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,Lr(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},e.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,s=r.contentBox;if(n.length>0){var a=Lr(n),p=Math.max(s.y1-a.y1,s.y2-a.y2);i=Math.max(i,s.x1-a.x1);for(var h=0;h<n.length;h++){var l=n[h];l.reflow(l.box.translate(0,p))}}}for(var c=0;c<e.length;c++){var u=e[c];u.reflow(u.box.translate(i,0))}},e.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);e.x.length>0&&e.y.length>0&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},e.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=Er(i),r=0;r<o.length;r++){o[r].autoRotateLabels()&&(e=!0)}if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);t.x.length>0&&t.y.length>0&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},e.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(i>0)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},e.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!lt(n,t)||e[r].reflow(o)}},e.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],p=a.options.height;if(a.options.width=t.width(),a.options.height){if(p.indexOf&&p.indexOf("%")){var h=parseInt(p,10)/100;a.options.height=h*t.height()}a.reflow(t.clone()),o-=a.options.height}else r++}for(var l=0;l<i;l++){var c=e[l];c.options.height||(c.options.height=o/r)}for(var u=0;u<i;u++){var f=e[u],d=t.clone().move(t.x1,n);f.reflow(d),n+=f.options.height}},e.prototype.backgroundBox=function(){for(var t,e=this.axes,i=e.length,o=0;o<i;o++)for(var r=e[o],n=0;n<i;n++){var s=e[n];if(r.options.vertical!==s.options.vertical){var a=r.lineBox().clone().wrap(s.lineBox());t=t?t.wrap(a):a}}return t||this.box},e.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},e.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(S.drawing.Path.fromRect(e[i].toRect()))},e.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e,i=this.options.plotArea,o=i.opacity,r=i.background,n=i.border;void 0===n&&(n={}),""!==(e=r)&&null!==e&&"none"!==e&&"transparent"!==e&&xt(e)||(r=v,o=0);var s=this._bgVisual=new S.drawing.MultiPath({fill:{color:r,opacity:o},stroke:{color:n.width?n.color:"",width:n.width,dashType:n.dashType},zIndex:-1});this.addBackgroundPaths(s),this.appendVisual(s)},e.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++){if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&xt(s.value)&&null!==s.value&&i.push(s)}}}return i},e.prototype.pointsBySeriesIndex=function(t){return this.filterPoints((function(e){return e.series.index===t}))},e.prototype.pointsBySeriesName=function(t){return this.filterPoints((function(e){return e.series.name===t}))},e.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},e.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},e.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},e.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,i=t.y;this.detachAxisGroupLabels(i,e),this.detachAxisGroupLabels(e,i)},e.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=zr(e,n)||e[0],a=o+i,p=this.createLabelAxis(r,a,s);if(p){i++;var h=n.axes.indexOf(r)+i;n.appendAxisAt(p,h)}}},e.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n="end"!==r&&"start"!==r,s=o.visible;if(n||!1===s)return null;var a=this.groupAxes(this.panes),p=i.options.vertical?a.x:a.y,h=this.axisCrossingValues(i,p),l="end"===r,c=i.range(),u=l?c.max:c.min;if(Pt(h[e],c.min,c.max)-u==0)return null;h.splice(e+1,0,u),i.options.axisCrossingValues=h;var f=t.clone();return t.clear(),f.options.name=void 0,f.options.line.visible=!1,f.options.crosshair=void 0,f.options.notes=void 0,f.options.plotBands=void 0,f},e}($t);function Br(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function Lr(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;if(n||Br(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new Nt}function zr(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var Er=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};Vt(Vr,{series:[],plotArea:{margin:{}},background:"",border:{color:n,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Fr=Vr,Dr={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function Ur(t,e,i){var o=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),xt(o[r])||(o[r]={}),o=o[r];r=n.shift()}o[r]=i}var Hr=function(t){function e(e,i,o){t.call(this);var r=i.canonicalFields(e),n=i.valueFields(e),s=i.sourceFields(e,r),a=this._seriesFields=[],p=o.query(e.type),h=e.aggregate||p;this._series=e,this._binder=i;for(var l=0;l<r.length;l++){var c=r[l],u=void 0;if(I(h))u=h[c];else{if(0!==l&&!lt(c,n))break;u=h}u&&a.push({canonicalName:c,name:s[l],transform:R(u)?u:Vi[u]})}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};if(n&&!C(n)&&!b(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<o.length;p++){var h=o[p],l=this._bindField(r.values,h.canonicalName),c=h.transform(l,i,r.dataItems,e);if(!(null===c||!I(c)||xt(c.length)||c instanceof Date)){s=c;break}xt(c)&&Ur(h.name,s,c)}return s},e.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},e.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,a=void 0;a=xt(s[e])?s[e]:n.fields[e],i.push(a)}return i},e}(S.Class),Gr=function(t){function e(){t.call(this),this._defaults={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},e.prototype.query=function(t){return this._defaults[t]},e}(S.Class);Gr.current=new Gr;var Nr=Gr,qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLabel=function(){var t=this.options.labels,e=j({},t,t.from),i=j({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),i.visible&&(this.labelTo=this._createLabel(i),this.append(this.labelTo))},e.prototype._createLabel=function(t){var e,i=it(t),o=this.pointData();return e=i?i(o):this.formatValue(t.format),new Ro(e,j({vertical:this.options.vertical},t),o)},e.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},e}(Io);qr.prototype.defaults=j({},qr.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Xr=qr,Yr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Xr},e.prototype.pointValue=function(t){return t.valueFields},e.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},e.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},e.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,n=this.valueAxisRanges[i];null!==t&&C(o)&&C(r)&&((n=this.valueAxisRanges[i]=n||{min:u,max:f}).min=Math.min(n.min,o),n.max=Math.max(n.max,o),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r))},e.prototype.aboveAxis=function(t){var e=t.value;return e.from<e.to},e}(Uo);Yr.prototype.plotLimits=oo.prototype.plotLimits;var Wr=Yr,Zr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.aliasFor=function(){return this.parent},e}(ao),Kr=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=Ot(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){if(!this._rendered){this._rendered=!0;var t=this.options,e=t.markers,i=t.labels,o=this.value,r=this.fromPoint=new Zr(o,j({},this.options,{labels:i.from,markers:e.from})),n=this.toPoint=new Zr(o,j({},this.options,{labels:i.to,markers:e.to}));this.copyFields(r),this.copyFields(n),this.append(r),this.append(n)}},e.prototype.reflow=function(t){this.render();var e=t.from,i=t.to;this.positionLabels(e,i),this.fromPoint.reflow(e),this.toPoint.reflow(i),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},e.prototype.createHighlight=function(){var t=new S.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},e.prototype.highlightVisual=function(){return this.visual},e.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},e.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o,r=this.box,n=r.center();return this.options.vertical?(e=n.x,i=r.y1-5,o=s):(e=r.x2+5,i=n.y,o=a),{point:new Ht(e,i),align:{horizontal:"left",vertical:o}}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},e.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},e.prototype.positionLabels=function(t,e){var i,o,r=this.options,n=r.labels,s=r.vertical;"auto"===n.position&&(s?e.y1<=t.y1?(o="above",i="below"):(o="below",i="above"):e.x1<=t.x1?(o=c,i=d):(o=d,i=c),n.from&&n.from.position||(this.fromPoint.options.labels.position=i),n.to&&n.to.position||(this.toPoint.options.labels.position=o))},e.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},e}($t);j(Kr.prototype,ro),j(Kr.prototype,no),Kr.prototype.defaults={markers:{visible:!1,background:v,size:8,type:p,border:{width:2},opacity:1},labels:{visible:!1,margin:E(3),padding:E(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:v,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var $r=Kr,Jr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},e.prototype.createStroke=function(t){var e=new S.drawing.Path(t),i=new S.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),i.segments.push.apply(i.segments,this.stackSegments()),this.visual.append(e),this.visual.append(i)},e.prototype.hasStackSegment=function(){return!0},e.prototype.fromPoints=function(){return this.linePoints.map((function(t){return t.fromPoint}))},e.prototype.toPoints=function(){return this.linePoints.map((function(t){return t.toPoint}))},e}(Ao),Qr=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},e.prototype.createCurveSegments=function(t){return(new Pi).process(this.toGeometryPoints(t))},e}(Jr),tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},e.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},e}(Jr);j(tn.prototype,co);var en=tn,on=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.pointType=function(){return $r},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Jo(s.from)&&!Jo(s.to)){if(this.seriesMissingValues(r)!==Gi)return null;s={from:0,to:0}}var a=this.pointOptions(r,n);a=this.evalPointOptions(a,s,o,i,r,n);var p=t.fields.color||r.color;R(r.color)&&(p=a.color);var h=new $r(s,a);return h.color=p,this.append(h),h},e.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?Qr:"step"===o?en:Jr)(t,e,i)},e.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},e.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),o=t.getSlot(e[1],e[1],!this.options.clip);if(i&&o)return{from:i,to:o}},e.prototype.pointSlot=function(t,e){var i,o,r=e.from,n=e.to;return this.options.invertAxes?(i=new Nt(r.x1,t.y1,r.x2,t.y2),o=new Nt(n.x1,t.y1,n.x2,t.y2)):(i=new Nt(t.x1,r.y1,t.x2,r.y2),o=new Nt(t.x1,n.y1,t.x2,n.y2)),{from:i,to:o}},e.prototype.addValue=function(e,i){var o=e.valueFields;C(o.from)||(o.from=o.to),C(o.to)||(o.to=o.from),t.prototype.addValue.call(this,e,i)},e.prototype.updateRange=function(t,e){if(null!==t&&C(t.from)&&C(t.to)){var i=e.series.axis,o=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:u,max:f},r=t.from,n=t.to;o.min=Math.min(o.min,r,n),o.max=Math.max(o.max,r,n)}},e.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.from,i.to)},e.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},e}(oo);j(on.prototype,yo,bo);var rn=on,nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=o.getSlot(i.low,i.high),p=o.getSlot(i.open,i.open),h=o.getSlot(i.close,i.close);p.x1=h.x1=a.x1=t.x1,p.x2=h.x2=a.x2=t.x2;var l=a.center().x;r.push([p.x1,p.y1]),r.push([l,p.y1]),n.push([l,h.y1]),n.push([h.x2,h.y1]),s.push([l,a.y1]),s.push([l,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(Go),sn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return nn},e}(Xo),an=function(t){function e(e,i,o){t.call(this),this.from=e,this.to=i,this.series=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linePoints=function(){var t=this.from,e=this.from.box,i=this.to.box,o=[];if(t.isVertical){var r=t.aboveAxis?e.y1:e.y2;o.push([e.x1,r],[i.x2,r])}else{var n=t.aboveAxis?e.x2:e.x1;o.push([n,e.y1],[n,i.y2])}return o},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.series.line||{},i=S.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});k(i),this.visual.append(i)},e}($t);Vt(an,{animation:{type:"fadeIn",delay:600}});var pn=an,hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.createSegments()},e.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=eo(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<i;p++){var h=zi.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,f=void 0;c?"total"===c.toLowerCase()?(h.valueFields.value=s,u=0,f=s):(h.valueFields.value=a,f=u-a,a=0):C(l)&&(a+=l,f=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:f,isVertical:o})}},e.prototype.updateRange=function(e,i){t.prototype.updateRange.call(this,{value:i.to},i)},e.prototype.aboveAxis=function(t){return t.value>=0},e.prototype.plotRange=function(t){return[t.from,t.to]},e.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var p=n[a];if(p&&s){var h=new pn(s,p,r);i.push(h),this.append(h)}s=p}}},e}(Uo),ln=["area","verticalArea","rangeArea","verticalRangeArea"],cn=[Xi,Wi].concat(ln),un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new To,t.length>0){this.invertAxes=lt(t[0].type,[Ni,"bullet",Wi,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},e.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e instanceof qe?delete this.namedCategoryAxes[i]:(this.valueAxisRangeTracker.reset(i),delete this.namedValueAxes[i]),e===this.categoryAxis&&delete this.categoryAxis,e===this.valueAxis&&delete this.valueAxis},e.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);if(n)for(var s=this.groupSeriesByCategoryAxis(n),a=0;a<s.length;a++)this.createChartGroup(s[a],o)}},e.prototype.createChartGroup=function(t,e){this.createAreaChart(Pr(t,["area","verticalArea"]),e),this.createRangeAreaChart(Pr(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Pr(t,[qi,Ni]),e),this.createRangeBarChart(Pr(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Pr(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Pr(t,"candlestick"),e),this.createBoxPlotChart(Pr(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Pr(t,"ohlc"),e),this.createWaterfallChart(Pr(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Pr(t,[Xi,Wi]),e)},e.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r=e[o],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane);r=(kr(n.options.type,h)||r.categoryField)&<(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n),i.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},e.prototype.filterSeries=function(t,e){var i=(t.data||{}).length;if(e._seriesMax=Math.max(e._seriesMax||0,i),!C(e.options.min)&&!C(e.options.max))return t;var o=e.currentRangeIndices(),r=lt(t.type,cn),n=j({},t);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&Ir(n,o,i,(function(i){return{item:t.data[i],category:e.categoryAt(i,!0),categoryIx:i-o.min}}),(function(e){return xt(t.data[e])})),n},e.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},e.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=kr(o.type,h),s=t.data,a=n?Cr:Bi,p=[];n||e.mapCategories();for(var l=0;l<s.length;l++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[l],this.chartService.intl):r[l],xt(c)&&null!==c){var u=e.totalIndex(c);p[u]=p[u]||{items:[],category:c},p[u].items.push(l)}}return this._currentPointsCache[i]=p,p},e.prototype.aggregateSeries=function(t,e){if(!t.data.length)return t;for(var i=this.seriesSourcePoints(t,e),o=j({},t),r=new Hr(j({},t),zi.current,Nr.current),n=o.data=[],s=e.options.dataItems||[],a=e.currentRangeIndices(),p=function(t){var o=t-a.min,n=i[t];if(n||(n=i[t]={}),n.categoryIx=o,!n.item){var s=e.categoryAt(t,!0);n.category=s,n.item=r.aggregatePoints(n.items,s)}return n},h=a.min;h<=a.max;h++){var l=p(h);n[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return lt(o.type,cn)&&Ir(o,a,e.totalCount(),p,(function(t){return i[t]})),e.options.dataItems=s,o},e.prototype.appendChart=function(e,i){var o=e.options.series,r=this.seriesCategoryAxis(o[0]),n=r.options.categories,s=Math.max(0,eo(o)-n.length);if(s>0)for(n=r.options.categories=r.options.categories.slice(0);s--;)n.push("");this.valueAxisRangeTracker.update(e.valueAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,o=st([].concat(e.valueAxis),(function(t){return t.name===i}))[0],r=((e.panes||[{}])[0]||{}).name||"default";return(o||{}).pane||r},e.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,i=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!i)throw new Error("Unable to locate category axis with name "+e);return i},e.prototype.stackableChartOptions=function(t,e){var i=t.stack;return{isStacked:i,isStacked100:i&&"100%"===i.type,clip:e.options.clip}},e.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";i.hasOwnProperty(r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=dn(t,e[s],s);0!==a.length&&n.push(a)}return n},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Uo(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createRangeBarChart=function(t,e){if(0!==t.length){var i=t[0],o=new Wr(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.createBulletChart=function(t,e){if(0!==t.length){var i=t[0],o=new lr(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=t[0],o=new wo(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=t[0],o=new Co(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e)));this.appendChart(o,e)}},e.prototype.createRangeAreaChart=function(t,e){if(0!==t.length){var i=new rn(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip});this.appendChart(i,e)}},e.prototype.createOHLCChart=function(t,e){if(0!==t.length){var i=t[0],o=new sn(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createCandlestickChart=function(t,e){if(0!==t.length){var i=t[0],o=new Xo(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createBoxPlotChart=function(t,e){if(0!==t.length){var i=t[0],o=new Ko(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip});this.appendChart(o,e)}},e.prototype.createWaterfallChart=function(t,e){if(0!==t.length){var i=t[0],o=new hn(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing});this.appendChart(o,e)}},e.prototype.axisRequiresRounding=function(t,e){for(var i=Pr(this.series,Zi),o=0;o<this.series.length;o++){var r=this.series[o];if(lt(r.type,ln)){var n=r.line;n&&"step"===n.style&&i.push(r)}}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},e.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},e.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof qe&&t[e].createLabels()},e.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(lt(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=j({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?u:0},n),xt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=Tr(n,a[0])?new ti(n,this.chartService):new qe(n,this.chartService),i[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,o.push(p),this.appendAxis(p)}}var h=this.categoryAxis||o[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},e.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++){if(!lt(t[e].type,ln))return!1}return!0},e.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var p=o[a];if(lt(this.findPane(p.pane),t)){var h=p.name,l=kr(p.type,"log")?{min:.1,max:1}:{min:0,max:1},c=e.query(h)||i||l;0===a&&c&&i&&(c.min=Math.min(c.min,i.min),c.max=Math.max(c.max,i.max));var u=new(kr(p.type,"log")?fi:ai)(c.min,c.max,j({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=u}u.axisIndex=a,s.push(u),this.appendAxis(u)}}var f=this.valueAxis||s[0];this.valueAxis=f,r?this.axisX=f:this.axisY=f},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,h=0;h<p.length;h++){var l=p[h];l.getValue?wr(a,l.getValue(r)):wr(s,l.getCategory(r))}0===s.length&&wr(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(i,{element:At(e),originalEvent:e,category:Mr(s),value:Mr(a)})}},e.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},e.prototype.updateAxisOptions=function(t,e){fn(this.options,t,e),fn(this.originalOptions,t,e)},e}(Fr);function fn(t,e,i){j([].concat(e instanceof qe?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}function dn(t,e,i){return st(t,(function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))}Vt(un,{categoryAxis:{},valueAxis:{}}),j(un.prototype,Dr);var gn=un;function yn(){this._defaultPrevented=!0}var vn=function(t){function e(){t.call(this),this._points=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this._points=[]},e.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},e.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;if(o){var r={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:yn,visual:t.highlightVisual(),show:e};o(r),r._defaultPrevented||t.toggleHighlight(e,i)}else t.toggleHighlight(e,i)},e.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},e.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++){if(t===e[i])return!0}return!1},e}(S.Class);function mn(t,e){var i=(e||"").toLowerCase(),o=t.event;return"none"===i&&!(o.ctrlKey||o.shiftKey||o.altKey)||o[i+"Key"]}function xn(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}var bn=function(t){function e(e,i){t.call(this),this.plotArea=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.start=function(t){return this._active=mn(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,m).concat(this._panAxes(t,x));if(e.length)return this.axisRanges=e,xn(e)}},e.prototype.end=function(){var t=this._active;return this._active=!1,t},e.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},e.prototype.destroy=function(){delete this.plotArea},e.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,r=(this.options.lock||"").toLowerCase(),n=[];if(0!==o&&(r||"").toLowerCase()!==e)for(var s=i.axes,a=0;a<s.length;a++){var p=s[a];if(e===m&&!p.options.vertical||e===x&&p.options.vertical){var h=p.pan(o);h&&(h.limitRange=!0,n.push({axis:p,range:h}))}}return n},e}(S.Class);bn.prototype.options={key:"none",lock:"none"};var _n=bn,wn=function(t){function e(e,i){t.call(this),this.chart=e,this.options=j({},this.options,i),this.createElement()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},e.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},e.prototype.setStyles=function(t){z(this._marquee,t)},e.prototype.start=function(t){if(mn(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),o=this._zoomPane=e._plotArea.paneByPoint(i),r=o?o.chartsBox().clone():null;if(o&&r){var n=this._elementOffset();return r.translate(n.left,n.top),this._zoomPaneClipBox=r,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},e.prototype._elementOffset=function(){var t=this.chart.element,e=z(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop,r=_t(t);return{left:i+r.left,top:o+r.top}},e.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},e.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),i=this._selectionPosition(t);i.left-=e.left,i.top-=e.top;var o={x:i.left,y:i.top},r={x:i.left+i.width,y:i.top+i.height};return this._updateAxisRanges(o,r),this.removeElement(),delete this._zoomPane,xn(this.axisRanges)}},e.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},e.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;if((i!==m||a)&&(i!==x||!a)&&xt(s.axisIndex)){var p=s.pointsRange(t,e);p&&o.push({axis:s,range:p})}}this.axisRanges=o},e.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,o),a=Math.min(i.y,r),p=Math.abs(i.x-o),h=Math.abs(i.y-r);return n===m&&(s=e.x1,p=e.width()),n===x&&(a=e.y1,h=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(h=e.y2-i.y),r<e.y1&&(h=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:h}},e}(S.Class);wn.prototype.options={key:"shift",lock:"none"};var An=wn,Sn=function(t){function e(e,i){t.call(this),this.chart=e,this.options=j({},this.options,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.updateRanges=function(t){for(var e=(this.options.lock||"").toLowerCase(),i=[],o=this.chart._plotArea.axes,r=0;r<o.length;r++){var n=o[r],s=n.options.vertical;if((e!==m||s)&&(e!==x||!s)&&n.zoomRange){var a=n.zoomRange(-t);a&&i.push({axis:n,range:a})}}return this.axisRanges=i,xn(i)},e.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},e.prototype.destroy=function(){delete this.chart},e}(S.Class),kn=function(t){function e(e,i){t.call(this,e),this.chartService=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new S.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":"horizontal",reverse:e.rtl,alignItems:i?"start":"center"});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new Nt),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?ce(e):new Nt},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}($t),Pn=function(t){function e(e){t.call(this,e),this.createContainer(),e.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainer=function(){this.container=new ae({vertical:!1,wrap:!1,align:a,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new ee(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return j({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=j({},t.labels);this.container.append(new fe(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},i=this._itemOverlay=S.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:v,opacity:0},stroke:null,cursor:e.style||e});this.appendVisual(i)},e.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger("legendItemClick",i)&&e&&"contextmenu"===e.type&&e.preventDefault()},e.prototype.over=function(t,e){var i=this.eventArgs(e);return t.trigger("legendItemHover",i)||t._legendItemHover(i.seriesIndex,i.pointIndex),!0},e.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},e.prototype.eventArgs=function(t){var e=this.options;return{element:At(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},e.prototype.renderVisual=function(){var e=this,i=this.options,o=i.visual;o?(this.visual=o({active:i.active,series:i.series,sender:this.getSender(),pointIndex:i.pointIndex,options:{markers:this.markerOptions(),labels:i.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):t.prototype.renderVisual.call(this)},e}(Qt),Cn=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,e),this.chartService=i,lt(this.options.position,[g,d,s,c,"custom"])||(this.options.position=d),this.createContainers(),this.createLegendTitle(e.title),this.createItems()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=a;"custom"===e?o=c:lt(e,[g,s])?(o="start"===i?c:"end"===i?d:a,r=e):i&&("start"===i?r=g:"end"===i&&(r=s)),this.container=new Qt({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Qt({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},e.prototype.createItems=function(){var t=this.getService(),e=this.options,i=this.isVertical(),o=new kn({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.items;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s];o.append(new Pn(j({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}o.render(),this.itemsContainer.append(o)},e.prototype.isVertical=function(){var t=this.options,e=t.orientation,i=t.position;return"custom"===i&&"horizontal"!==e||(xt(e)?"horizontal"!==e:lt(i,[c,d]))},e.prototype.hasItems=function(){return this.container.children[0].children.length>0},e.prototype.reflow=function(t){var e=this.options,i=t.clone();this.hasItems()?("custom"===e.position?(this.containerCustomReflow(i),this.box=i):this.containerReflow(i),this.hasTitle()&&this.title.reflow(new Nt(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=i},e.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,a=o===g||o===s?m:x,p=this.isVertical(),h=t.clone(),l=t.clone();o!==c&&o!==d||(l.y1=h.y1=0),p&&n?(l.y2=l.y1+n,l.align(h,x,i.options.vAlign)):!p&&r&&(l.x2=l.x1+r,l.align(h,m,i.options.align)),i.reflow(l);var u=(l=i.box).clone();(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),i.reflow(l)),u[a+1]=t[a+1],u[a+2]=t[a+2],this.box=u},e.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,a=this.isVertical(),p=t.clone();a&&s?p.y2=p.y1+s:!a&&n&&(p.x2=p.x1+n),i.reflow(p),p=i.box,i.reflow(new Nt(o,r,o+p.width(),r+p.height()))},e.prototype.renderVisual=function(){this.hasItems()&&t.prototype.renderVisual.call(this)},e.prototype.createLegendTitle=function(t){var e=j({},{color:n,position:g,align:a},t),i=e.text;if(t&&!1!==t.visible){if(xt(e)&&e.visible){var o=it(e);o?i=o({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))}this.title=new fe(i,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new ae({vertical:!0,wrap:!1}),this.container.append(this.layout)},e.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},e.prototype.appendTitleLayoutContent=function(){this.options.title.position===s?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}($t);Vt(Cn,{position:d,items:[],offsetX:0,offsetY:0,margin:E(5),padding:E(5),border:{color:n,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:c,vAlign:a}});var Tn=Cn,Mn=function(t){function e(){t.call(this),this._registry=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},e.prototype.create=function(t,e,i){for(var o,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if((o=Pr(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(o,e,i)},e}(S.Class);Mn.current=new Mn;var Rn=Mn;function On(t){var e=document.createElement("div");return t&&(e.className=t),e}function jn(t){for(var e=t;e&&!at(e,"k-handle");)e=e.parentNode;return e}var In=function(t){function e(e,i,o,r){t.call(this);var n=e.element;this.options=j({},this.options,o),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=i,this._dateAxis=this.categoryAxis instanceof ti,this.initOptions(),this.visible=this.options.visible&&n.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onPane=function(t){return this.categoryAxis.pane===t},e.prototype.createElements=function(){var t=this.options,e=this.wrapper=On("k-selector");z(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=On("k-selection");this.leftMask=On("k-mask"),this.rightMask=On("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(On("k-selection-bg"));var o=this.leftHandle=On("k-handle k-left-handle"),r=this.rightHandle=On("k-handle k-right-handle");o.appendChild(On()),r.appendChild(On()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=z(i,["borderLeftWidth","borderRightWidth","height"]),s=z(o,"height").height,a=z(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},z(o,{top:(n.height-s)/2}),z(r,{top:(n.height-a)/2}),e.style.cssText=e.style.cssText},e.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),mt(this.wrapper,((t={})[Ki]=this._mousewheelHandler,t))),this._domEvents=J.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},e.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&j(t,{min:Ue(i,t.min),max:Ue(i,t.max),from:Ue(i,t.from),to:Ue(i,t.to)});var o=z(this.chartElement,["paddingLeft","paddingTop"]),r=o.paddingLeft,n=o.paddingTop;this.options=j({},{width:e.width(),height:e.height()+.1,padding:{left:r,top:n},offset:{left:e.x1+r,top:e.y1+n},from:t.min,to:t.max},t)},e.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Rt(this.wrapper,((t={})[Ki]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},e.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},e.prototype._start=function(t){var e=this.options,i=At(t);if(!this._state&&i){this.chart._unsetActivePoint(),this._state={moveTarget:jn(i)||i,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}};var o=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)});this.trigger("selectStart",o)&&(this._state=null)}},e.prototype._press=function(t){var e;(e=this._state?this._state.moveTarget:jn(At(t)))&&_(e,"k-handle-active")},e.prototype._move=function(t){if(this._state){var e=this._state,i=this.options,o=this.categoryAxis,r=e.range,n=e.moveTarget,s=o.options.reverse,a=this._index(i.from),p=this._index(i.to),h=this._index(i.min),l=this._index(i.max),c=e.startLocation-t.x.location,u=r.from,f=r.to,d=r.to-r.from,g=z(this.wrapper,"width").width/(o.categoriesCount()-1),y=Math.round(c/g)*(s?-1:1);if(n){var v=at(n,"k-left-handle"),m=at(n,"k-right-handle");at(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(h,a-y),l-d),r.to=Math.min(r.from+d,l)):v&&!s||m&&s?(r.from=Math.min(Math.max(h,a-y),l-1),r.to=Math.max(r.from+1,r.to)):(v&&s||m&&!s)&&(r.to=Math.min(Math.max(h+1,p-y),l),r.from=Math.min(r.to-1,r.from)),r.from===u&&r.to===f||(this.move(r.from,r.to),this.trigger("select",this._rangeEventArgs(r)))}}},e.prototype._end=function(){if(this._state){var t=this._state.moveTarget;t&&A(t,"k-handle-active");var e=this._state.range;this.set(e.from,e.to),this.trigger("selectEnd",this._rangeEventArgs(e)),delete this._state}},e.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new Ht(o.x,i.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),h=s-n,l=n+h/2,c={},u=3===t.event.which,f=Math.round(l-r);this._state||u||(this.chart._unsetActivePoint(),i.options.justified||f--,c.from=Math.min(Math.max(a,n-f),p-h),c.to=Math.min(c.from+h,p),this._start(t),this._state&&(this._state.range=c,this.trigger("select",this._rangeEventArgs(c)),this._end()))},e.prototype._mousewheel=function(t){var e=this,i=gt(t);if(this._start({target:this.selection}),this._state){var o=this._state.range;t.preventDefault(),t.stopPropagation(),Math.abs(i)>1&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger("select",{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(o.from),to:this._value(o.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._end()}),150)}},e.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};var i=this._rangeEventArgs(this._state.range);this.trigger("selectStart",i)?this._state=null:t.preventDefault()},e.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},e.prototype._gesturechange=function(t){var e=this.chart,i=this._state,o=this.options,r=this.categoryAxis,n=i.range,s=e._toModelCoordinates(t.touches[0].x.location).x,a=e._toModelCoordinates(t.touches[1].x.location).x,p=Math.min(s,a),h=Math.max(s,a);t.preventDefault(),n.from=r.pointCategoryIndex(new Ht(p))||o.min,n.to=r.pointCategoryIndex(new Ht(h))||o.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},e.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},e.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},e.prototype._slot=function(t){var e=this.categoryAxis,i=this._index(t);return e.getSlot(i,i,!0)},e.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?e:t,p=o?t:e,h="x"+(o?2:1),l=this._slot(a),c=Mt(l[h]-r.left+n.left);z(this.leftMask,{width:c}),z(this.selection,{left:c}),l=this._slot(p);var u=Mt(i.width-(l[h]-r.left+n.left));z(this.rightMask,{width:u});var f=i.width-u;f!==i.width&&(f+=s.right),z(this.rightMask,{left:f}),z(this.selection,{width:Math.max(i.width-(c+u)-s.right,0)})},e.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=Pt(this._index(t),o,r),s=Pt(this._index(e),n+1,r);i.visible&&this.move(n,s),i.from=this._value(n),i.to=this._value(s)},e.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},p=j({},a);if(this._state&&(a=this._state.range),r!==d&&(a.from=Pt(Pt(n-t,0,s-1),i,o)),r!==c&&(a.to=Pt(Pt(s+t,a.from+1,o),i,o)),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},e.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e}(S.Class);Vt(In,{visible:!0,mousewheel:{zoom:"both"},min:f,max:u});var Vn=In,Bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.show=function(e){if(e&&e.tooltipAnchor&&(!this._current||this._current!==e)){var i=j({},this.options,e.options.tooltip),o=e.tooltipAnchor();o?(this._current=e,t.prototype.show.call(this,{point:e,anchor:o},i,e)):this.hide()}},e.prototype.hide=function(){delete this._current,t.prototype.hide.call(this)},e}(ur),Ln=function(t){function e(e,i){t.call(this,e.chartService,i),this.plotArea=e,this.formatService=e.chartService.format}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.showAt=function(t,e){var i=st(t,(function(t){var e=t.series.tooltip;return!(e&&!1===e.visible)}));if(i.length>0){var o=i[0],r=this.plotArea.categoryAxis.getSlot(o.categoryIx),n=e?this._slotAnchor(e,r):this._defaultAnchor(o,r);this.show({anchor:n,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options)}},e.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},e.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,r=i.center(),n=e.center();return{point:o?new Ht(r.x,n.y):new Ht(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(ur);Vt(Ln,{categoryFormat:"{0:d}"});var zn=Ln,En=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.element,e=this.options;if(t.bbox()){this.origin=e.origin;var i=e.vertical?x:m,o=this.fromScale=new S.geometry.Point(1,1);o[i]=Hi,t.transform(S.geometry.transform().scale(o.x,o.y))}else this.abort()},e.prototype.step=function(t){var e=ct(this.fromScale.x,1,t),i=ct(this.fromScale.y,1,t);this.element.transform(S.geometry.transform().scale(e,i,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(S.drawing.Animation);Vt(En,{duration:600}),S.drawing.AnimationFactory.current.register(Ni,En);var Fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(S.geometry.transform().scale(Hi,Hi,t))},e.prototype.step=function(t){this.element.transform(S.geometry.transform().scale(t,t,this.center))},e}(S.drawing.Animation);Vt(Fn,{easing:"easeOutElastic"}),S.drawing.AnimationFactory.current.register("bubble",Fn);var Dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},e.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e}(S.drawing.Animation);Vt(Dn,{duration:200,easing:"linear"}),S.drawing.AnimationFactory.current.register("fadeIn",Dn);var Un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this.element.transform(S.geometry.transform().scale(Hi,Hi,this.options.center))},e.prototype.step=function(t){this.element.transform(S.geometry.transform().scale(t,t,this.options.center))},e}(S.drawing.Animation);Vt(Un,{easing:"easeOutElastic",duration:600}),S.drawing.AnimationFactory.current.register(Yi,Un);var Hn=Un,Gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){t.prototype.render.call(this),this.renderSegments()},e.prototype.createSegment=function(t,e,i){return new("smooth"===e.style?go:ho)(t,e,i)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===Gi){var i={x:t.x,y:t.y};return Jo(i.x)||(i.x=0),Jo(i.y)||(i.y=0),i}},e}(tr);j(Gn.prototype,yo);var Nn=Gn,qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new To,this.yAxisRangeTracker=new To},e.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);var n=this.filterVisibleSeries(r);n&&(this.createScatterChart(Pr(n,"scatter"),o),this.createScatterLineChart(Pr(n,"scatterLine"),o),this.createBubbleChart(Pr(n,"bubble"),o))}this.createAxes(t)},e.prototype.appendChart=function(e,i){this.xAxisRangeTracker.update(e.xAxisRanges),this.yAxisRangeTracker.update(e.yAxisRanges),t.prototype.appendChart.call(this,e,i)},e.prototype.removeAxis=function(e){var i=e.options.name;t.prototype.removeAxis.call(this,e),e.options.vertical?(this.yAxisRangeTracker.reset(i),delete this.namedYAxes[i]):(this.xAxisRangeTracker.reset(i),delete this.namedXAxes[i]),e===this.axisX&&delete this.axisX,e===this.axisY&&delete this.axisY},e.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=st([].concat(e.xAxis),(function(t){return t.name===i}))[0],r=t.yAxis,n=st([].concat(e.yAxis),(function(t){return t.name===r}))[0],s=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(n||{}).pane||s},e.prototype.createScatterChart=function(t,e){t.length>0&&this.appendChart(new tr(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new Nn(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new rr(this,{series:t,clip:e.options.clip}),e)},e.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=j({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=kr(a.type,"log"),l=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},u=s.query(r)||l||c,f=[a.min,a.max],d=this.series,g=0;g<d.length;g++){var y=d[g],v=y[e?"yAxis":"xAxis"];if(v===a.name||0===i&&!v){var m=zi.current.bindPoint(y,0).valueFields;f.push(m[e?"y":"x"]);break}}0===i&&l&&(u.min=Math.min(u.min,l.min),u.max=Math.max(u.max,l.max));for(var x=0;x<f.length;x++)if(f[x]instanceof Date){o=!0;break}var b=new(kr(a.type,h)||!a.type&&o?hi:p?fi:ai)(u.min,u.max,a,this.chartService);if(b.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=b}return this.appendAxis(b),b},e.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++){lt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s))}for(var a=0;a<r.length;a++){lt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a))}this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},e.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,u=l.getValue(r);null!==u&&c.push(u)}a.length>0&&p.length>0&&t.trigger(i,{element:At(e),originalEvent:e,x:Mr(a),y:Mr(p)})},e.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),r=(i?o.y:o.x).indexOf(t);Xn(this.options,r,i,e),Xn(this.originalOptions,r,i,e)},e}(Fr);function Xn(t,e,i,o){j([].concat(i?t.yAxis:t.xAxis)[e],o)}Vt(qn,{xAxis:{},yAxis:{}}),j(qn.prototype,Dr);var Yn=qn,Wn=function(t){function e(e,i,o){t.call(this,o),this.value=e,this.sector=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=this.options.labels,e=this.owner.chartService,i=this.value;if(!this._rendered&&!1!==this.visible){this._rendered=!0;var o=it(t),r=this.pointData();if(o?i=o(r):t.format&&(i=e.format.auto(t.format,i)),t.visible&&(i||0===i)){if(t.position===a||"insideEnd"===t.position){if(!t.color){var s=new S.Color(this.options.color).percBrightness();t.color=s>180?n:v}t.background||(t.background=this.options.color)}else{var p=e.theme.seriesDefaults.labels;t.color=t.color||p.color,t.background=t.background||p.background}this.label=new fe(i,j({},t,{align:a,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),r),this.append(this.label)}}},e.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},e.prototype.reflowLabel=function(){var t=this.options.labels,e=this.label,i=this.sector.clone(),o=t.distance,r=i.middle();if(e){var n,s=e.box.height(),p=e.box.width();if(t.position===a)i.radius=Math.abs((i.radius-s)/2)+s,n=i.point(r),e.reflow(new Nt(n.x,n.y-s/2,n.x,n.y));else if("insideEnd"===t.position)i.radius=i.radius-s/2,n=i.point(r),e.reflow(new Nt(n.x,n.y-s/2,n.x,n.y));else{var h;(n=i.clone().expand(o).point(r)).x>=i.center.x?(h=n.x+p,e.orientation=d):(h=n.x-p,e.orientation=c),e.reflow(new Nt(h,n.y-s,n.x,n.y))}}},e.prototype.createVisual=function(){var e=this,i=this.sector,o=this.options;if(t.prototype.createVisual.call(this),this.value)if(o.visual){var r=(i.startAngle+180)%360,n=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new S.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:r,endAngle:r+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new S.drawing.Group;return e.createSegmentVisual(t),t}});n&&this.visual.append(n)}else this.createSegmentVisual(this.visual)},e.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=o.width>0?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,s={color:n,opacity:i.opacity},a=this.createSegment(e,j({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(a),Oo(i)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},j({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},e.prototype.createSegment=function(t,e){return e.singleSegment?new S.drawing.Circle(new S.geometry.Circle(new S.geometry.Point(t.center.x,t.center.y),t.radius),e):Zt.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,i=this.sector.center;j(e,{animation:{center:[i.x,i.y],delay:this.animationDelay}}),t.prototype.createAnimation.call(this)},e.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,j({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new S.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},e.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:$n(e+180)}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},e}($t),Zn=Mt(Tt(30),10),Kn=Mt(Tt(60),10);function $n(t){var e=Tt(t),i=Mt(Math.sin(e),10),o=Mt(Math.cos(e),10);return{horizontal:Math.abs(i)>Kn?a:o<0?d:c,vertical:Math.abs(i)<Zn?a:i<0?s:g}}Vt(Wn,{color:v,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:E(.5),align:p,zIndex:1,position:"outsideEnd"},animation:{type:Yi},highlight:{visible:!0,border:{width:1}},visible:!0}),j(Wn.prototype,ro);var Jn=Wn,Qn={createLegendItem:function(t,e,i){var o=this.options.legend||{},r=o.labels||{},n=o.inactiveItems||{},s=n.labels||{};if(i&&!1!==i.visibleInLegend){var a,p,h=!1!==i.visible,l=h?it(r):it(s)||it(r),c=i.category;l&&(c=l({text:c,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),h?(a={},p=e.color):(a={color:s.color,font:s.font},p=(n.markers||{}).color),Jo(c)&&""!==c&&this.legendItems.push({active:h,pointIndex:i.index,text:c,series:i.series,markerColor:p,labels:a})}}},ts=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.chartService=e.chartService,this.points=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},e.prototype.traverseDataPoints=function(t){var e=this.options,i=this.plotArea.options.seriesColors;void 0===i&&(i=[]);for(var o=i.length,r=e.series,n=r.length,s=0;s<n;s++){var p=r[s],h=p.data,l=Sr(p),c=l.total,u=l.points,f=l.count,d=360/c,g=void 0;isFinite(d)||(g=360/f);var y=void 0;y=xt(p.startAngle)?p.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===p.labels.position&&(p.labels.position=a);for(var v=0;v<u.length;v++){var m=u[v];if(m){var x=m.fields,b=m.value,_=m.visible,w=0!==b?g||b*d:0,A=1!==h.length&&Boolean(x.explode);R(p.color)||(p.color=x.color||i[v%o]),t(m.valueFields.value,new Xt(null,0,0,y,w),{owner:this,category:xt(x.category)?x.category:"",index:v,series:p,seriesIx:s,dataItem:h[v],percentage:0!==c?b/c:0,explode:A,visibleInLegend:x.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==_&&(y+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;to(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle"]})},e.prototype.addValue=function(t,e,i){var o=j({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Jn(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs;void 0===o&&(o=[]);var r=i.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new Nt(n.x1,n.y1,n.x1+s,n.y1+s),l=h.center(),c=n.center(),u=e.series.length,f=[],g=[],y=Ot(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,h.translate(c.x-l.x,c.y-l.y);for(var v=a-y,m=new Ht(v+h.x1+y,v+h.y1+y),x=0;x<r;x++){var b=i[x],_=b.sector,w=b.seriesIx;if(_.radius=v,_.center=m,o.length){var A=o[w];_.innerRadius=A.innerRadius,_.radius=A.radius}w===u-1&&b.explode&&(_.center=_.clone().setRadius(.15*_.radius).point(_.middle())),b.reflow(h);var S=b.label;S&&"outsideEnd"===S.options.position&&w===u-1&&(S.orientation===d?g.push(S):f.push(S))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),g.length>0&&(g.sort(this.labelComparator(!1)),this.rightLabelsReflow(g)),this.box=h},e.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},e.prototype.distanceBetweenLabels=function(t){var e=kt(this.points),i=e.sector,o=t.length-1,r=i.radius+e.options.labels.distance,n=[],s=t[0].box,a=Mt(s.y1-(i.center.y-r-s.height()-s.height()/2));n.push(a);for(var p=0;p<o;p++){var h=t[p+1].box;s=t[p].box,a=Mt(h.y1-s.y2),n.push(a)}return a=Mt(i.center.y+r-t[o].box.y2-t[o].box.height()/2),n.push(a),n},e.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;r>0&&(i>=0||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},e.prototype._takeDistance=function(t,e,i,o){var r=o;if(t[i]>0){var n=Math.min(t[i],r);r-=n,t[i]-=n,t[e]+=n}return r},e.prototype.reflowLabels=function(t,e){var i,o=kt(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var l=0;l<s;l++){var c=e[l],u=c.box;h+=t[l],i=this.hAlignLabel(u.x2,r.clone().expand(a),h,h+u.height(),c.orientation===d),c.orientation===d?(n.align!==p&&(i=r.radius+r.center.x+a),c.reflow(new Nt(i+u.width(),h,i,h))):(n.align!==p&&(i=r.center.x-r.radius-a),c.reflow(new Nt(i-u.width(),h,i,h))),h+=u.height()}},e.prototype.createVisual=function(){var e=this.options.connectors,i=this.points,o=i.length;t.prototype.createVisual.call(this),this._connectorLines=[];for(var r=0;r<o;r++){var n=i[r],s=n.sector,a=n.label,p=s.middle(),h=(n.options.connectors||{}).color||e.color;if(a){var l=new S.drawing.Path({stroke:{color:h,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===a.options.position){var c=a.box,u=s.center,f=s.point(p),g=new Ht(c.x1,c.center().y),y=void 0,v=void 0,m=void 0;f=s.clone().expand(e.padding).point(p),l.moveTo(f.x,f.y),a.orientation===d?(m=es(u,f,g,v=new Ht(c.x1-e.padding,c.center().y)),g=new Ht(v.x-4,v.y),(m=m||g).x=Math.min(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(y=s.center.x+s.radius+4,n.options.labels.align!==qi?y<g.x?l.lineTo(y,f.y):l.lineTo(f.x+8,f.y):l.lineTo(y,f.y),l.lineTo(g.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))):(m=es(u,f,g,v=new Ht(c.x2+e.padding,c.center().y)),g=new Ht(v.x+4,v.y),(m=m||g).x=Math.max(m.x,g.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(y=s.center.x-s.radius-4,n.options.labels.align!==qi?y>g.x?l.lineTo(y,f.y):l.lineTo(f.x-8,f.y):l.lineTo(y,f.y),l.lineTo(g.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))),l.lineTo(v.x,v.y),this._connectorLines.push(l),this.visual.append(l)}}}},e.prototype.renderVisual=function(){if(t.prototype.renderVisual.call(this),Lt(this.options.series,(function(t){return t.autoFit}))){var e=this.targetBox,i=this.box.center(),o=this.visual.bbox();if(!o)return;var r=o.bottomRight(),n=Math.min((i.y-e.y1)/(i.y-o.origin.y),(e.y2-i.y)/(r.y-i.y),(i.x-e.x1)/(i.x-o.origin.x),(e.x2-i.x)/(r.x-i.x));n<1&&this.visual.transform(S.geometry.transform().scale(n,n,[i.x,i.y]))}},e.prototype.labelComparator=function(t){var e=t?-1:1;return function(t,i){return((t.parent.sector.middle()+270)%360-(i.parent.sector.middle()+270)%360)*e}},e.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,a=s.x,p=s.y,h=Math.min(Math.abs(p-i),Math.abs(p-o));return h>n?t:a+Math.sqrt(n*n-h*h)*(r?1:-1)},e.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.animationDelay=function(t){return 70*t},e.prototype.stackRoot=function(){return this},e}($t);function es(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),s=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);if(0!==s){var a=n/s;r=new Ht(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}Vt(ts,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),j(ts.prototype,Qn),ts.prototype.isStackRoot=!0;var is=ts,os=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createPieChart(this.series)},e.prototype.createPieChart=function(t){var e=t[0],i=new is(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),vt(this.options.legend.items,e.legendItems)},e}(Fr),rs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflowLabel=function(){var e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();if(i){var n=i.box.height();if(e.position===a){o.radius-=(o.radius-o.innerRadius)/2;var s=o.point(r);i.reflow(new Nt(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return Zt.current.createRing(t,e)},e}(Jn);Vt(rs,{overlay:{gradient:"roundedGlass"},labels:{position:a},animation:{type:Yi}}),j(rs.prototype,ro);var ns=rs,ss=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addValue=function(t,e,i){var o=j({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible){var r=new ns(t,e,o);Object.assign(r,i),this.append(r),this.points.push(r)}},e.prototype.reflow=function(e){for(var i,o=this.options,r=e.clone(),n=Math.min(r.width(),r.height()),s=n/2,a=n-.85*n,p=o.series,h=p.length,l=Ot(o.padding,a),c=s-(l=l>s-5?s-5:l),u=0,f=0;f<h;f++){var d=p[f];0===f&&xt(d.holeSize)&&(i=d.holeSize,c-=d.holeSize),xt(d.size)?c-=d.size:u++,xt(d.margin)&&f!==h-1&&(c-=d.margin)}xt(i)||(c-=i=.75*((s-l)/(h+.75)));var g,y=i,v=0;this.seriesConfigs=[];for(var m=0;m<h;m++){var x=p[m];g=(y+=v)+Ot(x.size,c/u),this.seriesConfigs.push({innerRadius:y,radius:g}),v=x.margin||0,y=g}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},e}(is);Vt(ss,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var as=ss,ps=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createDonutChart(this.series)},e.prototype.createDonutChart=function(t){var e=t[0],i=new as(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e}(os),hs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initFields=function(){this.valueAxisRangeTracker=new To},e.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},e.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,o=t.getSlot(i),r=this.polarAxis.getSlot(0).center,n=t.box.translate(r.x-o.x1,r.y-o.y1);t.reflow(n)},e.prototype.createValueAxis=function(){var t,e,i=this.valueAxisRangeTracker,o=i.query(),r=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1});"log"===r.type?(t=Si,e={min:.1,max:1}):(t=wi,e={min:0,max:1});var n=i.query(name)||o||e;n&&o&&(n.min=Math.min(n.min,o.min),n.max=Math.max(n.max,o.max));var s=new t(n.min,n.max,r,this.chartService);this.valueAxis=s,this.appendAxis(s)},e.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),n=E(t.padding||{},r),s=o.clone().unpad(n),p=s.clone();p.y2=p.y1+Math.min(p.width(),p.height()),p.align(s,x,a);var h=p.clone().shrink(0,p.height()/2);i.reflow(p),e.reflow(h);var l=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:l})),this.axisBox=p,this.alignAxes(p)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(Fr),ls=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=Ht.onCircle(t.center,t.startAngle,i);return new Nt(o.x,o.y,o.x,o.y)},e}(tr);Vt(ls,{clip:!1});var cs=ls,us=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Nn);us.prototype.pointSlot=cs.prototype.pointSlot,Vt(us,{clip:!1});var fs=us,ds=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},e.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},e.prototype.strokeSegments=function(){var t=this._strokeSegments;if(!t){var e=this._polarAxisCenter(),i=new Pi(!1),o=this.points();o.push(e),(t=this._strokeSegments=i.process(o)).pop()}return t},e}(Po),gs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),i=new S.geometry.Segment([e.x,e.y]);t.segments.unshift(i),t.segments.push(i)},e}(Ao);function ys(t,e){return t.value.x-e.value.x}var vs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i){return"smooth"===(e.line||{}).style?new ds(t,e,i):new gs(t,e,i)},e.prototype.createMissingValue=function(t,e){var i;return Jo(t.x)&&"interpolate"!==e&&(i={x:t.x,y:t.y},e===Gi&&(i.y=0)),i},e.prototype.seriesMissingValues=function(t){return t.missingValues||Gi},e.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},e.prototype.sortPoints=function(t){if(t.sort(ys),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];if(i)Jo(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},e}(fs),ms=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new mi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return j(t,{majorGridLines:{type:r},minorGridLines:{type:r}},this.options.yAxis)},e.prototype.createValueAxis=function(){t.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},e.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Fr.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Pr(t,["polarLine"]),e),this.createScatterChart(Pr(t,["polarScatter"]),e),this.createAreaChart(Pr(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new fs(this,{series:t});this.appendChart(i,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var i=new cs(this,{series:t});this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new vs(this,{series:t});this.appendChart(i,e)}},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:At(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(hs);Vt(ms,{xAxis:{},yAxis:{}}),j(ms.prototype,Dr);var xs=ms;var bs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointSlot=function(t,e){var i=t.center.y-e.y1,o=Ht.onCircle(t.center,t.middle(),i);return new Nt(o.x,o.y,o.x,o.y)},e.prototype.renderSegments=function(){if(t.prototype.renderSegments.call(this),this._segments&&this._segments.length>1)for(var e=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),i=0;i<e.length;i++){var o=e[i];if(o&&o.length>1){var r=o[0].linePoints[0],n=kt(o),s=kt(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&kt(o).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?go:ho)(t,e,i),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(o.options.closed=!0),o},e}(wo);Vt(bs,{clip:!1,limitPoints:!1});var _s=bs,ws=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Po),As=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.fillToAxes=function(){},e}(Ao),Ss=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&i>0&&o&&(n=o.linePoints.slice(0),r=o),"smooth"===p?(s=new ws(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new As(t,e,i,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||Gi},e}(_s),ks=function(t){function e(e,i){t.call(this,e,null,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ns);Vt(ks,{overlay:{gradient:"none"},labels:{distance:10}});var Ps=ks,Cs=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?Bo:Vo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options,i=this.children,o=e.gap,r=e.spacing,n=i.length,s=n+o+r*(n-1),a=t.angle/s,p=t.startAngle+a*(o/2);this.forEach(i,(function(e){var i=t.clone();i.startAngle=p,i.angle=a,e.sector&&(i.radius=e.sector.radius),e.reflow(i),e.sector=i,p+=a+a*r}))},e}($t);Vt(Cs,{gap:1,spacing:0});var Ts=Cs,Ms=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new Nt;for(var s=r;s>=0&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}($t),Rs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointType=function(){return Ps},e.prototype.clusterType=function(){return Ts},e.prototype.stackType=function(){return Ms},e.prototype.categorySlot=function(t,e){return t.getSlot(e)},e.prototype.pointSlot=function(t,e){var i=t.clone(),o=t.center.y;return i.radius=o-e.y1,i.innerRadius=o-e.y2,i},e.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},e.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),t.prototype.createAnimation.call(this)},e}(Uo);Rs.prototype.reflow=oo.prototype.reflow,Vt(Rs,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Os=Rs,js=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createPolarAxis=function(){var t=new yi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},e.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&j(t,{majorGridLines:{type:r},minorGridLines:{type:r}}),this._isStacked100&&j(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),j(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){gn.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){gn.prototype.createCategoryAxesLabels.call(this,this.panes)},e.prototype.filterSeries=function(t){return t},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Pr(t,["radarArea"]),e),this.createLineChart(Pr(t,["radarLine"]),e),this.createBarChart(Pr(t,["radarColumn"]),e)},e.prototype.chartOptions=function(t){var e={series:t},i=t[0];if(i){var o=this.filterVisibleSeries(t),r=i.stack;e.isStacked=r&&o.length>1,e.isStacked100=r&&"100%"===r.type&&o.length>1,e.isStacked100&&(this._isStacked100=!0)}return e},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Ss(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new _s(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createBarChart=function(t,e){if(0!==t.length){var i=t[0],o=this.chartOptions(t);o.gap=i.gap,o.spacing=i.spacing;var r=new Os(this,o);this.appendChart(r,e),this._hasBarCharts=!0}},e.prototype.seriesCategoryAxis=function(){return this.categoryAxis},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ht(o.x,o.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:At(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(hs);j(js.prototype,Dr,{appendChart:gn.prototype.appendChart,aggregateSeries:gn.prototype.aggregateSeries,seriesSourcePoints:gn.prototype.seriesSourcePoints}),Vt(js,{categoryAxis:{categories:[]},valueAxis:{}});var Is=js,Vs=function(t){function e(e,i,o){t.call(this,i),this.value=e,this.options.index=o.index}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.points,i=this.children[0];this.box=new Nt(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new Nt(t.x1,e[0].y,t.x2,e[2].y))},e.prototype.createVisual=function(){var e,i=this,o=this.options;t.prototype.createVisual.call(this),(e=o.visual?o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:o,sender:this.getSender(),createVisual:function(){return i.createPath()}}):this.createPath())&&this.visual.append(e)},e.prototype.createPath=function(){var t=this.options,e=t.border;return S.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},e.prototype.createHighlight=function(t){return S.drawing.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=S.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Ht(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}($t);Vt(Vs,{color:v,border:{width:1}}),j(Vs.prototype,ro);var Bs=Vs,Ls=function(t){function e(e,i){t.call(this,i),this.plotArea=e,this.points=[],this.labels=[],this.legendItems=[],this.render()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},e.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var i=t.series[0],o=i.data;if(o)for(var r=Sr(i),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var h=p.fields;R(i.color)||(i.color=h.color||e[a%e.length]),h=j({index:a,owner:this,series:i,dataItem:o[a],percentage:p.value/n},h,{visible:p.visible});var l=p.valueFields.value,c=this.createSegment(l,h),u=this.createLabel(l,h);c&&u&&c.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;to(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual"]})},e.prototype.createSegment=function(t,e){var i=j({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){var o=new Bs(t,i,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},e.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=j({},this.options.labels,i.labels),s=t;if(r.visible){var a=it(r),p={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};if(a?s=a(p):r.format&&(s=this.plotArea.chartService.format.auto(r.format,s)),!r.color){var h=new S.Color(i.color).percBrightness();r.color=h>180?n:v,r.background||(r.background=i.color)}this.evalSegmentOptions(r,t,e);var l=new fe(s,j({vAlign:r.position},r),p);return this.labels.push(l),l}},e.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o=t[i].options.align;if(o!==a){var r=t[i].box.width();o===c?e.left=Math.max(e.left,r):e.right=Math.max(e.right,r)}}return e},e.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var f=r[u].percentage,d=r[u+1],g=d?d.percentage:f,y=r[u].points=[],v=o.dynamicHeight?i*f:i/n,m=void 0;m=Pt(m=f?(e-h*(g/f))/2:g?0:e/2,0,e),y.push(new S.geometry.Point(t.x1+l,t.y1+c)),y.push(new S.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new S.geometry.Point(t.x1+e-m,t.y1+v+c)),y.push(new S.geometry.Point(t.x1+m,t.y1+v+c)),l=m,c+=v+o.segmentSpacing,h=Pt(e-2*m,0,e)}},e.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,p=s?0:(e-e/o.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],f=r[c].percentage,d=o.dynamicHeight?h*f:h/n,g=o.dynamicHeight?i*f:i/n;u.push(new S.geometry.Point(t.x1+p,t.y1+l)),u.push(new S.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new S.geometry.Point(t.x1+e-p-d,t.y1+g+l)),u.push(new S.geometry.Point(t.x1+p+d,t.y1+g+l)),p+=d,l+=g+o.segmentSpacing}},e.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},e}($t);Vt(Ls,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:a,position:a,zIndex:1}}),j(Ls.prototype,Qn);var zs=Ls,Es=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){this.createFunnelChart(this.series)},e.prototype.createFunnelChart=function(t){var e=t[0],i=new zs(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(i)},e.prototype.appendChart=function(e,i){t.prototype.appendChart.call(this,e,i),vt(this.options.legend.items,e.legendItems)},e}(Fr),Fs="color",Ds="first",Us="max";Rn.current.register(gn,[Ni,qi,Xi,Wi,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),Rn.current.register(Yn,["scatter","scatterLine","bubble"]),Rn.current.register(os,[Yi]),Rn.current.register(ps,["donut"]),Rn.current.register(Es,["funnel"]),Rn.current.register(xs,["polarArea","polarLine","polarScatter"]),Rn.current.register(Is,["radarArea","radarColumn","radarLine"]),zi.current.register([Ni,qi,Xi,Wi,"area","verticalArea"],[y],["category",Fs,"noteText","errorLow","errorHigh"]),zi.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",Fs,"noteText"]),zi.current.register(["waterfall","horizontalWaterfall"],[y],["category",Fs,"noteText","summary"]),zi.current.register(["polarArea","polarLine","polarScatter"],[m,x],[Fs]),zi.current.register(["radarArea","radarColumn","radarLine"],[y],[Fs]),zi.current.register(["funnel"],[y],["category",Fs,"visibleInLegend","visible"]),Nr.current.register([Ni,qi,Xi,Wi,"area","verticalArea","waterfall","horizontalWaterfall"],{value:Us,color:Ds,noteText:Ds,errorLow:"min",errorHigh:Us}),Nr.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:Us,color:Ds,noteText:Ds}),Nr.current.register(["radarArea","radarColumn","radarLine"],{value:Us,color:Ds}),zi.current.register(["scatter","scatterLine","bubble"],[m,x],[Fs,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),zi.current.register(["bubble"],[m,x,"size"],[Fs,"category","noteText"]),zi.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",Fs,"downColor","noteText"]),Nr.current.register(["candlestick","ohlc"],{open:Us,high:Us,low:"min",close:Us,color:Ds,downColor:Ds,noteText:Ds}),zi.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",Fs,"noteText"]),Nr.current.register(["boxPlot","verticalBoxPlot"],{lower:Us,q1:Us,median:Us,q3:Us,upper:Us,mean:Us,outliers:Ds,color:Ds,noteText:Ds}),zi.current.register(["bullet","verticalBullet"],["current","target"],["category",Fs,"visibleInLegend","noteText"]),Nr.current.register(["bullet","verticalBullet"],{current:Us,target:Us,color:Ds,noteText:Ds}),zi.current.register([Yi,"donut"],[y],["category",Fs,"explode","visibleInLegend","visible"]);var Hs=["category",y,m,x],Gs=function(t){function e(e,i,o,r){var n=this;void 0===r&&(r={}),t.call(this),this.observers=[],this.addObserver(r.observer),this.chartService=new K(this,r),this.chartService.theme=o,this._initElement(e);var s=j({},this.options,i);this._originalOptions=j({},s),this._theme=o,this._initTheme(s,o),this._initHandlers(),this._initSurface(),this.bindCategories(),It.preloadFonts(i,(function(){n.fontLoaded=!0,n._destroyed||(n.trigger("init"),n._redraw(),n._attachEvents())}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},e.prototype._setElementClass=function(t){_(t,"k-chart")},e.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i,function(t){for(var e=Hs,i=0;i<e.length;i++){var o=e[i]+"Axes";t[o]&&(t[e[i]+"Axis"]=t[o],delete t[o])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=j({},e,t),this.applySeriesColors()},e.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},e.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=e.width>0||e.height>0;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Lt(this._selections,(function(t){return!t.visible}))&&(this._destroySelections(),this._setupSelection())},e.prototype._resize=function(){this._noTransitionsRedraw()},e.prototype.redraw=function(t){if(this.applyDefaults(this.options),this.applySeriesColors(),t){var e=this._model._plotArea,i=e.findPane(t);e.redraw(i)}else this._redraw()},e.prototype.getAxis=function(t){return Ti(t,this._plotArea.axes)},e.prototype.findAxisByName=function(t){return this.getAxis(t)},e.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new Ri(e[i])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Ri(e[t])},e.prototype.plotArea=function(){return new Oi(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var i,o,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];R(e)?i=n.filterPoints(e):(I(e)?(o=e.series,r=e.category):o=r=e,i="donut"===s.type?Ns(n.pointsBySeriesName(o),r):s.type===Yi||"funnel"===s.type?Ns((n.charts[0]||{}).points,r):n.pointsBySeriesName(o));i&&this.togglePointsHighlight(t,i)},e.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},e.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;if(R(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&xt(t)&&(i=n.categoryAxis.categoryIndex(t)),o){if(i>=0){var s=this._plotArea.pointsByCategoryIndex(i);r.showAt(s)}}else e&&r.show(e)},e.prototype.hideTooltip=function(){this._tooltip.hide()},e.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&wt(e,{width:i.width}),i.height&&wt(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=S.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},e.prototype._surfaceWrap=function(){return this.element},e.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.setup()})),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse((function(t){t.animation&&t.animation.play()})),this._tooltip=this._createTooltip(),this._highlight=new vn,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Zs(this._plotArea.panes),this._navState||this._cancelDomEvents()},e.prototype.exportVisual=function(t){var e;if(t&&(t.width||t.height||t.options)){var i=this.options,o=j({},t.options,{chartArea:{width:t.width,height:t.height}});Ws(this._originalOptions,o),this.options=j({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),Zs(r._plotArea.panes),e=r.visual,this.options=i}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof gn&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new _n(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new An(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Sn(this,e))},e.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,r=!(t||!1!==e&&!1!==i||this.requiresHandlers(["dragStart","drag","dragEnd"])),n=(!1===e||!1===o)&&!this.requiresHandlers(["zoomStart","zoom","zoomEnd"]),s=this.element;this._dragZoomEnabled&&r&&n?(s.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||r&&n||(s.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!r,!n)},e.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},e.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Bn(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new zn(this._plotArea,t)},e.prototype.applyDefaults=function(t,e){!function(t,e){var i,o,r,n=(e||{}).axisDefaults||{};function s(t){var e=(t||{}).color||o.color,r=j({},n,n[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete r[i],r}for(var a=0;a<Hs.length;a++)i=Hs[a]+"Axis",o=t.axisDefaults||{},r=(r=[].concat(t[i])).map(s),t[i]=r.length>1?r:r[0]}(t,e),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=j({},t.seriesDefaults),s=e?j({},e.seriesDefaults):{},a=j({},s);qs(n),qs(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,l=j({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=l,i[p]=j({},l,i[p]),i[p].data=i[p].data||[]}}(t,e)},e.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},e.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new ne(this._modelOptions());return i.chart=this,i._plotArea=e,ge.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new Tn(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return j({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return Rn.current.create(t?[]:e.series,e,this.chartService)},e.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o=t[i],r=o.options;if(o instanceof qe&&r.select&&!r.vertical){var n=o.range(),s=new Vn(this,o,j({min:n.min,max:n.max},r.select));e.push(s)}}},e.prototype._selectStart=function(t){return this.trigger("selectStart",t)},e.prototype._select=function(t){return this.trigger("select",t)},e.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},e.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(S.throttle)(this._mousemove.bind(this),20)},e.prototype.addObserver=function(t){t&&this.observers.push(t)},e.prototype.removeObserver=function(t){var e=this.observers.indexOf(t);e>=0&&this.observers.splice(e,1)},e.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},e.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point)),e.sender=this;for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},e.prototype._attachEvents=function(){var t,e,i=this.element;this._touchAction=i.style.touchAction,mt(i,((t={}).contextmenu=this._clickHandler,t[Ki]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&mt(i,((e={}).mousemove=this._mousemove,e)),this.domEvents=J.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},e.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},e.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},e.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},e.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger("zoomEnd",{}))},e.prototype._gesturechange=function(t){var e=this._mousewheelZoom;if(e&&!this._stopChartHandlers(t)){t.preventDefault();var i=this._gestureDistance,o=-t.distance/i+1;if(Math.abs(o)>=.1){o=Math.round(10*o),this._gestureDistance=t.distance;var r={delta:o,axisRanges:Xs(this._plotArea.axes),originalEvent:t};if(this._zooming||!this.trigger("zoomStart",r))this._zooming||(this._zooming=!0),(r.axisRanges=e.updateRanges(o))&&!this.trigger("zoom",r)&&e.zoom()}}},e.prototype._mouseout=function(t){if(t.element){var e=this._drawingChartElement(t.element,t);e&&e.leave&&e.leave(this,t.originalEvent)}},e.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart","drag","dragEnd"])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Xs(this._plotArea.axes),originalEvent:t}))},e.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger("drag",{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a=n[s];if(a.options.name){var p=a.options.vertical?t.y:t.x,h=p.startLocation-p.location;0!==h&&(r[a.options.name]=a.translateRange(h))}}e.axisRanges=r,this.trigger("drag",{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},e.prototype._end=function(t){if(!this._stopChartHandlers(t)){var e=this._pannable;if(e&&e.end(t)?(this.surface.resumeTracking(),this.trigger("dragEnd",{axisRanges:Xs(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,"dragEnd"),this._zoomSelection){var i=this._zoomSelection.end(t);i&&!this.trigger("zoom",{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger("zoomEnd",{axisRanges:i,originalEvent:t}))}}},e.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var i=this._eventCoordinates(t),o=this._plotArea.paneByPoint(i);if(o)for(var r=0;r<e.length;r++)if(e[r].onPane(o))return!0},e.prototype._mousewheel=function(t){var e=this,i=gt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Xs(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i),n.axisRanges&&!this.trigger("zoom",n)&&o.zoom(),this._mwTimeout=setTimeout((function(){e.trigger("zoomEnd",n),e._zooming=!1,e.surface&&e.surface.resumeTracking()}),150))}else{var s=this._navState;if(!s)this._startNavigation(t,r,"zoomStart")||(s=this._navState);if(s){var a=s.totalDelta||i;s.totalDelta=a+i;for(var p=this._navState.axes,h={},l=0;l<p.length;l++){var c=p[l],u=c.options.name;u&&(h[u]=c.scaleRange(-a))}this.trigger("zoom",{delta:i,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout((function(){e._endNavigation(t,"zoomEnd")}),150)}}},e.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),n=o.axes.slice(0);if(r){var s=Xs(n);this.trigger(i,{axisRanges:s,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:s,pane:r,axes:n})}},e.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},e.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},e.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),i&&(o=o.closest(i))&&o.aliasFor&&(o=o.aliasFor()),o},e.prototype._eventCoordinates=function(t){var e=St(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=z(this.element,["paddingLeft","paddingTop"]),e=t.paddingLeft,i=t.paddingTop;this._padding={top:i,left:e}}return this._padding},e.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=_t(this.element);return{left:Mt(t.x+e.left+i.left),top:Mt(t.y+e.top+i.top)}},e.prototype._toModelCoordinates=function(t,e){var i=this.element,o=_t(i),r=this._elementPadding(),n=Dt(i).invert(),s=new S.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(n);return new Ht(s.x,s.y)},e.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout((function(){e.handlingTap=!1}),0)},e.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},e.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},e.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var i=this._drawingChartElement(t,e,(function(t){return(t.hover||t.over)&&!(t instanceof Fr)})),o=this._activePoint,r=this._plotArea.series.length>1,n=this._hasInactiveOpacity();return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover?(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),n?this._displayInactiveOpacity(i,r):this._highlight.show(i))):!i&&n&&(r&&this._activеChartInstance&&(this._updateSeriesOpacity(i,!0),this._applySeriesOpacity(this._activеChartInstance.children,null,!0),this._activеChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),i},e.prototype._displayTooltip=function(t){j({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},e.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activеChartInstance=this._chartInstanceFromPoint(t);if(e)this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t);else{var r;if(!o.supportsPointInactiveOpacity())return void this._highlight.show(t);(r=this._getInactivePoints(t,o))&&r.length&&this._highlight.show(r,1-this._getInactiveOpacityForSeries(t.series))}},e.prototype._getInactivePoints=function(t,e){return this._getAllPointsOfType(e,t.constructor).filter((function(e){return e!==t}))},e.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},e.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t,t.over(this,e))},e.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},e.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n=t[r],s=n.series||o;if(s&&n.visual){var a=o?o.opacity:n.series.opacity;(s!==e||i)&&n.visual.opacity(i?1:a)}n.children&&n.children.length&&this._applySeriesOpacity(n.children,e,i,n.series)}},e.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},e.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=this.options.series.filter((function(t){return void 0!==t.highlight.inactiveOpacity})).length>0;return t||e},e.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},e.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},e.prototype._mouseover=function(t){var e,i=this._startHover(t.element,t.originalEvent);i&&i.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),mt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)))},e.prototype._mouseMoveTracking=function(t){var e,i=this.options,o=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);if(this._plotArea.box.containsPoint(s)){if(n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint){var a=n.parent.getNearestPoint(s.x,s.y,n.seriesIx);if(a&&a!==n)if(this._activePoint=a,!a.hover(this,t))j({},i.tooltip,a.options.tooltip).visible&&o.show(a),r.show(a)}}else Rt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null},e.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;if(this._trackCrosshairs(e),i.hover){var o=i.backgroundContainsPoint(e);o?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!o&&(this.trigger("plotAreaLeave"),i.hovered=!1)}this._sharedTooltip()&&this._trackSharedTooltip(e,t)},e.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},e.prototype._trackSharedTooltip=function(t,e,i){if(!this._suppressHover){var o=this.options.tooltip,r=this._plotArea,n=this._plotArea.categoryAxis,s=this._tooltip,a=this._highlight;if(r.backgroundContainsPoint(t)){var p=n.pointCategoryIndex(t);if(p!==this._tooltipCategoryIx||!this._sharedHighlight&&i){var h=r.pointsByCategoryIndex(p),l=h.map((function(t){return t.eventArgs(e)})),c=l[0]||{};c.categoryPoints=l,h.length>0&&!this.trigger("seriesHover",c)?(o.visible&&s.showAt(h,t),a.show(h),this._sharedHighlight=!0):s.hide(),this._tooltipCategoryIx=p}else i&&this._sharedHighlight&&(a.hide(),s.hide(),this._sharedHighlight=!1)}else this._sharedHighlight&&(a.hide(),s.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1)}},e.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},e.prototype._unsetActivePoint=function(t){var e=this._tooltip,i=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,i&&i.hide()},e.prototype._deferRedraw=function(){this._redraw()},e.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},e.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},e.prototype.bindCategoryAxisFromSeries=function(t,e){for(var i,o=this.options.series,r=o.length,n=new ht,s=[],a=!1,p=0;p<r;p++){var h=o[p],l=h.categoryAxis===t.name||!h.categoryAxis&&0===e,c=h.data,u=c.length,f=h.categoryField&&l;if(a=f||a,f&&u>0)for(var d=(i=Tr(t,Bi(h.categoryField,c[0])))?Cr:Bi,g=0;g<u;g++){var y=c[g],v=d(h.categoryField,y,this.chartService.intl);!i&&n.get(v)||(s.push([v,y]),i||n.set(v,!0))}}if(s.length>0){i&&(s=function(t,e){void 0===e&&(e=Ve);for(var i=function(t,e){void 0===e&&(e=Ve);for(var i=1,o=t.length;i<o;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}(t,e),o=i.length,r=o>0?[i[0]]:[],n=1;n<o;n++)0!==e(i[n],kt(r))&&r.push(i[n]);return r}(s,(function(t,e){return Ve(t[0],e[0])})));var m=function(t){for(var e=t.length,i=[],o=0;o<e;o++)for(var r=t[o],n=r.length,s=0;s<n;s++)i[s]=i[s]||[],i[s].push(r[s]);return i}(s);t.categories=m[0]}else a&&(t.categories=[])},e.prototype._isBindable=function(t){for(var e=zi.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===y?r="field":r+="Field",!xt(t[r])){i=!1;break}}return i},e.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(e.transitions=!1,t=!0),this._redraw(),t&&(e.transitions=!0)},e.prototype._legendItemHover=function(t,e){var i,o=this._plotArea,r=this._highlight,n=(o.srcSeries||o.series)[t];if(i=lt(n.type,[Yi,"donut","funnel"])?o.findPoint((function(i){return i.series.index===t&&i.index===e})):o.pointsBySeriesIndex(t),this._hasInactiveOpacity()&&n.visible&&i){var s=o.series.length>1,a=i.length?i[0]:i;this._displayInactiveOpacity(a,s,i)}else r.show(i)},e.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},e.prototype.updateMouseMoveHandler=function(){var t,e;Rt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&mt(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){Ws(this._originalOptions,t),this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},e.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},e.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},e.prototype.setIntlService=function(t){this.chartService.intl=t},e.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},e.prototype.destroy=function(){var t,e;this._destroyed=!0,Rt(this.element,((t={}).contextmenu=this._clickHandler,t[Ki]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Rt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},e.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},e.prototype._destroySelections=function(){var t=this._selections;if(t)for(;t.length>0;)t.shift().destroy()},e.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},e}(S.Class);function Ns(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function qs(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Xs(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var Ys=["data","categories"];function Ws(t,e){for(var i in e)if(!lt(i,Ys)&&e.hasOwnProperty(i)){var o=e[i],r=t[i];if(xt(r)){var n=null===o;n||!xt(o)?(delete t[i],n&&delete e[i]):r&&I(o)&&I(r)&&Ws(r,o)}}}function Zs(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}Vt(Gs,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:qi,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var Ks=Gs,$s=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new Ht(this.plotArea.box.x2,e.center().y):new Ht(e.center().x,-2),align:o}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(zn),Js=[Ni,"bullet"];function Qs(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function ta(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function ea(t){return C(t)?[t]:t}var ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._setElementClass=function(t){_(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(wt(e).width)},e.prototype._resize=function(){var e=this.element,i=Qs(e.childNodes);this._initialWidth=Math.floor(wt(e).width),ta(e.childNodes,i),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Qs(e.childNodes),o=document.createElement("span");o.innerHTML=" ",e.appendChild(o);var r=j({width:this._autoWidth,height:wt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return wt(e,{width:r.width,height:r.height}),e.removeChild(o),ta(e.childNodes,i),this.surface&&this.surface.resize(),r},e.prototype._surfaceWrap=function(){if(!this.stage){var t=this.stage=document.createElement("span");this.element.appendChild(t)}return this.stage},e.prototype._createPlotArea=function(e){var i=t.prototype._createPlotArea.call(this,e);return this._autoWidth=this._initialWidth||this._calculateWidth(i),i},e.prototype._calculateWidth=function(t){for(var e=this.options,i=E(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],p=(a.options.series||[])[0];if(p){if(p.type===Ni)return 150;if("bullet"===p.type)return 150;if(p.type===Yi)return wt(r).height;var h=a.categoryAxis;if(h){var l=h.categoriesCount()*(!a.options.isStacked&<(p.type,[qi,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,l)}}}var c=n*e.pointWidth;return c>0&&(c+=i.left+i.right),c},e.prototype._createSharedTooltip=function(t){return new $s(this._plotArea,t)},e.normalizeOptions=function(t){var e=ea(t);return(e=b(e)?{seriesDefaults:{data:e}}:j({},e)).series||(e.series=[{data:ea(e.data)}]),j(e,{seriesDefaults:{type:e.type}}),(lt(e.series[0].type,Js)||lt(e.seriesDefaults.type,Js))&&(e=j({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(Ks);Vt(ia,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var oa=ia,ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){this._initialOpacity=parseFloat(z(this.element,"opacity").opacity)},e.prototype.step=function(t){z(this.element,{opacity:String(ct(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),z(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),z(this.element,{opacity:String(this._initialOpacity)})},e}(S.drawing.Animation);function na(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var sa=function(t){function e(e,i,o){t.call(this),this.options=j({},this.options,o),this.container=e,this.chartService=i;var r=z(e,["paddingLeft","paddingTop"]);this.chartPadding={top:r.paddingTop,left:r.paddingLeft},this.createElements(),e.appendChild(this.element)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createElements=function(){var t=this.element=na("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=na("k-tooltip k-chart-tooltip"),i=this.scroll=na("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(i)},e.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Me(Le(t)+Le(e-t)/2),p=.4*i.width(),h=i.center().x-p,l=(i.center().x-h)/(r.max-r.min),c=a-r.min,u=this.chartService.intl.format(r.format,t,e),f=it(r);this.clearHideTimeout(),this._visible||(z(o,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(u=f({from:t,to:e})),s.innerHTML=u,z(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});var d=z(s,["marginTop","borderTopWidth","height"]);z(n,{width:p,left:h+c*l,top:i.y1+d.marginTop+d.borderTopWidth+d.height/2}),z(o,{visibility:"visible"})},e.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},e.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout((function(){t._visible=!1,t._hideAnimation=new ra(t.element),t._hideAnimation.setup(),t._hideAnimation.play()}),this.options.hideDelay)},e.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},e}(S.Class);Vt(sa,{format:"{0:d} - {1:d}",hideDelay:500});var aa=sa,pa="_navigator",ha=pa;function la(){}var ca=function(t){function e(e){var i;t.call(this),this.chart=e;var o=this.options=j({},this.options,e.options.navigator),r=o.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),xt(o.hint.visible)||(o.hint.visible=o.visible),this.chartObserver=new ft(this,((i={}).drag="_drag",i.dragEnd="_dragEnd",i.zoom="_zoom",i.zoomEnd="_zoomEnd",i)),e.addObserver(this.chartObserver)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parseDate=function(t){return Ue(this.chart.chartService.intl,t)},e.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},e.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},e.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},e.prototype.initSelection=function(){var t,e=this.chart,i=this.options,o=this.mainAxis(),r=o.roundedRange(),n=r.min,s=r.max,a=i.select,p=a.from,h=a.to,l=a.mousewheel,c=(t=o,la.prototype=t,new la);0!==o.categoriesCount()&&(this.clean(),c.box=o.box,this.selection=new Vn(e,c,{min:n,max:s,from:p||n,to:h||s,mousewheel:Ot(l,{zoom:"left"}),visible:i.visible},new ft(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),i.hint.visible&&(this.hint=new aa(e.element,e.chartService,{min:n,max:s,template:it(i.hint),format:i.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[ha].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},r=o.from||e;r<e&&(r=e);var n=o.to||i;n>i&&(n=i),this.options.select=j({},o,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(kt(e.panes),t)},e.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},e.prototype._drag=function(t){var e,i=this.chart,o=this.selection,r=i._eventCoordinates(t.originalEvent),n=this.mainAxis(),s=n.roundedRange(),a=n.pane.box.containsPoint(r),p=i._plotArea.categoryAxis,h=t.axisRanges[p.options.name],l=this.options.select;if(h&&!a&&o){e=l.from&&l.to?Le(l.to)-Le(l.from):Le(o.options.to)-Le(o.options.from);var c=Me(Pt(Le(h.min),s.min,Le(s.max)-e)),u=Me(Pt(Le(c)+e,Le(s.min)+e,s.max));this.options.select={from:c,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(c,u),this.showHint(c,u)}},e.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},e.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,o=this.options.select;o.from=e,o.to=i},e.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,i=t.from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==pa&&(n.min=i,n.max=o)}},e.prototype.filter=function(){var t=this.chart,e=this.options.select;if(t.requiresHandlers(["navigatorFilter"])){var i=this.mainAxis(),o={from:e.from,to:e.to};if("category"!==i.options.type){var r=new ti(j({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;o.from=Oe(r.min,-r.baseUnitStep,r.baseUnit),o.to=Oe(r.max,r.baseUnitStep,r.baseUnit)}this.chart.trigger("navigatorFilter",o)}},e.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,i=this.selection,o=this.options,r=o.select,n=o.liveDrag,s=this.mainAxis(),a=t.delta;if(i){var p=s.categoryIndex(i.options.from),h=s.categoryIndex(i.options.to);t.originalEvent.preventDefault(),Math.abs(a)>1&&(a*=3),h-p>1?(i.expand(a),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta).min),n&&(this.filterAxes(),this.redrawSlaves()),i.set(r.from,r.to),this.showHint(this.options.select.from,this.options.select.to)}},e.prototype._zoomEnd=function(t){this._dragEnd(t)},e.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},e.prototype._selectStart=function(t){return this.chart._selectStart(t)},e.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},e.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},e.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[ha]},e.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},e.setup=function(t,i){if(void 0===t&&(t={}),void 0===i&&(i={}),!t.__navi){t.__navi=!0;var o=j({},i.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=j({},o.pane,{name:pa});o.visible||(n.visible=!1,n.height=.1),r.push(n),e.attachAxes(t,o),e.attachSeries(t,o,i)}},e.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),n=0===Pr(i,Zi).length,s=j({type:"date",pane:pa,roundToBaseUnit:!n,justified:n,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),a=e.categoryAxis;o.push(j({},s,{maxDateGroups:200},a,{name:ha,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),j({},s,a,{name:ha+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),j({},s,a,{name:ha+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(j({name:ha,pane:pa,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},e.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(j({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:ha,categoryAxis:ha,autoBind:e.autoBindElements}))},e}(S.Class),ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyDefaults=function(e,i){var o=wt(this.element).width||600,r=i,n={seriesDefaults:{categoryField:e.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}};r&&(r=j({},r,n)),ca.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){_(t,"k-chart k-stockchart")},e.prototype.setOptions=function(e){this.destroyNavigator(),t.prototype.setOptions.call(this,e)},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},e.prototype._resize=function(){this.noTransitionsRedraw()},e.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},e.prototype._dirty=function(){var t=this.options,e=st([].concat(t.series,t.navigator.series),(function(t){return t&&t.visible})).length,i=this._seriesCount!==e;return this._seriesCount=e,i},e.prototype._fullRedraw=function(){var e=this.navigator;e||(e=this.navigator=new ca(this),this.trigger("navigatorCreated",{navigator:e})),e.clean(),e.setRange(),t.prototype._redraw.call(this),e.initSelection()},e.prototype._trackSharedTooltip=function(e){var i=this._plotArea.paneByPoint(e);i&&i.options.name===pa?this._unsetActivePoint():t.prototype._trackSharedTooltip.call(this,e)},e.prototype.bindCategories=function(){t.prototype.bindCategories.call(this),this.copyNavigatorCategories()},e.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===ha?t=o.categories:t&&o.pane===pa&&(o.categories=t)}},e.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},e.prototype.destroy=function(){this.destroyNavigator(),t.prototype.destroy.call(this)},e.prototype._stopChartHandlers=function(e){var i=this._eventCoordinates(e),o=this._plotArea.paneByPoint(i);return t.prototype._stopChartHandlers.call(this,e)||o&&o.options.name===pa},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(Ks);Vt(ua,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var fa=ua,da=Math.PI/180;function ga(t,e){var i=t.getOrigin(),o=t.getSize(),r=E(e);return t.setOrigin([i.x-r.left,i.y-r.top]),t.setSize([o.width+(r.left+r.right),o.height+(r.top+r.bottom)]),t}var ya=S.drawing.Group,va=S.drawing.Path,ma=S.drawing.Text;function xa(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",s=va.fromRect(new S.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),a=new ma(t.text,new S.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),p=ga(a.bbox().clone(),e.padding),h=va.fromRect(p,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),l=new ya;return l.append(s),l.append(h),l.append(a),l}function ba(t,e,i){var o=xt(t.from)?t.from:f,r=xt(t.to)?t.to:u;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function _a(t,e){var i=E(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,ga(t,i)}var wa=S.drawing.Path,Aa=S.drawing.Surface,Sa=function(t){function e(e,i,o,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=o,this.contextService=new K(this,r),this._originalOptions=j({},this.options,i),this.options=j({},this._originalOptions),this._initTheme(o),this.redraw()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},e.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},e.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},e.prototype.exportVisual=function(){return this._visuals},e.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(b(t))for(var r=0;r<t.length;r++)C(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},e.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},e.prototype.resize=function(){this.noTransitionsRedraw()},e.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},e.prototype.redraw=function(){var t=this._surfaceSize(),e=new S.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var i=_a(e.bbox(),this._gaugeAreaMargin);this.reflow(i)},e.prototype.setOptions=function(t,e){this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),this._initTheme(e),this.redraw()},e.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},e.prototype.setIntlService=function(t){this.contextService.intl=t},e.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=j({},e,this.options);var i=this.options,o=i.pointer;if(b(o)){for(var r=[],n=0;n<o.length;n++)r.push(j({},e.pointer,o[n]));i.pointer=r}},e.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},o=new S.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,i.width>0&&(o=_a(o,i.width)),wa.fromRect(o,{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},e.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();wt(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Aa.create(i,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&j(e,t.gaugeArea),e},e.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},e.prototype.getSize=function(){return this._getSize()},e.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,o=t.offsetHeight;return i||(i=e.width),o||(o=e.height),{width:i,height:o}},e.prototype._defaultSize=function(){return{width:200,height:200}},e.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e}(S.Class);Vt(Sa,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var ka=Sa,Pa=S.drawing.Path,Ca=S.drawing.Group,Ta=S.geometry.Point;function Ma(t,e){var i,o,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(i=new Ta(n,r),o=new Ta(n+e.size,r)):(i=new Ta(r,s),o=new Ta(r,s+e.size)),new Pa({stroke:{color:e.color,width:e.width}}).moveTo(i).lineTo(o)}function Ra(t,e,i,o){var r=e.length;if(o.visible)for(var n=i.mirror,s=i.lineBox,a=o.skip;a<r;a+=o.step)a%o.skipUnit!=0&&(i.tickX=n?s.x2:s.x2-o.size,i.tickY=n?s.y1-o.size:s.y1,i.position=e[a],t.append(Ma(i,o)))}var Oa=function(t){function e(e,i){var o=e||{};!xt(o.reverse)&&!1===o.vertical&&(i||{}).rtl&&(o=Object.assign({},o,{reverse:!0})),t.call(this,0,1,o,i),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=j({},this.options,t);return(e=j({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||Ut(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Ca,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},e.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Ca,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=ba(n[h],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,f=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):f.y2+=p*(r?-1:1),s.append(Pa.fromRect(new S.geometry.Rect([u.x1,f.y1],[u.x2-u.x1,f.y2-f.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},e.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Ca,o=0;o<t.length;o++)i.append(xa(t[o],e.labels));return i},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Ca;if(t.width>0&&t.visible){var o=new Pa({stroke:{color:t.color,dashType:t.dashType,width:t.width}});o.moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(o)}return i},e.prototype.renderTicks=function(){var t=new Ca,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Ra(t,this.getMajorTickPositions(),o,e.majorTicks),Ra(t,this.getMinorTickPositions(),o,j({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e}(ai);Vt(Oa,{min:0,max:50,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var ja=Oa,Ia=function(t){function e(e,i){t.call(this);var o=e.options,r=o.min,n=o.max,s=this.options=j({},this.options,i);s.fill=s.color,this.scale=e,xt(s.value)?s.value=Pt(s.value,r,n):s.value=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,r=o.min,n=o.max;e._oldValue=xt(e._oldValue)?e.value:r,e.value=Pt(t,r,n),this.elements&&this.repaint()},e}(S.Class);Vt(Ia,{color:n});var Va=Ia,Ba=function(t){function e(e,i){t.call(this,e,i),this.options=j({track:{visible:xt(i.track)}},this.options)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=o.track.size||o.size,l=o.size/2,c=E(o.margin),u=a?c[s?"left":"right"]:c[s?"bottom":"top"];u=s?-u:u,a?(i=new Nt(p.x1+u,p.y1,p.x1+u,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new Nt(p.x2+u,p.y1-l,p.x2+u,p.y2+l))):(i=new Nt(p.x1,p.y1-u,p.x2,p.y1-u),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new Nt(p.x1-l,p.y1-u,p.x2+l,p.y1-u))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},e.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:xt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},e.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,o=i.mirror,r=i.vertical,n=E(e.margin);return r?n[o?"left":"right"]:n[o?"bottom":"top"]},e}(Va);Vt(Ba,{shape:"barPointer",track:{border:{width:1}},color:n,border:{width:1},opacity:1,margin:E(3),animation:{type:"barPointer"},visible:!0});var La=Ba,za=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e);var s=this.fromScale=new S.geometry.Point(i.x1,i.y1),a=this.toScale=new S.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(s.distanceTo(a)/t.duration*1e3,1))},e.prototype.step=function(t){var e=ct(this.fromScale.x,this.toScale.x,t),i=ct(this.fromScale.y,this.toScale.y,t);this.element.transform(S.geometry.transform().translate(e,i))},e}(S.drawing.Animation);Vt(za,{easing:"linear",duration:250}),S.drawing.AnimationFactory.current.register("arrowPointer",za);var Ea=za,Fa=S.geometry.Point,Da=S.drawing.Path,Ua=function(t){function e(e,i){t.call(this,e,i),xt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new Fa(0,0-i),new Fa(0-o*e,0),new Fa(0,0+i)]:[new Fa(0-i,0),new Fa(0,0+o*e),new Fa(0+i,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=new Ea(this.elements,j(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type="arrowPointer";var r=new Da({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),n=t.getSlot(e.value);return r.transform(S.geometry.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(La),Ha=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?x:m,i=this.to=t.newPoints[0][e],o=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-o)/t.speed*1e3,1)),this._set(o)},e.prototype.step=function(t){var e=ct(this.from,this.to,t);this._set(e)},e.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},e}(S.drawing.Animation);Vt(Ha,{easing:"linear",speed:250}),S.drawing.AnimationFactory.current.register("barPointer",Ha);var Ga=Ha,Na=S.drawing.Group,qa=S.drawing.Path,Xa=function(t){function e(e,i){t.call(this,e,i),xt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,n=o.vertical,s=r===n?-1:1,a=i.size*s,p=e.getSlot(e.options.min),h=e.getSlot(t),l=n?x:m,c=n?m:x,u=this._margin()*s,f=new S.geometry.Point;f[l]=p[l+"1"],f[c]=p[c+"1"];var d=new S.geometry.Point;d[l]=h[l+"1"],d[c]=h[c+"1"],n?(f.translate(u,0),d.translate(u,0)):(f.translate(0,u),d.translate(0,u));var g=d.clone(),y=f.clone();return n?(g.translate(a,0),y.translate(a,0)):(g.translate(0,a),y.translate(0,a)),[f,d,g,y]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue);o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close();var n=new Ga(o,j(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(n.options.duration=0),n.setup(),n.play()},e.prototype.render=function(){var t=new Na,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var i=this.pointerPath=new qa({stroke:e.stroke,fill:e.fill});return t.append(i),this.elements=t,t},e.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new qa.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},e}(La),Ya=S.drawing.Group,Wa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,r=new Nt(i,o,i+t.width(),o+t.height());this.scale.reflow(r),this._shrinkScaleWidth(r);for(var n=0;n<e.length;n++)e[n].reflow();this.bbox=this._getBox(r),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},e.prototype._buildVisual=function(){var t=new Ya,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},e.prototype._createModel=function(){var t=this.options,e=this.scale=new ja(t.scale,this.contextService);this.pointers=[];var i=t.pointer;i=b(i)?i:[i];for(var o=0;o<i.length;o++){var r=j({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Ua:Xa;this.pointers.push(new n(e,r))}},e.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},e.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return i.options.vertical?(e=n.width()/2,n=new Nt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new Nt(t.x1,r.y-e,t.x2,r.y+e)),n},e.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new Nt(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new Nt(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},e.prototype._shrinkScaleWidth=function(t){var e=this.scale;if(!e.options.vertical){var i=e.contentBox().width()-t.width();i>0&&(e.box.shrink(i,0),e.box.alignTo(t,"center"),e.reflow(e.box))}},e.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e}(ka);Vt(Wa,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Za=Wa,Ka=S.drawing.Arc,$a=S.drawing.Path,Ja=S.drawing.Group;function Qa(t,e,i,o){var r=new Ja,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new S.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new $a({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(h))}return r}function tp(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var ep=function(t){function e(e,i){t.call(this,0,1,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initUserOptions=function(t){var e=j({},this.options,t);return e.majorUnit=e.majorUnit||Ut(e.min,e.max),e.minorUnit=e.minorUnit||e.majorUnit/10,e},e.prototype.initFields=function(){},e.prototype.render=function(t,e){var i=this.renderArc(t,e);this.bbox=i.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},e.prototype.reflow=function(t){var e=t.center(),i=Math.min(t.height(),t.width())/2;if(!xt(this.bbox))return this.render(e,i);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},e.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,a=s-n;return(r?s-(t-i)/(o-i)*a:(t-i)/(o-i)*a+n)+180},e.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},e.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,o=0;return e.visible&&(o=e.size),i.visible&&(o=Math.max(i.size,o)),o},e.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new Ja,s=.05*i;xt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=xt(this.labelElements);p&&(i-=this.ticksSize(),this.hasRanges()&&!h&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,c=l.length,u=E(a.padding),f=(u.left+u.right)/2,d=(u.top+u.bottom)/2,g=0;g<c;g++){var y=l[g],v=y.box.width()/2,m=y.box.height()/2,x=o[g],b=(x-180)*da,_=e.pointAt(x),w=_.x+Math.cos(b)*(v+f)*(p?1:-1),A=_.y+Math.sin(b)*(m+d)*(p?1:-1);y.reflow(new Nt(w-v,A-m,w+v,A+m));var k=new S.geometry.Point(y.box.x1,y.box.y1),P=void 0;if(h){var C=(P=this.labelElements.children[g]).bbox().origin,T=P.transform()||S.geometry.transform();T.translate(k.x-C.x,k.y-C.y),P.transform(T)}else P=xa(y,t.labels),n.append(P);this.bbox=S.geometry.Rect.union(this.bbox,P.bbox())}return n},e.prototype.repositionRanges=function(){var t=this.ranges.children;if(t.length>0){var e=this.options,i=e.rangeDistance,o=e.rangeSize,r=this.getRangeRadius();"inside"===this.options.labels.position&&(r+=o+i);for(var n=r+o/2,s=0;s<t.length;s++)t[s]._geometry.setRadiusX(n).setRadiusY(n);this.bbox=S.geometry.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Ja;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,s=o.rangeDistance,a=this.getRangeRadius();this.radius(this.radius()-r-s);for(var p=0;p<e;p++){var h=t[p],l=this.slotAngle(h[n?"to":"from"]),c=this.slotAngle(h[n?"from":"to"]);c-l!=0&&i.append(this.createRange(l,c,a,h))}}return i},e.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,n=new S.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new Ka(n,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},e.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(tp(r,n,s));for(var a=0;a<i;a++)for(var p=ba(e[a],r,n),h=o.length,l=0;l<h;l++){var c=o[l];if(c.from<=p.from&&p.from<=c.to){o.push(tp(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(tp(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},e.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-o-i:t.getRadiusX()-i},e.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new S.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},e.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Qa(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new Ja;o.append(this.majorTicks);var r=e.majorTicks.size,n=e.minorTicks.size;if(this._tickDifference=r-n,"outside"===e.labels.position){var s=i.getRadiusX();i.setRadiusX(s-r+n).setRadiusY(s-r+n)}return this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Qa(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},e.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;o>=0;o--)o%i==0&&t.splice(o,1);return t},e.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;o&&(a+=n,p=-p);for(var h=[],l=0;l<s;l++)h.push(Mt(a,3)),a+=p;return Mt(a)<=t.endAngle&&h.push(a),h},e.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},e.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&"outside"===this.options.labels.position&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,h=a.x-p[0].anchor().x,l=a.y-p[0].anchor().y;t[s].transform((new S.geometry.transform).translate(h,l))}},e}(ai);Vt(ep,{min:0,max:100,majorTicks:{size:15,align:"inside",color:n,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:n,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var ip=ep,op=function(t){function e(e,i){t.call(this,e,i);var o=this.options;o.duration=Math.max(Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3,1)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=ct(e.oldAngle,e.newAngle,t);this.element.transform(S.geometry.transform().rotate(i,e.center))},e}(S.drawing.Animation);Vt(op,{easing:"linear",duration:150}),S.drawing.AnimationFactory.current.register("radialPointer",op);var rp=op,np=S.drawing.Circle,sp=S.drawing.Group,ap=S.drawing.Path,pp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setAngle=function(t){this.elements.transform(S.geometry.transform().rotate(t,this.center))},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(o):new rp(this.elements,j(e.animation,{oldAngle:i,newAngle:o})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=new sp;return!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(da),i},e.prototype.reflow=function(t){var e=this.center=t.center,i=Pt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*i,r=this.capSize=Math.round(o*this.options.cap.size);this.bbox=S.geometry.Rect.fromPoints(new S.geometry.Point(e.x-r,e.y-r),new S.geometry.Point(e.x+r,e.y+r))},e.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,o=new ap({fill:{color:i},stroke:{color:i,width:.5}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},e.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,i=new S.geometry.Circle(this.center,this.capSize);return new np(i,{fill:{color:e},stroke:{color:e}})},e}(Va);Vt(pp,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var hp=pp,lp=S.drawing.Group,cp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=S.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},e.prototype._buildVisual=function(t,e,i){var o=this._visuals=new lp;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},e.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,p=Math.abs(this.getDiff(a,t)),h=Mt(p,3),l=Mt(-p,3),c=0,u=0;!(!(u++<100)||(c=n===o?c+1:0)>5||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||l!==r&&0<=(o=this.getPlotBox(l,t,s))&&o<=2||(r=e>0&&o>0?2*h:e<0&&o<0?2*l:Mt((h+l)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,i>0?(l=r,o=i):(h=r,e=i)},e.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=S.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},e.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},e.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,r=e.y-i.y,n=this.scale,s=this.pointers;n.arc.center.x-=o,n.arc.center.y-=r,n.reflow(t);for(var a=0;a<s.length;a++)s[a].reflow(n.arc),this.plotBbox=S.geometry.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new ip(t.scale,this.contextService);this.pointers=[];for(var o=b(e)?e:[e],r=0;r<o.length;r++){var n=new hp(i,j({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(ka);Vt(cp,{transitions:!0,gaugeArea:{background:""}});var up=cp,fp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},e.prototype.hasRanges=function(){return!0},e.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},e.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),n=this.slotAngle(o?t:e),s=this.createRange(r,n,this.getRangeRadius(),i);return this.ranges.append(s),s},e}(ip);Vt(fp,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var dp=fp,gp=function(t){function e(e,i){t.call(this,e,i);var o=this.options,r=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=Pt(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new S.Color(n),this.color=new S.Color(s))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.step=function(t){var e=this.options,i=this.startColor,o=this.color,r=ct(e.oldAngle,e.newAngle,t);if(this.element.angle(r),o){var n=Mt(ct(i.r,o.r,t)),s=Mt(ct(i.g,o.g,t)),a=Mt(ct(i.b,o.b,t));this.element.stroke(new S.Color(n,s,a).toHex())}},e}(S.drawing.Animation);Vt(gp,{easing:"linear",duration:150}),S.drawing.AnimationFactory.current.register("radialRangePointer",gp);var yp=gp,vp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),o=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(o),this.stroke(this.currentColor())):(this.animation=new yp(this,j(e.animation,{oldAngle:i,newAngle:o})),this.animation.play())},e.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},e.prototype.stroke=function(t){this.elements.stroke(t)},e.prototype.render=function(){if(!this.elements){var t=this.scale,e=this.options;!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap})}},e.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,n=o.color,s=o.value,a=C(s)?s:e;if(r)for(var p=0;p<r.length;p++){var h=r[p],l=h.color,c=h.from;void 0===c&&(c=e);var u=h.to;if(void 0===u&&(u=i),c<=a&&a<=u)return l}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(Va);Vt(vp,{animation:{type:"radialRangePointer",duration:150}});var mp=vp,xp=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._initTheme=function(e){t.prototype._initTheme.call(this,e),this.options.color=this.options.color||(this.theme.pointer||{}).color},e.prototype._createModel=function(){var t=this.options,e=this.scale=new dp(t.scale,this.contextService),i=new mp(e,j({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[i]},e.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},e.prototype._setValueOptions=function(t){this.options.value=t},e.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},e.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,n=o.y-e/2;if(t<i.width){var s=r+t;r=Math.max(r,0),s>i.width&&(r-=s-i.width)}if(e<i.height){var a=this.scale.bbox,p=a.bottomRight().y,h=n+e;n=Math.max(n,a.origin.y),h>p&&(n-=h-p)}return{left:r,top:n}},e}(up),bp="Arial, Helvetica, sans-serif",_p="12px "+bp,wp="16px "+bp,Ap=function(){return{icon:{border:{width:1}},label:{font:_p,padding:3},line:{length:10,width:2},visible:!0}},Sp=function(t){return{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Ap(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}}},kp=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:_p},notes:Ap(),title:{font:wp,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Sp(t),title:{font:wp},legend:{labels:{font:_p}}}}}])}));
|