@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.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e():t.KendoCharts=e()}(window,(function(){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=3)}({3:function(t,e,i){"use strict";i.r(e),i.d(e,"autoMajorUnit",(function(){return fn})),i.d(e,"Point",(function(){return dn})),i.d(e,"Box",(function(){return gn})),i.d(e,"Ring",(function(){return mn})),i.d(e,"Sector",(function(){return xn})),i.d(e,"ShapeBuilder",(function(){return bn})),i.d(e,"ShapeElement",(function(){return Tn})),i.d(e,"ChartElement",(function(){return An})),i.d(e,"BoxElement",(function(){return kn})),i.d(e,"RootElement",(function(){return Rn})),i.d(e,"FloatElement",(function(){return Bn})),i.d(e,"Text",(function(){return Ln})),i.d(e,"TextBox",(function(){return Fn})),i.d(e,"Title",(function(){return Un})),i.d(e,"AxisLabel",(function(){return Hn})),i.d(e,"Axis",(function(){return Zn})),i.d(e,"Note",(function(){return qn})),i.d(e,"CategoryAxis",(function(){return vs})),i.d(e,"DateCategoryAxis",(function(){return Cs})),i.d(e,"DateValueAxis",(function(){return zs})),i.d(e,"NumericAxis",(function(){return Bs})),i.d(e,"LogarithmicAxis",(function(){return Fs})),i.d(e,"PolarAxis",(function(){return Ns})),i.d(e,"RadarCategoryAxis",(function(){return Gs})),i.d(e,"RadarNumericAxis",(function(){return Ws})),i.d(e,"RadarLogarithmicAxis",(function(){return Js})),i.d(e,"CurveProcessor",(function(){return $s})),i.d(e,"Gradients",(function(){return Pn})),i.d(e,"rectToBox",(function(){return En})),i.d(e,"ChartAxis",(function(){return Qs})),i.d(e,"ChartPane",(function(){return ia})),i.d(e,"ChartPlotArea",(function(){return oa})),i.d(e,"findAxisByName",(function(){return ta})),i.d(e,"Aggregates",(function(){return sa})),i.d(e,"AreaChart",(function(){return tp})),i.d(e,"AreaSegment",(function(){return Ja})),i.d(e,"AxisGroupRangeTracker",(function(){return ep})),i.d(e,"Bar",(function(){return sp})),i.d(e,"BarChart",(function(){return dp})),i.d(e,"BarLabel",(function(){return op})),i.d(e,"BoxPlotChart",(function(){return Ap})),i.d(e,"BoxPlot",(function(){return bp})),i.d(e,"BubbleChart",(function(){return Rp})),i.d(e,"Bullet",(function(){return zp})),i.d(e,"BulletChart",(function(){return Ep})),i.d(e,"CandlestickChart",(function(){return xp})),i.d(e,"Candlestick",(function(){return gp})),i.d(e,"CategoricalChart",(function(){return Ma})),i.d(e,"CategoricalErrorBar",(function(){return ka})),i.d(e,"CategoricalPlotArea",(function(){return Uh})),i.d(e,"Chart",(function(){return wl})),i.d(e,"ChartContainer",(function(){return qp})),i.d(e,"ClipAnimation",(function(){return qa})),i.d(e,"ClusterLayout",(function(){return cp})),i.d(e,"Crosshair",(function(){return Hp})),i.d(e,"CrosshairTooltip",(function(){return Up})),i.d(e,"DefaultAggregates",(function(){return vh})),i.d(e,"DonutChart",(function(){return Bc})),i.d(e,"DonutPlotArea",(function(){return Ic})),i.d(e,"DonutSegment",(function(){return Rc})),i.d(e,"ErrorBarBase",(function(){return Sa})),i.d(e,"ErrorRangeCalculator",(function(){return ua})),i.d(e,"Highlight",(function(){return Hh})),i.d(e,"SharedTooltip",(function(){return hc})),i.d(e,"Legend",(function(){return tc})),i.d(e,"LegendItem",(function(){return $h})),i.d(e,"LegendLayout",(function(){return Kh})),i.d(e,"LineChart",(function(){return Za})),i.d(e,"LinePoint",(function(){return za})),i.d(e,"LineSegment",(function(){return Ea})),i.d(e,"Pane",(function(){return Wp})),i.d(e,"PieAnimation",(function(){return dc})),i.d(e,"PieChart",(function(){return Pc})),i.d(e,"PieChartMixin",(function(){return kc})),i.d(e,"PiePlotArea",(function(){return Mc})),i.d(e,"PieSegment",(function(){return Sc})),i.d(e,"PlotAreaBase",(function(){return uh})),i.d(e,"PlotAreaEventsMixin",(function(){return fh})),i.d(e,"PlotAreaFactory",(function(){return ic})),i.d(e,"PointEventsMixin",(function(){return ja})),i.d(e,"RangeBar",(function(){return xh})),i.d(e,"RangeBarChart",(function(){return bh})),i.d(e,"RangeAreaPoint",(function(){return Sh})),i.d(e,"RangeAreaChart",(function(){return Oh})),i.d(e,"ScatterChart",(function(){return Tp})),i.d(e,"ScatterErrorBar",(function(){return Sp})),i.d(e,"ScatterLineChart",(function(){return gc})),i.d(e,"Selection",(function(){return sc})),i.d(e,"SeriesAggregator",(function(){return yh})),i.d(e,"SeriesBinder",(function(){return ha})),i.d(e,"SplineSegment",(function(){return Ga})),i.d(e,"SplineAreaSegment",(function(){return Qa})),i.d(e,"StackWrap",(function(){return up})),i.d(e,"Tooltip",(function(){return ac})),i.d(e,"OHLCChart",(function(){return jh})),i.d(e,"OHLCPoint",(function(){return Rh})),i.d(e,"WaterfallChart",(function(){return zh})),i.d(e,"WaterfallSegment",(function(){return Ih})),i.d(e,"XYPlotArea",(function(){return xc})),i.d(e,"MousewheelZoom",(function(){return Jh})),i.d(e,"ZoomSelection",(function(){return Zh})),i.d(e,"Pannable",(function(){return Yh})),i.d(e,"anyHasZIndex",(function(){return Xa})),i.d(e,"appendIfNotNull",(function(){return Zp})),i.d(e,"areNumbers",(function(){return vp})),i.d(e,"bindSegments",(function(){return Kp})),i.d(e,"categoriesCount",(function(){return Ta})),i.d(e,"countNumbers",(function(){return ra})),i.d(e,"equalsIgnoreCase",(function(){return $p})),i.d(e,"evalOptions",(function(){return Ca})),i.d(e,"filterSeriesByType",(function(){return Qp})),i.d(e,"getDateField",(function(){return th})),i.d(e,"getField",(function(){return aa})),i.d(e,"hasGradientOverlay",(function(){return rp})),i.d(e,"hasValue",(function(){return kp})),i.d(e,"isDateAxis",(function(){return eh})),i.d(e,"segmentVisible",(function(){return Jp})),i.d(e,"singleItemOrArray",(function(){return ih})),i.d(e,"createOutOfRangePoints",(function(){return sh})),i.d(e,"ChartService",(function(){return br})),i.d(e,"DomEventsBuilder",(function(){return Ar})),i.d(e,"FormatService",(function(){return vr})),i.d(e,"IntlService",(function(){return fr})),i.d(e,"TemplateService",(function(){return Cr})),i.d(e,"Sparkline",(function(){return Ml})),i.d(e,"Navigator",(function(){return El})),i.d(e,"NavigatorHint",(function(){return Bl})),i.d(e,"StockChart",(function(){return Fl})),i.d(e,"constants",(function(){return h})),i.d(e,"Gauge",(function(){return Kl})),i.d(e,"LinearGauge",(function(){return bu})),i.d(e,"LinearPointer",(function(){return pu})),i.d(e,"ArrowLinearPointer",(function(){return fu})),i.d(e,"BarLinearPointer",(function(){return mu})),i.d(e,"LinearScale",(function(){return ru})),i.d(e,"RadialGauge",(function(){return Vu})),i.d(e,"RadialPointer",(function(){return zu})),i.d(e,"RadialScale",(function(){return Pu})),i.d(e,"ArcGauge",(function(){return qu})),i.d(e,"RangePointer",(function(){return Nu})),i.d(e,"ArcScale",(function(){return Du})),i.d(e,"addClass",(function(){return T})),i.d(e,"removeClass",(function(){return M})),i.d(e,"alignPathToPixel",(function(){return Jo})),i.d(e,"clockwise",(function(){return Ko})),i.d(e,"convertableToNumber",(function(){return tr})),i.d(e,"deepExtend",(function(){return or})),i.d(e,"elementStyles",(function(){return pr})),i.d(e,"getSpacing",(function(){return hr})),i.d(e,"getTemplate",(function(){return Tr})),i.d(e,"getter",(function(){return Or})),i.d(e,"grep",(function(){return Rr})),i.d(e,"hasClasses",(function(){return jr})),i.d(e,"HashMap",(function(){return Ir})),i.d(e,"inArray",(function(){return zr})),i.d(e,"interpolateValue",(function(){return Lr})),i.d(e,"InstanceObserver",(function(){return Vr})),i.d(e,"isArray",(function(){return C})),i.d(e,"isFunction",(function(){return er})),i.d(e,"isNumber",(function(){return $o})),i.d(e,"isObject",(function(){return rr})),i.d(e,"isString",(function(){return Qo})),i.d(e,"map",(function(){return Fr})),i.d(e,"mousewheelDelta",(function(){return Dr})),i.d(e,"FontLoader",(function(){return nn})),i.d(e,"setDefaultOptions",(function(){return sn})),i.d(e,"sparseArrayLimits",(function(){return an})),i.d(e,"styleValue",(function(){return nr})),i.d(e,"find",(function(){return pn})),i.d(e,"elementScale",(function(){return un})),i.d(e,"append",(function(){return Gr})),i.d(e,"bindEvents",(function(){return Hr})),i.d(e,"Class",(function(){return O})),i.d(e,"defined",(function(){return Nr})),i.d(e,"deg",(function(){return qr})),i.d(e,"elementOffset",(function(){return Xr})),i.d(e,"elementSize",(function(){return Yr})),i.d(e,"eventElement",(function(){return Wr})),i.d(e,"eventCoordinates",(function(){return Zr})),i.d(e,"last",(function(){return Jr})),i.d(e,"limitValue",(function(){return Kr})),i.d(e,"logToConsole",(function(){return fi})),i.d(e,"objectKey",(function(){return $r})),i.d(e,"rad",(function(){return Qr})),i.d(e,"round",(function(){return tn})),i.d(e,"unbindEvents",(function(){return en})),i.d(e,"valueOrDefault",(function(){return on})),i.d(e,"chartBaseTheme",(function(){return Ku}));var o={};i.r(o),i.d(o,"swing",(function(){return Ee})),i.d(o,"linear",(function(){return Ve})),i.d(o,"easeOutElastic",(function(){return Fe}));var r={};i.r(r),i.d(r,"Surface",(function(){return eo})),i.d(r,"RootNode",(function(){return Ii})),i.d(r,"Node",(function(){return Ti})),i.d(r,"GroupNode",(function(){return Gi})),i.d(r,"ArcNode",(function(){return Di})),i.d(r,"CircleNode",(function(){return Ui})),i.d(r,"RectNode",(function(){return Ki})),i.d(r,"ImageNode",(function(){return Zi})),i.d(r,"TextNode",(function(){return to})),i.d(r,"PathNode",(function(){return Fi})),i.d(r,"MultiPathNode",(function(){return Ji})),i.d(r,"DefinitionNode",(function(){return Bi})),i.d(r,"ClipNode",(function(){return ji})),i.d(r,"GradientStopNode",(function(){return Pi})),i.d(r,"LinearGradientNode",(function(){return Oi})),i.d(r,"RadialGradientNode",(function(){return Ri})),i.d(r,"exportGroup",(function(){return Uo}));var n={};i.r(n),i.d(n,"Surface",(function(){return Eo})),i.d(n,"RootNode",(function(){return ho})),i.d(n,"Node",(function(){return so})),i.d(n,"GroupNode",(function(){return ao})),i.d(n,"ArcNode",(function(){return Mo})),i.d(n,"CircleNode",(function(){return Oo})),i.d(n,"RectNode",(function(){return Bo})),i.d(n,"ImageNode",(function(){return Ro})),i.d(n,"TextNode",(function(){return Io})),i.d(n,"PathNode",(function(){return Po})),i.d(n,"MultiPathNode",(function(){return jo}));var s={};i.r(s),i.d(s,"append",(function(){return ce})),i.d(s,"arabicToRoman",(function(){return Ho})),i.d(s,"createPromise",(function(){return io})),i.d(s,"defined",(function(){return j})),i.d(s,"definitionId",(function(){return $})),i.d(s,"deg",(function(){return lt})),i.d(s,"encodeBase64",(function(){return Xo})),i.d(s,"eventCoordinates",(function(){return ai})),i.d(s,"eventElement",(function(){return ri})),i.d(s,"isTransparent",(function(){return tt})),i.d(s,"last",(function(){return Vt})),i.d(s,"limitValue",(function(){return Ue})),i.d(s,"mergeSort",(function(){return Yo})),i.d(s,"now",(function(){return De})),i.d(s,"promiseAll",(function(){return oo})),i.d(s,"rad",(function(){return G})),i.d(s,"round",(function(){return V})),i.d(s,"valueOrDefault",(function(){return Q})),i.d(s,"bindEvents",(function(){return zi})),i.d(s,"elementOffset",(function(){return si})),i.d(s,"elementSize",(function(){return oi})),i.d(s,"elementStyles",(function(){return ei})),i.d(s,"unbindEvents",(function(){return Li})),i.d(s,"elementPadding",(function(){return ni})),i.d(s,"elementScale",(function(){return ci})),i.d(s,"DEG_TO_RAD",(function(){return F})),i.d(s,"MAX_NUM",(function(){return D})),i.d(s,"MIN_NUM",(function(){return U})),i.d(s,"LRUCache",(function(){return Kt})),i.d(s,"TextMetrics",(function(){return ne})),i.d(s,"measureText",(function(){return se})),i.d(s,"objectKey",(function(){return te})),i.d(s,"hashKey",(function(){return ee})),i.d(s,"normalizeText",(function(){return Qt}));var a={};i.r(a),i.d(a,"HasObservers",(function(){return R})),i.d(a,"Element",(function(){return et})),i.d(a,"Circle",(function(){return ct})),i.d(a,"Arc",(function(){return Jt})),i.d(a,"Path",(function(){return Wt})),i.d(a,"MultiPath",(function(){return Zt})),i.d(a,"Text",(function(){return ae})),i.d(a,"Image",(function(){return pe})),i.d(a,"Group",(function(){return le})),i.d(a,"Layout",(function(){return me})),i.d(a,"Rect",(function(){return xe})),i.d(a,"align",(function(){return be})),i.d(a,"vAlign",(function(){return we})),i.d(a,"stack",(function(){return ke})),i.d(a,"vStack",(function(){return Ce})),i.d(a,"wrap",(function(){return Pe})),i.d(a,"vWrap",(function(){return Me})),i.d(a,"fit",(function(){return Oe})),i.d(a,"LinearGradient",(function(){return ze})),i.d(a,"RadialGradient",(function(){return Le})),i.d(a,"GradientStop",(function(){return Be})),i.d(a,"Gradient",(function(){return Ie})),i.d(a,"Animation",(function(){return Ye})),i.d(a,"AnimationFactory",(function(){return Xe})),i.d(a,"PathParser",(function(){return We})),i.d(a,"parsePath",(function(){return qt})),i.d(a,"BaseNode",(function(){return Ze})),i.d(a,"OptionsStore",(function(){return I})),i.d(a,"Surface",(function(){return Do})),i.d(a,"SurfaceFactory",(function(){return Fo})),i.d(a,"exportImage",(function(){return Wo})),i.d(a,"exportSVG",(function(){return Zo})),i.d(a,"QuadNode",(function(){return lo})),i.d(a,"ShapesQuadTree",(function(){return fo})),i.d(a,"svg",(function(){return r})),i.d(a,"canvas",(function(){return n})),i.d(a,"util",(function(){return s}));var p={};i.r(p),i.d(p,"Circle",(function(){return rt})),i.d(p,"Arc",(function(){return vt})),i.d(p,"Rect",(function(){return W})),i.d(p,"Point",(function(){return X})),i.d(p,"Segment",(function(){return Et})),i.d(p,"Matrix",(function(){return N})),i.d(p,"Size",(function(){return Y})),i.d(p,"toMatrix",(function(){return q})),i.d(p,"Transformation",(function(){return Z})),i.d(p,"transform",(function(){return J}));var h={};i.r(h),i.d(h,"NAVIGATOR_AXIS",(function(){return zl})),i.d(h,"NAVIGATOR_PANE",(function(){return Il}));var c="arc",l="#000",u="bottom",f="center",d="circle",y="date",g=/\{\d+:?/,v="left",m=Number.MAX_VALUE,x=-Number.MAX_VALUE,_="right",b="top",w="value",A="#fff",S="x",k="y";function C(t){return Array.isArray(t)}function T(t,e){for(var i=C(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var P=/\s+/g;function M(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(P," "))}var O=function(){},R=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.observers=function(){return this._observers=this._observers||[],this._observers},e.prototype.addObserver=function(t){return this._observers?this._observers.push(t):this._observers=[t],this},e.prototype.removeObserver=function(t){var e=this.observers(),i=e.indexOf(t);return-1!==i&&e.splice(i,1),this},e.prototype.trigger=function(t,e){var i=this._observers;if(i&&!this._suspended)for(var o=0;o<i.length;o++){var r=i[o];r[t]&&r[t](e)}return this},e.prototype.optionsChange=function(t){void 0===t&&(t={}),t.element=this,this.trigger("optionsChange",t)},e.prototype.geometryChange=function(){this.trigger("geometryChange",{element:this})},e.prototype.suspend=function(){return this._suspended=(this._suspended||0)+1,this},e.prototype.resume=function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},e.prototype._observerField=function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)},e}(O);function j(t){return void 0!==t}var B={}.toString,I=function(t){function e(e,i){for(var o in void 0===i&&(i=""),t.call(this),this.prefix=i,e){var r=e[o];r=this._wrap(r,o),this[o]=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){for(var e=t.split("."),i=this;e.length&&i;){i=i[e.shift()]}return i},e.prototype.set=function(t,e){this.get(t)!==e&&(this._set(t,this._wrap(e,t)),this.optionsChange({field:this.prefix+t,value:e}))},e.prototype._set=function(t,i){var o=t.indexOf(".")>=0,r=this,n=t;if(o){for(var s=n.split("."),a=this.prefix;s.length>1;){a+=(n=s.shift())+".";var p=r[n];p||((p=new e({},a)).addObserver(this),r[n]=p),r=p}n=s[0]}r._clear(n),r[n]=i},e.prototype._clear=function(t){var e=this[t];e&&e.removeObserver&&e.removeObserver(this)},e.prototype._wrap=function(t,i){var o=B.call(t),r=t;return null!==r&&j(r)&&"[object Object]"===o&&(t instanceof e||t instanceof O||(r=new e(r,this.prefix+i+".")),r.addObserver(this)),r},e}(R);function z(t){return function(e){return this[t]!==e&&(this[t]=e,this.geometryChange()),this}}function L(t){return function(){return this[t]}}var E=function(t,e){var 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}(t);return function(t,e){for(var i=0;i<e.length;i++){var o=e[i],r=o.charAt(0).toUpperCase()+o.substring(1,o.length);t["set"+r]=z(o),t["get"+r]=L(o)}}(i.prototype,e),i};function V(t,e){var i,o=(i=e)?Math.pow(10,i):1;return Math.round(t*o)/o}var F=Math.PI/180,D=Number.MAX_VALUE,U=-Number.MAX_VALUE;function G(t){return t*F}var H=function(t){function e(e,i,o,r,n,s){void 0===e&&(e=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),t.call(this),this.a=e,this.b=i,this.c=o,this.d=r,this.e=n,this.f=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.multiplyCopy=function(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},e.prototype.invert=function(){var t=this.a,i=this.b,o=this.c,r=this.d,n=this.e,s=this.f,a=t*r-i*o;return 0===a?null:new e(r/a,-i/a,-o/a,t/a,(o*s-r*n)/a,(i*n-t*s)/a)},e.prototype.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},e.prototype.equals=function(t){return!!t&&(this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d&&this.e===t.e&&this.f===t.f)},e.prototype.round=function(t){return this.a=V(this.a,t),this.b=V(this.b,t),this.c=V(this.c,t),this.d=V(this.d,t),this.e=V(this.e,t),this.f=V(this.f,t),this},e.prototype.toArray=function(t){var e=[this.a,this.b,this.c,this.d,this.e,this.f];if(j(t))for(var i=0;i<e.length;i++)e[i]=V(e[i],t);return e},e.prototype.toString=function(t,e){return void 0===e&&(e=","),this.toArray(t).join(e)},e.translate=function(t,i){return new e(1,0,0,1,t,i)},e.unit=function(){return new e(1,0,0,1,0,0)},e.rotate=function(t,i,o){var r=new e;return r.a=Math.cos(G(t)),r.b=Math.sin(G(t)),r.c=-r.b,r.d=r.a,r.e=i-i*r.a+o*r.b||0,r.f=o-o*r.a-i*r.b||0,r},e.scale=function(t,i){return new e(t,0,0,i,0,0)},e}(O);H.IDENTITY=H.unit();var N=H;function q(t){return t&&"function"==typeof t.matrix?t.matrix():t}var X=function(t){function e(e,i){t.call(this),this.x=e||0,this.y=i||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.rotate=function(t,i){var o=e.create(i)||e.ZERO;return this.transform(N.rotate(t,o.x,o.y))},e.prototype.translate=function(t,e){return this.x+=t,this.y+=e,this.geometryChange(),this},e.prototype.translateWith=function(t){return this.translate(t.x,t.y)},e.prototype.move=function(t,e){return this.x=this.y=0,this.translate(t,e)},e.prototype.scale=function(t,e){return void 0===e&&(e=t),this.x*=t,this.y*=e,this.geometryChange(),this},e.prototype.scaleCopy=function(t,e){return this.clone().scale(t,e)},e.prototype.transform=function(t){var e=q(t),i=this.x,o=this.y;return this.x=e.a*i+e.c*o+e.e,this.y=e.b*i+e.d*o+e.f,this.geometryChange(),this},e.prototype.transformCopy=function(t){var e=this.clone();return t&&e.transform(t),e},e.prototype.distanceTo=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},e.prototype.round=function(t){return this.x=V(this.x,t),this.y=V(this.y,t),this.geometryChange(),this},e.prototype.toArray=function(t){var e=j(t);return[e?V(this.x,t):this.x,e?V(this.y,t):this.y]},e.prototype.toString=function(t,e){void 0===e&&(e=" ");var i=this.x,o=this.y;return j(t)&&(i=V(i,t),o=V(o,t)),i+e+o},e.create=function(t,i){if(j(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,i)},e.min=function(){for(var t=arguments,i=D,o=D,r=0;r<arguments.length;r++){var n=t[r];i=Math.min(n.x,i),o=Math.min(n.y,o)}return new e(i,o)},e.max=function(){for(var t=arguments,i=U,o=U,r=0;r<arguments.length;r++){var n=t[r];i=Math.max(n.x,i),o=Math.max(n.y,o)}return new e(i,o)},e.minPoint=function(){return new e(U,U)},e.maxPoint=function(){return new e(D,D)},i.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,i),e}(E(R,["x","y"])),Y=function(t){function e(e,i){t.call(this),this.width=e||0,this.height=i||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.width===this.width&&t.height===this.height},e.prototype.clone=function(){return new e(this.width,this.height)},e.prototype.toArray=function(t){var e=j(t);return[e?V(this.width,t):this.width,e?V(this.height,t):this.height]},e.create=function(t,i){if(j(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,i)},i.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,i),e}(E(R,["width","height"])),W=function(t){function e(e,i){void 0===e&&(e=new X),void 0===i&&(i=new Y),t.call(this),this.setOrigin(e),this.setSize(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.origin.clone(),this.size.clone())},e.prototype.equals=function(t){return t&&t.origin.equals(this.origin)&&t.size.equals(this.size)},e.prototype.setOrigin=function(t){return this._observerField("origin",X.create(t)),this.geometryChange(),this},e.prototype.getOrigin=function(){return this.origin},e.prototype.setSize=function(t){return this._observerField("size",Y.create(t)),this.geometryChange(),this},e.prototype.getSize=function(){return this.size},e.prototype.width=function(){return this.size.width},e.prototype.height=function(){return this.size.height},e.prototype.topLeft=function(){return this.origin.clone()},e.prototype.bottomRight=function(){return this.origin.clone().translate(this.width(),this.height())},e.prototype.topRight=function(){return this.origin.clone().translate(this.width(),0)},e.prototype.bottomLeft=function(){return this.origin.clone().translate(0,this.height())},e.prototype.center=function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},e.prototype.bbox=function(t){var i=this.topLeft().transformCopy(t),o=this.topRight().transformCopy(t),r=this.bottomRight().transformCopy(t),n=this.bottomLeft().transformCopy(t);return e.fromPoints(i,o,r,n)},e.prototype.transformCopy=function(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))},e.prototype.expand=function(t,e){return void 0===e&&(e=t),this.size.width+=2*t,this.size.height+=2*e,this.origin.translate(-t,-e),this},e.prototype.expandCopy=function(t,e){return this.clone().expand(t,e)},e.prototype.containsPoint=function(t){var e=this.origin,i=this.bottomRight();return!(t.x<e.x||t.y<e.y||i.x<t.x||i.y<t.y)},e.prototype._isOnPath=function(t,e){var i=this.expandCopy(e,e),o=this.expandCopy(-e,-e);return i.containsPoint(t)&&!o.containsPoint(t)},e.fromPoints=function(){var t=X.min.apply(null,arguments),i=X.max.apply(null,arguments),o=new Y(i.x-t.x,i.y-t.y);return new e(t,o)},e.union=function(t,i){return e.fromPoints(X.min(t.topLeft(),i.topLeft()),X.max(t.bottomRight(),i.bottomRight()))},e.intersect=function(t,i){var o={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},r={left:i.topLeft().x,top:i.topLeft().y,right:i.bottomRight().x,bottom:i.bottomRight().y};if(o.left<=r.right&&r.left<=o.right&&o.top<=r.bottom&&r.top<=o.bottom)return e.fromPoints(new X(Math.max(o.left,r.left),Math.max(o.top,r.top)),new X(Math.min(o.right,r.right),Math.min(o.bottom,r.bottom)))},e}(R),Z=function(t){function e(e){void 0===e&&(e=N.unit()),t.call(this),this._matrix=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this._matrix.clone())},e.prototype.equals=function(t){return t&&t._matrix.equals(this._matrix)},e.prototype.translate=function(t,e){return this._matrix=this._matrix.multiplyCopy(N.translate(t,e)),this._optionsChange(),this},e.prototype.scale=function(t,e,i){void 0===e&&(e=t),void 0===i&&(i=null);var o=i;return o&&(o=X.create(o),this._matrix=this._matrix.multiplyCopy(N.translate(o.x,o.y))),this._matrix=this._matrix.multiplyCopy(N.scale(t,e)),o&&(this._matrix=this._matrix.multiplyCopy(N.translate(-o.x,-o.y))),this._optionsChange(),this},e.prototype.rotate=function(t,e){var i=X.create(e)||X.ZERO;return this._matrix=this._matrix.multiplyCopy(N.rotate(t,i.x,i.y)),this._optionsChange(),this},e.prototype.multiply=function(t){var e=q(t);return this._matrix=this._matrix.multiplyCopy(e),this._optionsChange(),this},e.prototype.matrix=function(t){return t?(this._matrix=t,this._optionsChange(),this):this._matrix},e.prototype._optionsChange=function(){this.optionsChange({field:"transform",value:this})},e}(R);function J(t){return null===t?null:t instanceof Z?t:new Z(t)}var K=1;function $(){return"kdef"+K++}function Q(t,e){return j(t)?t:e}function tt(t){return""===t||null===t||"none"===t||"transparent"===t||!j(t)}var et=function(t){function e(e){t.call(this),this._initOptions(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Rect"},e.prototype._initOptions=function(t){void 0===t&&(t={});var e=t.clip,i=t.transform;i&&(t.transform=J(i)),e&&!e.id&&(e.id=$()),this.options=new I(t),this.options.addObserver(this)},e.prototype.transform=function(t){if(!j(t))return this.options.get("transform");this.options.set("transform",J(t))},e.prototype.parentTransform=function(){for(var t,e=this;e.parent;){var i=(e=e.parent).transform();i&&(t=i.matrix().multiplyCopy(t||N.unit()))}if(t)return J(t)},e.prototype.currentTransform=function(t){void 0===t&&(t=this.parentTransform());var e,i=q(this.transform()),o=q(t);if(e=i&&o?o.multiplyCopy(i):i||o)return J(e)},e.prototype.visible=function(t){return j(t)?(this.options.set("visible",t),this):!1!==this.options.get("visible")},e.prototype.clip=function(t){var e=this.options;return j(t)?(t&&!t.id&&(t.id=$()),e.set("clip",t),this):e.get("clip")},e.prototype.opacity=function(t){return j(t)?(this.options.set("opacity",t),this):Q(this.options.get("opacity"),1)},e.prototype.clippedBBox=function(t){var e=this._clippedBBox(t);if(e){var i=this.clip();return i?W.intersect(e,i.bbox(t)):e}},e.prototype.containsPoint=function(t,e){if(this.visible()){var i=this.currentTransform(e),o=t;return i&&(o=t.transformCopy(i.matrix().invert())),this._hasFill()&&this._containsPoint(o)||this._isOnPath&&this._hasStroke()&&this._isOnPath(o)}return!1},e.prototype._hasFill=function(){var t=this.options.fill;return t&&!tt(t.color)},e.prototype._hasStroke=function(){var t=this.options.stroke;return t&&t.width>0&&!tt(t.color)},e.prototype._clippedBBox=function(t){return this.bbox(t)},Object.defineProperties(e.prototype,i),e}(R);function it(t,e,i,o){var r=0,n=0;return o&&(r=Math.atan2(o.c*i,o.a*e),0!==o.b&&(n=Math.atan2(o.d*i,o.b*e))),{x:r,y:n}}var ot=Math.PI/2,rt=function(t){function e(e,i){void 0===e&&(e=new X),void 0===i&&(i=0),t.call(this),this.setCenter(e),this.setRadius(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setCenter=function(t){return this._observerField("center",X.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.equals=function(t){return t&&t.center.equals(this.center)&&t.radius===this.radius},e.prototype.clone=function(){return new e(this.center.clone(),this.radius)},e.prototype.pointAt=function(t){return this._pointAt(G(t))},e.prototype.bbox=function(t){for(var e=it(this.center,this.radius,this.radius,t),i=X.maxPoint(),o=X.minPoint(),r=0;r<4;r++){var n=this._pointAt(e.x+r*ot).transformCopy(t),s=this._pointAt(e.y+r*ot).transformCopy(t),a=new X(n.x,s.y);i=X.min(i,a),o=X.max(o,a)}return W.fromPoints(i,o)},e.prototype._pointAt=function(t){var e=this.center,i=this.radius;return new X(e.x+i*Math.cos(t),e.y+i*Math.sin(t))},e.prototype.containsPoint=function(t){var e=this.center,i=this.radius;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(i,2)},e.prototype._isOnPath=function(t,e){var i=this.center,o=this.radius,r=i.distanceTo(t);return o-e<=r&&r<=o+e},e}(E(R,["radius"])),nt=function(t){return 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.fill=function(t,e){var i=this.options;if(j(t)){if(t&&"Gradient"!==t.nodeType){var o={color:t};j(e)&&(o.opacity=e),i.set("fill",o)}else i.set("fill",t);return this}return i.get("fill")},e.prototype.stroke=function(t,e,i){return j(t)?(this.options.set("stroke.color",t),j(e)&&this.options.set("stroke.width",e),j(i)&&this.options.set("stroke.opacity",i),this):this.options.get("stroke")},e}(t)},st=N.IDENTITY.toString(),at=function(t){return 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.bbox=function(t){var e,i=q(this.currentTransform(t)),o=i?i.toString():st;this._bboxCache&&this._matrixHash===o?e=this._bboxCache.clone():(e=this._bbox(i),this._bboxCache=e?e.clone():null,this._matrixHash=o);var r=this.options.get("stroke.width");return r&&e&&e.expand(r/2),e},e.prototype.geometryChange=function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})},e}(t)};function pt(t){var e="_"+t;return function(t){return j(t)?(this._observerField(e,t),this.geometryChange(),this):this[e]}}var ht=function(t,e){void 0===e&&(e=["geometry"]);var 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}(t);return function(t,e){for(var i=0;i<e.length;i++)t[e[i]]=pt(e[i])}(i.prototype,e),i},ct=function(t){function e(e,i){void 0===e&&(e=new rt),void 0===i&&(i={}),t.call(this,i),this.geometry(e),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Circle"},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,i),e}(nt(at(ht(et))));function lt(t){return t/F}function ut(t,e,i){return void 0===i&&(i=10),0===V(Math.abs(t-e),i)}function ft(t,e,i){return t<e||ut(t,e,i)}var dt=Math.pow;function yt(t,e,i,o,r,n){var s=V((r-t)/i,3),a=V((n-e)/o,3);return V(lt(Math.atan2(a,s)))}function gt(t,e){for(var i=t;i<e;)i+=90;return i}var vt=function(t){function e(e,i){void 0===e&&(e=new X),void 0===i&&(i={}),t.call(this),this.setCenter(e),this.radiusX=i.radiusX,this.radiusY=i.radiusY||i.radiusX,this.startAngle=i.startAngle,this.endAngle=i.endAngle,this.anticlockwise=i.anticlockwise||!1,this.xRotation=i.xRotation}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,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},e.prototype.setCenter=function(t){return this._observerField("center",X.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.pointAt=function(t){var e=this.center,i=G(t);return new X(e.x+this.radiusX*Math.cos(i),e.y+this.radiusY*Math.sin(i))},e.prototype.curvePoints=function(){var t,e=this.startAngle,i=this.anticlockwise?-1:1,o=[this.pointAt(e)],r=this._arcInterval(),n=r.endAngle-r.startAngle,s=Math.ceil(n/45),a=n/s,p=e;this.xRotation&&(t=J().rotate(this.xRotation,this.center));for(var h=1;h<=s;h++){var c=p+i*a,l=this._intervalCurvePoints(p,c,t);o.push(l.cp1,l.cp2,l.p2),p=c}return o},e.prototype.bbox=function(t){for(var e=this._arcInterval(),i=e.startAngle,o=e.endAngle,r=it(this.center,this.radiusX,this.radiusY,t),n=lt(r.x),s=lt(r.y),a=this.pointAt(o).transformCopy(t),p=gt(n,i),h=gt(s,i),c=this.pointAt(i).transformCopy(t),l=X.min(c,a),u=X.max(c,a);p<o||h<o;){var f=void 0;p<o&&(f=this.pointAt(p).transformCopy(t),p+=90);var d=void 0;h<o&&(d=this.pointAt(h).transformCopy(t),h+=90),c=new X(f.x,d.y),l=X.min(l,c),u=X.max(u,c)}return W.fromPoints(l,u)},e.prototype._arcInterval=function(){var t=this.startAngle,e=this.endAngle,i=this.anticlockwise;if(i){var o=t;t=e,e=o}return(t>e||i&&t===e)&&(e+=360),{startAngle:t,endAngle:e}},e.prototype._intervalCurvePoints=function(t,e,i){var o=this.pointAt(t),r=this.pointAt(e),n=this._derivativeAt(t),s=this._derivativeAt(e),a=(G(e)-G(t))/3,p=new X(o.x+a*n.x,o.y+a*n.y),h=new X(r.x-a*s.x,r.y-a*s.y);return i&&(o.transform(i),r.transform(i),p.transform(i),h.transform(i)),{p1:o,cp1:p,cp2:h,p2:r}},e.prototype._derivativeAt=function(t){var e=G(t);return new X(-this.radiusX*Math.sin(e),this.radiusY*Math.cos(e))},e.prototype.containsPoint=function(t){var e,i=this._arcInterval(),o=i.endAngle-i.startAngle,r=this.center,n=this.radiusX,s=this.radiusY,a=r.distanceTo(t),p=Math.atan2(t.y-r.y,t.x-r.x),h=n*s/Math.sqrt(dt(n,2)*dt(Math.sin(p),2)+dt(s,2)*dt(Math.cos(p),2)),c=this.pointAt(this.startAngle).round(10),l=this.pointAt(this.endAngle).round(10),u=function(t,e,i,o){var r=e.x-t.x,n=o.x-i.x,s=e.y-t.y,a=o.y-i.y,p=t.x-i.x,h=t.y-i.y,c=r*a-n*s,l=(r*h-s*p)/c,u=(n*h-a*p)/c;if(l>=0&&l<=1&&u>=0&&u<=1)return new X(t.x+u*r,t.y+u*s)}(r,t.round(10),c,l);if(o<180)e=u&&ft(r.distanceTo(u),a)&&ft(a,h);else{var f=yt(r.x,r.y,n,s,t.x,t.y);360!==f&&(f=(360+f)%360);var d=i.startAngle<=f&&f<=i.endAngle;e=d&&ft(a,h)||!d&&(!u||u.equals(t))}return e},e.prototype._isOnPath=function(t,e){var i=this._arcInterval(),o=this.center,r=yt(o.x,o.y,this.radiusX,this.radiusY,t.x,t.y);return 360!==r&&(r=(360+r)%360),i.startAngle<=r&&r<=i.endAngle&&this.pointAt(r).distanceTo(t)<=e},e.fromPoints=function(t,i,o,r,n,s,a){var p=function(t){var e=t.x1,i=t.y1,o=t.x2,r=t.y2,n=t.rx,s=t.ry,a=t.largeArc,p=t.swipe,h=t.rotation;void 0===h&&(h=0);var c=G(h),l=Math.cos(c),u=Math.sin(c),f=l*(e-o)/2+u*(i-r)/2,d=-u*(e-o)/2+l*(i-r)/2,y=a!==p?1:-1,g=Math.pow(f,2),v=Math.pow(d,2),m=Math.pow(n,2),x=Math.pow(s,2),_=g/m+v/x;_>1&&(_=Math.sqrt(g/m+v/x),n*=_,m=Math.pow(n,2),s*=_,x=Math.pow(s,2));var b=y*Math.sqrt((m*x-m*v-x*g)/(m*v+x*g));isNaN(b)&&(b=0);var w=b*(n*d)/s,A=s*f*-b/n,S=l*w-u*A+(e+o)/2,k=u*w+l*A+(i+r)/2,C=(f-w)/n,T=(d-A)/s,P=-(f+w)/n,M=-(d+A)/s,O=(T>=0?1:-1)*lt(Math.acos(C/Math.sqrt(C*C+T*T))),R=V((C*P+T*M)/(Math.sqrt(C*C+T*T)*Math.sqrt(P*P+M*M)),10),j=(C*M-T*P>=0?1:-1)*lt(Math.acos(R));!p&&j>0&&(j-=360);p&&j<0&&(j+=360);var B=O+j,I=B>=0?1:-1;return B=Math.abs(B)%360*I,{center:new X(S,k),startAngle:O,endAngle:B,radiusX:n,radiusY:s,xRotation:h}}({x1:t.x,y1:t.y,x2:i.x,y2:i.y,rx:o,ry:r,largeArc:n,swipe:s,rotation:a});return new e(p.center,{startAngle:p.startAngle,endAngle:p.endAngle,radiusX:p.radiusX,radiusY:p.radiusY,xRotation:p.xRotation,anticlockwise:0===s})},e}(E(R,["radiusX","radiusY","startAngle","endAngle","anticlockwise"])),mt=[].push,xt=[].pop,_t=[].splice,bt=[].shift,wt=[].slice,At=[].unshift,St=function(t){function e(e){void 0===e&&(e=[]),t.call(this),this.length=0,this._splice(0,e.length,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.elements=function(t){return t?(this._splice(0,this.length,t),this._change(),this):this.slice(0)},e.prototype.push=function(){var t=arguments,e=mt.apply(this,t);return this._add(t),e},e.prototype.slice=function(){return wt.call(this)},e.prototype.pop=function(){var t=this.length,e=xt.apply(this);return t&&this._remove([e]),e},e.prototype.splice=function(t,e){var i=wt.call(arguments,2),o=this._splice(t,e,i);return this._change(),o},e.prototype.shift=function(){var t=this.length,e=bt.apply(this);return t&&this._remove([e]),e},e.prototype.unshift=function(){var t=arguments,e=At.apply(this,t);return this._add(t),e},e.prototype.indexOf=function(t){for(var e=this.length,i=0;i<e;i++)if(this[i]===t)return i;return-1},e.prototype._splice=function(t,e,i){var o=_t.apply(this,[t,e].concat(i));return this._clearObserver(o),this._setObserver(i),o},e.prototype._add=function(t){this._setObserver(t),this._change()},e.prototype._remove=function(t){this._clearObserver(t),this._change()},e.prototype._setObserver=function(t){for(var e=0;e<t.length;e++)t[e].addObserver(this)},e.prototype._clearObserver=function(t){for(var e=0;e<t.length;e++)t[e].removeObserver(this)},e.prototype._change=function(){},e}(R),kt=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._change=function(){this.geometryChange()},e}(St);function Ct(t,e,i){var o=lt(Math.atan2(e.y-t.y,e.x-t.x));return i.transformCopy(J().rotate(-o,t)).x<t.x}function Tt(t,e,i){var o=1-t;return Math.pow(o,3)*i[0][e]+3*Math.pow(o,2)*t*i[1][e]+3*Math.pow(t,2)*o*i[2][e]+Math.pow(t,3)*i[3][e]}function Pt(t,e){return[-t[0][e]+3*t[1][e]-3*t[2][e]+t[3][e],3*(t[0][e]-2*t[1][e]+t[2][e]),3*(-t[0][e]+t[1][e]),t[0][e]]}var Mt=function(t){function e(e,i){void 0===e&&(e=0),void 0===i&&(i=0),t.call(this),this.real=e,this.img=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.add=function(t){return new e(V(this.real+t.real,10),V(this.img+t.img,10))},e.prototype.addConstant=function(t){return new e(this.real+t,this.img)},e.prototype.negate=function(){return new e(-this.real,-this.img)},e.prototype.multiply=function(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)},e.prototype.multiplyConstant=function(t){return new e(this.real*t,this.img*t)},e.prototype.nthRoot=function(t){var i=Math.atan2(this.img,this.real),o=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),r=Math.pow(o,1/t);return new e(r*Math.cos(i/t),r*Math.sin(i/t))},e.prototype.equals=function(t){return this.real===t.real&&this.img===t.img},e.prototype.isReal=function(){return 0===this.img},e}(O);function Ot(t){return t<0?-1:1}function Rt(t,e,i,o){if(0===t)return function(t,e,i){var o=Math.sqrt(Math.pow(e,2)-4*t*i);return[(-e+o)/(2*t),(-e-o)/(2*t)]}(e,i,o);var r,n,s,a,p,h,c,l=(3*t*i-Math.pow(e,2))/(3*Math.pow(t,2)),u=(2*Math.pow(e,3)-9*t*e*i+27*Math.pow(t,2)*o)/(27*Math.pow(t,3)),f=Math.pow(l/3,3)+Math.pow(u/2,2),d=new Mt(0,1),y=-e/(3*t);f<0?(r=new Mt(-u/2,Math.sqrt(-f)).nthRoot(3),n=new Mt(-u/2,-Math.sqrt(-f)).nthRoot(3)):(r=-u/2+Math.sqrt(f),r=new Mt(Ot(r)*Math.pow(Math.abs(r),1/3)),n=-u/2-Math.sqrt(f),n=new Mt(Ot(n)*Math.pow(Math.abs(n),1/3))),s=r.add(n),h=r.add(n).multiplyConstant(-.5),c=r.add(n.negate()).multiplyConstant(Math.sqrt(3)/2),a=h.add(d.multiply(c)),p=h.add(d.negate().multiply(c));var g=[];return s.isReal()&&g.push(V(s.real+y,10)),a.isReal()&&g.push(V(a.real+y,10)),p.isReal()&&g.push(V(p.real+y,10)),g}function jt(t,e,i,o,r){for(var n,s=Pt(t,o),a=Rt(s[0],s[1],s[2],s[3]-e[o]),p=0;p<a.length;p++)if(0<=a[p]&&a[p]<=1&&(n=Tt(a[p],i,t),Math.abs(n-e[i])<=r))return!0}function Bt(t,e,i){var o;if(t.x!==e.x){var r=Math.min(t.x,e.x),n=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),p=r<=i.x&&i.x<n;o=s===a?i.y<=s&&p:p&&(a-s)*((t.x-e.x)*(t.y-e.y)>0?i.x-r:n-i.x)/(n-r)+s-i.y>=0}return o?1:0}function It(t){var e="_"+t;return function(t){return j(t)?(this._observerField(e,X.create(t)),this.geometryChange(),this):this[e]}}var zt=function(t,e){var 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}(t);return function(t,e){for(var i=0;i<e.length;i++)t[e[i]]=It(e[i])}(i.prototype,e),i};function Lt(t){for(var e=t.length,i=D,o=U,r=0;r<e;r++)o=Math.max(o,t[r]),i=Math.min(i,t[r]);return{min:i,max:o}}var Et=function(t){function e(e,i,o){t.call(this),this.anchor(e||new X),this.controlIn(i),this.controlOut(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bboxTo=function(t,e){var i=this.anchor().transformCopy(e),o=t.anchor().transformCopy(e);return this.controlOut()&&t.controlIn()?this._curveBoundingBox(i,this.controlOut().transformCopy(e),t.controlIn().transformCopy(e),o):this._lineBoundingBox(i,o)},e.prototype._lineBoundingBox=function(t,e){return W.fromPoints(t,e)},e.prototype._curveBoundingBox=function(t,e,i,o){var r=[t,e,i,o],n=this._curveExtremesFor(r,"x"),s=this._curveExtremesFor(r,"y"),a=Lt([n.min,n.max,t.x,o.x]),p=Lt([s.min,s.max,t.y,o.y]);return W.fromPoints(new X(a.min,p.min),new X(a.max,p.max))},e.prototype._curveExtremesFor=function(t,e){var i=this._curveExtremes(t[0][e],t[1][e],t[2][e],t[3][e]);return{min:Tt(i.min,e,t),max:Tt(i.max,e,t)}},e.prototype._curveExtremes=function(t,e,i,o){var r=t-3*e+3*i-o,n=-2*(t-2*e+i),s=t-e,a=Math.sqrt(n*n-4*r*s),p=0,h=1;0===r?0!==n&&(p=h=-s/n):isNaN(a)||(p=(-n+a)/(2*r),h=(-n-a)/(2*r));var c=Math.max(Math.min(p,h),0);(c<0||c>1)&&(c=0);var l=Math.min(Math.max(p,h),1);return(l>1||l<0)&&(l=1),{min:c,max:l}},e.prototype._intersectionsTo=function(t,e){return this.controlOut()&&t.controlIn()?function(t,e,i){for(var o,r=Pt(t,"x"),n=Rt(r[0],r[1],r[2],r[3]-e.x),s=0,a=0;a<n.length;a++)(ut(o=Tt(n[a],"y",t),e.y)||o>e.y)&&((0===n[a]||1===n[a])&&i.bottomRight().x>e.x||0<n[a]&&n[a]<1)&&s++;return s}([this.anchor(),this.controlOut(),t.controlIn(),t.anchor()],e,this.bboxTo(t)):Bt(this.anchor(),t.anchor(),e)},e.prototype._isOnCurveTo=function(t,e,i,o){if(this.bboxTo(t).expand(i,i).containsPoint(e)){var r=this.anchor(),n=this.controlOut(),s=t.controlIn(),a=t.anchor();if("start"===o&&r.distanceTo(e)<=i)return!Ct(r,n,e);if("end"===o&&a.distanceTo(e)<=i)return!Ct(a,s,e);var p=[r,n,s,a];if(jt(p,e,"x","y",i)||jt(p,e,"y","x",i))return!0;var h=J().rotate(45,e),c=[r.transformCopy(h),n.transformCopy(h),s.transformCopy(h),a.transformCopy(h)];return jt(c,e,"x","y",i)||jt(c,e,"y","x",i)}},e.prototype._isOnLineTo=function(t,e,i){var o=this.anchor(),r=t.anchor(),n=lt(Math.atan2(r.y-o.y,r.x-o.x));return new W([o.x,o.y-i/2],[o.distanceTo(r),i]).containsPoint(e.transformCopy(J().rotate(-n,o)))},e.prototype._isOnPathTo=function(t,e,i,o){return this.controlOut()&&t.controlIn()?this._isOnCurveTo(t,e,i/2,o):this._isOnLineTo(t,e,i)},e}(zt(R,["anchor","controlIn","controlOut"]));function Vt(t){if(t)return t[t.length-1]}function Ft(t,e,i){for(var o=e?0:1,r=0;r<t.length;r+=2)t.splice(r+o,0,i)}function Dt(t,e){if(t&&e)return e.scaleCopy(2).translate(-t.x,-t.y)}function Ut(t,e,i){var o=e.clone().scale(2/3);return{controlOut:o.clone().translateWith(t.scaleCopy(1/3)),controlIn:o.translateWith(i.scaleCopy(1/3))}}var Gt={l:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=2){var n=new X(i[r],i[r+1]);e.isRelative&&n.translateWith(o),t.lineTo(n.x,n.y),o.x=n.x,o.y=n.y}},c:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=6){var n=new X(i[r],i[r+1]),s=new X(i[r+2],i[r+3]),a=new X(i[r+4],i[r+5]);e.isRelative&&(s.translateWith(o),n.translateWith(o),a.translateWith(o)),t.curveTo(n,s,a),o.x=a.x,o.y=a.y}},v:function(t,e){var i=e.isRelative?0:e.position.x;Ft(e.parameters,!0,i),this.l(t,e)},h:function(t,e){var i=e.isRelative?0:e.position.y;Ft(e.parameters,!1,i),this.l(t,e)},a:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=7){var n=i[r],s=i[r+1],a=i[r+2],p=i[r+3],h=i[r+4],c=new X(i[r+5],i[r+6]);e.isRelative&&c.translateWith(o),o.x===c.x&&o.y===c.y||(t.arcTo(c,n,s,p,h,a),o.x=c.x,o.y=c.y)}},s:function(t,e){var i,o=e.parameters,r=e.position,n=e.previousCommand;"s"!==n&&"c"!==n||(i=Vt(Vt(t.paths).segments).controlIn());for(var s=0;s<o.length;s+=4){var a=new X(o[s],o[s+1]),p=new X(o[s+2],o[s+3]),h=void 0;e.isRelative&&(a.translateWith(r),p.translateWith(r)),h=i?Dt(i,r):r.clone(),i=a,t.curveTo(h,a,p),r.x=p.x,r.y=p.y}},q:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=4){var n=new X(i[r],i[r+1]),s=new X(i[r+2],i[r+3]);e.isRelative&&(n.translateWith(o),s.translateWith(o));var a=Ut(o,n,s);t.curveTo(a.controlOut,a.controlIn,s),o.x=s.x,o.y=s.y}},t:function(t,e){var i,o=e.parameters,r=e.position,n=e.previousCommand;"q"!==n&&"t"!==n||(i=Vt(Vt(t.paths).segments).controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(1.5));for(var s=0;s<o.length;s+=2){var a=new X(o[s],o[s+1]);e.isRelative&&a.translateWith(r),i=i?Dt(i,r):r.clone();var p=Ut(r,i,a);t.curveTo(p.controlOut,p.controlIn,a),r.x=a.x,r.y=a.y}}},Ht=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,Nt=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;var qt=function(t,e){var i,o=new X;return e.replace(Ht,(function(e,r,n,s){var a=r.toLowerCase(),p=a===r,h=function(t){var e=[];return t.replace(Nt,(function(t,i){e.push(parseFloat(i))})),e}(n.trim());if("m"===a&&(p?(o.x+=h[0],o.y+=h[1]):(o.x=h[0],o.y=h[1]),t.moveTo(o.x,o.y),h.length>2&&(a="l",h.splice(0,2))),Gt[a])Gt[a](t,{parameters:h,position:o,isRelative:p,previousCommand:i}),s&&"z"===s.toLowerCase()&&t.close();else if("m"!==a)throw new Error("Error while parsing SVG path. Unsupported command: "+a);i=a})),t};function Xt(t,e,i){for(var o,r=0;r<t.length;r++){var n=t[r];if(n.visible()){var s=e?n.bbox(i):n.rawBBox();s&&(o=o?W.union(o,s):s)}}return o}function Yt(t,e){for(var i,o=0;o<t.length;o++){var r=t[o];if(r.visible()){var n=r.clippedBBox(e);n&&(i=i?W.union(i,n):n)}}return i}var Wt=function(t){function e(e){t.call(this,e),this.segments=new kt,this.segments.addObserver(this),j(this.options.stroke)||(this.stroke("#000"),j(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return e.parse=function(t,e){return Zt.parse(t,e)},i.nodeType.get=function(){return"Path"},e.prototype.moveTo=function(t,e){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(t,e),this},e.prototype.lineTo=function(t,e){var i=j(e)?new X(t,e):t,o=new Et(i);return this.segments.push(o),this},e.prototype.curveTo=function(t,e,i){if(this.segments.length>0){var o=Vt(this.segments),r=new Et(i,e);this.suspend(),o.controlOut(t),this.resume(),this.segments.push(r)}return this},e.prototype.arc=function(t,e,i,o,r){if(this.segments.length>0){var n=Vt(this.segments).anchor(),s=G(t),a=new X(n.x-i*Math.cos(s),n.y-o*Math.sin(s)),p=new vt(a,{startAngle:t,endAngle:e,radiusX:i,radiusY:o,anticlockwise:r});this._addArcSegments(p)}return this},e.prototype.arcTo=function(t,e,i,o,r,n){if(this.segments.length>0){var s=Vt(this.segments).anchor(),a=vt.fromPoints(s,t,e,i,o,r,n);this._addArcSegments(a)}return this},e.prototype._addArcSegments=function(t){this.suspend();for(var e=t.curvePoints(),i=1;i<e.length;i+=3)this.curveTo(e[i],e[i+1],e[i+2]);this.resume(),this.geometryChange()},e.prototype.close=function(){return this.options.closed=!0,this.geometryChange(),this},e.prototype.rawBBox=function(){return this._bbox()},e.prototype._containsPoint=function(t){for(var e,i,o=this.segments,r=o.length,n=0,s=1;s<r;s++)e=o[s-1],i=o[s],n+=e._intersectionsTo(i,t);return!this.options.closed&&o[0].anchor().equals(o[r-1].anchor())||(n+=Bt(o[0].anchor(),o[r-1].anchor(),t)),n%2!=0},e.prototype._isOnPath=function(t,e){var i=this.segments,o=i.length,r=e||this.options.stroke.width;if(o>1){if(i[0]._isOnPathTo(i[1],t,r,"start"))return!0;for(var n=2;n<=o-2;n++)if(i[n-1]._isOnPathTo(i[n],t,r))return!0;if(i[o-2]._isOnPathTo(i[o-1],t,r,"end"))return!0}return!1},e.prototype._bbox=function(t){var e,i=this.segments,o=i.length;if(1===o){var r=i[0].anchor().transformCopy(t);e=new W(r,Y.ZERO)}else if(o>0)for(var n=1;n<o;n++){var s=i[n-1].bboxTo(i[n],t);e=e?W.union(e,s):s}return e},e.fromRect=function(t,i){return new e(i).moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close()},e.fromPoints=function(t,i){if(t){for(var o=new e(i),r=0;r<t.length;r++){var n=X.create(t[r]);n&&(0===r?o.moveTo(n):o.lineTo(n))}return o}},e.fromArc=function(t,i){var o=new e(i),r=t.startAngle,n=t.pointAt(r);return o.moveTo(n.x,n.y),o.arc(r,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),o},Object.defineProperties(e.prototype,i),e}(nt(at(et))),Zt=function(t){function e(e){t.call(this,e),this.paths=new kt,this.paths.addObserver(this),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return e.parse=function(t,i){var o=new e(i);return qt(o,t)},i.nodeType.get=function(){return"MultiPath"},e.prototype.moveTo=function(t,e){var i=new Wt;return i.moveTo(t,e),this.paths.push(i),this},e.prototype.lineTo=function(t,e){return this.paths.length>0&&Vt(this.paths).lineTo(t,e),this},e.prototype.curveTo=function(t,e,i){return this.paths.length>0&&Vt(this.paths).curveTo(t,e,i),this},e.prototype.arc=function(t,e,i,o,r){return this.paths.length>0&&Vt(this.paths).arc(t,e,i,o,r),this},e.prototype.arcTo=function(t,e,i,o,r,n){return this.paths.length>0&&Vt(this.paths).arcTo(t,e,i,o,r,n),this},e.prototype.close=function(){return this.paths.length>0&&Vt(this.paths).close(),this},e.prototype._bbox=function(t){return Xt(this.paths,!0,t)},e.prototype.rawBBox=function(){return Xt(this.paths,!1)},e.prototype._containsPoint=function(t){for(var e=this.paths,i=0;i<e.length;i++)if(e[i]._containsPoint(t))return!0;return!1},e.prototype._isOnPath=function(t){for(var e=this.paths,i=this.options.stroke.width,o=0;o<e.length;o++)if(e[o]._isOnPath(t,i))return!0;return!1},e.prototype._clippedBBox=function(t){return Yt(this.paths,this.currentTransform(t))},Object.defineProperties(e.prototype,i),e}(nt(at(et))),Jt=function(t){function e(e,i){void 0===e&&(e=new vt),void 0===i&&(i={}),t.call(this,i),this.geometry(e),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Arc"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this.geometry().bbox()},e.prototype.toPath=function(){var t=new Wt,e=this.geometry().curvePoints();if(e.length>0){t.moveTo(e[0].x,e[0].y);for(var i=1;i<e.length;i+=3)t.curveTo(e[i],e[i+1],e[i+2])}return t},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,i),e}(nt(at(ht(et)))),Kt=function(t){function e(e){t.call(this),this._size=e,this._length=0,this._map={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.put=function(t,e){var i=this._map,o={key:t,value:e};i[t]=o,this._head?(this._tail.newer=o,o.older=this._tail,this._tail=o):this._head=this._tail=o,this._length>=this._size?(i[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},e.prototype.get=function(t){var e=this._map[t];if(e)return e===this._head&&e!==this._tail&&(this._head=e.newer,this._head.older=null),e!==this._tail&&(e.older&&(e.older.newer=e.newer,e.newer.older=e.older),e.older=this._tail,e.newer=null,this._tail.newer=e,this._tail=e),e.value},e}(O),$t=/\r?\n|\r|\t/g;function Qt(t){return String(t).replace($t," ")}function te(t){var e=[];for(var i in t)e.push(i+t[i]);return e.sort().join("")}function ee(t){for(var e=2166136261,i=0;i<t.length;++i)e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24),e^=t.charCodeAt(i);return e>>>0}var ie,oe={baselineMarkerSize:1};"undefined"!=typeof document&&((ie=document.createElement("div")).style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;");var re=function(t){function e(e){t.call(this),this._cache=new Kt(1e3),this.options=Object.assign({},oe,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.measure=function(t,e,i){if(void 0===i&&(i={}),null==t)return{width:0,height:0,baseline:0};var o=ee(t+te(e)),r=this._cache.get(o);if(r)return r;var n={width:0,height:0,baseline:0},s=i.box||ie,a=this._baselineMarker().cloneNode(!1);for(var p in e){var h=e[p];void 0!==h&&(s.style[p]=h)}var c=!1!==i.normalizeText?Qt(t):String(t);return s.textContent=c,s.appendChild(a),document.body.appendChild(s),c.length&&(n.width=s.offsetWidth-this.options.baselineMarkerSize,n.height=s.offsetHeight,n.baseline=a.offsetTop+this.options.baselineMarkerSize),n.width>0&&n.height>0&&this._cache.put(o,n),s.parentNode.removeChild(s),n},e.prototype._baselineMarker=function(){var t=document.createElement("div");return t.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",t},e}(O);re.current=new re;var ne=re;function se(t,e,i){return ne.current.measure(t,e,i)}var ae=function(t){function e(e,i,o){void 0===i&&(i=new X),void 0===o&&(o={}),t.call(this,o),this.content(e),this.position(i),this.options.font||(this.options.font="12px sans-serif"),j(this.options.fill)||this.fill("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Text"},e.prototype.content=function(t){return j(t)?(this.options.set("content",t),this):this.options.get("content")},e.prototype.measure=function(){return se(this.content(),{font:this.options.get("font")})},e.prototype.rect=function(){var t=this.measure(),e=this.position().clone();return new W(e,[t.width,t.height])},e.prototype.bbox=function(t){var e=q(this.currentTransform(t));return this.rect().bbox(e)},e.prototype.rawBBox=function(){return this.rect().bbox()},e.prototype._containsPoint=function(t){return this.rect().containsPoint(t)},Object.defineProperties(e.prototype,i),e}(nt(zt(et,["position"]))),pe=function(t){function e(e,i,o){void 0===i&&(i=new W),void 0===o&&(o={}),t.call(this,o),this.src(e),this.rect(i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Image"},e.prototype.src=function(t){return j(t)?(this.options.set("src",t),this):this.options.get("src")},e.prototype.bbox=function(t){var e=q(this.currentTransform(t));return this._rect.bbox(e)},e.prototype.rawBBox=function(){return this._rect.bbox()},e.prototype._containsPoint=function(t){return this._rect.containsPoint(t)},e.prototype._hasFill=function(){return this.src()},Object.defineProperties(e.prototype,i),e}(ht(et,["rect"])),he=function(t,e){return function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.traverse=function(t){for(var i=this[e],o=0;o<i.length;o++){var r=i[o];r.traverse?r.traverse(t):t(r)}return this},i}(t)};function ce(t,e){return t.push.apply(t,e),t}var le=function(t){function e(e){t.call(this,e),this.children=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Group"},e.prototype.childrenChange=function(t,e,i){this.trigger("childrenChange",{action:t,items:e,index:i})},e.prototype.append=function(){return ce(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},e.prototype.insert=function(t,e){return this.children.splice(t,0,e),e.parent=this,this.childrenChange("add",[e],t),this},e.prototype.insertAt=function(t,e){return this.insert(e,t)},e.prototype.remove=function(t){var e=this.children.indexOf(t);return e>=0&&(this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)),this},e.prototype.removeAt=function(t){if(0<=t&&t<this.children.length){var e=this.children[t];this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)}return this},e.prototype.clear=function(){var t=this.children;return this.children=[],this._reparent(t,null),this.childrenChange("remove",t,0),this},e.prototype.bbox=function(t){return Xt(this.children,!0,this.currentTransform(t))},e.prototype.rawBBox=function(){return Xt(this.children,!1)},e.prototype._clippedBBox=function(t){return Yt(this.children,this.currentTransform(t))},e.prototype.currentTransform=function(t){return et.prototype.currentTransform.call(this,t)||null},e.prototype.containsPoint=function(t,e){if(this.visible())for(var i=this.children,o=this.currentTransform(e),r=0;r<i.length;r++)if(i[r].containsPoint(t,o))return!0;return!1},e.prototype._reparent=function(t,e){for(var i=0;i<t.length;i++){var o=t[i],r=o.parent;r&&r!==this&&r.remove&&r.remove(o),o.parent=e}},Object.defineProperties(e.prototype,i),e}(he(et,"children"));function ue(t,e,i){var o=i.transform()||J(),r=o.matrix();r.e+=t.x-e.origin.x,r.f+=t.y-e.origin.y,o.matrix(r),i.transform(o)}function fe(t,e,i,o,r){return"start"===i?e.origin[o]:"end"===i?e.origin[o]+e.size[r]-t:e.origin[o]+(e.size[r]-t)/2}function de(t,e,i,o,r){return"start"===i?e.origin[o]+e.size[r]-t:"end"===i?e.origin[o]:e.origin[o]+(e.size[r]-t)/2}var ye={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0,revers:!1},ge=function(t,e){t.forEach(e)},ve=function(t,e){for(var i=t.length-1;i>=0;i--)e(t[i],i)},me=function(t){function e(e,i){t.call(this,Object.assign({},ye,i)),this._rect=e,this._fieldMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rect=function(t){return t?(this._rect=t,this):this._rect},e.prototype._initMap=function(){var t=this.options,e=this._fieldMap;"horizontal"===t.orientation?(e.sizeField="width",e.groupsSizeField="height",e.groupAxis="x",e.groupsAxis="y"):(e.sizeField="height",e.groupsSizeField="width",e.groupAxis="y",e.groupsAxis="x"),t.reverse?(this.forEach=ve,this.justifyAlign=de):(this.forEach=ge,this.justifyAlign=fe)},e.prototype.reflow=function(){if(this._rect&&0!==this.children.length){this._initMap(),this.options.transform&&this.transform(null);for(var t,e,i,o=this.options,r=this._rect,n=this._initGroups(),s=n.groups,a=n.groupsSize,p=this._fieldMap,h=p.sizeField,c=p.groupsSizeField,l=p.groupAxis,u=p.groupsAxis,f=new X,d=new X,y=new Y,g=fe(a,r,o.alignContent,u,c),v=function(r,n){var s=e.elements[n];d[l]=t,d[u]=fe(r.size[c],i,o.alignItems,u,c),ue(d,r,s),t+=r.size[h]+o.spacing},m=0;m<s.length;m++)e=s[m],f[l]=t=this.justifyAlign(e.size,r,o.justifyContent,l,h),f[u]=g,y[h]=e.size,y[c]=e.lineSize,i=new W(f,y),this.forEach(e.bboxes,v),g+=e.lineSize+o.lineSpacing;if(!o.wrap&&e.size>r.size[h]){var x=r.size[h]/i.size[h],_=i.topLeft().scale(x,x),b=fe(i.size[c]*x,r,o.alignContent,u,c),w=J();"x"===l?w.translate(r.origin.x-_.x,b-_.y):w.translate(b-_.x,r.origin.y-_.y),w.scale(x,x),this.transform(w)}}},e.prototype._initGroups=function(){for(var t=this.options,e=this.children,i=t.lineSpacing,o=t.wrap,r=t.spacing,n=this._fieldMap.sizeField,s=this._newGroup(),a=[],p=function(){a.push(s),h+=s.lineSize+i},h=-i,c=0;c<e.length;c++){var l=e[c],u=e[c].clippedBBox();l.visible()&&u&&(o&&s.size+u.size[n]+r>this._rect.size[n]?0===s.bboxes.length?(this._addToGroup(s,u,l),p(),s=this._newGroup()):(p(),s=this._newGroup(),this._addToGroup(s,u,l)):this._addToGroup(s,u,l))}return s.bboxes.length&&p(),{groups:a,groupsSize:h}},e.prototype._addToGroup=function(t,e,i){t.size+=e.size[this._fieldMap.sizeField]+this.options.spacing,t.lineSize=Math.max(e.size[this._fieldMap.groupsSizeField],t.lineSize),t.bboxes.push(e),t.elements.push(i)},e.prototype._newGroup=function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}},e}(le),xe=function(t){function e(e,i){void 0===e&&(e=new W),void 0===i&&(i={}),t.call(this,i),this.geometry(e),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Rect"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._containsPoint=function(t){return this._geometry.containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,i),e}(nt(at(ht(et))));function _e(t,e,i,o,r){for(var n=0;n<t.length;n++){var s=t[n].clippedBBox();if(s){var a=s.origin.clone();a[o]=fe(s.size[r],e,i||"start",o,r),ue(a,s,t[n])}}}function be(t,e,i){_e(t,e,i,"x","width")}function we(t,e,i){_e(t,e,i,"y","height")}function Ae(t,e,i,o){if(t.length>1)for(var r=new X,n=t[0].bbox,s=1;s<t.length;s++){var a=t[s].element,p=t[s].bbox;r[e]=n.origin[e]+n.size[o],r[i]=p.origin[i],ue(r,p,a),p.origin[e]=r[e],n=p}}function Se(t){for(var e=[],i=0;i<t.length;i++){var o=t[i],r=o.clippedBBox();r&&e.push({element:o,bbox:r})}return e}function ke(t){Ae(Se(t),"x","y","width")}function Ce(t){Ae(Se(t),"y","x","height")}function Te(t,e,i,o,r){for(var n=function(t,e,i){for(var o,r,n=e.size[i],s=[],a=[],p=0,h=function(){a.push({element:o,bbox:r})},c=0;c<t.length;c++)if(o=t[c],r=o.clippedBBox()){var l=r.size[i];p+l>n?a.length?(s.push(a),a=[],h(),p=l):(h(),s.push(a),a=[],p=0):(h(),p+=l)}return a.length&&s.push(a),s}(t,e,r),s=e.origin.clone(),a=[],p=0;p<n.length;p++){var h=n[p],c=h[0];s[o]=c.bbox.origin[o],ue(s,c.bbox,c.element),c.bbox.origin[i]=s[i],Ae(h,i,o,r),a.push([]);for(var l=0;l<h.length;l++)a[p].push(h[l].element)}return a}function Pe(t,e){return Te(t,e,"x","y","width")}function Me(t,e){return Te(t,e,"y","x","height")}function Oe(t,e){var i=t.clippedBBox();if(i){var o=i.size,r=e.size;if(r.width<o.width||r.height<o.height){var n=Math.min(r.width/o.width,r.height/o.height),s=t.transform()||J();s.scale(n,n),t.transform(s)}}}var Re=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._change=function(){this.optionsChange({field:"stops"})},e}(St);function je(t){return function(e){return j(e)?(this.options.set(t,e),this):this.options.get(t)}}var Be=function(t){function e(e,i,o){t.call(this),this.options=new I({offset:e,color:i,opacity:j(o)?o:1}),this.options.addObserver(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(j(t))return t instanceof e?t:t.length>1?new e(t[0],t[1],t[2]):new e(t.offset,t.color,t.opacity)},e}(function(t,e){var 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}(t);return function(t,e){for(var i=0;i<e.length;i++)t[e[i]]=je(e[i])}(i.prototype,e),i}(R,["offset","color","opacity"])),Ie=function(t){function e(e){void 0===e&&(e={}),t.call(this),this.stops=new Re(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=$()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Gradient"},e.prototype.userSpace=function(t){return j(t)?(this._userSpace=t,this.optionsChange(),this):this._userSpace},e.prototype._createStops=function(t){void 0===t&&(t=[]);for(var e=[],i=0;i<t.length;i++)e.push(Be.create(t[i]));return e},e.prototype.addStop=function(t,e,i){this.stops.push(new Be(t,e,i))},e.prototype.removeStop=function(t){var e=this.stops.indexOf(t);e>=0&&this.stops.splice(e,1)},e.prototype.optionsChange=function(t){this.trigger("optionsChange",{field:"gradient"+(t?"."+t.field:""),value:this})},e.prototype.geometryChange=function(){this.optionsChange()},Object.defineProperties(e.prototype,i),e}(R),ze=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.start(e.start||new X),this.end(e.end||new X(1,0))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(zt(Ie,["start","end"])),Le=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.center(e.center||new X),this._radius=j(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radius=function(t){return j(t)?(this._radius=t,this.geometryChange(),this):this._radius},e.prototype.fallbackFill=function(t){return j(t)?(this._fallbackFill=t,this.optionsChange(),this):this._fallbackFill},e}(zt(Ie,["center"]));function Ee(t){return.5-Math.cos(t*Math.PI)/2}function Ve(t){return t}function Fe(t,e,i,o){var r=1.70158,n=0,s=o;return 0===t?i:1===t?i+o:(n||(n=.5),s<Math.abs(o)?(s=o,r=n/4):r=n/(2*Math.PI)*Math.asin(o/s),s*Math.pow(2,-10*t)*Math.sin((Number(t)-r)*(1.1*Math.PI)/n)+o+i)}var De=Date.now||function(){return(new Date).getTime()};function Ue(t,e,i){return Math.max(Math.min(t,i),e)}var Ge,He,Ne=function(t){var e="undefined"!=typeof window?window:{},i=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};(Ne=function(t){return i.call(e,t)})(t)},qe=Ne,Xe=function(t){function e(){t.call(this),this._items=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={current:{configurable:!0}};return i.current.get=function(){return Ge||(Ge=new e),Ge},e.prototype.register=function(t,e){this._items.push({name:t,type:e})},e.prototype.create=function(t,e){var i,o=this._items;if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<o.length;n++)if(o[n].name.toLowerCase()===r){i=o[n];break}if(i)return new i.type(t,e)},Object.defineProperties(e,i),e}(O),Ye=function(t){function e(e,i){t.call(this),this.options=Object.assign({},this.options,i),this.element=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={options:{configurable:!0}};return e.create=function(t,e,i){return Xe.current.create(t,e,i)},i.options.get=function(){return this._options||{duration:500,easing:"swing"}},i.options.set=function(t){this._options=t},e.prototype.setup=function(){},e.prototype.step=function(){},e.prototype.play=function(){var t=this,e=this.options,i=e.duration,r=e.delay;void 0===r&&(r=0);var n=o[e.easing],s=De()+r,a=s+i;0===i?(this.step(1),this.abort()):setTimeout((function(){var e=function(){if(!t._stopped){var o=De(),r=Ue(o-s,0,i),p=n(r/i,r,0,1,i);t.step(p),o<a?qe(e):t.abort()}};e()}),r)},e.prototype.abort=function(){this._stopped=!0},e.prototype.destroy=function(){this.abort()},Object.defineProperties(e.prototype,i),e}(O),We=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={current:{configurable:!0}};return i.current.get=function(){return He||(He=new e),He},e.prototype.parse=function(t,e){var i=new Zt(e);return qt(i,t)},Object.defineProperties(e,i),e}(O),Ze=function(t){function e(e){t.call(this),this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.srcElement&&this.srcElement.removeObserver(this);for(var t=this.childNodes,e=0;e<t.length;e++)this.childNodes[e].destroy();this.parent=null},e.prototype.load=function(){},e.prototype.observe=function(){this.srcElement&&this.srcElement.addObserver(this)},e.prototype.append=function(t){this.childNodes.push(t),t.parent=this},e.prototype.insertAt=function(t,e){this.childNodes.splice(e,0,t),t.parent=this},e.prototype.remove=function(t,e){for(var i=t+e,o=t;o<i;o++)this.childNodes[o].removeSelf();this.childNodes.splice(t,e)},e.prototype.removeSelf=function(){this.clear(),this.destroy()},e.prototype.clear=function(){this.remove(0,this.childNodes.length)},e.prototype.invalidate=function(){this.parent&&this.parent.invalidate()},e.prototype.geometryChange=function(){this.invalidate()},e.prototype.optionsChange=function(){this.invalidate()},e.prototype.childrenChange=function(t){"add"===t.action?this.load(t.items,t.index):"remove"===t.action&&this.remove(t.index,t.items.length),this.invalidate()},e}(O),Je=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,i){var o=arguments,r=this,n=$e(t),s=Ke(e),a=n.length;if(void 0===e){for(var p in t)r.bind(p,t[p]);return this}for(var h=function(t){var a=n[t],p=s?e:e[a];if(p){if(i){var h=p;(p=function(){r.unbind(a,p),h.apply(r,o)}).original=h}(r._events[a]=r._events[a]||[]).push(p)}},c=0;c<a;c++)h(c);return this},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){for(var i=$e(t),o=Ke(e),r=0,n=i.length;r<n;r++){var s=i[r],a=o?e:e[s];if(a)(this._events[s]=this._events[s]||[]).unshift(a)}return this},e.prototype.trigger=function(t,e){void 0===e&&(e={});var i=this._events[t];if(i){var o=i.length;e.sender=this,e._defaultPrevented=!1,e.preventDefault=Qe,e.isDefaultPrevented=ti,i=i.slice();for(var r=0;r<o;r++)i[r].call(this,e);return!0===e._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(var o=i.length-1;o>=0;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},e}(O);function Ke(t){return"function"==typeof t}function $e(t){return"string"==typeof t?[t]:t}function Qe(){this._defaultPrevented=!0}function ti(){return!0===this._defaultPrevented}function ei(t,e){for(var i={},o=window.getComputedStyle(t)||{},r=Array.isArray(e)?e:[e],n=0;n<r.length;n++){var s=r[n];i[s]=o[s]}return i}function ii(t){return isNaN(t)?t:t+"px"}function oi(t,e){if(!e){var i=ei(t,["width","height"]);return{width:parseInt(i.width,10),height:parseInt(i.height,10)}}var o=e.width,r=e.height;j(o)&&(t.style.width=ii(o)),j(r)&&(t.style.height=ii(r))}function ri(t){return void 0===t&&(t={}),t.touch?t.touch.initialTouch:t.target}function ni(t){var e=ei(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop;return{top:parseFloat(o),left:parseFloat(i)}}function si(t){var e=t.getBoundingClientRect(),i=document.documentElement;return{top:e.top+(window.pageYOffset||i.scrollTop)-(i.clientTop||0),left:e.left+(window.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}}function ai(t){return j((t.x||{}).location)?{x:t.x.location,y:t.y.location}:{x:t.pageX||t.clientX||0,y:t.pageY||t.clientY||0}}var pi=/matrix\((.*)\)/;function hi(t){var e=getComputedStyle(t).transform;return"none"===e?N.unit():function(t){var e=t.match(pi);if(null===e||2!==e.length)return N.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(N,[null].concat(i)))}(e)}function ci(t){if(!t)return N.unit();for(var e=hi(t),i=t.parentElement;i;){var o=hi(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}var li=["click","mouseenter","mouseleave","mousemove","resize"],ui=function(t){function e(e,i){t.call(this),this.options=Object.assign({},i),this.element=e,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new le,oi(e,this.options),this.bind(li,this.options),this._enableTracking()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.draw=function(t){this._visual.children.push(t)},e.prototype.clear=function(){this._visual.children=[]},e.prototype.destroy=function(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()},e.prototype.eventTarget=function(t){for(var e,i=ri(t);!e&&i&&(e=i._kendoNode,i!==this.element);)i=i.parentElement;if(e)return e.srcElement},e.prototype.exportVisual=function(){return this._visual},e.prototype.getSize=function(){return oi(this.element)},e.prototype.currentSize=function(t){if(!t)return this._size;this._size=t},e.prototype.setSize=function(t){oi(this.element,t),this.currentSize(t),this._resize()},e.prototype.resize=function(t){var e=this.getSize(),i=this.currentSize();(t||(e.width>0||e.height>0)&&(!i||e.width!==i.width||e.height!==i.height))&&(this.currentSize(e),this._resize(e,t),this.trigger("resize",e))},e.prototype.size=function(t){if(!t)return this.getSize();this.setSize(t)},e.prototype.suspendTracking=function(){this._suspendedTracking=!0},e.prototype.resumeTracking=function(){this._suspendedTracking=!1},e.prototype._enableTracking=function(){},e.prototype._resize=function(){},e.prototype._handler=function(t){var e=this;return function(i){var o=e.eventTarget(i);o&&!e._suspendedTracking&&e.trigger(t,{element:o,originalEvent:i,type:t})}},e.prototype._elementOffset=function(){var t=this.element,e=ni(t),i=si(t),o=i.left,r=i.top;return{left:o+e.left,top:r+e.top}},e.prototype._surfacePoint=function(t){var e=this._elementOffset(),i=ai(t),o=i.x-e.left,r=i.y-e.top,n=ci(this.element).invert();return new X(o,r).transform(n)},e}(Je);function fi(t){var e=window.console;void 0!==e&&e.log&&e.log(t)}function di(t,e){return j(e)&&null!==e?" "+t+'="'+e+'" ':""}function yi(t){for(var e="",i=0;i<t.length;i++)e+=di(t[i][0],t[i][1]);return e}function gi(t){for(var e="",i=0;i<t.length;i++){var o=t[i][1];j(o)&&(e+=t[i][0]+":"+o+";")}if(""!==e)return e}var vi={},mi="http://www.w3.org/2000/svg",xi=function(t,e){t.innerHTML=e};if("undefined"!=typeof document){var _i=document.createElement("div"),bi="undefined"!=typeof DOMParser;_i.innerHTML="<svg xmlns='http://www.w3.org/2000/svg'></svg>",bi&&_i.firstChild.namespaceURI!==mi&&(xi=function(t,e){var i=(new DOMParser).parseFromString(e,"text/xml"),o=document.adoptNode(i.documentElement);t.innerHTML="",t.appendChild(o)})}var wi=xi;var Ai={},Si={get browser(){return"undefined"==typeof window||Ai?Ai:Ai=function(t){var e,i={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var o in i)if(i.hasOwnProperty(o)){var r=t.match(i[o]);if(r){(e={})[o]=!0,e[r[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,e.version=parseInt(document.documentMode||r[2],10);break}}return e}(window.navigator.userAgent)}},ki={clip:"clip-path",fill:"fill"};function Ci(t,e){return"clip"===t||"fill"===t&&(!e||"Gradient"===e.nodeType)}var Ti=function(t){function e(e,i){t.call(this,e),this.definitions={},this.options=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),t.prototype.destroy.call(this)},e.prototype.load=function(t,e){for(var i=0;i<t.length;i++){var o=t[i],r=o.children,n=new vi[o.nodeType](o,this.options);j(e)?this.insertAt(n,e):this.append(n),n.createDefinitions(),r&&r.length>0&&n.load(r);var s=this.element;s&&n.attachTo(s,e)}},e.prototype.root=function(){for(var t=this;t.parent;)t=t.parent;return t},e.prototype.attachTo=function(t,e){var i=document.createElement("div");wi(i,"<svg xmlns='"+mi+"' version='1.1'>"+this.render()+"</svg>");var o=i.firstChild.firstChild;o&&(j(e)?t.insertBefore(o,t.childNodes[e]||null):t.appendChild(o),this.setElement(o))},e.prototype.setElement=function(t){this.element&&(this.element._kendoNode=null),this.element=t,this.element._kendoNode=this;for(var e=this.childNodes,i=0;i<e.length;i++){var o=t.childNodes[i];e[i].setElement(o)}},e.prototype.clear=function(){this.clearDefinitions(),this.element&&(this.element.innerHTML="");for(var t=this.childNodes,e=0;e<t.length;e++)t[e].destroy();this.childNodes=[]},e.prototype.removeSelf=function(){if(this.element){var e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}t.prototype.removeSelf.call(this)},e.prototype.template=function(){return this.renderChildren()},e.prototype.render=function(){return this.template()},e.prototype.renderChildren=function(){for(var t=this.childNodes,e="",i=0;i<t.length;i++)e+=t[i].render();return e},e.prototype.optionsChange=function(e){var i=e.field,o=e.value;"visible"===i?this.css("display",o?"":"none"):ki[i]&&Ci(i,o)?this.updateDefinition(i,o):"opacity"===i?this.attr("opacity",o):"cursor"===i?this.css("cursor",o):"id"===i&&(o?this.attr("id",o):this.removeAttr("id")),t.prototype.optionsChange.call(this,e)},e.prototype.attr=function(t,e){this.element&&this.element.setAttribute(t,e)},e.prototype.allAttr=function(t){for(var e=0;e<t.length;e++)this.attr(t[e][0],t[e][1])},e.prototype.css=function(t,e){this.element&&(this.element.style[t]=e)},e.prototype.allCss=function(t){for(var e=0;e<t.length;e++)this.css(t[e][0],t[e][1])},e.prototype.removeAttr=function(t){this.element&&this.element.removeAttribute(t)},e.prototype.mapTransform=function(t){var e=[];return t&&e.push(["transform","matrix("+t.matrix().toString(6)+")"]),e},e.prototype.renderTransform=function(){return yi(this.mapTransform(this.srcElement.transform()))},e.prototype.transformChange=function(t){t?this.allAttr(this.mapTransform(t)):this.removeAttr("transform")},e.prototype.mapStyle=function(){var t=this.srcElement.options,e=[["cursor",t.cursor]];return!1===t.visible&&e.push(["display","none"]),e},e.prototype.renderStyle=function(){return di("style",gi(this.mapStyle(!0)))},e.prototype.renderOpacity=function(){return di("opacity",this.srcElement.options.opacity)},e.prototype.renderId=function(){return di("id",this.srcElement.options.id)},e.prototype.createDefinitions=function(){var t=this.srcElement,e=this.definitions;if(t){var i,o=t.options;for(var r in ki){var n=o.get(r);n&&Ci(r,n)&&(e[r]=n,i=!0)}i&&this.definitionChange({action:"add",definitions:e})}},e.prototype.definitionChange=function(t){this.parent&&this.parent.definitionChange(t)},e.prototype.updateDefinition=function(t,e){var i=this.definitions,o=i[t],r=ki[t],n={};o&&(n[t]=o,this.definitionChange({action:"remove",definitions:n}),delete i[t]),e?(n[t]=e,this.definitionChange({action:"add",definitions:n}),i[t]=e,this.attr(r,this.refUrl(e.id))):o&&this.removeAttr(r)},e.prototype.clearDefinitions=function(){var t=this.definitions;this.definitionChange({action:"remove",definitions:t}),this.definitions={}},e.prototype.renderDefinitions=function(){return yi(this.mapDefinitions())},e.prototype.mapDefinitions=function(){var t=this.definitions,e=[];for(var i in t)e.push([ki[i],this.refUrl(t[i].id)]);return e},e.prototype.refUrl=function(t){var e=(this.options||{}).skipBaseHref,i=this.baseUrl().replace(/'/g,"\\'");return"url("+(e?"":i)+"#"+t+")"},e.prototype.baseUrl=function(){return function(){var t=document.getElementsByTagName("base")[0],e=document.location.href,i="";if(t&&!(Si.browser||{}).msie){var o=e.indexOf("#");-1!==o&&(e=e.substring(0,o)),i=e}return i}()},e}(Ze),Pi=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.template=function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},e.prototype.renderOffset=function(){return di("offset",this.srcElement.offset())},e.prototype.mapStyle=function(){var t=this.srcElement;return[["stop-color",t.color()],["stop-opacity",t.opacity()]]},e.prototype.optionsChange=function(t){"offset"===t.field?this.attr(t.field,t.value):"color"!==t.field&&"opacity"!==t.field||this.css("stop-"+t.field,t.value)},e}(Ti),Mi=function(t){function e(e){t.call(this,e),this.id=e.id,this.loadStops()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.loadStops=function(){for(var t=this.srcElement.stops,e=this.element,i=0;i<t.length;i++){var o=new Pi(t[i]);this.append(o),e&&o.attachTo(e)}},e.prototype.optionsChange=function(t){"gradient.stops"===t.field?(Ze.prototype.clear.call(this),this.loadStops()):"gradient"===t.field&&this.allAttr(this.mapCoordinates())},e.prototype.renderCoordinates=function(){return yi(this.mapCoordinates())},e.prototype.mapSpace=function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]},e}(Ti),Oi=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.template=function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.start(),i=t.end();return[["x1",e.x],["y1",e.y],["x2",i.x],["y2",i.y],this.mapSpace()]},e}(Mi),Ri=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.template=function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.center(),i=t.radius();return[["cx",e.x],["cy",e.y],["r",i],this.mapSpace()]},e}(Mi),ji=function(t){function e(e){t.call(this),this.srcElement=e,this.id=e.id,this.load([e])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.template=function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"},e}(Ti),Bi=function(t){function e(){t.call(this),this.definitionMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t},e.prototype.template=function(){return"<defs>"+this.renderChildren()+"</defs>"},e.prototype.definitionChange=function(t){var e=t.definitions,i=t.action;"add"===i?this.addDefinitions(e):"remove"===i&&this.removeDefinitions(e)},e.prototype.createDefinition=function(t,e){var i;return"clip"===t?i=ji:"fill"===t&&(e instanceof ze?i=Oi:e instanceof Le&&(i=Ri)),new i(e)},e.prototype.addDefinitions=function(t){for(var e in t)this.addDefinition(e,t[e])},e.prototype.addDefinition=function(t,e){var i=this.element,o=this.definitionMap,r=e.id,n=o[r];if(n)n.count++;else{var s=this.createDefinition(t,e);o[r]={element:s,count:1},this.append(s),i&&s.attachTo(this.element)}},e.prototype.removeDefinitions=function(t){for(var e in t)this.removeDefinition(t[e])},e.prototype.removeDefinition=function(t){var e=this.definitionMap,i=t.id,o=e[i];o&&(o.count--,0===o.count&&(this.remove(this.childNodes.indexOf(o.element),1),delete e[i]))},e}(Ti),Ii=function(t){function e(e){t.call(this),this.options=e,this.defs=new Bi}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t,this.defs.attachTo(t.firstElementChild)},e.prototype.clear=function(){Ze.prototype.clear.call(this)},e.prototype.template=function(){return this.defs.render()+this.renderChildren()},e.prototype.definitionChange=function(t){this.defs.definitionChange(t)},e}(Ti);function zi(t,e){for(var i in e)for(var o=i.trim().split(" "),r=0;r<o.length;r++)t.addEventListener(o[r],e[i],!1)}function Li(t,e){for(var i in void 0===e&&(e={}),e)for(var o=i.trim().split(" "),r=0;r<o.length;r++)t.removeEventListener(o[r],e[i],!1)}var Ei={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Vi={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Fi=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.geometryChange=function(){this.attr("d",this.renderData()),this.invalidate()},e.prototype.optionsChange=function(e){switch(e.field){case"fill":e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:e.value}));break;case"stroke":e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(e.value);break;default:var i=Vi[e.field];i&&this.attr(i,e.value)}t.prototype.optionsChange.call(this,e)},e.prototype.content=function(){this.element&&(this.element.textContent=this.srcElement.content())},e.prototype.renderData=function(){return this.printPath(this.srcElement)},e.prototype.printPath=function(t){var e=t.segments,i=e.length;if(i>0){for(var o,r,n=[],s=1;s<i;s++){var a=this.segmentType(e[s-1],e[s]);a!==r&&(r=a,n.push(a)),"L"===a?n.push(this.printPoints(e[s].anchor())):n.push(this.printPoints(e[s-1].controlOut(),e[s].controlIn(),e[s].anchor()))}return o="M"+this.printPoints(e[0].anchor())+" "+n.join(" "),t.options.closed&&(o+="Z"),o}},e.prototype.printPoints=function(){for(var t=arguments,e=t.length,i=[],o=0;o<e;o++)i.push(t[o].toString(3));return i.join(" ")},e.prototype.segmentType=function(t,e){return t.controlOut()&&e.controlIn()?"C":"L"},e.prototype.mapStroke=function(t){var e=[];return t&&!tt(t.color)?(e.push(["stroke",t.color]),e.push(["stroke-width",t.width]),e.push(["stroke-linecap",this.renderLinecap(t)]),e.push(["stroke-linejoin",t.lineJoin]),j(t.opacity)&&e.push(["stroke-opacity",t.opacity]),j(t.dashType)&&e.push(["stroke-dasharray",this.renderDashType(t)])):e.push(["stroke","none"]),e},e.prototype.renderStroke=function(){return yi(this.mapStroke(this.srcElement.options.stroke))},e.prototype.renderDashType=function(t){var e=t.dashType,i=t.width;if(void 0===i&&(i=1),e&&"solid"!==e){for(var o=Ei[e.toLowerCase()],r=[],n=0;n<o.length;n++)r.push(o[n]*i);return r.join(" ")}},e.prototype.renderLinecap=function(t){var e=t.dashType,i=t.lineCap;return e&&"solid"!==e?"butt":i},e.prototype.mapFill=function(t){var e=[];return t&&"Gradient"===t.nodeType||(t&&!tt(t.color)?(e.push(["fill",t.color]),j(t.opacity)&&e.push(["fill-opacity",t.opacity])):e.push(["fill","none"])),e},e.prototype.renderFill=function(){return yi(this.mapFill(this.srcElement.options.fill))},e.prototype.template=function(){return"<path "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" "+di("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"},e}(Ti),Di=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.renderData=function(){return this.printPath(this.srcElement.toPath())},e}(Fi),Ui=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.geometryChange=function(){var t=this.center();this.attr("cx",t.x),this.attr("cy",t.y),this.attr("r",this.radius()),this.invalidate()},e.prototype.center=function(){return this.srcElement.geometry().center},e.prototype.radius=function(){return this.srcElement.geometry().radius},e.prototype.template=function(){return"<circle "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"},e}(Fi),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.template=function(){return"<g"+(this.renderId()+this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},e.prototype.optionsChange=function(e){"transform"===e.field&&this.transformChange(e.value),t.prototype.optionsChange.call(this,e)},e}(Ti),Hi=/&/g,Ni=/</g,qi=/"/g,Xi=/'/g,Yi=/>/g;function Wi(t){return String(t).replace(Hi,"&amp;").replace(Ni,"&lt;").replace(Yi,"&gt;").replace(qi,"&quot;").replace(Xi,"&#39;")}var Zi=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.geometryChange=function(){this.allAttr(this.mapPosition()),this.invalidate()},e.prototype.optionsChange=function(e){"src"===e.field&&this.allAttr(this.mapSource()),t.prototype.optionsChange.call(this,e)},e.prototype.mapPosition=function(){var t=this.srcElement.rect(),e=t.topLeft();return[["x",e.x],["y",e.y],["width",t.width()+"px"],["height",t.height()+"px"]]},e.prototype.renderPosition=function(){return yi(this.mapPosition())},e.prototype.mapSource=function(t){var e=this.srcElement.src();return t&&(e=Wi(e)),[["xlink:href",e]]},e.prototype.renderSource=function(){return yi(this.mapSource(!0))},e.prototype.template=function(){return"<image preserveAspectRatio='none' "+this.renderId()+" "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"},e}(Fi),Ji=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.renderData=function(){var t=this.srcElement.paths;if(t.length>0){for(var e=[],i=0;i<t.length;i++)e.push(this.printPath(t[i]));return e.join(" ")}},e}(Fi),Ki=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.geometryChange=function(){var t=this.srcElement.geometry();this.attr("x",t.origin.x),this.attr("y",t.origin.y),this.attr("width",t.size.width),this.attr("height",t.size.height),this.invalidate()},e.prototype.size=function(){return this.srcElement.geometry().size},e.prototype.origin=function(){return this.srcElement.geometry().origin},e.prototype.template=function(){return"<rect "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"},e}(Fi),$i=/&(?:[a-zA-Z]+|#\d+);/g;function Qi(t){if(!t||"string"!=typeof t||!$i.test(t))return t;var e=Qi._element;return $i.lastIndex=0,t.replace($i,(function(t){return e.innerHTML=t,e.textContent||e.innerText}))}"undefined"!=typeof document&&(Qi._element=document.createElement("span"));var to=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.geometryChange=function(){var t=this.pos();this.attr("x",t.x),this.attr("y",t.y),this.invalidate()},e.prototype.optionsChange=function(e){"font"===e.field?(this.attr("style",gi(this.mapStyle())),this.geometryChange()):"content"===e.field&&t.prototype.content.call(this,this.srcElement.content()),t.prototype.optionsChange.call(this,e)},e.prototype.mapStyle=function(e){var i=t.prototype.mapStyle.call(this,e),o=this.srcElement.options.font;return e&&(o=Wi(o)),i.push(["font",o],["white-space","pre"]),i},e.prototype.pos=function(){var t=this.srcElement.position(),e=this.srcElement.measure();return t.clone().setY(t.y+e.baseline)},e.prototype.renderContent=function(){var t=this.srcElement.content();return Qt(t=Wi(t=Qi(t)))},e.prototype.renderTextAnchor=function(){var t;return!(this.options||{}).rtl||Si.browser.msie||Si.browser.edge||(t="end"),di("text-anchor",t)},e.prototype.template=function(){return"<text "+this.renderId()+" "+this.renderTextAnchor()+" "+this.renderStyle()+" "+this.renderOpacity()+"x='"+this.pos().x+"' y='"+this.pos().y+"' "+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"},e}(Fi);vi.Arc=Di,vi.Circle=Ui,vi.Group=Gi,vi.Image=Zi,vi.MultiPath=Ji,vi.Path=Fi,vi.Rect=Ki,vi.Text=to;var eo=function(t){function e(e,i){t.call(this,e,i),this._root=new Ii(Object.assign({rtl:"rtl"===ei(e,"direction").direction},this.options)),wi(this.element,this._template()),this._rootElement=this.element.firstElementChild,function(t){var e;try{e=t.getScreenCTM?t.getScreenCTM():null}catch(t){}if(e){var i=-e.e%1,o=-e.f%1,r=t.style;0===i&&0===o||(r.left=i+"px",r.top=o+"px")}}(this._rootElement),this._root.attachTo(this._rootElement),zi(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}};return i.type.get=function(){return"svg"},e.prototype.destroy=function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,Li(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),t.prototype.destroy.call(this)},e.prototype.translate=function(t){var e=Math.round(t.x)+" "+Math.round(t.y)+" "+this._size.width+" "+this._size.height;this._offset=t,this._rootElement.setAttribute("viewBox",e)},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear()},e.prototype.svg=function(){return"<?xml version='1.0' ?>"+this._template()},e.prototype.exportVisual=function(){var t=this._visual,e=this._offset;if(e){var i=new le;i.children.push(t),i.transform(J().translate(-e.x,-e.y)),t=i}return t},e.prototype._resize=function(){this._offset&&this.translate(this._offset)},e.prototype._template=function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+mi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"},Object.defineProperties(e.prototype,i),e}(ui);function io(){var t,e,i=new Promise((function(o,r){t=function(t){return i._state="resolved",o(t),i},e=function(t){return i._state="rejected",r(t),i}}));return i._state="pending",i.resolve=t,i.reject=e,i.state=function(){return i._state},i}function oo(t){return Promise.all(t)}var ro={};function no(t,e){var i=e.segments;if(0!==i.length){var o=i[0],r=o.anchor();t.moveTo(r.x,r.y);for(var n=1;n<i.length;n++){r=(o=i[n]).anchor();var s=i[n-1].controlOut(),a=o.controlIn();s&&a?t.bezierCurveTo(s.x,s.y,a.x,a.y,r.x,r.y):t.lineTo(r.x,r.y)}e.options.closed&&t.closePath()}}var so=function(t){function e(e){t.call(this,e),e&&this.initClip()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initClip=function(){var t=this.srcElement.clip();t&&(this.clip=t,t.addObserver(this))},e.prototype.clear=function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),t.prototype.clear.call(this)},e.prototype.clearClip=function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},e.prototype.setClip=function(t){this.clip&&(t.beginPath(),no(t,this.clip),t.clip())},e.prototype.optionsChange=function(e){"clip"===e.field&&(this.clearClip(),this.initClip()),t.prototype.optionsChange.call(this,e)},e.prototype.setTransform=function(t){if(this.srcElement){var e=this.srcElement.transform();e&&t.transform.apply(t,e.matrix().toArray(6))}},e.prototype.loadElements=function(t,e,i){for(var o=0;o<t.length;o++){var r=t[o],n=r.children,s=new ro[r.nodeType](r,i);n&&n.length>0&&s.load(n,e,i),j(e)?this.insertAt(s,e):this.append(s)}},e.prototype.load=function(t,e,i){this.loadElements(t,e,i),this.invalidate()},e.prototype.setOpacity=function(t){if(this.srcElement){var e=this.srcElement.opacity();j(e)&&this.globalAlpha(t,e)}},e.prototype.globalAlpha=function(t,e){var i=e;i&&t.globalAlpha&&(i*=t.globalAlpha),t.globalAlpha=i},e.prototype.visible=function(){var t=this.srcElement;return!t||t&&!1!==t.options.visible},e}(Ze),ao=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.renderTo=function(t){if(this.visible()){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t);for(var e=this.childNodes,i=0;i<e.length;i++){var o=e[i];o.visible()&&o.renderTo(t)}t.restore()}},e}(he(so,"childNodes"));function po(t,e){var i,o=0;if(!e||e<=0)return t;var r=function(){var r=De()-o,n=arguments,s=function(){t.apply(null,n),o=De()};if(!o)return s();i&&clearTimeout(i),r>e?s():i=setTimeout(s,e-r)};return r.cancel=function(){clearTimeout(i)},r}var ho=function(t){function e(e,i){t.call(this),this.canvas=e,this.size=i,this.ctx=e.getContext("2d");var o=this._invalidate.bind(this);this.invalidate=po((function(){qe(o)}),1e3/60)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this.canvas=null,this.ctx=null},e.prototype.load=function(t,e,i){this.loadElements(t,e,i),this._invalidate()},e.prototype._rescale=function(t){var e=this.canvas,i=this.size;e.width=i.width*t,e.height=i.height*t,this.ctx.scale(t,t)},e.prototype._devicePixelRatio=function(){return"number"==typeof window.devicePixelRatio?window.devicePixelRatio:1},e.prototype._invalidate=function(t){if(this.ctx){var e=t&&t.fixedScale?1:this._devicePixelRatio();this._rescale(e),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx)}},e}(he(ao,"childNodes")),co=function(t){function e(){t.call(this),this.shapes=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._add=function(t,e){this.shapes.push({bbox:e,shape:t}),t._quadNode=this},e.prototype.pointShapes=function(t){for(var e=this.shapes,i=e.length,o=[],r=0;r<i;r++)e[r].bbox.containsPoint(t)&&o.push(e[r].shape);return o},e.prototype.insert=function(t,e){this._add(t,e)},e.prototype.remove=function(t){for(var e=this.shapes,i=e.length,o=0;o<i;o++)if(e[o].shape===t){e.splice(o,1);break}},e}(O),lo=function(t){function e(e){t.call(this),this.children=[],this.rect=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.inBounds=function(t){var e=this.rect,i=e.bottomRight(),o=t.bottomRight(),r=e.origin.x<=t.origin.x&&e.origin.y<=t.origin.y&&o.x<=i.x&&o.y<=i.y;return r},e.prototype.pointShapes=function(e){for(var i=this.children,o=i.length,r=t.prototype.pointShapes.call(this,e),n=0;n<o;n++)ce(r,i[n].pointShapes(e));return r},e.prototype.insert=function(t,e){var i=this.children,o=!1;if(this.inBounds(e)){if(this.shapes.length<4)this._add(t,e);else{i.length||this._initChildren();for(var r=0;r<i.length;r++)if(i[r].insert(t,e)){o=!0;break}o||this._add(t,e)}o=!0}return o},e.prototype._initChildren=function(){var t=this.rect,i=this.children,o=t.center(),r=t.width()/2,n=t.height()/2;i.push(new e(new W([t.origin.x,t.origin.y],[r,n])),new e(new W([o.x,t.origin.y],[r,n])),new e(new W([t.origin.x,o.y],[r,n])),new e(new W([o.x,o.y],[r,n])))},e}(co);function uo(t,e){return t._zIndex<e._zIndex?1:t._zIndex>e._zIndex?-1:0}var fo=function(t){function e(){t.call(this),this.initRoots()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initRoots=function(){this.rootMap={},this.root=new co,this.rootElements=[]},e.prototype.clear=function(){for(var t=this.rootElements,e=0;e<t.length;e++)this.remove(t[e]);this.initRoots()},e.prototype.pointShape=function(t){var e=(this.rootMap[Math.floor(t.x/3e3)]||{})[Math.floor(t.y/3e3)],i=this.root.pointShapes(t);e&&(i=i.concat(e.pointShapes(t))),this.assignZindex(i),i.sort(uo);for(var o=0;o<i.length;o++)if(i[o].containsPoint(t))return i[o]},e.prototype.assignZindex=function(t){for(var e=0;e<t.length;e++){for(var i=t[e],o=0,r=Math.pow(1e4,75),n=[];i;)n.push(i),i=i.parent;for(;n.length;)o+=(((i=n.pop()).parent?i.parent.children:this.rootElements).indexOf(i)+1)*r,r/=1e4;t[e]._zIndex=o}},e.prototype.optionsChange=function(t){"transform"!==t.field&&"stroke.width"!==t.field||this.bboxChange(t.element)},e.prototype.geometryChange=function(t){this.bboxChange(t.element)},e.prototype.bboxChange=function(t){if("Group"===t.nodeType)for(var e=0;e<t.children.length;e++)this.bboxChange(t.children[e]);else t._quadNode&&t._quadNode.remove(t),this._insertShape(t)},e.prototype.add=function(t){var e=Array.isArray(t)?t.slice(0):[t];ce(this.rootElements,e),this._insert(e)},e.prototype.childrenChange=function(t){if("remove"===t.action)for(var e=0;e<t.items.length;e++)this.remove(t.items[e]);else this._insert(Array.prototype.slice.call(t.items,0))},e.prototype._insert=function(t){for(var e;t.length>0;)(e=t.pop()).addObserver(this),"Group"===e.nodeType?ce(t,e.children):this._insertShape(e)},e.prototype._insertShape=function(t){var e=t.bbox();if(e){var i=this.getSectors(e),o=i[0][0],r=i[1][0];if(this.inRoot(i))this.root.insert(t,e);else{var n=this.rootMap;n[o]||(n[o]={}),n[o][r]||(n[o][r]=new lo(new W([3e3*o,3e3*r],[3e3,3e3]))),n[o][r].insert(t,e)}}},e.prototype.remove=function(t){if(t.removeObserver(this),"Group"===t.nodeType)for(var e=t.children,i=0;i<e.length;i++)this.remove(e[i]);else t._quadNode&&(t._quadNode.remove(t),delete t._quadNode)},e.prototype.inRoot=function(t){return t[0].length>1||t[1].length>1},e.prototype.getSectors=function(t){for(var e=t.bottomRight(),i=Math.floor(e.x/3e3),o=Math.floor(e.y/3e3),r=[[],[]],n=Math.floor(t.origin.x/3e3);n<=i;n++)r[0].push(n);for(var s=Math.floor(t.origin.y/3e3);s<=o;s++)r[1].push(s);return r},e}(O),yo=function(t){t.bind("mouseenter",this._mouseenter.bind(this)),t.bind("mouseleave",this._mouseleave.bind(this)),this.element=t.element};yo.prototype.clear=function(){this._resetCursor()},yo.prototype.destroy=function(){this._resetCursor(),delete this.element},yo.prototype._mouseenter=function(t){var e=this._shapeCursor(t);e?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(e)):this._resetCursor()},yo.prototype._mouseleave=function(){this._resetCursor()},yo.prototype._shapeCursor=function(t){for(var e=t.element;e&&!j(e.options.cursor);)e=e.parent;if(e)return e.options.cursor},yo.prototype._getCursor=function(){if(this.element)return this.element.style.cursor},yo.prototype._setCursor=function(t){this.element&&(this.element.style.cursor=t,this._current=t)},yo.prototype._resetCursor=function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)};var go=yo,vo={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},mo=Si.browser,xo=function(t){var e=Object.keys(vo);e.push("transparent");var i=new RegExp("^("+e.join("|")+")(\\W|$)","i");return xo=function(t){return i.exec(t)},i.exec(t)},_o=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){return this},e.prototype.toRGB=function(){return this},e.prototype.toHex=function(){return this.toBytes().toHex()},e.prototype.toBytes=function(){return this},e.prototype.toCss=function(){return"#"+this.toHex()},e.prototype.toCssRgba=function(){var t=this.toBytes();return"rgba("+t.r+", "+t.g+", "+t.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},e.prototype.toDisplay=function(){return mo.msie&&mo.version<9?this.toCss():this.toCssRgba()},e.prototype.equals=function(t){return t===this||null!==t&&this.toCssRgba()===To(t).toCssRgba()},e.prototype.diff=function(t){if(null===t)return NaN;var e=this.toBytes(),i=t.toBytes();return Math.sqrt(Math.pow(.3*(e.r-i.r),2)+Math.pow(.59*(e.g-i.g),2)+Math.pow(.11*(e.b-i.b),2))},e.prototype.clone=function(){var t=this.toBytes();return t===this&&(t=new wo(t.r,t.g,t.b,t.a)),t},e}(O),bo=function(t){function e(e,i,o,r){t.call(this),this.r=e,this.g=i,this.b=o,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){var t,e,i=this.r,o=this.g,r=this.b,n=Math.min(i,o,r),s=Math.max(i,o,r),a=s-n,p=s;return 0===a?new So(0,0,p,this.a):(0!==s?(e=a/s,t=i===s?(o-r)/a:o===s?2+(r-i)/a:4+(i-o)/a,(t*=60)<0&&(t+=360)):(e=0,t=-1),new So(t,e,p,this.a))},e.prototype.toHSL=function(){var t,e,i=this.r,o=this.g,r=this.b,n=Math.max(i,o,r),s=Math.min(i,o,r),a=(n+s)/2;if(n===s)t=e=0;else{var p=n-s;switch(e=a>.5?p/(2-n-s):p/(n+s),n){case i:t=(o-r)/p+(o<r?6:0);break;case o:t=(r-i)/p+2;break;case r:t=(i-o)/p+4}}return new ko(60*t,100*e,100*a,this.a)},e.prototype.toBytes=function(){return new wo(255*this.r,255*this.g,255*this.b,this.a)},e}(_o),wo=function(t){function e(e,i,o,r){t.call(this,Math.round(e),Math.round(i),Math.round(o),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){return new t(this.r/255,this.g/255,this.b/255,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toHex=function(){return Ao(this.r,2)+Ao(this.g,2)+Ao(this.b,2)},e.prototype.toBytes=function(){return this},e}(bo);function Ao(t,e,i){void 0===i&&(i="0");for(var o=t.toString(16);e>o.length;)o=i+o;return o}var So=function(t){function e(e,i,o,r){t.call(this),this.h=e,this.s=i,this.v=o,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,i,o=this.h,r=this.s,n=this.v;if(0===r)t=e=i=n;else{o/=60;var s=Math.floor(o),a=o-s,p=n*(1-r),h=n*(1-r*a),c=n*(1-r*(1-a));switch(s){case 0:t=n,e=c,i=p;break;case 1:t=h,e=n,i=p;break;case 2:t=p,e=n,i=c;break;case 3:t=p,e=h,i=n;break;case 4:t=c,e=p,i=n;break;default:t=n,e=p,i=h}}return new bo(t,e,i,this.a)},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_o),ko=function(t){function e(e,i,o,r){t.call(this),this.h=e,this.s=i,this.l=o,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,i,o=this.h/360,r=this.s/100,n=this.l/100;if(0===r)t=e=i=n;else{var s=n<.5?n*(1+r):n+r-n*r,a=2*n-s;t=Co(a,s,o+1/3),e=Co(a,s,o),i=Co(a,s,o-1/3)}return new bo(t,e,i,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_o);function Co(t,e,i){var o=i;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function To(t,e){var i,o;if(null==t||"none"===t)return null;if(t instanceof _o)return t;var r=t.toLowerCase();if(i=xo(r))return(r="transparent"===i[1]?new bo(1,1,1,0):To(vo[i[1]],e)).match=[i[1]],r;if((i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?o=new wo(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),1):(i=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?o=new wo(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16),1):(i=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(r))?o=new wo(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),1):(i=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(r))?o=new wo(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])):(i=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(r))?o=new bo(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,1):(i=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(r))&&(o=new bo(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]))),o)o.match=i;else if(!e)throw new Error("Cannot parse color: "+r);return o}var 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.renderTo=function(t){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),this.renderPoints(t,this.srcElement),this.setLineDash(t),this.setLineCap(t),this.setLineJoin(t),this.setFill(t),this.setStroke(t),t.restore()},e.prototype.setFill=function(t){var e=this.srcElement.options.fill,i=!1;return e&&("Gradient"===e.nodeType?(this.setGradientFill(t,e),i=!0):tt(e.color)||(t.fillStyle=e.color,t.save(),this.globalAlpha(t,e.opacity),t.fill(),t.restore(),i=!0)),i},e.prototype.setGradientFill=function(t,e){var i,o=this.srcElement.rawBBox();if(e instanceof ze){var r=e.start(),n=e.end();i=t.createLinearGradient(r.x,r.y,n.x,n.y)}else if(e instanceof Le){var s=e.center();i=t.createRadialGradient(s.x,s.y,0,s.x,s.y,e.radius())}!function(t,e){for(var i=0;i<e.length;i++){var o=e[i],r=To(o.color());r.a*=o.opacity(),t.addColorStop(o.offset(),r.toCssRgba())}}(i,e.stops),t.save(),e.userSpace()||t.transform(o.width(),0,0,o.height(),o.origin.x,o.origin.y),t.fillStyle=i,t.fill(),t.restore()},e.prototype.setStroke=function(t){var e=this.srcElement.options.stroke;if(e&&!tt(e.color)&&e.width>0)return t.strokeStyle=e.color,t.lineWidth=Q(e.width,1),t.save(),this.globalAlpha(t,e.opacity),t.stroke(),t.restore(),!0},e.prototype.dashType=function(){var t=this.srcElement.options.stroke;if(t&&t.dashType)return t.dashType.toLowerCase()},e.prototype.setLineDash=function(t){var e=this.dashType();if(e&&"solid"!==e){var i=Ei[e];t.setLineDash?t.setLineDash(i):(t.mozDash=i,t.webkitLineDash=i)}},e.prototype.setLineCap=function(t){var e=this.dashType(),i=this.srcElement.options.stroke;e&&"solid"!==e?t.lineCap="butt":i&&i.lineCap&&(t.lineCap=i.lineCap)},e.prototype.setLineJoin=function(t){var e=this.srcElement.options.stroke;e&&e.lineJoin&&(t.lineJoin=e.lineJoin)},e.prototype.renderPoints=function(t,e){no(t,e)},e}(so),Mo=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.renderPoints=function(t){no(t,this.srcElement.toPath())},e}(Po),Oo=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.renderPoints=function(t){var e=this.srcElement.geometry(),i=e.center,o=e.radius;t.arc(i.x,i.y,o,0,2*Math.PI)},e}(Po),Ro=function(t){function e(e,i){t.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=io();var o=this.img=new Image;i&&!/^data:/i.test(e.src())&&(o.crossOrigin=i),o.src=e.src(),o.complete?this.onLoad():(o.onload=this.onLoad,o.onerror=this.onError)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.renderTo=function(t){"resolved"===this.loading.state()&&(t.save(),this.setTransform(t),this.setClip(t),this.drawImage(t),t.restore())},e.prototype.optionsChange=function(e){"src"===e.field?(this.loading=io(),this.img.src=this.srcElement.src()):t.prototype.optionsChange.call(this,e)},e.prototype.onLoad=function(){this.loading.resolve(),this.invalidate()},e.prototype.onError=function(){this.loading.reject(new Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},e.prototype.drawImage=function(t){var e=this.srcElement.rect(),i=e.topLeft();t.drawImage(this.img,i.x,i.y,e.width(),e.height())},e}(Po),jo=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.renderPoints=function(t){for(var e=this.srcElement.paths,i=0;i<e.length;i++)no(t,e[i])},e}(Po),Bo=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.renderPoints=function(t){var e=this.srcElement.geometry(),i=e.origin,o=e.size;t.rect(i.x,i.y,o.width,o.height)},e}(Po),Io=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.renderTo=function(t){var e=this.srcElement,i=e.position(),o=e.measure();t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),t.font=e.options.font,t.textAlign="left",this.setFill(t)&&t.fillText(e.content(),i.x,i.y+o.baseline),this.setStroke(t)&&(this.setLineDash(t),t.strokeText(e.content(),i.x,i.y+o.baseline)),t.restore()},e}(Po);ro.Arc=Mo,ro.Circle=Oo,ro.Group=ao,ro.Image=Ro,ro.MultiPath=jo,ro.Path=Po,ro.Rect=Bo,ro.Text=Io;var zo,Lo,Eo=function(t){function e(e,i){t.call(this,e,i),this.element.innerHTML=this._template(this);var o=this.element.firstElementChild,r=oi(e);o.width=r.width,o.height=r.height,this._rootElement=o,this._root=new ho(o,r),this._mouseTrackHandler=this._trackMouse.bind(this),zi(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}};return i.type.get=function(){return"canvas"},e.prototype.destroy=function(){t.prototype.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),Li(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},e.prototype.eventTarget=function(t){if(this._searchTree){var e=this._surfacePoint(t);return this._searchTree.pointShape(e)}},e.prototype.image=function(){var t=this._root,e=this._rootElement,i=[];t.traverse((function(t){t.loading&&i.push(t.loading)}));var o=io(),r=function(){t._invalidate({fixedScale:!0});try{var i=e.toDataURL();o.resolve(i)}catch(t){o.reject(t)}};return oo(i).then(r,r),o},e.prototype.suspendTracking=function(){t.prototype.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},e.prototype.resumeTracking=function(){if(t.prototype.resumeTracking.call(this),!this._searchTree){this._searchTree=new fo;for(var e=this._root.childNodes,i=[],o=0;o<e.length;o++)i.push(e[o].srcElement);this._searchTree.add(i)}},e.prototype._resize=function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.size=this._size,this._root.invalidate()},e.prototype._template=function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},e.prototype._enableTracking=function(){this._searchTree=new fo,this._cursor=new go(this),t.prototype._enableTracking.call(this)},e.prototype._trackMouse=function(t){if(!this._suspendedTracking){var e=this.eventTarget(t);if("click"!==t.type){var i=this._currentShape;i&&i!==e&&this.trigger("mouseleave",{element:i,originalEvent:t,type:"mouseleave"}),e&&i!==e&&this.trigger("mouseenter",{element:e,originalEvent:t,type:"mouseenter"}),this.trigger("mousemove",{element:e,originalEvent:t,type:"mousemove"}),this._currentShape=e}else e&&this.trigger("click",{element:e,originalEvent:t,type:"click"})}},Object.defineProperties(e.prototype,i),e}(ui),Vo=function(){return"undefined"!=typeof document},Fo=function(t){function e(){t.call(this),this._items=[{name:"svg",type:eo},{name:"canvas",type:Eo}]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={support:{configurable:!0},current:{configurable:!0}};return i.support.get=function(){return Lo||(Lo={canvas:Vo()&&document.createElement("canvas").getContext,svg:Vo()&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}),Lo},i.current.get=function(){return zo||(zo=new e),zo},e.prototype.create=function(t,e){var i=this._items,o=i[0];if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<i.length;n++)if(i[n].name===r){o=i[n];break}if(o)return new o.type(t,e);fi("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)},Object.defineProperties(e,i),e}(O),Do=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={support:{configurable:!0}};return i.support.get=function(){return Fo.support},e.create=function(t,e){return Fo.current.create(t,e)},Object.defineProperties(e,i),e}(ui);function Uo(t){var e=new Ii({skipBaseHref:!0}),i=t.clippedBBox(),o=t;if(i){var r=i.getOrigin(),n=new le;n.transform(J().translate(-r.x,-r.y)),n.children.push(t),o=n}e.load([o]);var s="<?xml version='1.0' ?><svg xmlns='"+mi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+e.render()+"</svg>";return e.destroy(),s}var Go={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"};function Ho(t){for(var e=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],i="";t>0;)t<e[0]?e.shift():(i+=Go[e[0]],t-=e[0]);return i}var No=String.fromCharCode;var qo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Xo(t){for(var e="",i=0,o=function(t){for(var e="",i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?e+=No(o):o<2048?(e+=No(192|o>>>6),e+=No(128|63&o)):o<65536&&(e+=No(224|o>>>12),e+=No(128|o>>>6&63),e+=No(128|63&o))}return e}(t);i<o.length;){var r=o.charCodeAt(i++),n=o.charCodeAt(i++),s=o.charCodeAt(i++),a=r>>2,p=(3&r)<<4|n>>4,h=(15&n)<<2|s>>6,c=63&s;isNaN(n)?h=c=64:isNaN(s)&&(c=64),e=e+qo.charAt(a)+qo.charAt(p)+qo.charAt(h)+qo.charAt(c)}return e}function Yo(t,e){if(t.length<2)return t.slice();return function t(i){if(i.length<=1)return i;var o=Math.floor(i.length/2),r=i.slice(0,o),n=i.slice(o);return function(t,i){for(var o=[],r=0,n=0,s=0;r<t.length&&n<i.length;)e(t[r],i[n])<=0?o[s++]=t[r++]:o[s++]=i[n++];return r<t.length&&o.push.apply(o,t.slice(r)),n<i.length&&o.push.apply(o,i.slice(n)),o}(r=t(r),n=t(n))}(t)}function Wo(t,e){var i={width:"800px",height:"600px",cors:"Anonymous"},o=t,r=t.clippedBBox();if(r){var n=r.getOrigin();(o=new le).transform(J().translate(-n.x,-n.y)),o.children.push(t);var s=r.getSize();i.width=s.width+"px",i.height=s.height+"px"}var a=Object.assign(i,e),p=document.createElement("div"),h=p.style;h.display="none",h.width=a.width,h.height=a.height,document.body.appendChild(p);var c=new Eo(p,a);c.suspendTracking(),c.draw(o);var l=c.image(),u=function(){c.destroy(),document.body.removeChild(p)};return l.then(u,u),l}function Zo(t,e){var i=Uo(t);return e&&e.raw||(i="data:image/svg+xml;base64,"+Xo(i)),io().resolve(i)}function Jo(t){var e=.5;t.options.stroke&&a.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 Ko(t,e){return-t.x*e.y+t.y*e.x<0}function $o(t){return"number"==typeof t&&!isNaN(t)}function Qo(t){return"string"==typeof t}function tr(t){return $o(t)||Qo(t)&&isFinite(t)}function er(t){return"function"==typeof t}function ir(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(er(o.clone))t[i]=o.clone();else{var s=t[i];t[i]="object"==typeof s&&s||{},ir(t[i],o)}else"undefined"!==r&&(t[i]=o)}return t}function or(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)ir(t,e[o]);return t}function rr(t){return"object"==typeof t}function nr(t){return $o(t)?t+"px":t}var sr=/width|height|top|left|bottom|right/i;function ar(t){return sr.test(t)}function pr(t,e){var i=Qo(e)?[e]:e;if(C(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=ar(s)?parseFloat(r[s]):r[s]}return o}if(rr(e))for(var a in e)t.style[a]=nr(e[a])}function hr(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i.top=i[_]=i[u]=i[v]=t:(i.top=t.top||e,i[_]=t[_]||e,i[u]=t[u]||e,i[v]=t[v]||e),i}var cr={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},lr=function(){},ur={implementation:{configurable:!0}};lr.register=function(t){cr=t},ur.implementation.get=function(){return cr},Object.defineProperties(lr,ur);var fr=lr,dr=/\{(\d+)(:[^\}]+)?\}/g,yr=function(t){this._intlService=t},gr={intl:{configurable:!0}};gr.intl.get=function(){return this._intlService||fr.implementation},gr.intl.set=function(t){this._intlService=t},yr.prototype.auto=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var o=this.intl;return Qo(t)&&t.match(g)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},yr.prototype.localeAuto=function(t,e,i){var o=this.intl;return Qo(t)&&t.match(g)?t.replace(dr,(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(yr.prototype,gr);var vr=yr,mr=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new vr(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},xr={intl:{configurable:!0}};xr.intl.get=function(){return this._intlService||fr.implementation},xr.intl.set=function(t){this._intlService=t,this.format.intl=t},mr.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},mr.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(mr.prototype,xr);var _r,br=mr,wr=function(){};wr.register=function(t){_r=t},wr.create=function(t,e){if(_r)return _r.create(t,e)};var Ar=wr,Sr={compile:function(t){return t}},kr=function(){};kr.register=function(t){Sr=t},kr.compile=function(t){return Sr.compile(t)};var Cr=kr;function Tr(t){var e;return void 0===t&&(t={}),t.template?t.template=e=Cr.compile(t.template):er(t.content)&&(e=t.content),e}var Pr=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Mr={};function Or(t){if(Mr[t])return Mr[t];var e=[];return t.replace(Pr,(function(t,i,o,r){e.push(a.util.defined(i)?i:o||r)})),Mr[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},Mr[t]}function Rr(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function jr(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}Mr[void 0]=function(t){return t};var Br=function(){this._map={}};Br.prototype.get=function(t){return this._map[this._key(t)]},Br.prototype.set=function(t,e){this._map[this._key(t)]=e},Br.prototype._key=function(t){return t instanceof Date?t.getTime():t};var Ir=Br;function zr(t,e){if(e)return-1!==e.indexOf(t)}function Lr(t,e,i){return a.util.round(t+(e-t)*i,3)}var Er=function(t,e){this.observer=t,this.handlerMap=or({},this.handlerMap,e)};Er.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},Er.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)},Er.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 Vr=Er;function Fr(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);a.util.defined(n)&&o.push(n)}return o}function Dr(t){var e=0;return t.wheelDelta&&(e=(e=-t.wheelDelta/120)>0?Math.ceil(e):Math.floor(e)),t.detail&&(e=a.util.round(t.detail/3)),e}var Ur=a.util,Gr=Ur.append,Hr=Ur.bindEvents,Nr=Ur.defined,qr=Ur.deg,Xr=Ur.elementOffset,Yr=Ur.elementSize,Wr=Ur.eventElement,Zr=Ur.eventCoordinates,Jr=Ur.last,Kr=Ur.limitValue,$r=Ur.objectKey,Qr=Ur.rad,tn=Ur.round,en=Ur.unbindEvents,on=Ur.valueOrDefault,rn=function(){};rn.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++,rn.fetchFonts(r,e,i),i.depth--))}))},rn.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){fi(t)}Promise.all(i).then(e,e)}else e()},rn.preloadFonts=function(t,e){var i=[];rn.fetchFonts(t,i),rn.loadFonts(i,e)};var nn=rn;function sn(t,e){var i=t.prototype;i.options?i.options=or({},i.options,e):i.options=e}function an(t){for(var e=m,i=x,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===m?void 0:e,max:i===x?void 0:i}}function pn(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var hn=p.Matrix,cn=/matrix\((.*)\)/;function ln(t){var e=getComputedStyle(t).transform;return"none"===e?hn.unit():function(t){var e=t.match(cn);if(null===e||2!==e.length)return hn.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(hn,[null].concat(i)))}(e)}function un(t){if(!t)return hn.unit();for(var e=ln(t),i=t.parentElement;i;){var o=ln(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}function fn(t,e){var i=tn(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=tn(i/o,10);return tn(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}var dn=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=Qr(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=tn(n+(a-n)*o+(p-s)*r,3),this.y=tn(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=Qr(i);return new e(t.x-o*Math.cos(r),t.y-o*Math.sin(r))},e}(O);function yn(t,e,i,o,r){var n=Qr(r);return new dn(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}var gn=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 Nr(t)&&(this.x1=t,this.x2=this.x1+o),Nr(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=C(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!==S&&e||(this.x1=t.x1,this.x2=t.x2),e!==k&&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===b||e===u?k:S,n=r===k?i:o;if(e===f){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===b||e===v?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=hr(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=hr(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 dn(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 dn(this.x1,this.y1),new dn(this.x2,this.y1),new dn(this.x2,this.y2),new dn(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=yn(0,0,r,n,t),a=yn(e,0,r,n,t),p=yn(e,i,r,n,t),h=yn(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 p.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===S?"width":"height",s=this[n]();zr(i,[v,b])?(this[o]=t[o],this[r]=this[o]+s):zr(i,[_,u])?(this[r]=t[r],this[o]=this[r]-s):i===f&&(this[o]=t[o]+(t[n]()-s)/2,this[r]=this[o]+s)},e}(O);function vn(t,e){return t-e}var mn=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=Qr(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=tn(this.center.x-o*n,3),a=tn(this.center.y-r*n,3);return new dn(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(Qr(r)),h=Math.cos(Qr(r)),c=n.x-s,l=n.y-a;return Math.abs(p)<.9&&(c+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(l+=a*-p/Math.abs(p)),new gn(c,l,c+e,l+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 dn(s,a),h=this.point(r),c=new dn(h.x-e.x,h.y-e.y),l=this.point(n),u=new dn(l.x-e.x,l.y-e.y),f=tn(s*s+a*a,3);return(c.equals(p)||Ko(c,p))&&!Ko(u,p)&&f>=i*i&&f<=o*o},e.prototype.getBBox=function(){var t,e=new gn(m,m,x,x),i=tn(this.startAngle%360),o=tn((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(vn),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}(O),xn=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}(mn),_n=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 p.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),h=new p.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),c=a.Path.fromArc(h,e).close();if(s){h.radiusX=h.radiusY=s;var l=h.pointAt(o);c.lineTo(l.x,l.y),c.arc(o,i,s,s,!0)}else c.lineTo(r.x,r.y);return c},e}(O);_n.current=new _n;var bn=_n,wn=function(t){function e(e){t.call(this),this.children=[],this.options=or({},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 a.Group({zIndex:this.options.zIndex,visible:on(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=a.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):Nr(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(on(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:A,opacity:e||.2},stroke:{color:A,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return 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);Nr(n.options.zIndex)||(n.options.zIndex=on(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,i){var o=new a.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}(O);wn.prototype.options={};var An=wn,Sn=function(t){function e(e){t.call(this,e),this.options.margin=hr(this.options.margin),this.options.padding=hr(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,c=r.padding,l=r.border.width,u=function(){o.align(e,S,r.align),o.align(e,k,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(l)},f=e.clone();p&&(f.x2=f.x1+n,f.y2=f.y1+s),a&&f.unpad(h).unpad(l).unpad(c),t.prototype.reflow.call(this,f),i=p?this.box=new gn(0,0,n,s):this.box,a&&p?(u(),f=this.contentBox=this.paddingBox.clone().unpad(c)):(f=this.contentBox=i.clone(),i.pad(c).pad(l).pad(h),u()),this.translateChildren(i.x1-f.x1+h.left+l+c.left,i.y1-f.y1+h.top+l+c.top);for(var d=this.children,y=0;y<d.length;y++){var g=d[y];g.reflow(g.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(a.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:on(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(An);sn(Sn,{align:v,vAlign:b,margin:{},padding:{},border:{color:l,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var kn=Sn,Cn=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,h=this.visualStyle();return i===d?s=new a.Circle(new p.Circle([tn(e.x1+n,3),tn(e.y1+e.height()/2,3)],n),h):"triangle"===i?s=a.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],h).close():"cross"===i?((s=new a.MultiPath(h)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),s.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):s=a.Path.fromRect(e.toRect(),h),o&&s.transform(p.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}(kn);sn(Cn,{type:d,align:f,vAlign:f});var Tn=Cn,Pn={glass:{type:"linear",rotation:0,stops:[{offset:0,color:A,opacity:0},{offset:.25,color:A,opacity:.3},{offset:1,color:A,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:A,opacity:.55},{offset:.65,color:A,opacity:0},{offset:.95,color:A,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:A,opacity:.06},{offset:.83,color:A,opacity:.2},{offset:.95,color:A,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:A,opacity:0},{offset:.5,color:A,opacity:.3},{offset:.99,color:A,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:A,opacity:.2},{offset:.15,color:A,opacity:.15},{offset:.17,color:A,opacity:.35},{offset:.85,color:A,opacity:.05},{offset:.87,color:A,opacity:.15},{offset:.99,color:A,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function Mn(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),c=[];return c[0]=new gn(o,s,r,a),c[1]=new gn(i,a,o,p),c[2]=new gn(r,a,n,p),c[3]=new gn(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(c[4]=new gn(i,s,o,a),c[5]=new gn(r,p,n,h)):(c[4]=new gn(r,s,n,a),c[5]=new gn(i,p,o,h)),Rr(c,(function(t){return t.height()>0&&t.width()>0}))[0]}var On=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 gn(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=Mn(i,e[o].box)||new gn},e.prototype.createVisual=function(){this.visual=new a.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=a.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=$r(t),r=Pn[t.gradient];if(i[o])e=i[o];else{var n=Object.assign({},r,t);"linear"===r.type?e=new a.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 a.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 gn(0,0,t.width,t.height)},e}(An);sn(On,{width:600,height:400,background:A,border:{color:l,width:0},margin:hr(5),zIndex:-2});var Rn=On,jn=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=S,this.elementAxis=k,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=k,this.elementAxis=S,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,c=t[i+1]+this.alignStart(a,t[r]());if(h){for(var l=c,u=0;u<h;u++){for(var f=s[u],d=f.groupElements,y=t[e+1],g=d.length,v=0;v<g;v++){var m=d[v],x=this.elementSize(m),_=l+this.alignStart(x[r],f.groupSize),b=new gn;b[i+1]=_,b[i+2]=_+x[r],b[e+1]=y,b[e+2]=y+x[o],m.reflow(b),y+=x[o]+this.elementSpacing}l+=f.groupSize+this.groupSpacing}t[i+1]=c,t[i+2]=c+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===_||o===u?i=e-t:o===f&&(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=tn(t[i]()),a=e.length,p=[],h=0,c=0,l=0,u=0,f=[],d=0;d<a;d++){var y=e[d];y.box||y.reflow(t);var g=this.elementSize(y);this.options.wrap&&tn(c+r+g[i])>s&&(p.push({groupElements:f,groupSize:h,groupElementsSize:c}),u=Math.max(u,c),l+=n+h,h=0,c=0,f=[]),h=Math.max(h,g[o]),c>0&&(c+=r),c+=g[i],f.push(y)}return p.push({groupElements:f,groupSize:h,groupElementsSize:c}),{groups:p,groupsSize:l+=h,maxGroupElementsSize:u=Math.max(u,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(An);sn(jn,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Bn=jn,In=a.Text,zn=function(t){function e(e,i){t.call(this,i),this.content=e,this.reflow(new gn)}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=a.util.measureText(this.content,{font:e.font});this.baseline=i.baseline,this.box=new gn(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 In(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r})},e}(An);sn(zn,{font:"12px sans-serif",color:l});var Ln=zn;function En(t){var e=t.origin,i=t.bottomRight();return new gn(e.x,e.y,i.x,i.y)}var Vn=/\n/m,Fn=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 gn)}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(Vn),i=new Bn({vertical:!0,align:t.align,wrap:!1}),o=or({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new Ln(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=En(n.clippedBBox()||new p.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=hr(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 a.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=a.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&&!Nr(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,S,t.align),this.align(this.targetBox,k,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 p.transform().translate(r.x-i,r.y-o).rotate(t,[i,o])},e}(kn),Dn=function(t){function e(e){t.call(this,e),this.append(new Fn(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,S)},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}(An);sn(Dn,{color:l,position:b,align:f,margin:hr(5),padding:hr(5)});var Un=Dn,Gn=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 gn)}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:Wr(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!==f){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=En(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===f)return t.prototype.rotationTransform.call(this);var o=p.transform().rotate(i).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||b,a=s===b||s===u?S:k,h=s===b||s===u?k:S,c=s===b||s===v?n.origin:n.bottomRight(),l=r.topLeft().transformCopy(o),d=r.topRight().transformCopy(o),y=r.bottomRight().transformCopy(o),g=r.bottomLeft().transformCopy(o),m=p.Rect.fromPoints(l,d,y,g),x={};x[h]=n.origin[h]-m.origin[h];var _,w,A=Math.abs(l[h]+x[h]-c[h]),C=Math.abs(d[h]+x[h]-c[h]);tn(A,10)===tn(C,10)?(_=l,w=d):C<A?(_=d,w=y):(_=l,w=g);var T=_[a]+(w[a]-_[a])/2;return x[a]=n.center()[a]-T,p.transform().translate(x.x,x.y).rotate(i)},e}(Fn);sn(Gn,{_autoReflow:!1});var Hn=Gn,Nn=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 gn,a=function(){return t},p=n.size,h=this.fields.text;if(Nr(r)&&r.visible){var c=Tr(r);c?h=c(this.fields):r.format&&(h=this.chartService.format.auto(r.format,h)),r.color||(r.color="inside"===r.position?"#fff":n.background),this.label=new Fn(h,or({},r)),this.label.aliasFor=a,"inside"!==r.position||Nr(p)||(n.type===d?p=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||p||7,n.height=o||p||7;var l=new Tn(or({},n));l.aliasFor=a,this.marker=l,this.append(l),this.label&&this.append(this.label),l.reflow(new gn),this.wrapperBox=s.wrap(l.box)}},e.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,c=r.position;r.visible&&(zr(c,[v,_])?c===v?(o=a.alignTo(t,c).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[o.x2,p.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,c).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[o.x1,p.y]],i=o.clone().wrapPoint(e))):c===u?(o=a.alignTo(t,c).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,c).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s&&("outside"===r.label.position&&n.box.alignTo(s.box,c),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=a.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Jo(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:Wr(t),text:Nr(e.label)?e.label.text:"",visual:this.visual})},e}(kn);sn(Nn,{icon:{visible:!0,type:d},label:{position:"inside",visible:!0,align:f,vAlign:f},line:{visible:!0},visible:!0,position:b,zIndex:2});var qn=Nn;function Xn(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new a.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),Jo(n),n}function Yn(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,n=new a.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),Jo(n),n}var Wn=function(t){function e(e,i){void 0===i&&(i=new br),t.call(this,e),this.chartService=i,this.options.visible||(this.options=or({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=or({},{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=or({},{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?_:f,i=or({},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;rr(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 a=this.createAxisLabel(s,i);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=Rr(this.children,(function(t){return!(t instanceof Hn)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=Rr(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 gn(r,e.y1,r,e.y2-s):new gn(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=or({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var i=new Fn(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=or({},e,i[o]);r.value=this.parseNoteValue(r.value);var n=new qn({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(Nr(n.options.position)?t.vertical&&!zr(n.options.position,[v,_])?n.options.position=t.reverse?v:_:t.vertical||zr(n.options.position,[b,u])||(n.options.position=t.reverse?u:b):t.vertical?n.options.position=t.reverse?v:_:n.options.position=t.reverse?u:b,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 a.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)Nr(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(Xn(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 a.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});o.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&Jo(o);var r=this._lineGroup=new a.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=a.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 a.Group({zIndex:-1}),s=Rr(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],h=0;h<i.length;h++){var c=i[h],l=void 0,u=void 0,f=c.label,d=void 0;if(o?(l=(s||r.axisX).lineBox(),u=this.getSlot(c.from,c.to,!0)):(l=this.getSlot(c.from,c.to,!0),u=(s||r.axisY).lineBox()),f&&(f.vAlign=f.position||v,d=this.createPlotBandLabel(f,c,new gn(l.x1,u.y1,l.x2,u.y2))),0!==l.width()&&0!==u.height()){var y=new p.Rect([l.x1,u.y1],[l.width(),u.height()]),g=a.Path.fromRect(y,{fill:{color:c.color,opacity:c.opacity},stroke:null});n.append(g),d&&n.append(d)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;if(Nr(t)&&t.visible){var n=Tr(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 Fn(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"],c={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},l=[],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=tn(t[n]);zr(a,l)||n%i==0||s&&h===a||(c.position=a,u.append(Yn(c,e)),l.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](),c=0,l=0;l<n;l++){var u=i[l].box[s]();u+p<=h&&(c=Math.max(c,u))}this.box=r?new gn(t.x1,t.y1,t.x1+c+p,t.y2):new gn(t.x1,t.y1,t.x2,t.y1+c+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,s=this.getLabelsTickPositions(),a=this.getActualTickSize()+t.margin,p=0;p<e.length;p++){var h=e[p],c=this.labelTickIndex(h),l=o?h.box.height():h.box.width(),f=s[c]-l/2,d=void 0,y=void 0,g=void 0;if(o){if(i)f=(y=s[c])+((g=s[c+1])-y)/2-l/2;var m=r.x2;n?(m+=a,h.options.rotationOrigin=v):(m-=a+h.box.width(),h.options.rotationOrigin=_),d=h.box.move(m,f)}else{i?(y=s[c],g=s[c+1]):(y=f,g=f+l);var x=r.y1;n?(x-=a+h.box.height(),h.options.rotationOrigin=u):(x+=a,h.options.rotationOrigin=b),d=new gn(y,x,g,x+h.box.height())}h.reflow(d)}},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 gn);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?_:v,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?b:u),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;Nr(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?k:S;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=Tr(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?k:S;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?k:S,s=this.labels,a=i?1:0,p=i?0:1,h=0,c=0,l=0;l<s.length;l++){var u=s[l],f=this.labelTickIndex(u),d=void 0,y=void 0;o?(d=r[f+a],y=r[f+p]):d=y=r[f],h=Math.max(h,d-u.box[n+1]),c=Math.max(c,u.box[n+2]-y)}return{start:h,end:c}},e.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!Nr(n.min)||n.min<=i)||o<e&&r>0&&(!Nr(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=Kr(t,i,o),p=Kr(t+s,i+s,o)):e>o&&r>0&&(p=Kr(e,i,o),a=Kr(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}(An);sn(Wn,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:l,visible:!0},title:{visible:!0,position:f},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:l,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Zn=Wn,Jn="days",Kn="years",$n={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function Qn(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function ts(t,e){return new Date(t.getTime()+e)}function es(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function is(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function os(t,e,i,o){var r=t;if(t){var n=es(t),s=n.getHours();i===Kn?is(r=new Date(n.getFullYear()+e,0,1),0):"months"===i?is(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===i?is(r=os(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 ts(t,864e5*-i)}(n,o),7*e,Jn),s):i===Jn?is(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 ts(i,o+36e5*e)}(n,e):"minutes"===i?(r=ts(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===i?r=ts(n,1e3*e):"milliseconds"===i&&(r=ts(n,e)),"milliseconds"!==i&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function rs(t,e,i){return os(es(t),0,e,i)}function ns(t,e,i){var o=es(t);return o&&rs(o,e,i).getTime()===o.getTime()?o:os(o,1,e,i)}function ss(t,e){return t&&e?t.getTime()-e.getTime():-1}function as(t,e){return t.getTime()-e}function ps(t){if(C(t)){for(var e=[],i=0;i<t.length;i++)e.push(ps(t[i]));return e}if(t)return es(t).getTime()}function hs(t,e){return t&&e?ps(t)===ps(e):t===e}function cs(t,e,i){return Qn(t,e)/$n[i]}function ls(t,e,i,o){var r=es(t),n=es(e);return("months"===i?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+cs(r,new Date(r.getFullYear(),r.getMonth()),Jn)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===Kn?r.getFullYear()-n.getFullYear()+ls(r,new Date(r.getFullYear(),0),"months",1)/12:i===Jn||"weeks"===i?cs(r,n,i):as(r,e)/$n[i])/o}function us(t,e,i){return i===Kn?e.getFullYear()-t.getFullYear():"months"===i?12*us(t,e,Kn)+e.getMonth()-t.getMonth():i===Jn?Math.floor(as(e,t)/864e5):Math.floor(as(e,t)/$n[i])}function fs(t,e){return Qo(e)&&t.parseDate(e)||es(e)}function ds(t,e){if(C(e)){for(var i=[],o=0;o<e.length;o++)i.push(fs(t,e[o]));return i}return fs(t,e)}function ys(t,e){return $o(t.weekStartDay)?t.weekStartDay:e.firstDay?e.firstDay():0}var 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.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=Nr(t.min),o=Nr(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:$o(t.min)?t.min%1:0,max:$o(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=$o(i.min)?i.min:0;if(e=$o(i.max)?i.max:$o(i.min)?o+i.categories.length:this.totalRange().max||1,t){var r=this.totalRange();o=Kr(o,0,r.max),e=Kr(e,0,r.max)}return{min:o,max:e}},e.prototype.range=function(){var t=this.options;return{min:$o(t.min)?t.min:0,max:$o(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?k:S,o=t[i+1],r=t[i+2],n=e[0],s=Jr(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?k:S)+(o?2:1)],h=this.tickIndices(t),c=[],l=0;l<h.length;l++)c.push(p+tn(n*(h[l]-a),3));return c},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?k:S,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,c=a.min,l=s?k:S,u=h[l+(r?2:1)],f=h.clone(),d=!Nr(e),y=on(t,0),g=on(e,y);g=Math.max(g-1,y);var v=u+(y-c)*p,m=u+((g=Math.max(y,g))+1-c)*p;return d&&n&&(m=v),i&&(v=Kr(v,h[l+1],h[l+2]),m=Kr(m,h[l+1],h[l+2])),f[l+1]=r?m:v,f[l+2]=r?v:m,f},e.prototype.limitSlot=function(t){var e=this.options.vertical?k:S,i=this.lineBox(),o=t.clone();return o[e+1]=Kr(t[e+1],i[e+1],i[e+2]),o[e+2]=Kr(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):$o(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):$o(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?k:S,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,h=n.max,c=i?h:p,l=a[r+1],u=a[r+2],f=t[r];if(f<l||f>u)return null;var d=c+(f-l)/s,y=d%1;return o?d=Math.round(d):0===y&&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=tn(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=Kr(e.min+t,o,r),s=Kr(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=on(i.categories[t],""),n=this.axisLabelText(r,o,e);return new Hn(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?k:S,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=tn(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?k:S,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(o?2:1)],h=t[r]-p,c=e[r]-p,l=n.min+h/a,u=n.min+c/a,f=Math.min(l,u),d=Math.max(l,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(hs(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 $o(t.min)&&(e=Math.floor(t.min)),{min:e,max:$o(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 Ir,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}(Zn);sn(gs,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:l},labels:{zIndex:1},justified:!1,_deferLabels:!0});var vs=gs,ms={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"},xs=["milliseconds","seconds","minutes","hours",Jn,"weeks","months",Kn];function _s(t){var e=t._range;return e||((e=t._range=an(t)).min=es(e.min),e.max=es(e.max)),e}var bs=function(t){this.options=t};bs.prototype.displayIndices=function(){return{min:0,max:1}},bs.prototype.displayRange=function(){return{}},bs.prototype.total=function(){return{}},bs.prototype.valueRange=function(){return{}},bs.prototype.valueIndex=function(){return-1},bs.prototype.values=function(){return[]},bs.prototype.totalIndex=function(){return-1},bs.prototype.valuesCount=function(){return 0},bs.prototype.totalCount=function(){return 0},bs.prototype.dateAt=function(){return null};var ws=function(t,e,i){this.options=i,i.baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=os(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&hs(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&&hs(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 As(t,e,i){for(var o,r,n,s=_s(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,c="fit"===t.baseUnit,l=e?xs.indexOf(e):0,u=c?xs[l++]:t.baseUnit,f=a/$n[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===Jr(xs)){r=Math.ceil(d/h);break}if(!c){f>h&&(r=Math.ceil(d/h));break}u=xs[l++]||Jr(xs),d=a/$n[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function Ss(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!zr(e,xs)&&function(t){for(var e,i,o=t.categories,r=Nr(o)?o.length:0,n=m,s=0;s<r;s++){var a=o[s];if(a&&e){var p=Qn(a,e);p>0&&(i=(n=Math.min(n,p))>=31536e6?Kn:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Jn:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=i||Jn}(t),"fit"!==e&&"auto"!==t.baseUnitStep||As(t),t}ws.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},ws.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,i=t.baseUnitStep,o=ls(this.displayStart,this.valueStart,e,i),r=ls(this.displayEnd,this.valueStart,e,i);this._indices={min:o,max:r}}return this._indices},ws.prototype.total=function(){return{min:this.start,max:this.end}},ws.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},ws.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},ws.prototype.valueIndex=function(t){var e=this.options;return Math.floor(ls(t,this.valueStart,e.baseUnit,e.baseUnitStep))},ws.prototype.totalIndex=function(t){var e=this.options;return Math.floor(ls(t,this.start,e.baseUnit,e.baseUnitStep))},ws.prototype.dateIndex=function(t){var e=this.options;return ls(t,this.valueStart,e.baseUnit,e.baseUnitStep)},ws.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},ws.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=os(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},ws.prototype.dateAt=function(t,e){var i=this.options;return os(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},ws.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,a=this.start,p=ls(t,a,r,n),h=e?Math.ceil(p):Math.floor(p);return i&&(h+=i),os(a,h*n,r,s)};var ks=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=ds(i,r))._parsed=!0),o=or({roundToBaseUnit:!0},o,{categories:r,min:fs(i,o.min),max:fs(i,o.max),weekStartDay:ys(o,i)}),e.panning&&e.isPannable(o.vertical?k:S)&&(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=_s(r),s=o.maxDivisions;if(this.dataRange=new ws(n.min,n.max,Ss(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;As(p,h.baseUnit,h.baseUnitStep),this.divisionRange=new ws(n.min,n.max,p)}else this.divisionRange=this.dataRange}else o.baseUnit=o.baseUnit||Jn,this.dataRange=this.divisionRange=new bs(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 ss(t,e.min)>=0&&ss(t,e.max)<=0&&i.length},e.prototype.parseNoteValue=function(t){return fs(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=tn(t/p,10);if(a.min&&a.max){var c=ts(e.min||a.min,h),l=ts(e.max||a.max,h);a={min:os(c,0,i,o),max:os(l,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=as(o,r),s=Math.round(.1*n);t<0?(o=ts(o,s),r=ts(r,-s)):(o=ts(o,-s),r=ts(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=tn(t/(o/(s-n)),10)*(e.reverse?-1:1),h=ts(n,p),c=ts(s,p),l=this.limitRange(ps(h),ps(c),ps(a.min),ps(a.max),p);return l?(l.min=es(l.min),l.max=es(l.max),l.baseUnit=e.baseUnit,l.baseUnitStep=e.baseUnitStep||1,l.userSetBaseUnit=e.userSetBaseUnit,l.userSetBaseUnitStep=e.userSetBaseUnitStep,l):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=as(r.max,r.min)/(n.max-n.min),a=this.options;return{min:ts(r.min,o.min*s),max:ts(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,c=a.baseUnitStep,l=os(n,t*c,h,p),u=os(s,-t*c,h,p);if(i){var f,d,y=e.autoBaseUnitSteps,g=e.maxDateGroups,v=Jr(y[h])*g*$n[h],m=as(s,n),x=as(u,l),_=xs.indexOf(h);if(x<$n[h]&&"milliseconds"!==h)h=xs[_-1],l=ts(n,d=(m-(g-1)*(f=Jr(y[h]))*$n[h])/2),u=ts(s,-d);else if(x>v&&h!==Kn){var b=0;do{_++,h=xs[_],b=0,d=2*$n[h];do{f=y[h][b],b++}while(b<y[h].length&&d*f<m)}while(h!==Kn&&d*f<m);(d=(d*f-m)/2)>0&&(l=ts(n,-d),u=ts(s,d),l=ts(l,Kr(u,o.min,o.max)-u),u=ts(u,Kr(l,o.min,o.max)-l))}}return l<o.min&&(l=o.min),u>o.max&&(u=o.max),l&&u&&as(u,l)>0?{min:l,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 Hn(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=_s(this.options.srcCategories);return{min:es(t.min),max:es(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=_s(t.srcCategories);return new ws(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(vs);sn(ks,{type:y,labels:{dateFormats:ms},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 Cs=ks;function Ts(t,e){return tn(Math.floor(t/e)*e,10)}function Ps(t,e){return tn(Math.ceil(t/e)*e,10)}function Ms(t){return Math.max(Math.min(t,3e5),-3e5)}var Os=Math.pow(10,-9),Rs=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=fn(r,n),a={majorUnit:s};!1!==i.roundToMajorUnit&&(r<0&&js(r,s,1/3)&&(r-=s),n>0&&js(n,s,1/3)&&(n+=s));return a.min=Ts(r,s),a.max=Ps(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:Nr(e.min)?Math.min(t.min,e.min):t.min,max:Nr(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=Nr(e.min),o=Nr(e.max);var n=i||o;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=Ts(t.min,e.majorUnit),t.max=Ps(t.max,e.majorUnit)):n&&(r=or(t,e),t.majorUnit=fn(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=or(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(tn(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=[],c=n[(o?k:S)+(1===p?1:2)],l=0;e&&(l=e/t);for(var u=0;u<a;u++)u%l!=0&&h.push(tn(c,3)),c+=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?k:S,h=this.lineBox(),c=h[p+(a?2:1)],l=(a?-1:1)*((s?h.height():h.width())/(n.max-n.min)),u=new gn(h.x1,h.y1,h.x1,h.y1),f=t,d=e;return Nr(f)||(f=d||0),Nr(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]=Ms(c+l*(a?r:o)),u[p+2]=Ms(c+l*(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?k:S,a=this.lineBox(),p=a[s+(o?2:1)],h=i?a.height():a.width(),c=(o?-1:1)*(t[s]-p),l=c*((r-n)/h);return c<0||c>h?null:tn(i?r-l:n+l,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=tn(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=tn(i.min+t*i.majorUnit,10),r=this.axisLabelText(o,null,e);return new Hn(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=Kr(o.min,e,i),n=Kr(o.max,e,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.isValidRange=function(t,e){return e-t>Os},e}(Zn);function js(t,e,i){var o=tn(Math.abs(t%e),10);return 0===o||o>e*(1-i)}sn(Rs,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},labels:{format:"#.####################"},zIndex:1});var Bs=Rs,Is=function(t){function e(e,i,o,r){var n=es(e),s=es(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=Kn:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Jn);return e}(Qn(r,o)):"hours"),s=$n[n],a=i.weekStartDay||0,p=rs(ps(o)-1,n,a)||es(r),h=ns(ps(r)+1,n,a),c=(i.majorUnit?i.majorUnit:void 0)||Ps(fn(p.getTime(),h.getTime()),s)/s,l=us(p,h,n),u=Ps(l,c)-l,f=Math.floor(u/2),d=u-f;i.baseUnit||delete i.baseUnit;return i.baseUnit=i.baseUnit||n,i.min=i.min||os(p,-f,n,a),i.max=i.max||os(h,d,n,a),i.minorUnit=i.minorUnit||c/5,i.majorUnit=c,i}(n,s,p=or(p||{},{min:fs(a,p.min),max:fs(a,p.max),axisCrossingValue:ds(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:ys(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var h=p.weekStartDay||0;this.totalMin=ps(rs(ps(n)-1,p.baseUnit,h)),this.totalMax=ps(ns(ps(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(us(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?k:S)+(1===r?1:2)],s=this.getDivisions(t),a=as(e.max,e.min),p=(i?o.height():o.width())/a,h=e.weekStartDay||0,c=[n],l=1;l<s;l++){var u=n+as(os(e.min,l*t,e.baseUnit,h),e.min)*p*r;c.push(tn(u,3))}return c},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 Bs.prototype.getSlot.call(this,fs(this.intlService,t),fs(this.intlService,e),i)},e.prototype.getValue=function(t){var e=Bs.prototype.getValue.call(this,t);return null!==e?es(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=os(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 Hn(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/as(a.max,a.min),h=tn(t/p,10)*(i.reverse?-1:1),c=ts(i.min,h),l=ts(i.max,h);return e||(c=os(c,0,o,r),l=os(l,0,o,r)),{min:c,max:l,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=as(i,o),s=Math.round(.1*n);t<0?(i=ts(i,s),o=ts(o,-s)):(i=ts(i,-s),o=ts(o,s))}return{min:i,max:o}},e.prototype.shouldRenderNote=function(t){var e=this.range();return ss(t,e.min)>=0&&ss(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),i=this.limitRange(ps(e.min),ps(e.max),this.totalMin,this.totalMax,e.offset);if(i)return{min:es(i.min),max:es(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:es(r),max:es(n)}},e.prototype.zoomRange=function(t){var e=this.scaleRange(t);return{min:es(Kr(ps(e.min),this.totalMin,this.totalMax)),max:es(Kr(ps(e.max),this.totalMin,this.totalMax))}},e}(Zn);sn(Is,{type:y,majorGridLines:{visible:!0,width:1,color:l},labels:{dateFormats:ms}});var zs=Is,Ls=function(t){function e(e,i,o,r){var n=or({majorUnit:10,min:e,max:i},o),s=n.majorUnit,a=function(t,e){var i,o=tn(Vs(t,e),10)%1;i=t<=0?e:0!==o&&(o<.3||o>.9)?Math.pow(e,Vs(t,e)+.2):Math.pow(e,Math.ceil(Vs(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(Vs(t,o))));return r}(e,i,n),h=function(t,e,i,o){var r=i.min,n=i.max;Nr(i.axisCrossingValue)&&i.axisCrossingValue<=0&&Es();Nr(o.max)?o.max<=0&&Es():n=e;Nr(o.min)?o.min<=0&&Es():r=t;return{min:r,max:n}}(p,a,n,o);n.max=h.max,n.min=h.min,n.minorUnit=o.minorUnit||tn(s-1,10),t.call(this,n,r),this.totalMin=Nr(o.min)?Math.min(p,o.min):p,this.totalMax=Nr(o.max)?Math.max(a,o.max):a,this.logMin=tn(Vs(h.min,s),10),this.logMax=tn(Vs(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,c=n.majorUnit,l=h?k:S,u=this.lineBox(),f=u[l+(p?2:1)],d=(p?-1:1)*((h?u.height():u.width())/(a-s)),y=new gn(u.x1,u.y1,u.x1,u.y1),g=t,v=e;return Nr(g)||(g=v||1),Nr(v)||(v=g||1),g<=0||v<=0?null:(i&&(g=Math.max(Math.min(g,n.max),n.min),v=Math.max(Math.min(v,n.max),n.min)),g=Vs(g,c),v=Vs(v,c),h?(o=a-Math.max(g,v),r=a-Math.min(g,v)):(o=Math.min(g,v)-s,r=Math.max(g,v)-s),y[l+1]=Ms(f+d*(p?r:o)),y[l+2]=Ms(f+d*(p?o:r)),y)},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,c=n?a.height():a.width(),l=(o-i)/c,u=n?k:S,f=a[u+h],d=p*(t[u]-f);if(d<0||d>c)return null;var y=i+d*l;return tn(Math.pow(s,y),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=tn(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(Xn(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){zr(t,a)||(s.position=t,p.append(Yn(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(tn(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,c=this.logMin,l=this.logMax,u=Math.floor(c);u<l;u++)for(var f=this._minorIntervalOptions(u),d=e.skip;d<n;d+=e.step){var y=f.value+d*f.minorStep;if(y>r)break;if(y>=o)t(tn(p+h*(Vs(y,s)-c),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 Hn(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=Kr(r.min,i,o),s=Kr(r.max,i,o),a=e.majorUnit,p=s>n&&e.min&&e.max&&tn(Vs(e.max,a)-Vs(e.min,a),10)<1,h=!(e.min===i&&e.max===o)&&tn(Vs(s,a)-Vs(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?k:S,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}(Zn);function Es(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Vs(t,e){return Math.log(t)/Math.log(e)}sn(Ls,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},zIndex:1,_deferLabels:!0});var Fs=Ls,Ds={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),Gr(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 p.Circle([n.x,n.y],e),h=this.gridLinesVisual(),c=0;c<t.length;c++){var l=new a.Path(r);o&&(s.radius=o(t[c])),l.moveTo(s.center).lineTo(s.pointAt(t[c]+180)),h.append(l)}return h.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 Fr(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},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.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 gn,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,c=e||0;c<n;c+=a)h=r.reverse?360-c*s:c*s,h=tn(h,3)%360,o&&zr(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 Fr(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!==c){var o=Qr(360/(2*this.options.categories.length)),r=Math.cos(o)*t,n=this.majorAngles(),s=function(e){return!i&&zr(e,n)?t:r};return s}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new a.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 p=Math.ceil(o.to)-o.to;r.angle-=(p+s)*n.angle;var h=bn.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(h)}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=Kr(Math.floor(p),0,s-1)];o&&(h-=a/2)<0&&(h+=360);var c=a*(Kr(Math.ceil(e||p),p,s-1)-p+1);return new mn(r.center(),0,r.height()/2,h,c)},e.prototype.slot=function(t,e){var i=this.getSlot(t,e),o=i.startAngle+180,r=o+i.angle;return new p.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}(vs);sn(Us,{startAngle:90,labels:{margin:hr(10)},majorGridLines:{visible:!0},justified:!0}),or(Us.prototype,Ds);var Gs=Us,Hs=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 Bs.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 gn,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&&zr(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=Kr(t,i.min,i.max),s=Kr(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 mn(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),h=Math.max(t,e);return r.reverse?(i=a,o=h):(i=360-h,o=360-a),i=(i+n)%360,o=(o+n)%360,new p.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(qr(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}(Zn);sn(Hs,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:hr(10)},majorGridLines:{color:l,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),or(Hs.prototype,Ds,{createPlotBands:Gs.prototype.createPlotBands,majorAngles:Gs.prototype.majorAngles,range:Bs.prototype.range,labelsCount:Bs.prototype.labelsCount,createAxisLabel:Bs.prototype.createAxisLabel});var Ns=Hs;function qs(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Xs={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,r=o.majorAngles(),n=o.box.center(),s=this._plotbandGroup=new a.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}},u=this.getSlot(h.from,h.to,!0),f=new mn(n,n.y-u.y2,n.y-u.y1,0,360),d=void 0;d=e===c?bn.current.createRing(f,l):a.Path.fromPoints(this.plotBandPoints(f,r),l).close(),s.append(d)}this.appendVisual(s)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new p.Circle(r,t.innerRadius),s=new p.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();Gr(n,this.renderGridLines(r,s,o,e.minorGridLines))}return n},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip;void 0===n&&(n=0);var s=o.step;void 0===s&&(s=0);for(var h=this.gridLinesVisual(),l=n;l<e.length;l+=s){var u=t.y-e[l];if(u>0){var f=new p.Circle([t.x,t.y],u);if(o.type===c)h.append(new a.Circle(f,r));else{for(var d=new a.Path(r),y=0;y<i.length;y++)d.lineTo(f.pointAt(i[y]+180));d.close(),h.append(d)}}}return h.children},getValue:function(t){var e=this.lineBox(),i=this.plotArea.polarAxis,o=i.majorAngles(),r=i.box.center(),n=t.distanceTo(r),s=n;if(this.options.majorGridLines.type!==c&&o.length>1){var a=t.x-r.x,p=t.y-r.y,h=(qr(Math.atan2(p,a))+540)%360;o.sort((function(t,e){return qs(t,h)-qs(e,h)}));var l=90-qs(o[0],o[1])/2,u=180-qs(h,o[0])-l;s=n*(Math.sin(Qr(u))/Math.sin(Qr(l)))}return this.axisType().prototype.getValue.call(this,new dn(e.x1,e.y2-s))}},Ys=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}(Bs);or(Ys.prototype,Xs);var Ws=Ys,Zs=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}(Fs);or(Zs.prototype,Xs);var Js=Zs;function Ks(t){return t<=0?-1:1}var $s=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],h=e[1],c=e[2];for(i.push(new p.Segment(a));a.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){var l=this.tangent(a,h,S,k);return Jr(i).controlOut(this.firstControlPoint(l,a,h,S,k)),i.push(new p.Segment(h,this.secondControlPoint(l,a,h,S,k))),i}if(o){a=e[r-1],h=e[0],c=e[1];var u=this.controlPoints(a,h,c);n=u[1],s=u[0]}else{var f=this.tangent(a,h,S,k);n=this.firstControlPoint(f,a,h,S,k)}for(var d=n,y=0;y<=r-3;y++)if(this.removeDuplicates(y,e),y+3<=(r=e.length)){a=e[y],h=e[y+1],c=e[y+2];var g=this.controlPoints(a,h,c);Jr(i).controlOut(d),d=g[1];var v=g[0];i.push(new p.Segment(h,v))}if(o){a=e[r-2],h=e[r-1],c=e[0];var m=this.controlPoints(a,h,c);Jr(i).controlOut(d),i.push(new p.Segment(h,m[0])),Jr(i).controlOut(m[1]),i.push(new p.Segment(c,s))}else{var x=this.tangent(h,c,S,k);Jr(i).controlOut(d),i.push(new p.Segment(c,this.secondControlPoint(x,h,c,S,k)))}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||tn(r,1)===tn(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=S,n=k,s=!1,a=!1;if(this.isLine(t,e,i))o=this.tangent(t,e,S,k);else{var p={x:this.isMonotonicByField(t,e,i,S),y:this.isMonotonicByField(t,e,i,k)};if(p.x&&p.y)o=this.tangent(t,i,S,k),s=!0;else if(this.invertAxis(t,e,i)&&(r=k,n=S),p[r])o=0;else o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Ks((i[n]-t[n])*(e[r]-t[r])):-Ks((i[r]-t[r])*(e[n]-t[n]))),a=!0}var h=this.secondControlPoint(o,t,e,r,n);if(a){var c=r;r=n,n=c}var l=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,l,o)),[h,l]},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 p.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}(O),Qs=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}(O);function ta(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Qs(e[i])}var ea=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};ea.prototype.findAxisByName=function(t){return ta(t,this._pane.axes)};var ia=ea,oa=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}(O);function ra(t){for(var e=t.length,i=0,o=0;o<e;o++){$o(t[o])&&i++}return i}var na={min:function(t){for(var e=t.length,i=m,o=0;o<e;o++){var r=t[o];$o(r)&&(i=Math.min(i,r))}return i===m?t[0]:i},max:function(t){for(var e=t.length,i=x,o=0;o<e;o++){var r=t[o];$o(r)&&(i=Math.max(i,r))}return i===x?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];$o(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return ra(t)&&(e=na.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&Nr(r)&&i++}return i},avg:function(t){var e=ra(t),i=t[0];return e>0&&(i=na.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&Nr(o))return o}return t[0]}},sa=na;function aa(t,e){return null===e?e:Or(t)(e)}var pa=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=[w]),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]||[w]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[w]},e.prototype.bindPoint=function(t,e,i){var o,r,n=t.data,s=Nr(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(Nr(s)){if(Array.isArray(s)){var c=s.slice(p.length);r=this._bindFromArray(s,p),o=this._bindFromArray(c,h)}else if("object"==typeof s){var l=this.sourceFields(t,p),u=this.sourceFields(t,h);r=this._bindFromObject(s,p,l),o=this._bindFromObject(s,h,u)}}else r=this._undefinedValue[t.type];return Nr(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]=aa(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===w?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},e}(O);pa.current=new pa;var ha=pa,ca=/percent(?:\w*)\((\d+)\)/,la=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),ua=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=la.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=ha.current,n=r.valueFields(t),s=Nr(o[0])?o[0]:{};if(C(s))i=Or("["+(e?n.indexOf(e):0)+"]");else if($o(s))i=Or();else if("object"==typeof s){i=Or(r.sourceFields(t,n)[n.indexOf(e)])}return i},e.prototype.getErrorRange=function(t,e){var i,o,r;if(!Nr(e))return null;if(this.globalRange)return this.globalRange(t);if(C(e))i=t-e[0],o=t+e[1];else if($o(r=parseFloat(e)))i=t-r,o=t+r;else{if(!(r=ca.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]);$o(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]);$o(n)&&(i+=n,o++)}return{value:i/o,count:o}},e}(O),fa=Si.browser||{},da=fa.msie?.001:0,ya="zero",ga="bar",va="column",ma="line",xa="pie",_a="verticalLine",ba=[ga,va,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],wa="DOMMouseScroll mousewheel",Aa=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 dn(n.x,r.y1),new dn(n.x,r.y2)],i&&e.push(new dn(p,r.y1),new dn(h,r.y1),new dn(p,r.y2),new dn(h,r.y2)),this.box=new gn(p,r.y1,h,r.y2)):(e=[new dn(r.x1,n.y),new dn(r.x2,n.y)],i&&e.push(new dn(r.x1,p),new dn(r.x1,h),new dn(r.x2,p),new dn(r.x2,h)),this.box=new gn(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 a.Path(o).moveTo(i[r].x,i[r].y).lineTo(i[r+1].x,i[r+1].y);Jo(n),this.visual.append(n)}},e}(An);sn(Aa,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Sa=Aa,ka=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}(Sa);function Ca(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(!zr(a,i.excluded)&&t.hasOwnProperty(a)){var p=t[a];er(p)?(s=!0,o||(t[a]=on(p(e),r[a]))):rr(p)&&(o||(i.defaults=r[a]),i.depth++,s=Ca(p,e,i,o)||s,i.depth--)}return s}function Ta(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var Pa=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=or({},o,{vertical:!this.options.invertAxes},t)}return i},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&$o(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;$o(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,c=p.series.stack;if(h&&c){if("string"==typeof h&&h!==c)continue;if(h.group&&h.group!==c.group)continue}var l=this.plotValue(p);(l>=0&&r||l<0&&!r)&&(n+=l,o+=l,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,tr(t.value)?t.value:d]},e.prototype.stackLimits=function(t,e){for(var i=m,o=x,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];Nr(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,an(h.negative).min)),h.positive.length&&(p.max=Math.max(p.max,an(h.positive).max))),p.min!==m||p.max!==x?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;$o(p)&&$o(h)?o={low:p,high:h}:a&&Nr(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new ua(a.value,n,w),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 ka(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,Nr(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];Nr(a)||(this._evalSeries[n]=a=Ca(t,{},s,!0));var p=t;return a&&Ca(p=or({},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:m,max:x}).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),c=o[n++],l=i[a];if(l||(i[a]=l=e.categorySlot(r,a,h)),c){var u=e.plotRange(c,h.startValue()),f=e.valueSlot(h,u);if(f){var d=e.pointSlot(l,f);c.aboveAxis=e.aboveAxis(c,h),c.stackValue=u[1],e.options.isStacked100&&(c.percentage=e.plotValue(c)),e.reflowPoint(c,d)}else c.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(Jr(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 gn(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=Ta(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]=ha.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}(An);sn(Pa,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Ma=Pa,Oa=function(t){function e(i){var o=this;if(t.call(this),1===arguments.length)for(var r=e.formats,n=this.resolveColor(i),s=0;s<r.length;s++){var a=r[s].re,p=r[s].process,h=a.exec(n);if(h){var c=p(h);o.r=c[0],o.g=c[1],o.b=c[2]}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHex=function(){var t=this.padDigit,e=this.r.toString(16),i=this.g.toString(16),o=this.b.toString(16);return"#"+t(e)+t(i)+t(o)},e.prototype.resolveColor=function(t){var i=t||"black";return"#"===i.charAt(0)&&(i=i.substr(1,6)),i=(i=i.replace(/ /g,"")).toLowerCase(),i=e.namedColors[i]||i},e.prototype.normalizeByte=function(t){return t<0||isNaN(t)?0:t>255?255:t},e.prototype.padDigit=function(t){return 1===t.length?"0"+t:t},e.prototype.brightness=function(t){var e=Math.round;return this.r=e(this.normalizeByte(this.r*t)),this.g=e(this.normalizeByte(this.g*t)),this.b=e(this.normalizeByte(this.b*t)),this},e.prototype.percBrightness=function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},e.prototype.isDark=function(){return this.percBrightness()<180},e.fromBytes=function(t,e,i,o){return new wo(t,e,i,null!=o?o:1)},e.fromRGB=function(t,e,i,o){return new bo(t,e,i,null!=o?o:1)},e.fromHSV=function(t,e,i,o){return new So(t,e,i,null!=o?o:1)},e.fromHSL=function(t,e,i,o){return new ko(t,e,i,null!=o?o:1)},e}(O);Oa.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],Oa.namedColors=vo;var Ra=Oa,ja={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:Wr(t),originalEvent:t,point:this}}},Ba={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&Nr(e)&&null!==e&&(this.note=new qn({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Ia=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=on(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=Tr(i),r=this.pointData(),n=this.value;o?n=o(r):i.format&&(n=this.formatValue(i.format)),this.label=new Fn(n,or({align:f,vAlign:f,margin:{left:5,right:5},zIndex:on(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=or({color:this.color},t.border);return Nr(i.color)||(i.color=new Ra(e).brightness(.8).toHex()),i},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new Tn({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:on(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 gn(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?b:o)?u: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 Tn({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:on(t.border.opacity,1)},opacity:on(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 p.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=u):(i=t.y2,o=b),{point:new dn(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}(An);Ia.prototype.defaults={vertical:!0,markers:{visible:!0,background:A,size:8,type:d,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:hr(3),padding:hr(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},or(Ia.prototype,ja),or(Ia.prototype,Ba);var za=Ia,La=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&&!Nr(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;er(i)&&o&&(i=o.color);var r=a.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}(An);sn(La,{closed:!1});var Ea=La;function Va(t,e,i,o,r){var n=t.box,s=new p.Point;return s[e]=n[e+i],s[o]=n[o+r],s}var Fa={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,r=e.reverse,n=o?S:k,s=o?k:S,a=r?2:1,h=a,c=Va(t[0],n,a,s,h),l=[c],u=1;u<t.length;u++){var f=Va(t[u],n,a,s,h);if(c[n]!==f[n]){var d=new p.Point;d[n]=c[n],d[s]=f[s],l.push(d,f)}c=f}return i?c!==Jr(l)&&l.push(c):l.push(Va(Jr(t),n,a,s,r?1:2)),l}},Da=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}(Ea);or(Da.prototype,Fa);var Ua=Da,Ga=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;er(i)&&e&&(i=e.color);var o=new $s(this.options.closed).process(this.points()),r=new a.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}(Ea),Ha={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=[],c=0;c<p;c++){var l=a[c];l?h.push(l):"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?ya:e||"interpolate"},getNearestPoint:function(t,e,i){for(var o,r=new dn(t,e),n=this.seriesPoints[i],s=m,a=0;a<n.length;a++){var p=n[a];if(p&&Nr(p.value)&&null!==p.value&&!1!==p.visible){var h=p.box.center().distanceTo(r);h<s&&(o=p,s=h)}}return o}},Na=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(Lr(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}(a.Animation);sn(Na,{duration:600}),a.AnimationFactory.current.register("clip",Na);var qa=Na;function Xa(t){for(var e=0;e<t.length;e++)if(Nr(t[e].zIndex))return!0}var Ya={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),i=a.Path.fromRect(e.toRect());this.visual.clip(i),this.animation=new qa(i,{box:e}),Xa(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&&Nr(o.visual.options.zIndex)&&o.visual.clip(t)}}},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.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return za},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(!Nr(a)||null===a){if(s!==ya)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;er(r.color)&&(h=p.color);var c=new za(a,p);return c.color=h,this.append(c),c},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?Ua:"smooth"===o?Ga:Ea)(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}(Ma);or(Wa.prototype,Ha,Ya);var Za=Wa,Ja=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;er(o)&&e&&(o=e.color),this.visual=new a.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),i.width>0&&!1!==i.visible&&this.createStroke({stroke:or({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 p.Segment(t)}))},e.prototype.createStroke=function(t){var e=new a.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();Gr(i,r)}var n=new a.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=Jr(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}(Ea),Ka=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}(Ja);or(Ka.prototype,Fa);var $a=Ka,Qa=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 $s(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 p.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},e}(Ja),tp=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?$a:"smooth"===a?Qa:Ja)(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 c=h+a,l=e,u=void 0;do{u=o[--l][c]}while(l>0&&!u);if(u)"step"!==i&&h>r&&!o[l][c-1]&&p.push(this._previousSegmentPoint(h,c,c-1,l)),p.push(u),"step"!==i&&h+1<s&&!o[l][c+1]&&p.push(this._previousSegmentPoint(h,c,c+1,l));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 za(0,e);return i.categoryIx=t,i.series={},i},e.prototype.seriesMissingValues=function(t){return t.missingValues||ya},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Za),ep=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:m,max:x},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}(O),ip=function(t){function e(e,i,o){t.call(this,i),this.textBox=new Fn(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,s=r.box,a=r.options.padding,p=t;n.align=i?f:v,n.vAlign=i?b:f,"insideEnd"===e.position?i?(n.vAlign=b,!o&&s.height()<t.height()&&(n.vAlign=u)):n.align=o?_:v:e.position===f?(n.vAlign=f,n.align=f):"insideBase"===e.position?i?n.vAlign=o?u:b:n.align=o?v:_:"outsideEnd"===e.position&&(i?p=o?new gn(t.x1,t.y1-s.height(),t.x2,t.y1):new gn(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=f,p=o?new gn(t.x2,t.y1,t.x2+s.width(),t.y2):new gn(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?k:S,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}(An);sn(ip,{position:"outsideEnd",margin:hr(3),padding:hr(4),color:l,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var op=ip;function rp(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var np=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||A,this.aboveAxis=on(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=Tr(e);i=r?r(o):this.formatValue(e.format),this.label=new op(i,or({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 a.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=Nr(i.opacity)?i.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=a.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(),p=this.box.height();if((e.vertical?s:p)>6&&(Jo(n),(s<1||p<1)&&(n.options.stroke.lineJoin="round")),t.append(n),rp(e)){var h=this.createGradientOverlay(n,{baseColor:this.color},or({end:e.vertical?void 0:[0,1]},e.overlay));t.append(h)}},e.prototype.createHighlight=function(t){return Jo(a.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 Nr(o)||(o=new Ra(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,s=v,a=b;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),a=u);else{var p=Math.max(o.x1,n.x1),h=Math.min(o.x2,n.x2);i.isStacked?(a=u,r?(s=_,t=h):t=p,e=Math.max(o.y1,n.y1)-5):(r?t=h+5:(t=p-5,s=_),e=Math.max(o.y1,n.y1))}return{point:new dn(t,e),align:{horizontal:s,vertical:a}}},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}(An);or(np.prototype,ja),or(np.prototype,Ba),np.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var sp=np;function ap(t,e){t.forEach(e)}function pp(t,e){for(var i=t.length,o=i-1;o>=0;o--)e(t[o],o-i-1)}var hp=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?pp:ap}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?k:S,p=s+o+r*(s-1),h=(i?t.height():t.width())/p,c=t[a+1]+h*(o/2);this.forEach(n,(function(e,i){var o=(e.box||t).clone();o[a+1]=c,o[a+2]=c+h,e.reflow(o),i<s-1&&(c+=h*r),c+=h}))},e}(An);sn(hp,{vertical:!1,gap:0,spacing:0});var cp=hp,lp=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?S:k,i=this.children,o=i.length,r=this.box=new gn,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}(An);sn(lp,{vertical:!0});var up=lp,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.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return sp},e.prototype.clusterType=function(){return cp},e.prototype.stackType=function(){return up},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),c=this.pointOptions(r,n),l=c.labels;p&&"outsideEnd"===l.position&&(l.position="insideEnd"),c.isStacked=p;var u=t.fields.color||r.color;h<0&&c.negativeColor&&(u=c.negativeColor),c=this.evalPointOptions(c,h,o,i,r,n),er(r.color)&&(u=c.color);var f=new(this.pointType())(h,c);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?S:k;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),Xa(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&&Nr(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 p.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e}(Ma);sn(fp,{animation:{type:ga}});var dp=fp,yp=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 a.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var i=a.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:on(e.border.opacity,e.opacity)}),Jo(i),t.append(i),rp(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},or({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:on(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=a.Path.fromPoints(i[n],r);Jo(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return Nr(e)||(e=new Ra(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=a.Path.fromRect(this.box.toRect(),{fill:{color:A,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(or({},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 dn(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:v,vertical:b}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(An);sn(yp,{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:{}}}),or(yp.prototype,ja),or(yp.prototype,Ba);var gp=yp;function vp(t){return ra(t)===t.length}var mp=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,c=vp(this.splitValue(h)),l=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),c&&(i=this.createPoint(t,e));var f=a[o];f||(f=new cp({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=l,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return gp},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=or({},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),er(r.color)&&(h=p.color),p.vertical=!this.options.invertAxes;var c=new s(a,p);return c.color=h,c},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:m,max:x},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}(Ma);or(mp.prototype,Ya);var xp=mp,_p=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=or({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);Nr(p.color)||(Nr(this.color)?p.color=this.color:p.color=new Ra(n.background).brightness(.8).toHex());var h=new Tn({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}(gp);sn(_p,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:A,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:d,background:A,border:{width:2,opacity:1},opacity:0}}),or(_p.prototype,ja);var bp=_p,wp=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}(bp),Ap=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,c=vp(this.splitValue(h)),l=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),c&&(i=this.createPoint(t,e));var f=a[o];f||(f=new cp({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=l),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return this.options.invertAxes?wp:bp},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));Nr(t.mean)&&(r=r.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:m,max:x},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];Nr(r)&&null!==r&&i.push(r)}return i},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(xp),Sp=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}(Sa);function kp(t){return Nr(t)&&null!==t}var Cp=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,c=t.options.errorBars,l=i[s],u=i[a];$o(r)&&($o(l)&&$o(u)&&(o={low:l,high:u}),c&&Nr(c[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new ua(c[n],h,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,c[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===k,p={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];var h=new Sp(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;kp(o)&&kp(r)||(h=this.createMissingValue(h,a)),h&&((i=this.createPoint(h,e))&&(Object.assign(i,e),this.addErrorBar(i,S,e),this.addErrorBar(i,k,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];kp(n)&&(a=this.xAxisRanges[o]=a||{min:m,max:x},Qo(n)&&(n=fs(i,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),kp(s)&&(p=this.yAxisRanges[r]=p||{min:m,max:x},Qo(s)&&(s=fs(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];Nr(s)||(this._evalSeries[r]=s=Ca(t,{},n,!0));var a=t;return s&&Ca(a=or({},t),{value:e,series:o,dataItem:i.dataItem},n),a},e.prototype.pointType=function(){return za},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=or({},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),er(i.color)&&(r=o.color);var n=new za(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 c=e.pointSlot(p,h);s.reflow(c)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new gn(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,or({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}(An);sn(Cp,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),or(Cp.prototype,Ya,{_bindPoint:Ma.prototype._bindPoint});var Tp=Cp,Pp=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 a.Group,s=new a.Circle(new p.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}]})}),h=new a.Circle(new p.Circle([o.x,o.y],r),{stroke:{color:e.color||new Ra(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,h),n},e}(za);Pp.prototype.defaults=or({},Pp.prototype.defaults,{labels:{position:f},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Pp.prototype.defaults.highlight.zIndex=void 0;var Mp=Pp,Op=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=x,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 Mp},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=on(i.negativeValues.color,s));var a=or({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:d,border:i.border,opacity:i.opacity,animation:n}});a=this.evalPointOptions(a,t,e),er(i.color)&&(s=a.color),a.markers.background=s;var p=new Mp(t,a);return p.color=s,this.append(p),p},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,c=0;c<n.length;c++){var l=n[c];if(l){var u=Math.abs(l.value.size)*h,f=Math.sqrt((p+u)/Math.PI),d=on(l.options.zIndex,0)+(1-f/a);or(l.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}(Tp);sn(Op,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Rp=Op,jp=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}(Tn);or(jp.prototype,ja);var Bp=jp,Ip=function(t){function e(e,i){t.call(this,i),this.aboveAxis=this.options.aboveAxis,this.color=i.color||A,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,Nr(this.value.target)&&(this.target=new Bp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:b,align:_}),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 c=new gn(p.x1,h.y1,p.x2,h.y2);i.options.height=r?c.height():e.target.line.width,i.options.width=r?e.target.line.width:c.width(),i.reflow(c)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,i=a.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:on(e.border.opacity,e.opacity)}),this.bodyVisual=i,Jo(i),this.visual.append(i)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=a.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return a.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}(An);Ip.prototype.tooltipAnchor=sp.prototype.tooltipAnchor,sn(Ip,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),or(Ip.prototype,ja),or(Ip.prototype,Ba);var zp=Ip,Lp=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||C(r[0])||rr(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=or({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),c=t.fields.color||r.color;h=this.evalPointOptions(h,p,o,i,r,n),er(r.color)&&(c=h.color);var l=new zp(p,h);l.color=c;var u=a[i];return u||(u=new cp({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(l),l},e.prototype.updateRange=function(t,e){var i=t.current,o=t.target,r=e.series.axis,n=this.valueAxisRanges[r];Nr(i)&&!isNaN(i)&&Nr(o&&!isNaN(o))&&((n=this.valueAxisRanges[r]=n||{min:m,max:x}).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}(Ma);Lp.prototype._setAnimationOptions=dp.prototype._setAnimationOptions,sn(Lp,{animation:{type:ga}});var Ep=Lp,Vp=function(t){function e(e,i){t.call(this),this.chartService=e,this.options=or({},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=on(i,r),o=on(o,r)}var n=hr(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:nr(t.border.width),paddingTop:nr(n.top),paddingBottom:nr(n.bottom),paddingLeft:nr(n.left),paddingRight:nr(n.right)}},e.prototype.show=function(t,e,i){t.format=e.format;var o=this.getStyle(e,i);t.style=o,!Nr(e.color)&&new Ra(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}(O);sn(Vp,{border:{width:1},opacity:1});var Fp=Vp,Dp=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===y&&(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,s=r.padding,a=!o.axis.options.vertical,p=o.line.bbox();return a?(t=f,n===u?(e=b,i=p.bottomLeft().translate(0,s)):(e=u,i=p.topLeft().translate(0,-s))):(e=f,n===v?(t=_,i=p.topLeft().translate(-s,0)):(t=v,i=p.topRight().translate(s,0))),{point:i,align:{horizontal:t,vertical:e}}},e}(Fp);sn(Dp,{padding:10});var Up=Dp,Gp=function(t){function e(e,i,o){t.call(this,o),this.axis=i,this.stickyMode=i instanceof vs;var r=this.options.tooltip;r.visible&&(this.tooltip=new Up(e,this,or({},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?k:S,s=new p.Point(r.x1,r.y1);if(t=o?new p.Point(r.x2,r.y1):new p.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?S:k,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 a.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}(An);sn(Gp,{color:l,width:2,zIndex:-1,tooltip:{visible:!1}});var Hp=Gp,Np=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 a.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=a.Path.fromRect(t);Jo(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}(An);Np.prototype.isStackRoot=!0;var qp=Np,Xp=function(t){function e(e){t.call(this,e),this.id="pane"+Yp++,this.createTitle(),this.content=new An,this.chartContainer=new qp({},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;rr(t)&&(t=or({},t,{align:t.position,position:b})),this.title=Un.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;Jr(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&&Gr(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 gn,o=0;o<e;o++){var r=t[o],n=r.options.vertical?k:S,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 c=a[h];if(!c.options.vertical){var l=c.lineBox();i.x1=l.x1,i.x2=l.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 ia(this),index:this.paneIndex,name:this.options.name})},e}(kn),Yp=1;Xp.prototype.isStackRoot=!0,sn(Xp,{zIndex:-1,shrinkToFit:!0,title:{align:v},visible:!0});var Wp=Xp;function Zp(t,e){null!==e&&t.push(e)}function Jp(t,e,i){var o=e.visible;if(Nr(o))return o;var r=t.pointVisibility;return r?r[i]:void 0}function Kp(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=ha.current.bindPoint(t,n),a=s.valueFields.value;Qo(a)&&(a=parseFloat(a)),$o(a)?(s.visible=!1!==Jp(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 $p(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Qp(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];zr(n.type,o)&&i.push(n)}return i}function th(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=fs(i,Or(t)(e)),e[o]=r),r}function eh(t,e){var i=t.type,o=e instanceof Date;return!i&&o||$p(i,y)}function ih(t){return 1===t.length?t[0]:t}var oh=/area/i;function rh(t,e){var i=ha.current.bindPoint(t,null,e).valueFields;for(var o in i)if(tr(i[o]))return!0}function nh(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,c=o;do{p(c+=r)&&(e=rh(h,(i=a(c)).item))}while(n<=c&&c<=s&&!e);if(e)return i}function sh(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,c,l;if("interpolate"!==function(t){return t.missingValues?t.missingValues:oh.test(t.type)||t.stack?ya:"interpolate"}(t))a&&(h=o(n-1)),p&&(c=o(s+1));else a&&(h=rh(t,(l=o(n-1)).item)?l:nh({start:n,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),p&&(c=rh(t,(l=o(s+1)).item)?l:nh({start:s,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}));h&&(t._outOfRangeMinPoint=h),c&&(t._outOfRangeMaxPoint=c)}}var ah=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){Qo(t.title)&&(t.title={text:t.title}),t.title=or({},e.title,t.title)}for(var n=0;n<o;n++){var s=i[n]||{};r(s,t);var a=new Wp(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 Hp(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 c=p.name,l=h?Tr(o):Tr(n)||Tr(o);l&&(c=l({text:kp(c)?c:"",series:p}));var u=p._defaults,f=p.color;er(f)&&u&&(f=u.color);var d=void 0,y=void 0;h?(d={},y=f):(d={color:n.color,font:n.font},y=r.markers.color),kp(c)&&""!==c&&s.push({text:c,labels:d,markerColor:y,series:p,active:h})}}Gr(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=hr(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[S+a]-r[S+n],s[k+a]-r[k+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),s={},a={},p={},h={},c=0;c<e.length;c++){var l=e[c],f=l.pane,d=f.id,y=!1!==l.options.visible,g=ch(t,f)||i,m=r;g!==i&&(m=this.axisCrossingValues(g,e)),this.alignAxisTo(l,g,n[c],m[c]),l.options._overlap||(tn(l.lineBox().x1)===tn(g.lineBox().x1)&&(s[d]&&l.reflow(l.box.alignTo(s[d].box,v).translate(-l.options.margin,0)),y&&(s[d]=l)),tn(l.lineBox().x2)===tn(g.lineBox().x2)&&(l._mirrored||(l.options.labels.mirror=!l.options.labels.mirror,l._mirrored=!0),this.alignAxisTo(l,g,n[c],m[c]),a[d]&&l.reflow(l.box.alignTo(a[d].box,_).translate(l.options.margin,0)),y&&(a[d]=l)),0!==c&&o.pane===l.pane&&(l.alignTo(o),l.reflow(l.box)))}for(var x=0;x<t.length;x++){var w=t[x],A=w.pane,S=A.id,k=!1!==w.options.visible,C=ch(e,A)||o,T=n;C!==o&&(T=this.axisCrossingValues(C,t)),this.alignAxisTo(w,C,r[x],T[x]),w.options._overlap||(tn(w.lineBox().y1)===tn(C.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,C,r[x],T[x]),p[S]&&w.reflow(w.box.alignTo(p[S].box,b).translate(0,-w.options.margin)),k&&(p[S]=w)),tn(w.lineBox().y2,3)===tn(C.lineBox().y2,3)&&(h[S]&&w.reflow(w.box.alignTo(h[S].box,u).translate(0,w.options.margin)),k&&(h[S]=w)),0!==x&&(w.alignTo(i),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=hh(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,hh(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=hh(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 c=n[h];c.reflow(c.box.translate(0,p))}}}for(var l=0;l<e.length;l++){var u=e[l];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=lh(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&&!zr(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 c=0;c<i;c++){var l=e[c];l.options.height||(l.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(a.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&&Nr(e)||(r=A,o=0);var s=this._bgVisual=new a.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&&Nr(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=ch(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),c="end"===r,l=i.range(),u=c?l.max:l.min;if(Kr(h[e],l.min,l.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}(An);function ph(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function hh(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;if(n||ph(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new gn}function ch(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var lh=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};sn(ah,{series:[],plotArea:{margin:{}},background:"",border:{color:l,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var uh=ah,fh={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function dh(t,e,i){var o=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),Nr(o[r])||(o[r]={}),o=o[r];r=n.shift()}o[r]=i}var yh=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 c=0;c<r.length;c++){var l=r[c],u=void 0;if(rr(h))u=h[l];else{if(0!==c&&!zr(l,n))break;u=h}u&&a.push({canonicalName:l,name:s[c],transform:er(u)?u:sa[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&&!$o(n)&&!C(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<o.length;p++){var h=o[p],c=this._bindField(r.values,h.canonicalName),l=h.transform(c,i,r.dataItems,e);if(!(null===l||!rr(l)||Nr(l.length)||l instanceof Date)){s=l;break}Nr(l)&&dh(h.name,s,l)}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=Nr(s[e])?s[e]:n.fields[e],i.push(a)}return i},e}(O),gh=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}(O);gh.current=new gh;var vh=gh,mh=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=or({},t,t.from),i=or({},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=Tr(t),o=this.pointData();return e=i?i(o):this.formatValue(t.format),new op(e,or({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}(sp);mh.prototype.defaults=or({},mh.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var xh=mh,_h=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 xh},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&&$o(o)&&$o(r)&&((n=this.valueAxisRanges[i]=n||{min:m,max:x}).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}(dp);_h.prototype.plotLimits=Ma.prototype.plotLimits;var bh=_h,wh=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}(za),Ah=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=on(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 wh(o,or({},this.options,{labels:i.from,markers:e.from})),n=this.toPoint=new wh(o,or({},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 a.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=u):(e=r.x2+5,i=n.y,o=f),{point:new dn(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=v,i=_):(o=_,i=v),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}(An);or(Ah.prototype,ja),or(Ah.prototype,Ba),Ah.prototype.defaults={markers:{visible:!1,background:A,size:8,type:d,border:{width:2},opacity:1},labels:{visible:!1,margin:hr(3),padding:hr(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:A,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var Sh=Ah,kh=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 a.Path(t),i=new a.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}(Ja),Ch=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 $s).process(this.toGeometryPoints(t))},e}(kh),Th=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}(kh);or(Th.prototype,Fa);var Ph=Th,Mh=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 Sh},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!kp(s.from)&&!kp(s.to)){if(this.seriesMissingValues(r)!==ya)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;er(r.color)&&(p=a.color);var h=new Sh(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?Ch:"step"===o?Ph:kh)(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 gn(r.x1,t.y1,r.x2,t.y2),o=new gn(n.x1,t.y1,n.x2,t.y2)):(i=new gn(t.x1,r.y1,t.x2,r.y2),o=new gn(t.x1,n.y1,t.x2,n.y2)),{from:i,to:o}},e.prototype.addValue=function(e,i){var o=e.valueFields;$o(o.from)||(o.from=o.to),$o(o.to)||(o.to=o.from),t.prototype.addValue.call(this,e,i)},e.prototype.updateRange=function(t,e){if(null!==t&&$o(t.from)&&$o(t.to)){var i=e.series.axis,o=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:m,max:x},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}(Ma);or(Mh.prototype,Ha,Ya);var Oh=Mh,Rh=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 c=a.center().x;r.push([p.x1,p.y1]),r.push([c,p.y1]),n.push([c,h.y1]),n.push([h.x2,h.y1]),s.push([c,a.y1]),s.push([c,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(gp),jh=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 Rh},e}(xp),Bh=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=a.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Jo(i),this.visual.append(i)},e}(An);sn(Bh,{animation:{type:"fadeIn",delay:600}});var Ih=Bh,zh=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=Ta(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=ha.current.bindPoint(n,p),c=h.valueFields.value,l=h.fields.summary,u=s,f=void 0;l?"total"===l.toLowerCase()?(h.valueFields.value=s,u=0,f=s):(h.valueFields.value=a,f=u-a,a=0):$o(c)&&(a+=c,f=s+=c),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 Ih(s,p,r);i.push(h),this.append(h)}s=p}}},e}(dp),Lh=["area","verticalArea","rangeArea","verticalRangeArea"],Eh=[ma,_a].concat(Lh),Vh=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 ep,t.length>0){this.invertAxes=zr(t[0].type,[ga,"bullet",_a,"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 vs?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(Qp(t,["area","verticalArea"]),e),this.createRangeAreaChart(Qp(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Qp(t,[va,ga]),e),this.createRangeBarChart(Qp(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Qp(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Qp(t,"candlestick"),e),this.createBoxPlotChart(Qp(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Qp(t,"ohlc"),e),this.createWaterfallChart(Qp(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Qp(t,[ma,_a]),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=($p(n.options.type,y)||r.categoryField)&&zr(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),!$o(e.options.min)&&!$o(e.options.max))return t;var o=e.currentRangeIndices(),r=zr(t.type,Eh),n=or({},t);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&sh(n,o,i,(function(i){return{item:t.data[i],category:e.categoryAt(i,!0),categoryIx:i-o.min}}),(function(e){return Nr(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=$p(o.type,y),s=t.data,a=n?th:aa,p=[];n||e.mapCategories();for(var h=0;h<s.length;h++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[h],this.chartService.intl):r[h],Nr(c)&&null!==c){var l=e.totalIndex(c);p[l]=p[l]||{items:[],category:c},p[l].items.push(h)}}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=or({},t),r=new yh(or({},t),ha.current,vh.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 c=p(h);n[c.categoryIx]=c.item,c.items&&c.items.length&&(s[c.categoryIx]=c.item)}return zr(o.type,Eh)&&sh(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,Ta(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=Rr([].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=Dh(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 dp(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 bh(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 Ep(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 Za(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 tp(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 Oh(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 jh(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 xp(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 Ap(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 zh(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=Qp(this.series,ba),o=0;o<this.series.length;o++){var r=this.series[o];if(zr(r.type,Lh)){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 vs&&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(zr(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=or({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?m:0},n),Nr(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=eh(n,a[0])?new Cs(n,this.chartService):new vs(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(!zr(t[e].type,Lh))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(zr(this.findPane(p.pane),t)){var h=p.name,c=$p(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||i||c;0===a&&l&&i&&(l.min=Math.min(l.min,i.min),l.max=Math.max(l.max,i.max));var u=new($p(p.type,"log")?Fs:Bs)(l.min,l.max,or({},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 dn(o.x,o.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,h=0;h<p.length;h++){var c=p[h];c.getValue?Zp(a,c.getValue(r)):Zp(s,c.getCategory(r))}0===s.length&&Zp(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(i,{element:Wr(e),originalEvent:e,category:ih(s),value:ih(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){Fh(this.options,t,e),Fh(this.originalOptions,t,e)},e}(uh);function Fh(t,e,i){or([].concat(e instanceof vs?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}function Dh(t,e,i){return Rr(t,(function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))}sn(Vh,{categoryAxis:{},valueAxis:{}}),or(Vh.prototype,fh);var Uh=Vh;function Gh(){this._defaultPrevented=!0}var Hh=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:Gh,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}(O);function Nh(t,e){var i=(e||"").toLowerCase(),o=t.event;return"none"===i&&!(o.ctrlKey||o.shiftKey||o.altKey)||o[i+"Key"]}function qh(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 Xh=function(t){function e(e,i){t.call(this),this.plotArea=e,this.options=or({},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=Nh(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,S).concat(this._panAxes(t,k));if(e.length)return this.axisRanges=e,qh(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===S&&!p.options.vertical||e===k&&p.options.vertical){var h=p.pan(o);h&&(h.limitRange=!0,n.push({axis:p,range:h}))}}return n},e}(O);Xh.prototype.options={key:"none",lock:"none"};var Yh=Xh,Wh=function(t){function e(e,i){t.call(this),this.chart=e,this.options=or({},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){pr(this._marquee,t)},e.prototype.start=function(t){if(Nh(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=pr(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop,r=Xr(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,qh(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!==S||a)&&(i!==k||!a)&&Nr(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===S&&(s=e.x1,p=e.width()),n===k&&(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}(O);Wh.prototype.options={key:"shift",lock:"none"};var Zh=Wh,Jh=function(t){function e(e,i){t.call(this),this.chart=e,this.options=or({},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!==S||s)&&(e!==k||!s)&&n.zoomRange){var a=n.zoomRange(-t);a&&i.push({axis:n,range:a})}}return this.axisRanges=i,qh(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}(O),Kh=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 a.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 gn),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?En(e):new gn},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(An),$h=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 Bn({vertical:!1,wrap:!1,align:f,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new Tn(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return or({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=or({},t.labels);this.container.append(new Fn(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},i=this._itemOverlay=a.Path.fromRect(this.container.box.toRect(),{fill:{color:A,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:Wr(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}(kn),Qh=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,e),this.chartService=i,zr(this.options.position,[b,_,u,v,"custom"])||(this.options.position=_),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=f;"custom"===e?o=v:zr(e,[b,u])?(o="start"===i?v:"end"===i?_:f,r=e):i&&("start"===i?r=b:"end"===i&&(r=u)),this.container=new kn({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 kn({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 Kh({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 $h(or({},{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||(Nr(e)?"horizontal"!==e:zr(i,[v,_]))},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 gn(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,s=o===b||o===u?S:k,a=this.isVertical(),p=t.clone(),h=t.clone();o!==v&&o!==_||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,k,i.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,S,i.options.align)),i.reflow(h);var c=(h=i.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),i.reflow(h)),c[s+1]=t[s+1],c[s+2]=t[s+2],this.box=c},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 gn(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=or({},{color:l,position:b,align:f},t),i=e.text;if(t&&!1!==t.visible){if(Nr(e)&&e.visible){var o=Tr(e);o?i=o({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))}this.title=new Fn(i,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new Bn({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===u?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(An);sn(Qh,{position:_,items:[],offsetX:0,offsetY:0,margin:hr(5),padding:hr(5),border:{color:l,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:v,vAlign:f}});var tc=Qh,ec=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=Qp(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(o,e,i)},e}(O);ec.current=new ec;var ic=ec;function oc(t){var e=document.createElement("div");return t&&(e.className=t),e}function rc(t){for(var e=t;e&&!jr(e,"k-handle");)e=e.parentNode;return e}var nc=function(t){function e(e,i,o,r){t.call(this);var n=e.element;this.options=or({},this.options,o),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=i,this._dateAxis=this.categoryAxis instanceof Cs,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=oc("k-selector");pr(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=oc("k-selection");this.leftMask=oc("k-mask"),this.rightMask=oc("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(oc("k-selection-bg"));var o=this.leftHandle=oc("k-handle k-left-handle"),r=this.rightHandle=oc("k-handle k-right-handle");o.appendChild(oc()),r.appendChild(oc()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=pr(i,["borderLeftWidth","borderRightWidth","height"]),s=pr(o,"height").height,a=pr(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},pr(o,{top:(n.height-s)/2}),pr(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),Hr(this.wrapper,((t={})[wa]=this._mousewheelHandler,t))),this._domEvents=Ar.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&&or(t,{min:fs(i,t.min),max:fs(i,t.max),from:fs(i,t.from),to:fs(i,t.to)});var o=pr(this.chartElement,["paddingLeft","paddingTop"]),r=o.paddingLeft,n=o.paddingTop;this.options=or({},{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&&(en(this.wrapper,((t={})[wa]=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=Wr(t);if(!this._state&&i){this.chart._unsetActivePoint(),this._state={moveTarget:rc(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:rc(Wr(t)))&&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),c=this._index(i.max),l=e.startLocation-t.x.location,u=r.from,f=r.to,d=r.to-r.from,y=pr(this.wrapper,"width").width/(o.categoriesCount()-1),g=Math.round(l/y)*(s?-1:1);if(n){var v=jr(n,"k-left-handle"),m=jr(n,"k-right-handle");jr(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(h,a-g),c-d),r.to=Math.min(r.from+d,c)):v&&!s||m&&s?(r.from=Math.min(Math.max(h,a-g),c-1),r.to=Math.max(r.from+1,r.to)):(v&&s||m&&!s)&&(r.to=Math.min(Math.max(h+1,p-g),c),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&&M(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 dn(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,c=n+h/2,l={},u=3===t.event.which,f=Math.round(c-r);this._state||u||(this.chart._unsetActivePoint(),i.options.justified||f--,l.from=Math.min(Math.max(a,n-f),p-h),l.to=Math.min(l.from+h,p),this._start(t),this._state&&(this._state.range=l,this.trigger("select",this._rangeEventArgs(l)),this._end()))},e.prototype._mousewheel=function(t){var e=this,i=Dr(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 dn(p))||o.min,n.to=r.pointCategoryIndex(new dn(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),c=this._slot(a),l=tn(c[h]-r.left+n.left);pr(this.leftMask,{width:l}),pr(this.selection,{left:l}),c=this._slot(p);var u=tn(i.width-(c[h]-r.left+n.left));pr(this.rightMask,{width:u});var f=i.width-u;f!==i.width&&(f+=s.right),pr(this.rightMask,{left:f}),pr(this.selection,{width:Math.max(i.width-(l+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=Kr(this._index(t),o,r),s=Kr(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=or({},a);if(this._state&&(a=this._state.range),r!==_&&(a.from=Kr(Kr(n-t,0,s-1),i,o)),r!==v&&(a.to=Kr(Kr(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}(O);sn(nc,{visible:!0,mousewheel:{zoom:"both"},min:x,max:m});var sc=nc,ac=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=or({},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}(Fp),pc=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=Rr(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 dn(r.x,n.y):new dn(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(Fp);sn(pc,{categoryFormat:"{0:d}"});var hc=pc,cc=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?k:S,o=this.fromScale=new p.Point(1,1);o[i]=da,t.transform(p.transform().scale(o.x,o.y))}else this.abort()},e.prototype.step=function(t){var e=Lr(this.fromScale.x,1,t),i=Lr(this.fromScale.y,1,t);this.element.transform(p.transform().scale(e,i,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(a.Animation);sn(cc,{duration:600}),a.AnimationFactory.current.register(ga,cc);var lc=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(p.transform().scale(da,da,t))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.center))},e}(a.Animation);sn(lc,{easing:"easeOutElastic"}),a.AnimationFactory.current.register("bubble",lc);var uc=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}(a.Animation);sn(uc,{duration:200,easing:"linear"}),a.AnimationFactory.current.register("fadeIn",uc);var fc=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(p.transform().scale(da,da,this.options.center))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.options.center))},e}(a.Animation);sn(fc,{easing:"easeOutElastic",duration:600}),a.AnimationFactory.current.register(xa,fc);var dc=fc,yc=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?Ga:Ea)(t,e,i)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===ya){var i={x:t.x,y:t.y};return kp(i.x)||(i.x=0),kp(i.y)||(i.y=0),i}},e}(Tp);or(yc.prototype,Ha);var gc=yc,vc=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 ep,this.yAxisRangeTracker=new ep},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(Qp(n,"scatter"),o),this.createScatterLineChart(Qp(n,"scatterLine"),o),this.createBubbleChart(Qp(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=Rr([].concat(e.xAxis),(function(t){return t.name===i}))[0],r=t.yAxis,n=Rr([].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 Tp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new gc(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new Rp(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=or({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=$p(a.type,"log"),h=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},l=s.query(r)||h||c,u=[a.min,a.max],f=this.series,d=0;d<f.length;d++){var g=f[d],v=g[e?"yAxis":"xAxis"];if(v===a.name||0===i&&!v){var m=ha.current.bindPoint(g,0).valueFields;u.push(m[e?"y":"x"]);break}}0===i&&h&&(l.min=Math.min(l.min,h.min),l.max=Math.max(l.max,h.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){o=!0;break}var _=new($p(a.type,y)||!a.type&&o?zs:p?Fs:Bs)(l.min,l.max,a,this.chartService);if(_.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=_}return this.appendAxis(_),_},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++){zr(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s))}for(var a=0;a<r.length;a++){zr(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 dn(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var c=n[h],l=c.options.vertical?p:a,u=c.getValue(r);null!==u&&l.push(u)}a.length>0&&p.length>0&&t.trigger(i,{element:Wr(e),originalEvent:e,x:ih(a),y:ih(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);mc(this.options,r,i,e),mc(this.originalOptions,r,i,e)},e}(uh);function mc(t,e,i,o){or([].concat(i?t.yAxis:t.xAxis)[e],o)}sn(vc,{xAxis:{},yAxis:{}}),or(vc.prototype,fh);var xc=vc,_c=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=Tr(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===f||"insideEnd"===t.position){if(!t.color){var n=new Ra(this.options.color).percBrightness();t.color=n>180?l:A}t.background||(t.background=this.options.color)}else{var s=e.theme.seriesDefaults.labels;t.color=t.color||s.color,t.background=t.background||s.background}this.label=new Fn(i,or({},t,{align:f,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(),a=e.box.width();if(t.position===f)i.radius=Math.abs((i.radius-s)/2)+s,n=i.point(r),e.reflow(new gn(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 gn(n.x,n.y-s/2,n.x,n.y));else{var p;(n=i.clone().expand(o).point(r)).x>=i.center.x?(p=n.x+a,e.orientation=_):(p=n.x-a,e.orientation=v),e.reflow(new gn(p,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 p.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 a.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,or({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(a),rp(i)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},or({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 a.Circle(new p.Circle(new p.Point(t.center.x,t.center.y),t.radius),e):bn.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,i=this.sector.center;or(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,or({},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 p.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:Ac(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}(An),bc=tn(Qr(30),10),wc=tn(Qr(60),10);function Ac(t){var e=Qr(t),i=tn(Math.sin(e),10),o=tn(Math.cos(e),10);return{horizontal:Math.abs(i)>wc?f:o<0?_:v,vertical:Math.abs(i)<bc?f:i<0?u:b}}sn(_c,{color:A,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:hr(.5),align:d,zIndex:1,position:"outsideEnd"},animation:{type:xa},highlight:{visible:!0,border:{width:1}},visible:!0}),or(_c.prototype,ja);var Sc=_c,kc={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,c=h?Tr(r):Tr(s)||Tr(r),l=i.category;c&&(l=c({text:l,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),kp(l)&&""!==l&&this.legendItems.push({active:h,pointIndex:i.index,text:l,series:i.series,markerColor:p,labels:a})}}},Cc=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 a=r[s],p=a.data,h=Kp(a),c=h.total,l=h.points,u=h.count,d=360/c,y=void 0;isFinite(d)||(y=360/u);var g=void 0;g=Nr(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=f);for(var v=0;v<l.length;v++){var m=l[v];if(m){var x=m.fields,_=m.value,b=m.visible,w=0!==_?y||_*d:0,A=1!==p.length&&Boolean(x.explode);er(a.color)||(a.color=x.color||i[v%o]),t(m.valueFields.value,new mn(null,0,0,g,w),{owner:this,category:Nr(x.category)?x.category:"",index:v,series:a,seriesIx:s,dataItem:p[v],percentage:0!==c?_/c:0,explode:A,visibleInLegend:x.visibleInLegend,visible:b,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==b&&(g+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ca(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=or({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Sc(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 gn(n.x1,n.y1,n.x1+s,n.y1+s),c=h.center(),l=n.center(),u=e.series.length,f=[],d=[],y=on(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,h.translate(l.x-c.x,l.y-c.y);for(var g=a-y,v=new dn(g+h.x1+y,g+h.y1+y),m=0;m<r;m++){var x=i[m],b=x.sector,w=x.seriesIx;if(b.radius=g,b.center=v,o.length){var A=o[w];b.innerRadius=A.innerRadius,b.radius=A.radius}w===u-1&&x.explode&&(b.center=b.clone().setRadius(.15*b.radius).point(b.middle())),x.reflow(h);var S=x.label;S&&"outsideEnd"===S.options.position&&w===u-1&&(S.orientation===_?d.push(S):f.push(S))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),d.length>0&&(d.sort(this.labelComparator(!1)),this.rightLabelsReflow(d)),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=Jr(this.points),i=e.sector,o=t.length-1,r=i.radius+e.options.labels.distance,n=[],s=t[0].box,a=tn(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=tn(h.y1-s.y2),n.push(a)}return a=tn(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=Jr(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var c=e[h],l=c.box;p+=t[h],i=this.hAlignLabel(l.x2,r.clone().expand(a),p,p+l.height(),c.orientation===_),c.orientation===_?(n.align!==d&&(i=r.radius+r.center.x+a),c.reflow(new gn(i+l.width(),p,i,p))):(n.align!==d&&(i=r.center.x-r.radius-a),c.reflow(new gn(i-l.width(),p,i,p))),p+=l.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,p=n.label,h=s.middle(),c=(n.options.connectors||{}).color||e.color;if(p){var l=new a.Path({stroke:{color:c,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===p.options.position){var u=p.box,f=s.center,d=s.point(h),y=new dn(u.x1,u.center().y),g=void 0,v=void 0,m=void 0;d=s.clone().expand(e.padding).point(h),l.moveTo(d.x,d.y),p.orientation===_?(m=Tc(f,d,y,v=new dn(u.x1-e.padding,u.center().y)),y=new dn(v.x-4,v.y),(m=m||y).x=Math.min(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(g=s.center.x+s.radius+4,n.options.labels.align!==va?g<y.x?l.lineTo(g,d.y):l.lineTo(d.x+8,d.y):l.lineTo(g,d.y),l.lineTo(y.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))):(m=Tc(f,d,y,v=new dn(u.x2+e.padding,u.center().y)),y=new dn(v.x+4,v.y),(m=m||y).x=Math.max(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(g=s.center.x-s.radius-4,n.options.labels.align!==va?g>y.x?l.lineTo(g,d.y):l.lineTo(d.x-8,d.y):l.lineTo(g,d.y),l.lineTo(y.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),pn(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(p.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}(An);function Tc(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 dn(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}sn(Cc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),or(Cc.prototype,kc),Cc.prototype.isStackRoot=!0;var Pc=Cc,Mc=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 Pc(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),Gr(this.options.legend.items,e.legendItems)},e}(uh),Oc=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===f){o.radius-=(o.radius-o.innerRadius)/2;var s=o.point(r);i.reflow(new gn(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return bn.current.createRing(t,e)},e}(Sc);sn(Oc,{overlay:{gradient:"roundedGlass"},labels:{position:f},animation:{type:xa}}),or(Oc.prototype,ja);var Rc=Oc,jc=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=or({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible){var r=new Rc(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,c=on(o.padding,a),l=s-(c=c>s-5?s-5:c),u=0,f=0;f<h;f++){var d=p[f];0===f&&Nr(d.holeSize)&&(i=d.holeSize,l-=d.holeSize),Nr(d.size)?l-=d.size:u++,Nr(d.margin)&&f!==h-1&&(l-=d.margin)}Nr(i)||(l-=i=.75*((s-c)/(h+.75)));var y,g=i,v=0;this.seriesConfigs=[];for(var m=0;m<h;m++){var x=p[m];y=(g+=v)+on(x.size,l/u),this.seriesConfigs.push({innerRadius:g,radius:y}),v=x.margin||0,g=y}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},e}(Pc);sn(jc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Bc=jc,Ic=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 Bc(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e}(Mc),zc=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 ep},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=Js,e={min:.1,max:1}):(t=Ws,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=hr(t.padding||{},r),s=o.clone().unpad(n),a=s.clone();a.y2=a.y1+Math.min(a.width(),a.height()),a.align(s,k,f);var p=a.clone().shrink(0,a.height()/2);i.reflow(a),e.reflow(p);var h=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:h})),this.axisBox=a,this.alignAxes(a)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(uh),Lc=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=dn.onCircle(t.center,t.startAngle,i);return new gn(o.x,o.y,o.x,o.y)},e}(Tp);sn(Lc,{clip:!1});var Ec=Lc,Vc=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}(gc);Vc.prototype.pointSlot=Ec.prototype.pointSlot,sn(Vc,{clip:!1});var Fc=Vc,Dc=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 $s(!1),o=this.points();o.push(e),(t=this._strokeSegments=i.process(o)).pop()}return t},e}(Qa),Uc=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 p.Segment([e.x,e.y]);t.segments.unshift(i),t.segments.push(i)},e}(Ja);function Gc(t,e){return t.value.x-e.value.x}var Hc=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 Dc(t,e,i):new Uc(t,e,i)},e.prototype.createMissingValue=function(t,e){var i;return kp(t.x)&&"interpolate"!==e&&(i={x:t.x,y:t.y},e===ya&&(i.y=0)),i},e.prototype.seriesMissingValues=function(t){return t.missingValues||ya},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(Gc),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];if(i)kp(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},e}(Fc),Nc=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 Ns(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return or(t,{majorGridLines:{type:c},minorGridLines:{type:c}},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),uh.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Qp(t,["polarLine"]),e),this.createScatterChart(Qp(t,["polarScatter"]),e),this.createAreaChart(Qp(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new Fc(this,{series:t});this.appendChart(i,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var i=new Ec(this,{series:t});this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Hc(this,{series:t});this.appendChart(i,e)}},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new dn(o.x,o.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Wr(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(zc);sn(Nc,{xAxis:{},yAxis:{}}),or(Nc.prototype,fh);var qc=Nc;var Xc=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=dn.onCircle(t.center,t.middle(),i);return new gn(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=Jr(o),s=Jr(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Jr(o).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?Ga:Ea)(t,e,i),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(o.options.closed=!0),o},e}(Za);sn(Xc,{clip:!1,limitPoints:!1});var Yc=Xc,Wc=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}(Qa),Zc=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}(Ja),Jc=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 Wc(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new Zc(t,e,i,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||ya},e}(Yc),Kc=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}(Rc);sn(Kc,{overlay:{gradient:"none"},labels:{distance:10}});var $c=Kc,Qc=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?pp:ap}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}(An);sn(Qc,{gap:1,spacing:0});var tl=Qc,el=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 gn;for(var s=r;s>=0&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(An),il=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 $c},e.prototype.clusterType=function(){return tl},e.prototype.stackType=function(){return el},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}(dp);il.prototype.reflow=Ma.prototype.reflow,sn(il,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var ol=il,rl=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 Gs(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&&or(t,{majorGridLines:{type:c},minorGridLines:{type:c}}),this._isStacked100&&or(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),or(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Uh.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Uh.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(Qp(t,["radarArea"]),e),this.createLineChart(Qp(t,["radarLine"]),e),this.createBarChart(Qp(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 Jc(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new Yc(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 ol(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 dn(o.x,o.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Wr(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(zc);or(rl.prototype,fh,{appendChart:Uh.prototype.appendChart,aggregateSeries:Uh.prototype.aggregateSeries,seriesSourcePoints:Uh.prototype.seriesSourcePoints}),sn(rl,{categoryAxis:{categories:[]},valueAxis:{}});var nl=rl,sl=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 gn(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new gn(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 a.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 a.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=a.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new dn(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(An);sn(sl,{color:A,border:{width:1}}),or(sl.prototype,ja);var al=sl,pl=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=Kp(i),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var h=p.fields;er(i.color)||(i.color=h.color||e[a%e.length]),h=or({index:a,owner:this,series:i,dataItem:o[a],percentage:p.value/n},h,{visible:p.visible});var c=p.valueFields.value,l=this.createSegment(c,h),u=this.createLabel(c,h);l&&u&&l.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ca(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=or({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){var o=new al(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=or({},this.options.labels,i.labels),n=t;if(r.visible){var s=Tr(r),a={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};if(s?n=s(a):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),!r.color){var p=new Ra(i.color).percBrightness();r.color=p>180?l:A,r.background||(r.background=i.color)}this.evalSegmentOptions(r,t,e);var h=new Fn(n,or({vAlign:r.position},r),a);return this.labels.push(h),h}},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!==f){var r=t[i].box.width();o===v?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,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var c=s.percentage/a.percentage*e,l=(e-c)/2,u=0,f=0;f<n;f++){var d=r[f].percentage,y=r[f+1],g=y?y.percentage:d,v=r[f].points=[],m=o.dynamicHeight?i*d:i/n,x=void 0;x=Kr(x=d?(e-c*(g/d))/2:g?0:e/2,0,e),v.push(new p.Point(t.x1+l,t.y1+u)),v.push(new p.Point(t.x1+e-l,t.y1+u)),v.push(new p.Point(t.x1+e-x,t.y1+m+u)),v.push(new p.Point(t.x1+x,t.y1+m+u)),l=x,u+=m+o.segmentSpacing,c=Kr(e-2*x,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,h=s?0:(e-e/o.neckRatio)/2,c=((s?e:e-2*h)-a)/2,l=0,u=0;u<n;u++){var f=r[u].points=[],d=r[u].percentage,y=o.dynamicHeight?c*d:c/n,g=o.dynamicHeight?i*d:i/n;f.push(new p.Point(t.x1+h,t.y1+l)),f.push(new p.Point(t.x1+e-h,t.y1+l)),f.push(new p.Point(t.x1+e-h-y,t.y1+g+l)),f.push(new p.Point(t.x1+h+y,t.y1+g+l)),h+=y,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}(An);sn(pl,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:f,position:f,zIndex:1}}),or(pl.prototype,kc);var hl=pl,cl=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 hl(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),Gr(this.options.legend.items,e.legendItems)},e}(uh),ll="color",ul="first",fl="max";ic.current.register(Uh,[ga,va,ma,_a,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),ic.current.register(xc,["scatter","scatterLine","bubble"]),ic.current.register(Mc,[xa]),ic.current.register(Ic,["donut"]),ic.current.register(cl,["funnel"]),ic.current.register(qc,["polarArea","polarLine","polarScatter"]),ic.current.register(nl,["radarArea","radarColumn","radarLine"]),ha.current.register([ga,va,ma,_a,"area","verticalArea"],[w],["category",ll,"noteText","errorLow","errorHigh"]),ha.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",ll,"noteText"]),ha.current.register(["waterfall","horizontalWaterfall"],[w],["category",ll,"noteText","summary"]),ha.current.register(["polarArea","polarLine","polarScatter"],[S,k],[ll]),ha.current.register(["radarArea","radarColumn","radarLine"],[w],[ll]),ha.current.register(["funnel"],[w],["category",ll,"visibleInLegend","visible"]),vh.current.register([ga,va,ma,_a,"area","verticalArea","waterfall","horizontalWaterfall"],{value:fl,color:ul,noteText:ul,errorLow:"min",errorHigh:fl}),vh.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:fl,color:ul,noteText:ul}),vh.current.register(["radarArea","radarColumn","radarLine"],{value:fl,color:ul}),ha.current.register(["scatter","scatterLine","bubble"],[S,k],[ll,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),ha.current.register(["bubble"],[S,k,"size"],[ll,"category","noteText"]),ha.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",ll,"downColor","noteText"]),vh.current.register(["candlestick","ohlc"],{open:fl,high:fl,low:"min",close:fl,color:ul,downColor:ul,noteText:ul}),ha.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",ll,"noteText"]),vh.current.register(["boxPlot","verticalBoxPlot"],{lower:fl,q1:fl,median:fl,q3:fl,upper:fl,mean:fl,outliers:ul,color:ul,noteText:ul}),ha.current.register(["bullet","verticalBullet"],["current","target"],["category",ll,"visibleInLegend","noteText"]),vh.current.register(["bullet","verticalBullet"],{current:fl,target:fl,color:ul,noteText:ul}),ha.current.register([xa,"donut"],[w],["category",ll,"explode","visibleInLegend","visible"]);var dl=["category",w,S,k],yl=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 br(this,r),this.chartService.theme=o,this._initElement(e);var s=or({},this.options,i);this._originalOptions=or({},s),this._theme=o,this._initTheme(s,o),this._initHandlers(),this._initSurface(),this.bindCategories(),nn.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(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=dl,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=or({},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&&pn(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 ta(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 ia(e[i])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new ia(e[t])},e.prototype.plotArea=function(){return new oa(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var i,o,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];er(e)?i=n.filterPoints(e):(rr(e)?(o=e.series,r=e.category):o=r=e,i="donut"===s.type?gl(n.pointsBySeriesName(o),r):s.type===xa||"funnel"===s.type?gl((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(er(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&Nr(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&&Yr(e,{width:i.width}),i.height&&Yr(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=a.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 Hh,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),bl(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=or({},t.options,{chartArea:{width:t.width,height:t.height}});_l(this._originalOptions,o),this.options=or({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),bl(r._plotArea.panes),e=r.visual,this.options=i}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof Uh&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Yh(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Zh(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Jh(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 ac(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new hc(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=or({},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<dl.length;a++)i=dl[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=or({},t.seriesDefaults),s=e?or({},e.seriesDefaults):{},a=or({},s);vl(n),vl(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,c=or({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=c,i[p]=or({},c,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 Rn(this._modelOptions());return i.chart=this,i._plotArea=e,Un.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new tc(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return or({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return ic.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 vs&&r.select&&!r.vertical){var n=o.range(),s=new sc(this,o,or({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=po(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,Hr(i,((t={}).contextmenu=this._clickHandler,t[wa]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Hr(i,((e={}).mousemove=this._mousemove,e)),this.domEvents=Ar.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:ml(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:ml(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:ml(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=Dr(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:ml(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=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={},c=0;c<p.length;c++){var l=p[c],u=l.options.name;u&&(h[u]=l.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=ml(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=Zr(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=pr(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=Xr(this.element);return{left:tn(t.x+e.left+i.left),top:tn(t.y+e.top+i.top)}},e.prototype._toModelCoordinates=function(t,e){var i=this.element,o=Xr(i),r=this._elementPadding(),n=un(i).invert(),s=new p.Point(t-o.left-r.left,e-o.top-r.top).transform(n);return new dn(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 uh)})),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){or({},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),Hr(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))or({},i.tooltip,a.options.tooltip).visible&&o.show(a),r.show(a)}}else en(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),c=h.map((function(t){return t.eventArgs(e)})),l=c[0]||{};l.categoryPoints=c,h.length>0&&!this.trigger("seriesHover",l)?(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 Ir,s=[],a=!1,p=0;p<r;p++){var h=o[p],c=h.categoryAxis===t.name||!h.categoryAxis&&0===e,l=h.data,u=l.length,f=h.categoryField&&c;if(a=f||a,f&&u>0)for(var d=(i=eh(t,aa(h.categoryField,l[0])))?th:aa,y=0;y<u;y++){var g=l[y],v=d(h.categoryField,g,this.chartService.intl);!i&&n.get(v)||(s.push([v,g]),i||n.set(v,!0))}}if(s.length>0){i&&(s=function(t,e){void 0===e&&(e=ss);for(var i=function(t,e){void 0===e&&(e=ss);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],Jr(r))&&r.push(i[n]);return r}(s,(function(t,e){return ss(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=ha.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===w?r="field":r+="Field",!Nr(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=zr(n.type,[xa,"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;en(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&Hr(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){_l(this._originalOptions,t),this._originalOptions=or(this._originalOptions,t),this.options=or({},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,en(this.element,((t={}).contextmenu=this._clickHandler,t[wa]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&en(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}(O);function gl(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function vl(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function ml(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var xl=["data","categories"];function _l(t,e){for(var i in e)if(!zr(i,xl)&&e.hasOwnProperty(i)){var o=e[i],r=t[i];if(Nr(r)){var n=null===o;n||!Nr(o)?(delete t[i],n&&delete e[i]):r&&rr(o)&&rr(r)&&_l(r,o)}}}function bl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}sn(yl,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:va,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var wl=yl,Al=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 dn(this.plotArea.box.x2,e.center().y):new dn(e.center().x,-2),align:o}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(hc),Sl=[ga,"bullet"];function kl(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 Cl(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function Tl(t){return $o(t)?[t]:t}var Pl=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(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Yr(e).width)},e.prototype._resize=function(){var e=this.element,i=kl(e.childNodes);this._initialWidth=Math.floor(Yr(e).width),Cl(e.childNodes,i),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=kl(e.childNodes),o=document.createElement("span");o.innerHTML="&nbsp;",e.appendChild(o);var r=or({width:this._autoWidth,height:Yr(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Yr(e,{width:r.width,height:r.height}),e.removeChild(o),Cl(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=hr(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===ga)return 150;if("bullet"===p.type)return 150;if(p.type===xa)return Yr(r).height;var h=a.categoryAxis;if(h){var c=h.categoriesCount()*(!a.options.isStacked&&zr(p.type,[va,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,c)}}}var l=n*e.pointWidth;return l>0&&(l+=i.left+i.right),l},e.prototype._createSharedTooltip=function(t){return new Al(this._plotArea,t)},e.normalizeOptions=function(t){var e=Tl(t);return(e=C(e)?{seriesDefaults:{data:e}}:or({},e)).series||(e.series=[{data:Tl(e.data)}]),or(e,{seriesDefaults:{type:e.type}}),(zr(e.series[0].type,Sl)||zr(e.seriesDefaults.type,Sl))&&(e=or({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(wl);sn(Pl,{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 Ml=Pl,Ol=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(pr(this.element,"opacity").opacity)},e.prototype.step=function(t){pr(this.element,{opacity:String(Lr(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),pr(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),pr(this.element,{opacity:String(this._initialOpacity)})},e}(a.Animation);function Rl(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var jl=function(t){function e(e,i,o){t.call(this),this.options=or({},this.options,o),this.container=e,this.chartService=i;var r=pr(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=Rl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Rl("k-tooltip k-chart-tooltip"),i=this.scroll=Rl("k-scroll");e.innerHTML="&nbsp;",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=es(ps(t)+ps(e-t)/2),p=.4*i.width(),h=i.center().x-p,c=(i.center().x-h)/(r.max-r.min),l=a-r.min,u=this.chartService.intl.format(r.format,t,e),f=Tr(r);this.clearHideTimeout(),this._visible||(pr(o,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(u=f({from:t,to:e})),s.innerHTML=u,pr(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});var d=pr(s,["marginTop","borderTopWidth","height"]);pr(n,{width:p,left:h+l*c,top:i.y1+d.marginTop+d.borderTopWidth+d.height/2}),pr(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 Ol(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}(O);sn(jl,{format:"{0:d} - {1:d}",hideDelay:500});var Bl=jl,Il="_navigator",zl=Il;function Ll(){}var El=function(t){function e(e){var i;t.call(this),this.chart=e;var o=this.options=or({},this.options,e.options.navigator),r=o.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),Nr(o.hint.visible)||(o.hint.visible=o.visible),this.chartObserver=new Vr(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 fs(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,c=a.mousewheel,l=(t=o,Ll.prototype=t,new Ll);0!==o.categoriesCount()&&(this.clean(),l.box=o.box,this.selection=new sc(e,l,{min:n,max:s,from:p||n,to:h||s,mousewheel:on(c,{zoom:"left"}),visible:i.visible},new Vr(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),i.hint.visible&&(this.hint=new Bl(e.element,e.chartService,{min:n,max:s,template:Tr(i.hint),format:i.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[zl].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=or({},o,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Jr(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],c=this.options.select;if(h&&!a&&o){e=c.from&&c.to?ps(c.to)-ps(c.from):ps(o.options.to)-ps(o.options.from);var l=es(Kr(ps(h.min),s.min,ps(s.max)-e)),u=es(Kr(ps(l)+e,ps(s.min)+e,s.max));this.options.select={from:l,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(l,u),this.showHint(l,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!==Il&&(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 Cs(or({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;o.from=os(r.min,-r.baseUnitStep,r.baseUnit),o.to=os(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[zl]},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=or({},i.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=or({},o.pane,{name:Il});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===Qp(i,ba).length,s=or({type:"date",pane:Il,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(or({},s,{maxDateGroups:200},a,{name:zl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),or({},s,a,{name:zl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),or({},s,a,{name:zl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(or({name:zl,pane:Il,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(or({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:zl,categoryAxis:zl,autoBind:e.autoBindElements}))},e}(O),Vl=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=Yr(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=or({},r,n)),El.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){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=Rr([].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 El(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===Il?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===zl?t=o.categories:t&&o.pane===Il&&(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===Il},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(wl);sn(Vl,{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 Fl=Vl,Dl=Math.PI/180;function Ul(t,e){var i=t.getOrigin(),o=t.getSize(),r=hr(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 Gl=a.Group,Hl=a.Path,Nl=a.Text;function ql(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",s=Hl.fromRect(new p.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),a=new Nl(t.text,new p.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),h=Ul(a.bbox().clone(),e.padding),c=Hl.fromRect(h,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),l=new Gl;return l.append(s),l.append(c),l.append(a),l}function Xl(t,e,i){var o=Nr(t.from)?t.from:x,r=Nr(t.to)?t.to:m;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Yl(t,e){var i=hr(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,Ul(t,i)}var Wl=a.Path,Zl=a.Surface,Jl=function(t){function e(e,i,o,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=o,this.contextService=new br(this,r),this._originalOptions=or({},this.options,i),this.options=or({},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(C(t))for(var r=0;r<t.length;r++)$o(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 p.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var i=Yl(e.bbox(),this._gaugeAreaMargin);this.reflow(i)},e.prototype.setOptions=function(t,e){this._originalOptions=or(this._originalOptions,t),this.options=or({},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=or({},e,this.options);var i=this.options,o=i.pointer;if(C(o)){for(var r=[],n=0;n<o.length;n++)r.push(or({},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 p.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,i.width>0&&(o=Yl(o,i.width)),Wl.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();Yr(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Zl.create(i,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&or(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}(O);sn(Jl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Kl=Jl,$l=a.Path,Ql=a.Group,tu=p.Point;function eu(t,e){var i,o,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(i=new tu(n,r),o=new tu(n+e.size,r)):(i=new tu(r,s),o=new tu(r,s+e.size)),new $l({stroke:{color:e.color,width:e.width}}).moveTo(i).lineTo(o)}function iu(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(eu(i,o)))}var ou=function(t){function e(e,i){var o=e||{};!Nr(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=or({},this.options,t);return(e=or({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||fn(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Ql,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 Ql,a=n.length,h=t.rangeSize||t.minorTicks.size/2,c=0;c<a;c++){var l=Xl(n[c],e,i),u=this.getSlot(l.from,l.to),f=o?this.lineBox():u,d=o?u:this.lineBox();o?f.x1-=h*(r?-1:1):d.y2+=h*(r?-1:1),s.append($l.fromRect(new p.Rect([f.x1,d.y1],[f.x2-f.x1,d.y2-d.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 Ql,o=0;o<t.length;o++)i.append(ql(t[o],e.labels));return i},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Ql;if(t.width>0&&t.visible){var o=new $l({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 Ql,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return iu(t,this.getMajorTickPositions(),o,e.majorTicks),iu(t,this.getMinorTickPositions(),o,or({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e}(Bs);sn(ou,{min:0,max:50,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var ru=ou,nu=function(t){function e(e,i){t.call(this);var o=e.options,r=o.min,n=o.max,s=this.options=or({},this.options,i);s.fill=s.color,this.scale=e,Nr(s.value)?s.value=Kr(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=Nr(e._oldValue)?e.value:r,e.value=Kr(t,r,n),this.elements&&this.repaint()},e}(O);sn(nu,{color:l});var su=nu,au=function(t){function e(e,i){t.call(this,e,i),this.options=or({track:{visible:Nr(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,c=o.size/2,l=hr(o.margin),u=a?l[s?"left":"right"]:l[s?"bottom":"top"];u=s?-u:u,a?(i=new gn(p.x1+u,p.y1,p.x1+u,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new gn(p.x2+u,p.y1-c,p.x2+u,p.y2+c))):(i=new gn(p.x1,p.y1-u,p.x2,p.y1-u),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new gn(p.x1-c,p.y1-u,p.x2+c,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:Nr(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=hr(e.margin);return r?n[o?"left":"right"]:n[o?"bottom":"top"]},e}(su);sn(au,{shape:"barPointer",track:{border:{width:1}},color:l,border:{width:1},opacity:1,margin:hr(3),animation:{type:"barPointer"},visible:!0});var pu=au,hu=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 p.Point(i.x1,i.y1),a=this.toScale=new p.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=Lr(this.fromScale.x,this.toScale.x,t),i=Lr(this.fromScale.y,this.toScale.y,t);this.element.transform(p.transform().translate(e,i))},e}(a.Animation);sn(hu,{easing:"linear",duration:250}),a.AnimationFactory.current.register("arrowPointer",hu);var cu=hu,lu=p.Point,uu=a.Path,fu=function(t){function e(e,i){t.call(this,e,i),Nr(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 lu(0,0-i),new lu(0-o*e,0),new lu(0,0+i)]:[new lu(0-i,0),new lu(0,0+o*e),new lu(0+i,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=new cu(this.elements,or(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 uu({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),n=t.getSlot(e.value);return r.transform(p.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(pu),du=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?k:S,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=Lr(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}(a.Animation);sn(du,{easing:"linear",speed:250}),a.AnimationFactory.current.register("barPointer",du);var yu=du,gu=a.Group,vu=a.Path,mu=function(t){function e(e,i){t.call(this,e,i),Nr(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,h=e.getSlot(e.options.min),c=e.getSlot(t),l=n?k:S,u=n?S:k,f=this._margin()*s,d=new p.Point;d[l]=h[l+"1"],d[u]=h[u+"1"];var y=new p.Point;y[l]=c[l+"1"],y[u]=c[u+"1"],n?(d.translate(f,0),y.translate(f,0)):(d.translate(0,f),y.translate(0,f));var g=y.clone(),v=d.clone();return n?(g.translate(a,0),v.translate(a,0)):(g.translate(0,a),v.translate(0,a)),[d,y,g,v]},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 yu(o,or(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 gu,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var i=this.pointerPath=new vu({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 vu.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}(pu),xu=a.Group,_u=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 gn(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 xu,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 ru(t.scale,this.contextService);this.pointers=[];var i=t.pointer;i=C(i)?i:[i];for(var o=0;o<i.length;o++){var r=or({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?fu:mu;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 gn(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new gn(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 gn(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new gn(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}(Kl);sn(_u,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var bu=_u,wu=a.Arc,Au=a.Path,Su=a.Group;function ku(t,e,i,o){var r=new Su,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),c=new p.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new Au({stroke:{color:o.color,width:o.width}}).moveTo(h).lineTo(c))}return r}function Cu(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var Tu=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=or({},this.options,t);return e.majorUnit=e.majorUnit||fn(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(!Nr(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 Su,s=.05*i;Nr(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,h="inside"===a.position,c=Nr(this.labelElements);h&&(i-=this.ticksSize(),this.hasRanges()&&!c&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,u=l.length,f=hr(a.padding),d=(f.left+f.right)/2,y=(f.top+f.bottom)/2,g=0;g<u;g++){var v=l[g],m=v.box.width()/2,x=v.box.height()/2,_=o[g],b=(_-180)*Dl,w=e.pointAt(_),A=w.x+Math.cos(b)*(m+d)*(h?1:-1),S=w.y+Math.sin(b)*(x+y)*(h?1:-1);v.reflow(new gn(A-m,S-x,A+m,S+x));var k=new p.Point(v.box.x1,v.box.y1),C=void 0;if(c){var T=(C=this.labelElements.children[g]).bbox().origin,P=C.transform()||p.transform();P.translate(k.x-T.x,k.y-T.y),C.transform(P)}else C=ql(v,t.labels),n.append(C);this.bbox=p.Rect.union(this.bbox,C.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=p.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Su;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],c=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-c!=0&&i.append(this.createRange(c,l,a,h))}}return i},e.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,n=new p.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new wu(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(Cu(r,n,s));for(var a=0;a<i;a++)for(var p=Xl(e[a],r,n),h=o.length,c=0;c<h;c++){var l=o[c];if(l.from<=p.from&&p.from<=l.to){o.push(Cu(p.from,p.to,p.color,p.opacity)),l.from<=p.to&&p.to<=l.to&&o.push(Cu(p.to,l.to,s,p.opacity)),l.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 p.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=ku(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new Su;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=ku(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=[],c=0;c<s;c++)h.push(tn(a,3)),a+=p;return tn(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]),h=t[s].segments,c=a.x-h[0].anchor().x,l=a.y-h[0].anchor().y;t[s].transform((new p.transform).translate(c,l))}},e}(Bs);sn(Tu,{min:0,max:100,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Pu=Tu,Mu=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=Lr(e.oldAngle,e.newAngle,t);this.element.transform(p.transform().rotate(i,e.center))},e}(a.Animation);sn(Mu,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialPointer",Mu);var Ou=Mu,Ru=a.Circle,ju=a.Group,Bu=a.Path,Iu=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(p.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 Ou(this.elements,or(e.animation,{oldAngle:i,newAngle:o})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=new ju;return!1!==e.animation&&or(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Dl),i},e.prototype.reflow=function(t){var e=this.center=t.center,i=Kr(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=p.Rect.fromPoints(new p.Point(e.x-r,e.y-r),new p.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 Bu({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 p.Circle(this.center,this.capSize);return new Ru(i,{fill:{color:e},stroke:{color:e}})},e}(su);sn(Iu,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var zu=Iu,Lu=a.Group,Eu=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=p.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 Lu;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=tn(p,3),c=tn(-p,3),l=0,u=0;!(!(u++<100)||(l=n===o?l+1:0)>5||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||c!==r&&0<=(o=this.getPlotBox(c,t,s))&&o<=2||(r=e>0&&o>0?2*h:e<0&&o<0?2*c:tn((h+c)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,i>0?(c=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=p.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=p.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Pu(t.scale,this.contextService);this.pointers=[];for(var o=C(e)?e:[e],r=0;r<o.length;r++){var n=new zu(i,or({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Kl);sn(Eu,{transitions:!0,gaugeArea:{background:""}});var Vu=Eu,Fu=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}(Pu);sn(Fu,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Du=Fu,Uu=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=Kr(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new Ra(n),this.color=new Ra(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=Lr(e.oldAngle,e.newAngle,t);if(this.element.angle(r),o){var n=tn(Lr(i.r,o.r,t)),s=tn(Lr(i.g,o.g,t)),a=tn(Lr(i.b,o.b,t));this.element.stroke(new Ra(n,s,a).toHex())}},e}(a.Animation);sn(Uu,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialRangePointer",Uu);var Gu=Uu,Hu=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 Gu(this,or(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&&or(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=$o(s)?s:e;if(r)for(var p=0;p<r.length;p++){var h=r[p],c=h.color,l=h.from;void 0===l&&(l=e);var u=h.to;if(void 0===u&&(u=i),l<=a&&a<=u)return c}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(su);sn(Hu,{animation:{type:"radialRangePointer",duration:150}});var Nu=Hu,qu=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 Du(t.scale,this.contextService),i=new Nu(e,or({},{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}(Vu),Xu="Arial, Helvetica, sans-serif",Yu="12px "+Xu,Wu="16px "+Xu,Zu=function(){return{icon:{border:{width:1}},label:{font:Yu,padding:3},line:{length:10,width:2},visible:!0}},Ju=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:Zu(),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}}},Ku=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Yu},notes:Zu(),title:{font:Wu,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Ju(t),title:{font:Wu},legend:{labels:{font:Yu}}}}}})}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.KendoCharts=e():t.KendoCharts=e()}(window,(function(){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=3)}({3:function(t,e,i){"use strict";i.r(e),i.d(e,"autoMajorUnit",(function(){return fn})),i.d(e,"Point",(function(){return dn})),i.d(e,"Box",(function(){return gn})),i.d(e,"Ring",(function(){return mn})),i.d(e,"Sector",(function(){return xn})),i.d(e,"ShapeBuilder",(function(){return bn})),i.d(e,"ShapeElement",(function(){return Tn})),i.d(e,"ChartElement",(function(){return An})),i.d(e,"BoxElement",(function(){return kn})),i.d(e,"RootElement",(function(){return Rn})),i.d(e,"FloatElement",(function(){return Bn})),i.d(e,"Text",(function(){return Ln})),i.d(e,"TextBox",(function(){return Fn})),i.d(e,"Title",(function(){return Un})),i.d(e,"AxisLabel",(function(){return Hn})),i.d(e,"Axis",(function(){return Zn})),i.d(e,"Note",(function(){return qn})),i.d(e,"CategoryAxis",(function(){return vs})),i.d(e,"DateCategoryAxis",(function(){return Cs})),i.d(e,"DateValueAxis",(function(){return zs})),i.d(e,"NumericAxis",(function(){return Bs})),i.d(e,"LogarithmicAxis",(function(){return Fs})),i.d(e,"PolarAxis",(function(){return Ns})),i.d(e,"RadarCategoryAxis",(function(){return Gs})),i.d(e,"RadarNumericAxis",(function(){return Ws})),i.d(e,"RadarLogarithmicAxis",(function(){return Js})),i.d(e,"CurveProcessor",(function(){return $s})),i.d(e,"Gradients",(function(){return Pn})),i.d(e,"rectToBox",(function(){return En})),i.d(e,"ChartAxis",(function(){return Qs})),i.d(e,"ChartPane",(function(){return ia})),i.d(e,"ChartPlotArea",(function(){return oa})),i.d(e,"findAxisByName",(function(){return ta})),i.d(e,"Aggregates",(function(){return sa})),i.d(e,"AreaChart",(function(){return tp})),i.d(e,"AreaSegment",(function(){return Ja})),i.d(e,"AxisGroupRangeTracker",(function(){return ep})),i.d(e,"Bar",(function(){return sp})),i.d(e,"BarChart",(function(){return dp})),i.d(e,"BarLabel",(function(){return op})),i.d(e,"BoxPlotChart",(function(){return Ap})),i.d(e,"BoxPlot",(function(){return bp})),i.d(e,"BubbleChart",(function(){return Rp})),i.d(e,"Bullet",(function(){return zp})),i.d(e,"BulletChart",(function(){return Ep})),i.d(e,"CandlestickChart",(function(){return xp})),i.d(e,"Candlestick",(function(){return gp})),i.d(e,"CategoricalChart",(function(){return Ma})),i.d(e,"CategoricalErrorBar",(function(){return ka})),i.d(e,"CategoricalPlotArea",(function(){return Uh})),i.d(e,"Chart",(function(){return wl})),i.d(e,"ChartContainer",(function(){return qp})),i.d(e,"ClipAnimation",(function(){return qa})),i.d(e,"ClusterLayout",(function(){return cp})),i.d(e,"Crosshair",(function(){return Hp})),i.d(e,"CrosshairTooltip",(function(){return Up})),i.d(e,"DefaultAggregates",(function(){return vh})),i.d(e,"DonutChart",(function(){return Bc})),i.d(e,"DonutPlotArea",(function(){return Ic})),i.d(e,"DonutSegment",(function(){return Rc})),i.d(e,"ErrorBarBase",(function(){return Sa})),i.d(e,"ErrorRangeCalculator",(function(){return ua})),i.d(e,"Highlight",(function(){return Hh})),i.d(e,"SharedTooltip",(function(){return hc})),i.d(e,"Legend",(function(){return tc})),i.d(e,"LegendItem",(function(){return $h})),i.d(e,"LegendLayout",(function(){return Kh})),i.d(e,"LineChart",(function(){return Za})),i.d(e,"LinePoint",(function(){return za})),i.d(e,"LineSegment",(function(){return Ea})),i.d(e,"Pane",(function(){return Wp})),i.d(e,"PieAnimation",(function(){return dc})),i.d(e,"PieChart",(function(){return Pc})),i.d(e,"PieChartMixin",(function(){return kc})),i.d(e,"PiePlotArea",(function(){return Mc})),i.d(e,"PieSegment",(function(){return Sc})),i.d(e,"PlotAreaBase",(function(){return uh})),i.d(e,"PlotAreaEventsMixin",(function(){return fh})),i.d(e,"PlotAreaFactory",(function(){return ic})),i.d(e,"PointEventsMixin",(function(){return ja})),i.d(e,"RangeBar",(function(){return xh})),i.d(e,"RangeBarChart",(function(){return bh})),i.d(e,"RangeAreaPoint",(function(){return Sh})),i.d(e,"RangeAreaChart",(function(){return Oh})),i.d(e,"ScatterChart",(function(){return Tp})),i.d(e,"ScatterErrorBar",(function(){return Sp})),i.d(e,"ScatterLineChart",(function(){return gc})),i.d(e,"Selection",(function(){return sc})),i.d(e,"SeriesAggregator",(function(){return yh})),i.d(e,"SeriesBinder",(function(){return ha})),i.d(e,"SplineSegment",(function(){return Ga})),i.d(e,"SplineAreaSegment",(function(){return Qa})),i.d(e,"StackWrap",(function(){return up})),i.d(e,"Tooltip",(function(){return ac})),i.d(e,"OHLCChart",(function(){return jh})),i.d(e,"OHLCPoint",(function(){return Rh})),i.d(e,"WaterfallChart",(function(){return zh})),i.d(e,"WaterfallSegment",(function(){return Ih})),i.d(e,"XYPlotArea",(function(){return xc})),i.d(e,"MousewheelZoom",(function(){return Jh})),i.d(e,"ZoomSelection",(function(){return Zh})),i.d(e,"Pannable",(function(){return Yh})),i.d(e,"anyHasZIndex",(function(){return Xa})),i.d(e,"appendIfNotNull",(function(){return Zp})),i.d(e,"areNumbers",(function(){return vp})),i.d(e,"bindSegments",(function(){return Kp})),i.d(e,"categoriesCount",(function(){return Ta})),i.d(e,"countNumbers",(function(){return ra})),i.d(e,"equalsIgnoreCase",(function(){return $p})),i.d(e,"evalOptions",(function(){return Ca})),i.d(e,"filterSeriesByType",(function(){return Qp})),i.d(e,"getDateField",(function(){return th})),i.d(e,"getField",(function(){return aa})),i.d(e,"hasGradientOverlay",(function(){return rp})),i.d(e,"hasValue",(function(){return kp})),i.d(e,"isDateAxis",(function(){return eh})),i.d(e,"segmentVisible",(function(){return Jp})),i.d(e,"singleItemOrArray",(function(){return ih})),i.d(e,"createOutOfRangePoints",(function(){return sh})),i.d(e,"ChartService",(function(){return br})),i.d(e,"DomEventsBuilder",(function(){return Ar})),i.d(e,"FormatService",(function(){return vr})),i.d(e,"IntlService",(function(){return fr})),i.d(e,"TemplateService",(function(){return Cr})),i.d(e,"Sparkline",(function(){return Ml})),i.d(e,"Navigator",(function(){return El})),i.d(e,"NavigatorHint",(function(){return Bl})),i.d(e,"StockChart",(function(){return Fl})),i.d(e,"constants",(function(){return h})),i.d(e,"Gauge",(function(){return Kl})),i.d(e,"LinearGauge",(function(){return bu})),i.d(e,"LinearPointer",(function(){return pu})),i.d(e,"ArrowLinearPointer",(function(){return fu})),i.d(e,"BarLinearPointer",(function(){return mu})),i.d(e,"LinearScale",(function(){return ru})),i.d(e,"RadialGauge",(function(){return Vu})),i.d(e,"RadialPointer",(function(){return zu})),i.d(e,"RadialScale",(function(){return Pu})),i.d(e,"ArcGauge",(function(){return qu})),i.d(e,"RangePointer",(function(){return Nu})),i.d(e,"ArcScale",(function(){return Du})),i.d(e,"addClass",(function(){return T})),i.d(e,"removeClass",(function(){return M})),i.d(e,"alignPathToPixel",(function(){return Jo})),i.d(e,"clockwise",(function(){return Ko})),i.d(e,"convertableToNumber",(function(){return tr})),i.d(e,"deepExtend",(function(){return or})),i.d(e,"elementStyles",(function(){return pr})),i.d(e,"getSpacing",(function(){return hr})),i.d(e,"getTemplate",(function(){return Tr})),i.d(e,"getter",(function(){return Or})),i.d(e,"grep",(function(){return Rr})),i.d(e,"hasClasses",(function(){return jr})),i.d(e,"HashMap",(function(){return Ir})),i.d(e,"inArray",(function(){return zr})),i.d(e,"interpolateValue",(function(){return Lr})),i.d(e,"InstanceObserver",(function(){return Vr})),i.d(e,"isArray",(function(){return C})),i.d(e,"isFunction",(function(){return er})),i.d(e,"isNumber",(function(){return $o})),i.d(e,"isObject",(function(){return rr})),i.d(e,"isString",(function(){return Qo})),i.d(e,"map",(function(){return Fr})),i.d(e,"mousewheelDelta",(function(){return Dr})),i.d(e,"FontLoader",(function(){return nn})),i.d(e,"setDefaultOptions",(function(){return sn})),i.d(e,"sparseArrayLimits",(function(){return an})),i.d(e,"styleValue",(function(){return nr})),i.d(e,"find",(function(){return pn})),i.d(e,"elementScale",(function(){return un})),i.d(e,"append",(function(){return Gr})),i.d(e,"bindEvents",(function(){return Hr})),i.d(e,"Class",(function(){return O})),i.d(e,"defined",(function(){return Nr})),i.d(e,"deg",(function(){return qr})),i.d(e,"elementOffset",(function(){return Xr})),i.d(e,"elementSize",(function(){return Yr})),i.d(e,"eventElement",(function(){return Wr})),i.d(e,"eventCoordinates",(function(){return Zr})),i.d(e,"last",(function(){return Jr})),i.d(e,"limitValue",(function(){return Kr})),i.d(e,"logToConsole",(function(){return fi})),i.d(e,"objectKey",(function(){return $r})),i.d(e,"rad",(function(){return Qr})),i.d(e,"round",(function(){return tn})),i.d(e,"unbindEvents",(function(){return en})),i.d(e,"valueOrDefault",(function(){return on})),i.d(e,"chartBaseTheme",(function(){return Ku}));var o={};i.r(o),i.d(o,"swing",(function(){return Ee})),i.d(o,"linear",(function(){return Ve})),i.d(o,"easeOutElastic",(function(){return Fe}));var r={};i.r(r),i.d(r,"Surface",(function(){return eo})),i.d(r,"RootNode",(function(){return Ii})),i.d(r,"Node",(function(){return Ti})),i.d(r,"GroupNode",(function(){return Gi})),i.d(r,"ArcNode",(function(){return Di})),i.d(r,"CircleNode",(function(){return Ui})),i.d(r,"RectNode",(function(){return Ki})),i.d(r,"ImageNode",(function(){return Zi})),i.d(r,"TextNode",(function(){return to})),i.d(r,"PathNode",(function(){return Fi})),i.d(r,"MultiPathNode",(function(){return Ji})),i.d(r,"DefinitionNode",(function(){return Bi})),i.d(r,"ClipNode",(function(){return ji})),i.d(r,"GradientStopNode",(function(){return Pi})),i.d(r,"LinearGradientNode",(function(){return Oi})),i.d(r,"RadialGradientNode",(function(){return Ri})),i.d(r,"exportGroup",(function(){return Uo}));var n={};i.r(n),i.d(n,"Surface",(function(){return Eo})),i.d(n,"RootNode",(function(){return ho})),i.d(n,"Node",(function(){return so})),i.d(n,"GroupNode",(function(){return ao})),i.d(n,"ArcNode",(function(){return Mo})),i.d(n,"CircleNode",(function(){return Oo})),i.d(n,"RectNode",(function(){return Bo})),i.d(n,"ImageNode",(function(){return Ro})),i.d(n,"TextNode",(function(){return Io})),i.d(n,"PathNode",(function(){return Po})),i.d(n,"MultiPathNode",(function(){return jo}));var s={};i.r(s),i.d(s,"append",(function(){return ce})),i.d(s,"arabicToRoman",(function(){return Ho})),i.d(s,"createPromise",(function(){return io})),i.d(s,"defined",(function(){return j})),i.d(s,"definitionId",(function(){return $})),i.d(s,"deg",(function(){return lt})),i.d(s,"encodeBase64",(function(){return Xo})),i.d(s,"eventCoordinates",(function(){return ai})),i.d(s,"eventElement",(function(){return ri})),i.d(s,"isTransparent",(function(){return tt})),i.d(s,"last",(function(){return Vt})),i.d(s,"limitValue",(function(){return Ue})),i.d(s,"mergeSort",(function(){return Yo})),i.d(s,"now",(function(){return De})),i.d(s,"promiseAll",(function(){return oo})),i.d(s,"rad",(function(){return G})),i.d(s,"round",(function(){return V})),i.d(s,"valueOrDefault",(function(){return Q})),i.d(s,"bindEvents",(function(){return zi})),i.d(s,"elementOffset",(function(){return si})),i.d(s,"elementSize",(function(){return oi})),i.d(s,"elementStyles",(function(){return ei})),i.d(s,"unbindEvents",(function(){return Li})),i.d(s,"elementPadding",(function(){return ni})),i.d(s,"elementScale",(function(){return ci})),i.d(s,"DEG_TO_RAD",(function(){return F})),i.d(s,"MAX_NUM",(function(){return D})),i.d(s,"MIN_NUM",(function(){return U})),i.d(s,"LRUCache",(function(){return Kt})),i.d(s,"TextMetrics",(function(){return ne})),i.d(s,"measureText",(function(){return se})),i.d(s,"objectKey",(function(){return te})),i.d(s,"hashKey",(function(){return ee})),i.d(s,"normalizeText",(function(){return Qt}));var a={};i.r(a),i.d(a,"HasObservers",(function(){return R})),i.d(a,"Element",(function(){return et})),i.d(a,"Circle",(function(){return ct})),i.d(a,"Arc",(function(){return Jt})),i.d(a,"Path",(function(){return Wt})),i.d(a,"MultiPath",(function(){return Zt})),i.d(a,"Text",(function(){return ae})),i.d(a,"Image",(function(){return pe})),i.d(a,"Group",(function(){return le})),i.d(a,"Layout",(function(){return me})),i.d(a,"Rect",(function(){return xe})),i.d(a,"align",(function(){return be})),i.d(a,"vAlign",(function(){return we})),i.d(a,"stack",(function(){return ke})),i.d(a,"vStack",(function(){return Ce})),i.d(a,"wrap",(function(){return Pe})),i.d(a,"vWrap",(function(){return Me})),i.d(a,"fit",(function(){return Oe})),i.d(a,"LinearGradient",(function(){return ze})),i.d(a,"RadialGradient",(function(){return Le})),i.d(a,"GradientStop",(function(){return Be})),i.d(a,"Gradient",(function(){return Ie})),i.d(a,"Animation",(function(){return Ye})),i.d(a,"AnimationFactory",(function(){return Xe})),i.d(a,"PathParser",(function(){return We})),i.d(a,"parsePath",(function(){return qt})),i.d(a,"BaseNode",(function(){return Ze})),i.d(a,"OptionsStore",(function(){return I})),i.d(a,"Surface",(function(){return Do})),i.d(a,"SurfaceFactory",(function(){return Fo})),i.d(a,"exportImage",(function(){return Wo})),i.d(a,"exportSVG",(function(){return Zo})),i.d(a,"QuadNode",(function(){return lo})),i.d(a,"ShapesQuadTree",(function(){return fo})),i.d(a,"svg",(function(){return r})),i.d(a,"canvas",(function(){return n})),i.d(a,"util",(function(){return s}));var p={};i.r(p),i.d(p,"Circle",(function(){return rt})),i.d(p,"Arc",(function(){return vt})),i.d(p,"Rect",(function(){return W})),i.d(p,"Point",(function(){return X})),i.d(p,"Segment",(function(){return Et})),i.d(p,"Matrix",(function(){return N})),i.d(p,"Size",(function(){return Y})),i.d(p,"toMatrix",(function(){return q})),i.d(p,"Transformation",(function(){return Z})),i.d(p,"transform",(function(){return J}));var h={};i.r(h),i.d(h,"NAVIGATOR_AXIS",(function(){return zl})),i.d(h,"NAVIGATOR_PANE",(function(){return Il}));var c="arc",l="#000",u="bottom",f="center",d="circle",y="date",g=/\{\d+:?/,v="left",m=Number.MAX_VALUE,x=-Number.MAX_VALUE,_="right",b="top",w="value",A="#fff",S="x",k="y";function C(t){return Array.isArray(t)}function T(t,e){for(var i=C(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var P=/\s+/g;function M(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(P," "))}var O=function(){},R=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.observers=function(){return this._observers=this._observers||[],this._observers},e.prototype.addObserver=function(t){return this._observers?this._observers.push(t):this._observers=[t],this},e.prototype.removeObserver=function(t){var e=this.observers(),i=e.indexOf(t);return-1!==i&&e.splice(i,1),this},e.prototype.trigger=function(t,e){var i=this._observers;if(i&&!this._suspended)for(var o=0;o<i.length;o++){var r=i[o];r[t]&&r[t](e)}return this},e.prototype.optionsChange=function(t){void 0===t&&(t={}),t.element=this,this.trigger("optionsChange",t)},e.prototype.geometryChange=function(){this.trigger("geometryChange",{element:this})},e.prototype.suspend=function(){return this._suspended=(this._suspended||0)+1,this},e.prototype.resume=function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},e.prototype._observerField=function(t,e){this[t]&&this[t].removeObserver(this),this[t]=e,e.addObserver(this)},e}(O);function j(t){return void 0!==t}var B={}.toString,I=function(t){function e(e,i){for(var o in void 0===i&&(i=""),t.call(this),this.prefix=i,e){var r=e[o];r=this._wrap(r,o),this[o]=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){for(var e=t.split("."),i=this;e.length&&i;){i=i[e.shift()]}return i},e.prototype.set=function(t,e){this.get(t)!==e&&(this._set(t,this._wrap(e,t)),this.optionsChange({field:this.prefix+t,value:e}))},e.prototype._set=function(t,i){var o=t.indexOf(".")>=0,r=this,n=t;if(o){for(var s=n.split("."),a=this.prefix;s.length>1;){a+=(n=s.shift())+".";var p=r[n];p||((p=new e({},a)).addObserver(this),r[n]=p),r=p}n=s[0]}r._clear(n),r[n]=i},e.prototype._clear=function(t){var e=this[t];e&&e.removeObserver&&e.removeObserver(this)},e.prototype._wrap=function(t,i){var o=B.call(t),r=t;return null!==r&&j(r)&&"[object Object]"===o&&(t instanceof e||t instanceof O||(r=new e(r,this.prefix+i+".")),r.addObserver(this)),r},e}(R);function z(t){return function(e){return this[t]!==e&&(this[t]=e,this.geometryChange()),this}}function L(t){return function(){return this[t]}}var E=function(t,e){var 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}(t);return function(t,e){for(var i=0;i<e.length;i++){var o=e[i],r=o.charAt(0).toUpperCase()+o.substring(1,o.length);t["set"+r]=z(o),t["get"+r]=L(o)}}(i.prototype,e),i};function V(t,e){var i,o=(i=e)?Math.pow(10,i):1;return Math.round(t*o)/o}var F=Math.PI/180,D=Number.MAX_VALUE,U=-Number.MAX_VALUE;function G(t){return t*F}var H=function(t){function e(e,i,o,r,n,s){void 0===e&&(e=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),t.call(this),this.a=e,this.b=i,this.c=o,this.d=r,this.e=n,this.f=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.multiplyCopy=function(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)},e.prototype.invert=function(){var t=this.a,i=this.b,o=this.c,r=this.d,n=this.e,s=this.f,a=t*r-i*o;return 0===a?null:new e(r/a,-i/a,-o/a,t/a,(o*s-r*n)/a,(i*n-t*s)/a)},e.prototype.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},e.prototype.equals=function(t){return!!t&&(this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d&&this.e===t.e&&this.f===t.f)},e.prototype.round=function(t){return this.a=V(this.a,t),this.b=V(this.b,t),this.c=V(this.c,t),this.d=V(this.d,t),this.e=V(this.e,t),this.f=V(this.f,t),this},e.prototype.toArray=function(t){var e=[this.a,this.b,this.c,this.d,this.e,this.f];if(j(t))for(var i=0;i<e.length;i++)e[i]=V(e[i],t);return e},e.prototype.toString=function(t,e){return void 0===e&&(e=","),this.toArray(t).join(e)},e.translate=function(t,i){return new e(1,0,0,1,t,i)},e.unit=function(){return new e(1,0,0,1,0,0)},e.rotate=function(t,i,o){var r=new e;return r.a=Math.cos(G(t)),r.b=Math.sin(G(t)),r.c=-r.b,r.d=r.a,r.e=i-i*r.a+o*r.b||0,r.f=o-o*r.a-i*r.b||0,r},e.scale=function(t,i){return new e(t,0,0,i,0,0)},e}(O);H.IDENTITY=H.unit();var N=H;function q(t){return t&&"function"==typeof t.matrix?t.matrix():t}var X=function(t){function e(e,i){t.call(this),this.x=e||0,this.y=i||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.rotate=function(t,i){var o=e.create(i)||e.ZERO;return this.transform(N.rotate(t,o.x,o.y))},e.prototype.translate=function(t,e){return this.x+=t,this.y+=e,this.geometryChange(),this},e.prototype.translateWith=function(t){return this.translate(t.x,t.y)},e.prototype.move=function(t,e){return this.x=this.y=0,this.translate(t,e)},e.prototype.scale=function(t,e){return void 0===e&&(e=t),this.x*=t,this.y*=e,this.geometryChange(),this},e.prototype.scaleCopy=function(t,e){return this.clone().scale(t,e)},e.prototype.transform=function(t){var e=q(t),i=this.x,o=this.y;return this.x=e.a*i+e.c*o+e.e,this.y=e.b*i+e.d*o+e.f,this.geometryChange(),this},e.prototype.transformCopy=function(t){var e=this.clone();return t&&e.transform(t),e},e.prototype.distanceTo=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},e.prototype.round=function(t){return this.x=V(this.x,t),this.y=V(this.y,t),this.geometryChange(),this},e.prototype.toArray=function(t){var e=j(t);return[e?V(this.x,t):this.x,e?V(this.y,t):this.y]},e.prototype.toString=function(t,e){void 0===e&&(e=" ");var i=this.x,o=this.y;return j(t)&&(i=V(i,t),o=V(o,t)),i+e+o},e.create=function(t,i){if(j(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,i)},e.min=function(){for(var t=arguments,i=D,o=D,r=0;r<arguments.length;r++){var n=t[r];i=Math.min(n.x,i),o=Math.min(n.y,o)}return new e(i,o)},e.max=function(){for(var t=arguments,i=U,o=U,r=0;r<arguments.length;r++){var n=t[r];i=Math.max(n.x,i),o=Math.max(n.y,o)}return new e(i,o)},e.minPoint=function(){return new e(U,U)},e.maxPoint=function(){return new e(D,D)},i.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,i),e}(E(R,["x","y"])),Y=function(t){function e(e,i){t.call(this),this.width=e||0,this.height=i||0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={ZERO:{configurable:!0}};return e.prototype.equals=function(t){return t&&t.width===this.width&&t.height===this.height},e.prototype.clone=function(){return new e(this.width,this.height)},e.prototype.toArray=function(t){var e=j(t);return[e?V(this.width,t):this.width,e?V(this.height,t):this.height]},e.create=function(t,i){if(j(t))return t instanceof e?t:1===arguments.length&&2===t.length?new e(t[0],t[1]):new e(t,i)},i.ZERO.get=function(){return new e(0,0)},Object.defineProperties(e,i),e}(E(R,["width","height"])),W=function(t){function e(e,i){void 0===e&&(e=new X),void 0===i&&(i=new Y),t.call(this),this.setOrigin(e),this.setSize(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.origin.clone(),this.size.clone())},e.prototype.equals=function(t){return t&&t.origin.equals(this.origin)&&t.size.equals(this.size)},e.prototype.setOrigin=function(t){return this._observerField("origin",X.create(t)),this.geometryChange(),this},e.prototype.getOrigin=function(){return this.origin},e.prototype.setSize=function(t){return this._observerField("size",Y.create(t)),this.geometryChange(),this},e.prototype.getSize=function(){return this.size},e.prototype.width=function(){return this.size.width},e.prototype.height=function(){return this.size.height},e.prototype.topLeft=function(){return this.origin.clone()},e.prototype.bottomRight=function(){return this.origin.clone().translate(this.width(),this.height())},e.prototype.topRight=function(){return this.origin.clone().translate(this.width(),0)},e.prototype.bottomLeft=function(){return this.origin.clone().translate(0,this.height())},e.prototype.center=function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},e.prototype.bbox=function(t){var i=this.topLeft().transformCopy(t),o=this.topRight().transformCopy(t),r=this.bottomRight().transformCopy(t),n=this.bottomLeft().transformCopy(t);return e.fromPoints(i,o,r,n)},e.prototype.transformCopy=function(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))},e.prototype.expand=function(t,e){return void 0===e&&(e=t),this.size.width+=2*t,this.size.height+=2*e,this.origin.translate(-t,-e),this},e.prototype.expandCopy=function(t,e){return this.clone().expand(t,e)},e.prototype.containsPoint=function(t){var e=this.origin,i=this.bottomRight();return!(t.x<e.x||t.y<e.y||i.x<t.x||i.y<t.y)},e.prototype._isOnPath=function(t,e){var i=this.expandCopy(e,e),o=this.expandCopy(-e,-e);return i.containsPoint(t)&&!o.containsPoint(t)},e.fromPoints=function(){var t=X.min.apply(null,arguments),i=X.max.apply(null,arguments),o=new Y(i.x-t.x,i.y-t.y);return new e(t,o)},e.union=function(t,i){return e.fromPoints(X.min(t.topLeft(),i.topLeft()),X.max(t.bottomRight(),i.bottomRight()))},e.intersect=function(t,i){var o={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},r={left:i.topLeft().x,top:i.topLeft().y,right:i.bottomRight().x,bottom:i.bottomRight().y};if(o.left<=r.right&&r.left<=o.right&&o.top<=r.bottom&&r.top<=o.bottom)return e.fromPoints(new X(Math.max(o.left,r.left),Math.max(o.top,r.top)),new X(Math.min(o.right,r.right),Math.min(o.bottom,r.bottom)))},e}(R),Z=function(t){function e(e){void 0===e&&(e=N.unit()),t.call(this),this._matrix=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this._matrix.clone())},e.prototype.equals=function(t){return t&&t._matrix.equals(this._matrix)},e.prototype.translate=function(t,e){return this._matrix=this._matrix.multiplyCopy(N.translate(t,e)),this._optionsChange(),this},e.prototype.scale=function(t,e,i){void 0===e&&(e=t),void 0===i&&(i=null);var o=i;return o&&(o=X.create(o),this._matrix=this._matrix.multiplyCopy(N.translate(o.x,o.y))),this._matrix=this._matrix.multiplyCopy(N.scale(t,e)),o&&(this._matrix=this._matrix.multiplyCopy(N.translate(-o.x,-o.y))),this._optionsChange(),this},e.prototype.rotate=function(t,e){var i=X.create(e)||X.ZERO;return this._matrix=this._matrix.multiplyCopy(N.rotate(t,i.x,i.y)),this._optionsChange(),this},e.prototype.multiply=function(t){var e=q(t);return this._matrix=this._matrix.multiplyCopy(e),this._optionsChange(),this},e.prototype.matrix=function(t){return t?(this._matrix=t,this._optionsChange(),this):this._matrix},e.prototype._optionsChange=function(){this.optionsChange({field:"transform",value:this})},e}(R);function J(t){return null===t?null:t instanceof Z?t:new Z(t)}var K=1;function $(){return"kdef"+K++}function Q(t,e){return j(t)?t:e}function tt(t){return""===t||null===t||"none"===t||"transparent"===t||!j(t)}var et=function(t){function e(e){t.call(this),this._initOptions(e)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Rect"},e.prototype._initOptions=function(t){void 0===t&&(t={});var e=t.clip,i=t.transform;i&&(t.transform=J(i)),e&&!e.id&&(e.id=$()),this.options=new I(t),this.options.addObserver(this)},e.prototype.transform=function(t){if(!j(t))return this.options.get("transform");this.options.set("transform",J(t))},e.prototype.parentTransform=function(){for(var t,e=this;e.parent;){var i=(e=e.parent).transform();i&&(t=i.matrix().multiplyCopy(t||N.unit()))}if(t)return J(t)},e.prototype.currentTransform=function(t){void 0===t&&(t=this.parentTransform());var e,i=q(this.transform()),o=q(t);if(e=i&&o?o.multiplyCopy(i):i||o)return J(e)},e.prototype.visible=function(t){return j(t)?(this.options.set("visible",t),this):!1!==this.options.get("visible")},e.prototype.clip=function(t){var e=this.options;return j(t)?(t&&!t.id&&(t.id=$()),e.set("clip",t),this):e.get("clip")},e.prototype.opacity=function(t){return j(t)?(this.options.set("opacity",t),this):Q(this.options.get("opacity"),1)},e.prototype.clippedBBox=function(t){var e=this._clippedBBox(t);if(e){var i=this.clip();return i?W.intersect(e,i.bbox(t)):e}},e.prototype.containsPoint=function(t,e){if(this.visible()){var i=this.currentTransform(e),o=t;return i&&(o=t.transformCopy(i.matrix().invert())),this._hasFill()&&this._containsPoint(o)||this._isOnPath&&this._hasStroke()&&this._isOnPath(o)}return!1},e.prototype._hasFill=function(){var t=this.options.fill;return t&&!tt(t.color)},e.prototype._hasStroke=function(){var t=this.options.stroke;return t&&t.width>0&&!tt(t.color)},e.prototype._clippedBBox=function(t){return this.bbox(t)},Object.defineProperties(e.prototype,i),e}(R);function it(t,e,i,o){var r=0,n=0;return o&&(r=Math.atan2(o.c*i,o.a*e),0!==o.b&&(n=Math.atan2(o.d*i,o.b*e))),{x:r,y:n}}var ot=Math.PI/2,rt=function(t){function e(e,i){void 0===e&&(e=new X),void 0===i&&(i=0),t.call(this),this.setCenter(e),this.setRadius(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setCenter=function(t){return this._observerField("center",X.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.equals=function(t){return t&&t.center.equals(this.center)&&t.radius===this.radius},e.prototype.clone=function(){return new e(this.center.clone(),this.radius)},e.prototype.pointAt=function(t){return this._pointAt(G(t))},e.prototype.bbox=function(t){for(var e=it(this.center,this.radius,this.radius,t),i=X.maxPoint(),o=X.minPoint(),r=0;r<4;r++){var n=this._pointAt(e.x+r*ot).transformCopy(t),s=this._pointAt(e.y+r*ot).transformCopy(t),a=new X(n.x,s.y);i=X.min(i,a),o=X.max(o,a)}return W.fromPoints(i,o)},e.prototype._pointAt=function(t){var e=this.center,i=this.radius;return new X(e.x+i*Math.cos(t),e.y+i*Math.sin(t))},e.prototype.containsPoint=function(t){var e=this.center,i=this.radius;return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(i,2)},e.prototype._isOnPath=function(t,e){var i=this.center,o=this.radius,r=i.distanceTo(t);return o-e<=r&&r<=o+e},e}(E(R,["radius"])),nt=function(t){return 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.fill=function(t,e){var i=this.options;if(j(t)){if(t&&"Gradient"!==t.nodeType){var o={color:t};j(e)&&(o.opacity=e),i.set("fill",o)}else i.set("fill",t);return this}return i.get("fill")},e.prototype.stroke=function(t,e,i){return j(t)?(this.options.set("stroke.color",t),j(e)&&this.options.set("stroke.width",e),j(i)&&this.options.set("stroke.opacity",i),this):this.options.get("stroke")},e}(t)},st=N.IDENTITY.toString(),at=function(t){return 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.bbox=function(t){var e,i=q(this.currentTransform(t)),o=i?i.toString():st;this._bboxCache&&this._matrixHash===o?e=this._bboxCache.clone():(e=this._bbox(i),this._bboxCache=e?e.clone():null,this._matrixHash=o);var r=this.options.get("stroke.width");return r&&e&&e.expand(r/2),e},e.prototype.geometryChange=function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})},e}(t)};function pt(t){var e="_"+t;return function(t){return j(t)?(this._observerField(e,t),this.geometryChange(),this):this[e]}}var ht=function(t,e){void 0===e&&(e=["geometry"]);var 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}(t);return function(t,e){for(var i=0;i<e.length;i++)t[e[i]]=pt(e[i])}(i.prototype,e),i},ct=function(t){function e(e,i){void 0===e&&(e=new rt),void 0===i&&(i={}),t.call(this,i),this.geometry(e),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Circle"},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,i),e}(nt(at(ht(et))));function lt(t){return t/F}function ut(t,e,i){return void 0===i&&(i=10),0===V(Math.abs(t-e),i)}function ft(t,e,i){return t<e||ut(t,e,i)}var dt=Math.pow;function yt(t,e,i,o,r,n){var s=V((r-t)/i,3),a=V((n-e)/o,3);return V(lt(Math.atan2(a,s)))}function gt(t,e){for(var i=t;i<e;)i+=90;return i}var vt=function(t){function e(e,i){void 0===e&&(e=new X),void 0===i&&(i={}),t.call(this),this.setCenter(e),this.radiusX=i.radiusX,this.radiusY=i.radiusY||i.radiusX,this.startAngle=i.startAngle,this.endAngle=i.endAngle,this.anticlockwise=i.anticlockwise||!1,this.xRotation=i.xRotation}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,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},e.prototype.setCenter=function(t){return this._observerField("center",X.create(t)),this.geometryChange(),this},e.prototype.getCenter=function(){return this.center},e.prototype.pointAt=function(t){var e=this.center,i=G(t);return new X(e.x+this.radiusX*Math.cos(i),e.y+this.radiusY*Math.sin(i))},e.prototype.curvePoints=function(){var t,e=this.startAngle,i=this.anticlockwise?-1:1,o=[this.pointAt(e)],r=this._arcInterval(),n=r.endAngle-r.startAngle,s=Math.ceil(n/45),a=n/s,p=e;this.xRotation&&(t=J().rotate(this.xRotation,this.center));for(var h=1;h<=s;h++){var c=p+i*a,l=this._intervalCurvePoints(p,c,t);o.push(l.cp1,l.cp2,l.p2),p=c}return o},e.prototype.bbox=function(t){for(var e=this._arcInterval(),i=e.startAngle,o=e.endAngle,r=it(this.center,this.radiusX,this.radiusY,t),n=lt(r.x),s=lt(r.y),a=this.pointAt(o).transformCopy(t),p=gt(n,i),h=gt(s,i),c=this.pointAt(i).transformCopy(t),l=X.min(c,a),u=X.max(c,a);p<o||h<o;){var f=void 0;p<o&&(f=this.pointAt(p).transformCopy(t),p+=90);var d=void 0;h<o&&(d=this.pointAt(h).transformCopy(t),h+=90),c=new X(f.x,d.y),l=X.min(l,c),u=X.max(u,c)}return W.fromPoints(l,u)},e.prototype._arcInterval=function(){var t=this.startAngle,e=this.endAngle,i=this.anticlockwise;if(i){var o=t;t=e,e=o}return(t>e||i&&t===e)&&(e+=360),{startAngle:t,endAngle:e}},e.prototype._intervalCurvePoints=function(t,e,i){var o=this.pointAt(t),r=this.pointAt(e),n=this._derivativeAt(t),s=this._derivativeAt(e),a=(G(e)-G(t))/3,p=new X(o.x+a*n.x,o.y+a*n.y),h=new X(r.x-a*s.x,r.y-a*s.y);return i&&(o.transform(i),r.transform(i),p.transform(i),h.transform(i)),{p1:o,cp1:p,cp2:h,p2:r}},e.prototype._derivativeAt=function(t){var e=G(t);return new X(-this.radiusX*Math.sin(e),this.radiusY*Math.cos(e))},e.prototype.containsPoint=function(t){var e,i=this._arcInterval(),o=i.endAngle-i.startAngle,r=this.center,n=this.radiusX,s=this.radiusY,a=r.distanceTo(t),p=Math.atan2(t.y-r.y,t.x-r.x),h=n*s/Math.sqrt(dt(n,2)*dt(Math.sin(p),2)+dt(s,2)*dt(Math.cos(p),2)),c=this.pointAt(this.startAngle).round(10),l=this.pointAt(this.endAngle).round(10),u=function(t,e,i,o){var r=e.x-t.x,n=o.x-i.x,s=e.y-t.y,a=o.y-i.y,p=t.x-i.x,h=t.y-i.y,c=r*a-n*s,l=(r*h-s*p)/c,u=(n*h-a*p)/c;if(l>=0&&l<=1&&u>=0&&u<=1)return new X(t.x+u*r,t.y+u*s)}(r,t.round(10),c,l);if(o<180)e=u&&ft(r.distanceTo(u),a)&&ft(a,h);else{var f=yt(r.x,r.y,n,s,t.x,t.y);360!==f&&(f=(360+f)%360);var d=i.startAngle<=f&&f<=i.endAngle;e=d&&ft(a,h)||!d&&(!u||u.equals(t))}return e},e.prototype._isOnPath=function(t,e){var i=this._arcInterval(),o=this.center,r=yt(o.x,o.y,this.radiusX,this.radiusY,t.x,t.y);return 360!==r&&(r=(360+r)%360),i.startAngle<=r&&r<=i.endAngle&&this.pointAt(r).distanceTo(t)<=e},e.fromPoints=function(t,i,o,r,n,s,a){var p=function(t){var e=t.x1,i=t.y1,o=t.x2,r=t.y2,n=t.rx,s=t.ry,a=t.largeArc,p=t.swipe,h=t.rotation;void 0===h&&(h=0);var c=G(h),l=Math.cos(c),u=Math.sin(c),f=l*(e-o)/2+u*(i-r)/2,d=-u*(e-o)/2+l*(i-r)/2,y=a!==p?1:-1,g=Math.pow(f,2),v=Math.pow(d,2),m=Math.pow(n,2),x=Math.pow(s,2),_=g/m+v/x;_>1&&(_=Math.sqrt(g/m+v/x),n*=_,m=Math.pow(n,2),s*=_,x=Math.pow(s,2));var b=y*Math.sqrt((m*x-m*v-x*g)/(m*v+x*g));isNaN(b)&&(b=0);var w=b*(n*d)/s,A=s*f*-b/n,S=l*w-u*A+(e+o)/2,k=u*w+l*A+(i+r)/2,C=(f-w)/n,T=(d-A)/s,P=-(f+w)/n,M=-(d+A)/s,O=(T>=0?1:-1)*lt(Math.acos(C/Math.sqrt(C*C+T*T))),R=V((C*P+T*M)/(Math.sqrt(C*C+T*T)*Math.sqrt(P*P+M*M)),10),j=(C*M-T*P>=0?1:-1)*lt(Math.acos(R));!p&&j>0&&(j-=360);p&&j<0&&(j+=360);var B=O+j,I=B>=0?1:-1;return B=Math.abs(B)%360*I,{center:new X(S,k),startAngle:O,endAngle:B,radiusX:n,radiusY:s,xRotation:h}}({x1:t.x,y1:t.y,x2:i.x,y2:i.y,rx:o,ry:r,largeArc:n,swipe:s,rotation:a});return new e(p.center,{startAngle:p.startAngle,endAngle:p.endAngle,radiusX:p.radiusX,radiusY:p.radiusY,xRotation:p.xRotation,anticlockwise:0===s})},e}(E(R,["radiusX","radiusY","startAngle","endAngle","anticlockwise"])),mt=[].push,xt=[].pop,_t=[].splice,bt=[].shift,wt=[].slice,At=[].unshift,St=function(t){function e(e){void 0===e&&(e=[]),t.call(this),this.length=0,this._splice(0,e.length,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.elements=function(t){return t?(this._splice(0,this.length,t),this._change(),this):this.slice(0)},e.prototype.push=function(){var t=arguments,e=mt.apply(this,t);return this._add(t),e},e.prototype.slice=function(){return wt.call(this)},e.prototype.pop=function(){var t=this.length,e=xt.apply(this);return t&&this._remove([e]),e},e.prototype.splice=function(t,e){var i=wt.call(arguments,2),o=this._splice(t,e,i);return this._change(),o},e.prototype.shift=function(){var t=this.length,e=bt.apply(this);return t&&this._remove([e]),e},e.prototype.unshift=function(){var t=arguments,e=At.apply(this,t);return this._add(t),e},e.prototype.indexOf=function(t){for(var e=this.length,i=0;i<e;i++)if(this[i]===t)return i;return-1},e.prototype._splice=function(t,e,i){var o=_t.apply(this,[t,e].concat(i));return this._clearObserver(o),this._setObserver(i),o},e.prototype._add=function(t){this._setObserver(t),this._change()},e.prototype._remove=function(t){this._clearObserver(t),this._change()},e.prototype._setObserver=function(t){for(var e=0;e<t.length;e++)t[e].addObserver(this)},e.prototype._clearObserver=function(t){for(var e=0;e<t.length;e++)t[e].removeObserver(this)},e.prototype._change=function(){},e}(R),kt=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._change=function(){this.geometryChange()},e}(St);function Ct(t,e,i){var o=lt(Math.atan2(e.y-t.y,e.x-t.x));return i.transformCopy(J().rotate(-o,t)).x<t.x}function Tt(t,e,i){var o=1-t;return Math.pow(o,3)*i[0][e]+3*Math.pow(o,2)*t*i[1][e]+3*Math.pow(t,2)*o*i[2][e]+Math.pow(t,3)*i[3][e]}function Pt(t,e){return[-t[0][e]+3*t[1][e]-3*t[2][e]+t[3][e],3*(t[0][e]-2*t[1][e]+t[2][e]),3*(-t[0][e]+t[1][e]),t[0][e]]}var Mt=function(t){function e(e,i){void 0===e&&(e=0),void 0===i&&(i=0),t.call(this),this.real=e,this.img=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.add=function(t){return new e(V(this.real+t.real,10),V(this.img+t.img,10))},e.prototype.addConstant=function(t){return new e(this.real+t,this.img)},e.prototype.negate=function(){return new e(-this.real,-this.img)},e.prototype.multiply=function(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)},e.prototype.multiplyConstant=function(t){return new e(this.real*t,this.img*t)},e.prototype.nthRoot=function(t){var i=Math.atan2(this.img,this.real),o=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),r=Math.pow(o,1/t);return new e(r*Math.cos(i/t),r*Math.sin(i/t))},e.prototype.equals=function(t){return this.real===t.real&&this.img===t.img},e.prototype.isReal=function(){return 0===this.img},e}(O);function Ot(t){return t<0?-1:1}function Rt(t,e,i,o){if(0===t)return function(t,e,i){var o=Math.sqrt(Math.pow(e,2)-4*t*i);return[(-e+o)/(2*t),(-e-o)/(2*t)]}(e,i,o);var r,n,s,a,p,h,c,l=(3*t*i-Math.pow(e,2))/(3*Math.pow(t,2)),u=(2*Math.pow(e,3)-9*t*e*i+27*Math.pow(t,2)*o)/(27*Math.pow(t,3)),f=Math.pow(l/3,3)+Math.pow(u/2,2),d=new Mt(0,1),y=-e/(3*t);f<0?(r=new Mt(-u/2,Math.sqrt(-f)).nthRoot(3),n=new Mt(-u/2,-Math.sqrt(-f)).nthRoot(3)):(r=-u/2+Math.sqrt(f),r=new Mt(Ot(r)*Math.pow(Math.abs(r),1/3)),n=-u/2-Math.sqrt(f),n=new Mt(Ot(n)*Math.pow(Math.abs(n),1/3))),s=r.add(n),h=r.add(n).multiplyConstant(-.5),c=r.add(n.negate()).multiplyConstant(Math.sqrt(3)/2),a=h.add(d.multiply(c)),p=h.add(d.negate().multiply(c));var g=[];return s.isReal()&&g.push(V(s.real+y,10)),a.isReal()&&g.push(V(a.real+y,10)),p.isReal()&&g.push(V(p.real+y,10)),g}function jt(t,e,i,o,r){for(var n,s=Pt(t,o),a=Rt(s[0],s[1],s[2],s[3]-e[o]),p=0;p<a.length;p++)if(0<=a[p]&&a[p]<=1&&(n=Tt(a[p],i,t),Math.abs(n-e[i])<=r))return!0}function Bt(t,e,i){var o;if(t.x!==e.x){var r=Math.min(t.x,e.x),n=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),p=r<=i.x&&i.x<n;o=s===a?i.y<=s&&p:p&&(a-s)*((t.x-e.x)*(t.y-e.y)>0?i.x-r:n-i.x)/(n-r)+s-i.y>=0}return o?1:0}function It(t){var e="_"+t;return function(t){return j(t)?(this._observerField(e,X.create(t)),this.geometryChange(),this):this[e]}}var zt=function(t,e){var 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}(t);return function(t,e){for(var i=0;i<e.length;i++)t[e[i]]=It(e[i])}(i.prototype,e),i};function Lt(t){for(var e=t.length,i=D,o=U,r=0;r<e;r++)o=Math.max(o,t[r]),i=Math.min(i,t[r]);return{min:i,max:o}}var Et=function(t){function e(e,i,o){t.call(this),this.anchor(e||new X),this.controlIn(i),this.controlOut(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bboxTo=function(t,e){var i=this.anchor().transformCopy(e),o=t.anchor().transformCopy(e);return this.controlOut()&&t.controlIn()?this._curveBoundingBox(i,this.controlOut().transformCopy(e),t.controlIn().transformCopy(e),o):this._lineBoundingBox(i,o)},e.prototype._lineBoundingBox=function(t,e){return W.fromPoints(t,e)},e.prototype._curveBoundingBox=function(t,e,i,o){var r=[t,e,i,o],n=this._curveExtremesFor(r,"x"),s=this._curveExtremesFor(r,"y"),a=Lt([n.min,n.max,t.x,o.x]),p=Lt([s.min,s.max,t.y,o.y]);return W.fromPoints(new X(a.min,p.min),new X(a.max,p.max))},e.prototype._curveExtremesFor=function(t,e){var i=this._curveExtremes(t[0][e],t[1][e],t[2][e],t[3][e]);return{min:Tt(i.min,e,t),max:Tt(i.max,e,t)}},e.prototype._curveExtremes=function(t,e,i,o){var r=t-3*e+3*i-o,n=-2*(t-2*e+i),s=t-e,a=Math.sqrt(n*n-4*r*s),p=0,h=1;0===r?0!==n&&(p=h=-s/n):isNaN(a)||(p=(-n+a)/(2*r),h=(-n-a)/(2*r));var c=Math.max(Math.min(p,h),0);(c<0||c>1)&&(c=0);var l=Math.min(Math.max(p,h),1);return(l>1||l<0)&&(l=1),{min:c,max:l}},e.prototype._intersectionsTo=function(t,e){return this.controlOut()&&t.controlIn()?function(t,e,i){for(var o,r=Pt(t,"x"),n=Rt(r[0],r[1],r[2],r[3]-e.x),s=0,a=0;a<n.length;a++)(ut(o=Tt(n[a],"y",t),e.y)||o>e.y)&&((0===n[a]||1===n[a])&&i.bottomRight().x>e.x||0<n[a]&&n[a]<1)&&s++;return s}([this.anchor(),this.controlOut(),t.controlIn(),t.anchor()],e,this.bboxTo(t)):Bt(this.anchor(),t.anchor(),e)},e.prototype._isOnCurveTo=function(t,e,i,o){if(this.bboxTo(t).expand(i,i).containsPoint(e)){var r=this.anchor(),n=this.controlOut(),s=t.controlIn(),a=t.anchor();if("start"===o&&r.distanceTo(e)<=i)return!Ct(r,n,e);if("end"===o&&a.distanceTo(e)<=i)return!Ct(a,s,e);var p=[r,n,s,a];if(jt(p,e,"x","y",i)||jt(p,e,"y","x",i))return!0;var h=J().rotate(45,e),c=[r.transformCopy(h),n.transformCopy(h),s.transformCopy(h),a.transformCopy(h)];return jt(c,e,"x","y",i)||jt(c,e,"y","x",i)}},e.prototype._isOnLineTo=function(t,e,i){var o=this.anchor(),r=t.anchor(),n=lt(Math.atan2(r.y-o.y,r.x-o.x));return new W([o.x,o.y-i/2],[o.distanceTo(r),i]).containsPoint(e.transformCopy(J().rotate(-n,o)))},e.prototype._isOnPathTo=function(t,e,i,o){return this.controlOut()&&t.controlIn()?this._isOnCurveTo(t,e,i/2,o):this._isOnLineTo(t,e,i)},e}(zt(R,["anchor","controlIn","controlOut"]));function Vt(t){if(t)return t[t.length-1]}function Ft(t,e,i){for(var o=e?0:1,r=0;r<t.length;r+=2)t.splice(r+o,0,i)}function Dt(t,e){if(t&&e)return e.scaleCopy(2).translate(-t.x,-t.y)}function Ut(t,e,i){var o=e.clone().scale(2/3);return{controlOut:o.clone().translateWith(t.scaleCopy(1/3)),controlIn:o.translateWith(i.scaleCopy(1/3))}}var Gt={l:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=2){var n=new X(i[r],i[r+1]);e.isRelative&&n.translateWith(o),t.lineTo(n.x,n.y),o.x=n.x,o.y=n.y}},c:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=6){var n=new X(i[r],i[r+1]),s=new X(i[r+2],i[r+3]),a=new X(i[r+4],i[r+5]);e.isRelative&&(s.translateWith(o),n.translateWith(o),a.translateWith(o)),t.curveTo(n,s,a),o.x=a.x,o.y=a.y}},v:function(t,e){var i=e.isRelative?0:e.position.x;Ft(e.parameters,!0,i),this.l(t,e)},h:function(t,e){var i=e.isRelative?0:e.position.y;Ft(e.parameters,!1,i),this.l(t,e)},a:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=7){var n=i[r],s=i[r+1],a=i[r+2],p=i[r+3],h=i[r+4],c=new X(i[r+5],i[r+6]);e.isRelative&&c.translateWith(o),o.x===c.x&&o.y===c.y||(t.arcTo(c,n,s,p,h,a),o.x=c.x,o.y=c.y)}},s:function(t,e){var i,o=e.parameters,r=e.position,n=e.previousCommand;"s"!==n&&"c"!==n||(i=Vt(Vt(t.paths).segments).controlIn());for(var s=0;s<o.length;s+=4){var a=new X(o[s],o[s+1]),p=new X(o[s+2],o[s+3]),h=void 0;e.isRelative&&(a.translateWith(r),p.translateWith(r)),h=i?Dt(i,r):r.clone(),i=a,t.curveTo(h,a,p),r.x=p.x,r.y=p.y}},q:function(t,e){for(var i=e.parameters,o=e.position,r=0;r<i.length;r+=4){var n=new X(i[r],i[r+1]),s=new X(i[r+2],i[r+3]);e.isRelative&&(n.translateWith(o),s.translateWith(o));var a=Ut(o,n,s);t.curveTo(a.controlOut,a.controlIn,s),o.x=s.x,o.y=s.y}},t:function(t,e){var i,o=e.parameters,r=e.position,n=e.previousCommand;"q"!==n&&"t"!==n||(i=Vt(Vt(t.paths).segments).controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(1.5));for(var s=0;s<o.length;s+=2){var a=new X(o[s],o[s+1]);e.isRelative&&a.translateWith(r),i=i?Dt(i,r):r.clone();var p=Ut(r,i,a);t.curveTo(p.controlOut,p.controlIn,a),r.x=a.x,r.y=a.y}}},Ht=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,Nt=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;var qt=function(t,e){var i,o=new X;return e.replace(Ht,(function(e,r,n,s){var a=r.toLowerCase(),p=a===r,h=function(t){var e=[];return t.replace(Nt,(function(t,i){e.push(parseFloat(i))})),e}(n.trim());if("m"===a&&(p?(o.x+=h[0],o.y+=h[1]):(o.x=h[0],o.y=h[1]),t.moveTo(o.x,o.y),h.length>2&&(a="l",h.splice(0,2))),Gt[a])Gt[a](t,{parameters:h,position:o,isRelative:p,previousCommand:i}),s&&"z"===s.toLowerCase()&&t.close();else if("m"!==a)throw new Error("Error while parsing SVG path. Unsupported command: "+a);i=a})),t};function Xt(t,e,i){for(var o,r=0;r<t.length;r++){var n=t[r];if(n.visible()){var s=e?n.bbox(i):n.rawBBox();s&&(o=o?W.union(o,s):s)}}return o}function Yt(t,e){for(var i,o=0;o<t.length;o++){var r=t[o];if(r.visible()){var n=r.clippedBBox(e);n&&(i=i?W.union(i,n):n)}}return i}var Wt=function(t){function e(e){t.call(this,e),this.segments=new kt,this.segments.addObserver(this),j(this.options.stroke)||(this.stroke("#000"),j(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return e.parse=function(t,e){return Zt.parse(t,e)},i.nodeType.get=function(){return"Path"},e.prototype.moveTo=function(t,e){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(t,e),this},e.prototype.lineTo=function(t,e){var i=j(e)?new X(t,e):t,o=new Et(i);return this.segments.push(o),this},e.prototype.curveTo=function(t,e,i){if(this.segments.length>0){var o=Vt(this.segments),r=new Et(i,e);this.suspend(),o.controlOut(t),this.resume(),this.segments.push(r)}return this},e.prototype.arc=function(t,e,i,o,r){if(this.segments.length>0){var n=Vt(this.segments).anchor(),s=G(t),a=new X(n.x-i*Math.cos(s),n.y-o*Math.sin(s)),p=new vt(a,{startAngle:t,endAngle:e,radiusX:i,radiusY:o,anticlockwise:r});this._addArcSegments(p)}return this},e.prototype.arcTo=function(t,e,i,o,r,n){if(this.segments.length>0){var s=Vt(this.segments).anchor(),a=vt.fromPoints(s,t,e,i,o,r,n);this._addArcSegments(a)}return this},e.prototype._addArcSegments=function(t){this.suspend();for(var e=t.curvePoints(),i=1;i<e.length;i+=3)this.curveTo(e[i],e[i+1],e[i+2]);this.resume(),this.geometryChange()},e.prototype.close=function(){return this.options.closed=!0,this.geometryChange(),this},e.prototype.rawBBox=function(){return this._bbox()},e.prototype._containsPoint=function(t){for(var e,i,o=this.segments,r=o.length,n=0,s=1;s<r;s++)e=o[s-1],i=o[s],n+=e._intersectionsTo(i,t);return!this.options.closed&&o[0].anchor().equals(o[r-1].anchor())||(n+=Bt(o[0].anchor(),o[r-1].anchor(),t)),n%2!=0},e.prototype._isOnPath=function(t,e){var i=this.segments,o=i.length,r=e||this.options.stroke.width;if(o>1){if(i[0]._isOnPathTo(i[1],t,r,"start"))return!0;for(var n=2;n<=o-2;n++)if(i[n-1]._isOnPathTo(i[n],t,r))return!0;if(i[o-2]._isOnPathTo(i[o-1],t,r,"end"))return!0}return!1},e.prototype._bbox=function(t){var e,i=this.segments,o=i.length;if(1===o){var r=i[0].anchor().transformCopy(t);e=new W(r,Y.ZERO)}else if(o>0)for(var n=1;n<o;n++){var s=i[n-1].bboxTo(i[n],t);e=e?W.union(e,s):s}return e},e.fromRect=function(t,i){return new e(i).moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close()},e.fromPoints=function(t,i){if(t){for(var o=new e(i),r=0;r<t.length;r++){var n=X.create(t[r]);n&&(0===r?o.moveTo(n):o.lineTo(n))}return o}},e.fromArc=function(t,i){var o=new e(i),r=t.startAngle,n=t.pointAt(r);return o.moveTo(n.x,n.y),o.arc(r,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),o},Object.defineProperties(e.prototype,i),e}(nt(at(et))),Zt=function(t){function e(e){t.call(this,e),this.paths=new kt,this.paths.addObserver(this),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return e.parse=function(t,i){var o=new e(i);return qt(o,t)},i.nodeType.get=function(){return"MultiPath"},e.prototype.moveTo=function(t,e){var i=new Wt;return i.moveTo(t,e),this.paths.push(i),this},e.prototype.lineTo=function(t,e){return this.paths.length>0&&Vt(this.paths).lineTo(t,e),this},e.prototype.curveTo=function(t,e,i){return this.paths.length>0&&Vt(this.paths).curveTo(t,e,i),this},e.prototype.arc=function(t,e,i,o,r){return this.paths.length>0&&Vt(this.paths).arc(t,e,i,o,r),this},e.prototype.arcTo=function(t,e,i,o,r,n){return this.paths.length>0&&Vt(this.paths).arcTo(t,e,i,o,r,n),this},e.prototype.close=function(){return this.paths.length>0&&Vt(this.paths).close(),this},e.prototype._bbox=function(t){return Xt(this.paths,!0,t)},e.prototype.rawBBox=function(){return Xt(this.paths,!1)},e.prototype._containsPoint=function(t){for(var e=this.paths,i=0;i<e.length;i++)if(e[i]._containsPoint(t))return!0;return!1},e.prototype._isOnPath=function(t){for(var e=this.paths,i=this.options.stroke.width,o=0;o<e.length;o++)if(e[o]._isOnPath(t,i))return!0;return!1},e.prototype._clippedBBox=function(t){return Yt(this.paths,this.currentTransform(t))},Object.defineProperties(e.prototype,i),e}(nt(at(et))),Jt=function(t){function e(e,i){void 0===e&&(e=new vt),void 0===i&&(i={}),t.call(this,i),this.geometry(e),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Arc"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this.geometry().bbox()},e.prototype.toPath=function(){var t=new Wt,e=this.geometry().curvePoints();if(e.length>0){t.moveTo(e[0].x,e[0].y);for(var i=1;i<e.length;i+=3)t.curveTo(e[i],e[i+1],e[i+2])}return t},e.prototype._containsPoint=function(t){return this.geometry().containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,i),e}(nt(at(ht(et)))),Kt=function(t){function e(e){t.call(this),this._size=e,this._length=0,this._map={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.put=function(t,e){var i=this._map,o={key:t,value:e};i[t]=o,this._head?(this._tail.newer=o,o.older=this._tail,this._tail=o):this._head=this._tail=o,this._length>=this._size?(i[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},e.prototype.get=function(t){var e=this._map[t];if(e)return e===this._head&&e!==this._tail&&(this._head=e.newer,this._head.older=null),e!==this._tail&&(e.older&&(e.older.newer=e.newer,e.newer.older=e.older),e.older=this._tail,e.newer=null,this._tail.newer=e,this._tail=e),e.value},e}(O),$t=/\r?\n|\r|\t/g;function Qt(t){return String(t).replace($t," ")}function te(t){var e=[];for(var i in t)e.push(i+t[i]);return e.sort().join("")}function ee(t){for(var e=2166136261,i=0;i<t.length;++i)e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24),e^=t.charCodeAt(i);return e>>>0}var ie,oe={baselineMarkerSize:1};"undefined"!=typeof document&&((ie=document.createElement("div")).style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;");var re=function(t){function e(e){t.call(this),this._cache=new Kt(1e3),this.options=Object.assign({},oe,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.measure=function(t,e,i){if(void 0===i&&(i={}),null==t)return{width:0,height:0,baseline:0};var o=ee(t+te(e)),r=this._cache.get(o);if(r)return r;var n={width:0,height:0,baseline:0},s=i.box||ie,a=this._baselineMarker().cloneNode(!1);for(var p in e){var h=e[p];void 0!==h&&(s.style[p]=h)}var c=!1!==i.normalizeText?Qt(t):String(t);return s.textContent=c,s.appendChild(a),document.body.appendChild(s),c.length&&(n.width=s.offsetWidth-this.options.baselineMarkerSize,n.height=s.offsetHeight,n.baseline=a.offsetTop+this.options.baselineMarkerSize),n.width>0&&n.height>0&&this._cache.put(o,n),s.parentNode.removeChild(s),n},e.prototype._baselineMarker=function(){var t=document.createElement("div");return t.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",t},e}(O);re.current=new re;var ne=re;function se(t,e,i){return ne.current.measure(t,e,i)}var ae=function(t){function e(e,i,o){void 0===i&&(i=new X),void 0===o&&(o={}),t.call(this,o),this.content(e),this.position(i),this.options.font||(this.options.font="12px sans-serif"),j(this.options.fill)||this.fill("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Text"},e.prototype.content=function(t){return j(t)?(this.options.set("content",t),this):this.options.get("content")},e.prototype.measure=function(){return se(this.content(),{font:this.options.get("font")})},e.prototype.rect=function(){var t=this.measure(),e=this.position().clone();return new W(e,[t.width,t.height])},e.prototype.bbox=function(t){var e=q(this.currentTransform(t));return this.rect().bbox(e)},e.prototype.rawBBox=function(){return this.rect().bbox()},e.prototype._containsPoint=function(t){return this.rect().containsPoint(t)},Object.defineProperties(e.prototype,i),e}(nt(zt(et,["position"]))),pe=function(t){function e(e,i,o){void 0===i&&(i=new W),void 0===o&&(o={}),t.call(this,o),this.src(e),this.rect(i)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Image"},e.prototype.src=function(t){return j(t)?(this.options.set("src",t),this):this.options.get("src")},e.prototype.bbox=function(t){var e=q(this.currentTransform(t));return this._rect.bbox(e)},e.prototype.rawBBox=function(){return this._rect.bbox()},e.prototype._containsPoint=function(t){return this._rect.containsPoint(t)},e.prototype._hasFill=function(){return this.src()},Object.defineProperties(e.prototype,i),e}(ht(et,["rect"])),he=function(t,e){return function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.traverse=function(t){for(var i=this[e],o=0;o<i.length;o++){var r=i[o];r.traverse?r.traverse(t):t(r)}return this},i}(t)};function ce(t,e){return t.push.apply(t,e),t}var le=function(t){function e(e){t.call(this,e),this.children=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Group"},e.prototype.childrenChange=function(t,e,i){this.trigger("childrenChange",{action:t,items:e,index:i})},e.prototype.append=function(){return ce(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},e.prototype.insert=function(t,e){return this.children.splice(t,0,e),e.parent=this,this.childrenChange("add",[e],t),this},e.prototype.insertAt=function(t,e){return this.insert(e,t)},e.prototype.remove=function(t){var e=this.children.indexOf(t);return e>=0&&(this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)),this},e.prototype.removeAt=function(t){if(0<=t&&t<this.children.length){var e=this.children[t];this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)}return this},e.prototype.clear=function(){var t=this.children;return this.children=[],this._reparent(t,null),this.childrenChange("remove",t,0),this},e.prototype.bbox=function(t){return Xt(this.children,!0,this.currentTransform(t))},e.prototype.rawBBox=function(){return Xt(this.children,!1)},e.prototype._clippedBBox=function(t){return Yt(this.children,this.currentTransform(t))},e.prototype.currentTransform=function(t){return et.prototype.currentTransform.call(this,t)||null},e.prototype.containsPoint=function(t,e){if(this.visible())for(var i=this.children,o=this.currentTransform(e),r=0;r<i.length;r++)if(i[r].containsPoint(t,o))return!0;return!1},e.prototype._reparent=function(t,e){for(var i=0;i<t.length;i++){var o=t[i],r=o.parent;r&&r!==this&&r.remove&&r.remove(o),o.parent=e}},Object.defineProperties(e.prototype,i),e}(he(et,"children"));function ue(t,e,i){var o=i.transform()||J(),r=o.matrix();r.e+=t.x-e.origin.x,r.f+=t.y-e.origin.y,o.matrix(r),i.transform(o)}function fe(t,e,i,o,r){return"start"===i?e.origin[o]:"end"===i?e.origin[o]+e.size[r]-t:e.origin[o]+(e.size[r]-t)/2}function de(t,e,i,o,r){return"start"===i?e.origin[o]+e.size[r]-t:"end"===i?e.origin[o]:e.origin[o]+(e.size[r]-t)/2}var ye={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0,revers:!1},ge=function(t,e){t.forEach(e)},ve=function(t,e){for(var i=t.length-1;i>=0;i--)e(t[i],i)},me=function(t){function e(e,i){t.call(this,Object.assign({},ye,i)),this._rect=e,this._fieldMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.rect=function(t){return t?(this._rect=t,this):this._rect},e.prototype._initMap=function(){var t=this.options,e=this._fieldMap;"horizontal"===t.orientation?(e.sizeField="width",e.groupsSizeField="height",e.groupAxis="x",e.groupsAxis="y"):(e.sizeField="height",e.groupsSizeField="width",e.groupAxis="y",e.groupsAxis="x"),t.reverse?(this.forEach=ve,this.justifyAlign=de):(this.forEach=ge,this.justifyAlign=fe)},e.prototype.reflow=function(){if(this._rect&&0!==this.children.length){this._initMap(),this.options.transform&&this.transform(null);for(var t,e,i,o=this.options,r=this._rect,n=this._initGroups(),s=n.groups,a=n.groupsSize,p=this._fieldMap,h=p.sizeField,c=p.groupsSizeField,l=p.groupAxis,u=p.groupsAxis,f=new X,d=new X,y=new Y,g=fe(a,r,o.alignContent,u,c),v=function(r,n){var s=e.elements[n];d[l]=t,d[u]=fe(r.size[c],i,o.alignItems,u,c),ue(d,r,s),t+=r.size[h]+o.spacing},m=0;m<s.length;m++)e=s[m],f[l]=t=this.justifyAlign(e.size,r,o.justifyContent,l,h),f[u]=g,y[h]=e.size,y[c]=e.lineSize,i=new W(f,y),this.forEach(e.bboxes,v),g+=e.lineSize+o.lineSpacing;if(!o.wrap&&e.size>r.size[h]){var x=r.size[h]/i.size[h],_=i.topLeft().scale(x,x),b=fe(i.size[c]*x,r,o.alignContent,u,c),w=J();"x"===l?w.translate(r.origin.x-_.x,b-_.y):w.translate(b-_.x,r.origin.y-_.y),w.scale(x,x),this.transform(w)}}},e.prototype._initGroups=function(){for(var t=this.options,e=this.children,i=t.lineSpacing,o=t.wrap,r=t.spacing,n=this._fieldMap.sizeField,s=this._newGroup(),a=[],p=function(){a.push(s),h+=s.lineSize+i},h=-i,c=0;c<e.length;c++){var l=e[c],u=e[c].clippedBBox();l.visible()&&u&&(o&&s.size+u.size[n]+r>this._rect.size[n]?0===s.bboxes.length?(this._addToGroup(s,u,l),p(),s=this._newGroup()):(p(),s=this._newGroup(),this._addToGroup(s,u,l)):this._addToGroup(s,u,l))}return s.bboxes.length&&p(),{groups:a,groupsSize:h}},e.prototype._addToGroup=function(t,e,i){t.size+=e.size[this._fieldMap.sizeField]+this.options.spacing,t.lineSize=Math.max(e.size[this._fieldMap.groupsSizeField],t.lineSize),t.bboxes.push(e),t.elements.push(i)},e.prototype._newGroup=function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}},e}(le),xe=function(t){function e(e,i){void 0===e&&(e=new W),void 0===i&&(i={}),t.call(this,i),this.geometry(e),j(this.options.stroke)||this.stroke("#000")}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Rect"},e.prototype._bbox=function(t){return this._geometry.bbox(t)},e.prototype.rawBBox=function(){return this._geometry.bbox()},e.prototype._containsPoint=function(t){return this._geometry.containsPoint(t)},e.prototype._isOnPath=function(t){return this.geometry()._isOnPath(t,this.options.stroke.width/2)},Object.defineProperties(e.prototype,i),e}(nt(at(ht(et))));function _e(t,e,i,o,r){for(var n=0;n<t.length;n++){var s=t[n].clippedBBox();if(s){var a=s.origin.clone();a[o]=fe(s.size[r],e,i||"start",o,r),ue(a,s,t[n])}}}function be(t,e,i){_e(t,e,i,"x","width")}function we(t,e,i){_e(t,e,i,"y","height")}function Ae(t,e,i,o){if(t.length>1)for(var r=new X,n=t[0].bbox,s=1;s<t.length;s++){var a=t[s].element,p=t[s].bbox;r[e]=n.origin[e]+n.size[o],r[i]=p.origin[i],ue(r,p,a),p.origin[e]=r[e],n=p}}function Se(t){for(var e=[],i=0;i<t.length;i++){var o=t[i],r=o.clippedBBox();r&&e.push({element:o,bbox:r})}return e}function ke(t){Ae(Se(t),"x","y","width")}function Ce(t){Ae(Se(t),"y","x","height")}function Te(t,e,i,o,r){for(var n=function(t,e,i){for(var o,r,n=e.size[i],s=[],a=[],p=0,h=function(){a.push({element:o,bbox:r})},c=0;c<t.length;c++)if(o=t[c],r=o.clippedBBox()){var l=r.size[i];p+l>n?a.length?(s.push(a),a=[],h(),p=l):(h(),s.push(a),a=[],p=0):(h(),p+=l)}return a.length&&s.push(a),s}(t,e,r),s=e.origin.clone(),a=[],p=0;p<n.length;p++){var h=n[p],c=h[0];s[o]=c.bbox.origin[o],ue(s,c.bbox,c.element),c.bbox.origin[i]=s[i],Ae(h,i,o,r),a.push([]);for(var l=0;l<h.length;l++)a[p].push(h[l].element)}return a}function Pe(t,e){return Te(t,e,"x","y","width")}function Me(t,e){return Te(t,e,"y","x","height")}function Oe(t,e){var i=t.clippedBBox();if(i){var o=i.size,r=e.size;if(r.width<o.width||r.height<o.height){var n=Math.min(r.width/o.width,r.height/o.height),s=t.transform()||J();s.scale(n,n),t.transform(s)}}}var Re=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._change=function(){this.optionsChange({field:"stops"})},e}(St);function je(t){return function(e){return j(e)?(this.options.set(t,e),this):this.options.get(t)}}var Be=function(t){function e(e,i,o){t.call(this),this.options=new I({offset:e,color:i,opacity:j(o)?o:1}),this.options.addObserver(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t){if(j(t))return t instanceof e?t:t.length>1?new e(t[0],t[1],t[2]):new e(t.offset,t.color,t.opacity)},e}(function(t,e){var 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}(t);return function(t,e){for(var i=0;i<e.length;i++)t[e[i]]=je(e[i])}(i.prototype,e),i}(R,["offset","color","opacity"])),Ie=function(t){function e(e){void 0===e&&(e={}),t.call(this),this.stops=new Re(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=$()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={nodeType:{configurable:!0}};return i.nodeType.get=function(){return"Gradient"},e.prototype.userSpace=function(t){return j(t)?(this._userSpace=t,this.optionsChange(),this):this._userSpace},e.prototype._createStops=function(t){void 0===t&&(t=[]);for(var e=[],i=0;i<t.length;i++)e.push(Be.create(t[i]));return e},e.prototype.addStop=function(t,e,i){this.stops.push(new Be(t,e,i))},e.prototype.removeStop=function(t){var e=this.stops.indexOf(t);e>=0&&this.stops.splice(e,1)},e.prototype.optionsChange=function(t){this.trigger("optionsChange",{field:"gradient"+(t?"."+t.field:""),value:this})},e.prototype.geometryChange=function(){this.optionsChange()},Object.defineProperties(e.prototype,i),e}(R),ze=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.start(e.start||new X),this.end(e.end||new X(1,0))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(zt(Ie,["start","end"])),Le=function(t){function e(e){void 0===e&&(e={}),t.call(this,e),this.center(e.center||new X),this._radius=j(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.radius=function(t){return j(t)?(this._radius=t,this.geometryChange(),this):this._radius},e.prototype.fallbackFill=function(t){return j(t)?(this._fallbackFill=t,this.optionsChange(),this):this._fallbackFill},e}(zt(Ie,["center"]));function Ee(t){return.5-Math.cos(t*Math.PI)/2}function Ve(t){return t}function Fe(t,e,i,o){var r=1.70158,n=0,s=o;return 0===t?i:1===t?i+o:(n||(n=.5),s<Math.abs(o)?(s=o,r=n/4):r=n/(2*Math.PI)*Math.asin(o/s),s*Math.pow(2,-10*t)*Math.sin((Number(t)-r)*(1.1*Math.PI)/n)+o+i)}var De=Date.now||function(){return(new Date).getTime()};function Ue(t,e,i){return Math.max(Math.min(t,i),e)}var Ge,He,Ne=function(t){var e="undefined"!=typeof window?window:{},i=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};(Ne=function(t){return i.call(e,t)})(t)},qe=Ne,Xe=function(t){function e(){t.call(this),this._items=[]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={current:{configurable:!0}};return i.current.get=function(){return Ge||(Ge=new e),Ge},e.prototype.register=function(t,e){this._items.push({name:t,type:e})},e.prototype.create=function(t,e){var i,o=this._items;if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<o.length;n++)if(o[n].name.toLowerCase()===r){i=o[n];break}if(i)return new i.type(t,e)},Object.defineProperties(e,i),e}(O),Ye=function(t){function e(e,i){t.call(this),this.options=Object.assign({},this.options,i),this.element=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={options:{configurable:!0}};return e.create=function(t,e,i){return Xe.current.create(t,e,i)},i.options.get=function(){return this._options||{duration:500,easing:"swing"}},i.options.set=function(t){this._options=t},e.prototype.setup=function(){},e.prototype.step=function(){},e.prototype.play=function(){var t=this,e=this.options,i=e.duration,r=e.delay;void 0===r&&(r=0);var n=o[e.easing],s=De()+r,a=s+i;0===i?(this.step(1),this.abort()):setTimeout((function(){var e=function(){if(!t._stopped){var o=De(),r=Ue(o-s,0,i),p=n(r/i,r,0,1,i);t.step(p),o<a?qe(e):t.abort()}};e()}),r)},e.prototype.abort=function(){this._stopped=!0},e.prototype.destroy=function(){this.abort()},Object.defineProperties(e.prototype,i),e}(O),We=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={current:{configurable:!0}};return i.current.get=function(){return He||(He=new e),He},e.prototype.parse=function(t,e){var i=new Zt(e);return qt(i,t)},Object.defineProperties(e,i),e}(O),Ze=function(t){function e(e){t.call(this),this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.srcElement&&this.srcElement.removeObserver(this);for(var t=this.childNodes,e=0;e<t.length;e++)this.childNodes[e].destroy();this.parent=null},e.prototype.load=function(){},e.prototype.observe=function(){this.srcElement&&this.srcElement.addObserver(this)},e.prototype.append=function(t){this.childNodes.push(t),t.parent=this},e.prototype.insertAt=function(t,e){this.childNodes.splice(e,0,t),t.parent=this},e.prototype.remove=function(t,e){for(var i=t+e,o=t;o<i;o++)this.childNodes[o].removeSelf();this.childNodes.splice(t,e)},e.prototype.removeSelf=function(){this.clear(),this.destroy()},e.prototype.clear=function(){this.remove(0,this.childNodes.length)},e.prototype.invalidate=function(){this.parent&&this.parent.invalidate()},e.prototype.geometryChange=function(){this.invalidate()},e.prototype.optionsChange=function(){this.invalidate()},e.prototype.childrenChange=function(t){"add"===t.action?this.load(t.items,t.index):"remove"===t.action&&this.remove(t.index,t.items.length),this.invalidate()},e}(O),Je=function(t){function e(){t.call(this),this._events={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bind=function(t,e,i){var o=arguments,r=this,n=$e(t),s=Ke(e),a=n.length;if(void 0===e){for(var p in t)r.bind(p,t[p]);return this}for(var h=function(t){var a=n[t],p=s?e:e[a];if(p){if(i){var h=p;(p=function(){r.unbind(a,p),h.apply(r,o)}).original=h}(r._events[a]=r._events[a]||[]).push(p)}},c=0;c<a;c++)h(c);return this},e.prototype.one=function(t,e){return this.bind(t,e,!0)},e.prototype.first=function(t,e){for(var i=$e(t),o=Ke(e),r=0,n=i.length;r<n;r++){var s=i[r],a=o?e:e[s];if(a)(this._events[s]=this._events[s]||[]).unshift(a)}return this},e.prototype.trigger=function(t,e){void 0===e&&(e={});var i=this._events[t];if(i){var o=i.length;e.sender=this,e._defaultPrevented=!1,e.preventDefault=Qe,e.isDefaultPrevented=ti,i=i.slice();for(var r=0;r<o;r++)i[r].call(this,e);return!0===e._defaultPrevented}return!1},e.prototype.unbind=function(t,e){var i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(var o=i.length-1;o>=0;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},e}(O);function Ke(t){return"function"==typeof t}function $e(t){return"string"==typeof t?[t]:t}function Qe(){this._defaultPrevented=!0}function ti(){return!0===this._defaultPrevented}function ei(t,e){for(var i={},o=window.getComputedStyle(t)||{},r=Array.isArray(e)?e:[e],n=0;n<r.length;n++){var s=r[n];i[s]=o[s]}return i}function ii(t){return isNaN(t)?t:t+"px"}function oi(t,e){if(!e){var i=ei(t,["width","height"]);return{width:parseInt(i.width,10),height:parseInt(i.height,10)}}var o=e.width,r=e.height;j(o)&&(t.style.width=ii(o)),j(r)&&(t.style.height=ii(r))}function ri(t){return void 0===t&&(t={}),t.touch?t.touch.initialTouch:t.target}function ni(t){var e=ei(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop;return{top:parseFloat(o),left:parseFloat(i)}}function si(t){var e=t.getBoundingClientRect(),i=document.documentElement;return{top:e.top+(window.pageYOffset||i.scrollTop)-(i.clientTop||0),left:e.left+(window.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}}function ai(t){return j((t.x||{}).location)?{x:t.x.location,y:t.y.location}:{x:t.pageX||t.clientX||0,y:t.pageY||t.clientY||0}}var pi=/matrix\((.*)\)/;function hi(t){var e=getComputedStyle(t).transform;return"none"===e?N.unit():function(t){var e=t.match(pi);if(null===e||2!==e.length)return N.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(N,[null].concat(i)))}(e)}function ci(t){if(!t)return N.unit();for(var e=hi(t),i=t.parentElement;i;){var o=hi(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}var li=["click","mouseenter","mouseleave","mousemove","resize"],ui=function(t){function e(e,i){t.call(this),this.options=Object.assign({},i),this.element=e,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new le,oi(e,this.options),this.bind(li,this.options),this._enableTracking()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.draw=function(t){this._visual.children.push(t)},e.prototype.clear=function(){this._visual.children=[]},e.prototype.destroy=function(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()},e.prototype.eventTarget=function(t){for(var e,i=ri(t);!e&&i&&(e=i._kendoNode,i!==this.element);)i=i.parentElement;if(e)return e.srcElement},e.prototype.exportVisual=function(){return this._visual},e.prototype.getSize=function(){return oi(this.element)},e.prototype.currentSize=function(t){if(!t)return this._size;this._size=t},e.prototype.setSize=function(t){oi(this.element,t),this.currentSize(t),this._resize()},e.prototype.resize=function(t){var e=this.getSize(),i=this.currentSize();(t||(e.width>0||e.height>0)&&(!i||e.width!==i.width||e.height!==i.height))&&(this.currentSize(e),this._resize(e,t),this.trigger("resize",e))},e.prototype.size=function(t){if(!t)return this.getSize();this.setSize(t)},e.prototype.suspendTracking=function(){this._suspendedTracking=!0},e.prototype.resumeTracking=function(){this._suspendedTracking=!1},e.prototype._enableTracking=function(){},e.prototype._resize=function(){},e.prototype._handler=function(t){var e=this;return function(i){var o=e.eventTarget(i);o&&!e._suspendedTracking&&e.trigger(t,{element:o,originalEvent:i,type:t})}},e.prototype._elementOffset=function(){var t=this.element,e=ni(t),i=si(t),o=i.left,r=i.top;return{left:o+e.left,top:r+e.top}},e.prototype._surfacePoint=function(t){var e=this._elementOffset(),i=ai(t),o=i.x-e.left,r=i.y-e.top,n=ci(this.element).invert();return new X(o,r).transform(n)},e}(Je);function fi(t){var e=window.console;void 0!==e&&e.log&&e.log(t)}function di(t,e){return j(e)&&null!==e?" "+t+'="'+e+'" ':""}function yi(t){for(var e="",i=0;i<t.length;i++)e+=di(t[i][0],t[i][1]);return e}function gi(t){for(var e="",i=0;i<t.length;i++){var o=t[i][1];j(o)&&(e+=t[i][0]+":"+o+";")}if(""!==e)return e}var vi={},mi="http://www.w3.org/2000/svg",xi=function(t,e){t.innerHTML=e};if("undefined"!=typeof document){var _i=document.createElement("div"),bi="undefined"!=typeof DOMParser;_i.innerHTML="<svg xmlns='http://www.w3.org/2000/svg'></svg>",bi&&_i.firstChild.namespaceURI!==mi&&(xi=function(t,e){var i=(new DOMParser).parseFromString(e,"text/xml"),o=document.adoptNode(i.documentElement);t.innerHTML="",t.appendChild(o)})}var wi=xi;var Ai={},Si={get browser(){return"undefined"==typeof window||Ai?Ai:Ai=function(t){var e,i={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var o in i)if(i.hasOwnProperty(o)){var r=t.match(i[o]);if(r){(e={})[o]=!0,e[r[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,e.version=parseInt(document.documentMode||r[2],10);break}}return e}(window.navigator.userAgent)}},ki={clip:"clip-path",fill:"fill"};function Ci(t,e){return"clip"===t||"fill"===t&&(!e||"Gradient"===e.nodeType)}var Ti=function(t){function e(e,i){t.call(this,e),this.definitions={},this.options=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),t.prototype.destroy.call(this)},e.prototype.load=function(t,e){for(var i=0;i<t.length;i++){var o=t[i],r=o.children,n=new vi[o.nodeType](o,this.options);j(e)?this.insertAt(n,e):this.append(n),n.createDefinitions(),r&&r.length>0&&n.load(r);var s=this.element;s&&n.attachTo(s,e)}},e.prototype.root=function(){for(var t=this;t.parent;)t=t.parent;return t},e.prototype.attachTo=function(t,e){var i=document.createElement("div");wi(i,"<svg xmlns='"+mi+"' version='1.1'>"+this.render()+"</svg>");var o=i.firstChild.firstChild;o&&(j(e)?t.insertBefore(o,t.childNodes[e]||null):t.appendChild(o),this.setElement(o))},e.prototype.setElement=function(t){this.element&&(this.element._kendoNode=null),this.element=t,this.element._kendoNode=this;for(var e=this.childNodes,i=0;i<e.length;i++){var o=t.childNodes[i];e[i].setElement(o)}},e.prototype.clear=function(){this.clearDefinitions(),this.element&&(this.element.innerHTML="");for(var t=this.childNodes,e=0;e<t.length;e++)t[e].destroy();this.childNodes=[]},e.prototype.removeSelf=function(){if(this.element){var e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}t.prototype.removeSelf.call(this)},e.prototype.template=function(){return this.renderChildren()},e.prototype.render=function(){return this.template()},e.prototype.renderChildren=function(){for(var t=this.childNodes,e="",i=0;i<t.length;i++)e+=t[i].render();return e},e.prototype.optionsChange=function(e){var i=e.field,o=e.value;"visible"===i?this.css("display",o?"":"none"):ki[i]&&Ci(i,o)?this.updateDefinition(i,o):"opacity"===i?this.attr("opacity",o):"cursor"===i?this.css("cursor",o):"id"===i&&(o?this.attr("id",o):this.removeAttr("id")),t.prototype.optionsChange.call(this,e)},e.prototype.attr=function(t,e){this.element&&this.element.setAttribute(t,e)},e.prototype.allAttr=function(t){for(var e=0;e<t.length;e++)this.attr(t[e][0],t[e][1])},e.prototype.css=function(t,e){this.element&&(this.element.style[t]=e)},e.prototype.allCss=function(t){for(var e=0;e<t.length;e++)this.css(t[e][0],t[e][1])},e.prototype.removeAttr=function(t){this.element&&this.element.removeAttribute(t)},e.prototype.mapTransform=function(t){var e=[];return t&&e.push(["transform","matrix("+t.matrix().toString(6)+")"]),e},e.prototype.renderTransform=function(){return yi(this.mapTransform(this.srcElement.transform()))},e.prototype.transformChange=function(t){t?this.allAttr(this.mapTransform(t)):this.removeAttr("transform")},e.prototype.mapStyle=function(){var t=this.srcElement.options,e=[["cursor",t.cursor]];return!1===t.visible&&e.push(["display","none"]),e},e.prototype.renderStyle=function(){return di("style",gi(this.mapStyle(!0)))},e.prototype.renderOpacity=function(){return di("opacity",this.srcElement.options.opacity)},e.prototype.renderId=function(){return di("id",this.srcElement.options.id)},e.prototype.createDefinitions=function(){var t=this.srcElement,e=this.definitions;if(t){var i,o=t.options;for(var r in ki){var n=o.get(r);n&&Ci(r,n)&&(e[r]=n,i=!0)}i&&this.definitionChange({action:"add",definitions:e})}},e.prototype.definitionChange=function(t){this.parent&&this.parent.definitionChange(t)},e.prototype.updateDefinition=function(t,e){var i=this.definitions,o=i[t],r=ki[t],n={};o&&(n[t]=o,this.definitionChange({action:"remove",definitions:n}),delete i[t]),e?(n[t]=e,this.definitionChange({action:"add",definitions:n}),i[t]=e,this.attr(r,this.refUrl(e.id))):o&&this.removeAttr(r)},e.prototype.clearDefinitions=function(){var t=this.definitions;this.definitionChange({action:"remove",definitions:t}),this.definitions={}},e.prototype.renderDefinitions=function(){return yi(this.mapDefinitions())},e.prototype.mapDefinitions=function(){var t=this.definitions,e=[];for(var i in t)e.push([ki[i],this.refUrl(t[i].id)]);return e},e.prototype.refUrl=function(t){var e=(this.options||{}).skipBaseHref,i=this.baseUrl().replace(/'/g,"\\'");return"url("+(e?"":i)+"#"+t+")"},e.prototype.baseUrl=function(){return function(){var t=document.getElementsByTagName("base")[0],e=document.location.href,i="";if(t&&!(Si.browser||{}).msie){var o=e.indexOf("#");-1!==o&&(e=e.substring(0,o)),i=e}return i}()},e}(Ze),Pi=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.template=function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},e.prototype.renderOffset=function(){return di("offset",this.srcElement.offset())},e.prototype.mapStyle=function(){var t=this.srcElement;return[["stop-color",t.color()],["stop-opacity",t.opacity()]]},e.prototype.optionsChange=function(t){"offset"===t.field?this.attr(t.field,t.value):"color"!==t.field&&"opacity"!==t.field||this.css("stop-"+t.field,t.value)},e}(Ti),Mi=function(t){function e(e){t.call(this,e),this.id=e.id,this.loadStops()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.loadStops=function(){for(var t=this.srcElement.stops,e=this.element,i=0;i<t.length;i++){var o=new Pi(t[i]);this.append(o),e&&o.attachTo(e)}},e.prototype.optionsChange=function(t){"gradient.stops"===t.field?(Ze.prototype.clear.call(this),this.loadStops()):"gradient"===t.field&&this.allAttr(this.mapCoordinates())},e.prototype.renderCoordinates=function(){return yi(this.mapCoordinates())},e.prototype.mapSpace=function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]},e}(Ti),Oi=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.template=function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.start(),i=t.end();return[["x1",e.x],["y1",e.y],["x2",i.x],["y2",i.y],this.mapSpace()]},e}(Mi),Ri=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.template=function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},e.prototype.mapCoordinates=function(){var t=this.srcElement,e=t.center(),i=t.radius();return[["cx",e.x],["cy",e.y],["r",i],this.mapSpace()]},e}(Mi),ji=function(t){function e(e){t.call(this),this.srcElement=e,this.id=e.id,this.load([e])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.template=function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"},e}(Ti),Bi=function(t){function e(){t.call(this),this.definitionMap={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t},e.prototype.template=function(){return"<defs>"+this.renderChildren()+"</defs>"},e.prototype.definitionChange=function(t){var e=t.definitions,i=t.action;"add"===i?this.addDefinitions(e):"remove"===i&&this.removeDefinitions(e)},e.prototype.createDefinition=function(t,e){var i;return"clip"===t?i=ji:"fill"===t&&(e instanceof ze?i=Oi:e instanceof Le&&(i=Ri)),new i(e)},e.prototype.addDefinitions=function(t){for(var e in t)this.addDefinition(e,t[e])},e.prototype.addDefinition=function(t,e){var i=this.element,o=this.definitionMap,r=e.id,n=o[r];if(n)n.count++;else{var s=this.createDefinition(t,e);o[r]={element:s,count:1},this.append(s),i&&s.attachTo(this.element)}},e.prototype.removeDefinitions=function(t){for(var e in t)this.removeDefinition(t[e])},e.prototype.removeDefinition=function(t){var e=this.definitionMap,i=t.id,o=e[i];o&&(o.count--,0===o.count&&(this.remove(this.childNodes.indexOf(o.element),1),delete e[i]))},e}(Ti),Ii=function(t){function e(e){t.call(this),this.options=e,this.defs=new Bi}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.attachTo=function(t){this.element=t,this.defs.attachTo(t.firstElementChild)},e.prototype.clear=function(){Ze.prototype.clear.call(this)},e.prototype.template=function(){return this.defs.render()+this.renderChildren()},e.prototype.definitionChange=function(t){this.defs.definitionChange(t)},e}(Ti);function zi(t,e){for(var i in e)for(var o=i.trim().split(" "),r=0;r<o.length;r++)t.addEventListener(o[r],e[i],!1)}function Li(t,e){for(var i in void 0===e&&(e={}),e)for(var o=i.trim().split(" "),r=0;r<o.length;r++)t.removeEventListener(o[r],e[i],!1)}var Ei={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Vi={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Fi=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.geometryChange=function(){this.attr("d",this.renderData()),this.invalidate()},e.prototype.optionsChange=function(e){switch(e.field){case"fill":e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:e.value}));break;case"stroke":e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(e.value);break;default:var i=Vi[e.field];i&&this.attr(i,e.value)}t.prototype.optionsChange.call(this,e)},e.prototype.content=function(){this.element&&(this.element.textContent=this.srcElement.content())},e.prototype.renderData=function(){return this.printPath(this.srcElement)},e.prototype.printPath=function(t){var e=t.segments,i=e.length;if(i>0){for(var o,r,n=[],s=1;s<i;s++){var a=this.segmentType(e[s-1],e[s]);a!==r&&(r=a,n.push(a)),"L"===a?n.push(this.printPoints(e[s].anchor())):n.push(this.printPoints(e[s-1].controlOut(),e[s].controlIn(),e[s].anchor()))}return o="M"+this.printPoints(e[0].anchor())+" "+n.join(" "),t.options.closed&&(o+="Z"),o}},e.prototype.printPoints=function(){for(var t=arguments,e=t.length,i=[],o=0;o<e;o++)i.push(t[o].toString(3));return i.join(" ")},e.prototype.segmentType=function(t,e){return t.controlOut()&&e.controlIn()?"C":"L"},e.prototype.mapStroke=function(t){var e=[];return t&&!tt(t.color)?(e.push(["stroke",t.color]),e.push(["stroke-width",t.width]),e.push(["stroke-linecap",this.renderLinecap(t)]),e.push(["stroke-linejoin",t.lineJoin]),j(t.opacity)&&e.push(["stroke-opacity",t.opacity]),j(t.dashType)&&e.push(["stroke-dasharray",this.renderDashType(t)])):e.push(["stroke","none"]),e},e.prototype.renderStroke=function(){return yi(this.mapStroke(this.srcElement.options.stroke))},e.prototype.renderDashType=function(t){var e=t.dashType,i=t.width;if(void 0===i&&(i=1),e&&"solid"!==e){for(var o=Ei[e.toLowerCase()],r=[],n=0;n<o.length;n++)r.push(o[n]*i);return r.join(" ")}},e.prototype.renderLinecap=function(t){var e=t.dashType,i=t.lineCap;return e&&"solid"!==e?"butt":i},e.prototype.mapFill=function(t){var e=[];return t&&"Gradient"===t.nodeType||(t&&!tt(t.color)?(e.push(["fill",t.color]),j(t.opacity)&&e.push(["fill-opacity",t.opacity])):e.push(["fill","none"])),e},e.prototype.renderFill=function(){return yi(this.mapFill(this.srcElement.options.fill))},e.prototype.template=function(){return"<path "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" "+di("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"},e}(Ti),Di=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.renderData=function(){return this.printPath(this.srcElement.toPath())},e}(Fi),Ui=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.geometryChange=function(){var t=this.center();this.attr("cx",t.x),this.attr("cy",t.y),this.attr("r",this.radius()),this.invalidate()},e.prototype.center=function(){return this.srcElement.geometry().center},e.prototype.radius=function(){return this.srcElement.geometry().radius},e.prototype.template=function(){return"<circle "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"},e}(Fi),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.template=function(){return"<g"+(this.renderId()+this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},e.prototype.optionsChange=function(e){"transform"===e.field&&this.transformChange(e.value),t.prototype.optionsChange.call(this,e)},e}(Ti),Hi=/&/g,Ni=/</g,qi=/"/g,Xi=/'/g,Yi=/>/g;function Wi(t){return String(t).replace(Hi,"&amp;").replace(Ni,"&lt;").replace(Yi,"&gt;").replace(qi,"&quot;").replace(Xi,"&#39;")}var Zi=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.geometryChange=function(){this.allAttr(this.mapPosition()),this.invalidate()},e.prototype.optionsChange=function(e){"src"===e.field&&this.allAttr(this.mapSource()),t.prototype.optionsChange.call(this,e)},e.prototype.mapPosition=function(){var t=this.srcElement.rect(),e=t.topLeft();return[["x",e.x],["y",e.y],["width",t.width()+"px"],["height",t.height()+"px"]]},e.prototype.renderPosition=function(){return yi(this.mapPosition())},e.prototype.mapSource=function(t){var e=this.srcElement.src();return t&&(e=Wi(e)),[["xlink:href",e]]},e.prototype.renderSource=function(){return yi(this.mapSource(!0))},e.prototype.template=function(){return"<image preserveAspectRatio='none' "+this.renderId()+" "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"},e}(Fi),Ji=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.renderData=function(){var t=this.srcElement.paths;if(t.length>0){for(var e=[],i=0;i<t.length;i++)e.push(this.printPath(t[i]));return e.join(" ")}},e}(Fi),Ki=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.geometryChange=function(){var t=this.srcElement.geometry();this.attr("x",t.origin.x),this.attr("y",t.origin.y),this.attr("width",t.size.width),this.attr("height",t.size.height),this.invalidate()},e.prototype.size=function(){return this.srcElement.geometry().size},e.prototype.origin=function(){return this.srcElement.geometry().origin},e.prototype.template=function(){return"<rect "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"},e}(Fi),$i=/&(?:[a-zA-Z]+|#\d+);/g;function Qi(t){if(!t||"string"!=typeof t||!$i.test(t))return t;var e=Qi._element;return $i.lastIndex=0,t.replace($i,(function(t){return e.innerHTML=t,e.textContent||e.innerText}))}"undefined"!=typeof document&&(Qi._element=document.createElement("span"));var to=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.geometryChange=function(){var t=this.pos();this.attr("x",t.x),this.attr("y",t.y),this.invalidate()},e.prototype.optionsChange=function(e){"font"===e.field?(this.attr("style",gi(this.mapStyle())),this.geometryChange()):"content"===e.field&&t.prototype.content.call(this,this.srcElement.content()),t.prototype.optionsChange.call(this,e)},e.prototype.mapStyle=function(e){var i=t.prototype.mapStyle.call(this,e),o=this.srcElement.options.font;return e&&(o=Wi(o)),i.push(["font",o],["white-space","pre"]),i},e.prototype.pos=function(){var t=this.srcElement.position(),e=this.srcElement.measure();return t.clone().setY(t.y+e.baseline)},e.prototype.renderContent=function(){var t=this.srcElement.content();return Qt(t=Wi(t=Qi(t)))},e.prototype.renderTextAnchor=function(){var t;return!(this.options||{}).rtl||Si.browser.msie||Si.browser.edge||(t="end"),di("text-anchor",t)},e.prototype.template=function(){return"<text "+this.renderId()+" "+this.renderTextAnchor()+" "+this.renderStyle()+" "+this.renderOpacity()+"x='"+this.pos().x+"' y='"+this.pos().y+"' "+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"},e}(Fi);vi.Arc=Di,vi.Circle=Ui,vi.Group=Gi,vi.Image=Zi,vi.MultiPath=Ji,vi.Path=Fi,vi.Rect=Ki,vi.Text=to;var eo=function(t){function e(e,i){t.call(this,e,i),this._root=new Ii(Object.assign({rtl:"rtl"===ei(e,"direction").direction},this.options)),wi(this.element,this._template()),this._rootElement=this.element.firstElementChild,function(t){var e;try{e=t.getScreenCTM?t.getScreenCTM():null}catch(t){}if(e){var i=-e.e%1,o=-e.f%1,r=t.style;0===i&&0===o||(r.left=i+"px",r.top=o+"px")}}(this._rootElement),this._root.attachTo(this._rootElement),zi(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}};return i.type.get=function(){return"svg"},e.prototype.destroy=function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,Li(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),t.prototype.destroy.call(this)},e.prototype.translate=function(t){var e=Math.round(t.x)+" "+Math.round(t.y)+" "+this._size.width+" "+this._size.height;this._offset=t,this._rootElement.setAttribute("viewBox",e)},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear()},e.prototype.svg=function(){return"<?xml version='1.0' ?>"+this._template()},e.prototype.exportVisual=function(){var t=this._visual,e=this._offset;if(e){var i=new le;i.children.push(t),i.transform(J().translate(-e.x,-e.y)),t=i}return t},e.prototype._resize=function(){this._offset&&this.translate(this._offset)},e.prototype._template=function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+mi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"},Object.defineProperties(e.prototype,i),e}(ui);function io(){var t,e,i=new Promise((function(o,r){t=function(t){return i._state="resolved",o(t),i},e=function(t){return i._state="rejected",r(t),i}}));return i._state="pending",i.resolve=t,i.reject=e,i.state=function(){return i._state},i}function oo(t){return Promise.all(t)}var ro={};function no(t,e){var i=e.segments;if(0!==i.length){var o=i[0],r=o.anchor();t.moveTo(r.x,r.y);for(var n=1;n<i.length;n++){r=(o=i[n]).anchor();var s=i[n-1].controlOut(),a=o.controlIn();s&&a?t.bezierCurveTo(s.x,s.y,a.x,a.y,r.x,r.y):t.lineTo(r.x,r.y)}e.options.closed&&t.closePath()}}var so=function(t){function e(e){t.call(this,e),e&&this.initClip()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initClip=function(){var t=this.srcElement.clip();t&&(this.clip=t,t.addObserver(this))},e.prototype.clear=function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),t.prototype.clear.call(this)},e.prototype.clearClip=function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},e.prototype.setClip=function(t){this.clip&&(t.beginPath(),no(t,this.clip),t.clip())},e.prototype.optionsChange=function(e){"clip"===e.field&&(this.clearClip(),this.initClip()),t.prototype.optionsChange.call(this,e)},e.prototype.setTransform=function(t){if(this.srcElement){var e=this.srcElement.transform();e&&t.transform.apply(t,e.matrix().toArray(6))}},e.prototype.loadElements=function(t,e,i){for(var o=0;o<t.length;o++){var r=t[o],n=r.children,s=new ro[r.nodeType](r,i);n&&n.length>0&&s.load(n,e,i),j(e)?this.insertAt(s,e):this.append(s)}},e.prototype.load=function(t,e,i){this.loadElements(t,e,i),this.invalidate()},e.prototype.setOpacity=function(t){if(this.srcElement){var e=this.srcElement.opacity();j(e)&&this.globalAlpha(t,e)}},e.prototype.globalAlpha=function(t,e){var i=e;i&&t.globalAlpha&&(i*=t.globalAlpha),t.globalAlpha=i},e.prototype.visible=function(){var t=this.srcElement;return!t||t&&!1!==t.options.visible},e}(Ze),ao=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.renderTo=function(t){if(this.visible()){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t);for(var e=this.childNodes,i=0;i<e.length;i++){var o=e[i];o.visible()&&o.renderTo(t)}t.restore()}},e}(he(so,"childNodes"));function po(t,e){var i,o=0;if(!e||e<=0)return t;var r=function(){var r=De()-o,n=arguments,s=function(){t.apply(null,n),o=De()};if(!o)return s();i&&clearTimeout(i),r>e?s():i=setTimeout(s,e-r)};return r.cancel=function(){clearTimeout(i)},r}var ho=function(t){function e(e,i){t.call(this),this.canvas=e,this.size=i,this.ctx=e.getContext("2d");var o=this._invalidate.bind(this);this.invalidate=po((function(){qe(o)}),1e3/60)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.destroy=function(){t.prototype.destroy.call(this),this.canvas=null,this.ctx=null},e.prototype.load=function(t,e,i){this.loadElements(t,e,i),this._invalidate()},e.prototype._rescale=function(t){var e=this.canvas,i=this.size;e.width=i.width*t,e.height=i.height*t,this.ctx.scale(t,t)},e.prototype._devicePixelRatio=function(){return"number"==typeof window.devicePixelRatio?window.devicePixelRatio:1},e.prototype._invalidate=function(t){if(this.ctx){var e=t&&t.fixedScale?1:this._devicePixelRatio();this._rescale(e),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx)}},e}(he(ao,"childNodes")),co=function(t){function e(){t.call(this),this.shapes=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._add=function(t,e){this.shapes.push({bbox:e,shape:t}),t._quadNode=this},e.prototype.pointShapes=function(t){for(var e=this.shapes,i=e.length,o=[],r=0;r<i;r++)e[r].bbox.containsPoint(t)&&o.push(e[r].shape);return o},e.prototype.insert=function(t,e){this._add(t,e)},e.prototype.remove=function(t){for(var e=this.shapes,i=e.length,o=0;o<i;o++)if(e[o].shape===t){e.splice(o,1);break}},e}(O),lo=function(t){function e(e){t.call(this),this.children=[],this.rect=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.inBounds=function(t){var e=this.rect,i=e.bottomRight(),o=t.bottomRight(),r=e.origin.x<=t.origin.x&&e.origin.y<=t.origin.y&&o.x<=i.x&&o.y<=i.y;return r},e.prototype.pointShapes=function(e){for(var i=this.children,o=i.length,r=t.prototype.pointShapes.call(this,e),n=0;n<o;n++)ce(r,i[n].pointShapes(e));return r},e.prototype.insert=function(t,e){var i=this.children,o=!1;if(this.inBounds(e)){if(this.shapes.length<4)this._add(t,e);else{i.length||this._initChildren();for(var r=0;r<i.length;r++)if(i[r].insert(t,e)){o=!0;break}o||this._add(t,e)}o=!0}return o},e.prototype._initChildren=function(){var t=this.rect,i=this.children,o=t.center(),r=t.width()/2,n=t.height()/2;i.push(new e(new W([t.origin.x,t.origin.y],[r,n])),new e(new W([o.x,t.origin.y],[r,n])),new e(new W([t.origin.x,o.y],[r,n])),new e(new W([o.x,o.y],[r,n])))},e}(co);function uo(t,e){return t._zIndex<e._zIndex?1:t._zIndex>e._zIndex?-1:0}var fo=function(t){function e(){t.call(this),this.initRoots()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.initRoots=function(){this.rootMap={},this.root=new co,this.rootElements=[]},e.prototype.clear=function(){for(var t=this.rootElements,e=0;e<t.length;e++)this.remove(t[e]);this.initRoots()},e.prototype.pointShape=function(t){var e=(this.rootMap[Math.floor(t.x/3e3)]||{})[Math.floor(t.y/3e3)],i=this.root.pointShapes(t);e&&(i=i.concat(e.pointShapes(t))),this.assignZindex(i),i.sort(uo);for(var o=0;o<i.length;o++)if(i[o].containsPoint(t))return i[o]},e.prototype.assignZindex=function(t){for(var e=0;e<t.length;e++){for(var i=t[e],o=0,r=Math.pow(1e4,75),n=[];i;)n.push(i),i=i.parent;for(;n.length;)o+=(((i=n.pop()).parent?i.parent.children:this.rootElements).indexOf(i)+1)*r,r/=1e4;t[e]._zIndex=o}},e.prototype.optionsChange=function(t){"transform"!==t.field&&"stroke.width"!==t.field||this.bboxChange(t.element)},e.prototype.geometryChange=function(t){this.bboxChange(t.element)},e.prototype.bboxChange=function(t){if("Group"===t.nodeType)for(var e=0;e<t.children.length;e++)this.bboxChange(t.children[e]);else t._quadNode&&t._quadNode.remove(t),this._insertShape(t)},e.prototype.add=function(t){var e=Array.isArray(t)?t.slice(0):[t];ce(this.rootElements,e),this._insert(e)},e.prototype.childrenChange=function(t){if("remove"===t.action)for(var e=0;e<t.items.length;e++)this.remove(t.items[e]);else this._insert(Array.prototype.slice.call(t.items,0))},e.prototype._insert=function(t){for(var e;t.length>0;)(e=t.pop()).addObserver(this),"Group"===e.nodeType?ce(t,e.children):this._insertShape(e)},e.prototype._insertShape=function(t){var e=t.bbox();if(e){var i=this.getSectors(e),o=i[0][0],r=i[1][0];if(this.inRoot(i))this.root.insert(t,e);else{var n=this.rootMap;n[o]||(n[o]={}),n[o][r]||(n[o][r]=new lo(new W([3e3*o,3e3*r],[3e3,3e3]))),n[o][r].insert(t,e)}}},e.prototype.remove=function(t){if(t.removeObserver(this),"Group"===t.nodeType)for(var e=t.children,i=0;i<e.length;i++)this.remove(e[i]);else t._quadNode&&(t._quadNode.remove(t),delete t._quadNode)},e.prototype.inRoot=function(t){return t[0].length>1||t[1].length>1},e.prototype.getSectors=function(t){for(var e=t.bottomRight(),i=Math.floor(e.x/3e3),o=Math.floor(e.y/3e3),r=[[],[]],n=Math.floor(t.origin.x/3e3);n<=i;n++)r[0].push(n);for(var s=Math.floor(t.origin.y/3e3);s<=o;s++)r[1].push(s);return r},e}(O),yo=function(t){t.bind("mouseenter",this._mouseenter.bind(this)),t.bind("mouseleave",this._mouseleave.bind(this)),this.element=t.element};yo.prototype.clear=function(){this._resetCursor()},yo.prototype.destroy=function(){this._resetCursor(),delete this.element},yo.prototype._mouseenter=function(t){var e=this._shapeCursor(t);e?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(e)):this._resetCursor()},yo.prototype._mouseleave=function(){this._resetCursor()},yo.prototype._shapeCursor=function(t){for(var e=t.element;e&&!j(e.options.cursor);)e=e.parent;if(e)return e.options.cursor},yo.prototype._getCursor=function(){if(this.element)return this.element.style.cursor},yo.prototype._setCursor=function(t){this.element&&(this.element.style.cursor=t,this._current=t)},yo.prototype._resetCursor=function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)};var go=yo,vo={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},mo=Si.browser,xo=function(t){var e=Object.keys(vo);e.push("transparent");var i=new RegExp("^("+e.join("|")+")(\\W|$)","i");return xo=function(t){return i.exec(t)},i.exec(t)},_o=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){return this},e.prototype.toRGB=function(){return this},e.prototype.toHex=function(){return this.toBytes().toHex()},e.prototype.toBytes=function(){return this},e.prototype.toCss=function(){return"#"+this.toHex()},e.prototype.toCssRgba=function(){var t=this.toBytes();return"rgba("+t.r+", "+t.g+", "+t.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},e.prototype.toDisplay=function(){return mo.msie&&mo.version<9?this.toCss():this.toCssRgba()},e.prototype.equals=function(t){return t===this||null!==t&&this.toCssRgba()===To(t).toCssRgba()},e.prototype.diff=function(t){if(null===t)return NaN;var e=this.toBytes(),i=t.toBytes();return Math.sqrt(Math.pow(.3*(e.r-i.r),2)+Math.pow(.59*(e.g-i.g),2)+Math.pow(.11*(e.b-i.b),2))},e.prototype.clone=function(){var t=this.toBytes();return t===this&&(t=new wo(t.r,t.g,t.b,t.a)),t},e}(O),bo=function(t){function e(e,i,o,r){t.call(this),this.r=e,this.g=i,this.b=o,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHSV=function(){var t,e,i=this.r,o=this.g,r=this.b,n=Math.min(i,o,r),s=Math.max(i,o,r),a=s-n,p=s;return 0===a?new So(0,0,p,this.a):(0!==s?(e=a/s,t=i===s?(o-r)/a:o===s?2+(r-i)/a:4+(i-o)/a,(t*=60)<0&&(t+=360)):(e=0,t=-1),new So(t,e,p,this.a))},e.prototype.toHSL=function(){var t,e,i=this.r,o=this.g,r=this.b,n=Math.max(i,o,r),s=Math.min(i,o,r),a=(n+s)/2;if(n===s)t=e=0;else{var p=n-s;switch(e=a>.5?p/(2-n-s):p/(n+s),n){case i:t=(o-r)/p+(o<r?6:0);break;case o:t=(r-i)/p+2;break;case r:t=(i-o)/p+4}}return new ko(60*t,100*e,100*a,this.a)},e.prototype.toBytes=function(){return new wo(255*this.r,255*this.g,255*this.b,this.a)},e}(_o),wo=function(t){function e(e,i,o,r){t.call(this,Math.round(e),Math.round(i),Math.round(o),r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){return new t(this.r/255,this.g/255,this.b/255,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toHex=function(){return Ao(this.r,2)+Ao(this.g,2)+Ao(this.b,2)},e.prototype.toBytes=function(){return this},e}(bo);function Ao(t,e,i){void 0===i&&(i="0");for(var o=t.toString(16);e>o.length;)o=i+o;return o}var So=function(t){function e(e,i,o,r){t.call(this),this.h=e,this.s=i,this.v=o,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,i,o=this.h,r=this.s,n=this.v;if(0===r)t=e=i=n;else{o/=60;var s=Math.floor(o),a=o-s,p=n*(1-r),h=n*(1-r*a),c=n*(1-r*(1-a));switch(s){case 0:t=n,e=c,i=p;break;case 1:t=h,e=n,i=p;break;case 2:t=p,e=n,i=c;break;case 3:t=p,e=h,i=n;break;case 4:t=c,e=p,i=n;break;default:t=n,e=p,i=h}}return new bo(t,e,i,this.a)},e.prototype.toHSL=function(){return this.toRGB().toHSL()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_o),ko=function(t){function e(e,i,o,r){t.call(this),this.h=e,this.s=i,this.l=o,this.a=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toRGB=function(){var t,e,i,o=this.h/360,r=this.s/100,n=this.l/100;if(0===r)t=e=i=n;else{var s=n<.5?n*(1+r):n+r-n*r,a=2*n-s;t=Co(a,s,o+1/3),e=Co(a,s,o),i=Co(a,s,o-1/3)}return new bo(t,e,i,this.a)},e.prototype.toHSV=function(){return this.toRGB().toHSV()},e.prototype.toBytes=function(){return this.toRGB().toBytes()},e}(_o);function Co(t,e,i){var o=i;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function To(t,e){var i,o;if(null==t||"none"===t)return null;if(t instanceof _o)return t;var r=t.toLowerCase();if(i=xo(r))return(r="transparent"===i[1]?new bo(1,1,1,0):To(vo[i[1]],e)).match=[i[1]],r;if((i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(r))?o=new wo(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),1):(i=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(r))?o=new wo(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16),1):(i=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(r))?o=new wo(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),1):(i=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(r))?o=new wo(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])):(i=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(r))?o=new bo(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,1):(i=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(r))&&(o=new bo(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]))),o)o.match=i;else if(!e)throw new Error("Cannot parse color: "+r);return o}var 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.renderTo=function(t){t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),this.renderPoints(t,this.srcElement),this.setLineDash(t),this.setLineCap(t),this.setLineJoin(t),this.setFill(t),this.setStroke(t),t.restore()},e.prototype.setFill=function(t){var e=this.srcElement.options.fill,i=!1;return e&&("Gradient"===e.nodeType?(this.setGradientFill(t,e),i=!0):tt(e.color)||(t.fillStyle=e.color,t.save(),this.globalAlpha(t,e.opacity),t.fill(),t.restore(),i=!0)),i},e.prototype.setGradientFill=function(t,e){var i,o=this.srcElement.rawBBox();if(e instanceof ze){var r=e.start(),n=e.end();i=t.createLinearGradient(r.x,r.y,n.x,n.y)}else if(e instanceof Le){var s=e.center();i=t.createRadialGradient(s.x,s.y,0,s.x,s.y,e.radius())}!function(t,e){for(var i=0;i<e.length;i++){var o=e[i],r=To(o.color());r.a*=o.opacity(),t.addColorStop(o.offset(),r.toCssRgba())}}(i,e.stops),t.save(),e.userSpace()||t.transform(o.width(),0,0,o.height(),o.origin.x,o.origin.y),t.fillStyle=i,t.fill(),t.restore()},e.prototype.setStroke=function(t){var e=this.srcElement.options.stroke;if(e&&!tt(e.color)&&e.width>0)return t.strokeStyle=e.color,t.lineWidth=Q(e.width,1),t.save(),this.globalAlpha(t,e.opacity),t.stroke(),t.restore(),!0},e.prototype.dashType=function(){var t=this.srcElement.options.stroke;if(t&&t.dashType)return t.dashType.toLowerCase()},e.prototype.setLineDash=function(t){var e=this.dashType();if(e&&"solid"!==e){var i=Ei[e];t.setLineDash?t.setLineDash(i):(t.mozDash=i,t.webkitLineDash=i)}},e.prototype.setLineCap=function(t){var e=this.dashType(),i=this.srcElement.options.stroke;e&&"solid"!==e?t.lineCap="butt":i&&i.lineCap&&(t.lineCap=i.lineCap)},e.prototype.setLineJoin=function(t){var e=this.srcElement.options.stroke;e&&e.lineJoin&&(t.lineJoin=e.lineJoin)},e.prototype.renderPoints=function(t,e){no(t,e)},e}(so),Mo=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.renderPoints=function(t){no(t,this.srcElement.toPath())},e}(Po),Oo=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.renderPoints=function(t){var e=this.srcElement.geometry(),i=e.center,o=e.radius;t.arc(i.x,i.y,o,0,2*Math.PI)},e}(Po),Ro=function(t){function e(e,i){t.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=io();var o=this.img=new Image;i&&!/^data:/i.test(e.src())&&(o.crossOrigin=i),o.src=e.src(),o.complete?this.onLoad():(o.onload=this.onLoad,o.onerror=this.onError)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.renderTo=function(t){"resolved"===this.loading.state()&&(t.save(),this.setTransform(t),this.setClip(t),this.drawImage(t),t.restore())},e.prototype.optionsChange=function(e){"src"===e.field?(this.loading=io(),this.img.src=this.srcElement.src()):t.prototype.optionsChange.call(this,e)},e.prototype.onLoad=function(){this.loading.resolve(),this.invalidate()},e.prototype.onError=function(){this.loading.reject(new Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},e.prototype.drawImage=function(t){var e=this.srcElement.rect(),i=e.topLeft();t.drawImage(this.img,i.x,i.y,e.width(),e.height())},e}(Po),jo=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.renderPoints=function(t){for(var e=this.srcElement.paths,i=0;i<e.length;i++)no(t,e[i])},e}(Po),Bo=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.renderPoints=function(t){var e=this.srcElement.geometry(),i=e.origin,o=e.size;t.rect(i.x,i.y,o.width,o.height)},e}(Po),Io=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.renderTo=function(t){var e=this.srcElement,i=e.position(),o=e.measure();t.save(),this.setTransform(t),this.setClip(t),this.setOpacity(t),t.beginPath(),t.font=e.options.font,t.textAlign="left",this.setFill(t)&&t.fillText(e.content(),i.x,i.y+o.baseline),this.setStroke(t)&&(this.setLineDash(t),t.strokeText(e.content(),i.x,i.y+o.baseline)),t.restore()},e}(Po);ro.Arc=Mo,ro.Circle=Oo,ro.Group=ao,ro.Image=Ro,ro.MultiPath=jo,ro.Path=Po,ro.Rect=Bo,ro.Text=Io;var zo,Lo,Eo=function(t){function e(e,i){t.call(this,e,i),this.element.innerHTML=this._template(this);var o=this.element.firstElementChild,r=oi(e);o.width=r.width,o.height=r.height,this._rootElement=o,this._root=new ho(o,r),this._mouseTrackHandler=this._trackMouse.bind(this),zi(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={type:{configurable:!0}};return i.type.get=function(){return"canvas"},e.prototype.destroy=function(){t.prototype.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),Li(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},e.prototype.draw=function(e){t.prototype.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},e.prototype.clear=function(){t.prototype.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},e.prototype.eventTarget=function(t){if(this._searchTree){var e=this._surfacePoint(t);return this._searchTree.pointShape(e)}},e.prototype.image=function(){var t=this._root,e=this._rootElement,i=[];t.traverse((function(t){t.loading&&i.push(t.loading)}));var o=io(),r=function(){t._invalidate({fixedScale:!0});try{var i=e.toDataURL();o.resolve(i)}catch(t){o.reject(t)}};return oo(i).then(r,r),o},e.prototype.suspendTracking=function(){t.prototype.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},e.prototype.resumeTracking=function(){if(t.prototype.resumeTracking.call(this),!this._searchTree){this._searchTree=new fo;for(var e=this._root.childNodes,i=[],o=0;o<e.length;o++)i.push(e[o].srcElement);this._searchTree.add(i)}},e.prototype._resize=function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.size=this._size,this._root.invalidate()},e.prototype._template=function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},e.prototype._enableTracking=function(){this._searchTree=new fo,this._cursor=new go(this),t.prototype._enableTracking.call(this)},e.prototype._trackMouse=function(t){if(!this._suspendedTracking){var e=this.eventTarget(t);if("click"!==t.type){var i=this._currentShape;i&&i!==e&&this.trigger("mouseleave",{element:i,originalEvent:t,type:"mouseleave"}),e&&i!==e&&this.trigger("mouseenter",{element:e,originalEvent:t,type:"mouseenter"}),this.trigger("mousemove",{element:e,originalEvent:t,type:"mousemove"}),this._currentShape=e}else e&&this.trigger("click",{element:e,originalEvent:t,type:"click"})}},Object.defineProperties(e.prototype,i),e}(ui),Vo=function(){return"undefined"!=typeof document},Fo=function(t){function e(){t.call(this),this._items=[{name:"svg",type:eo},{name:"canvas",type:Eo}]}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={support:{configurable:!0},current:{configurable:!0}};return i.support.get=function(){return Lo||(Lo={canvas:Vo()&&document.createElement("canvas").getContext,svg:Vo()&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}),Lo},i.current.get=function(){return zo||(zo=new e),zo},e.prototype.create=function(t,e){var i=this._items,o=i[0];if(e&&e.type)for(var r=e.type.toLowerCase(),n=0;n<i.length;n++)if(i[n].name===r){o=i[n];break}if(o)return new o.type(t,e);fi("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)},Object.defineProperties(e,i),e}(O),Do=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={support:{configurable:!0}};return i.support.get=function(){return Fo.support},e.create=function(t,e){return Fo.current.create(t,e)},Object.defineProperties(e,i),e}(ui);function Uo(t){var e=new Ii({skipBaseHref:!0}),i=t.clippedBBox(),o=t;if(i){var r=i.getOrigin(),n=new le;n.transform(J().translate(-r.x,-r.y)),n.children.push(t),o=n}e.load([o]);var s="<?xml version='1.0' ?><svg xmlns='"+mi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+e.render()+"</svg>";return e.destroy(),s}var Go={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"};function Ho(t){for(var e=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],i="";t>0;)t<e[0]?e.shift():(i+=Go[e[0]],t-=e[0]);return i}var No=String.fromCharCode;var qo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Xo(t){for(var e="",i=0,o=function(t){for(var e="",i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?e+=No(o):o<2048?(e+=No(192|o>>>6),e+=No(128|63&o)):o<65536&&(e+=No(224|o>>>12),e+=No(128|o>>>6&63),e+=No(128|63&o))}return e}(t);i<o.length;){var r=o.charCodeAt(i++),n=o.charCodeAt(i++),s=o.charCodeAt(i++),a=r>>2,p=(3&r)<<4|n>>4,h=(15&n)<<2|s>>6,c=63&s;isNaN(n)?h=c=64:isNaN(s)&&(c=64),e=e+qo.charAt(a)+qo.charAt(p)+qo.charAt(h)+qo.charAt(c)}return e}function Yo(t,e){if(t.length<2)return t.slice();return function t(i){if(i.length<=1)return i;var o=Math.floor(i.length/2),r=i.slice(0,o),n=i.slice(o);return function(t,i){for(var o=[],r=0,n=0,s=0;r<t.length&&n<i.length;)e(t[r],i[n])<=0?o[s++]=t[r++]:o[s++]=i[n++];return r<t.length&&o.push.apply(o,t.slice(r)),n<i.length&&o.push.apply(o,i.slice(n)),o}(r=t(r),n=t(n))}(t)}function Wo(t,e){var i={width:"800px",height:"600px",cors:"Anonymous"},o=t,r=t.clippedBBox();if(r){var n=r.getOrigin();(o=new le).transform(J().translate(-n.x,-n.y)),o.children.push(t);var s=r.getSize();i.width=s.width+"px",i.height=s.height+"px"}var a=Object.assign(i,e),p=document.createElement("div"),h=p.style;h.display="none",h.width=a.width,h.height=a.height,document.body.appendChild(p);var c=new Eo(p,a);c.suspendTracking(),c.draw(o);var l=c.image(),u=function(){c.destroy(),document.body.removeChild(p)};return l.then(u,u),l}function Zo(t,e){var i=Uo(t);return e&&e.raw||(i="data:image/svg+xml;base64,"+Xo(i)),io().resolve(i)}function Jo(t){var e=.5;t.options.stroke&&a.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 Ko(t,e){return-t.x*e.y+t.y*e.x<0}function $o(t){return"number"==typeof t&&!isNaN(t)}function Qo(t){return"string"==typeof t}function tr(t){return $o(t)||Qo(t)&&isFinite(t)}function er(t){return"function"==typeof t}function ir(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(er(o.clone))t[i]=o.clone();else{var s=t[i];t[i]="object"==typeof s&&s||{},ir(t[i],o)}else"undefined"!==r&&(t[i]=o)}return t}function or(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)ir(t,e[o]);return t}function rr(t){return"object"==typeof t}function nr(t){return $o(t)?t+"px":t}var sr=/width|height|top|left|bottom|right/i;function ar(t){return sr.test(t)}function pr(t,e){var i=Qo(e)?[e]:e;if(C(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=ar(s)?parseFloat(r[s]):r[s]}return o}if(rr(e))for(var a in e)t.style[a]=nr(e[a])}function hr(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i.top=i[_]=i[u]=i[v]=t:(i.top=t.top||e,i[_]=t[_]||e,i[u]=t[u]||e,i[v]=t[v]||e),i}var cr={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},lr=function(){},ur={implementation:{configurable:!0}};lr.register=function(t){cr=t},ur.implementation.get=function(){return cr},Object.defineProperties(lr,ur);var fr=lr,dr=/\{(\d+)(:[^\}]+)?\}/g,yr=function(t){this._intlService=t},gr={intl:{configurable:!0}};gr.intl.get=function(){return this._intlService||fr.implementation},gr.intl.set=function(t){this._intlService=t},yr.prototype.auto=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var o=this.intl;return Qo(t)&&t.match(g)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},yr.prototype.localeAuto=function(t,e,i){var o=this.intl;return Qo(t)&&t.match(g)?t.replace(dr,(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(yr.prototype,gr);var vr=yr,mr=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new vr(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},xr={intl:{configurable:!0}};xr.intl.get=function(){return this._intlService||fr.implementation},xr.intl.set=function(t){this._intlService=t,this.format.intl=t},mr.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},mr.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(mr.prototype,xr);var _r,br=mr,wr=function(){};wr.register=function(t){_r=t},wr.create=function(t,e){if(_r)return _r.create(t,e)};var Ar=wr,Sr={compile:function(t){return t}},kr=function(){};kr.register=function(t){Sr=t},kr.compile=function(t){return Sr.compile(t)};var Cr=kr;function Tr(t){var e;return void 0===t&&(t={}),t.template?t.template=e=Cr.compile(t.template):er(t.content)&&(e=t.content),e}var Pr=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Mr={};function Or(t){if(Mr[t])return Mr[t];var e=[];return t.replace(Pr,(function(t,i,o,r){e.push(a.util.defined(i)?i:o||r)})),Mr[t]=function(t){for(var i=t,o=0;o<e.length&&i;o++)i=i[e[o]];return i},Mr[t]}function Rr(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function jr(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}Mr[void 0]=function(t){return t};var Br=function(){this._map={}};Br.prototype.get=function(t){return this._map[this._key(t)]},Br.prototype.set=function(t,e){this._map[this._key(t)]=e},Br.prototype._key=function(t){return t instanceof Date?t.getTime():t};var Ir=Br;function zr(t,e){if(e)return-1!==e.indexOf(t)}function Lr(t,e,i){return a.util.round(t+(e-t)*i,3)}var Er=function(t,e){this.observer=t,this.handlerMap=or({},this.handlerMap,e)};Er.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},Er.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)},Er.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 Vr=Er;function Fr(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);a.util.defined(n)&&o.push(n)}return o}function Dr(t){var e=0;return t.wheelDelta&&(e=(e=-t.wheelDelta/120)>0?Math.ceil(e):Math.floor(e)),t.detail&&(e=a.util.round(t.detail/3)),e}var Ur=a.util,Gr=Ur.append,Hr=Ur.bindEvents,Nr=Ur.defined,qr=Ur.deg,Xr=Ur.elementOffset,Yr=Ur.elementSize,Wr=Ur.eventElement,Zr=Ur.eventCoordinates,Jr=Ur.last,Kr=Ur.limitValue,$r=Ur.objectKey,Qr=Ur.rad,tn=Ur.round,en=Ur.unbindEvents,on=Ur.valueOrDefault,rn=function(){};rn.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++,rn.fetchFonts(r,e,i),i.depth--))}))},rn.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){fi(t)}Promise.all(i).then(e,e)}else e()},rn.preloadFonts=function(t,e){var i=[];rn.fetchFonts(t,i),rn.loadFonts(i,e)};var nn=rn;function sn(t,e){var i=t.prototype;i.options?i.options=or({},i.options,e):i.options=e}function an(t){for(var e=m,i=x,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===m?void 0:e,max:i===x?void 0:i}}function pn(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var hn=p.Matrix,cn=/matrix\((.*)\)/;function ln(t){var e=getComputedStyle(t).transform;return"none"===e?hn.unit():function(t){var e=t.match(cn);if(null===e||2!==e.length)return hn.unit();var i=e[1].split(",").map((function(t){return parseFloat(t)}));return new(Function.prototype.bind.apply(hn,[null].concat(i)))}(e)}function un(t){if(!t)return hn.unit();for(var e=ln(t),i=t.parentElement;i;){var o=ln(i);e=e.multiplyCopy(o),i=i.parentElement}return e.b=e.c=e.e=e.f=0,e}function fn(t,e){var i=tn(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=tn(i/o,10);return tn(o*(r<1.904762?.2:r<4.761904?.5:r<9.523809?1:2),10)}var dn=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=Qr(e),o=Math.cos(i),r=Math.sin(i),n=t.x,s=t.y,a=this.x,p=this.y;return this.x=tn(n+(a-n)*o+(p-s)*r,3),this.y=tn(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=Qr(i);return new e(t.x-o*Math.cos(r),t.y-o*Math.sin(r))},e}(O);function yn(t,e,i,o,r){var n=Qr(r);return new dn(i+(t-i)*Math.cos(n)+(e-o)*Math.sin(n),o-(t-i)*Math.sin(n)+(e-o)*Math.cos(n))}var gn=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 Nr(t)&&(this.x1=t,this.x2=this.x1+o),Nr(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=C(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!==S&&e||(this.x1=t.x1,this.x2=t.x2),e!==k&&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===b||e===u?k:S,n=r===k?i:o;if(e===f){var s=t.center(),a=this.center();this.x1+=s.x-a.x,this.y1+=s.y-a.y}else this[r+1]=e===b||e===v?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=hr(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=hr(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 dn(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 dn(this.x1,this.y1),new dn(this.x2,this.y1),new dn(this.x2,this.y2),new dn(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=yn(0,0,r,n,t),a=yn(e,0,r,n,t),p=yn(e,i,r,n,t),h=yn(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 p.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===S?"width":"height",s=this[n]();zr(i,[v,b])?(this[o]=t[o],this[r]=this[o]+s):zr(i,[_,u])?(this[r]=t[r],this[o]=this[r]-s):i===f&&(this[o]=t[o]+(t[n]()-s)/2,this[r]=this[o]+s)},e}(O);function vn(t,e){return t-e}var mn=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=Qr(t),o=Math.cos(i),r=Math.sin(i),n=e?this.innerRadius:this.radius,s=tn(this.center.x-o*n,3),a=tn(this.center.y-r*n,3);return new dn(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(Qr(r)),h=Math.cos(Qr(r)),c=n.x-s,l=n.y-a;return Math.abs(p)<.9&&(c+=s*-h/Math.abs(h)),Math.abs(h)<.9&&(l+=a*-p/Math.abs(p)),new gn(c,l,c+e,l+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 dn(s,a),h=this.point(r),c=new dn(h.x-e.x,h.y-e.y),l=this.point(n),u=new dn(l.x-e.x,l.y-e.y),f=tn(s*s+a*a,3);return(c.equals(p)||Ko(c,p))&&!Ko(u,p)&&f>=i*i&&f<=o*o},e.prototype.getBBox=function(){var t,e=new gn(m,m,x,x),i=tn(this.startAngle%360),o=tn((i+this.angle)%360),r=this.innerRadius,n=[0,90,180,270,i,o].sort(vn),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}(O),xn=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}(mn),_n=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 p.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),s=Math.max(t.innerRadius,0),h=new p.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),c=a.Path.fromArc(h,e).close();if(s){h.radiusX=h.radiusY=s;var l=h.pointAt(o);c.lineTo(l.x,l.y),c.arc(o,i,s,s,!0)}else c.lineTo(r.x,r.y);return c},e}(O);_n.current=new _n;var bn=_n,wn=function(t){function e(e){t.call(this),this.children=[],this.options=or({},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 a.Group({zIndex:this.options.zIndex,visible:on(this.options.visible,!0)})},e.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=a.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):Nr(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(on(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:A,opacity:e||.2},stroke:{color:A,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return 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);Nr(n.options.zIndex)||(n.options.zIndex=on(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},e.prototype.createGradientOverlay=function(t,e,i){var o=new a.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}(O);wn.prototype.options={};var An=wn,Sn=function(t){function e(e){t.call(this,e),this.options.margin=hr(this.options.margin),this.options.padding=hr(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,c=r.padding,l=r.border.width,u=function(){o.align(e,S,r.align),o.align(e,k,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(l)},f=e.clone();p&&(f.x2=f.x1+n,f.y2=f.y1+s),a&&f.unpad(h).unpad(l).unpad(c),t.prototype.reflow.call(this,f),i=p?this.box=new gn(0,0,n,s):this.box,a&&p?(u(),f=this.contentBox=this.paddingBox.clone().unpad(c)):(f=this.contentBox=i.clone(),i.pad(c).pad(l).pad(h),u()),this.translateChildren(i.x1-f.x1+h.left+l+c.left,i.y1-f.y1+h.top+l+c.top);for(var d=this.children,y=0;y<d.length;y++){var g=d[y];g.reflow(g.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(a.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:on(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e}(An);sn(Sn,{align:v,vAlign:b,margin:{},padding:{},border:{color:l,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var kn=Sn,Cn=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,h=this.visualStyle();return i===d?s=new a.Circle(new p.Circle([tn(e.x1+n,3),tn(e.y1+e.height()/2,3)],n),h):"triangle"===i?s=a.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],h).close():"cross"===i?((s=new a.MultiPath(h)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),s.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):s=a.Path.fromRect(e.toRect(),h),o&&s.transform(p.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}(kn);sn(Cn,{type:d,align:f,vAlign:f});var Tn=Cn,Pn={glass:{type:"linear",rotation:0,stops:[{offset:0,color:A,opacity:0},{offset:.25,color:A,opacity:.3},{offset:1,color:A,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:A,opacity:.55},{offset:.65,color:A,opacity:0},{offset:.95,color:A,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:A,opacity:.06},{offset:.83,color:A,opacity:.2},{offset:.95,color:A,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:A,opacity:0},{offset:.5,color:A,opacity:.3},{offset:.99,color:A,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:A,opacity:.2},{offset:.15,color:A,opacity:.15},{offset:.17,color:A,opacity:.35},{offset:.85,color:A,opacity:.05},{offset:.87,color:A,opacity:.15},{offset:.99,color:A,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};function Mn(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),c=[];return c[0]=new gn(o,s,r,a),c[1]=new gn(i,a,o,p),c[2]=new gn(r,a,n,p),c[3]=new gn(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(c[4]=new gn(i,s,o,a),c[5]=new gn(r,p,n,h)):(c[4]=new gn(r,s,n,a),c[5]=new gn(i,p,o,h)),Rr(c,(function(t){return t.height()>0&&t.width()>0}))[0]}var On=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 gn(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=Mn(i,e[o].box)||new gn},e.prototype.createVisual=function(){this.visual=new a.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=a.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=$r(t),r=Pn[t.gradient];if(i[o])e=i[o];else{var n=Object.assign({},r,t);"linear"===r.type?e=new a.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 a.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 gn(0,0,t.width,t.height)},e}(An);sn(On,{width:600,height:400,background:A,border:{color:l,width:0},margin:hr(5),zIndex:-2});var Rn=On,jn=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=S,this.elementAxis=k,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=k,this.elementAxis=S,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,c=t[i+1]+this.alignStart(a,t[r]());if(h){for(var l=c,u=0;u<h;u++){for(var f=s[u],d=f.groupElements,y=t[e+1],g=d.length,v=0;v<g;v++){var m=d[v],x=this.elementSize(m),_=l+this.alignStart(x[r],f.groupSize),b=new gn;b[i+1]=_,b[i+2]=_+x[r],b[e+1]=y,b[e+2]=y+x[o],m.reflow(b),y+=x[o]+this.elementSpacing}l+=f.groupSize+this.groupSpacing}t[i+1]=c,t[i+2]=c+a,t[e+2]=t[e+1]+p}},e.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===_||o===u?i=e-t:o===f&&(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=tn(t[i]()),a=e.length,p=[],h=0,c=0,l=0,u=0,f=[],d=0;d<a;d++){var y=e[d];y.box||y.reflow(t);var g=this.elementSize(y);this.options.wrap&&tn(c+r+g[i])>s&&(p.push({groupElements:f,groupSize:h,groupElementsSize:c}),u=Math.max(u,c),l+=n+h,h=0,c=0,f=[]),h=Math.max(h,g[o]),c>0&&(c+=r),c+=g[i],f.push(y)}return p.push({groupElements:f,groupSize:h,groupElementsSize:c}),{groups:p,groupsSize:l+=h,maxGroupElementsSize:u=Math.max(u,c)}},e.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},e.prototype.createVisual=function(){},e}(An);sn(jn,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Bn=jn,In=a.Text,zn=function(t){function e(e,i){t.call(this,i),this.content=e,this.reflow(new gn)}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=a.util.measureText(this.content,{font:e.font});this.baseline=i.baseline,this.box=new gn(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 In(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r})},e}(An);sn(zn,{font:"12px sans-serif",color:l});var Ln=zn;function En(t){var e=t.origin,i=t.bottomRight();return new gn(e.x,e.y,i.x,i.y)}var Vn=/\n/m,Fn=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 gn)}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(Vn),i=new Bn({vertical:!0,align:t.align,wrap:!1}),o=or({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new Ln(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=En(n.clippedBBox()||new p.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=hr(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 a.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()){var e=a.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&&!Nr(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,S,t.align),this.align(this.targetBox,k,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 p.transform().translate(r.x-i,r.y-o).rotate(t,[i,o])},e}(kn),Dn=function(t){function e(e){t.call(this,e),this.append(new Fn(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,S)},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}(An);sn(Dn,{color:l,position:b,align:f,margin:hr(5),padding:hr(5)});var Un=Dn,Gn=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 gn)}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:Wr(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!==f){var e=this.normalBox.toRect(),i=this.rotationTransform();this.box=En(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===f)return t.prototype.rotationTransform.call(this);var o=p.transform().rotate(i).matrix(),r=this.normalBox.toRect(),n=this.targetBox.toRect(),s=e.rotationOrigin||b,a=s===b||s===u?S:k,h=s===b||s===u?k:S,c=s===b||s===v?n.origin:n.bottomRight(),l=r.topLeft().transformCopy(o),d=r.topRight().transformCopy(o),y=r.bottomRight().transformCopy(o),g=r.bottomLeft().transformCopy(o),m=p.Rect.fromPoints(l,d,y,g),x={};x[h]=n.origin[h]-m.origin[h];var _,w,A=Math.abs(l[h]+x[h]-c[h]),C=Math.abs(d[h]+x[h]-c[h]);tn(A,10)===tn(C,10)?(_=l,w=d):C<A?(_=d,w=y):(_=l,w=g);var T=_[a]+(w[a]-_[a])/2;return x[a]=n.center()[a]-T,p.transform().translate(x.x,x.y).rotate(i)},e}(Fn);sn(Gn,{_autoReflow:!1});var Hn=Gn,Nn=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 gn,a=function(){return t},p=n.size,h=this.fields.text;if(Nr(r)&&r.visible){var c=Tr(r);c?h=c(this.fields):r.format&&(h=this.chartService.format.auto(r.format,h)),r.color||(r.color="inside"===r.position?"#fff":n.background),this.label=new Fn(h,or({},r)),this.label.aliasFor=a,"inside"!==r.position||Nr(p)||(n.type===d?p=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||p||7,n.height=o||p||7;var l=new Tn(or({},n));l.aliasFor=a,this.marker=l,this.append(l),this.label&&this.append(this.label),l.reflow(new gn),this.wrapperBox=s.wrap(l.box)}},e.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,c=r.position;r.visible&&(zr(c,[v,_])?c===v?(o=a.alignTo(t,c).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[o.x2,p.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,c).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[o.x1,p.y]],i=o.clone().wrapPoint(e))):c===u?(o=a.alignTo(t,c).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,c).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s&&("outside"===r.label.position&&n.box.alignTo(s.box,c),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=a.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}});Jo(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:Wr(t),text:Nr(e.label)?e.label.text:"",visual:this.visual})},e}(kn);sn(Nn,{icon:{visible:!0,type:d},label:{position:"inside",visible:!0,align:f,vAlign:f},line:{visible:!0},visible:!0,position:b,zIndex:2});var qn=Nn;function Xn(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new a.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),Jo(n),n}function Yn(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,n=new a.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),Jo(n),n}var Wn=function(t){function e(e,i){void 0===i&&(i=new br),t.call(this,e),this.chartService=i,this.options.visible||(this.options=or({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=or({},{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=or({},{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?_:f,i=or({},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;rr(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 a=this.createAxisLabel(s,i);a&&(this.append(a),this.labels.push(a))}}},e.prototype.clearLabels=function(){this.children=Rr(this.children,(function(t){return!(t instanceof Hn)})),this.labels=[]},e.prototype.clearTitle=function(){var t=this;this.title&&(this.children=Rr(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 gn(r,e.y1,r,e.y2-s):new gn(e.x1,n,e.x2-s,n)},e.prototype.createTitle=function(){var t=this.options,e=or({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);if(e.visible&&e.text){var i=new Fn(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=or({},e,i[o]);r.value=this.parseNoteValue(r.value);var n=new qn({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);n.options.visible&&(Nr(n.options.position)?t.vertical&&!zr(n.options.position,[v,_])?n.options.position=t.reverse?v:_:t.vertical||zr(n.options.position,[b,u])||(n.options.position=t.reverse?u:b):t.vertical?n.options.position=t.reverse?v:_:n.options.position=t.reverse?u:b,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 a.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)Nr(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(Xn(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 a.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});o.moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&Jo(o);var r=this._lineGroup=new a.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=a.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 a.Group({zIndex:-1}),s=Rr(this.pane.axes,(function(e){return e.options.vertical!==t.options.vertical}))[0],h=0;h<i.length;h++){var c=i[h],l=void 0,u=void 0,f=c.label,d=void 0;if(o?(l=(s||r.axisX).lineBox(),u=this.getSlot(c.from,c.to,!0)):(l=this.getSlot(c.from,c.to,!0),u=(s||r.axisY).lineBox()),f&&(f.vAlign=f.position||v,d=this.createPlotBandLabel(f,c,new gn(l.x1,u.y1,l.x2,u.y2))),0!==l.width()&&0!==u.height()){var y=new p.Rect([l.x1,u.y1],[l.width(),u.height()]),g=a.Path.fromRect(y,{fill:{color:c.color,opacity:c.opacity},stroke:null});n.append(g),d&&n.append(d)}}this.appendVisual(n)}},e.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;if(Nr(t)&&t.visible){var n=Tr(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 Fn(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"],c={lineStart:p[n?"x1":"y1"],lineEnd:p[n?"x2":"y2"],vertical:n},l=[],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=tn(t[n]);zr(a,l)||n%i==0||s&&h===a||(c.position=a,u.append(Yn(c,e)),l.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](),c=0,l=0;l<n;l++){var u=i[l].box[s]();u+p<=h&&(c=Math.max(c,u))}this.box=r?new gn(t.x1,t.y1,t.x1+c+p,t.y2):new gn(t.x1,t.y1,t.x2,t.y1+c+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,s=this.getLabelsTickPositions(),a=this.getActualTickSize()+t.margin,p=0;p<e.length;p++){var h=e[p],c=this.labelTickIndex(h),l=o?h.box.height():h.box.width(),f=s[c]-l/2,d=void 0,y=void 0,g=void 0;if(o){if(i)f=(y=s[c])+((g=s[c+1])-y)/2-l/2;var m=r.x2;n?(m+=a,h.options.rotationOrigin=v):(m-=a+h.box.width(),h.options.rotationOrigin=_),d=h.box.move(m,f)}else{i?(y=s[c],g=s[c+1]):(y=f,g=f+l);var x=r.y1;n?(x-=a+h.box.height(),h.options.rotationOrigin=u):(x+=a,h.options.rotationOrigin=b),d=new gn(y,x,g,x+h.box.height())}h.reflow(d)}},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 gn);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?_:v,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?b:u),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;Nr(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?k:S;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=Tr(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?k:S;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?k:S,s=this.labels,a=i?1:0,p=i?0:1,h=0,c=0,l=0;l<s.length;l++){var u=s[l],f=this.labelTickIndex(u),d=void 0,y=void 0;o?(d=r[f+a],y=r[f+p]):d=y=r[f],h=Math.max(h,d-u.box[n+1]),c=Math.max(c,u.box[n+2]-y)}return{start:h,end:c}},e.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!Nr(n.min)||n.min<=i)||o<e&&r>0&&(!Nr(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=Kr(t,i,o),p=Kr(t+s,i+s,o)):e>o&&r>0&&(p=Kr(e,i,o),a=Kr(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}(An);sn(Wn,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:l,visible:!0},title:{visible:!0,position:f},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:l,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Zn=Wn,Jn="days",Kn="years",$n={years:31536e6,months:26784e5,weeks:6048e5,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1};function Qn(t,e){return t.getTime()-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset())}function ts(t,e){return new Date(t.getTime()+e)}function es(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function is(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),!0)}function os(t,e,i,o){var r=t;if(t){var n=es(t),s=n.getHours();i===Kn?is(r=new Date(n.getFullYear()+e,0,1),0):"months"===i?is(r=new Date(n.getFullYear(),n.getMonth()+e,1),s):"weeks"===i?is(r=os(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 ts(t,864e5*-i)}(n,o),7*e,Jn),s):i===Jn?is(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 ts(i,o+36e5*e)}(n,e):"minutes"===i?(r=ts(n,6e4*e)).getSeconds()>0&&r.setSeconds(0):"seconds"===i?r=ts(n,1e3*e):"milliseconds"===i&&(r=ts(n,e)),"milliseconds"!==i&&r.getMilliseconds()>0&&r.setMilliseconds(0)}return r}function rs(t,e,i){return os(es(t),0,e,i)}function ns(t,e,i){var o=es(t);return o&&rs(o,e,i).getTime()===o.getTime()?o:os(o,1,e,i)}function ss(t,e){return t&&e?t.getTime()-e.getTime():-1}function as(t,e){return t.getTime()-e}function ps(t){if(C(t)){for(var e=[],i=0;i<t.length;i++)e.push(ps(t[i]));return e}if(t)return es(t).getTime()}function hs(t,e){return t&&e?ps(t)===ps(e):t===e}function cs(t,e,i){return Qn(t,e)/$n[i]}function ls(t,e,i,o){var r=es(t),n=es(e);return("months"===i?r.getMonth()-n.getMonth()+12*(r.getFullYear()-n.getFullYear())+cs(r,new Date(r.getFullYear(),r.getMonth()),Jn)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===Kn?r.getFullYear()-n.getFullYear()+ls(r,new Date(r.getFullYear(),0),"months",1)/12:i===Jn||"weeks"===i?cs(r,n,i):as(r,e)/$n[i])/o}function us(t,e,i){return i===Kn?e.getFullYear()-t.getFullYear():"months"===i?12*us(t,e,Kn)+e.getMonth()-t.getMonth():i===Jn?Math.floor(as(e,t)/864e5):Math.floor(as(e,t)/$n[i])}function fs(t,e){return Qo(e)&&t.parseDate(e)||es(e)}function ds(t,e){if(C(e)){for(var i=[],o=0;o<e.length;o++)i.push(fs(t,e[o]));return i}return fs(t,e)}function ys(t,e){return $o(t.weekStartDay)?t.weekStartDay:e.firstDay?e.firstDay():0}var 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.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=Nr(t.min),o=Nr(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:$o(t.min)?t.min%1:0,max:$o(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=$o(i.min)?i.min:0;if(e=$o(i.max)?i.max:$o(i.min)?o+i.categories.length:this.totalRange().max||1,t){var r=this.totalRange();o=Kr(o,0,r.max),e=Kr(e,0,r.max)}return{min:o,max:e}},e.prototype.range=function(){var t=this.options;return{min:$o(t.min)?t.min:0,max:$o(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?k:S,o=t[i+1],r=t[i+2],n=e[0],s=Jr(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?k:S)+(o?2:1)],h=this.tickIndices(t),c=[],l=0;l<h.length;l++)c.push(p+tn(n*(h[l]-a),3));return c},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?k:S,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,c=a.min,l=s?k:S,u=h[l+(r?2:1)],f=h.clone(),d=!Nr(e),y=on(t,0),g=on(e,y);g=Math.max(g-1,y);var v=u+(y-c)*p,m=u+((g=Math.max(y,g))+1-c)*p;return d&&n&&(m=v),i&&(v=Kr(v,h[l+1],h[l+2]),m=Kr(m,h[l+1],h[l+2])),f[l+1]=r?m:v,f[l+2]=r?v:m,f},e.prototype.limitSlot=function(t){var e=this.options.vertical?k:S,i=this.lineBox(),o=t.clone();return o[e+1]=Kr(t[e+1],i[e+1],i[e+2]),o[e+2]=Kr(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):$o(n)&&(n-=r),"string"==typeof s?s=this.categoryIndex(s):$o(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?k:S,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,h=n.max,c=i?h:p,l=a[r+1],u=a[r+2],f=t[r];if(f<l||f>u)return null;var d=c+(f-l)/s,y=d%1;return o?d=Math.round(d):0===y&&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=tn(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=Kr(e.min+t,o,r),s=Kr(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=on(i.categories[t],""),n=this.axisLabelText(r,o,e);return new Hn(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?k:S,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=tn(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?k:S,n=this.totalRangeIndices(!0),s=this.scaleOptions(),a=s.scale,p=s.box[r+(o?2:1)],h=t[r]-p,c=e[r]-p,l=n.min+h/a,u=n.min+c/a,f=Math.min(l,u),d=Math.max(l,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(hs(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 $o(t.min)&&(e=Math.floor(t.min)),{min:e,max:$o(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 Ir,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}(Zn);sn(gs,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:l},labels:{zIndex:1},justified:!1,_deferLabels:!0});var vs=gs,ms={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"},xs=["milliseconds","seconds","minutes","hours",Jn,"weeks","months",Kn];function _s(t){var e=t._range;return e||((e=t._range=an(t)).min=es(e.min),e.max=es(e.max)),e}var bs=function(t){this.options=t};bs.prototype.displayIndices=function(){return{min:0,max:1}},bs.prototype.displayRange=function(){return{}},bs.prototype.total=function(){return{}},bs.prototype.valueRange=function(){return{}},bs.prototype.valueIndex=function(){return-1},bs.prototype.values=function(){return[]},bs.prototype.totalIndex=function(){return-1},bs.prototype.valuesCount=function(){return 0},bs.prototype.totalCount=function(){return 0},bs.prototype.dateAt=function(){return null};var ws=function(t,e,i){this.options=i,i.baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=os(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&hs(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&&hs(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 As(t,e,i){for(var o,r,n,s=_s(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,c="fit"===t.baseUnit,l=e?xs.indexOf(e):0,u=c?xs[l++]:t.baseUnit,f=a/$n[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===Jr(xs)){r=Math.ceil(d/h);break}if(!c){f>h&&(r=Math.ceil(d/h));break}u=xs[l++]||Jr(xs),d=a/$n[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function Ss(t){var e=(t.baseUnit||"").toLowerCase();return"fit"!==e&&!zr(e,xs)&&function(t){for(var e,i,o=t.categories,r=Nr(o)?o.length:0,n=m,s=0;s<r;s++){var a=o[s];if(a&&e){var p=Qn(a,e);p>0&&(i=(n=Math.min(n,p))>=31536e6?Kn:n>=24192e5?"months":n>=6048e5?"weeks":n>=864e5?Jn:n>=36e5?"hours":n>=6e4?"minutes":"seconds")}e=a}t.baseUnit=i||Jn}(t),"fit"!==e&&"auto"!==t.baseUnitStep||As(t),t}ws.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},ws.prototype.displayIndices=function(){if(!this._indices){var t=this.options,e=t.baseUnit,i=t.baseUnitStep,o=ls(this.displayStart,this.valueStart,e,i),r=ls(this.displayEnd,this.valueStart,e,i);this._indices={min:o,max:r}}return this._indices},ws.prototype.total=function(){return{min:this.start,max:this.end}},ws.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},ws.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},ws.prototype.valueIndex=function(t){var e=this.options;return Math.floor(ls(t,this.valueStart,e.baseUnit,e.baseUnitStep))},ws.prototype.totalIndex=function(t){var e=this.options;return Math.floor(ls(t,this.start,e.baseUnit,e.baseUnitStep))},ws.prototype.dateIndex=function(t){var e=this.options;return ls(t,this.valueStart,e.baseUnit,e.baseUnitStep)},ws.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},ws.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=os(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},ws.prototype.dateAt=function(t,e){var i=this.options;return os(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},ws.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,a=this.start,p=ls(t,a,r,n),h=e?Math.ceil(p):Math.floor(p);return i&&(h+=i),os(a,h*n,r,s)};var ks=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=ds(i,r))._parsed=!0),o=or({roundToBaseUnit:!0},o,{categories:r,min:fs(i,o.min),max:fs(i,o.max),weekStartDay:ys(o,i)}),e.panning&&e.isPannable(o.vertical?k:S)&&(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=_s(r),s=o.maxDivisions;if(this.dataRange=new ws(n.min,n.max,Ss(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;As(p,h.baseUnit,h.baseUnitStep),this.divisionRange=new ws(n.min,n.max,p)}else this.divisionRange=this.dataRange}else o.baseUnit=o.baseUnit||Jn,this.dataRange=this.divisionRange=new bs(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 ss(t,e.min)>=0&&ss(t,e.max)<=0&&i.length},e.prototype.parseNoteValue=function(t){return fs(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=tn(t/p,10);if(a.min&&a.max){var c=ts(e.min||a.min,h),l=ts(e.max||a.max,h);a={min:os(c,0,i,o),max:os(l,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=as(o,r),s=Math.round(.1*n);t<0?(o=ts(o,s),r=ts(r,-s)):(o=ts(o,-s),r=ts(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=tn(t/(o/(s-n)),10)*(e.reverse?-1:1),h=ts(n,p),c=ts(s,p),l=this.limitRange(ps(h),ps(c),ps(a.min),ps(a.max),p);return l?(l.min=es(l.min),l.max=es(l.max),l.baseUnit=e.baseUnit,l.baseUnitStep=e.baseUnitStep||1,l.userSetBaseUnit=e.userSetBaseUnit,l.userSetBaseUnitStep=e.userSetBaseUnitStep,l):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=as(r.max,r.min)/(n.max-n.min),a=this.options;return{min:ts(r.min,o.min*s),max:ts(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,c=a.baseUnitStep,l=os(n,t*c,h,p),u=os(s,-t*c,h,p);if(i){var f,d,y=e.autoBaseUnitSteps,g=e.maxDateGroups,v=Jr(y[h])*g*$n[h],m=as(s,n),x=as(u,l),_=xs.indexOf(h);if(x<$n[h]&&"milliseconds"!==h)h=xs[_-1],l=ts(n,d=(m-(g-1)*(f=Jr(y[h]))*$n[h])/2),u=ts(s,-d);else if(x>v&&h!==Kn){var b=0;do{_++,h=xs[_],b=0,d=2*$n[h];do{f=y[h][b],b++}while(b<y[h].length&&d*f<m)}while(h!==Kn&&d*f<m);(d=(d*f-m)/2)>0&&(l=ts(n,-d),u=ts(s,d),l=ts(l,Kr(u,o.min,o.max)-u),u=ts(u,Kr(l,o.min,o.max)-l))}}return l<o.min&&(l=o.min),u>o.max&&(u=o.max),l&&u&&as(u,l)>0?{min:l,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 Hn(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=_s(this.options.srcCategories);return{min:es(t.min),max:es(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=_s(t.srcCategories);return new ws(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},e}(vs);sn(ks,{type:y,labels:{dateFormats:ms},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 Cs=ks;function Ts(t,e){return tn(Math.floor(t/e)*e,10)}function Ps(t,e){return tn(Math.ceil(t/e)*e,10)}function Ms(t){return Math.max(Math.min(t,3e5),-3e5)}var Os=Math.pow(10,-9),Rs=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=fn(r,n),a={majorUnit:s};!1!==i.roundToMajorUnit&&(r<0&&js(r,s,1/3)&&(r-=s),n>0&&js(n,s,1/3)&&(n+=s));return a.min=Ts(r,s),a.max=Ps(n,s),a}(t.seriesMin,t.seriesMax,t);return this.totalOptions=function(t,e){return{min:Nr(e.min)?Math.min(t.min,e.min):t.min,max:Nr(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=Nr(e.min),o=Nr(e.max);var n=i||o;n&&e.min===e.max&&(e.min>0?e.min=0:e.max=1),e.majorUnit?(t.min=Ts(t.min,e.majorUnit),t.max=Ps(t.max,e.majorUnit)):n&&(r=or(t,e),t.majorUnit=fn(r.min,r.max))}t.minorUnit=(r.majorUnit||t.majorUnit)/5;var s=or(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(tn(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=[],c=n[(o?k:S)+(1===p?1:2)],l=0;e&&(l=e/t);for(var u=0;u<a;u++)u%l!=0&&h.push(tn(c,3)),c+=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?k:S,h=this.lineBox(),c=h[p+(a?2:1)],l=(a?-1:1)*((s?h.height():h.width())/(n.max-n.min)),u=new gn(h.x1,h.y1,h.x1,h.y1),f=t,d=e;return Nr(f)||(f=d||0),Nr(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]=Ms(c+l*(a?r:o)),u[p+2]=Ms(c+l*(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?k:S,a=this.lineBox(),p=a[s+(o?2:1)],h=i?a.height():a.width(),c=(o?-1:1)*(t[s]-p),l=c*((r-n)/h);return c<0||c>h?null:tn(i?r-l:n+l,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=tn(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=tn(i.min+t*i.majorUnit,10),r=this.axisLabelText(o,null,e);return new Hn(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=Kr(o.min,e,i),n=Kr(o.max,e,i);if(this.isValidRange(r,n))return{min:r,max:n}},e.prototype.isValidRange=function(t,e){return e-t>Os},e}(Zn);function js(t,e,i){var o=tn(Math.abs(t%e),10);return 0===o||o>e*(1-i)}sn(Rs,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},labels:{format:"#.####################"},zIndex:1});var Bs=Rs,Is=function(t){function e(e,i,o,r){var n=es(e),s=es(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=Kn:t>=26784e5?e="months":t>=6048e5?e="weeks":t>=864e5&&(e=Jn);return e}(Qn(r,o)):"hours"),s=$n[n],a=i.weekStartDay||0,p=rs(ps(o)-1,n,a)||es(r),h=ns(ps(r)+1,n,a),c=(i.majorUnit?i.majorUnit:void 0)||Ps(fn(p.getTime(),h.getTime()),s)/s,l=us(p,h,n),u=Ps(l,c)-l,f=Math.floor(u/2),d=u-f;i.baseUnit||delete i.baseUnit;return i.baseUnit=i.baseUnit||n,i.min=i.min||os(p,-f,n,a),i.max=i.max||os(h,d,n,a),i.minorUnit=i.minorUnit||c/5,i.majorUnit=c,i}(n,s,p=or(p||{},{min:fs(a,p.min),max:fs(a,p.max),axisCrossingValue:ds(a,p.axisCrossingValues||p.axisCrossingValue),weekStartDay:ys(p,a)})),t.call(this,p,r),this.intlService=a,this.seriesMin=n,this.seriesMax=s;var h=p.weekStartDay||0;this.totalMin=ps(rs(ps(n)-1,p.baseUnit,h)),this.totalMax=ps(ns(ps(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(us(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?k:S)+(1===r?1:2)],s=this.getDivisions(t),a=as(e.max,e.min),p=(i?o.height():o.width())/a,h=e.weekStartDay||0,c=[n],l=1;l<s;l++){var u=n+as(os(e.min,l*t,e.baseUnit,h),e.min)*p*r;c.push(tn(u,3))}return c},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 Bs.prototype.getSlot.call(this,fs(this.intlService,t),fs(this.intlService,e),i)},e.prototype.getValue=function(t){var e=Bs.prototype.getValue.call(this,t);return null!==e?es(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=os(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 Hn(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/as(a.max,a.min),h=tn(t/p,10)*(i.reverse?-1:1),c=ts(i.min,h),l=ts(i.max,h);return e||(c=os(c,0,o,r),l=os(l,0,o,r)),{min:c,max:l,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=as(i,o),s=Math.round(.1*n);t<0?(i=ts(i,s),o=ts(o,-s)):(i=ts(i,-s),o=ts(o,s))}return{min:i,max:o}},e.prototype.shouldRenderNote=function(t){var e=this.range();return ss(t,e.min)>=0&&ss(t,e.max)<=0},e.prototype.pan=function(t){var e=this.translateRange(t,!0),i=this.limitRange(ps(e.min),ps(e.max),this.totalMin,this.totalMax,e.offset);if(i)return{min:es(i.min),max:es(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:es(r),max:es(n)}},e.prototype.zoomRange=function(t){var e=this.scaleRange(t);return{min:es(Kr(ps(e.min),this.totalMin,this.totalMax)),max:es(Kr(ps(e.max),this.totalMin,this.totalMax))}},e}(Zn);sn(Is,{type:y,majorGridLines:{visible:!0,width:1,color:l},labels:{dateFormats:ms}});var zs=Is,Ls=function(t){function e(e,i,o,r){var n=or({majorUnit:10,min:e,max:i},o),s=n.majorUnit,a=function(t,e){var i,o=tn(Vs(t,e),10)%1;i=t<=0?e:0!==o&&(o<.3||o>.9)?Math.pow(e,Vs(t,e)+.2):Math.pow(e,Math.ceil(Vs(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(Vs(t,o))));return r}(e,i,n),h=function(t,e,i,o){var r=i.min,n=i.max;Nr(i.axisCrossingValue)&&i.axisCrossingValue<=0&&Es();Nr(o.max)?o.max<=0&&Es():n=e;Nr(o.min)?o.min<=0&&Es():r=t;return{min:r,max:n}}(p,a,n,o);n.max=h.max,n.min=h.min,n.minorUnit=o.minorUnit||tn(s-1,10),t.call(this,n,r),this.totalMin=Nr(o.min)?Math.min(p,o.min):p,this.totalMax=Nr(o.max)?Math.max(a,o.max):a,this.logMin=tn(Vs(h.min,s),10),this.logMax=tn(Vs(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,c=n.majorUnit,l=h?k:S,u=this.lineBox(),f=u[l+(p?2:1)],d=(p?-1:1)*((h?u.height():u.width())/(a-s)),y=new gn(u.x1,u.y1,u.x1,u.y1),g=t,v=e;return Nr(g)||(g=v||1),Nr(v)||(v=g||1),g<=0||v<=0?null:(i&&(g=Math.max(Math.min(g,n.max),n.min),v=Math.max(Math.min(v,n.max),n.min)),g=Vs(g,c),v=Vs(v,c),h?(o=a-Math.max(g,v),r=a-Math.min(g,v)):(o=Math.min(g,v)-s,r=Math.max(g,v)-s),y[l+1]=Ms(f+d*(p?r:o)),y[l+2]=Ms(f+d*(p?o:r)),y)},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,c=n?a.height():a.width(),l=(o-i)/c,u=n?k:S,f=a[u+h],d=p*(t[u]-f);if(d<0||d>c)return null;var y=i+d*l;return tn(Math.pow(s,y),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=tn(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(Xn(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){zr(t,a)||(s.position=t,p.append(Yn(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(tn(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,c=this.logMin,l=this.logMax,u=Math.floor(c);u<l;u++)for(var f=this._minorIntervalOptions(u),d=e.skip;d<n;d+=e.step){var y=f.value+d*f.minorStep;if(y>r)break;if(y>=o)t(tn(p+h*(Vs(y,s)-c),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 Hn(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=Kr(r.min,i,o),s=Kr(r.max,i,o),a=e.majorUnit,p=s>n&&e.min&&e.max&&tn(Vs(e.max,a)-Vs(e.min,a),10)<1,h=!(e.min===i&&e.max===o)&&tn(Vs(s,a)-Vs(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?k:S,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}(Zn);function Es(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Vs(t,e){return Math.log(t)/Math.log(e)}sn(Ls,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:l},zIndex:1,_deferLabels:!0});var Fs=Ls,Ds={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),Gr(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 p.Circle([n.x,n.y],e),h=this.gridLinesVisual(),c=0;c<t.length;c++){var l=new a.Path(r);o&&(s.radius=o(t[c])),l.moveTo(s.center).lineTo(s.pointAt(t[c]+180)),h.append(l)}return h.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 Fr(s,(function(t){var e=n.intervalAngle(t);if(!p||90!==e)return e}))}},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.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 gn,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,c=e||0;c<n;c+=a)h=r.reverse?360-c*s:c*s,h=tn(h,3)%360,o&&zr(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 Fr(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!==c){var o=Qr(360/(2*this.options.categories.length)),r=Math.cos(o)*t,n=this.majorAngles(),s=function(e){return!i&&zr(e,n)?t:r};return s}},e.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new a.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 p=Math.ceil(o.to)-o.to;r.angle-=(p+s)*n.angle;var h=bn.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(h)}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=Kr(Math.floor(p),0,s-1)];o&&(h-=a/2)<0&&(h+=360);var c=a*(Kr(Math.ceil(e||p),p,s-1)-p+1);return new mn(r.center(),0,r.height()/2,h,c)},e.prototype.slot=function(t,e){var i=this.getSlot(t,e),o=i.startAngle+180,r=o+i.angle;return new p.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}(vs);sn(Us,{startAngle:90,labels:{margin:hr(10)},majorGridLines:{visible:!0},justified:!0}),or(Us.prototype,Ds);var Gs=Us,Hs=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 Bs.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 gn,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&&zr(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=Kr(t,i.min,i.max),s=Kr(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 mn(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),h=Math.max(t,e);return r.reverse?(i=a,o=h):(i=360-h,o=360-a),i=(i+n)%360,o=(o+n)%360,new p.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(qr(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}(Zn);sn(Hs,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:hr(10)},majorGridLines:{color:l,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),or(Hs.prototype,Ds,{createPlotBands:Gs.prototype.createPlotBands,majorAngles:Gs.prototype.majorAngles,range:Bs.prototype.range,labelsCount:Bs.prototype.labelsCount,createAxisLabel:Bs.prototype.createAxisLabel});var Ns=Hs;function qs(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Xs={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,r=o.majorAngles(),n=o.box.center(),s=this._plotbandGroup=new a.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}},u=this.getSlot(h.from,h.to,!0),f=new mn(n,n.y-u.y2,n.y-u.y1,0,360),d=void 0;d=e===c?bn.current.createRing(f,l):a.Path.fromPoints(this.plotBandPoints(f,r),l).close(),s.append(d)}this.appendVisual(s)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new p.Circle(r,t.innerRadius),s=new p.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();Gr(n,this.renderGridLines(r,s,o,e.minorGridLines))}return n},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip;void 0===n&&(n=0);var s=o.step;void 0===s&&(s=0);for(var h=this.gridLinesVisual(),l=n;l<e.length;l+=s){var u=t.y-e[l];if(u>0){var f=new p.Circle([t.x,t.y],u);if(o.type===c)h.append(new a.Circle(f,r));else{for(var d=new a.Path(r),y=0;y<i.length;y++)d.lineTo(f.pointAt(i[y]+180));d.close(),h.append(d)}}}return h.children},getValue:function(t){var e=this.lineBox(),i=this.plotArea.polarAxis,o=i.majorAngles(),r=i.box.center(),n=t.distanceTo(r),s=n;if(this.options.majorGridLines.type!==c&&o.length>1){var a=t.x-r.x,p=t.y-r.y,h=(qr(Math.atan2(p,a))+540)%360;o.sort((function(t,e){return qs(t,h)-qs(e,h)}));var l=90-qs(o[0],o[1])/2,u=180-qs(h,o[0])-l;s=n*(Math.sin(Qr(u))/Math.sin(Qr(l)))}return this.axisType().prototype.getValue.call(this,new dn(e.x1,e.y2-s))}},Ys=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}(Bs);or(Ys.prototype,Xs);var Ws=Ys,Zs=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}(Fs);or(Zs.prototype,Xs);var Js=Zs;function Ks(t){return t<=0?-1:1}var $s=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],h=e[1],c=e[2];for(i.push(new p.Segment(a));a.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){var l=this.tangent(a,h,S,k);return Jr(i).controlOut(this.firstControlPoint(l,a,h,S,k)),i.push(new p.Segment(h,this.secondControlPoint(l,a,h,S,k))),i}if(o){a=e[r-1],h=e[0],c=e[1];var u=this.controlPoints(a,h,c);n=u[1],s=u[0]}else{var f=this.tangent(a,h,S,k);n=this.firstControlPoint(f,a,h,S,k)}for(var d=n,y=0;y<=r-3;y++)if(this.removeDuplicates(y,e),y+3<=(r=e.length)){a=e[y],h=e[y+1],c=e[y+2];var g=this.controlPoints(a,h,c);Jr(i).controlOut(d),d=g[1];var v=g[0];i.push(new p.Segment(h,v))}if(o){a=e[r-2],h=e[r-1],c=e[0];var m=this.controlPoints(a,h,c);Jr(i).controlOut(d),i.push(new p.Segment(h,m[0])),Jr(i).controlOut(m[1]),i.push(new p.Segment(c,s))}else{var x=this.tangent(h,c,S,k);Jr(i).controlOut(d),i.push(new p.Segment(c,this.secondControlPoint(x,h,c,S,k)))}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||tn(r,1)===tn(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=S,n=k,s=!1,a=!1;if(this.isLine(t,e,i))o=this.tangent(t,e,S,k);else{var p={x:this.isMonotonicByField(t,e,i,S),y:this.isMonotonicByField(t,e,i,k)};if(p.x&&p.y)o=this.tangent(t,i,S,k),s=!0;else if(this.invertAxis(t,e,i)&&(r=k,n=S),p[r])o=0;else o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Ks((i[n]-t[n])*(e[r]-t[r])):-Ks((i[r]-t[r])*(e[n]-t[n]))),a=!0}var h=this.secondControlPoint(o,t,e,r,n);if(a){var c=r;r=n,n=c}var l=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,l,o)),[h,l]},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 p.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}(O),Qs=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}(O);function ta(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Qs(e[i])}var ea=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};ea.prototype.findAxisByName=function(t){return ta(t,this._pane.axes)};var ia=ea,oa=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}(O);function ra(t){for(var e=t.length,i=0,o=0;o<e;o++){$o(t[o])&&i++}return i}var na={min:function(t){for(var e=t.length,i=m,o=0;o<e;o++){var r=t[o];$o(r)&&(i=Math.min(i,r))}return i===m?t[0]:i},max:function(t){for(var e=t.length,i=x,o=0;o<e;o++){var r=t[o];$o(r)&&(i=Math.max(i,r))}return i===x?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];$o(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return ra(t)&&(e=na.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&Nr(r)&&i++}return i},avg:function(t){var e=ra(t),i=t[0];return e>0&&(i=na.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&Nr(o))return o}return t[0]}},sa=na;function aa(t,e){return null===e?e:Or(t)(e)}var pa=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=[w]),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]||[w]},e.prototype.otherFields=function(t){return this._otherFields[t.type]||[w]},e.prototype.bindPoint=function(t,e,i){var o,r,n=t.data,s=Nr(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(Nr(s)){if(Array.isArray(s)){var c=s.slice(p.length);r=this._bindFromArray(s,p),o=this._bindFromArray(c,h)}else if("object"==typeof s){var l=this.sourceFields(t,p),u=this.sourceFields(t,h);r=this._bindFromObject(s,p,l),o=this._bindFromObject(s,h,u)}}else r=this._undefinedValue[t.type];return Nr(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]=aa(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===w?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},e}(O);pa.current=new pa;var ha=pa,ca=/percent(?:\w*)\((\d+)\)/,la=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),ua=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=la.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=ha.current,n=r.valueFields(t),s=Nr(o[0])?o[0]:{};if(C(s))i=Or("["+(e?n.indexOf(e):0)+"]");else if($o(s))i=Or();else if("object"==typeof s){i=Or(r.sourceFields(t,n)[n.indexOf(e)])}return i},e.prototype.getErrorRange=function(t,e){var i,o,r;if(!Nr(e))return null;if(this.globalRange)return this.globalRange(t);if(C(e))i=t-e[0],o=t+e[1];else if($o(r=parseFloat(e)))i=t-r,o=t+r;else{if(!(r=ca.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]);$o(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]);$o(n)&&(i+=n,o++)}return{value:i/o,count:o}},e}(O),fa=Si.browser||{},da=fa.msie?.001:0,ya="zero",ga="bar",va="column",ma="line",xa="pie",_a="verticalLine",ba=[ga,va,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],wa="DOMMouseScroll mousewheel",Aa=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 dn(n.x,r.y1),new dn(n.x,r.y2)],i&&e.push(new dn(p,r.y1),new dn(h,r.y1),new dn(p,r.y2),new dn(h,r.y2)),this.box=new gn(p,r.y1,h,r.y2)):(e=[new dn(r.x1,n.y),new dn(r.x2,n.y)],i&&e.push(new dn(r.x1,p),new dn(r.x1,h),new dn(r.x2,p),new dn(r.x2,h)),this.box=new gn(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 a.Path(o).moveTo(i[r].x,i[r].y).lineTo(i[r+1].x,i[r+1].y);Jo(n),this.visual.append(n)}},e}(An);sn(Aa,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Sa=Aa,ka=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}(Sa);function Ca(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(!zr(a,i.excluded)&&t.hasOwnProperty(a)){var p=t[a];er(p)?(s=!0,o||(t[a]=on(p(e),r[a]))):rr(p)&&(o||(i.defaults=r[a]),i.depth++,s=Ca(p,e,i,o)||s,i.depth--)}return s}function Ta(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var Pa=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=or({},o,{vertical:!this.options.invertAxes},t)}return i},e.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&$o(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;$o(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,c=p.series.stack;if(h&&c){if("string"==typeof h&&h!==c)continue;if(h.group&&h.group!==c.group)continue}var l=this.plotValue(p);(l>=0&&r||l<0&&!r)&&(n+=l,o+=l,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,tr(t.value)?t.value:d]},e.prototype.stackLimits=function(t,e){for(var i=m,o=x,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];Nr(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,an(h.negative).min)),h.positive.length&&(p.max=Math.max(p.max,an(h.positive).max))),p.min!==m||p.max!==x?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;$o(p)&&$o(h)?o={low:p,high:h}:a&&Nr(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new ua(a.value,n,w),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 ka(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,Nr(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];Nr(a)||(this._evalSeries[n]=a=Ca(t,{},s,!0));var p=t;return a&&Ca(p=or({},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:m,max:x}).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),c=o[n++],l=i[a];if(l||(i[a]=l=e.categorySlot(r,a,h)),c){var u=e.plotRange(c,h.startValue()),f=e.valueSlot(h,u);if(f){var d=e.pointSlot(l,f);c.aboveAxis=e.aboveAxis(c,h),c.stackValue=u[1],e.options.isStacked100&&(c.percentage=e.plotValue(c)),e.reflowPoint(c,d)}else c.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(Jr(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 gn(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=Ta(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]=ha.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}(An);sn(Pa,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Ma=Pa,Oa=function(t){function e(i){var o=this;if(t.call(this),1===arguments.length)for(var r=e.formats,n=this.resolveColor(i),s=0;s<r.length;s++){var a=r[s].re,p=r[s].process,h=a.exec(n);if(h){var c=p(h);o.r=c[0],o.g=c[1],o.b=c[2]}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toHex=function(){var t=this.padDigit,e=this.r.toString(16),i=this.g.toString(16),o=this.b.toString(16);return"#"+t(e)+t(i)+t(o)},e.prototype.resolveColor=function(t){var i=t||"black";return"#"===i.charAt(0)&&(i=i.substr(1,6)),i=(i=i.replace(/ /g,"")).toLowerCase(),i=e.namedColors[i]||i},e.prototype.normalizeByte=function(t){return t<0||isNaN(t)?0:t>255?255:t},e.prototype.padDigit=function(t){return 1===t.length?"0"+t:t},e.prototype.brightness=function(t){var e=Math.round;return this.r=e(this.normalizeByte(this.r*t)),this.g=e(this.normalizeByte(this.g*t)),this.b=e(this.normalizeByte(this.b*t)),this},e.prototype.percBrightness=function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},e.prototype.isDark=function(){return this.percBrightness()<180},e.fromBytes=function(t,e,i,o){return new wo(t,e,i,null!=o?o:1)},e.fromRGB=function(t,e,i,o){return new bo(t,e,i,null!=o?o:1)},e.fromHSV=function(t,e,i,o){return new So(t,e,i,null!=o?o:1)},e.fromHSL=function(t,e,i,o){return new ko(t,e,i,null!=o?o:1)},e}(O);Oa.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],Oa.namedColors=vo;var Ra=Oa,ja={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:Wr(t),originalEvent:t,point:this}}},Ba={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&Nr(e)&&null!==e&&(this.note=new qn({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Ia=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=on(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=Tr(i),r=this.pointData(),n=this.value;o?n=o(r):i.format&&(n=this.formatValue(i.format)),this.label=new Fn(n,or({align:f,vAlign:f,margin:{left:5,right:5},zIndex:on(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=or({color:this.color},t.border);return Nr(i.color)||(i.color=new Ra(e).brightness(.8).toHex()),i},e.prototype.createVisual=function(){},e.prototype.createMarker=function(){var t=this.options.markers;return new Tn({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:on(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 gn(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?b:o)?u: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 Tn({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:on(t.border.opacity,1)},opacity:on(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 p.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=u):(i=t.y2,o=b),{point:new dn(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}(An);Ia.prototype.defaults={vertical:!0,markers:{visible:!0,background:A,size:8,type:d,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:hr(3),padding:hr(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},or(Ia.prototype,ja),or(Ia.prototype,Ba);var za=Ia,La=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&&!Nr(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;er(i)&&o&&(i=o.color);var r=a.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}(An);sn(La,{closed:!1});var Ea=La;function Va(t,e,i,o,r){var n=t.box,s=new p.Point;return s[e]=n[e+i],s[o]=n[o+r],s}var Fa={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,r=e.reverse,n=o?S:k,s=o?k:S,a=r?2:1,h=a,c=Va(t[0],n,a,s,h),l=[c],u=1;u<t.length;u++){var f=Va(t[u],n,a,s,h);if(c[n]!==f[n]){var d=new p.Point;d[n]=c[n],d[s]=f[s],l.push(d,f)}c=f}return i?c!==Jr(l)&&l.push(c):l.push(Va(Jr(t),n,a,s,r?1:2)),l}},Da=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}(Ea);or(Da.prototype,Fa);var Ua=Da,Ga=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;er(i)&&e&&(i=e.color);var o=new $s(this.options.closed).process(this.points()),r=new a.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}(Ea),Ha={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=[],c=0;c<p;c++){var l=a[c];l?h.push(l):"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?ya:e||"interpolate"},getNearestPoint:function(t,e,i){for(var o,r=new dn(t,e),n=this.seriesPoints[i],s=m,a=0;a<n.length;a++){var p=n[a];if(p&&Nr(p.value)&&null!==p.value&&!1!==p.visible){var h=p.box.center().distanceTo(r);h<s&&(o=p,s=h)}}return o}},Na=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(Lr(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}(a.Animation);sn(Na,{duration:600}),a.AnimationFactory.current.register("clip",Na);var qa=Na;function Xa(t){for(var e=0;e<t.length;e++)if(Nr(t[e].zIndex))return!0}var Ya={createAnimation:function(){var t=this.getRoot();if(t&&!1!==(t.options||{}).transitions){var e=t.size(),i=a.Path.fromRect(e.toRect());this.visual.clip(i),this.animation=new qa(i,{box:e}),Xa(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&&Nr(o.visual.options.zIndex)&&o.visual.clip(t)}}},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.render=function(){t.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},e.prototype.pointType=function(){return za},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(!Nr(a)||null===a){if(s!==ya)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;er(r.color)&&(h=p.color);var c=new za(a,p);return c.color=h,this.append(c),c},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?Ua:"smooth"===o?Ga:Ea)(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}(Ma);or(Wa.prototype,Ha,Ya);var Za=Wa,Ja=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;er(o)&&e&&(o=e.color),this.visual=new a.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),i.width>0&&!1!==i.visible&&this.createStroke({stroke:or({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 p.Segment(t)}))},e.prototype.createStroke=function(t){var e=new a.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();Gr(i,r)}var n=new a.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=Jr(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}(Ea),Ka=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}(Ja);or(Ka.prototype,Fa);var $a=Ka,Qa=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 $s(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 p.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},e}(Ja),tp=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?$a:"smooth"===a?Qa:Ja)(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 c=h+a,l=e,u=void 0;do{u=o[--l][c]}while(l>0&&!u);if(u)"step"!==i&&h>r&&!o[l][c-1]&&p.push(this._previousSegmentPoint(h,c,c-1,l)),p.push(u),"step"!==i&&h+1<s&&!o[l][c+1]&&p.push(this._previousSegmentPoint(h,c,c+1,l));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 za(0,e);return i.categoryIx=t,i.series={},i},e.prototype.seriesMissingValues=function(t){return t.missingValues||ya},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(Za),ep=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:m,max:x},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}(O),ip=function(t){function e(e,i,o){t.call(this,i),this.textBox=new Fn(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,s=r.box,a=r.options.padding,p=t;n.align=i?f:v,n.vAlign=i?b:f,"insideEnd"===e.position?i?(n.vAlign=b,!o&&s.height()<t.height()&&(n.vAlign=u)):n.align=o?_:v:e.position===f?(n.vAlign=f,n.align=f):"insideBase"===e.position?i?n.vAlign=o?u:b:n.align=o?v:_:"outsideEnd"===e.position&&(i?p=o?new gn(t.x1,t.y1-s.height(),t.x2,t.y1):new gn(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=f,p=o?new gn(t.x2,t.y1,t.x2+s.width(),t.y2):new gn(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},e.prototype.alignToClipBox=function(t){var e=this.options.vertical?k:S,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}(An);sn(ip,{position:"outsideEnd",margin:hr(3),padding:hr(4),color:l,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var op=ip;function rp(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}var np=function(t){function e(e,i){t.call(this),this.options=i,this.color=i.color||A,this.aboveAxis=on(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=Tr(e);i=r?r(o):this.formatValue(e.format),this.label=new op(i,or({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 a.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=Nr(i.opacity)?i.opacity:e.opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);var n=this.rectVisual=a.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(),p=this.box.height();if((e.vertical?s:p)>6&&(Jo(n),(s<1||p<1)&&(n.options.stroke.lineJoin="round")),t.append(n),rp(e)){var h=this.createGradientOverlay(n,{baseColor:this.color},or({end:e.vertical?void 0:[0,1]},e.overlay));t.append(h)}},e.prototype.createHighlight=function(t){return Jo(a.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 Nr(o)||(o=new Ra(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,s=v,a=b;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),a=u);else{var p=Math.max(o.x1,n.x1),h=Math.min(o.x2,n.x2);i.isStacked?(a=u,r?(s=_,t=h):t=p,e=Math.max(o.y1,n.y1)-5):(r?t=h+5:(t=p-5,s=_),e=Math.max(o.y1,n.y1))}return{point:new dn(t,e),align:{horizontal:s,vertical:a}}},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}(An);or(np.prototype,ja),or(np.prototype,Ba),np.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var sp=np;function ap(t,e){t.forEach(e)}function pp(t,e){for(var i=t.length,o=i-1;o>=0;o--)e(t[o],o-i-1)}var hp=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?pp:ap}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?k:S,p=s+o+r*(s-1),h=(i?t.height():t.width())/p,c=t[a+1]+h*(o/2);this.forEach(n,(function(e,i){var o=(e.box||t).clone();o[a+1]=c,o[a+2]=c+h,e.reflow(o),i<s-1&&(c+=h*r),c+=h}))},e}(An);sn(hp,{vertical:!1,gap:0,spacing:0});var cp=hp,lp=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?S:k,i=this.children,o=i.length,r=this.box=new gn,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}(An);sn(lp,{vertical:!0});var up=lp,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.render=function(){t.prototype.render.call(this),this.updateStackRange()},e.prototype.pointType=function(){return sp},e.prototype.clusterType=function(){return cp},e.prototype.stackType=function(){return up},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),c=this.pointOptions(r,n),l=c.labels;p&&"outsideEnd"===l.position&&(l.position="insideEnd"),c.isStacked=p;var u=t.fields.color||r.color;h<0&&c.negativeColor&&(u=c.negativeColor),c=this.evalPointOptions(c,h,o,i,r,n),er(r.color)&&(u=c.color);var f=new(this.pointType())(h,c);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?S:k;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),Xa(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&&Nr(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 p.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e}(Ma);sn(fp,{animation:{type:ga}});var dp=fp,yp=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 a.Group;return this.createBody(e,t),this.createLines(e,t),e},e.prototype.createBody=function(t,e){var i=a.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:on(e.border.opacity,e.opacity)}),Jo(i),t.append(i),rp(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},or({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:on(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=a.Path.fromPoints(i[n],r);Jo(s),t.append(s)}},e.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return Nr(e)||(e=new Ra(this.color).brightness(t._brightness).toHex()),e},e.prototype.createOverlay=function(){var t=a.Path.fromRect(this.box.toRect(),{fill:{color:A,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(or({},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 dn(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:v,vertical:b}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e}(An);sn(yp,{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:{}}}),or(yp.prototype,ja),or(yp.prototype,Ba);var gp=yp;function vp(t){return ra(t)===t.length}var mp=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,c=vp(this.splitValue(h)),l=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),c&&(i=this.createPoint(t,e));var f=a[o];f||(f=new cp({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=l,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return gp},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=or({},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),er(r.color)&&(h=p.color),p.vertical=!this.options.invertAxes;var c=new s(a,p);return c.color=h,c},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:m,max:x},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}(Ma);or(mp.prototype,Ya);var xp=mp,_p=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=or({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);Nr(p.color)||(Nr(this.color)?p.color=this.color:p.color=new Ra(n.background).brightness(.8).toHex());var h=new Tn({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}(gp);sn(_p,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:A,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:d,background:A,border:{width:2,opacity:1},opacity:0}}),or(_p.prototype,ja);var bp=_p,wp=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}(bp),Ap=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,c=vp(this.splitValue(h)),l=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),c&&(i=this.createPoint(t,e));var f=a[o];f||(f=new cp({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=l),this.points.push(i),u.push(i)},e.prototype.pointType=function(){return this.options.invertAxes?wp:bp},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));Nr(t.mean)&&(r=r.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:m,max:x},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];Nr(r)&&null!==r&&i.push(r)}return i},e.prototype.supportsPointInactiveOpacity=function(){return!1},e}(xp),Sp=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}(Sa);function kp(t){return Nr(t)&&null!==t}var Cp=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,c=t.options.errorBars,l=i[s],u=i[a];$o(r)&&($o(l)&&$o(u)&&(o={low:l,high:u}),c&&Nr(c[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new ua(c[n],h,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,c[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===k,p={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];var h=new Sp(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;kp(o)&&kp(r)||(h=this.createMissingValue(h,a)),h&&((i=this.createPoint(h,e))&&(Object.assign(i,e),this.addErrorBar(i,S,e),this.addErrorBar(i,k,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];kp(n)&&(a=this.xAxisRanges[o]=a||{min:m,max:x},Qo(n)&&(n=fs(i,n)),a.min=Math.min(a.min,n),a.max=Math.max(a.max,n)),kp(s)&&(p=this.yAxisRanges[r]=p||{min:m,max:x},Qo(s)&&(s=fs(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];Nr(s)||(this._evalSeries[r]=s=Ca(t,{},n,!0));var a=t;return s&&Ca(a=or({},t),{value:e,series:o,dataItem:i.dataItem},n),a},e.prototype.pointType=function(){return za},e.prototype.pointOptions=function(t,e){var i=this.seriesOptions[e];if(!i){var o=this.pointType().prototype.defaults;this.seriesOptions[e]=i=or({},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),er(i.color)&&(r=o.color);var n=new za(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 c=e.pointSlot(p,h);s.reflow(c)}else s.visible=!1})),this.box=t},e.prototype.pointSlot=function(t,e){return new gn(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,or({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}(An);sn(Cp,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),or(Cp.prototype,Ya,{_bindPoint:Ma.prototype._bindPoint});var Tp=Cp,Pp=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 a.Group,s=new a.Circle(new p.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}]})}),h=new a.Circle(new p.Circle([o.x,o.y],r),{stroke:{color:e.color||new Ra(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,h),n},e}(za);Pp.prototype.defaults=or({},Pp.prototype.defaults,{labels:{position:f},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Pp.prototype.defaults.highlight.zIndex=void 0;var Mp=Pp,Op=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=x,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 Mp},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=on(i.negativeValues.color,s));var a=or({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:d,border:i.border,opacity:i.opacity,animation:n}});a=this.evalPointOptions(a,t,e),er(i.color)&&(s=a.color),a.markers.background=s;var p=new Mp(t,a);return p.color=s,this.append(p),p},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,c=0;c<n.length;c++){var l=n[c];if(l){var u=Math.abs(l.value.size)*h,f=Math.sqrt((p+u)/Math.PI),d=on(l.options.zIndex,0)+(1-f/a);or(l.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}(Tp);sn(Op,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Rp=Op,jp=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}(Tn);or(jp.prototype,ja);var Bp=jp,Ip=function(t){function e(e,i){t.call(this,i),this.aboveAxis=this.options.aboveAxis,this.color=i.color||A,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,Nr(this.value.target)&&(this.target=new Bp({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:b,align:_}),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 c=new gn(p.x1,h.y1,p.x2,h.y2);i.options.height=r?c.height():e.target.line.width,i.options.width=r?e.target.line.width:c.width(),i.reflow(c)}this.note&&this.note.reflow(t),this.box=t},e.prototype.createVisual=function(){t.prototype.createVisual.call(this);var e=this.options,i=a.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:on(e.border.opacity,e.opacity)}),this.bodyVisual=i,Jo(i),this.visual.append(i)},e.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=a.Animation.create(this.bodyVisual,this.options.animation))},e.prototype.createHighlight=function(t){return a.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}(An);Ip.prototype.tooltipAnchor=sp.prototype.tooltipAnchor,sn(Ip,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),or(Ip.prototype,ja),or(Ip.prototype,Ba);var zp=Ip,Lp=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||C(r[0])||rr(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=or({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),c=t.fields.color||r.color;h=this.evalPointOptions(h,p,o,i,r,n),er(r.color)&&(c=h.color);var l=new zp(p,h);l.color=c;var u=a[i];return u||(u=new cp({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(u)),u.append(l),l},e.prototype.updateRange=function(t,e){var i=t.current,o=t.target,r=e.series.axis,n=this.valueAxisRanges[r];Nr(i)&&!isNaN(i)&&Nr(o&&!isNaN(o))&&((n=this.valueAxisRanges[r]=n||{min:m,max:x}).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}(Ma);Lp.prototype._setAnimationOptions=dp.prototype._setAnimationOptions,sn(Lp,{animation:{type:ga}});var Ep=Lp,Vp=function(t){function e(e,i){t.call(this),this.chartService=e,this.options=or({},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=on(i,r),o=on(o,r)}var n=hr(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:nr(t.border.width),paddingTop:nr(n.top),paddingBottom:nr(n.bottom),paddingLeft:nr(n.left),paddingRight:nr(n.right)}},e.prototype.show=function(t,e,i){t.format=e.format;var o=this.getStyle(e,i);t.style=o,!Nr(e.color)&&new Ra(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}(O);sn(Vp,{border:{width:1},opacity:1});var Fp=Vp,Dp=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===y&&(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,s=r.padding,a=!o.axis.options.vertical,p=o.line.bbox();return a?(t=f,n===u?(e=b,i=p.bottomLeft().translate(0,s)):(e=u,i=p.topLeft().translate(0,-s))):(e=f,n===v?(t=_,i=p.topLeft().translate(-s,0)):(t=v,i=p.topRight().translate(s,0))),{point:i,align:{horizontal:t,vertical:e}}},e}(Fp);sn(Dp,{padding:10});var Up=Dp,Gp=function(t){function e(e,i,o){t.call(this,o),this.axis=i,this.stickyMode=i instanceof vs;var r=this.options.tooltip;r.visible&&(this.tooltip=new Up(e,this,or({},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?k:S,s=new p.Point(r.x1,r.y1);if(t=o?new p.Point(r.x2,r.y1):new p.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?S:k,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 a.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}(An);sn(Gp,{color:l,width:2,zIndex:-1,tooltip:{visible:!1}});var Hp=Gp,Np=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 a.Group({zIndex:0}),this.shouldClip()){var t=(this.clipBox=this._clipBox()).toRect(),e=a.Path.fromRect(t);Jo(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}(An);Np.prototype.isStackRoot=!0;var qp=Np,Xp=function(t){function e(e){t.call(this,e),this.id="pane"+Yp++,this.createTitle(),this.content=new An,this.chartContainer=new qp({},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;rr(t)&&(t=or({},t,{align:t.position,position:b})),this.title=Un.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;Jr(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&&Gr(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 gn,o=0;o<e;o++){var r=t[o],n=r.options.vertical?k:S,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 c=a[h];if(!c.options.vertical){var l=c.lineBox();i.x1=l.x1,i.x2=l.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 ia(this),index:this.paneIndex,name:this.options.name})},e}(kn),Yp=1;Xp.prototype.isStackRoot=!0,sn(Xp,{zIndex:-1,shrinkToFit:!0,title:{align:v},visible:!0});var Wp=Xp;function Zp(t,e){null!==e&&t.push(e)}function Jp(t,e,i){var o=e.visible;if(Nr(o))return o;var r=t.pointVisibility;return r?r[i]:void 0}function Kp(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=ha.current.bindPoint(t,n),a=s.valueFields.value;Qo(a)&&(a=parseFloat(a)),$o(a)?(s.visible=!1!==Jp(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 $p(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Qp(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];zr(n.type,o)&&i.push(n)}return i}function th(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=fs(i,Or(t)(e)),e[o]=r),r}function eh(t,e){var i=t.type,o=e instanceof Date;return!i&&o||$p(i,y)}function ih(t){return 1===t.length?t[0]:t}var oh=/area/i;function rh(t,e){var i=ha.current.bindPoint(t,null,e).valueFields;for(var o in i)if(tr(i[o]))return!0}function nh(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,c=o;do{p(c+=r)&&(e=rh(h,(i=a(c)).item))}while(n<=c&&c<=s&&!e);if(e)return i}function sh(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,c,l;if("interpolate"!==function(t){return t.missingValues?t.missingValues:oh.test(t.type)||t.stack?ya:"interpolate"}(t))a&&(h=o(n-1)),p&&(c=o(s+1));else a&&(h=rh(t,(l=o(n-1)).item)?l:nh({start:n,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),p&&(c=rh(t,(l=o(s+1)).item)?l:nh({start:s,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}));h&&(t._outOfRangeMinPoint=h),c&&(t._outOfRangeMaxPoint=c)}}var ah=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=or({title:{color:t.color}},e),s=0;s<o;s++){var a=or({},n,i[s]);Qo(a.title)&&(a.title=or({text:a.title},n.title));var p=new Wp(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 Hp(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 c=p.name,l=h?Tr(o):Tr(n)||Tr(o);l&&(c=l({text:kp(c)?c:"",series:p}));var u=p._defaults,f=p.color;er(f)&&u&&(f=u.color);var d=void 0,y=void 0;h?(d={},y=f):(d={color:n.color,font:n.font},y=r.markers.color),kp(c)&&""!==c&&s.push({text:c,labels:d,markerColor:y,series:p,active:h})}}Gr(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=hr(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[S+a]-r[S+n],s[k+a]-r[k+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),s={},a={},p={},h={},c=0;c<e.length;c++){var l=e[c],f=l.pane,d=f.id,y=!1!==l.options.visible,g=ch(t,f)||i,m=r;g!==i&&(m=this.axisCrossingValues(g,e)),this.alignAxisTo(l,g,n[c],m[c]),l.options._overlap||(tn(l.lineBox().x1)===tn(g.lineBox().x1)&&(s[d]&&l.reflow(l.box.alignTo(s[d].box,v).translate(-l.options.margin,0)),y&&(s[d]=l)),tn(l.lineBox().x2)===tn(g.lineBox().x2)&&(l._mirrored||(l.options.labels.mirror=!l.options.labels.mirror,l._mirrored=!0),this.alignAxisTo(l,g,n[c],m[c]),a[d]&&l.reflow(l.box.alignTo(a[d].box,_).translate(l.options.margin,0)),y&&(a[d]=l)),0!==c&&o.pane===l.pane&&(l.alignTo(o),l.reflow(l.box)))}for(var x=0;x<t.length;x++){var w=t[x],A=w.pane,S=A.id,k=!1!==w.options.visible,C=ch(e,A)||o,T=n;C!==o&&(T=this.axisCrossingValues(C,t)),this.alignAxisTo(w,C,r[x],T[x]),w.options._overlap||(tn(w.lineBox().y1)===tn(C.lineBox().y1)&&(w._mirrored||(w.options.labels.mirror=!w.options.labels.mirror,w._mirrored=!0),this.alignAxisTo(w,C,r[x],T[x]),p[S]&&w.reflow(w.box.alignTo(p[S].box,b).translate(0,-w.options.margin)),k&&(p[S]=w)),tn(w.lineBox().y2,3)===tn(C.lineBox().y2,3)&&(h[S]&&w.reflow(w.box.alignTo(h[S].box,u).translate(0,w.options.margin)),k&&(h[S]=w)),0!==x&&(w.alignTo(i),w.reflow(w.box)))}},e.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=hh(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,hh(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=hh(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 c=n[h];c.reflow(c.box.translate(0,p))}}}for(var l=0;l<e.length;l++){var u=e[l];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=lh(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&&!zr(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 c=0;c<i;c++){var l=e[c];l.options.height||(l.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(a.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&&Nr(e)||(r=A,o=0);var s=this._bgVisual=new a.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&&Nr(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=ch(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),c="end"===r,l=i.range(),u=c?l.max:l.min;if(Kr(h[e],l.min,l.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}(An);function ph(t){return!t.pane.axes.some((function(e){return e.options.vertical===t.options.vertical&&e!==t&&!1!==e.options.visible}))}function hh(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;if(n||ph(r)){var s=n?r.contentBox():r.lineBox();e?e.wrap(s):e=s.clone()}}return e||new gn}function ch(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var lh=function(t){return t.reduce((function(t,e){return t.concat(e.axes)}),[])};sn(ah,{series:[],plotArea:{margin:{}},background:"",border:{color:l,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var uh=ah,fh={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function dh(t,e,i){var o=e,r=t;if(t.indexOf(".")>-1){for(var n=t.split(".");n.length>1;)r=n.shift(),Nr(o[r])||(o[r]={}),o=o[r];r=n.shift()}o[r]=i}var yh=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 c=0;c<r.length;c++){var l=r[c],u=void 0;if(rr(h))u=h[l];else{if(0!==c&&!zr(l,n))break;u=h}u&&a.push({canonicalName:l,name:s[c],transform:er(u)?u:sa[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&&!$o(n)&&!C(n)){var a=function(){};a.prototype=n,s=new a}for(var p=0;p<o.length;p++){var h=o[p],c=this._bindField(r.values,h.canonicalName),l=h.transform(c,i,r.dataItems,e);if(!(null===l||!rr(l)||Nr(l.length)||l instanceof Date)){s=l;break}Nr(l)&&dh(h.name,s,l)}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=Nr(s[e])?s[e]:n.fields[e],i.push(a)}return i},e}(O),gh=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}(O);gh.current=new gh;var vh=gh,mh=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=or({},t,t.from),i=or({},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=Tr(t),o=this.pointData();return e=i?i(o):this.formatValue(t.format),new op(e,or({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}(sp);mh.prototype.defaults=or({},mh.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var xh=mh,_h=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 xh},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&&$o(o)&&$o(r)&&((n=this.valueAxisRanges[i]=n||{min:m,max:x}).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}(dp);_h.prototype.plotLimits=Ma.prototype.plotLimits;var bh=_h,wh=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}(za),Ah=function(t){function e(e,i){t.call(this),this.value=e,this.options=i,this.aboveAxis=on(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 wh(o,or({},this.options,{labels:i.from,markers:e.from})),n=this.toPoint=new wh(o,or({},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 a.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=u):(e=r.x2+5,i=n.y,o=f),{point:new dn(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=v,i=_):(o=_,i=v),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}(An);or(Ah.prototype,ja),or(Ah.prototype,Ba),Ah.prototype.defaults={markers:{visible:!1,background:A,size:8,type:d,border:{width:2},opacity:1},labels:{visible:!1,margin:hr(3),padding:hr(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:A,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var Sh=Ah,kh=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 a.Path(t),i=new a.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}(Ja),Ch=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 $s).process(this.toGeometryPoints(t))},e}(kh),Th=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}(kh);or(Th.prototype,Fa);var Ph=Th,Mh=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 Sh},e.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!kp(s.from)&&!kp(s.to)){if(this.seriesMissingValues(r)!==ya)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;er(r.color)&&(p=a.color);var h=new Sh(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?Ch:"step"===o?Ph:kh)(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 gn(r.x1,t.y1,r.x2,t.y2),o=new gn(n.x1,t.y1,n.x2,t.y2)):(i=new gn(t.x1,r.y1,t.x2,r.y2),o=new gn(t.x1,n.y1,t.x2,n.y2)),{from:i,to:o}},e.prototype.addValue=function(e,i){var o=e.valueFields;$o(o.from)||(o.from=o.to),$o(o.to)||(o.to=o.from),t.prototype.addValue.call(this,e,i)},e.prototype.updateRange=function(t,e){if(null!==t&&$o(t.from)&&$o(t.to)){var i=e.series.axis,o=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:m,max:x},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}(Ma);or(Mh.prototype,Ha,Ya);var Oh=Mh,Rh=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 c=a.center().x;r.push([p.x1,p.y1]),r.push([c,p.y1]),n.push([c,h.y1]),n.push([h.x2,h.y1]),s.push([c,a.y1]),s.push([c,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(p.clone().wrap(h)),this.reflowNote()},e.prototype.createBody=function(){},e}(gp),jh=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 Rh},e}(xp),Bh=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=a.Path.fromPoints(this.linePoints(),{stroke:{color:e.color,width:e.width,opacity:e.opacity,dashType:e.dashType}});Jo(i),this.visual.append(i)},e}(An);sn(Bh,{animation:{type:"fadeIn",delay:600}});var Ih=Bh,zh=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=Ta(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=ha.current.bindPoint(n,p),c=h.valueFields.value,l=h.fields.summary,u=s,f=void 0;l?"total"===l.toLowerCase()?(h.valueFields.value=s,u=0,f=s):(h.valueFields.value=a,f=u-a,a=0):$o(c)&&(a+=c,f=s+=c),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 Ih(s,p,r);i.push(h),this.append(h)}s=p}}},e}(dp),Lh=["area","verticalArea","rangeArea","verticalRangeArea"],Eh=[ma,_a].concat(Lh),Vh=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 ep,t.length>0){this.invertAxes=zr(t[0].type,[ga,"bullet",_a,"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 vs?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(Qp(t,["area","verticalArea"]),e),this.createRangeAreaChart(Qp(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Qp(t,[va,ga]),e),this.createRangeBarChart(Qp(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Qp(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Qp(t,"candlestick"),e),this.createBoxPlotChart(Qp(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Qp(t,"ohlc"),e),this.createWaterfallChart(Qp(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Qp(t,[ma,_a]),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=($p(n.options.type,y)||r.categoryField)&&zr(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),!$o(e.options.min)&&!$o(e.options.max))return t;var o=e.currentRangeIndices(),r=zr(t.type,Eh),n=or({},t);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&sh(n,o,i,(function(i){return{item:t.data[i],category:e.categoryAt(i,!0),categoryIx:i-o.min}}),(function(e){return Nr(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=$p(o.type,y),s=t.data,a=n?th:aa,p=[];n||e.mapCategories();for(var h=0;h<s.length;h++){var c=void 0;if(c=t.categoryField?a(t.categoryField,s[h],this.chartService.intl):r[h],Nr(c)&&null!==c){var l=e.totalIndex(c);p[l]=p[l]||{items:[],category:c},p[l].items.push(h)}}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=or({},t),r=new yh(or({},t),ha.current,vh.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 c=p(h);n[c.categoryIx]=c.item,c.items&&c.items.length&&(s[c.categoryIx]=c.item)}return zr(o.type,Eh)&&sh(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,Ta(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=Rr([].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=Dh(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 dp(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 bh(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 Ep(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 Za(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 tp(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 Oh(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 jh(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 xp(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 Ap(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 zh(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=Qp(this.series,ba),o=0;o<this.series.length;o++){var r=this.series[o];if(zr(r.type,Lh)){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 vs&&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(zr(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=or({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?m:0},n),Nr(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0;if(p=eh(n,a[0])?new Cs(n,this.chartService):new vs(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(!zr(t[e].type,Lh))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(zr(this.findPane(p.pane),t)){var h=p.name,c=$p(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||i||c;0===a&&l&&i&&(l.min=Math.min(l.min,i.min),l.max=Math.max(l.max,i.max));var u=new($p(p.type,"log")?Fs:Bs)(l.min,l.max,or({},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 dn(o.x,o.y),n=this.pointPane(r),s=[],a=[];if(n){for(var p=n.axes,h=0;h<p.length;h++){var c=p[h];c.getValue?Zp(a,c.getValue(r)):Zp(s,c.getCategory(r))}0===s.length&&Zp(s,this.categoryAxis.getCategory(r)),s.length>0&&a.length>0&&t.trigger(i,{element:Wr(e),originalEvent:e,category:ih(s),value:ih(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){Fh(this.options,t,e),Fh(this.originalOptions,t,e)},e}(uh);function Fh(t,e,i){or([].concat(e instanceof vs?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}function Dh(t,e,i){return Rr(t,(function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))}sn(Vh,{categoryAxis:{},valueAxis:{}}),or(Vh.prototype,fh);var Uh=Vh;function Gh(){this._defaultPrevented=!0}var Hh=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:Gh,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}(O);function Nh(t,e){var i=(e||"").toLowerCase(),o=t.event;return"none"===i&&!(o.ctrlKey||o.shiftKey||o.altKey)||o[i+"Key"]}function qh(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 Xh=function(t){function e(e,i){t.call(this),this.plotArea=e,this.options=or({},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=Nh(t,this.options.key),this._active},e.prototype.move=function(t){if(this._active){var e=this.axisRanges=this._panAxes(t,S).concat(this._panAxes(t,k));if(e.length)return this.axisRanges=e,qh(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===S&&!p.options.vertical||e===k&&p.options.vertical){var h=p.pan(o);h&&(h.limitRange=!0,n.push({axis:p,range:h}))}}return n},e}(O);Xh.prototype.options={key:"none",lock:"none"};var Yh=Xh,Wh=function(t){function e(e,i){t.call(this),this.chart=e,this.options=or({},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){pr(this._marquee,t)},e.prototype.start=function(t){if(Nh(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=pr(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,o=e.paddingTop,r=Xr(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,qh(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!==S||a)&&(i!==k||!a)&&Nr(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===S&&(s=e.x1,p=e.width()),n===k&&(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}(O);Wh.prototype.options={key:"shift",lock:"none"};var Zh=Wh,Jh=function(t){function e(e,i){t.call(this),this.chart=e,this.options=or({},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!==S||s)&&(e!==k||!s)&&n.zoomRange){var a=n.zoomRange(-t);a&&i.push({axis:n,range:a})}}return this.axisRanges=i,qh(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}(O),Kh=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 a.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 gn),r.renderVisual()}},e.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();var e=this.visual.clippedBBox();this.box=e?En(e):new gn},e.prototype.renderVisual=function(){this.addVisual()},e.prototype.createVisual=function(){},e}(An),$h=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 Bn({vertical:!1,wrap:!1,align:f,spacing:this.options.spacing}),this.append(this.container)},e.prototype.createMarker=function(){this.container.append(new Tn(this.markerOptions()))},e.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return or({},t.markers,{background:e,border:{color:e}})},e.prototype.createLabel=function(){var t=this.options,e=or({},t.labels);this.container.append(new Fn(t.text,e))},e.prototype.renderComplete=function(){t.prototype.renderComplete.call(this);var e=this.options.cursor||{},i=this._itemOverlay=a.Path.fromRect(this.container.box.toRect(),{fill:{color:A,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:Wr(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}(kn),Qh=function(t){function e(e,i){void 0===i&&(i={}),t.call(this,e),this.chartService=i,zr(this.options.position,[b,_,u,v,"custom"])||(this.options.position=_),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=f;"custom"===e?o=v:zr(e,[b,u])?(o="start"===i?v:"end"===i?_:f,r=e):i&&("start"===i?r=b:"end"===i&&(r=u)),this.container=new kn({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 kn({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 Kh({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 $h(or({},{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||(Nr(e)?"horizontal"!==e:zr(i,[v,_]))},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 gn(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,s=o===b||o===u?S:k,a=this.isVertical(),p=t.clone(),h=t.clone();o!==v&&o!==_||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,k,i.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,S,i.options.align)),i.reflow(h);var c=(h=i.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),i.reflow(h)),c[s+1]=t[s+1],c[s+2]=t[s+2],this.box=c},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 gn(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=or({},{color:l,position:b,align:f},t),i=e.text;if(t&&!1!==t.visible){if(Nr(e)&&e.visible){var o=Tr(e);o?i=o({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))}this.title=new Fn(i,e),this.createTitleLayout(),this.appendTitleLayoutContent()}},e.prototype.createTitleLayout=function(){this.layout=new Bn({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===u?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e}(An);sn(Qh,{position:_,items:[],offsetX:0,offsetY:0,margin:hr(5),padding:hr(5),border:{color:l,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:v,vAlign:f}});var tc=Qh,ec=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=Qp(t,a.seriesTypes)).length>0){n=a;break}}return new n.type(o,e,i)},e}(O);ec.current=new ec;var ic=ec;function oc(t){var e=document.createElement("div");return t&&(e.className=t),e}function rc(t){for(var e=t;e&&!jr(e,"k-handle");)e=e.parentNode;return e}var nc=function(t){function e(e,i,o,r){t.call(this);var n=e.element;this.options=or({},this.options,o),this.chart=e,this.observer=r,this.chartElement=n,this.categoryAxis=i,this._dateAxis=this.categoryAxis instanceof Cs,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=oc("k-selector");pr(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=oc("k-selection");this.leftMask=oc("k-mask"),this.rightMask=oc("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(oc("k-selection-bg"));var o=this.leftHandle=oc("k-handle k-left-handle"),r=this.rightHandle=oc("k-handle k-right-handle");o.appendChild(oc()),r.appendChild(oc()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=pr(i,["borderLeftWidth","borderRightWidth","height"]),s=pr(o,"height").height,a=pr(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},pr(o,{top:(n.height-s)/2}),pr(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),Hr(this.wrapper,((t={})[wa]=this._mousewheelHandler,t))),this._domEvents=Ar.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&&or(t,{min:fs(i,t.min),max:fs(i,t.max),from:fs(i,t.from),to:fs(i,t.to)});var o=pr(this.chartElement,["paddingLeft","paddingTop"]),r=o.paddingLeft,n=o.paddingTop;this.options=or({},{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&&(en(this.wrapper,((t={})[wa]=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=Wr(t);if(!this._state&&i){this.chart._unsetActivePoint(),this._state={moveTarget:rc(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:rc(Wr(t)))&&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),c=this._index(i.max),l=e.startLocation-t.x.location,u=r.from,f=r.to,d=r.to-r.from,y=pr(this.wrapper,"width").width/(o.categoriesCount()-1),g=Math.round(l/y)*(s?-1:1);if(n){var v=jr(n,"k-left-handle"),m=jr(n,"k-right-handle");jr(n,"k-selection k-selection-bg")?(r.from=Math.min(Math.max(h,a-g),c-d),r.to=Math.min(r.from+d,c)):v&&!s||m&&s?(r.from=Math.min(Math.max(h,a-g),c-1),r.to=Math.max(r.from+1,r.to)):(v&&s||m&&!s)&&(r.to=Math.min(Math.max(h+1,p-g),c),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&&M(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 dn(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,c=n+h/2,l={},u=3===t.event.which,f=Math.round(c-r);this._state||u||(this.chart._unsetActivePoint(),i.options.justified||f--,l.from=Math.min(Math.max(a,n-f),p-h),l.to=Math.min(l.from+h,p),this._start(t),this._state&&(this._state.range=l,this.trigger("select",this._rangeEventArgs(l)),this._end()))},e.prototype._mousewheel=function(t){var e=this,i=Dr(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 dn(p))||o.min,n.to=r.pointCategoryIndex(new dn(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),c=this._slot(a),l=tn(c[h]-r.left+n.left);pr(this.leftMask,{width:l}),pr(this.selection,{left:l}),c=this._slot(p);var u=tn(i.width-(c[h]-r.left+n.left));pr(this.rightMask,{width:u});var f=i.width-u;f!==i.width&&(f+=s.right),pr(this.rightMask,{left:f}),pr(this.selection,{width:Math.max(i.width-(l+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=Kr(this._index(t),o,r),s=Kr(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=or({},a);if(this._state&&(a=this._state.range),r!==_&&(a.from=Kr(Kr(n-t,0,s-1),i,o)),r!==v&&(a.to=Kr(Kr(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}(O);sn(nc,{visible:!0,mousewheel:{zoom:"both"},min:x,max:m});var sc=nc,ac=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=or({},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}(Fp),pc=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=Rr(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 dn(r.x,n.y):new dn(n.x,r.y),align:{horizontal:"center",vertical:"center"}}},e}(Fp);sn(pc,{categoryFormat:"{0:d}"});var hc=pc,cc=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?k:S,o=this.fromScale=new p.Point(1,1);o[i]=da,t.transform(p.transform().scale(o.x,o.y))}else this.abort()},e.prototype.step=function(t){var e=Lr(this.fromScale.x,1,t),i=Lr(this.fromScale.y,1,t);this.element.transform(p.transform().scale(e,i,this.origin))},e.prototype.abort=function(){t.prototype.abort.call(this),this.element.transform(null)},e}(a.Animation);sn(cc,{duration:600}),a.AnimationFactory.current.register(ga,cc);var lc=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(p.transform().scale(da,da,t))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.center))},e}(a.Animation);sn(lc,{easing:"easeOutElastic"}),a.AnimationFactory.current.register("bubble",lc);var uc=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}(a.Animation);sn(uc,{duration:200,easing:"linear"}),a.AnimationFactory.current.register("fadeIn",uc);var fc=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(p.transform().scale(da,da,this.options.center))},e.prototype.step=function(t){this.element.transform(p.transform().scale(t,t,this.options.center))},e}(a.Animation);sn(fc,{easing:"easeOutElastic",duration:600}),a.AnimationFactory.current.register(xa,fc);var dc=fc,yc=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?Ga:Ea)(t,e,i)},e.prototype.animationPoints=function(){return t.prototype.animationPoints.call(this).concat(this._segments)},e.prototype.createMissingValue=function(t,e){if(e===ya){var i={x:t.x,y:t.y};return kp(i.x)||(i.x=0),kp(i.y)||(i.y=0),i}},e}(Tp);or(yc.prototype,Ha);var gc=yc,vc=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 ep,this.yAxisRangeTracker=new ep},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(Qp(n,"scatter"),o),this.createScatterLineChart(Qp(n,"scatterLine"),o),this.createBubbleChart(Qp(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=Rr([].concat(e.xAxis),(function(t){return t.name===i}))[0],r=t.yAxis,n=Rr([].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 Tp(this,{series:t,clip:e.options.clip}),e)},e.prototype.createScatterLineChart=function(t,e){t.length>0&&this.appendChart(new gc(this,{series:t,clip:e.options.clip}),e)},e.prototype.createBubbleChart=function(t,e){t.length>0&&this.appendChart(new Rp(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=or({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=$p(a.type,"log"),h=s.query(),c=p?{min:.1,max:1}:{min:0,max:1},l=s.query(r)||h||c,u=[a.min,a.max],f=this.series,d=0;d<f.length;d++){var g=f[d],v=g[e?"yAxis":"xAxis"];if(v===a.name||0===i&&!v){var m=ha.current.bindPoint(g,0).valueFields;u.push(m[e?"y":"x"]);break}}0===i&&h&&(l.min=Math.min(l.min,h.min),l.max=Math.max(l.max,h.max));for(var x=0;x<u.length;x++)if(u[x]instanceof Date){o=!0;break}var _=new($p(a.type,y)||!a.type&&o?zs:p?Fs:Bs)(l.min,l.max,a,this.chartService);if(_.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=_}return this.appendAxis(_),_},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++){zr(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s))}for(var a=0;a<r.length;a++){zr(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 dn(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var c=n[h],l=c.options.vertical?p:a,u=c.getValue(r);null!==u&&l.push(u)}a.length>0&&p.length>0&&t.trigger(i,{element:Wr(e),originalEvent:e,x:ih(a),y:ih(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);mc(this.options,r,i,e),mc(this.originalOptions,r,i,e)},e}(uh);function mc(t,e,i,o){or([].concat(i?t.yAxis:t.xAxis)[e],o)}sn(vc,{xAxis:{},yAxis:{}}),or(vc.prototype,fh);var xc=vc,_c=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=Tr(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===f||"insideEnd"===t.position){if(!t.color){var n=new Ra(this.options.color).percBrightness();t.color=n>180?l:A}t.background||(t.background=this.options.color)}else{var s=e.theme.seriesDefaults.labels;t.color=t.color||s.color,t.background=t.background||s.background}this.label=new Fn(i,or({},t,{align:f,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(),a=e.box.width();if(t.position===f)i.radius=Math.abs((i.radius-s)/2)+s,n=i.point(r),e.reflow(new gn(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 gn(n.x,n.y-s/2,n.x,n.y));else{var p;(n=i.clone().expand(o).point(r)).x>=i.center.x?(p=n.x+a,e.orientation=_):(p=n.x-a,e.orientation=v),e.reflow(new gn(p,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 p.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 a.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,or({fill:s,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(a),rp(i)&&t.append(this.createGradientOverlay(a,{baseColor:n,fallbackFill:s},or({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 a.Circle(new p.Circle(new p.Point(t.center.x,t.center.y),t.radius),e):bn.current.createRing(t,e)},e.prototype.createAnimation=function(){var e=this.options,i=this.sector.center;or(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,or({},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 p.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:Ac(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}(An),bc=tn(Qr(30),10),wc=tn(Qr(60),10);function Ac(t){var e=Qr(t),i=tn(Math.sin(e),10),o=tn(Math.cos(e),10);return{horizontal:Math.abs(i)>wc?f:o<0?_:v,vertical:Math.abs(i)<bc?f:i<0?u:b}}sn(_c,{color:A,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:hr(.5),align:d,zIndex:1,position:"outsideEnd"},animation:{type:xa},highlight:{visible:!0,border:{width:1}},visible:!0}),or(_c.prototype,ja);var Sc=_c,kc={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,c=h?Tr(r):Tr(s)||Tr(r),l=i.category;c&&(l=c({text:l,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),kp(l)&&""!==l&&this.legendItems.push({active:h,pointIndex:i.index,text:l,series:i.series,markerColor:p,labels:a})}}},Cc=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 a=r[s],p=a.data,h=Kp(a),c=h.total,l=h.points,u=h.count,d=360/c,y=void 0;isFinite(d)||(y=360/u);var g=void 0;g=Nr(a.startAngle)?a.startAngle:e.startAngle,s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=f);for(var v=0;v<l.length;v++){var m=l[v];if(m){var x=m.fields,_=m.value,b=m.visible,w=0!==_?y||_*d:0,A=1!==p.length&&Boolean(x.explode);er(a.color)||(a.color=x.color||i[v%o]),t(m.valueFields.value,new mn(null,0,0,g,w),{owner:this,category:Nr(x.category)?x.category:"",index:v,series:a,seriesIx:s,dataItem:p[v],percentage:0!==c?_/c:0,explode:A,visibleInLegend:x.visibleInLegend,visible:b,zIndex:n-s,animationDelay:this.animationDelay(v,s,n)}),!1!==b&&(g+=w)}}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ca(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=or({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible){var r=new Sc(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 gn(n.x1,n.y1,n.x1+s,n.y1+s),c=h.center(),l=n.center(),u=e.series.length,f=[],d=[],y=on(e.padding,p);this.targetBox=t,y=y>a-5?a-5:y,h.translate(l.x-c.x,l.y-c.y);for(var g=a-y,v=new dn(g+h.x1+y,g+h.y1+y),m=0;m<r;m++){var x=i[m],b=x.sector,w=x.seriesIx;if(b.radius=g,b.center=v,o.length){var A=o[w];b.innerRadius=A.innerRadius,b.radius=A.radius}w===u-1&&x.explode&&(b.center=b.clone().setRadius(.15*b.radius).point(b.middle())),x.reflow(h);var S=x.label;S&&"outsideEnd"===S.options.position&&w===u-1&&(S.orientation===_?d.push(S):f.push(S))}f.length>0&&(f.sort(this.labelComparator(!0)),this.leftLabelsReflow(f)),d.length>0&&(d.sort(this.labelComparator(!1)),this.rightLabelsReflow(d)),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=Jr(this.points),i=e.sector,o=t.length-1,r=i.radius+e.options.labels.distance,n=[],s=t[0].box,a=tn(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=tn(h.y1-s.y2),n.push(a)}return a=tn(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=Jr(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var c=e[h],l=c.box;p+=t[h],i=this.hAlignLabel(l.x2,r.clone().expand(a),p,p+l.height(),c.orientation===_),c.orientation===_?(n.align!==d&&(i=r.radius+r.center.x+a),c.reflow(new gn(i+l.width(),p,i,p))):(n.align!==d&&(i=r.center.x-r.radius-a),c.reflow(new gn(i-l.width(),p,i,p))),p+=l.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,p=n.label,h=s.middle(),c=(n.options.connectors||{}).color||e.color;if(p){var l=new a.Path({stroke:{color:c,width:e.width},animation:{type:"fadeIn",delay:n.animationDelay}});if("outsideEnd"===p.options.position){var u=p.box,f=s.center,d=s.point(h),y=new dn(u.x1,u.center().y),g=void 0,v=void 0,m=void 0;d=s.clone().expand(e.padding).point(h),l.moveTo(d.x,d.y),p.orientation===_?(m=Tc(f,d,y,v=new dn(u.x1-e.padding,u.center().y)),y=new dn(v.x-4,v.y),(m=m||y).x=Math.min(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x<s.center.x?(g=s.center.x+s.radius+4,n.options.labels.align!==va?g<y.x?l.lineTo(g,d.y):l.lineTo(d.x+8,d.y):l.lineTo(g,d.y),l.lineTo(y.x,v.y)):(m.y=v.y,l.lineTo(m.x,m.y))):(m=Tc(f,d,y,v=new dn(u.x2+e.padding,u.center().y)),y=new dn(v.x+4,v.y),(m=m||y).x=Math.max(m.x,y.x),this.pointInCircle(m,s.center,s.radius+4)||m.x>s.center.x?(g=s.center.x-s.radius-4,n.options.labels.align!==va?g>y.x?l.lineTo(g,d.y):l.lineTo(d.x-8,d.y):l.lineTo(g,d.y),l.lineTo(y.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),pn(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(p.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}(An);function Tc(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 dn(t.x+a*(e.x-t.x),t.y+a*(e.y-t.y))}return r}sn(Cc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),or(Cc.prototype,kc),Cc.prototype.isStackRoot=!0;var Pc=Cc,Mc=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 Pc(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),Gr(this.options.legend.items,e.legendItems)},e}(uh),Oc=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===f){o.radius-=(o.radius-o.innerRadius)/2;var s=o.point(r);i.reflow(new gn(s.x,s.y-n/2,s.x,s.y))}else t.prototype.reflowLabel.call(this)}},e.prototype.createSegment=function(t,e){return bn.current.createRing(t,e)},e}(Sc);sn(Oc,{overlay:{gradient:"roundedGlass"},labels:{position:f},animation:{type:xa}}),or(Oc.prototype,ja);var Rc=Oc,jc=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=or({},i.series,{index:i.index});if(this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible){var r=new Rc(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,c=on(o.padding,a),l=s-(c=c>s-5?s-5:c),u=0,f=0;f<h;f++){var d=p[f];0===f&&Nr(d.holeSize)&&(i=d.holeSize,l-=d.holeSize),Nr(d.size)?l-=d.size:u++,Nr(d.margin)&&f!==h-1&&(l-=d.margin)}Nr(i)||(l-=i=.75*((s-c)/(h+.75)));var y,g=i,v=0;this.seriesConfigs=[];for(var m=0;m<h;m++){var x=p[m];y=(g+=v)+on(x.size,l/u),this.seriesConfigs.push({innerRadius:g,radius:y}),v=x.margin||0,g=y}t.prototype.reflow.call(this,e)},e.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},e}(Pc);sn(jc,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Bc=jc,Ic=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 Bc(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(i)},e}(Mc),zc=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 ep},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=Js,e={min:.1,max:1}):(t=Ws,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=hr(t.padding||{},r),s=o.clone().unpad(n),a=s.clone();a.y2=a.y1+Math.min(a.width(),a.height()),a.align(s,k,f);var p=a.clone().shrink(0,a.height()/2);i.reflow(a),e.reflow(p);var h=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:h})),this.axisBox=a,this.alignAxes(a)},e.prototype.backgroundBox=function(){return this.box},e.prototype.detachLabels=function(){},e}(uh),Lc=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=dn.onCircle(t.center,t.startAngle,i);return new gn(o.x,o.y,o.x,o.y)},e}(Tp);sn(Lc,{clip:!1});var Ec=Lc,Vc=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}(gc);Vc.prototype.pointSlot=Ec.prototype.pointSlot,sn(Vc,{clip:!1});var Fc=Vc,Dc=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 $s(!1),o=this.points();o.push(e),(t=this._strokeSegments=i.process(o)).pop()}return t},e}(Qa),Uc=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 p.Segment([e.x,e.y]);t.segments.unshift(i),t.segments.push(i)},e}(Ja);function Gc(t,e){return t.value.x-e.value.x}var Hc=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 Dc(t,e,i):new Uc(t,e,i)},e.prototype.createMissingValue=function(t,e){var i;return kp(t.x)&&"interpolate"!==e&&(i={x:t.x,y:t.y},e===ya&&(i.y=0)),i},e.prototype.seriesMissingValues=function(t){return t.missingValues||ya},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(Gc),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];if(i)kp(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},e}(Fc),Nc=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 Ns(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},e.prototype.valueAxisOptions=function(t){return or(t,{majorGridLines:{type:c},minorGridLines:{type:c}},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),uh.prototype.appendChart.call(this,t,e)},e.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Qp(t,["polarLine"]),e),this.createScatterChart(Qp(t,["polarScatter"]),e),this.createAreaChart(Qp(t,["polarArea"]),e)},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new Fc(this,{series:t});this.appendChart(i,e)}},e.prototype.createScatterChart=function(t,e){if(0!==t.length){var i=new Ec(this,{series:t});this.appendChart(i,e)}},e.prototype.createAreaChart=function(t,e){if(0!==t.length){var i=new Hc(this,{series:t});this.appendChart(i,e)}},e.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new dn(o.x,o.y),n=this.axisX.getValue(r),s=this.axisY.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Wr(e),x:n,y:s})},e.prototype.createCrosshairs=function(){},e}(zc);sn(Nc,{xAxis:{},yAxis:{}}),or(Nc.prototype,fh);var qc=Nc;var Xc=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=dn.onCircle(t.center,t.middle(),i);return new gn(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=Jr(o),s=Jr(n.linePoints),a=0===r.categoryIx,p=s.categoryIx===s.categoriesCount-1;a&&p&&Jr(o).linePoints.push(r)}}},e.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?Ga:Ea)(t,e,i),r=this.seriesMissingValues(e);return t.length!==e.data.length&&"interpolate"!==r||(o.options.closed=!0),o},e}(Za);sn(Xc,{clip:!1,limitPoints:!1});var Yc=Xc,Wc=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}(Qa),Zc=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}(Ja),Jc=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 Wc(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new Zc(t,e,i,r,n)),s},e.prototype.seriesMissingValues=function(t){return t.missingValues||ya},e}(Yc),Kc=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}(Rc);sn(Kc,{overlay:{gradient:"none"},labels:{distance:10}});var $c=Kc,Qc=function(t){function e(e){t.call(this,e),this.forEach=e.rtl?pp:ap}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}(An);sn(Qc,{gap:1,spacing:0});var tl=Qc,el=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 gn;for(var s=r;s>=0&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},e}(An),il=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 $c},e.prototype.clusterType=function(){return tl},e.prototype.stackType=function(){return el},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}(dp);il.prototype.reflow=Ma.prototype.reflow,sn(il,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var ol=il,rl=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 Gs(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&&or(t,{majorGridLines:{type:c},minorGridLines:{type:c}}),this._isStacked100&&or(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),or(t,this.options.valueAxis)},e.prototype.aggregateCategories=function(){Uh.prototype.aggregateCategories.call(this,this.panes)},e.prototype.createCategoryAxesLabels=function(){Uh.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(Qp(t,["radarArea"]),e),this.createLineChart(Qp(t,["radarLine"]),e),this.createBarChart(Qp(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 Jc(this,this.chartOptions(t));this.appendChart(i,e)}},e.prototype.createLineChart=function(t,e){if(0!==t.length){var i=new Yc(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 ol(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 dn(o.x,o.y),n=this.categoryAxis.getCategory(r),s=this.valueAxis.getValue(r);null!==n&&null!==s&&t.trigger(i,{element:Wr(e),category:n,value:s})},e.prototype.createCrosshairs=function(){},e}(zc);or(rl.prototype,fh,{appendChart:Uh.prototype.appendChart,aggregateSeries:Uh.prototype.aggregateSeries,seriesSourcePoints:Uh.prototype.seriesSourcePoints}),sn(rl,{categoryAxis:{categories:[]},valueAxis:{}});var nl=rl,sl=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 gn(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new gn(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 a.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 a.Path.fromPoints(this.points,t)},e.prototype.highlightVisual=function(){return this.visual.children[0]},e.prototype.highlightVisualArgs=function(){var t=a.Path.fromPoints(this.points).close();return{options:this.options,path:t}},e.prototype.tooltipAnchor=function(){var t=this.box;return{point:new dn(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},e.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e}(An);sn(sl,{color:A,border:{width:1}}),or(sl.prototype,ja);var al=sl,pl=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=Kp(i),n=r.total,s=r.points,a=0;a<s.length;a++){var p=s[a];if(p){var h=p.fields;er(i.color)||(i.color=h.color||e[a%e.length]),h=or({index:a,owner:this,series:i,dataItem:o[a],percentage:p.value/n},h,{visible:p.visible});var c=p.valueFields.value,l=this.createSegment(c,h),u=this.createLabel(c,h);l&&u&&l.append(u)}}},e.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;Ca(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=or({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){var o=new al(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=or({},this.options.labels,i.labels),n=t;if(r.visible){var s=Tr(r),a={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};if(s?n=s(a):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),!r.color){var p=new Ra(i.color).percBrightness();r.color=p>180?l:A,r.background||(r.background=i.color)}this.evalSegmentOptions(r,t,e);var h=new Fn(n,or({vAlign:r.position},r),a);return this.labels.push(h),h}},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!==f){var r=t[i].box.width();o===v?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,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var c=s.percentage/a.percentage*e,l=(e-c)/2,u=0,f=0;f<n;f++){var d=r[f].percentage,y=r[f+1],g=y?y.percentage:d,v=r[f].points=[],m=o.dynamicHeight?i*d:i/n,x=void 0;x=Kr(x=d?(e-c*(g/d))/2:g?0:e/2,0,e),v.push(new p.Point(t.x1+l,t.y1+u)),v.push(new p.Point(t.x1+e-l,t.y1+u)),v.push(new p.Point(t.x1+e-x,t.y1+m+u)),v.push(new p.Point(t.x1+x,t.y1+m+u)),l=x,u+=m+o.segmentSpacing,c=Kr(e-2*x,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,h=s?0:(e-e/o.neckRatio)/2,c=((s?e:e-2*h)-a)/2,l=0,u=0;u<n;u++){var f=r[u].points=[],d=r[u].percentage,y=o.dynamicHeight?c*d:c/n,g=o.dynamicHeight?i*d:i/n;f.push(new p.Point(t.x1+h,t.y1+l)),f.push(new p.Point(t.x1+e-h,t.y1+l)),f.push(new p.Point(t.x1+e-h-y,t.y1+g+l)),f.push(new p.Point(t.x1+h+y,t.y1+g+l)),h+=y,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}(An);sn(pl,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:f,position:f,zIndex:1}}),or(pl.prototype,kc);var hl=pl,cl=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 hl(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),Gr(this.options.legend.items,e.legendItems)},e}(uh),ll="color",ul="first",fl="max";ic.current.register(Uh,[ga,va,ma,_a,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),ic.current.register(xc,["scatter","scatterLine","bubble"]),ic.current.register(Mc,[xa]),ic.current.register(Ic,["donut"]),ic.current.register(cl,["funnel"]),ic.current.register(qc,["polarArea","polarLine","polarScatter"]),ic.current.register(nl,["radarArea","radarColumn","radarLine"]),ha.current.register([ga,va,ma,_a,"area","verticalArea"],[w],["category",ll,"noteText","errorLow","errorHigh"]),ha.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",ll,"noteText"]),ha.current.register(["waterfall","horizontalWaterfall"],[w],["category",ll,"noteText","summary"]),ha.current.register(["polarArea","polarLine","polarScatter"],[S,k],[ll]),ha.current.register(["radarArea","radarColumn","radarLine"],[w],[ll]),ha.current.register(["funnel"],[w],["category",ll,"visibleInLegend","visible"]),vh.current.register([ga,va,ma,_a,"area","verticalArea","waterfall","horizontalWaterfall"],{value:fl,color:ul,noteText:ul,errorLow:"min",errorHigh:fl}),vh.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:fl,color:ul,noteText:ul}),vh.current.register(["radarArea","radarColumn","radarLine"],{value:fl,color:ul}),ha.current.register(["scatter","scatterLine","bubble"],[S,k],[ll,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),ha.current.register(["bubble"],[S,k,"size"],[ll,"category","noteText"]),ha.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",ll,"downColor","noteText"]),vh.current.register(["candlestick","ohlc"],{open:fl,high:fl,low:"min",close:fl,color:ul,downColor:ul,noteText:ul}),ha.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",ll,"noteText"]),vh.current.register(["boxPlot","verticalBoxPlot"],{lower:fl,q1:fl,median:fl,q3:fl,upper:fl,mean:fl,outliers:ul,color:ul,noteText:ul}),ha.current.register(["bullet","verticalBullet"],["current","target"],["category",ll,"visibleInLegend","noteText"]),vh.current.register(["bullet","verticalBullet"],{current:fl,target:fl,color:ul,noteText:ul}),ha.current.register([xa,"donut"],[w],["category",ll,"explode","visibleInLegend","visible"]);var dl=["category",w,S,k],yl=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 br(this,r),this.chartService.theme=o,this._initElement(e);var s=or({},this.options,i);this._originalOptions=or({},s),this._theme=o,this._initTheme(s,o),this._initHandlers(),this._initSurface(),this.bindCategories(),nn.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(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=dl,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=or({},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&&pn(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 ta(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 ia(e[i])},e.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new ia(e[t])},e.prototype.plotArea=function(){return new oa(this._plotArea)},e.prototype.toggleHighlight=function(t,e){var i,o,r,n=this._plotArea,s=(n.srcSeries||n.series||[])[0];er(e)?i=n.filterPoints(e):(rr(e)?(o=e.series,r=e.category):o=r=e,i="donut"===s.type?gl(n.pointsBySeriesName(o),r):s.type===xa||"funnel"===s.type?gl((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(er(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&Nr(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&&Yr(e,{width:i.width}),i.height&&Yr(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=a.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 Hh,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),bl(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=or({},t.options,{chartArea:{width:t.width,height:t.height}});_l(this._originalOptions,o),this.options=or({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories();var r=this._getModel();r.renderVisual(),bl(r._plotArea.panes),e=r.visual,this.options=i}else e=this.surface.exportVisual();return e},e.prototype._sharedTooltip=function(){return this._plotArea instanceof Uh&&this.options.tooltip&&this.options.tooltip.shared},e.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Yh(this._plotArea,t.pannable))},e.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Zh(this,e))},e.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Jh(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 ac(this.chartService,t)},e.prototype._createSharedTooltip=function(t){return new hc(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=or({},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<dl.length;a++)i=dl[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=or({},t.seriesDefaults),s=e?or({},e.seriesDefaults):{},a=or({},s);vl(n),vl(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,c=or({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=c,i[p]=or({},c,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 Rn(this._modelOptions());return i.chart=this,i._plotArea=e,Un.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new tc(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},e.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return or({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},e.prototype._createPlotArea=function(t){var e=this.options;return ic.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 vs&&r.select&&!r.vertical){var n=o.range(),s=new sc(this,o,or({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=po(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,Hr(i,((t={}).contextmenu=this._clickHandler,t[wa]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Hr(i,((e={}).mousemove=this._mousemove,e)),this.domEvents=Ar.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:ml(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:ml(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:ml(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=Dr(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:ml(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=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={},c=0;c<p.length;c++){var l=p[c],u=l.options.name;u&&(h[u]=l.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=ml(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=Zr(t);return this._toModelCoordinates(e.x,e.y)},e.prototype._elementPadding=function(){if(!this._padding){var t=pr(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=Xr(this.element);return{left:tn(t.x+e.left+i.left),top:tn(t.y+e.top+i.top)}},e.prototype._toModelCoordinates=function(t,e){var i=this.element,o=Xr(i),r=this._elementPadding(),n=un(i).invert(),s=new p.Point(t-o.left-r.left,e-o.top-r.top).transform(n);return new dn(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 uh)})),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){or({},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),Hr(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))or({},i.tooltip,a.options.tooltip).visible&&o.show(a),r.show(a)}}else en(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),c=h.map((function(t){return t.eventArgs(e)})),l=c[0]||{};l.categoryPoints=c,h.length>0&&!this.trigger("seriesHover",l)?(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 Ir,s=[],a=!1,p=0;p<r;p++){var h=o[p],c=h.categoryAxis===t.name||!h.categoryAxis&&0===e,l=h.data,u=l.length,f=h.categoryField&&c;if(a=f||a,f&&u>0)for(var d=(i=eh(t,aa(h.categoryField,l[0])))?th:aa,y=0;y<u;y++){var g=l[y],v=d(h.categoryField,g,this.chartService.intl);!i&&n.get(v)||(s.push([v,g]),i||n.set(v,!0))}}if(s.length>0){i&&(s=function(t,e){void 0===e&&(e=ss);for(var i=function(t,e){void 0===e&&(e=ss);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],Jr(r))&&r.push(i[n]);return r}(s,(function(t,e){return ss(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=ha.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===w?r="field":r+="Field",!Nr(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=zr(n.type,[xa,"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;en(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&Hr(this.element,((e={}).mousemove=this._mousemove,e))},e.prototype.applyOptions=function(t,e){_l(this._originalOptions,t),this._originalOptions=or(this._originalOptions,t),this.options=or({},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,en(this.element,((t={}).contextmenu=this._clickHandler,t[wa]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&en(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}(O);function gl(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function vl(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function ml(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var xl=["data","categories"];function _l(t,e){for(var i in e)if(!zr(i,xl)&&e.hasOwnProperty(i)){var o=e[i],r=t[i];if(Nr(r)){var n=null===o;n||!Nr(o)?(delete t[i],n&&delete e[i]):r&&rr(o)&&rr(r)&&_l(r,o)}}}function bl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}sn(yl,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:va,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var wl=yl,Al=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 dn(this.plotArea.box.x2,e.center().y):new dn(e.center().x,-2),align:o}},e.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},e}(hc),Sl=[ga,"bullet"];function kl(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 Cl(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function Tl(t){return $o(t)?[t]:t}var Pl=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(t,"k-sparkline")},e.prototype._initElement=function(e){t.prototype._initElement.call(this,e),this._initialWidth=Math.floor(Yr(e).width)},e.prototype._resize=function(){var e=this.element,i=kl(e.childNodes);this._initialWidth=Math.floor(Yr(e).width),Cl(e.childNodes,i),t.prototype._resize.call(this)},e.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=kl(e.childNodes),o=document.createElement("span");o.innerHTML="&nbsp;",e.appendChild(o);var r=or({width:this._autoWidth,height:Yr(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Yr(e,{width:r.width,height:r.height}),e.removeChild(o),Cl(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=hr(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===ga)return 150;if("bullet"===p.type)return 150;if(p.type===xa)return Yr(r).height;var h=a.categoryAxis;if(h){var c=h.categoriesCount()*(!a.options.isStacked&&zr(p.type,[va,"verticalBullet"])?a.seriesOptions.length:1);n=Math.max(n,c)}}}var l=n*e.pointWidth;return l>0&&(l+=i.left+i.right),l},e.prototype._createSharedTooltip=function(t){return new Al(this._plotArea,t)},e.normalizeOptions=function(t){var e=Tl(t);return(e=C(e)?{seriesDefaults:{data:e}}:or({},e)).series||(e.series=[{data:Tl(e.data)}]),or(e,{seriesDefaults:{type:e.type}}),(zr(e.series[0].type,Sl)||zr(e.seriesDefaults.type,Sl))&&(e=or({},{categoryAxis:{crosshair:{visible:!1}}},e)),e},e}(wl);sn(Pl,{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 Ml=Pl,Ol=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(pr(this.element,"opacity").opacity)},e.prototype.step=function(t){pr(this.element,{opacity:String(Lr(this._initialOpacity,0,t))})},e.prototype.abort=function(){t.prototype.abort.call(this),pr(this.element,{display:"none",opacity:String(this._initialOpacity)})},e.prototype.cancel=function(){t.prototype.abort.call(this),pr(this.element,{opacity:String(this._initialOpacity)})},e}(a.Animation);function Rl(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var jl=function(t){function e(e,i,o){t.call(this),this.options=or({},this.options,o),this.container=e,this.chartService=i;var r=pr(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=Rl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Rl("k-tooltip k-chart-tooltip"),i=this.scroll=Rl("k-scroll");e.innerHTML="&nbsp;",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=es(ps(t)+ps(e-t)/2),p=.4*i.width(),h=i.center().x-p,c=(i.center().x-h)/(r.max-r.min),l=a-r.min,u=this.chartService.intl.format(r.format,t,e),f=Tr(r);this.clearHideTimeout(),this._visible||(pr(o,{visibility:"hidden",display:"block"}),this._visible=!0),f&&(u=f({from:t,to:e})),s.innerHTML=u,pr(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});var d=pr(s,["marginTop","borderTopWidth","height"]);pr(n,{width:p,left:h+l*c,top:i.y1+d.marginTop+d.borderTopWidth+d.height/2}),pr(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 Ol(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}(O);sn(jl,{format:"{0:d} - {1:d}",hideDelay:500});var Bl=jl,Il="_navigator",zl=Il;function Ll(){}var El=function(t){function e(e){var i;t.call(this),this.chart=e;var o=this.options=or({},this.options,e.options.navigator),r=o.select;r&&(r.from=this.parseDate(r.from),r.to=this.parseDate(r.to)),Nr(o.hint.visible)||(o.hint.visible=o.visible),this.chartObserver=new Vr(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 fs(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,c=a.mousewheel,l=(t=o,Ll.prototype=t,new Ll);0!==o.categoriesCount()&&(this.clean(),l.box=o.box,this.selection=new sc(e,l,{min:n,max:s,from:p||n,to:h||s,mousewheel:on(c,{zoom:"left"}),visible:i.visible},new Vr(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),i.hint.visible&&(this.hint=new Bl(e.element,e.chartService,{min:n,max:s,template:Tr(i.hint),format:i.hint.format})))},e.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[zl].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=or({},o,{from:r,to:n}),this.filterAxes()},e.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Jr(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],c=this.options.select;if(h&&!a&&o){e=c.from&&c.to?ps(c.to)-ps(c.from):ps(o.options.to)-ps(o.options.from);var l=es(Kr(ps(h.min),s.min,ps(s.max)-e)),u=es(Kr(ps(l)+e,ps(s.min)+e,s.max));this.options.select={from:l,to:u},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(l,u),this.showHint(l,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!==Il&&(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 Cs(or({baseUnit:"fit"},t.options.categoryAxis[0],{categories:[e.from,e.to]}),t.chartService).options;o.from=os(r.min,-r.baseUnitStep,r.baseUnit),o.to=os(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[zl]},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=or({},i.navigator,t.navigator),r=t.panes=[].concat(t.panes),n=or({},o.pane,{name:Il});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===Qp(i,ba).length,s=or({type:"date",pane:Il,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(or({},s,{maxDateGroups:200},a,{name:zl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),or({},s,a,{name:zl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),or({},s,a,{name:zl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(or({name:zl,pane:Il,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(or({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:zl,categoryAxis:zl,autoBind:e.autoBindElements}))},e}(O),Vl=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=Yr(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=or({},r,n)),El.setup(e,r),t.prototype.applyDefaults.call(this,e,r)},e.prototype._setElementClass=function(t){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=Rr([].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 El(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===Il?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===zl?t=o.categories:t&&o.pane===Il&&(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===Il},e.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e}(wl);sn(Vl,{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 Fl=Vl,Dl=Math.PI/180;function Ul(t,e){var i=t.getOrigin(),o=t.getSize(),r=hr(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 Gl=a.Group,Hl=a.Path,Nl=a.Text;function ql(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",s=Hl.fromRect(new p.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),a=new Nl(t.text,new p.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),h=Ul(a.bbox().clone(),e.padding),c=Hl.fromRect(h,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),l=new Gl;return l.append(s),l.append(c),l.append(a),l}function Xl(t,e,i){var o=Nr(t.from)?t.from:x,r=Nr(t.to)?t.to:m;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Yl(t,e){var i=hr(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,Ul(t,i)}var Wl=a.Path,Zl=a.Surface,Jl=function(t){function e(e,i,o,r){void 0===r&&(r={}),t.call(this),this.element=e,this.theme=o,this.contextService=new br(this,r),this._originalOptions=or({},this.options,i),this.options=or({},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(C(t))for(var r=0;r<t.length;r++)$o(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 p.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();var i=Yl(e.bbox(),this._gaugeAreaMargin);this.reflow(i)},e.prototype.setOptions=function(t,e){this._originalOptions=or(this._originalOptions,t),this.options=or({},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=or({},e,this.options);var i=this.options,o=i.pointer;if(C(o)){for(var r=[],n=0;n<o.length;n++)r.push(or({},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 p.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,i.width>0&&(o=Yl(o,i.width)),Wl.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();Yr(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Zl.create(i,{type:t.renderAs}))},e.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&or(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}(O);sn(Jl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Kl=Jl,$l=a.Path,Ql=a.Group,tu=p.Point;function eu(t,e){var i,o,r=t.position,n=t.tickX,s=t.tickY;return t.vertical?(i=new tu(n,r),o=new tu(n+e.size,r)):(i=new tu(r,s),o=new tu(r,s+e.size)),new $l({stroke:{color:e.color,width:e.width}}).moveTo(i).lineTo(o)}function iu(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(eu(i,o)))}var ou=function(t){function e(e,i){var o=e||{};!Nr(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=or({},this.options,t);return(e=or({},e,{labels:{mirror:e.mirror}})).majorUnit=e.majorUnit||fn(e.min,e.max),e},e.prototype.initFields=function(){},e.prototype.render=function(){var t=this.elements=new Ql,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 Ql,a=n.length,h=t.rangeSize||t.minorTicks.size/2,c=0;c<a;c++){var l=Xl(n[c],e,i),u=this.getSlot(l.from,l.to),f=o?this.lineBox():u,d=o?u:this.lineBox();o?f.x1-=h*(r?-1:1):d.y2+=h*(r?-1:1),s.append($l.fromRect(new p.Rect([f.x1,d.y1],[f.x2-f.x1,d.y2-d.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 Ql,o=0;o<t.length;o++)i.append(ql(t[o],e.labels));return i},e.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Ql;if(t.width>0&&t.visible){var o=new $l({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 Ql,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return iu(t,this.getMajorTickPositions(),o,e.majorTicks),iu(t,this.getMinorTickPositions(),o,or({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e}(Bs);sn(ou,{min:0,max:50,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var ru=ou,nu=function(t){function e(e,i){t.call(this);var o=e.options,r=o.min,n=o.max,s=this.options=or({},this.options,i);s.fill=s.color,this.scale=e,Nr(s.value)?s.value=Kr(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=Nr(e._oldValue)?e.value:r,e.value=Kr(t,r,n),this.elements&&this.repaint()},e}(O);sn(nu,{color:l});var su=nu,au=function(t){function e(e,i){t.call(this,e,i),this.options=or({track:{visible:Nr(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,c=o.size/2,l=hr(o.margin),u=a?l[s?"left":"right"]:l[s?"bottom":"top"];u=s?-u:u,a?(i=new gn(p.x1+u,p.y1,p.x1+u,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new gn(p.x2+u,p.y1-c,p.x2+u,p.y2+c))):(i=new gn(p.x1,p.y1-u,p.x2,p.y1-u),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new gn(p.x1-c,p.y1-u,p.x2+c,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:Nr(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=hr(e.margin);return r?n[o?"left":"right"]:n[o?"bottom":"top"]},e}(su);sn(au,{shape:"barPointer",track:{border:{width:1}},color:l,border:{width:1},opacity:1,margin:hr(3),animation:{type:"barPointer"},visible:!0});var pu=au,hu=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 p.Point(i.x1,i.y1),a=this.toScale=new p.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=Lr(this.fromScale.x,this.toScale.x,t),i=Lr(this.fromScale.y,this.toScale.y,t);this.element.transform(p.transform().translate(e,i))},e}(a.Animation);sn(hu,{easing:"linear",duration:250}),a.AnimationFactory.current.register("arrowPointer",hu);var cu=hu,lu=p.Point,uu=a.Path,fu=function(t){function e(e,i){t.call(this,e,i),Nr(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 lu(0,0-i),new lu(0-o*e,0),new lu(0,0+i)]:[new lu(0-i,0),new lu(0,0+o*e),new lu(0+i,0)]},e.prototype.repaint=function(){var t=this.scale,e=this.options,i=new cu(this.elements,or(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 uu({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),n=t.getSlot(e.value);return r.transform(p.transform().translate(n.x1,n.y1)),this.elements=r,r},e}(pu),du=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?k:S,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=Lr(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}(a.Animation);sn(du,{easing:"linear",speed:250}),a.AnimationFactory.current.register("barPointer",du);var yu=du,gu=a.Group,vu=a.Path,mu=function(t){function e(e,i){t.call(this,e,i),Nr(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,h=e.getSlot(e.options.min),c=e.getSlot(t),l=n?k:S,u=n?S:k,f=this._margin()*s,d=new p.Point;d[l]=h[l+"1"],d[u]=h[u+"1"];var y=new p.Point;y[l]=c[l+"1"],y[u]=c[u+"1"],n?(d.translate(f,0),y.translate(f,0)):(d.translate(0,f),y.translate(0,f));var g=y.clone(),v=d.clone();return n?(g.translate(a,0),v.translate(a,0)):(g.translate(0,a),v.translate(0,a)),[d,y,g,v]},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 yu(o,or(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 gu,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());var i=this.pointerPath=new vu({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 vu.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}(pu),xu=a.Group,_u=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 gn(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 xu,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 ru(t.scale,this.contextService);this.pointers=[];var i=t.pointer;i=C(i)?i:[i];for(var o=0;o<i.length;o++){var r=or({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?fu:mu;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 gn(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,n=new gn(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 gn(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new gn(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}(Kl);sn(_u,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var bu=_u,wu=a.Arc,Au=a.Path,Su=a.Group;function ku(t,e,i,o){var r=new Su,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),c=new p.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new Au({stroke:{color:o.color,width:o.width}}).moveTo(h).lineTo(c))}return r}function Cu(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var Tu=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=or({},this.options,t);return e.majorUnit=e.majorUnit||fn(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(!Nr(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 Su,s=.05*i;Nr(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,h="inside"===a.position,c=Nr(this.labelElements);h&&(i-=this.ticksSize(),this.hasRanges()&&!c&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,u=l.length,f=hr(a.padding),d=(f.left+f.right)/2,y=(f.top+f.bottom)/2,g=0;g<u;g++){var v=l[g],m=v.box.width()/2,x=v.box.height()/2,_=o[g],b=(_-180)*Dl,w=e.pointAt(_),A=w.x+Math.cos(b)*(m+d)*(h?1:-1),S=w.y+Math.sin(b)*(x+y)*(h?1:-1);v.reflow(new gn(A-m,S-x,A+m,S+x));var k=new p.Point(v.box.x1,v.box.y1),C=void 0;if(c){var T=(C=this.labelElements.children[g]).bbox().origin,P=C.transform()||p.transform();P.translate(k.x-T.x,k.y-T.y),C.transform(P)}else C=ql(v,t.labels),n.append(C);this.bbox=p.Rect.union(this.bbox,C.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=p.Rect.union(this.bbox,this.ranges.bbox())}},e.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Su;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],c=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-c!=0&&i.append(this.createRange(c,l,a,h))}}return i},e.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,n=new p.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new wu(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(Cu(r,n,s));for(var a=0;a<i;a++)for(var p=Xl(e[a],r,n),h=o.length,c=0;c<h;c++){var l=o[c];if(l.from<=p.from&&p.from<=l.to){o.push(Cu(p.from,p.to,p.color,p.opacity)),l.from<=p.to&&p.to<=l.to&&o.push(Cu(p.to,l.to,s,p.opacity)),l.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 p.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=ku(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new Su;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=ku(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=[],c=0;c<s;c++)h.push(tn(a,3)),a+=p;return tn(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]),h=t[s].segments,c=a.x-h[0].anchor().x,l=a.y-h[0].anchor().y;t[s].transform((new p.transform).translate(c,l))}},e}(Bs);sn(Tu,{min:0,max:100,majorTicks:{size:15,align:"inside",color:l,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:l,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Pu=Tu,Mu=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=Lr(e.oldAngle,e.newAngle,t);this.element.transform(p.transform().rotate(i,e.center))},e}(a.Animation);sn(Mu,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialPointer",Mu);var Ou=Mu,Ru=a.Circle,ju=a.Group,Bu=a.Path,Iu=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(p.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 Ou(this.elements,or(e.animation,{oldAngle:i,newAngle:o})).play()},e.prototype.render=function(){var t=this.scale,e=this.options,i=new ju;return!1!==e.animation&&or(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Dl),i},e.prototype.reflow=function(t){var e=this.center=t.center,i=Kr(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=p.Rect.fromPoints(new p.Point(e.x-r,e.y-r),new p.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 Bu({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 p.Circle(this.center,this.capSize);return new Ru(i,{fill:{color:e},stroke:{color:e}})},e}(su);sn(Iu,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var zu=Iu,Lu=a.Group,Eu=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=p.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 Lu;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=tn(p,3),c=tn(-p,3),l=0,u=0;!(!(u++<100)||(l=n===o?l+1:0)>5||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||c!==r&&0<=(o=this.getPlotBox(c,t,s))&&o<=2||(r=e>0&&o>0?2*h:e<0&&o<0?2*c:tn((h+c)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,i>0?(c=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=p.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=p.Rect.union(n.bbox,s[a].bbox)},e.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Pu(t.scale,this.contextService);this.pointers=[];for(var o=C(e)?e:[e],r=0;r<o.length;r++){var n=new zu(i,or({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e}(Kl);sn(Eu,{transitions:!0,gaugeArea:{background:""}});var Vu=Eu,Fu=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}(Pu);sn(Fu,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Du=Fu,Uu=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=Kr(r,150,800);var n=e.elements.options.get("stroke.color"),s=e.currentColor();n!==s&&(this.startColor=new Ra(n),this.color=new Ra(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=Lr(e.oldAngle,e.newAngle,t);if(this.element.angle(r),o){var n=tn(Lr(i.r,o.r,t)),s=tn(Lr(i.g,o.g,t)),a=tn(Lr(i.b,o.b,t));this.element.stroke(new Ra(n,s,a).toHex())}},e}(a.Animation);sn(Uu,{easing:"linear",duration:150}),a.AnimationFactory.current.register("radialRangePointer",Uu);var Gu=Uu,Hu=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 Gu(this,or(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&&or(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=$o(s)?s:e;if(r)for(var p=0;p<r.length;p++){var h=r[p],c=h.color,l=h.from;void 0===l&&(l=e);var u=h.to;if(void 0===u&&(u=i),l<=a&&a<=u)return c}return n},e.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e}(su);sn(Hu,{animation:{type:"radialRangePointer",duration:150}});var Nu=Hu,qu=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 Du(t.scale,this.contextService),i=new Nu(e,or({},{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}(Vu),Xu="Arial, Helvetica, sans-serif",Yu="12px "+Xu,Wu="16px "+Xu,Zu=function(){return{icon:{border:{width:1}},label:{font:Yu,padding:3},line:{length:10,width:2},visible:!0}},Ju=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:Zu(),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}}},Ku=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Yu},notes:Zu(),title:{font:Wu,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:Ju(t),title:{font:Wu},legend:{labels:{font:Yu}}}}}})}));