@progress/kendo-charts 1.31.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/base-theme.js +22 -2
- package/dist/es/chart/categorical-chart.js +6 -26
- package/dist/es/chart/constants.js +11 -1
- package/dist/es/chart/heatmap-chart/heatmap-chart.js +2 -6
- package/dist/es/chart/plotarea/categorical-plotarea.js +83 -16
- package/dist/es/chart/plotarea/plotarea-base.js +71 -2
- package/dist/es/chart/plotarea/plotarea-factory.js +4 -2
- package/dist/es/chart/plotarea/polar-plotarea.js +21 -2
- package/dist/es/chart/plotarea/radar-plotarea.js +13 -2
- package/dist/es/chart/plotarea/xy-plotarea.js +38 -5
- package/dist/es/chart/register-charts.js +12 -7
- package/dist/es/chart/scatter-charts/scatter-chart.js +3 -7
- package/dist/es/chart/trendlines/calculate-moving-average.js +44 -0
- package/dist/es/chart/trendlines/calculate-slope.js +37 -0
- package/dist/es/chart/trendlines/linear-trendline.js +61 -0
- package/dist/es/chart/trendlines/moving-average.js +65 -0
- package/dist/es/chart/trendlines/scatter-linear-trendline.js +63 -0
- package/dist/es/chart/trendlines/scatter-moving-average.js +34 -0
- package/dist/es/chart/trendlines/scatter-trendline-registry.js +9 -0
- package/dist/es/chart/trendlines/scatter-value-getter.js +7 -0
- package/dist/es/chart/trendlines/trendline-factory.js +10 -0
- package/dist/es/chart/trendlines/trendline-registry.js +9 -0
- package/dist/es/chart/utils.js +0 -2
- package/dist/es/common/constants.js +1 -0
- package/dist/es/common/hash-map.js +7 -11
- package/dist/es/core/category-axis.js +37 -30
- package/dist/es/core/date-category-axis.js +27 -3
- package/dist/es2015/chart/base-theme.js +22 -2
- package/dist/es2015/chart/categorical-chart.js +6 -26
- package/dist/es2015/chart/constants.js +11 -1
- package/dist/es2015/chart/heatmap-chart/heatmap-chart.js +2 -6
- package/dist/es2015/chart/plotarea/categorical-plotarea.js +81 -16
- package/dist/es2015/chart/plotarea/plotarea-base.js +69 -2
- package/dist/es2015/chart/plotarea/plotarea-factory.js +4 -2
- package/dist/es2015/chart/plotarea/polar-plotarea.js +21 -2
- package/dist/es2015/chart/plotarea/radar-plotarea.js +13 -2
- package/dist/es2015/chart/plotarea/xy-plotarea.js +36 -5
- package/dist/es2015/chart/register-charts.js +14 -5
- package/dist/es2015/chart/scatter-charts/scatter-chart.js +3 -7
- package/dist/es2015/chart/trendlines/calculate-moving-average.js +42 -0
- package/dist/es2015/chart/trendlines/calculate-slope.js +35 -0
- package/dist/es2015/chart/trendlines/linear-trendline.js +51 -0
- package/dist/es2015/chart/trendlines/moving-average.js +53 -0
- package/dist/es2015/chart/trendlines/scatter-linear-trendline.js +57 -0
- package/dist/es2015/chart/trendlines/scatter-moving-average.js +31 -0
- package/dist/es2015/chart/trendlines/scatter-trendline-registry.js +9 -0
- package/dist/es2015/chart/trendlines/scatter-value-getter.js +4 -0
- package/dist/es2015/chart/trendlines/trendline-factory.js +10 -0
- package/dist/es2015/chart/trendlines/trendline-registry.js +9 -0
- package/dist/es2015/chart/utils.js +0 -2
- package/dist/es2015/common/constants.js +1 -0
- package/dist/es2015/common/hash-map.js +7 -11
- package/dist/es2015/core/category-axis.js +37 -30
- package/dist/es2015/core/date-category-axis.js +27 -3
- package/dist/npm/main.js +889 -353
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var t_={};return{setters:[function(t){t_.Class=t.Class,t_.Color=t.Color,t_.drawing=t.drawing,t_.geometry=t.geometry,t_.logToConsole=t.logToConsole,t_.parseColor=t.parseColor,t_.support=t.support,t_.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var z={100:t=>{t.exports=t_}},j={};function V(t){var e=j[t];return void 0!==e||(e=j[t]={exports:{}},z[t](e,e.exports,V)),e.exports}V.d=(t,e)=>{for(var o in e)V.o(e,o)&&!V.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},V.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),V.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var D,H,U={};{V.r(U),V.d(U,{Aggregates:()=>zm,ArcGauge:()=>X1,ArcScale:()=>N1,AreaChart:()=>Jm,AreaSegment:()=>Qm,ArrowLinearPointer:()=>L1,Axis:()=>bm,AxisGroupRangeTracker:()=>tx,AxisLabel:()=>gm,Bar:()=>ox,BarChart:()=>nx,BarLabel:()=>ex,BarLinearPointer:()=>j1,Barcode:()=>Y1,Box:()=>E,BoxElement:()=>am,BoxPlot:()=>px,BoxPlotChart:()=>lx,BubbleChart:()=>fx,Bullet:()=>yx,BulletChart:()=>vx,Candlestick:()=>sx,CandlestickChart:()=>ax,CategoricalChart:()=>Um,CategoricalErrorBar:()=>Hm,CategoricalPlotArea:()=>Vx,CategoryAxis:()=>wm,Chart:()=>S1,ChartAxis:()=>Im,ChartContainer:()=>_x,ChartElement:()=>L,ChartPane:()=>Em,ChartPlotArea:()=>Lm,ChartService:()=>xm,CircularGauge:()=>q1,Class:()=>A.Class,ClipAnimation:()=>Ym,ClusterLayout:()=>ix,Crosshair:()=>xx,CrosshairTooltip:()=>mx,CurveProcessor:()=>Rm,DateCategoryAxis:()=>Cm,DateValueAxis:()=>km,DefaultAggregates:()=>kx,DomEventsBuilder:()=>_m,DonutChart:()=>r1,DonutPlotArea:()=>n1,DonutSegment:()=>i1,ErrorBarBase:()=>Dm,ErrorRangeCalculator:()=>Vm,Extent:()=>Cg,FloatElement:()=>cm,FontLoader:()=>em,FormatService:()=>mm,Gauge:()=>B1,Gradients:()=>hm,HashMap:()=>Jv,Highlight:()=>Dx,InstanceObserver:()=>tm,IntlService:()=>vm,Legend:()=>Wx,LegendItem:()=>Gx,LegendLayout:()=>Nx,LineChart:()=>Zm,LinePoint:()=>Gm,LineSegment:()=>Wm,LinearGauge:()=>V1,LinearPointer:()=>I1,LinearScale:()=>R1,Location:()=>gf,LogarithmicAxis:()=>Am,Map:()=>J1,MousewheelZoom:()=>Fx,Navigator:()=>M1,NavigatorHint:()=>T1,Note:()=>ym,NumericAxis:()=>Sm,OHLCChart:()=>Lx,OHLCPoint:()=>Ex,Pane:()=>bx,Pannable:()=>Hx,PieAnimation:()=>Qx,PieChart:()=>e1,PieChartMixin:()=>t1,PiePlotArea:()=>o1,PieSegment:()=>Jx,PlotAreaBase:()=>wx,PlotAreaEventsMixin:()=>Cx,PlotAreaFactory:()=>Xx,Point:()=>I,PointEventsMixin:()=>Fm,PolarAxis:()=>Mm,QRCode:()=>Q1,RadarCategoryAxis:()=>Tm,RadarLogarithmicAxis:()=>Bm,RadarNumericAxis:()=>Om,RadialGauge:()=>F1,RadialPointer:()=>U1,RadialScale:()=>D1,RangeAreaChart:()=>Ix,RangeAreaPoint:()=>Mx,RangeBar:()=>Ax,RangeBarChart:()=>Px,RangePointer:()=>W1,Ring:()=>rm,RootElement:()=>lm,ScatterChart:()=>ux,ScatterErrorBar:()=>cx,ScatterLineChart:()=>Kx,Sector:()=>nm,Selection:()=>qx,SeriesAggregator:()=>Sx,SeriesBinder:()=>jm,ShapeBuilder:()=>sm,ShapeElement:()=>pm,SharedTooltip:()=>Zx,Sparkline:()=>A1,SplineAreaSegment:()=>$m,SplineSegment:()=>qm,StackWrap:()=>rx,StockChart:()=>O1,TemplateService:()=>$v,Text:()=>um,TextBox:()=>dm,Title:()=>fm,Tooltip:()=>Yx,WaterfallChart:()=>jx,WaterfallSegment:()=>zx,XYPlotArea:()=>$x,ZoomSelection:()=>Ux,addClass:()=>ht,alignPathToPixel:()=>ut,anyHasZIndex:()=>yn,append:()=>Ht,appendIfNotNull:()=>ks,areNumbers:()=>ns,autoMajorUnit:()=>Me,autoTextColor:()=>om,barcodeValidator:()=>Z1,bindEvents:()=>Ut,bindSegments:()=>Ps,categoriesCount:()=>nn,chartBaseTheme:()=>Kv,clockwise:()=>dt,constants:()=>F,convertableToNumber:()=>gt,countNumbers:()=>Mi,createHashSet:()=>Pe,createOutOfRangePoints:()=>js,deepExtend:()=>x,defaultErrorHandler:()=>Te,defined:()=>T,deg:()=>Ft,elementOffset:()=>Nt,elementScale:()=>ue,elementSize:()=>Gt,elementStyles:()=>wt,equalsIgnoreCase:()=>Ts,evalOptions:()=>rn,eventCoordinates:()=>Wt,eventElement:()=>Xt,filterSeriesByType:()=>Ms,find:()=>pe,findAxisByName:()=>Ai,getDateField:()=>Os,getField:()=>Ri,getSpacing:()=>P,getTemplate:()=>kt,getter:()=>Tt,grep:()=>Mt,hasClasses:()=>Ot,hasGradientOverlay:()=>Kn,hasValue:()=>cs,hashKey:()=>qt,inArray:()=>u,interpolateValue:()=>Rt,isArray:()=>pt,isDateAxis:()=>Bs,isFunction:()=>yt,isNumber:()=>m,isObject:()=>xt,isPlainObject:()=>Lt,isString:()=>ft,keys:()=>im,last:()=>Yt,limitValue:()=>_,logToConsole:()=>A.logToConsole,map:()=>zt,mousewheelDelta:()=>Vt,objectKey:()=>Zt,qrcodeValidator:()=>K1,rad:()=>Qt,rectToBox:()=>We,removeClass:()=>ct,renderIcon:()=>se,round:()=>M,segmentVisible:()=>As,setDefaultOptions:()=>e,singleItemOrArray:()=>Rs,sparseArrayLimits:()=>ae,styleValue:()=>_t,unbindEvents:()=>Kt,valueOrDefault:()=>O});var F={},N=(V.r(F),V.d(F,{DEFAULT_PANE:()=>Wh,NAVIGATOR_AXIS:()=>Gh,NAVIGATOR_PANE:()=>Nh}),"arc"),G="#000",w="bottom",b="center",W="circle",X=3,q="cross",Y="date",Z="12px sans-serif",g=10,Q=/\{\d+:?/,K="height",$="inside",C="left",J=Number.MAX_VALUE,tt=-Number.MAX_VALUE,et="none",ot="object",it="outside",S="right",rt="roundedRect",nt="string",k="top",st="value",a="#fff",at="width",y="x",v="y";function pt(t){return Array.isArray(t)}function ht(t,e){for(var o=pt(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var lt=/\s+/g;function ct(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(lt," "))}var A=V(100);function ut(t){var e=.5;t.options.stroke&&A.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function dt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function ft(t){return typeof t===nt}function gt(t){return m(t)||ft(t)&&isFinite(t)}function yt(t){return"function"==typeof t}var vt="object",mt="undefined";function x(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r,n=o[i],s=typeof n;(r=s===vt&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):yt(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===vt&&r||{},t(e[i],n)):s!==mt&&(e[i]=n)}}(t,e[i]);return t}function xt(t){return"object"==typeof t}function _t(t){return m(t)?t+"px":t}var bt=/width|height|top|left|bottom|right/i;function wt(t,e){var o=ft(e)?[e]:e;if(pt(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=bt.test(s)?parseFloat(r[s]):r[s]}return i}if(xt(e))for(var a in e)t.style[a]=_t(e[a])}function P(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[k]=o[S]=o[w]=o[C]=t:(o[k]=t[k]||e,o[S]=t[S]||e,o[w]=t[w]||e,o[C]=t[C]||e),o}function Ct(){}var St={compile:function(t){return t}};Ct.register=function(t){St=t},Ct.compile=function(t,e){return St.compile(t,e)};const $v=Ct;function kt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=$v.compile(t.template):yt(t.content)&&(e=t.content),e}var At=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Pt={};function Tt(t){var r;return Pt[t]||(r=[],t.replace(At,function(t,e,o,i){r.push(A.drawing.util.defined(e)?e:o||i)}),Pt[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e}),Pt[t]}function Mt(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function Ot(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(t.className.indexOf&&-1!==t.className.indexOf(o[i]))return!0}function Bt(){this._map={}}Pt[void 0]=function(t){return t},Bt.prototype.get=function(t){return this._map[this._key(t)]},Bt.prototype.set=function(t,e){this._map[this._key(t)]=e},Bt.prototype._key=function(t){return t instanceof Date?t.getTime():t};const Jv=Bt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Rt(t,e,o){return A.drawing.util.round(t+(e-t)*o,X)}function It(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}var Et="trigger";It.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i[Et]&&(o=this.callObserver(Et,t,e)),o},It.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},It.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};const tm=It;function Lt(t){return"[object Object]"===Object.prototype.toString.call(t)}function zt(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);A.drawing.util.defined(n)&&i.push(n)}return i}var jt=A.support.browser||{};function Vt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,jt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Dt(){}var t,Ht=(t=A.drawing.util).append,Ut=t.bindEvents,T=t.defined,Ft=t.deg,Nt=t.elementOffset,Gt=t.elementSize,Wt=t.eventCoordinates,Xt=t.eventElement,qt=t.hashKey,Yt=t.last,_=t.limitValue,Zt=t.objectKey,Qt=t.rad,M=t.round,Kt=t.unbindEvents,O=t.valueOrDefault;Dt.fetchFonts=function(o,i,r){void 0===r&&(r={depth:0}),!o||5<r.depth||!document.fonts||Object.keys(o).forEach(function(t){var e=o[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?i.push(e):"object"==typeof e&&(r.depth++,Dt.fetchFonts(e,i,r),r.depth--))})},Dt.loadFonts=function(t,e){var o=[];if(0<t.length&&document.fonts){try{o=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,A.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},Dt.preloadFonts=function(t,e){var o=[];Dt.fetchFonts(t,o),Dt.loadFonts(o,e)};const em=Dt;function e(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function $t(t,e){this.element=t,this.options=x({},this.options,e),this.wrapper()}var Jt,te="k-i-",ee="k-svg-i-",t=($t.prototype.wrapper=function(){this.addClasses()},$t.prototype.addClasses=function(){},$t.prototype.html=function(){return this.element.outerHTML},e($t,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(Jt=$t)&&(ie.__proto__=Jt),((ie.prototype=Object.create(Jt&&Jt.prototype)).constructor=ie).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(te)}),e=this.options.icon?(this.options.icon.startsWith(te)?"":te)+this.options.icon:"";this._className=e,ht(this.element,"k-icon"),ct(this.element,t),ht(this.element,e),ht(this.element,this.options.iconClass||""),Jt.prototype.wrapper.call(this)},ie),oe,o;function ie(t,e){Jt.call(this,t,e)}function re(t,e){t.innerHTML="",oe.call(this,t,e)}e(t,{name:"HTMLFontIcon",icon:null}),(oe=$t)&&(re.__proto__=oe),((re.prototype=Object.create(oe&&oe.prototype)).constructor=re).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,o=this.element.className.split(" ").find(function(t){return t.startsWith(ee)}),i=(!t&&e&&(i=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=i[1],e=e.replace(i[0],"")),ft(t)&&(t=t.replace("k-i-","").replace(/-./g,function(t){return t[1].toUpperCase()}),t=this.options.svgIcons[t]||this.options.svgIcons[t+"Icon"]),t&&t.name?ee+t.name:"");this._className=i,ht(this.element,"k-svg-icon"),ct(this.element,o),ht(this.element,i),ht(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&Lt(t)&&((o=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),o.setAttribute("focusable","false"),o.innerHTML=t.content||"",this.element.appendChild(o)),oe.prototype.wrapper.call(this)},e(o=re,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var ne={svg:o,font:t};function se(t,e){return t&&(!xt(t)||t instanceof HTMLElement)&&!ft(t)||(e=t,t=document.createElement("span")),(e=ft(e)?{icon:e}:e).type||(e.type="svg"),ne[e.type]?new ne[e.type](t,e).html():null}function ae(t){for(var e=J,o=tt,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===J?void 0:e,max:o===tt?void 0:o}}function pe(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var he=A.geometry.Matrix,le=/matrix\((.*)\)/;function ce(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(le))||2!==t.length?he.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(he,[null].concat(t))))}function ue(t){if(!t)return he.unit();for(var e=ce(t),o=t.parentElement;o;)var i=ce(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}const om=function(t){return new A.Color(t).isDark()?a:G};var de,fe,ge,ye,ve={},me=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},o={size:{configurable:!0}},xe=(me.prototype.values=function(){return this._values.filter(function(t){return t!==ve})},me.prototype.has=function(t){return void 0!==this._index[t]},me.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},me.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=ve,delete this._index[t])},me.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(me.prototype,o),function(t){this._set=new Set(t)}),t={size:{configurable:!0}},_e=(xe.prototype.values=function(){return Array.from(this._set)},xe.prototype.has=function(t){return this._set.has(t)},xe.prototype.add=function(t){this._set.add(t)},xe.prototype.delete=function(t){this._set.delete(t)},xe.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(xe.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t}),be,o,we,t,Ce,o,Se,t,ke,t,Ae,o;function Pe(t){return new(_e()?xe:me)(t)}function Te(t){throw t}const im={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Me(t,e){t=M(e-t,g-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=M(t/e,g);return M(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(de=A.Class)&&(Oe.__proto__=de),((Oe.prototype=Object.create(de&&de.prototype)).constructor=Oe).prototype.clone=function(){return new Oe(this.x,this.y)},Oe.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Oe.prototype.rotate=function(t,e){var e=Qt(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=M(i+(r-i)*o+(n-t)*e,X),this.y=M(t+(n-t)*o-(r-i)*e,X),this},Oe.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Oe.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Oe.onCircle=function(t,e,o){e=Qt(e);return new Oe(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};const I=Oe;function Oe(t,e){de.call(this),this.x=t||0,this.y=e||0}function Be(t,e,o,i){fe.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function Re(t,e,o,i,r){r=Qt(r);return new I(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(fe=A.Class)&&(Be.__proto__=fe),((Be.prototype=Object.create(fe&&fe.prototype)).constructor=Be).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Be.prototype.width=function(){return this.x2-this.x1},Be.prototype.height=function(){return this.y2-this.y1},Be.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Be.prototype.move=function(t,e){var o=this.height(),i=this.width();return T(t)&&(this.x1=t,this.x2=this.x1+i),T(e)&&(this.y1=e,this.y2=this.y1+o),this},Be.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},Be.prototype.wrapPoint=function(t){var e=pt(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Be(o,e,o,e)),this},Be.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},Be.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===w?v:y,a=s==v?r:n;return e===b?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===k||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Be.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Be.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Be.prototype.pad=function(t){t=P(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Be.prototype.unpad=function(t){t=P(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Be.prototype.clone=function(){return new Be(this.x1,this.y1,this.x2,this.y2)},Be.prototype.center=function(){return new I(this.x1+this.width()/2,this.y1+this.height()/2)},Be.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Be.prototype.points=function(){return[new I(this.x1,this.y1),new I(this.x2,this.y1),new I(this.x2,this.y2),new I(this.x1,this.y2)]},Be.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Be.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Be.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=Re(0,0,r,i,t),s=Re(e,0,r,i,t),a=Re(e,o,r,i,t),r=Re(0,o,r,i,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),o=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},Be.prototype.toRect=function(){return new A.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Be.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Be.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===y?at:K,n=this[e]();u(o,[C,k])?(this[i]=t[i],this[r]=this[i]+n):u(o,[S,w])?(this[r]=t[r],this[i]=this[r]-n):o===b&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};const E=Be;function Ie(t,e,o,i,r){ge.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}function Ee(t,e){return t-e}(ge=A.Class)&&(Ie.__proto__=ge),((Ie.prototype=Object.create(ge&&ge.prototype)).constructor=Ie).prototype.clone=function(){return new Ie(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},Ie.prototype.middle=function(){return this.startAngle+this.angle/2},Ie.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},Ie.prototype.point=function(t,e){var t=Qt(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=M(this.center.x-o*e,X),t=M(this.center.y-t*e,X);return new I(o,t)},Ie.prototype.adjacentBox=function(t,e,o){var t=this.clone().expand(t),i=t.middle(),t=t.point(i),r=e/2,n=o/2,s=Math.sin(Qt(i)),i=Math.cos(Qt(i)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-i/Math.abs(i)),Math.abs(i)<.9&&(t+=n*-s/Math.abs(s)),new E(a,t,a+e,t+o)},Ie.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new I(s,t),r=this.point(r),r=new I(r.x-e.x,r.y-e.y),n=this.point(n),n=new I(n.x-e.x,n.y-e.y),e=M(s*s+t*t,X);return(r.equals(a)||dt(r,a))&&!dt(n,a)&&o*o<=e&&e<=i*i},Ie.prototype.getBBox=function(){for(var t=new E(J,J,tt,tt),e=M(this.startAngle%360),o=M((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(Ee),n=r.indexOf(e),s=r.indexOf(o),a=e===o?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,i)}return i||t.wrapPoint(this.center),t},Ie.prototype.expand=function(t){return this.radius+=t,this};const rm=Ie;function Le(t,e,o,i){ye.call(this,t,0,e,o,i)}(ye=rm)&&(Le.__proto__=ye),((Le.prototype=Object.create(ye&&ye.prototype)).constructor=Le).prototype.expand=function(t){return ye.prototype.expand.call(this,t)},Le.prototype.clone=function(){return new Le(this.center,this.radius,this.startAngle,this.angle)},Le.prototype.setRadius=function(t){return this.radius=t,this};const nm=Le;function ze(){be.apply(this,arguments)}(be=A.Class)&&(ze.__proto__=be),((ze.prototype=Object.create(be&&be.prototype)).constructor=ze).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new A.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new A.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=A.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(i),e.lineTo(n.x,n.y),e.arc(i,o,t,t,!0)):e.lineTo(r.x,r.y),e},(o=ze).current=new o;const sm=o;function je(t){we.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}(we=A.Class)&&(je.__proto__=we),((je.prototype=Object.create(we&&we.prototype)).constructor=je).prototype.initUserOptions=function(t){return t},je.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},je.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},je.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},je.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},je.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},je.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},je.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},je.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},je.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},je.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},je.prototype.createVisual=function(){this.visual=new A.drawing.Group({zIndex:this.options.zIndex,visible:O(this.options.visible,!0)})},je.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=A.drawing.Animation.create(this.visual,this.options.animation))},je.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):T(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},je.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},je.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},je.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,o=this.visual.children,i=o.length,r=0;r<i;r++){var n=o[r];if(O(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},je.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},je.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},je.prototype.renderComplete=function(){},je.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},je.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);T(n.options.zIndex)||(n.options.zIndex=O(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},je.prototype.createGradientOverlay=function(t,e,o){o=new A.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},je.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},je.prototype.supportsPointInactiveOpacity=function(){return!0},(t=je).prototype.options={};const L=t;function Ve(t){Ce.call(this,t),this.options.margin=P(this.options.margin),this.options.padding=P(this.options.padding)}(Ce=L)&&(Ve.__proto__=Ce),((Ve.prototype=Object.create(Ce&&Ce.prototype)).constructor=Ve).prototype.reflow=function(t){function e(){i.align(t,y,r.align),i.align(t,v,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),Ce.prototype.reflow.call(this,u),o=p?this.box=new E(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(h),e()),this.translateChildren(o.x1-u.x1+h.left+c+l.left,o.y1-u.y1+h.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},Ve.prototype.align=function(t,e,o){this.box.align(t,e,o)},Ve.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},Ve.prototype.createVisual=function(){Ce.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},Ve.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e(o=Ve,{align:C,vAlign:k,margin:{},padding:{},border:{color:G,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const am=o;function De(t,e){Se.call(this,t),this.pointData=e}(Se=am)&&(De.__proto__=Se),((De.prototype=Object.create(Se&&Se.prototype)).constructor=De).prototype.getElement=function(){var t,e,o=this.options,i=this.paddingBox,r=o.type,n=o.rotation,s=i.center(),a=i.width()/2,p=i.height()/2;return o.visible&&this.hasBox()?(e=this.visualStyle(),r===W?t=new A.drawing.Circle(new A.geometry.Circle([M(i.x1+a,X),M(i.y1+p,X)],Math.min(a,p)),e):"triangle"===r?t=A.drawing.Path.fromPoints([[i.x1+a,i.y1],[i.x1,i.y2],[i.x2,i.y2]],e).close():r===q?((t=new A.drawing.MultiPath(e)).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t.moveTo(i.x1,i.y2).lineTo(i.x2,i.y1)):(p=i.toRect(),r===rt&&(a=O(o.borderRadius,p.width()/5),p.setCornerRadius(a)),t=A.drawing.Path.fromRect(p,e)),n&&t.transform(A.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=o.zIndex,t):null},De.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},De.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}},De.prototype.createVisual=function(){this.visual=this.createElement()},e(t=De,{type:W,align:b,vAlign:b});const pm=t,hm={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:o="radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:o,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:o,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:o,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:o,center:[.5,.5],radius:.5}};function He(t){ke.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}(ke=L)&&(He.__proto__=ke),((He.prototype=Object.create(ke&&ke.prototype)).constructor=He).prototype.reflow=function(){var t=this.options,e=this.children,o=new E(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i,r,n,s,a,p,h,l,c,u,d,f=0;f<e.length;f++)e[f].reflow(o),i=o,r=e[f].box,d=u=c=l=h=p=a=s=n=void 0,o=(i.x1===r.x1&&i.y1===r.y1&&i.x2===r.x2&&i.y2===r.y2?r:(n=Math.min(i.x1,r.x1),s=Math.max(i.x1,r.x1),a=Math.min(i.x2,r.x2),p=Math.max(i.x2,r.x2),h=Math.min(i.y1,r.y1),l=Math.max(i.y1,r.y1),c=Math.min(i.y2,r.y2),u=Math.max(i.y2,r.y2),(d=[])[0]=new E(s,h,a,l),d[1]=new E(n,l,s,c),d[2]=new E(a,l,p,c),d[3]=new E(s,c,a,u),i.x1===n&&i.y1===h||r.x1===n&&r.y1===h?(d[4]=new E(n,h,s,l),d[5]=new E(a,c,p,u)):(d[4]=new E(a,h,p,l),d[5]=new E(n,c,s,u)),Mt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new E},He.prototype.createVisual=function(){this.visual=new A.drawing.Group,this.createBackground()},He.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=A.drawing.Path.fromRect(o.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(o)},He.prototype.getRoot=function(){return this},He.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Zt(t),r=hm[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new A.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,o=t.length,i=[],r=0;r<o;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,i.push(n)}return i}()),(e=new A.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},He.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},He.prototype.size=function(){var t=this.options;return new E(0,0,t.width,t.height)},e(t=He,{width:600,height:400,background:a,border:{color:G,width:0},margin:P(5),zIndex:-2});const lm=t;function Ue(t){Ae.call(this,t),this._initDirection()}(Ae=L)&&(Ue.__proto__=Ae),((Ue.prototype=Object.create(Ae&&Ae.prototype)).constructor=Ue).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=at,this.elementSizeField=K,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=K,this.elementSizeField=at,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Ue.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ue.prototype.reflowChildren=function(){var t=this,e=t.box,o=t.elementAxis,i=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,p=s.length,h=e[i+1]+this.alignStart(a,e[n]());if(p){for(var l=h,c=0;c<p;c++){for(var u=s[c],d=u.groupElements,f=e[o+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[n],u.groupSize),_=new E;_[i+1]=x,_[i+2]=x+m[n],_[o+1]=f,_[o+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}e[i+1]=h,e[i+2]=h+a,e[o+2]=e[o+1]+t}},Ue.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===w?o=e-t:i===b&&(o=(e-t)/2),o},Ue.prototype.groupOptions=function(){for(var t=this,e=t.box,o=t.children,i=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=M(e[i]()),p=o.length,h=[],l=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=o[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&M(c+n+v[i])>a&&(h.push({groupElements:f,groupSize:l,groupElementsSize:c}),d=Math.max(d,c),u+=s+l,c=l=0,f=[]),l=Math.max(l,v[r]),0<c&&(c+=n),c+=v[i],f.push(y)}return h.push({groupElements:f,groupSize:l,groupElementsSize:c}),{groups:h,groupsSize:u+=l,maxGroupElementsSize:d=Math.max(d,c)}},Ue.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ue.prototype.createVisual=function(){},e(o=Ue,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const cm=o;var Fe,Ne=A.drawing.Text,t;function Ge(t,e){Fe.call(this,e),this.content=t,this.reflow(new E)}(Fe=L)&&(Ge.__proto__=Fe),((Ge.prototype=Object.create(Fe&&Fe.prototype)).constructor=Ge).prototype.reflow=function(t){var e=this.options,e=e.size=A.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new E(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Ge.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new Ne(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},e(t=Ge,{font:Z,color:G});const um=t;function We(t){var e=t.origin,t=t.bottomRight();return new E(e.x,e.y,t.x,t.y)}var Xe,qe=/\n/m,Ye,o,Ze,t,Qe,o;function Ke(t,e,o){Xe.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new E)}(Xe=am)&&(Ke.__proto__=Xe),((Ke.prototype=Object.create(Xe&&Xe.prototype)).constructor=Ke).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(qe),o=new cm({vertical:!0,align:t.align,wrap:!1}),i=x({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new um(e[r].trim(),i);o.append(n)}},Ke.prototype.reflow=function(t){var e,o=this.options,i=o.visual;this.container.options.align=o.align,i&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(i=this.visual=i(this.visualContext(e)))&&(e=We(i.clippedBBox()||new A.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Xe.prototype.reflow.call(this,t),o.rotation&&(i=P(o.margin),e=this.box.unpad(i),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=e.clone(),e.pad(i)))},Ke.prototype.createVisual=function(){var t=this.options;this.visual=new A.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ke.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!T(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Xe.prototype.renderVisual.call(this))},Ke.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},Ke.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ke.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},Ke.prototype.rotationTransform=function(){var t,e,o,i=this.options.rotation;return i?(t=(e=this.normalBox.center()).x,e=e.y,o=this.rotatedBox.center(),A.geometry.transform().translate(o.x-t,o.y-e).rotate(i,[t,e])):null};const dm=Ke;function $e(t){Ye.call(this,t),this._textBox=new dm(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function Je(t){for(var e=1;e<t.length;e++){var o=t[e]._textBox,i=t[e-1]._textBox;i.options.margin=Object.assign(P(i.options.margin),{bottom:0}),o.options.margin=Object.assign(P(o.options.margin),{top:0})}}(Ye=L)&&($e.__proto__=Ye),(($e.prototype=Object.create(Ye&&Ye.prototype)).constructor=$e).prototype.reflow=function(t){Ye.prototype.reflow.call(this,t),this.box.snapTo(t,y)},$e.buildTitle=function(t,e){var o,t="string"==typeof t?{text:t}:t;return o=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new $e(t):o},$e.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==w}),t=t.filter(function(t){return t&&t.options.position===w});return Je(e),Je(t),t.reverse(),e.concat(t)},e(o=$e,{color:G,position:k,align:b,margin:P(5),padding:P(5)});const fm=o;function to(t,e,o,i,r){Ze.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new E)}(Ze=dm)&&(to.__proto__=Ze),((to.prototype=Object.create(Ze&&Ze.prototype)).constructor=to).prototype.visualContext=function(t){t=Ze.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},to.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Xt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},to.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=We(t.bbox(e.matrix()))):Ze.prototype.rotate.call(this),this.box},to.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return Ze.prototype.rotationTransform.call(this);var o=A.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||k,n=t===k||t===w?y:v,s=t===k||t===w?v:y,t=t===k||t===C?r.origin:r.bottomRight(),a=i.topLeft().transformCopy(o),p=i.topRight().transformCopy(o),h=i.bottomRight().transformCopy(o),i=i.bottomLeft().transformCopy(o),o=A.geometry.Rect.fromPoints(a,p,h,i),l={};l[s]=r.origin[s]-o.origin[s];var c,o=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(p[s]+l[s]-t[s]),s=M(o,g)===M(t,g)?(c=a,p):t<o?(c=p,h):(c=a,i),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,A.geometry.transform().translate(l.x,l.y).rotate(e)},e(t=to,{_autoReflow:!1});const gm=t;function eo(t,e,o){Qe.call(this,e),this.fields=t,this.chartService=o,this.render()}(Qe=am)&&(eo.__proto__=Qe),((eo.prototype=Object.create(Qe&&Qe.prototype)).constructor=eo).prototype.hide=function(){this.options.visible=!1},eo.prototype.show=function(){this.options.visible=!0},eo.prototype.render=function(){var t,e,o,i,r,n,s,a,p=this,h=this.options;h.visible&&(o=h.label,h=h.icon,i=new E,r=function(){return p},n=h.size,s=this.fields.text,T(o)&&o.visible&&((a=kt(o))?s=a(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color=o.position===$?"#fff":h.background),this.label=new dm(s,x({},o)),this.label.aliasFor=r,o.position!==$||T(n)||(h.type===W?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),h.width=t||n||7,h.height=e||n||7,(a=new pm(x({},h))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new E),this.wrapperBox=i.wrap(a.box))},eo.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(u(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):l===w?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s)&&(r.label.position===it&&n.box.alignTo(s.box,l),n.reflow(n.box)),this.contentBox=i,this.targetBox=t,this.box=o||i)},eo.prototype.createVisual=function(){Qe.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},eo.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;t.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):Qe.prototype.renderVisual.call(this)},eo.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(ut(t=A.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},eo.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},eo.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},eo.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},eo.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Xt(t),text:T(e.label)?e.label.text:"",visual:this.visual})},e(o=eo,{icon:{visible:!0,type:W},label:{position:$,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:k,zIndex:2});const ym=o;function oo(){}var io={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},t={implementation:{configurable:!0}};oo.register=function(t){io=t},t.implementation.get=function(){return io},Object.defineProperties(oo,t);const vm=oo;function ro(t){this._intlService=t}var no=/\{(\d+)(:[^\}]+)?\}/g,o,so,o;(o={intl:{configurable:!0}}).intl.get=function(){return this._intlService||vm.implementation},o.intl.set=function(t){this._intlService=t},ro.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return ft(t)&&t.match(Q)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},ro.prototype.localeAuto=function(t,i,r){var n=this.intl;return ft(t)&&t.match(Q)?t.replace(no,function(t,e,o){e=i[parseInt(e,10)];return n.toString(e,o?o.substring(1):"",r)}):n.toString(i[0],t,r)},Object.defineProperties(ro.prototype,o);const mm=ro;function ao(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new mm(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}(t={intl:{configurable:!0}}).intl.get=function(){return this._intlService||vm.implementation},t.intl.set=function(t){this._intlService=t,this.format.intl=t},ao.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},ao.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(ao.prototype,t);const xm=ao;function po(){}po.register=function(t){D=t},po.create=function(t,e){if(D)return D.create(t,e)};const _m=po;function ho(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new A.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),ut(n),n}function lo(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new A.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(o,r).lineTo(i,r):e.moveTo(r,o).lineTo(r,i),ut(e),e}function i(t,e){void 0===e&&(e=new xm),so.call(this,t),this.chartService=e,this.options.visible||(this.options=x({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==et},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==et},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}(so=L)&&(i.__proto__=so),((i.prototype=Object.create(so&&so.prototype)).constructor=i).prototype.initFields=function(){},i.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},i.prototype.normalizeLabelRotation=function(t){var e=t.rotation;xt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},i.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:b,o=x({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},s=this.createAxisLabel(n,o,s);s&&(this.append(s),this.labels.push(s))}}},i.prototype.clearLabels=function(){this.children=Mt(this.children,function(t){return!(t instanceof gm)}),this.labels=[]},i.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Mt(this.children,function(t){return t!==e.title}),this.title=void 0)},i.prototype.clear=function(){this.clearLabels(),this.clearTitle()},i.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,i=i?e.y2:e.y1,t=t.line.width||0;return o?new E(r,e.y1,r,e.y2-t):new E(e.x1,i,e.x2-t,i)},i.prototype.createTitle=function(){var t=this.options,t=x({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new dm(t.text,t),this.append(t),this.title=t)},i.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=x({},e,o[i]),r=(r.value=this.parseNoteValue(r.value),new ym({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(T(r.options.position)?t.vertical&&!u(r.options.position,[C,S])?r.options.position=t.reverse?C:S:t.vertical||u(r.options.position,[k,w])||(r.options.position=t.reverse?w:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?w:k,this.append(r),this.notes.push(r))}},i.prototype.parseNoteValue=function(t){return t},i.prototype.renderVisual=function(){so.prototype.renderVisual.call(this),this.createPlotBands()},i.prototype.createVisual=function(){so.prototype.createVisual.call(this),this.createBackground(),this.createLine()},i.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new A.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},i.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)T(o)&&n%o==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(ho(h,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},i.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new A.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&ut(e),(o=this._lineGroup=new A.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},i.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},i.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=A.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},i.prototype.createPlotBands=function(){var e=this,t=this.options,o=t.plotBands||[],i=t.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new A.drawing.Group({zIndex:-1}),s=Mt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var p=o[a],h=void 0,l=void 0,c=p.label,u=void 0,l=i?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new E(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(c=new A.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),h=A.drawing.Path.fromRect(c,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(h),u)&&n.append(u)}this.appendVisual(n)}},i.prototype.createPlotBandLabel=function(t,e,o){var i,r;return!1===t.visible?null:(i=t.text,T(t)&&t.visible&&((r=kt(t))?i=r({text:i,item:e}):t.format&&(i=this.chartService.format.auto(t.format,i)),t.color||(t.color=this.options.labels.color)),(r=new dm(i,t)).reflow(o),r.renderVisual(),r.visual)},i.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=M(t[n]);u(s,l)||n%o==0||a&&p===s||(h.position=s,c.append(lo(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},i.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?at:K,i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new E(t.x1,t.y1,t.x1+h+a,t.y2):new E(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},i.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},i.prototype.labelTickIndex=function(t){return t.index},i.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),l=n[p],p=n[p+1],c=void 0,u=void 0,u=i?c=o?l+(p-l)/2-h/2:l-h/2:o?(c=l,p):(c=l-h/2)+h;this.positionLabel(a,r,c,u)}},i.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=S),t.box.move(n,o)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=w):(n+=r,t.options.rotationOrigin=k),new E(o,n,i,n+t.box.height()));t.reflow(s)},i.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},i.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==s?s:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new E);return!0}},i.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?S:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?k:w),e.reflow(this.box))},i.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;T(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},i.prototype.noteSlot=function(t){return this.getSlot(t)},i.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,o=e?v:y;this.box.snapTo(t,o),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[o+1]-=this.lineBox()[o+1]-t[o+1],this.box[o+2]-=this.lineBox()[o+2]-t[o+2]},i.prototype.axisLabelText=function(t,e,o){function i(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=kt(e);return n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i()},i.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},i.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),o[e+1]-=t.start,o[e+2]+=t.end):(i[0].options.visible&&o.wrap(i[0].box),(e=i[i.length-1]).options.visible&&o.wrap(e.box))),o},i.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-f)}return{start:p,end:h}},i.prototype.limitRange=function(t,e,o,i,r){var n,s,a=this.options;return t<o&&r<0&&(!T(a.min)||a.min<=o)||i<e&&0<r&&(!T(a.max)||i<=a.max)?null:e<o&&0<r||i<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<o&&r<0?(n=_(t,o,i),s=_(t+a,o+a,i)):i<e&&0<r&&(s=_(e,o,i),n=_(e-a,o,i-a)),{min:n,max:s})},i.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},i.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},i.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),t=t?v:y,i=this.lineDir(),r=t+(1===i?1:2).toString();return{axis:t,axisOrigin:r,axisDir:i,lineBox:e,lineSize:o,lineStart:e[r]}},i.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<i?t[o]-n[r]:n[r]-t[o])/e},i.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},i.prototype.labelsBetweenTicks=function(){return!this.options.justified},i.prototype.prepareUserOptions=function(){},e(o=i,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:G,visible:!0},title:{visible:!0,position:b},majorTicks:{align:it,size:4,skip:0,step:1},minorTicks:{align:it,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:it,minorTickType:et,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:G,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const bm=o;var co="milliseconds",uo="seconds",fo="minutes",go="hours",yo="days",vo="weeks",mo="months",xo="years",_o=1e3,bo=60*_o,wo=60*bo,Co=24*wo,So=7*Co,ko=31*Co,Ao=365*Co,Po={years:Ao,months:ko,weeks:So,days:Co,hours:wo,minutes:bo,seconds:_o,milliseconds:1},To,t;function Mo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*bo}function Oo(t,e){return new Date(t.getTime()+e)}function Bo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Ro(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Io(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=Bo(t)).getHours(),o===xo?Ro(a=new Date(t.getFullYear()+e,0,1),0):o===mo?Ro(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===vo?Ro(a=Io(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return Oo(t,-o*Co)}(t,r),7*e,yo),i):o===yo?Ro(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===go?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),i=(i.getTimezoneOffset()-s.getTimezoneOffset())*bo,a=Oo(s,i+n*wo)):o===fo?0<(a=Oo(t,e*bo)).getSeconds()&&a.setSeconds(0):o===uo?a=Oo(t,e*_o):o===co&&(a=Oo(t,e)),o!==co)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function Eo(t,e,o){return Io(Bo(t),0,e,o)}function Lo(t,e,o){t=Bo(t);return t&&Eo(t,e,o).getTime()===t.getTime()?t:Io(t,1,e,o)}function zo(t,e){return t&&e?t.getTime()-e.getTime():-1}function jo(t,e){return t.getTime()-e}function Vo(t){if(pt(t)){for(var e=[],o=0;o<t.length;o++)e.push(Vo(t[o]));return e}if(t)return Bo(t).getTime()}function Do(t,e){return t&&e?Vo(t)===Vo(e):t===e}function Ho(t,e,o){return Mo(t,e)/Po[o]}function Uo(t,e,o,i){var t=Bo(t),r=Bo(e);return(o===mo?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Ho(t,new Date(t.getFullYear(),t.getMonth()),yo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===xo?t.getFullYear()-r.getFullYear()+Uo(t,new Date(t.getFullYear(),0),mo,1)/12:o===yo||o===vo?Ho(t,r,o):jo(t,e)/Po[o])/i}function Fo(t,e,o){return o===xo?e.getFullYear()-t.getFullYear():o===mo?12*Fo(t,e,xo)+e.getMonth()-t.getMonth():o===yo?Math.floor(jo(e,t)/Co):Math.floor(jo(e,t)/Po[o])}function No(t,e){return ft(e)&&t.parseDate(e)||Bo(e)}function Go(t,e){if(pt(e)){for(var o=[],i=0;i<e.length;i++)o.push(No(t,e[i]));return o}return No(t,e)}function Wo(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}function r(){To.apply(this,arguments)}(To=bm)&&(r.__proto__=To),((r.prototype=Object.create(To&&To.prototype)).constructor=r).prototype.initFields=function(){this._ticks={}},r.prototype.categoriesHash=function(){return""},r.prototype.clone=function(){var t=new r(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},r.prototype.initUserOptions=function(t){var e=t.categories||[],o=T(t.min),i=T(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,i=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,i)),t},r.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},r.prototype.totalRangeIndices=function(t){var e=this.options,o=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=_(o,0,t.max),e=_(e,0,t.max)),{min:o,max:e}},r.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},r.prototype.roundedRange=function(){return this.range()},r.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},r.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(t-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:t}},r.prototype.arrangeLabels=function(){To.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},r.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?v:y)+1],i=i[t+2],o=r[0],r=Yt(r),(o.box[t+1]>i||o.box[t+2]<e)&&(o.options.visible=!1),r.box[t+1]>i||r.box[t+2]<e)&&(r.options.visible=!1)},r.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},r.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},r.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},r.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,e=e.max,i=Math.ceil(e),r=Math.floor(o),n=[];r<=i;)n.push(r),r+=t;return n},r.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,e=e.reverse,i=this.scaleOptions(),r=i.scale,n=i.box,s=i.min,a=n[(o?v:y)+(e?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+M(r*(p[l]-s),X));return h},r.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),o=i.getHash()+o.min+","+o.max+t.reverse+t.justified;return e._hash!==o&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=o,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]),e},r.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?v:y,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&0<=s;)s--;return t.slice(n,s+1)},r.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,o=this.lineBox(),i=e?o.height():o.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:o,lineSize:i,lineStart:o[r]}},r.prototype.lineDir=function(){return this.options.reverse?-1:1},r.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,i=i.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,p=this.lineInfo(),h=p.axis,p=p.lineStart,l=a.clone(),c=!T(e),t=O(t,0),e=O(e,t),e=Math.max(e-1,t),u=p+(t-n)*s,p=p+(Math.max(t,e)+1-n)*s;return c&&i&&(p=u),o&&(u=_(u,a[h+1],a[h+2]),p=_(p,a[h+1],a[h+2])),l[h+1]=r?p:u,l[h+2]=r?u:p,l},r.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,o=this.lineBox(),i=t.clone();return i[e+1]=_(t[e+1],o[e+1],o[e+2]),i[e+2]=_(t[e+2],o[e+1],o[e+2]),i},r.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=i),To.prototype.slot.call(this,t,e,o)},r.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,p=s[e+1],s=s[e+2],t=t[e];return t<p||s<t?null:(s=(e=(o?r:a)+(t-p)/n)%1,i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e))},r.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},r.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},r.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},r.prototype.categoriesCount=function(){return(this.options.categories||[]).length},r.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=M(t/(o/e),g);return{min:t,max:e+t}},r.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.totalRangeIndices(),i=o.max-o.min,t=this.scaleToDelta(t,i),i=o.min+e*t,o=o.max-(1-e)*t;return{min:i,max:o=o-i<.1?i+.1:o}},r.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,t=this.scaleRange(t,e);return{min:_(t.min,i,o),max:_(t.max,i,o)}},r.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},r.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,i=i.max,n=Math.floor(r),i=e?(r=Math.ceil(r),Math.floor(i)):(r=Math.floor(r),Math.ceil(i));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-n,max:(t.categories.length?i+(e?1:0):0)-n}},r.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=O(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new gm(i,o,t,r,e)},r.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},r.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},r.prototype.arrangeNotes=function(){To.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},r.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?v:y,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},r.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=M(t/o,g),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},r.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,o=o.vertical?v:y,r=this.totalRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[o+(i?2:1)],i=t[o]-n,t=e[o]-n,e=r.min+i/s,o=r.min+t/s,n=Math.min(e,o),i=Math.max(e,o);if(.01<=i-n)return{min:n,max:i}},r.prototype.valueRange=function(){return this.range()},r.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var o=t,i=e.srcCategories;if(o instanceof Date){for(var r=i.length,n=0;n<r;n++)if(Do(i[n],o))return n;return-1}return i.indexOf(o)},r.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},r.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new Jv,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},r.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e(t=r,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:G},labels:{zIndex:1},justified:!1,_deferLabels:!0});const wm=t;var o={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},Xo=[co,uo,fo,go,yo,vo,mo,xo],qo="fit",Yo,t;function Zo(t){var e=t._range;return e||((e=t._range=ae(t)).min=Bo(e.min),e.max=Bo(e.max)),e}function Qo(t){this.options=t}function Ko(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=Io(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&Do(e,s)&&!o.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),o.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=o.max)?(i=!n&&Do(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,i),this.displayEnd=r?this.roundToTotalStep(t,!n):o.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function $o(t,e,o){for(var i,r,n,s=Zo(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===qo,c=e?Xo.indexOf(e):0,u=l?Xo[c++]:t.baseUnit,d=a/Po[u],f=d;!r||h<=d;){for(i=i||p[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===Yt(Xo)){r=Math.ceil(f/h);break}if(!l){h<d&&(r=Math.ceil(f/h));break}u=Xo[c++]||Yt(Xo),f=a/Po[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function n(){Yo.apply(this,arguments)}Qo.prototype.displayIndices=function(){return{min:0,max:1}},Qo.prototype.displayRange=function(){return{}},Qo.prototype.total=function(){return{}},Qo.prototype.valueRange=function(){return{}},Qo.prototype.valueIndex=function(){return-1},Qo.prototype.values=function(){return[]},Qo.prototype.totalIndex=function(){return-1},Qo.prototype.valuesCount=function(){return 0},Qo.prototype.totalCount=function(){return 0},Qo.prototype.dateAt=function(){return null},Ko.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ko.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Uo(this.displayStart,this.valueStart,o,t),o=Uo(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},Ko.prototype.total=function(){return{min:this.start,max:this.end}},Ko.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ko.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ko.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Uo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ko.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Uo(t,this.start,e.baseUnit,e.baseUnitStep))},Ko.prototype.dateIndex=function(t){var e=this.options;return Uo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ko.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ko.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=Io(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ko.prototype.dateAt=function(t,e){var o=this.options;return Io(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Ko.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Uo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),Io(s,e*n,r,i)},(Yo=wm)&&(n.__proto__=Yo),((n.prototype=Object.create(Yo&&Yo.prototype)).constructor=n).prototype.clone=function(){var t=new n(Object.assign({},this.options),this.chartService);return t.createLabels(),t},n.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},n.prototype.initUserOptions=function(t){return t},n.prototype.initFields=function(){Yo.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Go(e,i))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:i,min:No(e,o.min),max:No(e,o.max),weekStartDay:Wo(o,e)}),t.panning&&t.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=Zo(i),t=o.maxDivisions,this.dataRange=new Ko(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==qo&&!u(e,Xo)){for(var o=t,i,r,n=o.categories,s=T(n)?n.length:0,a=J,p=0;p<s;p++){var h,l=n[p];l&&i&&0<(h=Mo(l,i))&&(r=(a=Math.min(a,h))>=Ao?xo:ko-3*Co<=a?mo:So<=a?vo:Co<=a?yo:wo<=a?go:bo<=a?fo:uo),i=l}o.baseUnit=r||yo}return e!==qo&&"auto"!==t.baseUnitStep||$o(t),t}(o)),t?(i=this.dataRange.displayRange(),$o(i=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:i.min,max:i.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Ko(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||yo,this.dataRange=this.divisionRange=new Qo(o)),this.rangeLabels=[]},n.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return Yo.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&r.splice(p,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},n.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=zo(t,e.min)&&zo(t,e.max)<=0&&o.length},n.prototype.parseNoteValue=function(t){return No(this.chartService.intl,t)},n.prototype.noteSlot=function(t){return this.getSlot(t)},n.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=M(t/r,g);return n.min&&n.max&&(r=Oo(e.min||n.min,t),e=Oo(e.max||n.max,t),n={min:Io(r,0,o,i),max:Io(e,0,o,i)}),n},n.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},n.prototype.pan=function(t){var e,o,i,r,n;return this.isEmpty()?null:(e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,o=this.dataRange.total(),i=Oo(r,t=M(t/(i/(n-r)),g)*(e.reverse?-1:1)),r=Oo(n,t),(n=this.limitRange(Vo(i),Vo(r),Vo(o.min),Vo(o.max),t))?(n.min=Bo(n.min),n.max=Bo(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},n.prototype.pointsRange=function(t,e){var o,i;return this.isEmpty()?null:(t=Yo.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=jo(e.max,e.min)/(o.max-o.min),i=this.options,{min:Oo(e.min,t.min*o),max:Oo(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep})},n.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===qo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),p=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(i){var h,l,c=o.autoBaseUnitSteps,e=o.maxDateGroups,i=Yt(c[p])*e*Po[p],u=jo(n,s),d=jo(a,t),f=Xo.indexOf(p);if(d<Po[p]&&p!==co)p=Xo[f-1],t=Oo(s,l=(u-(e-1)*(h=Yt(c[p]))*Po[p])/2),a=Oo(n,-l);else if(i<d&&p!==xo){var g=0;do{for(p=Xo[++f],g=0,l=2*Po[p];h=c[p][g],++g<c[p].length&&l*h<u;);}while(p!==xo&&l*h<u);0<(l=(l*h-u)/2)&&(t=Oo(s,-l),a=Oo(n,l),t=Oo(t,_(a,r.min,r.max)-a),a=Oo(a,_(t,r.min,r.max)-t))}}return t&&a&&0<jo(a,t)?{min:t,max:a,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},n.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<o.min&&(t.min=o.min),t.max>o.max)&&(t.max=o.max),t},n.prototype.range=function(){return this.dataRange.displayRange()},n.prototype.createLabels=function(){Yo.prototype.createLabels.call(this),this.createRangeLabels()},n.prototype.clearLabels=function(){Yo.prototype.clearLabels.call(this),this.rangeLabels=[]},n.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Yo.prototype.arrangeLabels.call(this)},n.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(i=e?t.y1-o.box.height()/2:t.x1,this.positionLabel(o,r,i)),o=n[1])&&(i=e?t.y2-o.box.height()/2:t.x2,this.positionLabel(o,r,i))},n.prototype.autoRotateLabels=function(){Yo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){Yo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},n.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length&&s(o,e[i]);i++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1))}},n.prototype.contentBox=function(){for(var t=Yo.prototype.contentBox.call(this),e=this.rangeLabels,o=0;o<e.length;o++){var i=e[o];i.options.visible&&t.wrap(i.box)}return t},n.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,i=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,o.dataItem=i,this.axisLabelText(r,e,o));if(n)return new gm(r,n,t,i,e)},n.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,o=this.options,r=Object.assign({},o.labels,o.rangeLabels,{align:b,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,o.autoRotateRangeLabels=!0),o=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||o,(o=function(t,e,o){o&&(e=new gm(e,o,t,null,r),i.append(e),i.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),o(1,t,this.axisLabelText(t,r,{index:1,count:2})))},n.prototype.autoRotateRangeLabels=function(){var t,e,i=this,o=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===o.length&&(t=function(t,e,o){e=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,e);0!==o&&(t.options.rotation=o,t.reflow(new E))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},n.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},n.prototype.slot=function(t,e,o){var i=this.dataRange,i=(t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e)),this.getSlot(t,e,o));if(i)return i.toRect()},n.prototype.getSlot=function(t,e,o){return typeof t==ot&&(t=this.categoryIndex(t)),typeof e==ot&&(e=this.categoryIndex(e)),Yo.prototype.getSlot.call(this,t,e,o)},n.prototype.valueRange=function(){var t=Zo(this.options.srcCategories);return{min:Bo(t.min),max:Bo(t.max)}},n.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},n.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},n.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},n.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},n.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},n.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},n.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},n.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},n.prototype.totalRange=function(){return this.dataRange.total()},n.prototype.totalCount=function(){return this.dataRange.totalCount()},n.prototype.isEmpty=function(){return!this.options.srcCategories.length},n.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=Zo((t=this.options).srcCategories),new Ko(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())},e(t=n,{type:Y,labels:{dateFormats:o},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});const Cm=t;function Jo(t,e){return M(Math.floor(t/e)*e,g)}function ti(t,e){return M(Math.ceil(t/e)*e,g)}function ei(t){return Math.max(Math.min(t,3e5),-3e5)}var oi,ii=Math.pow(10,1-g),t,ri,t,ni,o,si,t,ai,o;function pi(t,e,o,i){oi.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function hi(t,e,o){t=M(Math.abs(t%e),g);return 0===t||e*(1-o)<t}(oi=bm)&&(pi.__proto__=oi),((pi.prototype=Object.create(oi&&oi.prototype)).constructor=pi).prototype.initUserOptions=function(t){a=t.seriesMin,o=t.seriesMax,i=(r=t).narrowRange,e=function(t){if(!t&&!o)return 0;if(0<=t&&0<=o){var e=t===o?0:t;if(!1===i||!i&&.2<(o-e)/o)return 0;e=Math.max(0,e-(o-e)/2)}else e=t;return e}(a),a=function(t,e,o){if(!t&&!e)return 1;if(t<=0&&e<=0){var i=t===e?0:e,r=Math.abs((i-t)/i);if(!1===o||!o&&.2<r)return 0;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(a,o,i),n=Me(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&hi(e,n,1/3)&&(e-=n),0<a)&&hi(a,n,1/3)&&(a+=n),s.min=Jo(e,n),s.max=ti(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:T((a=t).min)?Math.min(e.min,a.min):e.min,max:T(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var p=s,h=["min","max"],l=0;l<h.length;l++){var c=h[l];null===p[c]&&(p[c]=void 0)}var u=T(s.min),d=T(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=Jo(n.min,s.majorUnit),n.max=ti(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=Me(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=x(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},pi.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},pi.prototype.clone=function(){return new pi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},pi.prototype.startValue=function(){return 0},pi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},pi.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(M(e/t,X))+1)},pi.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&h.push(M(l,X)),l+=a*r;return h},pi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},pi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},pi.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,r=r.lineStart,p=s*(p/(i.max-i.min)),h=O(t,e||0),e=O(e,t||0),t=(o&&(h=_(h,i.min,i.max),e=_(e,i.min,i.max)),Math.min(h,e)-i.min),o=Math.max(h,e)-i.min,h=new E(a.x1,a.y1,a.x1,a.y1);return h[n+1]=ei(r+p*(0<s?t:o)),h[n+2]=ei(r+p*(0<s?o:t)),h},pi.prototype.getValue=function(t){var e=this.options,o=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:M(e+t*(o-e),g)},pi.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=M(t/(n/(r-e)),g);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},pi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},pi.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=M(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new gm(i,o,t,null,e)},pi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},pi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},pi.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(o,t))return{min:o,max:t}},pi.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=(1-e)*t,e=M(this.options.min+e*t,g),t=M(this.options.max-o,g);return{min:e,max:t=t-e<ii?e+ii:t}},pi.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,t=this.scaleRange(t,e);return{min:_(t.min,o,i),max:_(t.max,o,i),narrowRange:!1}},pi.prototype.isValidRange=function(t,e){return ii<e-t},e(t=pi,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:G},labels:{format:"#.####################"},zIndex:1});const Sm=t;function li(t,e,o,i){var r,n,s,a,p,h,l,t=Bo(t),e=Bo(e),c=i.intl,o=o||{},u=(u=t,r=e,n=o=x(o||{},{min:No(c,o.min),max:No(c,o.max),axisCrossingValue:Go(c,o.axisCrossingValues||o.axisCrossingValue),weekStartDay:Wo(o,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Mo(r,u),a=go,Ao<=s?a=xo:ko<=s?a=mo:So<=s?a=vo:Co<=s&&(a=yo),a):go),a=Po[s],p=n.weekStartDay||0,u=Eo(Vo(u)-1,s,p)||Bo(r),r=Lo(Vo(r)+1,s,p),a=n.majorUnit||ti(Me(u.getTime(),r.getTime()),a)/a,h=ti(h=Fo(u,r,s),a)-h,l=Math.floor(h/2),h-=l,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Io(u,-l,s,p),n.max=n.max||Io(r,h,s,p),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,o=n,ri.call(this,o,i),this.intlService=c,this.seriesMin=t,this.seriesMax=e,o.weekStartDay||0);this.totalMin=Vo(Eo(Vo(t)-1,o.baseUnit,u)),this.totalMax=Vo(Lo(Vo(e)+1,o.baseUnit,u))}(ri=bm)&&(li.__proto__=ri),((li.prototype=Object.create(ri&&ri.prototype)).constructor=li).prototype.clone=function(){return new li(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},li.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},li.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Fo(e.min,e.max,e.baseUnit)/t+1)},li.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/jo(e.max,e.min),p=e.weekStartDay||0,h=[n],l=1;l<s;l++){var c=n+jo(Io(e.min,l*t,e.baseUnit,p),e.min)*a*i;h.push(M(c,X))}return h},li.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},li.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},li.prototype.getSlot=function(t,e,o){return Sm.prototype.getSlot.call(this,No(this.intlService,t),No(this.intlService,e),o)},li.prototype.getValue=function(t){t=Sm.prototype.getValue.call(this,t);return null!==t?Bo(t):null},li.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},li.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min,r=(0<r&&(s=Io(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new gm(s,n,t,null,e)},li.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,o=i?o.height():o.width(),n=this.range(),o=o/jo(n.max,n.min),n=M(t/o,g);return{min:Oo(e.min,n=!i&&!r||i&&r?n:-n),max:Oo(e.max,n),offset:n}},li.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=zo(t,e.min)&&zo(t,e.max)<=0},li.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Vo(t.min),Vo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Bo(t.min),max:Bo(t.max)}},li.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);return{min:Bo(o),max:Bo(t)}},li.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=e*t,e=(1-e)*t,t=Bo(Vo(this.options.min)+o),o=Bo(Vo(this.options.max)-e);return{min:t,max:o=o-t<1e3?Bo(Vo(t)+1e3):o}},li.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:Bo(_(Vo(t.min),this.totalMin,this.totalMax)),max:Bo(_(Vo(t.max),this.totalMin,this.totalMax))}},e(t=li,{type:Y,majorGridLines:{visible:!0,width:1,color:G},labels:{dateFormats:o}});const km=t;function ci(t,e,o,i){var r,n,s,a,p,h=x({majorUnit:10,min:t,max:e},o),l=h.majorUnit,c=(c=M(di(p=e,u=l),g)%1,p<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,di(p,u)+.2):Math.pow(u,Math.ceil(di(p,u)))),u=(p=t,s=(u=h).majorUnit,(a=p)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(di(p,s)))),a),d=(p=u,s=c,a=o,r=(d=h).min,n=d.max,T(d.axisCrossingValue)&&d.axisCrossingValue<=0&&ui(),T(a.max)?a.max<=0&&ui():n=s,T(a.min)?a.min<=0&&ui():r=p,{min:r,max:n});h.max=d.max,h.min=d.min,h.minorUnit=o.minorUnit||M(l-1,g),ni.call(this,h,i),this.totalMin=T(o.min)?Math.min(u,o.min):u,this.totalMax=T(o.max)?Math.max(c,o.max):c,this.logMin=M(di(d.min,l),g),this.logMax=M(di(d.max,l),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function ui(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function di(t,e){return Math.log(t)/Math.log(e)}(ni=bm)&&(ci.__proto__=ni),((ci.prototype=Object.create(ni&&ni.prototype)).constructor=ci).prototype.clone=function(){return new ci(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ci.prototype.startValue=function(){return this.options.min},ci.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,i=i.max,p=this.lineInfo(),h=p.axis,l=p.axisDir,c=p.lineBox,u=p.lineSize,p=p.lineStart,u=l*(u/(n-r)),n=O(t,e||1),e=O(e,t||1);if(n<=0||e<=0)return null;o&&(n=_(n,a,i),e=_(e,a,i));n=di(n,s),e=di(e,s),t=Math.min(n,e)-r,o=Math.max(n,e)-r,a=new E(c.x1,c.y1,c.x1,c.y1);return a[h+1]=ei(p+u*(0<l?t:o)),a[h+2]=ei(p+u*(0<l?o:t)),a},ci.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:M(Math.pow(e,o+s*((i-o)/r)),g)},ci.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ci.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=M(t/(s/(i-o)),g);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},ci.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},ci.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},ci.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(ho(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),i.visible&&this.traverseMinorTicksPositions(p,i),[]},ci.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){u(t,n)||(r.position=t,s.append(lo(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},ci.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(M(i+r*(a-n),g),e)},ci.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,p=o.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(M(a+p*(di(f,s)-h),g),e)}},ci.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new gm(i,o,t,null,e)},ci.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ci.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ci.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},ci.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=di(this.options.min,o),r=di(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),o=Math.pow(o,r-(1-e)*t);return{min:i,max:o=o-i<1e-6?i+1e-6:o}},ci.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,o=this.totalMax;return{min:_(t.min,e,o),max:_(t.max,e,o)}},ci.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,e=e.majorUnit,i=Math.pow(e,t);return{value:i,minorStep:(Math.pow(e,t+1)-i)/o}},ci.prototype.lineInfo=function(){var t=ni.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},e(o=ci,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:G},zIndex:1,_deferLabels:!0});const Am=o,Pm={createGridLines:function(t){var e,o=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,i,o.majorGridLines)),o.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),Ht(r,this.renderMinorGridLines(e,i,o.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){i=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,i)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},o=this.box.center(),n=new A.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new A.drawing.Path(r);i&&(n.radius=i(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,e=this.intervals(e,o,i,r),o=t.options,s=o.visible&&!1!==(o.line||{}).visible;return zt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};function fi(){si.apply(this,arguments)}(si=wm)&&(fi.__proto__=si),((fi.prototype=Object.create(si&&si.prototype)).constructor=fi).prototype.range=function(){return{min:0,max:this.options.categories.length}},fi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},fi.prototype.lineBox=function(){return this.box},fi.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new E,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},fi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=o||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=M(r,X)%360,i&&u(r,i)||h.push(r);return h},fi.prototype.majorIntervals=function(){return this.intervals(1)},fi.prototype.minorIntervals=function(){return this.intervals(.5)},fi.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},fi.prototype.majorAngles=function(){var e=this;return zt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},fi.prototype.createLine=function(){return[]},fi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},fi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,e=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,e)},fi.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==N)return t=Qt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&u(t,r)?e:i}},fi.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new A.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from),a=(r.startAngle+=s*n.angle,Math.ceil(i.to)-i.to),a=(r.angle-=(a+s)*n.angle,sm.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},fi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},fi.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,o=(o.reverse&&!i&&(t=(t+1)%s),n[t=_(Math.floor(t),0,s-1)]),n=(i&&(o-=a/2)<0&&(o+=360),a*(_(Math.ceil(e||t),t,s-1)-t+1));return new rm(r.center(),0,r.height()/2,o,n)},fi.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new A.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},fi.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++)if(this.getSlot(i).containsPoint(t)){o=i;break}return o},e(t=fi,{startAngle:90,labels:{margin:P(10)},majorGridLines:{visible:!0},justified:!0}),x(t.prototype,Pm);const Tm=t;function gi(t,e){ai.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}(ai=bm)&&(gi.__proto__=ai),((gi.prototype=Object.create(ai&&ai.prototype)).constructor=gi).prototype.getDivisions=function(t){return Sm.prototype.getDivisions.call(this,t)-1},gi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},gi.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,o=o.step||1,r=new E,n=this.intervals(t.majorUnit,i,o),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},gi.prototype.lineBox=function(){return this.box},gi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&u(h,i)||s.push(h)}return s},gi.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},gi.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},gi.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},gi.prototype.createLine=function(){return[]},gi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},gi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,e=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,e)},gi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},gi.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=_(t,o.min,o.max),e=_(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(o=t,t=e,e=o),new rm(i.center(),0,i.height()/2,t,e-t)},gi.prototype.slot=function(t,e){var o=this.options,i=360-o.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=o.reverse?(s=n,t):(s=360-t,360-n),s=(s+i)%360;return new A.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},gi.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,t=t.y-o.y,o=Math.round(Ft(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},gi.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e(o=gi,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:P(10)},majorGridLines:{color:G,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(o.prototype,Pm,{createPlotBands:Tm.prototype.createPlotBands,majorAngles:Tm.prototype.majorAngles,range:Sm.prototype.range,labelsCount:Sm.prototype.labelsCount,createAxisLabel:Sm.prototype.createAxisLabel});const Mm=o;function yi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var vi,t={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var t=this.plotArea.polarAxis,i=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new A.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new rm(r,r.y-a.y2,r.y-a.y1,0,360),a=e===N?sm.current.createRing(a,p):A.drawing.Path.fromPoints(this.plotBandPoints(a,i),p).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new A.geometry.Circle(r,t.innerRadius),s=new A.geometry.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),Ht(r,this.renderGridLines(t,o,i,e.minorGridLines))),r},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip,s=(void 0===n&&(n=0),i.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new A.geometry.Circle([t.x,t.y],h);if(i.type===N)a.append(new A.drawing.Circle(l,r));else{for(var c=new A.drawing.Path(r),u=0;u<o.length;u++)c.lineTo(l.pointAt(o[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,o,i=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==N&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(Ft(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return yi(t,o)-yi(e,o)}),r=90-yi(n[0],n[1])/2,t=180-yi(o,n[0])-r,a=s*(Math.sin(Qt(t))/Math.sin(Qt(r)))),this.axisType().prototype.getValue.call(this,new I(i.x1,i.y2-a))}},o,mi,xi,_i,o;function bi(){vi.apply(this,arguments)}(vi=Sm)&&(bi.__proto__=vi),((bi.prototype=Object.create(vi&&vi.prototype)).constructor=bi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},bi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},bi.prototype.axisType=function(){return vi},x((o=bi).prototype,t);const Om=o;function wi(){mi.apply(this,arguments)}(mi=Am)&&(wi.__proto__=mi),((wi.prototype=Object.create(mi&&mi.prototype)).constructor=wi).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},wi.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},wi.prototype.axisType=function(){return mi},x((o=wi).prototype,t);const Bm=o;function Ci(t){return t<=0?-1:1}(xi=A.Class)&&(Si.__proto__=xi),((Si.prototype=Object.create(xi&&xi.prototype)).constructor=Si).prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),!(r<2||2===r&&e[0].equals(e[1]))){var n,s=e[0],a=e[1],p=e[2];for(o.push(new A.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),Yt(o).controlOut(this.firstControlPoint(t,s,a,y,v)),o.push(new A.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{i?(s=e[r-1],a=e[0],p=e[1],l=(t=this.controlPoints(s,a,p))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var h,l,c=l,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],p=e[u+2],h=this.controlPoints(s,a,p),Yt(o).controlOut(c),c=h[1],h=h[0],o.push(new A.geometry.Segment(a,h)));i?(s=e[r-2],a=e[r-1],p=e[0],t=this.controlPoints(s,a,p),Yt(o).controlOut(c),o.push(new A.geometry.Segment(a,t[0])),Yt(o).controlOut(t[1]),o.push(new A.geometry.Segment(p,n))):(l=this.tangent(a,p,y,v),Yt(o).controlOut(c),o.push(new A.geometry.Segment(p,this.secondControlPoint(l,a,p,y,v))))}}return o},Si.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)},Si.prototype.invertAxis=function(t,e,o){var i,r=!1;return t.x===e.x?r=!0:e.x===o.x?(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0):(i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x),t.y<=e.y&&o.y<=i||e.y<=t.y&&o.y>=i||(r=!0)),r},Si.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||M(i,1)===M(o.y,1)},Si.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Si.prototype.controlPoints=function(t,e,o){var i,r=y,n=v,s=!1,a=!1,p=(this.isLine(t,e,o)?i=this.tangent(t,e,y,v):(p={x:this.isMonotonicByField(t,e,o,y),y:this.isMonotonicByField(t,e,o,v)}).x&&p.y?(i=this.tangent(t,o,y,v),s=!0):(this.invertAxis(t,e,o)&&(r=v,n=y),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Ci((o[n]-t[n])*(e[r]-t[r])):-Ci((o[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(i,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(i,e,o,r,n));return s&&(this.restrictControlPoint(t,e,p,i),this.restrictControlPoint(e,o,a,i)),[p,a]},Si.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},Si.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],e=e[i]-t[i];return 0==o?0:e/o},Si.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Si.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],o=.333*(o[i]-n);return this.point(n+o,e[r]+o*t,i,r)},Si.prototype.secondControlPoint=function(t,e,o,i,r){var e=e[i],n=o[i],e=.333*(n-e);return this.point(n-e,o[r]-e*t,i,r)},Si.prototype.point=function(t,e,o,i){var r=new A.geometry.Point;return r[o]=t,r[i]=e,r},Si.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i};const Rm=Si;function Si(t){xi.call(this),this.closed=t}function ki(t){_i.call(this),this._axis=t,this.options=t.options}(_i=A.Class)&&(ki.__proto__=_i),((ki.prototype=Object.create(_i&&_i.prototype)).constructor=ki).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},ki.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},ki.prototype.range=function(){return this._axis.range()},ki.prototype.valueRange=function(){return this._axis.valueRange()};const Im=ki;function Ai(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Im(e[o])}function Pi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Pi.prototype.findAxisByName=function(t){return Ai(t,this._pane.axes)};const Em=Pi,Lm=((H=A.Class)&&(Ti.__proto__=H),(Ti.prototype=Object.create(H&&H.prototype)).constructor=Ti);function Ti(t){H.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Mi(t){for(var e=t.length,o=0,i=0;i<e;i++)m(t[i])&&o++;return o}var Oi={min:function(t){for(var e=t.length,o=J,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.min(o,r))}return o===J?t[0]:o},max:function(t){for(var e=t.length,o=tt,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.max(o,r))}return o===tt?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];m(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Mi(t)?Oi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&T(r)&&o++}return o},avg:function(t){var e=Mi(t),o=t[0];return o=0<e?Oi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&T(i))return i}return t[0]}},Bi,t;const zm=Oi;function Ri(t,e){return null===e?e:Tt(t)(e)}function Ii(){Bi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}(Bi=A.Class)&&(Ii.__proto__=Bi),((Ii.prototype=Object.create(Bi&&Bi.prototype)).constructor=Ii).prototype.register=function(t,e,o){void 0===e&&(e=[st]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Ii.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Ii.prototype.valueFields=function(t){return this._valueFields[t.type]||[st]},Ii.prototype.otherFields=function(t){return this._otherFields[t.type]||[st]},Ii.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=T(o)?o:a[e],a={valueFields:{value:o}},e=this.valueFields(t),p=this._otherFields[t.type];return null===o?i=this._nullValue[t.type]:T(o)?Array.isArray(o)?(r=o.slice(e.length),i=this._bindFromArray(o,e),r=this._bindFromArray(r,p)):"object"==typeof o&&(n=this.sourceFields(t,e),s=this.sourceFields(t,p),i=this._bindFromObject(o,e,n),r=this._bindFromObject(o,p,s)):i=this._undefinedValue[t.type],T(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Ii.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Ii.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},Ii.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=Ri(a,t))}return i},Ii.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===st?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},(t=Ii).current=new t;const jm=t;var Ei,Li=/percent(?:\w*)\((\d+)\)/,zi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");(Ei=A.Class)&&(ji.__proto__=Ei),((ji.prototype=Object.create(Ei&&Ei.prototype)).constructor=ji).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,p=zi.exec(t);p?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),p=p[1]?parseFloat(p[1]):1,n={low:i.value-r*p,high:i.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},ji.prototype.createValueGetter=function(t,e){var o,i=t.data,r=jm.current,n=r.valueFields(t),i=T(i[0])?i[0]:{};return pt(i)?o=Tt("["+(e?n.indexOf(e):0)+"]"):m(i)?o=Tt():typeof i==ot&&(o=Tt(r.sourceFields(t,n)[n.indexOf(e)])),o},ji.prototype.getErrorRange=function(t,e){var o;if(!T(e))return null;if(this.globalRange)return this.globalRange(t);if(pt(e))i=t-e[0],r=t+e[1];else if(m(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Li.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(o[1])/100),i=t-Math.abs(e),r=t+Math.abs(e)}return{low:i,high:r}},ji.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},ji.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,o=o?e.count-1:e.count,r=0,n=0;n<i;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},ji.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(o+=n,i++)}return{value:o/i,count:i}};const Vm=ji;function ji(t,e,o){Ei.call(this),this.initGlobalRanges(t,e,o)}var Vi,Di,o=A.support.browser||{},Hi=600,Ui="fadeIn",Fi=o.msie?.001:0,Ni="errorLow",Gi="errorHigh",Wi="zero",Xi="interpolate",qi="above",Yi="below",Zi="smooth",Qi="step",Ki="area",$i="bar",Ji="boxPlot",tr="bubble",er="bullet",or="candlestick",ir="column",rr="donut",nr="funnel",sr="pyramid",ar="heatmap",pr="horizontalWaterfall",hr="line",lr="ohlc",cr="pie",ur="polarArea",dr="polarLine",fr="polarScatter",gr="radarArea",yr="radarColumn",vr="radarLine",mr="rangeArea",xr="rangeBar",_r="rangeColumn",br="scatter",wr="scatterLine",Cr="verticalArea",Sr="verticalBoxPlot",kr="verticalBullet",Ar="verticalLine",Pr="verticalRangeArea",Tr="waterfall",Mr=[$i,ir,lr,or,Ji,Sr,er,_r,xr,Tr,pr],Or="seriesClick",Br="seriesHover",Rr="seriesOver",Ir="seriesLeave",Er="plotAreaHover",Lr="plotAreaLeave",zr="drag",jr="dragEnd",Vr="dragStart",Dr="zoomStart",Hr="zoom",Ur="zoomEnd",Fr="selectStart",Nr="select",Gr="selectEnd",Wr="showTooltip",Xr="hideTooltip",qr="log",t="category",Yr="insideEnd",Zr="outsideEnd",Qr="wheel",o="drilldown",s;function Kr(t,e,o,i,r,n){Vi.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}(Vi=L)&&(Kr.__proto__=Vi),((Kr.prototype=Object.create(Vi&&Vi.prototype)).constructor=Kr).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,i),s=i?n.x:n.y,a=s-t,s=s+t;i?(e=[new I(n.x,r.y1),new I(n.x,r.y2)],o&&e.push(new I(a,r.y1),new I(s,r.y1),new I(a,r.y2),new I(s,r.y2)),this.box=new E(a,r.y1,s,r.y2)):(e=[new I(r.x1,n.y),new I(r.x2,n.y)],o&&e.push(new I(r.x1,a),new I(r.x1,s),new I(r.x2,a),new I(r.x2,s)),this.box=new E(r.x1,a,r.x2,s)),this.linePoints=e},Kr.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},Kr.prototype.createVisual=function(){var e=this,t=this.options,o=t.visual;o?this.visual=o({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},Kr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Vi.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new A.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);ut(r),this.visual.append(r)}},e(s=Kr,{animation:{type:Ui,delay:Hi},endCaps:!0,line:{width:2},zIndex:1});const Dm=s;function $r(){Di.apply(this,arguments)}(Di=Dm)&&($r.__proto__=Di),(($r.prototype=Object.create(Di&&Di.prototype)).constructor=$r).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const Hm=$r;var Jr=5,tn,s,en,s,on,s;function rn(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,p=!1;if(o.excluded=o.excluded||[],Jr<a)return null;for(r in t)!u(r,o.excluded)&&t.hasOwnProperty(r)&&(yt(n=t[r])?(p=!0,i||(t[r]=O(n(e),s[r]))):xt(n)&&(i||(o.defaults=s[r]),o.depth++,p=rn(n,e,o,i)||p,o.depth--));return p}function nn(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}function sn(t,e){tn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}(tn=L)&&(sn.__proto__=tn),((sn.prototype=Object.create(tn&&tn.prototype)).constructor=sn).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},sn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{vertical:!this.options.invertAxes},t)),i},sn.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,p=o[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||m(p.value)&&(r+=Math.abs(p.value),i.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},sn.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===nt&&h!==l)continue;if(h.group&&h.group!==l.group)continue}h=this.plotValue(p);(0<=h&&r||h<0&&!r)&&(n+=h,i+=h,s=!0,this.options.isStacked100)&&(i=Math.min(i,1))}return s&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,gt(t.value)?t.value:e]},sn.prototype.stackLimits=function(t,e){for(var o=J,i=tt,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],T(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},sn.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,ae(n.negative).min)),n.positive.length)&&(p.max=Math.max(p.max,ae(n.positive).max)),p.min!==J||p.max!==tt?i[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},sn.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields[Ni],e=e.fields[Gi];m(p)&&m(e)?i={low:p,high:e}:a&&T(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Vm(a.value,n,st),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},sn.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},o={categoryIx:e,series:n}),this.updateRange({value:a},o)),new Hm(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},sn.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,t=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:i,high:t}},sn.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o],s=(n||(this.categoryPoints[o]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,T(r.dataItem)||(r.dataItem=i.data[o]),this.addErrorBar(r,t,o)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},sn.prototype.evalPointOptions=function(t,e,o){var i=o.categoryIx,r=o.category,n=o.series,o=o.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory"]},a=this._evalSeries[o],o=(T(a)||(this._evalSeries[o]=a=rn(t,{},s,!0)),t);return a&&rn(o=x({},o),{value:e,category:r,index:i,series:n,dataItem:n.data[i]},s),o},sn.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,o=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((o=this.valueAxisRanges[e]=o||{min:J,max:tt}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},sn.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},sn.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o,i=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=p[l++],n=a[i];n||(a[i]=n=s.categorySlot(h,i,e)),r&&(i=s.plotRange(r,e.startValue()),(o=s.valueSlot(e,i))?(n=s.pointSlot(n,o),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=i[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},sn.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},sn.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Yt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},sn.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},sn.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},sn.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},sn.prototype.reflowPoint=function(t,e){t.reflow(e)},sn.prototype.reflowCategories=function(){},sn.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new E(i.x1,o.y1,i.x2,o.y2)},sn.prototype.categorySlot=function(t,e){return t.getSlot(e)},sn.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=nn(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},sn.prototype._outOfRangeCallback=function(t,e,o,i){var r,e=t[e];e&&(r=e.categoryIx,i(this._bindPoint(t,o,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:o,dataItem:e.item}))},sn.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[o]||(r[o]=jm.current.bindPoint(t,o,i))},sn.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},sn.prototype.pointValue=function(t){return t.valueFields.value},e(s=sn,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const Um=s,Fm={click:function(t,e){return t.trigger(Or,this.eventArgs(e))},hover:function(t,e){return t.trigger(Br,this.eventArgs(e))},over:function(t,e){return t.trigger(Rr,this.eventArgs(e))},out:function(t,e){return t.trigger(Ir,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:Xt(t),originalEvent:t,point:this}}},Nm={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&T(e)&&null!==e&&(this.note=new ym({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};function an(t,e){en.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0}(en=L)&&(an.__proto__=en),((an.prototype=Object.create(en&&en.prototype)).constructor=an).prototype.render=function(){var t,e,o=this.options,i=o.markers,o=o.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(i=kt(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new dm(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},an.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return T(t.color)||(t.color=new A.Color(e).brightness(.8).toHex()),t},an.prototype.createVisual=function(){},an.prototype.createMarker=function(){var t=this.options.markers;return new pm({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,zIndex:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},an.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},an.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical,r=(this.render(),(this.box=t).clone());if(i?o?r.y1-=r.height():r.y2+=r.height():o?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(i=t.center(),t=new E(i.x,i.y,i.x,i.y)),this.note.reflow(t))},an.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e=(e=e===qi?k:e)===Yi?w:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},an.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),i=new pm({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:O(t.border.opacity,1)},opacity:O(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},an.prototype.highlightVisual=function(){return(this.marker||{}).visual},an.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,o=this.box.center(),i=new A.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},an.prototype.tooltipAnchor=function(){var t,e,o=this.markerBox(),i=this.owner.pane.clipBox();if(!i||i.overlaps(o))return i=o.x2+5,e=C,o=this.aboveAxis?(t=o.y1,w):(t=o.y2,k),{point:new I(i,t),align:{horizontal:e,vertical:o}}},an.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},an.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},an.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},an.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},(s=an).prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:W,border:{width:2},opacity:1},labels:{visible:!1,position:qi,margin:P(3),padding:P(4),animation:{type:Ui,delay:Hi}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},x(s.prototype,Fm),x(s.prototype,Nm);const Gm=s;function pn(t,e,o){on.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}(on=L)&&(pn.__proto__=on),((pn.prototype=Object.create(on&&on.prototype)).constructor=pn).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},pn.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},pn.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!T(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},pn.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(yt(o)&&i&&(o=i.color),A.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&i.close(),this.visual=i},pn.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e(s=pn,{closed:!1});const Wm=s;function hn(t,e,o,i,r){var t=t.box,n=new A.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var ln,cn,s={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?y:v,n=i?v:y,s=e?2:1,a=s,p=hn(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=hn(t[l],r,s,n,a);p[r]!==u[r]&&((c=new A.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return o?p!==Yt(h)&&h.push(p):h.push(hn(Yt(t),r,s,n,e?1:2)),h}},p;function un(){ln.apply(this,arguments)}(ln=Wm)&&(un.__proto__=ln),((un.prototype=Object.create(ln&&ln.prototype)).constructor=un).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},x((p=un).prototype,s);const Xm=p;function dn(){cn.apply(this,arguments)}(cn=Wm)&&(dn.__proto__=cn),((dn.prototype=Object.create(cn&&cn.prototype)).constructor=dn).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(yt(o)&&e&&(o=e.color),new Rm(this.options.closed).process(this.points())),o=new A.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});o.segments.push.apply(o.segments,e),this.visual=o};const qm=dn;var fn,p={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==Xi&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(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){t=t.missingValues;return!t&&this.options.isStacked?Wi:t||Xi},getNearestPoint:function(t,e,o){for(var i,r=new I(t,e),n=this.seriesPoints[o],s=J,a=0;a<n.length;a++){var p,h=n[a];h&&T(h.value)&&null!==h.value&&!1!==h.visible&&(p=h.box.center().distanceTo(r))<s&&(i=h,s=p)}return i}},h;function gn(){fn.apply(this,arguments)}(fn=A.drawing.Animation)&&(gn.__proto__=fn),((gn.prototype=Object.create(fn&&fn.prototype)).constructor=gn).prototype.setup=function(){this._setEnd(this.options.box.x1)},gn.prototype.step=function(t){var e=this.options.box;this._setEnd(Rt(e.x1,e.x2,t))},gn.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),o=o[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)},e(h=gn,{duration:Hi}),A.drawing.AnimationFactory.current.register("clip",h);const Ym=h;function yn(t){for(var e=0;e<t.length;e++)if(T(t[e].zIndex))return!0}var vn,mn,h={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=A.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Ym(t,{box:e}),yn(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&T(i.visual.options.zIndex)&&i.visual.clip(t)}}},l,xn,_n,bn,wn,l,Cn,l,Sn,l,kn,l,An,l,Pn,l,Tn,l,Mn,l,On,Bn,Rn,In,l,En,l,Ln,l,zn,l,jn,l,Vn,l,Dn,l,Hn,l,Un,c,Fn,c,Nn,c;function Gn(){vn.apply(this,arguments)}(vn=Um)&&(Gn.__proto__=vn),((Gn.prototype=Object.create(vn&&vn.prototype)).constructor=Gn).prototype.render=function(){vn.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Gn.prototype.pointType=function(){return Gm},Gn.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=this.seriesMissingValues(o),n=t.valueFields.value;if(!T(n)||null===n){if(r!==Wi)return null;n=0}r=this.pointOptions(o,i),r=this.evalPointOptions(r,n,e),i=t.fields.color||o.color,yt(o.color)&&(i=r.color),e=new Gm(n,r);return e.color=i,this.append(e),e},Gn.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},Gn.prototype.createSegment=function(t,e,o){var i=e.style;return new(i===Qi?Xm:i===Zi?qm:Wm)(t,e,o)},Gn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},Gn.prototype.supportsPointInactiveOpacity=function(){return!1},x((l=Gn).prototype,p,h);const Zm=l;function Wn(t,e,o,i,r){mn.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}(mn=Wm)&&(Wn.__proto__=mn),((Wn.prototype=Object.create(mn&&mn.prototype)).constructor=Wn).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;yt(i)&&e&&(i=e.color),this.visual=new A.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:x({color:i,opacity:t.opacity,lineCap:"butt"},o)})},Wn.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Wn.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Wn.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Wn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Wn.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new A.geometry.Segment(t)})},Wn.prototype.createStroke=function(t){t=new A.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Wn.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Wn.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),Ht(o,r)),new A.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Wn.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(i),i=i.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=Yt(e).anchor(),i=o?i.x1:i.y1;o?t.lineTo(i,e.y).lineTo(i,r.y):t.lineTo(e.x,i).lineTo(r.x,i)};const Qm=Wn;function Xn(){xn.apply(this,arguments)}(xn=Qm)&&(Xn.__proto__=xn),((Xn.prototype=Object.create(xn&&xn.prototype)).constructor=Xn).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Xn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},x((l=Xn).prototype,s);const Km=l;function qn(){_n.apply(this,arguments)}(_n=Qm)&&(qn.__proto__=_n),((qn.prototype=Object.create(_n&&_n.prototype)).constructor=qn).prototype.createStrokeSegments=function(){var t=new Rm(this.options.closed),e=this.points();return t.process(e)},qn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new A.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e};const $m=qn;function Yn(){bn.apply(this,arguments)}(bn=Zm)&&(Yn.__proto__=bn),((Yn.prototype=Object.create(bn&&bn.prototype)).constructor=Yn).prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<o&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new(a===Qi?Km:a===Zi?$m:Qm)(t,e,o,r,n)},Yn.prototype.reflow=function(t){bn.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var o=0;o<e.length;o++){var i=e[o],r=this.categoryAxis.getSlot(i.categoryIx);i.reflow(r)}},Yn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?(o!==Qi&&r<p&&!i[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),o!==Qi&&p+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},Yn.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;0<s&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},Yn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Gm(0,e);return e.categoryIx=t,e.series={},e},Yn.prototype.seriesMissingValues=function(t){return t.missingValues||Wi},Yn.prototype.supportsPointInactiveOpacity=function(){return!1};const Jm=Yn;function Zn(){wn.call(this),this.axisRanges={}}(wn=A.Class)&&(Zn.__proto__=wn),((Zn.prototype=Object.create(wn&&wn.prototype)).constructor=Zn).prototype.update=function(t){var e,o=this.axisRanges;for(e in t){var i=t[e],r=o[e];o[e]=r=r||{min:J,max:tt},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},Zn.prototype.reset=function(t){this.axisRanges[t]=void 0},Zn.prototype.query=function(t){return this.axisRanges[t]};const tx=Zn;function Qn(t,e,o){Cn.call(this,e),this.textBox=new dm(t,this.options,o),this.append(this.textBox)}(Cn=L)&&(Qn.__proto__=Cn),((Qn.prototype=Object.create(Cn&&Cn.prototype)).constructor=Qn).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},Qn.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?b:C,n.vAlign=o?k:b,e.position===Yr?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=w)):n.align=i?S:C:e.position===b?(n.vAlign=b,n.align=b):"insideBase"===e.position?o?n.vAlign=i?w:k:n.align=i?C:S:e.position===Zr&&(p=o?i?new E(t.x1,t.y1-s.height(),t.x2,t.y1):new E(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=b,i?new E(t.x2,t.y1,t.x2+s.width(),t.y2):new E(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},Qn.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,o=e+"1",e=e+"2",i=this.children[0],r=this.parent.box;(r[o]<t[o]||t[e]<r[e])&&((i=i.paddingBox.clone())[o]=Math.max(r[o],t[o]),i[e]=Math.min(r[e],t[e]),this.reflow(i))},e(l=Qn,{position:Zr,margin:P(3),padding:P(4),color:G,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:Ui,delay:Hi},zIndex:2});const ex=l;function Kn(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function $n(t,e){Sn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=O(this.options.aboveAxis,!0),this.value=t}(Sn=L)&&($n.__proto__=Sn),(($n.prototype=Object.create(Sn&&Sn.prototype)).constructor=$n).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},$n.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=kt(i))?e(t):this.formatValue(i.format),this.label=new ex(e,x({vertical:o.vertical},i),t),this.append(this.label))},$n.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},$n.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},$n.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(Sn.prototype.createVisual.call(this),i?(i=this.rectVisual=i({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new A.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},$n.prototype.createRect=function(t){var e=this.options,o=e.border,i=(T(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=A.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}})),i=this.box.width(),o=this.box.height();6<(e.vertical?i:o)&&(ut(r),i<1||o<1)&&(r.options.stroke.lineJoin="round"),t.append(r),Kn(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},$n.prototype.createHighlight=function(t){return ut(A.drawing.Path.fromRect(this.box.toRect(),t))},$n.prototype.highlightVisual=function(){return this.rectVisual},$n.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},$n.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=T(e)?e:new A.Color(t).brightness(o).toHex()},$n.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=C,h=k;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),h=w)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(h=w,t=s?(p=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,p=S),Math.max(n.y1,a.y1))),{point:new I(t,i),align:{horizontal:p,vertical:h}}},$n.prototype.overlapsBox=function(t){return this.box.overlaps(t)},$n.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}},x((l=$n).prototype,Fm),x(l.prototype,Nm),l.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};const ox=l;function Jn(t,e){t.forEach(e)}function ts(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}function es(t){kn.call(this,t),this.forEach=t.rtl?ts:Jn}(kn=L)&&(es.__proto__=kn),((es.prototype=Object.create(kn&&kn.prototype)).constructor=es).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+o+r*(n-1),p=(e?i.height():i.width())/a,h=i[s+1]+o/2*p;this.forEach(t,function(t,e){var o=(t.box||i).clone();o[s+1]=h,o[s+2]=h+p,t.reflow(o),e<n-1&&(h+=p*r),h+=p})},e(l=es,{vertical:!1,gap:0,spacing:0});const ix=l;function os(){An.apply(this,arguments)}(An=L)&&(os.__proto__=An),((os.prototype=Object.create(An&&An.prototype)).constructor=os).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,o=this.children,i=o.length,r=this.box=new E,n=0;n<i;n++){var s,a=o[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},e(l=os,{vertical:!0});const rx=l;function is(){Pn.apply(this,arguments)}(Pn=Um)&&(is.__proto__=Pn),((is.prototype=Object.create(Pn&&Pn.prototype)).constructor=is).prototype.render=function(){Pn.prototype.render.call(this),this.updateStackRange()},is.prototype.pointType=function(){return ox},is.prototype.clusterType=function(){return ix},is.prototype.stackType=function(){return rx},is.prototype.stackLimits=function(t,e){return Pn.prototype.stackLimits.call(this,t,e)},is.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.options,s=this.children,a=n.isStacked,p=this.pointValue(t),r=this.pointOptions(i,r),h=r.labels,h=(a&&h.position===Zr&&(h.position=Yr),r.isStacked=a,t.fields.color||i.color),t=(p<0&&r.negativeColor&&(h=r.negativeColor),r=this.evalPointOptions(r,p,e),yt(i.color)&&(h=r.color),new(this.pointType())(p,r)),e=(t.color=h,s[o]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(a?this.getStackWrap(i,e):e).append(t),t},is.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===nt){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}}else o=r[0];return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},is.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(o=o.getSlot(e,e,!0),t[(e=i.invertAxes?y:v)+1]=t[e+2]=o[e+1]),t},is.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},is.prototype.createAnimation=function(){this._setAnimationOptions(),Pn.prototype.createAnimation.call(this),yn(this.options.series)&&this._setChildrenAnimation()},is.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&T(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},is.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),o.origin=new A.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e(l=is,{animation:{type:$i}});const nx=l;function rs(t,e){Tn.call(this,e),this.value=t}(Tn=L)&&(rs.__proto__=Tn),((rs.prototype=Object.create(Tn&&Tn.prototype)).constructor=rs).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=e.getSlot(o.open,o.close),e=e.getSlot(o.low,o.high),o=(i.x1=e.x1=t.x1,i.x2=e.x2=t.x2,this.realBody=i,e.center().x),t=[];t.push([[o,e.y1],[o,i.y1]]),t.push([[o,i.y2],[o,e.y2]]),this.lines=t,this.box=e.clone().wrap(i),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},rs.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},rs.prototype.createVisual=function(){Tn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},rs.prototype.mainVisual=function(t){var e=new A.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},rs.prototype.createBody=function(t,e){var o=A.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:O(e.border.opacity,e.opacity)}),ut(o),t.append(o),Kn(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},rs.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},rs.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:O(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=A.drawing.Path.fromPoints(o[n],r);ut(s),t.append(s)}},rs.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=T(e)?e:new A.Color(this.color).brightness(t._brightness).toHex()},rs.prototype.createOverlay=function(){var t=A.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},rs.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(x({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},rs.prototype.highlightVisual=function(){return this._mainVisual},rs.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},rs.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new I(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},rs.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},rs.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e(l=rs,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),x(l.prototype,Fm),x(l.prototype,Nm);const sx=l;function ns(t){return Mi(t)===t.length}function ss(){Mn.apply(this,arguments)}(Mn=Um)&&(ss.__proto__=Mn),((ss.prototype=Object.create(Mn&&Mn.prototype)).constructor=ss).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ss.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=ns(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new ix({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},ss.prototype.pointType=function(){return sx},ss.prototype.createPoint=function(t,e){var o=e.series,i=this.pointType(),r=t.valueFields,n=x({},o),s=t.fields.color||o.color,n=this.evalPointOptions(n,r,e),e=(o.type===or&&r.open>r.close&&(s=t.fields.downColor||o.downColor||o.color),yt(o.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new i(r,n));return e.color=s,e},ss.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},ss.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:J,max:tt};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},ss.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},ss.prototype.animationPoints=function(){return this.points},x((l=ss).prototype,h);const ax=l;function as(t,e){On.call(this,t,e),this.createNote()}(On=sx)&&(as.__proto__=On),((as.prototype=Object.create(On&&On.prototype)).constructor=as).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,i=this.owner.seriesValueAxis(i),n=(this.boxSlot=o=i.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=i.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),i.getSlot(r.median));r.mean&&(i=i.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,i)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(o),this.reflowNote()},as.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},as.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},as.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},as.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},as.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},as.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],p=x({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),p=(T(p.color)||(T(this.color)?p.color=this.color:p.color=new A.Color(e.background).brightness(.8).toHex()),new pm({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:p,opacity:e.opacity}));p.value=a,n.push(p)}return this.reflowOutliers(n),n},as.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,r=e.getSlot(r);this.options.vertical?r.move(o.x):r.move(void 0,o.y),this.box=this.box.wrap(r),t[i].reflow(r)}},as.prototype.mainVisual=function(t){for(var e=On.prototype.mainVisual.call(this,t),o=this.renderOutliers(t),i=0;i<o.length;i++){var r=o[i].getElement();r&&e.append(r)}return e},as.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)},as.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||On.prototype.getBorderColor.call(this)},e(l=as,{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:q,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:W,background:a,border:{width:2,opacity:1},opacity:0}}),x(l.prototype,Fm);const px=l;function ps(){Bn.apply(this,arguments)}(Bn=px)&&(ps.__proto__=Bn),((ps.prototype=Object.create(Bn&&Bn.prototype)).constructor=ps).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},ps.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},ps.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},ps.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},ps.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const hx=ps;function hs(){Rn.apply(this,arguments)}(Rn=ax)&&(hs.__proto__=Rn),((hs.prototype=Object.create(Rn&&Rn.prototype)).constructor=hs).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=ns(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new ix({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},hs.prototype.pointType=function(){return this.options.invertAxes?hx:px},hs.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},hs.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));T(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:J,max:tt},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},hs.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},hs.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];T(r)&&null!==r&&o.push(r)}return o},hs.prototype.supportsPointInactiveOpacity=function(){return!1};const lx=hs;function ls(){In.apply(this,arguments)}(In=Dm)&&(ls.__proto__=In),((ls.prototype=Object.create(In&&In.prototype)).constructor=ls).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const cx=ls;function cs(t){return T(t)&&null!==t}function us(t,e){En.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(En=L)&&(us.__proto__=En),((us.prototype=Object.create(En&&En.prototype)).constructor=us).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},us.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},us.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,p=t.options.errorBars,h=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];m(r)&&(m(h)&&m(o)&&(i={low:h,high:o}),p&&T(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Vm(p[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),i)&&this.addPointErrorBar(i,t,e)},us.prototype.addPointErrorBar=function(t,e,o){var i=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=o===v,a={},s=(e[o+"Low"]=i,e[o+"High"]=t,e.errorBars=e.errorBars||[],new cx(i,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[o]=i,this.updateRange(a,r),a[o]=t,this.updateRange(a,r)},us.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=cs(i)&&cs(r)?t:this.createMissingValue(t,s))&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,y,e),this.addErrorBar(o,v,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},us.prototype.seriesMissingValues=function(t){return t.missingValues},us.prototype.createMissingValue=function(){},us.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[i],s=this.yAxisRanges[e];cs(r)&&(n=this.xAxisRanges[i]=n||{min:J,max:tt},ft(r)&&(r=No(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),cs(t)&&(s=this.yAxisRanges[e]=s||{min:J,max:tt},ft(t)&&(t=No(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},us.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=rn(t,{},n,!0)),t);return s&&rn(r=x({},t),{value:e,series:i,dataItem:o.dataItem},n),r},us.prototype.pointType=function(){return Gm},us.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},us.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),e=(yt(o.color)&&(r=i.color),new Gm(t,i));return e.color=r,this.append(e),e},us.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{x:i,y:o};throw new Error("Unable to locate Y axis with name "+t)},us.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var o=n[a++],e=r.seriesAxes(e.series),i=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);o&&(i&&e?(t=r.pointSlot(i,e),o.reflow(t)):o.visible=!1)}),this.box=t},us.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},us.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,s=s.fields;t(a,x({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},us.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},us.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e(l=us,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(l.prototype,h,{_bindPoint:Um.prototype._bindPoint});const ux=l;function ds(t,e){Ln.call(this,t,e),this.category=t.category}(Ln=Gm)&&(ds.__proto__=Ln),((ds.prototype=Object.create(Ln&&Ln.prototype)).constructor=ds).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new A.drawing.Group,s=new A.drawing.Circle(new A.geometry.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),i=new A.drawing.Circle(new A.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new A.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,i),n},(l=ds).prototype.defaults=x({},l.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),l.prototype.defaults.highlight.zIndex=void 0;const dx=l;function fs(){zn.apply(this,arguments)}(zn=ux)&&(fs.__proto__=zn),((fs.prototype=Object.create(zn&&zn.prototype)).constructor=fs).prototype._initFields=function(){this._maxSize=tt,zn.prototype._initFields.call(this)},fs.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),zn.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},fs.prototype.reflow=function(t){this.updateBubblesSize(t),zn.prototype.reflow.call(this,t)},fs.prototype.pointType=function(){return dx},fs.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,i=e.pointIx*(Hi/i),r={delay:i,duration:Hi-i,type:tr},n=e.color||o.color,i=(t.size<0&&o.negativeValues.visible&&(n=O(o.negativeValues.color,n)),x({labels:{animation:{delay:i,duration:Hi-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:W,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(yt(o.color)&&(n=i.color),i.markers.background=n,new dx(t,i));return r.color=n,this.append(r),r},fs.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*h,c=Math.sqrt((p+c)/Math.PI),u=O(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},fs.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},fs.prototype.createAnimation=function(){},fs.prototype.createVisual=function(){},e(l=fs,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const fx=l;function gs(){jn.apply(this,arguments)}(jn=pm)&&(gs.__proto__=jn),x((l=(gs.prototype=Object.create(jn&&jn.prototype)).constructor=gs).prototype,Fm);const gx=l;function ys(t,e){Vn.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}(Vn=L)&&(ys.__proto__=Vn),((ys.prototype=Object.create(Vn&&Vn.prototype)).constructor=ys).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,T(this.value.target)&&(this.target=new gx({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:k,align:S}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},ys.prototype.createLabel=function(){var t,e,o=this.options.labels;o.visible&&(t=this.pointData(),e=(e=kt(o))?e(t):this.formatValue(o.format),this.label=new ex(e,o,t),this.append(this.label))},ys.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),i=i.categorySlot(i.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:i,i=r?i:n,s=(o&&(n=new E(s.x1,i.y1,s.x2,i.y2),o.options.height=r?n.height():e.target.line.width,o.options.width=r?e.target.line.width:n.width(),o.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},ys.prototype.createVisual=function(){Vn.prototype.createVisual.call(this);var t=this.options,e=A.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:O(t.border.opacity,t.opacity)}),ut(this.bodyVisual=e),this.visual.append(e)},ys.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=A.drawing.Animation.create(this.bodyVisual,this.options.animation))},ys.prototype.createHighlight=function(t){return A.drawing.Path.fromRect(this.box.toRect(),t)},ys.prototype.highlightVisual=function(){return this.bodyVisual},ys.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ys.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ys.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},ys.prototype.overlapsBox=function(t){return this.box.overlaps(t)},(l=ys).prototype.tooltipAnchor=ox.prototype.tooltipAnchor,e(l,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}}}),x(l.prototype,Fm),x(l.prototype,Nm);const yx=l;function vs(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||pt(n[0])||xt(n[0])||(r.data=[n])}Dn.call(this,t,e)}(Dn=Um)&&(vs.__proto__=Dn),((vs.prototype=Object.create(Dn&&Dn.prototype)).constructor=vs).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},vs.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},vs.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=this.options,n=this.children,s=t.valueFields,a=x({vertical:!r.invertAxes,overlay:i.overlay,categoryIx:o,invertAxes:r.invertAxes},i),t=t.fields.color||i.color,a=this.evalPointOptions(a,s,e),e=(yt(i.color)&&(t=a.color),new yx(s,a)),i=(e.color=t,n[o]);return i||(i=new ix({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),i.append(e),e},vs.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];T(o)&&!isNaN(o)&&T(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:J,max:tt}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},vs.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},vs.prototype.pointValue=function(t){return t.valueFields.current},vs.prototype.aboveAxis=function(t){return 0<t.value.current},vs.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},(l=vs).prototype._setAnimationOptions=nx.prototype._setAnimationOptions,e(l,{animation:{type:$i}});const vx=l;function ms(t,e){Hn.call(this),this.chartService=t,this.options=x({},this.options,e)}function xs(t,e,o){Un.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}(Hn=A.Class)&&(ms.__proto__=Hn),((ms.prototype=Object.create(Hn&&Hn.prototype)).constructor=ms).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=O(o,e),i=O(i,e)),P(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:_t(t.border.width),paddingTop:_t(e.top),paddingBottom:_t(e.bottom),paddingLeft:_t(e.left),paddingRight:_t(e.right)}},ms.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new A.Color(o.backgroundColor);T(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(Wr,t),this.visible=!0},ms.prototype.hide=function(){this.chartService&&this.chartService.notify(Xr),this.visible=!1},ms.prototype.destroy=function(){delete this.chartService},e(l=ms,{border:{width:1},opacity:1}),(Un=l)&&(xs.__proto__=Un),((xs.prototype=Object.create(Un&&Un.prototype)).constructor=xs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},xs.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===Y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},xs.prototype.hide=function(){this.chartService.notify(Xr,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},xs.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,i=i.padding,n=!o.axis.options.vertical,o=o.line.bbox(),n=n?(t=b,r===w?(e=k,o.bottomLeft().translate(0,i)):(e=w,o.topLeft().translate(0,-i))):(e=b,r===C?(t=S,o.topLeft().translate(-i,0)):(t=C,o.topRight().translate(i,0)));return{point:n,align:{horizontal:t,vertical:e}}},e(c=xs,{padding:10});const mx=c;function _s(t,e,o){Fn.call(this,o),this.axis=e,this.stickyMode=e instanceof wm;o=this.options.tooltip;o.visible&&(this.tooltip=new mx(t,this,x({},o,{stickyMode:this.stickyMode})))}(Fn=L)&&(_s.__proto__=Fn),((_s.prototype=Object.create(Fn&&Fn.prototype)).constructor=_s).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},_s.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},_s.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?v:y,n=new A.geometry.Point(i.x1,i.y1),o=o?new A.geometry.Point(i.x2,i.y1):new A.geometry.Point(i.x1,i.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=o[r]=t.center()[r]):n[r]=o[r]=e[r]),this.box=i,this.line.moveTo(n).lineTo(o)},_s.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},_s.prototype.createVisual=function(){Fn.prototype.createVisual.call(this);var t=this.options;this.line=new A.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},_s.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),Fn.prototype.destroy.call(this)},e(c=_s,{color:G,width:2,zIndex:-1,tooltip:{visible:!1}});const xx=c;function bs(t,e){Nn.call(this,t),this.pane=e}(Nn=L)&&(bs.__proto__=Nn),((bs.prototype=Object.create(Nn&&Nn.prototype)).constructor=bs).prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},bs.prototype._clipBox=function(){return this.pane.chartsBox()},bs.prototype.createVisual=function(){var t;this.visual=new A.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),ut(t=A.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},bs.prototype.stackRoot=function(){return this},bs.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s,a=i[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},bs.prototype.destroy=function(){Nn.prototype.destroy.call(this),delete this.parent},(c=bs).prototype.isStackRoot=!0;const _x=c;(ws=am)&&(Ss.__proto__=ws),((Ss.prototype=Object.create(ws&&ws.prototype)).constructor=Ss).prototype.createTitle=function(){var t=this.options.title;xt(t)&&(t=x({},t,{align:t.position,position:k})),this.title=fm.buildTitle(t,Ss.prototype.options.title),this.title&&this.append(this.title)},Ss.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Ss.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Ss.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},Ss.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},Ss.prototype.reflow=function(t){var e;Yt(this.children)===this.content&&(e=this.children.pop()),ws.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Ss.prototype.visualStyle=function(){var t=ws.prototype.visualStyle.call(this);return t.zIndex=-10,t},Ss.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Ss.prototype.stackRoot=function(){return this},Ss.prototype.clipRoot=function(){return this},Ss.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?i:r,h=0;h<o.length;h++)0===p.length&&a!==(t=o[h]).options.vertical&&Ht(p,s.createGridLines(t))},Ss.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},Ss.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new E,i=0;i<e;i++){var r=t[i],n=r.options.vertical?v:y,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),o.x1=h.x1,o.x2=h.x2)}return o},Ss.prototype.clipBox=function(){return this.chartContainer.clipBox},Ss.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Em(this),index:this.paneIndex,name:this.options.name})};var ws,c,Cs=1;function Ss(t){ws.call(this,t),this.id="pane"+Cs++,this.createTitle(),this.content=new L,this.chartContainer=new _x({},this),this.append(this.content),this.axes=[],this.charts=[]}(c=Ss).prototype.isStackRoot=!0,e(c,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const bx=c;function ks(t,e){null!==e&&t.push(e)}function As(t,e,o){var e=e.visible;return T(e)?e:(e=t.pointVisibility)?e[o]:void 0}function Ps(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=jm.current.bindPoint(t,n),a=s.valueFields.value;m(a=ft(a)?parseFloat(a):a)?(s.visible=!1!==As(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function Ts(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Ms(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,i)&&o.push(n)}return o}function Os(t,e,o){var i,r;return null===e?e:((r=e[i="_date_"+t])||(r=No(o,Tt(t)(e)),e[i]=r),r)}function Bs(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ts(t,Y)}function Rs(t){return 1===t.length?t[0]:t}var Is=/area/i,Es,c;function Ls(t,e){var o,i=jm.current.bindPoint(t,null,e).valueFields;for(o in i)if(gt(i[o]))return!0}function zs(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=i;p(l+=r)&&(e=Ls(h,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function js(t,e,o,i,r){var n,s,a,p,h=e.min,e=e.max,l=0<h&&h<o,c=e+1<o;(l||c)&&(((p=t).missingValues||(Is.test(p.type)||p.stack?Wi:Xi))!==Xi?(l&&(n=i(h-1)),c&&(s=i(e+1))):(l&&(n=Ls(t,(a=i(h-1)).item)?a:zs({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Ls(t,(a=i(e+1)).item)?a:zs({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function d(t,e,o){Es.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function Vs(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new E}function Ds(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}(Es=L)&&(d.__proto__=Es),((d.prototype=Object.create(Es&&Es.prototype)).constructor=d).prototype.initFields=function(){},d.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},d.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=x({title:{color:t.color}},e),s=0;s<i;s++){var a=x({},n,o[s]),a=(ft(a.title)&&(a.title=x({text:a.title},n.title)),new bx(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},d.prototype.crosshairOptions=function(t){return t.options.crosshair},d.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);n&&n.visible&&(r=new xx(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},d.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;0<=i;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},d.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},d.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},d.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];break}return e},d.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},d.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},d.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},d.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},d.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&kt(n)||kt(i))&&(p=l({text:cs(p)?p:"",series:u})),l=u._defaults,l=void(yt(h=u.color)&&l&&(h=l.color)),c=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),cs(p))&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d})}Ht(o.items,s)},d.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?o:e).push(s)}return{x:e,y:o,any:e.concat(o)}},d.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},d.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},d.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=P(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},d.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},d.prototype.axisCrossingValues=function(t,e){for(var t=t.options,o=[].concat(t.axisCrossingValues||t.axisCrossingValue),i=e.length-o.length,r=o[0]||0,n=0;n<i;n++)o.push(r);return o},d.prototype.alignAxisTo=function(t,e,o,i){var o=t.getSlot(o,o,!0),r=t.options.reverse?2:1,i=e.getSlot(i,i,!0),n=e.options.reverse?2:1,i=t.box.translate(i[y+n]-o[y+r],i[v+n]-o[v+r]);t.pane!==e.pane&&i.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(i)},d.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,u=Ds(t,u)||o,g=r;u!==o&&(g=this.axisCrossingValues(u,e)),this.alignAxisTo(c,u,n[l],g[l]),c.options._overlap||(M(c.lineBox().x1)===M(u.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),M(c.lineBox().x2)===M(u.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,u,n[l],g[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,S).translate(c.options.margin,0)),f)&&(a[d]=c),0!==l&&i.pane===c.pane&&(c.alignTo(i),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,_=!1!==v.options.visible,m=Ds(e,m)||i,b=n;m!==i&&(b=this.axisCrossingValues(m,t)),this.alignAxisTo(v,m,r[y],b[y]),v.options._overlap||(M(v.lineBox().y1)===M(m.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,m,r[y],b[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,k).translate(0,-v.options.margin)),_)&&(p[x]=v),M(v.lineBox().y2,X)===M(m.lineBox().y2,X)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,w).translate(0,v.options.margin)),_)&&(h[x]=v),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},d.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Vs(e),i=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},d.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Vs(r).height()-i.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},d.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=Vs(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},d.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},d.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Us(o),r=0;r<i.length;r++)i[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},d.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(0<o)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},d.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(i)}},d.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var h=0;h<o;h++){var l=e[h];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},d.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,o=0;o<e;o++)for(var i=t[o],r=0;r<e;r++){var n,s=t[r];i.options.vertical!==s.options.vertical&&(s=i.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},d.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},d.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(A.drawing.Path.fromRect(e[o].toRect()))},d.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},d.prototype.createVisual=function(){Es.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border,o=(void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&T(o)||(o=a,e=0),this._bgVisual=new A.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(o),this.appendVisual(o)},d.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var i=0;i<e.length;i++)if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&T(s.value)&&null!==s.value&&o.push(s)}}return o},d.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},d.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},d.prototype.filterPoints=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},d.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},d.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},d.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},d.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Ds(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},d.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,i=i.visible;if("end"!==r&&"start"!==r||!1===i)return null;var i=this.groupAxes(this.panes),i=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,i),r="end"===r,n=o.range(),r=r?n.max:n.min;if(_(i[e],n.min,n.max)-r==0)return null;i.splice(e+1,0,r),o.options.axisCrossingValues=i;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n};var Hs,Us=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},Fs,c,Ns,c,Gs,Ws,c,Xs,qs,Ys,c,Zs,c,Qs,Ks,$s,s,Js,ta,c;e(c=d,{series:[],plotArea:{margin:{}},background:"",border:{color:G,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const wx=c,Cx={hover:function(t,e){this._dispatchEvent(t,e,Er)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}},Sx=((Hs=A.Class)&&(ea.__proto__=Hs),((ea.prototype=Object.create(Hs&&Hs.prototype)).constructor=ea).prototype.aggregatePoints=function(t,e){var o,i=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||pt(t)||((o=function(){}).prototype=t,s=new o);for(var a=0;a<r.length;a++){var p=r[a],h=this._bindField(n.values,p.canonicalName),h=p.transform(h,i,n.dataItems,e);if(!(null===h||!xt(h)||T(h.length)||h instanceof Date)){s=h;break}if(T(h)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=p.name;var c=s;var u=h;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),T(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},ea.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},ea.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(T(s[e])?s:n.fields)[e];o.push(s)}return o},ea);function ea(t,e,o){Hs.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var p=0;p<i.length;p++){var h=i[p],l=void 0;if(xt(a))l=a[h];else{if(0!==p&&!u(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:yt(l)?l:zm[l]})}}function oa(){Fs.call(this),this._defaults={}}(Fs=A.Class)&&(oa.__proto__=Fs),((oa.prototype=Object.create(Fs&&Fs.prototype)).constructor=oa).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},oa.prototype.query=function(t){return this._defaults[t]},(c=oa).current=new c;const kx=c;function ia(){Ns.apply(this,arguments)}(Ns=ox)&&(ia.__proto__=Ns),((ia.prototype=Object.create(Ns&&Ns.prototype)).constructor=ia).prototype.createLabel=function(){var t=this.options.labels,e=x({},t,t.from),t=x({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},ia.prototype._createLabel=function(t){var e=kt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new ex(e,x({vertical:this.options.vertical},t),o)},ia.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},(c=ia).prototype.defaults=x({},c.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const Ax=c;function ra(){Gs.apply(this,arguments)}(Gs=nx)&&(ra.__proto__=Gs),((ra.prototype=Object.create(Gs&&Gs.prototype)).constructor=ra).prototype.pointType=function(){return Ax},ra.prototype.pointValue=function(t){return t.valueFields},ra.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)},ra.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},ra.prototype.updateRange=function(t,e){var e=e.series.axis,o=t.from,i=t.to,r=this.valueAxisRanges[e];null!==t&&m(o)&&m(i)&&((r=this.valueAxisRanges[e]=r||{min:J,max:tt}).min=Math.min(r.min,o),r.max=Math.max(r.max,o),r.min=Math.min(r.min,i),r.max=Math.max(r.max,i))},ra.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},(c=ra).prototype.plotLimits=Um.prototype.plotLimits;const Px=c;function na(){Ws.apply(this,arguments)}(Ws=Gm)&&(na.__proto__=Ws),((na.prototype=Object.create(Ws&&Ws.prototype)).constructor=na).prototype.aliasFor=function(){return this.parent};const Tx=na;function sa(t,e){Xs.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}(Xs=L)&&(sa.__proto__=Xs),((sa.prototype=Object.create(Xs&&Xs.prototype)).constructor=sa).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,i=this.value,o=this.fromPoint=new Tx(i,x({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new Tx(i,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},sa.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},sa.prototype.createHighlight=function(){var t=new A.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},sa.prototype.highlightVisual=function(){return this.visual},sa.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},sa.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return o=(r=this.box).center(),i=C,r=this.options.vertical?(t=o.x,e=r.y1-5,w):(t=r.x2+5,e=o.y,b),{point:new I(t,e),align:{horizontal:i,vertical:r}}},sa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},sa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},sa.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},sa.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}"}))},sa.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(i=i?e.y1<=t.y1?(o=qi,Yi):(o=Yi,qi):e.x1<=t.x1?(o=C,S):(o=S,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},sa.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},x((c=sa).prototype,Fm),x(c.prototype,Nm),c.prototype.defaults={markers:{visible:!1,background:a,size:8,type:W,border:{width:2},opacity:1},labels:{visible:!1,margin:P(3),padding:P(4),animation:{type:Ui,delay:Hi},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};const Mx=c;function aa(){qs.apply(this,arguments)}(qs=Qm)&&(aa.__proto__=qs),((aa.prototype=Object.create(qs&&qs.prototype)).constructor=aa).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},aa.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},aa.prototype.createStroke=function(t){var e=new A.drawing.Path(t),t=new A.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},aa.prototype.hasStackSegment=function(){return!0},aa.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},aa.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const Ox=aa;function pa(){Ys.apply(this,arguments)}(Ys=Ox)&&(pa.__proto__=Ys),((pa.prototype=Object.create(Ys&&Ys.prototype)).constructor=pa).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},pa.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},pa.prototype.createCurveSegments=function(t){return(new Rm).process(this.toGeometryPoints(t))};const Bx=pa;function ha(){Zs.apply(this,arguments)}(Zs=Ox)&&(ha.__proto__=Zs),((ha.prototype=Object.create(Zs&&Zs.prototype)).constructor=ha).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ha.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},x((c=ha).prototype,s);const Rx=c;function la(){Qs.apply(this,arguments)}(Qs=Um)&&(la.__proto__=Qs),((la.prototype=Object.create(Qs&&Qs.prototype)).constructor=la).prototype.render=function(){Qs.prototype.render.call(this),this.renderSegments()},la.prototype.pointType=function(){return Mx},la.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=t.valueFields;if(!cs(r.from)&&!cs(r.to)){if(this.seriesMissingValues(o)!==Wi)return null;r={from:0,to:0}}i=this.pointOptions(o,i),i=this.evalPointOptions(i,r,e),e=t.fields.color||o.color,yt(o.color)&&(e=i.color),t=new Mx(r,i);return t.color=e,this.append(t),t},la.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?Bx:"step"===i?Rx:Ox)(t,e,o)},la.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},la.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(o&&t)return{from:o,to:t}},la.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new E(i.x1,t.y1,i.x2,t.y2),new E(e.x1,t.y1,e.x2,t.y2)):(o=new E(t.x1,i.y1,t.x2,i.y2),new E(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},la.prototype.addValue=function(t,e){var o=t.valueFields;m(o.from)||(o.from=o.to),m(o.to)||(o.to=o.from),Qs.prototype.addValue.call(this,t,e)},la.prototype.updateRange=function(t,e){var o;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:J,max:tt},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},la.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},la.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},x((s=la).prototype,p,h);const Ix=s;function ca(){Ks.apply(this,arguments)}(Ks=sx)&&(ca.__proto__=Ks),((ca.prototype=Object.create(Ks&&Ks.prototype)).constructor=ca).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=[],r=[],n=[],s=e.getSlot(o.low,o.high),a=e.getSlot(o.open,o.open),e=e.getSlot(o.close,o.close),o=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);i.push([a.x1,a.y1]),i.push([o,a.y1]),r.push([o,e.y1]),r.push([e.x2,e.y1]),n.push([o,s.y1]),n.push([o,s.y2]),this.lines=[i,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},ca.prototype.createBody=function(){};const Ex=ca;function ua(){$s.apply(this,arguments)}($s=ax)&&(ua.__proto__=$s),((ua.prototype=Object.create($s&&$s.prototype)).constructor=ua).prototype.pointType=function(){return Ex};const Lx=ua;function da(t,e,o){Js.call(this),this.from=t,this.to=e,this.series=o}(Js=L)&&(da.__proto__=Js),((da.prototype=Object.create(Js&&Js.prototype)).constructor=da).prototype.linePoints=function(){var t,e=this.from,o=this.from.box,i=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?o.y1:o.y2,r.push([o.x1,t],[i.x2,t])):(t=e.aboveAxis?o.x2:o.x1,r.push([t,o.y1],[t,i.y2])),r},da.prototype.createVisual=function(){Js.prototype.createVisual.call(this);var t=this.series.line||{},t=A.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});ut(t),this.visual.append(t)},e(c=da,{animation:{type:Ui,delay:Hi}});const zx=c;function fa(){ta.apply(this,arguments)}(ta=nx)&&(fa.__proto__=ta),((fa.prototype=Object.create(ta&&ta.prototype)).constructor=fa).prototype.render=function(){ta.prototype.render.call(this),this.createSegments()},fa.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=nn(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=jm.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},fa.prototype.updateRange=function(t,e){ta.prototype.updateRange.call(this,{value:e.to},e)},fa.prototype.aboveAxis=function(t){return 0<=t.value},fa.prototype.plotRange=function(t){return[t.from,t.to]},fa.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new zx(s,h,r),o.push(p),this.append(p)),s=h}}};const jx=fa;var ga,ya,va=[Ki,Cr,mr,Pr],ma=[hr,Ar].concat(va),h,xa,s,_a,ba,wa,Ca,c;function f(){ga.apply(this,arguments)}function Sa(t,e,o){x([].concat(e instanceof wm?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}(ga=wx)&&(f.__proto__=ga),((f.prototype=Object.create(ga&&ga.prototype)).constructor=f).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new tx,0<t.length){this.invertAxes=u(t[0].type,[$i,er,Ar,Cr,Pr,xr,pr,Sr]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},f.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)},f.prototype.removeAxis=function(t){var e=t.options.name;ga.prototype.removeAxis.call(this,t),t instanceof wm?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},f.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},f.prototype.createChartGroup=function(t,e){this.createAreaChart(Ms(t,[Ki,Cr]),e),this.createRangeAreaChart(Ms(t,[mr,Pr]),e),this.createBarChart(Ms(t,[ir,$i]),e),this.createRangeBarChart(Ms(t,[_r,xr]),e),this.createBulletChart(Ms(t,[er,kr]),e),this.createCandlestickChart(Ms(t,or),e),this.createBoxPlotChart(Ms(t,[Ji,Sr]),e),this.createOHLCChart(Ms(t,lr),e),this.createWaterfallChart(Ms(t,[Tr,pr]),e),this.createLineChart(Ms(t,[hr,Ar]),e)},f.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(Ts(n.options.type,Y)||r.categoryField)&&u(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},f.prototype.filterSeries=function(e,o){var i,t,r,n=(e.data||{}).length;return o._seriesMax=Math.max(o._seriesMax||0,n),m(o.options.min)||m(o.options.max)?(i=o.currentRangeIndices(),t=u(e.type,ma),(r=x({},e)).data=(r.data||[]).slice(i.min,i.max+1),t&&js(r,i,n,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return T(e.data[t])}),r):e},f.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},f.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,i=Ts(i.type,Y),n=t.data,s=i?Os:Ri,a=[];i||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];T(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[o]=a},f.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=x({},t),n=new Sx(x({},t),jm.current,kx.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),p=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=n.aggregatePoints(o.items,e)),o},h=a.min;h<=a.max;h++){var l=p(h);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return u(e.type,ma)&&js(e,a,i.totalCount(),p,function(t){return r[t]}),i.options.dataItems=s,e},f.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,nn(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),ga.prototype.appendChart.call(this,t,e)},f.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=Mt([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},f.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},f.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},f.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,o){return Mt(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},f.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new nx(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(t,e))},f.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Px(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},f.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new vx(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Zm(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},f.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Jm(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},f.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new Ix(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Lx(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ax(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new lx(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new jx(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},f.prototype.axisRequiresRounding=function(t,e){for(var o=Ms(this.series,Mr),i=0;i<this.series.length;i++){var r,n=this.series[i];u(n.type,va)&&(r=n.line)&&r.style===Qi&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},f.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},f.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof wm&&t[e].createLabels()},f.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,p=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?J:0},n),T(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),p=new(Bs(n,a[0])?Cm:wm)(n,this.chartService);if(o[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,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},f.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,va))return!1;return!0},f.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<i.length;a++){var p=i[a];if(u(this.findPane(p.pane),t)){var h=p.name,l=Ts(p.type,qr)?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||l,l=(0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max)),new(Ts(p.type,qr)?Am:Sm)(l.min,l.max,x({},n,p),this.chartService));if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=l}l.axisIndex=a,s.push(l),this.appendAxis(l)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},f.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new I(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?ks(s,h.getValue(r)):ks(n,h.getCategory(r))}0===n.length&&ks(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Xt(e),originalEvent:e,category:Rs(n),value:Rs(s)})}},f.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},f.prototype.updateAxisOptions=function(t,e){Sa(this.options,t,e),Sa(this.originalOptions,t,e)},e(h=f,{categoryAxis:{},valueAxis:{}}),x(h.prototype,Cx);const Vx=h;function ka(){ya.call(this),this._points=[]}function Aa(){this._defaultPrevented=!0}(ya=A.Class)&&(ka.__proto__=ya),((ka.prototype=Object.create(ya&&ya.prototype)).constructor=ka).prototype.destroy=function(){this._points=[]},ka.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},ka.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;i&&(i(i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Aa,visual:t.highlightVisual(),show:e}),i._defaultPrevented)||t.toggleHighlight(e,o)},ka.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},ka.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};const Dx=ka;function Pa(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ta(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}function Ma(t,e){xa.call(this),this.plotArea=t,this.options=x({},this.options,e)}(xa=A.Class)&&(Ma.__proto__=xa),((Ma.prototype=Object.create(xa&&xa.prototype)).constructor=Ma).prototype.start=function(t){return this._active=Pa(t,this.options.key),this._active},Ma.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Ta(this.axisRanges=t)}},Ma.prototype.end=function(){var t=this._active;return this._active=!1,t},Ma.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},Ma.prototype.destroy=function(){delete this.plotArea},Ma.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,p=n[s];(e===y&&!p.options.vertical||e===v&&p.options.vertical)&&(a=p.pan(i))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},(s=Ma).prototype.options={key:"none",lock:"none"};const Hx=s;function Oa(t,e){_a.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}(_a=A.Class)&&(Oa.__proto__=_a),((Oa.prototype=Object.create(_a&&_a.prototype)).constructor=Oa).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},Oa.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Oa.prototype.setStyles=function(t){wt(this._marquee,t)},Oa.prototype.start=function(t){if(Pa(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(o),o=e?e.chartsBox().clone():null;if(e&&o)return e=this._elementOffset(),o.translate(e.left,e.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},Oa.prototype._elementOffset=function(){var t=this.chart.element,e=wt(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=Nt(t);return{left:o+t.left,top:e+t.top}},Oa.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Oa.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(t)).left-=e.left,t.top-=e.top,e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Ta(this.axisRanges)},Oa.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},Oa.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Oa.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===y&&!a||o===v&&a||!T(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Oa.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(o.x,i),s=Math.min(o.y,t),a=Math.abs(o.x-i),p=Math.abs(o.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,p=e.height()),i>e.x2&&(a=e.x2-o.x),i<e.x1&&(a=o.x-e.x1),t>e.y2&&(p=e.y2-o.y),t<e.y1&&(p=o.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:p}},(c=Oa).prototype.options={key:"shift",lock:"none"};const Ux=c;function Ba(t,e){ba.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}(ba=A.Class)&&(Ba.__proto__=ba),((Ba.prototype=Object.create(ba&&ba.prototype)).constructor=Ba).prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(o===y&&!a||o===v&&a)&&s.zoomRange&&(a=_(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a})}return Ta(this.axisRanges=i)},Ba.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},Ba.prototype.destroy=function(){delete this.chart};const Fx=Ba;function Ra(t,e){wa.call(this,t),this.chartService=e}(wa=L)&&(Ra.__proto__=wa),((Ra.prototype=Object.create(wa&&wa.prototype)).constructor=Ra).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new A.drawing.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new E),r.renderVisual()}},Ra.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?We(t):new E},Ra.prototype.renderVisual=function(){this.addVisual()},Ra.prototype.createVisual=function(){};const Nx=Ra;function Ia(t){Ca.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}(Ca=am)&&(Ia.__proto__=Ca),((Ia.prototype=Object.create(Ca&&Ca.prototype)).constructor=Ia).prototype.createContainer=function(){this.container=new cm({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},Ia.prototype.createMarker=function(){this.container.append(new pm(this.markerOptions()))},Ia.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return x({},t.markers,{background:e,border:{color:e}})},Ia.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new dm(t.text,e))},Ia.prototype.renderComplete=function(){Ca.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=A.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},Ia.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},Ia.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},Ia.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},Ia.prototype.eventArgs=function(t){var e=this.options;return{element:Xt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},Ia.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;o?(this.visual=o({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):Ca.prototype.renderVisual.call(this)};const Gx=Ia;var Ea,La="horizontal",za="custom",h,ja,s,Va,Da,c,Ha,h,Ua,s,Fa,c,Na,l,Ga,h,Wa,s,Xa,c;function qa(t,e){void 0===e&&(e={}),Ea.call(this,t),this.chartService=e,u(this.options.position,[k,S,w,C,za])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}(Ea=L)&&(qa.__proto__=Ea),((qa.prototype=Object.create(Ea&&Ea.prototype)).constructor=qa).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=b;e===za?i=C:u(e,[k,w])?(i="start"===o?C:"end"===o?S:b,r=e):o&&("start"===o?r=k:"end"===o&&(r=w)),this.container=new am({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new am({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},qa.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new Nx({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];i.append(new Gx(x({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},qa.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===za&&e!==La||(T(e)?e!==La:u(t,[C,S]))},qa.prototype.hasItems=function(){return 0<this.container.children[0].children.length},qa.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===za?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new E(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},qa.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===w?y:v,a=this.isVertical(),p=t.clone(),h=t.clone(),i=(i!==C&&i!==S||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,v,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,y,o.options.align)),o.reflow(h),(h=o.box).clone());(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),i[s+1]=t[s+1],i[s+2]=t[s+2],this.box=i},qa.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new E(i,r,i+t.width(),r+t.height()))},qa.prototype.renderVisual=function(){this.hasItems()&&Ea.prototype.renderVisual.call(this)},qa.prototype.createLegendTitle=function(t){var e=x({},{color:G,position:k,align:b},t),o=e.text;t&&!1!==t.visible&&(T(e)&&e.visible&&((t=kt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new dm(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},qa.prototype.createTitleLayout=function(){this.layout=new cm({vertical:!0,wrap:!1}),this.container.append(this.layout)},qa.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},qa.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e(h=qa,{position:S,items:[],offsetX:0,offsetY:0,margin:P(5),padding:P(5),border:{color:G,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:C,vAlign:b}});const Wx=h;function Ya(){ja.call(this),this._registry=[]}(ja=A.Class)&&(Ya.__proto__=ja),((Ya.prototype=Object.create(ja&&ja.prototype)).constructor=Ya).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},Ya.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(i=Ms(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},(s=Ya).current=new s;const Xx=s;function Za(t){var e=document.createElement("div");return t&&(e.className=t),e}function Qa(t){for(var e=t;e&&!Ot(e,"k-handle");)e=e.parentNode;return e}function Ka(t,e,o,i){Va.call(this);var r=t.element;this.options=x({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Cm,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}(Va=A.Class)&&(Ka.__proto__=Va),((Ka.prototype=Object.create(Va&&Va.prototype)).constructor=Ka).prototype.onPane=function(t){return this.categoryAxis.pane===t},Ka.prototype.createElements=function(){var t=this.options,e=this.wrapper=Za("k-selector k-pointer-events-none"),o=(wt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=Za("k-selection k-pointer-events-none")),i=(this.leftMask=Za("k-mask k-pointer-events-none"),this.rightMask=Za("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),this.body=Za("k-selection-bg k-pointer-events-none")),i=(o.appendChild(i),this.leftHandle=Za("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=Za("k-handle k-right-handle k-pointer-events-auto"),o=(i.appendChild(Za()),r.appendChild(Za()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),wt(o,["borderLeftWidth","borderRightWidth","height"])),n=wt(i,"height").height,s=wt(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},wt(i,{top:(o.height-n)/2}),wt(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},Ka.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),Ut(this.chartElement,((t={})[Qr]=this._mousewheelHandler,t))),this._domEvents=_m.create(this.chartElement,{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)})},Ka.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&x(t,{min:No(o,t.min),max:No(o,t.max),from:No(o,t.from),to:No(o,t.to)}),wt(this.chartElement,["paddingLeft","paddingTop"])),i=o.paddingLeft,o=o.paddingTop;this.options=x({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:o},offset:{left:e.x1+i,top:e.y1+o},from:t.min,to:t.max},t)},Ka.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Kt(this.chartElement,((t={})[Qr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Ka.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Ka.prototype._pointInPane=function(t,e){var o=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return o.containsPoint(t)},Ka.prototype._start=function(t){var e,o,i=this.options,r=Xt(t);!this._state&&r&&(e=Wt(t),this._pointInPane(e.x,e.y))&&(r=Qa(r),o=this.body.getBoundingClientRect(),e=!r&&e.x>=o.x&&e.x<=o.x+o.width&&e.y>=o.y&&e.y<=o.y+o.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(i.from),to:this._index(i.to)}},o=this._rangeEventArgs({from:this._index(i.from),to:this._index(i.to)}),this.trigger(Fr,o))&&(this._state=null)},Ka.prototype._press=function(t){(t=this._state?this._state.moveTarget:Qa(Xt(t)))&&ht(t,"k-handle-active")},Ka.prototype._move=function(t){var e,o,i,r,n,s,a,p,h,l,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,o=e.range,u=e.moveTarget,i=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),t=e.startLocation-t.x.location,p=o.from,h=o.to,l=o.to-o.from,c=wt(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(i?-1:1),u||e.inBody)&&(c=u&&Ot(u,"k-left-handle"),u=u&&Ot(u,"k-right-handle"),e.inBody?(o.from=Math.min(Math.max(s,r-t),a-l),o.to=Math.min(o.from+l,a)):c&&!i||u&&i?(o.from=Math.min(Math.max(s,r-t),a-1),o.to=Math.max(o.from+1,o.to)):(c&&i||u&&!i)&&(o.to=Math.min(Math.max(s+1,n-t),a),o.from=Math.min(o.to-1,o.from)),o.from===p&&o.to===h||(this.move(o.from,o.to),this.trigger(Nr,this._rangeEventArgs(o))))},Ka.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&ct(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(Gr,this._rangeEventArgs(t)),delete this._state)},Ka.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new I(i.x,o.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},p=3===t.event.which,i=Math.round(r+n/2-i);this._state||p||(this.chart._unsetActivePoint(),o.options.justified||i--,a.from=Math.min(Math.max(s,r-i),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(Nr,this._rangeEventArgs(a)),this._end()))},Ka.prototype._mousewheel=function(t){var e,o=this,i=Vt(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(i)&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger(Nr,{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){o._end()},150))},Ka.prototype._gesturestart=function(t){var e=this.options,o=t.touches[0];this._pointInPane(o.pageX,o.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},o=this._rangeEventArgs(this._state.range),this.trigger(Fr,o)?this._state=null:t.preventDefault())},Ka.prototype._gestureend=function(){this._state&&(this.trigger(Gr,this._rangeEventArgs(this._state.range)),delete this._state)},Ka.prototype._gesturechange=function(t){var e,o,i,r,n,s;this._state&&(r=this.chart,i=this._state,e=this.options,o=this.categoryAxis,i=i.range,s=r._toModelCoordinates(t.touches[0].x.location).x,r=r._toModelCoordinates(t.touches[1].x.location).x,n=Math.min(s,r),s=Math.max(s,r),t.preventDefault(),i.from=o.pointCategoryIndex(new I(n))||e.min,i.to=o.pointCategoryIndex(new I(s))||e.max,this.move(i.from,i.to),this.trigger(Nr,this._rangeEventArgs(i)))},Ka.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Ka.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Ka.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Ka.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,p="x"+(i?2:1),i=this._slot(i?e:t),e=M(i[p]-r.left+n.left),t=(wt(this.leftMask,{width:e}),wt(this.selection,{left:e}),i=this._slot(a),M(o.width-(i[p]-r.left+n.left))),a=(wt(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),wt(this.rightMask,{left:a}),wt(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},Ka.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),t=_(this._index(t),i,r),i=_(this._index(e),t+1,r);o.visible&&this.move(t,i),o.from=this._value(t),o.to=this._value(i)},Ka.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=x({},s);if(this._state&&(s=this._state.range),r!==S&&(s.from=_(_(n-t,0,e-1),o,i)),r!==C&&(s.to=_(_(e+t,s.from+1,i),o,i)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Ka.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),o=this._index(o.to),s={from:n,to:o},a=x({},s),p=this.categoryAxis.options.reverse,p=y+(p?"2":"1"),h=this.categoryAxis.lineBox(),p=Math.abs(h[p]-e.x),e=h.width(),h=M(p/e,2),p=M(h*t),e=M((1-h)*t);if((s=this._state?this._state.range:s).from=_(_(n-p,0,o-1),i,r),s.to=_(_(o+e,s.from+1,r),i,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Ka.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e(c=Ka,{visible:!0,mousewheel:{zoom:"both"},min:tt,max:J});const qx=c;function $a(){Da.apply(this,arguments)}(Da=l)&&($a.__proto__=Da),(($a.prototype=Object.create(Da&&Da.prototype)).constructor=$a).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=x({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,Da.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},$a.prototype.hide=function(){delete this._current,Da.prototype.hide.call(this)};const Yx=$a;function Ja(t,e){Ha.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}(Ha=l)&&(Ja.__proto__=Ha),((Ja.prototype=Object.create(Ha&&Ha.prototype)).constructor=Ja).prototype.showAt=function(t,e){var o,i=Mt(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(i=i[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),e=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:e,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},Ja.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Ja.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:o?new I(t.x,e.y):new I(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},e(h=Ja,{categoryFormat:"{0:d}"});const Zx=h;function tp(){Ua.apply(this,arguments)}function ep(){Fa.apply(this,arguments)}function op(){Na.apply(this,arguments)}function ip(){Ga.apply(this,arguments)}(Ua=A.drawing.Animation)&&(tp.__proto__=Ua),((tp.prototype=Object.create(Ua&&Ua.prototype)).constructor=tp).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,o=o.vertical?v:y,(t=this.fromScale=new A.geometry.Point(1,1))[o]=Fi,e.transform(A.geometry.transform().scale(t.x,t.y))):this.abort()},tp.prototype.step=function(t){var e=Rt(this.fromScale.x,1,t),t=Rt(this.fromScale.y,1,t);this.element.transform(A.geometry.transform().scale(e,t,this.origin))},tp.prototype.abort=function(){Ua.prototype.abort.call(this),this.element.transform(null)},e(s=tp,{duration:Hi}),A.drawing.AnimationFactory.current.register($i,s),(Fa=A.drawing.Animation)&&(ep.__proto__=Fa),((ep.prototype=Object.create(Fa&&Fa.prototype)).constructor=ep).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(A.geometry.transform().scale(Fi,Fi,t))},ep.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.center))},e(c=ep,{easing:"easeOutElastic"}),A.drawing.AnimationFactory.current.register(tr,c),(Na=A.drawing.Animation)&&(op.__proto__=Na),((op.prototype=Object.create(Na&&Na.prototype)).constructor=op).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},op.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e(l=op,{duration:200,easing:"linear"}),A.drawing.AnimationFactory.current.register(Ui,l),(Ga=A.drawing.Animation)&&(ip.__proto__=Ga),((ip.prototype=Object.create(Ga&&Ga.prototype)).constructor=ip).prototype.setup=function(){this.element.transform(A.geometry.transform().scale(Fi,Fi,this.options.center))},ip.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.options.center))},e(h=ip,{easing:"easeOutElastic",duration:Hi}),A.drawing.AnimationFactory.current.register(cr,h);const Qx=h;function rp(){Wa.apply(this,arguments)}(Wa=ux)&&(rp.__proto__=Wa),((rp.prototype=Object.create(Wa&&Wa.prototype)).constructor=rp).prototype.render=function(){Wa.prototype.render.call(this),this.renderSegments()},rp.prototype.createSegment=function(t,e,o){return new(e.style===Zi?qm:Wm)(t,e,o)},rp.prototype.animationPoints=function(){return Wa.prototype.animationPoints.call(this).concat(this._segments)},rp.prototype.createMissingValue=function(t,e){if(e===Wi)return cs((e={x:t.x,y:t.y}).x)||(e.x=0),cs(e.y)||(e.y=0),e},x((s=rp).prototype,p);const Kx=s;function np(){Xa.apply(this,arguments)}function sp(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}(Xa=wx)&&(np.__proto__=Xa),((np.prototype=Object.create(Xa&&Xa.prototype)).constructor=np).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new tx,this.yAxisRangeTracker=new tx},np.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(Ms(r,br),i),this.createScatterLineChart(Ms(r,wr),i),this.createBubbleChart(Ms(r,tr),i))}this.createAxes(t)},np.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Xa.prototype.appendChart.call(this,t,e)},np.prototype.removeAxis=function(t){var e=t.options.name;Xa.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},np.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Mt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Mt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},np.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new ux(this,{series:t,clip:e.options.clip}),e)},np.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Kx(this,{series:t,clip:e.options.clip}),e)},np.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new fx(this,{series:t,clip:e.options.clip}),e)},np.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=x({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=Ts(a.type,qr),p=s.query(),h=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||p||h,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===o&&!f){f=jm.current.bindPoint(d,0).valueFields;l.push(f[e?"y":"x"]);break}}0===o&&p&&(s.min=Math.min(s.min,p.min),s.max=Math.max(s.max,p.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}h=new(Ts(a.type,Y)||!a.type&&i?km:t?Am:Sm)(s.min,s.max,a,this.chartService);if(h.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=h}return this.appendAxis(h),h},np.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},np.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new I(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(o,{element:Xt(e),originalEvent:e,x:Rs(a),y:Rs(p)})},np.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);sp(this.options,i,o,e),sp(this.originalOptions,i,o,e)},e(c=np,{xAxis:{},yAxis:{}}),x(c.prototype,Cx);const $x=c;(ap=L)&&(yp.__proto__=ap),((yp.prototype=Object.create(ap&&ap.prototype)).constructor=yp).prototype.render=function(){var t,e,o=this.options.labels,i=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,e=kt(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===b||o.position===Yr?(o.color||(o.color=om(this.options.color)),o.background||(o.background=this.options.color)):(e=i.theme.seriesDefaults.labels,o.color=o.color||e.color,o.background=o.background||e.background),this.label=new dm(r,x({},o,{align:b,vAlign:"",animation:{type:Ui,delay:this.animationDelay}}),t),this.append(this.label)))},yp.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},yp.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):r.position===Yr?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(i=t.x+o,n.orientation=S):(i=t.x-o,n.orientation=C),n.reflow(new E(i,t.y-e,t.x,t.y))))},yp.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;ap.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(t=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new A.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:t,endAngle:t+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new A.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},yp.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},i=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},r=o.color,n={color:r,opacity:o.opacity},i=this.createSegment(e,x({fill:n,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(i),Kn(o)&&t.append(this.createGradientOverlay(i,{baseColor:r,fallbackFill:n},x({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},yp.prototype.createSegment=function(t,e){return e.singleSegment?new A.drawing.Circle(new A.geometry.Circle(new A.geometry.Point(t.center.x,t.center.y),t.radius),e):sm.current.createRing(t,e)},yp.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),ap.prototype.createAnimation.call(this)},yp.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,x({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},yp.prototype.highlightVisual=function(){return this.visual.children[0]},yp.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new A.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},yp.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Qt(e+180),e=M(Math.sin(t),g),t=M(Math.cos(t),g),{horizontal:Math.abs(e)>hp?b:t<0?S:C,vertical:Math.abs(e)<pp?b:e<0?w:k})}},yp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},yp.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}};var ap,l=yp,pp=M(Qt(30),g),hp=M(Qt(60),g),lp,cp,h,up,p,dp,fp,gp,s;function yp(t,e,o){ap.call(this,o),this.value=t,this.sector=e}e(l,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:Z,margin:P(.5),align:W,zIndex:1,position:Zr},animation:{type:cr},highlight:{visible:!0,border:{width:1}},visible:!0}),x(l.prototype,Fm);const Jx=l,t1={createLegendItem:function(t,e,o){var i,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},p=s.labels||{};o&&!1!==o.visibleInLegend&&(a=!(r=!1!==o.visible)&&kt(p)||kt(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=(r?(i={},e):(i={color:p.color,font:p.font},s.markers||{})).color,cs(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i})}};function vp(t,e){lp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function mp(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),i=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return 0!=i&&(o=n/i,r=new I(t.x+o*(e.x-t.x),t.y+o*(e.y-t.y))),r}(lp=L)&&(vp.__proto__=lp),((vp.prototype=Object.create(lp&&lp.prototype)).constructor=vp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},vp.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=Ps(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/h),void 0),f=(T(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===Zr&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==p.length&&Boolean(y.explode),yt(a.color)||(a.color=y.color||o[g%i]),t(v,new rm(null,0,0,f,m),{owner:this,category:T(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:p[g],percentage:0!==l?v/l:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},vp.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;rn(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},vp.prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new Jx(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},vp.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs,r=(void 0===i&&(i=[]),o.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new E(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],e=O(e.padding,p);this.targetBox=t,e=a-5<e?a-5:e,h.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new I(d+h.x1+e,d+h.y1+e),g=0;g<r;g++){var y=o[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,i.length&&(x=i[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===l-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(h),y.label);x&&x.options.position===Zr&&m===l-1&&(x.orientation===S?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},vp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},vp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},vp.prototype.distanceBetweenLabels=function(t){var e=Yt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=M(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var p=t[a+1].box,n=t[a].box,s=M(p.y1-n.y2);r.push(s)}return s=M(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},vp.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;0<r&&(0<=o||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},vp.prototype._takeDistance=function(t,e,o,i){var r;return 0<t[o]&&(i-=r=Math.min(t[o],i),t[o]-=r,t[e]+=r),i},vp.prototype.reflowLabels=function(t,e){var o,i=Yt(this.points),r=i.sector,n=i.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 l=e[h],c=l.box;p+=t[h],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===S),l.orientation===S?(n.align!==W&&(o=r.radius+r.center.x+a),l.reflow(new E(o+c.width(),p,o,p))):(n.align!==W&&(o=r.center.x-r.radius-a),l.reflow(new E(o-c.width(),p,o,p))),p+=c.height()}},vp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;lp.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,p,h,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new A.drawing.Path({stroke:{color:g,width:t.width},animation:{type:Ui,delay:c.animationDelay}}),d.options.position===Zr)&&(r=d.box,n=u.center,l=u.point(f),s=new I(r.x1,r.center().y),h=p=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===S?(h=mp(n,l,s,p=new I(r.x1-t.padding,r.center().y)),s=new I(p.x-4,p.y),(h=h||s).x=Math.min(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===ir||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))):(h=mp(n,l,s,p=new I(r.x2+t.padding,r.center().y)),s=new I(p.x+4,p.y),(h=h||s).x=Math.max(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===ir||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))),g.lineTo(p.x,p.y),this._connectorLines.push(g),this.visual.append(g))}},vp.prototype.renderVisual=function(){var t,e,o,i;lp.prototype.renderVisual.call(this),pe(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),i=this.visual.bbox())&&(o=i.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-i.origin.y),(t.y2-e.y)/(o.y-e.y),(e.x-t.x1)/(e.x-i.origin.x),(t.x2-e.x)/(o.x-e.x)))<1)&&this.visual.transform(A.geometry.transform().scale(i,i,[e.x,e.y]))},vp.prototype.labelComparator=function(t){var o=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*o}},vp.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,e=e.center,s=e.x,e=e.y,o=Math.min(Math.abs(e-o),Math.abs(e-i));return n<o?t:s+Math.sqrt(n*n-o*o)*(r?1:-1)},vp.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},vp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},vp.prototype.animationDelay=function(t){return 70*t},vp.prototype.stackRoot=function(){return this},e(h=vp,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(h.prototype,t1),h.prototype.isStackRoot=!0;const e1=h;function xp(){cp.apply(this,arguments)}(cp=wx)&&(xp.__proto__=cp),((xp.prototype=Object.create(cp&&cp.prototype)).constructor=xp).prototype.render=function(){this.createPieChart(this.series)},xp.prototype.createPieChart=function(t){var e=t[0],t=new e1(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},xp.prototype.appendChart=function(t,e){cp.prototype.appendChart.call(this,t,e),Ht(this.options.legend.items,t.legendItems)};const o1=xp;function _p(){up.apply(this,arguments)}(up=Jx)&&(_p.__proto__=up),((_p.prototype=Object.create(up&&up.prototype)).constructor=_p).prototype.reflowLabel=function(){var t,e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();o&&(t=o.box.height(),e.position===b?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new E(e.x,e.y-t/2,e.x,e.y))):up.prototype.reflowLabel.call(this))},_p.prototype.createSegment=function(t,e){return sm.current.createRing(t,e)},e(p=_p,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:cr}}),x(p.prototype,Fm);const i1=p;function bp(){dp.apply(this,arguments)}(dp=e1)&&(bp.__proto__=dp),((bp.prototype=Object.create(dp&&dp.prototype)).constructor=bp).prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new i1(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},bp.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),i=Math.min(i.width(),i.height()),r=i/2,n=o.series,s=n.length,o=O(o.padding,i-.85*i),a=r-(o=r-5<o?r-5:o),p=0,h=0;h<s;h++){var l=n[h];0===h&&T(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),T(l.size)?a-=l.size:p++,T(l.margin)&&h!==s-1&&(a-=l.margin)}T(e)||(a-=e=(r-o)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+O(f.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}dp.prototype.reflow.call(this,t)},bp.prototype.animationDelay=function(t,e,o){return 50*t+Hi*(e+1)/(o+1)},e(s=bp,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const r1=s;function wp(){fp.apply(this,arguments)}(fp=o1)&&(wp.__proto__=fp),((wp.prototype=Object.create(fp&&fp.prototype)).constructor=wp).prototype.render=function(){this.createDonutChart(this.series)},wp.prototype.createDonutChart=function(t){var e=t[0],t=new r1(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)};const n1=wp;function Cp(){gp.apply(this,arguments)}(gp=wx)&&(Cp.__proto__=gp),((Cp.prototype=Object.create(gp&&gp.prototype)).constructor=Cp).prototype.initFields=function(){this.valueAxisRangeTracker=new tx},Cp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Cp.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),o=this.polarAxis.getSlot(0).center,o=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(o)},Cp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=i.type===qr?(t=Bm,{min:.1,max:1}):(t=Om,{min:0,max:1}),e=e.query(name)||o||r,r=(e&&o&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max)),new t(e.min,e.max,i,this.chartService));this.valueAxis=r,this.appendAxis(r)},Cp.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),t=P(t.padding||{},r),r=i.clone().unpad(t),i=r.clone(),t=(i.y2=i.y1+Math.min(i.width(),i.height()),i.align(r,v,b),i.clone().shrink(0,i.height()/2)),r=(o.reflow(i),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=i,this.alignAxes(i)},Cp.prototype.backgroundBox=function(){return this.box},Cp.prototype.detachLabels=function(){};var Sp,c=Cp,Z,kp,Ap,Pp,Tp,l,Mp,h;function Op(){Sp.apply(this,arguments)}(Sp=ux)&&(Op.__proto__=Sp),((Op.prototype=Object.create(Sp&&Sp.prototype)).constructor=Op).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=I.onCircle(t.center,t.startAngle,e);return new E(t.x,t.y,t.x,t.y)},e(Z=Op,{clip:!1});const s1=Z;function Bp(){kp.apply(this,arguments)}(kp=Kx)&&(Bp.__proto__=kp),(l=(Bp.prototype=Object.create(kp&&kp.prototype)).constructor=Bp).prototype.pointSlot=s1.prototype.pointSlot,e(l,{clip:!1});const a1=l;function Rp(){Ap.apply(this,arguments)}(Ap=$m)&&(Rp.__proto__=Ap),((Rp.prototype=Object.create(Ap&&Ap.prototype)).constructor=Rp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},Rp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},Rp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Rm(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i};const p1=Rp;function Ip(){Pp.apply(this,arguments)}(Pp=Qm)&&(Ip.__proto__=Pp),((Ip.prototype=Object.create(Pp&&Pp.prototype)).constructor=Ip).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new A.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const h1=Ip;function Ep(){Tp.apply(this,arguments)}function Lp(t,e){return t.value.x-e.value.x}(Tp=a1)&&(Ep.__proto__=Tp),((Ep.prototype=Object.create(Tp&&Tp.prototype)).constructor=Ep).prototype.createSegment=function(t,e,o){return new((e.line||{}).style===Zi?p1:h1)(t,e,o)},Ep.prototype.createMissingValue=function(t,e){var o;return cs(t.x)&&e!==Xi&&(o={x:t.x,y:t.y},e===Wi)&&(o.y=0),o},Ep.prototype.seriesMissingValues=function(t){return t.missingValues||Wi},Ep.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Ep.prototype.sortPoints=function(t){if(t.sort(Lp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];!o||cs(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t};const l1=Ep;function zp(){Mp.apply(this,arguments)}(Mp=c)&&(zp.__proto__=Mp),((zp.prototype=Object.create(Mp&&Mp.prototype)).constructor=zp).prototype.createPolarAxis=function(){var t=new Mm(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},zp.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:N},minorGridLines:{type:N}},this.options.yAxis)},zp.prototype.createValueAxis=function(){Mp.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},zp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),wx.prototype.appendChart.call(this,t,e)},zp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Ms(t,[dr]),e),this.createScatterChart(Ms(t,[fr]),e),this.createAreaChart(Ms(t,[ur]),e)},zp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new a1(this,{series:t}),this.appendChart(t,e))},zp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new s1(this,{series:t}),this.appendChart(t,e))},zp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new l1(this,{series:t}),this.appendChart(t,e))},zp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new I(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Xt(e),x:r,y:i})},zp.prototype.createCrosshairs=function(){},e(h=zp,{xAxis:{},yAxis:{}}),x(h.prototype,Cx);var jp,Vp,Dp,Hp,p=h,s,Up,Z,Fp,Np,l,Gp,h,Wp,s;function Xp(){jp.apply(this,arguments)}(jp=Zm)&&(Xp.__proto__=jp),((Xp.prototype=Object.create(jp&&jp.prototype)).constructor=Xp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=I.onCircle(t.center,t.middle(),e);return new E(t.x,t.y,t.x,t.y)},Xp.prototype.renderSegments=function(){if(jp.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),e=0;e<t.length;e++){var o,i,r,n=t[e];n&&1<n.length&&(o=n[0].linePoints[0],r=Yt(n),r=Yt(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i)&&r&&Yt(n).linePoints.push(o)}},Xp.prototype.createSegment=function(t,e,o){var o=new(e.style===Zi?qm:Wm)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==Xi||(o.options.closed=!0),o},e(s=Xp,{clip:!1,limitPoints:!1});const c1=s;function qp(){Vp.apply(this,arguments)}(Vp=$m)&&(qp.__proto__=Vp),((qp.prototype=Object.create(Vp&&Vp.prototype)).constructor=qp).prototype.fillToAxes=function(){};const u1=qp;function Yp(){Dp.apply(this,arguments)}(Dp=Qm)&&(Yp.__proto__=Dp),((Yp.prototype=Object.create(Dp&&Dp.prototype)).constructor=Yp).prototype.fillToAxes=function(){};const d1=Yp;function Zp(){Hp.apply(this,arguments)}(Hp=c1)&&(Zp.__proto__=Hp),((Zp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Zp).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),p===Zi?(s=new u1(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new d1(t,e,o,r,n)),s},Zp.prototype.seriesMissingValues=function(t){return t.missingValues||Wi};const f1=Zp;function Qp(t,e){Up.call(this,t,null,e)}(Up=i1)&&(Qp.__proto__=Up),e(Z=(Qp.prototype=Object.create(Up&&Up.prototype)).constructor=Qp,{overlay:{gradient:"none"},labels:{distance:10}});const g1=Z;function Kp(t){Fp.call(this,t),this.forEach=t.rtl?ts:Jn}(Fp=L)&&(Kp.__proto__=Fp),((Kp.prototype=Object.create(Fp&&Fp.prototype)).constructor=Kp).prototype.reflow=function(o){var t=this.options,e=this.children,i=t.gap,r=t.spacing,t=e.length,n=o.angle/(t+i+r*(t-1)),s=o.startAngle+i/2*n;this.forEach(e,function(t){var e=o.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},e(l=Kp,{gap:1,spacing:0});const y1=l;function $p(){Np.apply(this,arguments)}(Np=L)&&($p.__proto__=Np),(($p.prototype=Object.create(Np&&Np.prototype)).constructor=$p).prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new E;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const v1=$p;function Jp(){Gp.apply(this,arguments)}(Gp=nx)&&(Jp.__proto__=Gp),((Jp.prototype=Object.create(Gp&&Gp.prototype)).constructor=Jp).prototype.pointType=function(){return g1},Jp.prototype.clusterType=function(){return y1},Jp.prototype.stackType=function(){return v1},Jp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Jp.prototype.pointSlot=function(t,e){var o=t.clone(),t=t.center.y;return o.radius=t-e.y1,o.innerRadius=t-e.y2,o},Jp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Jp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Gp.prototype.createAnimation.call(this)},(h=Jp).prototype.reflow=Um.prototype.reflow,e(h,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const m1=h;function th(){Wp.apply(this,arguments)}(Wp=c)&&(th.__proto__=Wp),((th.prototype=Object.create(Wp&&Wp.prototype)).constructor=th).prototype.createPolarAxis=function(){var t=new Tm(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},th.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:N},minorGridLines:{type:N}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},th.prototype.aggregateCategories=function(){Vx.prototype.aggregateCategories.call(this,this.panes)},th.prototype.createCategoryAxesLabels=function(){Vx.prototype.createCategoryAxesLabels.call(this,this.panes)},th.prototype.filterSeries=function(t){return t},th.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Ms(t,[gr]),e),this.createLineChart(Ms(t,[vr]),e),this.createBarChart(Ms(t,[yr]),e)},th.prototype.chartOptions=function(t){var e={series:t},o=t[0];return o&&(t=this.filterVisibleSeries(t),o=o.stack,e.isStacked=o&&1<t.length,e.isStacked100=o&&"100%"===o.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},th.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new f1(this,this.chartOptions(t)),this.appendChart(t,e))},th.prototype.createLineChart=function(t,e){0!==t.length&&(t=new c1(this,this.chartOptions(t)),this.appendChart(t,e))},th.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,o=new m1(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},th.prototype.seriesCategoryAxis=function(){return this.categoryAxis},th.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new I(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Xt(e),category:r,value:i})},th.prototype.createCrosshairs=function(){},x((s=th).prototype,Cx,{appendChart:Vx.prototype.appendChart,aggregateSeries:Vx.prototype.aggregateSeries,seriesSourcePoints:Vx.prototype.seriesSourcePoints}),e(s,{categoryAxis:{categories:[]},valueAxis:{}});var eh,Z=s,l,oh,ih,rh,h;function nh(t,e,o){eh.call(this,e),this.value=t,this.options.index=o.index}(eh=L)&&(nh.__proto__=eh),((nh.prototype=Object.create(eh&&eh.prototype)).constructor=nh).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new E(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new E(t.x1,e[0].y,t.x2,e[2].y))},nh.prototype.createVisual=function(){var t=this,e=this.options;eh.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},nh.prototype.createPath=function(){var t=this.options,e=t.border;return A.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},nh.prototype.createHighlight=function(t){return A.drawing.Path.fromPoints(this.points,t)},nh.prototype.highlightVisual=function(){return this.visual.children[0]},nh.prototype.highlightVisualArgs=function(){var t=A.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},nh.prototype.tooltipAnchor=function(){var t=this.box;return{point:new I(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},nh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e(l=nh,{color:a,border:{width:1}}),x(l.prototype,Fm);const x1=l;function sh(t,e){oh.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}(oh=L)&&(sh.__proto__=oh),((sh.prototype=Object.create(oh&&oh.prototype)).constructor=sh).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},sh.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,o=(void 0===e&&(e=[]),t.series[0]),i=o.data;if(i)for(var t=Ps(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(a=h.fields,yt(o.color)||(o.color=a.color||e[s%e.length]),a=x({index:s,owner:this,series:o,dataItem:i[s],percentage:h.value/r},a,{visible:h.visible}),h=h.valueFields.value,p=this.createSegment(h,a),h=this.createLabel(h,a),p)&&h&&p.append(h)}},sh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;rn(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},sh.prototype.createSegment=function(t,e){var o=x({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible)return t=new x1(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},sh.prototype.createLabel=function(t,e){var o,i=e.series,r=e.dataItem,n=x({},this.options.labels,i.labels),s=t;if(n.visible)return o=kt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:i},o?s=o(r):n.format&&(s=this.plotArea.chartService.format.auto(n.format,s)),n.color||(n.color=om(i.color),n.background)||(n.background=i.color),this.evalSegmentOptions(n,t,e),o=new dm(s,x({vAlign:n.position},n),r),this.labels.push(o),o},sh.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i,r=t[o].options.align;r!==b&&(i=t[o].box.width(),r===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},sh.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=i.dynamicHeight?o*d:o/n,d=_(d?(e-h*(f/d))/2:f?0:e/2,0,e);g.push(new A.geometry.Point(t.x1+l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new A.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+i.segmentSpacing,h=_(e-2*(l=d),0,e)}},sh.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,p=s?0:(e-e/i.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?h*d:h/n,d=i.dynamicHeight?o*d:o/n;u.push(new A.geometry.Point(t.x1+p,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-p-f,t.y1+d+l)),u.push(new A.geometry.Point(t.x1+p+f,t.y1+d+l)),p+=f,l+=d+i.segmentSpacing}},sh.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},e(h=sh,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),x(h.prototype,t1);const _1=h;function ah(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,ih.call(this,t,e)}(ih=_1)&&(ah.__proto__=ih);const b1=(ah.prototype=Object.create(ih&&ih.prototype)).constructor=ah;function ph(){rh.apply(this,arguments)}(rh=wx)&&(ph.__proto__=rh),((ph.prototype=Object.create(rh&&rh.prototype)).constructor=ph).prototype.render=function(){this.createChart(_1,Ms(this.series,[nr])),this.createChart(b1,Ms(this.series,[sr]))},ph.prototype.createChart=function(t,e){var o=e[0];o&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:o.neckRatio,dynamicHeight:o.dynamicHeight,dynamicSlope:o.dynamicSlope,segmentSpacing:o.segmentSpacing,highlight:o.highlight}),this.appendChart(t))},ph.prototype.appendChart=function(t,e){rh.prototype.appendChart.call(this,t,e),Ht(this.options.legend.items,t.legendItems)};var hh,c=ph,s,lh,l,ch,h;function uh(t,e){hh.call(this),this.options=e,this.color=e.color||a,this.value=t}(hh=L)&&(uh.__proto__=hh),((uh.prototype=Object.create(hh&&hh.prototype)).constructor=uh).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},uh.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=kt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||om(this.color),this.label=new dm(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},uh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},uh.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},uh.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r=O(e.type,"rect")===rt,o=O(o.width,r?1:0),r=Math.round(o/2);return e.size&&(t=i.center(),i.size.width=i.size.height=e.size,i.origin.x=Math.round(t.x-i.size.width/2),i.origin.y=Math.round(t.y-i.size.height/2)),i.size.width-=o,i.size.height-=o,i.origin.y+=r+.5,i.origin.x+=r+.5,We(i)},uh.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=O(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},uh.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new pm({type:O(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=e,this.append(e)},uh.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new pm({type:O(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:O(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},uh.prototype.highlightVisual=function(){return this.rectVisual},uh.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},uh.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new I(t,e),align:{horizontal:b,vertical:w}}},uh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},uh.prototype.unclipElements=function(){},uh.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},x((s=uh).prototype,Fm),x(s.prototype,Nm),s.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};const w1=s;function dh(t,e){lh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(lh=L)&&(dh.__proto__=lh),((dh.prototype=Object.create(lh&&lh.prototype)).constructor=dh).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:J,max:tt},this._evalSeries=[]},dh.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},dh.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;T(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},dh.prototype.addValue=function(t,e){var o;t&&T(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},dh.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=rn(t,{},n,!0)),t);return s&&rn(r=x({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},dh.prototype.pointType=function(){return w1},dh.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},dh.prototype.createPoint=function(t,e){var o,i,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(yt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=(0,A.parseColor)(e),r=1-o,a=function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}(t.value/this.valueRange.max)),new w1(t,s));return n.color=a,this.append(n),n},dh.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{xAxis:i,yAxis:o};throw new Error("Unable to locate Y axis with name "+t)},dh.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var o=s[p++],e=n.seriesAxes(e.series),i=e.xAxis,e=e.yAxis,r=i.categoryIndex(t.x),t=e.categoryIndex(t.y),i=i.getSlot(r,r,a),r=e.getSlot(t,t,a);o&&(i&&r?(e=n.pointSlot(i,r),o.reflow(e)):o.visible=!1)}),this.box=t},dh.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},dh.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var l=this._bindPoint(i,o,h),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=p.min<=d&&d<=p.max;u&&d&&t(c,x({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},l))}},dh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},dh.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e(l=dh,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),x(l.prototype,{_bindPoint:Um.prototype._bindPoint});const C1=l;function fh(){ch.apply(this,arguments)}function gh(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}(ch=wx)&&(fh.__proto__=ch),((fh.prototype=Object.create(ch&&ch.prototype)).constructor=fh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},fh.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},fh.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=Pe(n.categories||[]),a=Pe(r.categories||[]),p=0;p<i.length;p++){var h=jm.current.bindPoint(o,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},fh.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(Ms(r,[ar]),i)}},fh.prototype.createHeatmapChart=function(t,e){t=new C1(this,{series:t});this.appendChart(t,e)},fh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Mt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Mt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},fh.prototype.seriesAxes=function(t){var e=this.options,o=[].concat(e.xAxis),i=t.xAxis,o=i?o.find(function(t){return t.name===i}):o[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!o)throw new Error("Unable to locate X axis with name "+i);if(t)return{xAxis:o,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},fh.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},fh.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){c=jm.current.bindPoint(l,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(Ts(s.type,Y)||!s.type&&i?Cm:wm)(s,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.mapCategories(),t},fh.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},fh.prototype.removeAxis=function(t){var e=t.options.name;ch.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},fh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new I(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];ks(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(o,{element:Xt(e),originalEvent:e,x:Rs(a),y:Rs(p)})},fh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);gh(this.options,i,o,e),gh(this.originalOptions,i,o,e)},fh.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e(h=fh,{xAxis:{},yAxis:{}}),x(h.prototype,Cx);var yh,s=h,l="color",h="first",vh="max",mh="noteText",xh=(Xx.current.register(Vx,[$i,ir,hr,Ar,Ki,Cr,or,lr,er,kr,Ji,Sr,_r,xr,Tr,pr,mr,Pr]),Xx.current.register($x,[br,wr,tr]),Xx.current.register(o1,[cr]),Xx.current.register(n1,[rr]),Xx.current.register(c,[nr,sr]),Xx.current.register(p,[ur,dr,fr]),Xx.current.register(Z,[gr,yr,vr]),Xx.current.register(s,[ar]),jm.current.register([$i,ir,hr,Ar,Ki,Cr],[st],[t,l,mh,Ni,Gi,o]),jm.current.register([_r,xr,mr,Pr],["from","to"],[t,l,mh,o]),jm.current.register([Tr,pr],[st],[t,l,mh,"summary",o]),jm.current.register([ur,dr,fr],[y,v],[l,o]),jm.current.register([gr,yr,vr],[st],[l,o]),jm.current.register([nr,sr],[st],[t,l,"visibleInLegend","visible",o]),kx.current.register([$i,ir,hr,Ar,Ki,Cr,Tr,pr],{value:vh,color:h,noteText:h,errorLow:"min",errorHigh:vh}),kx.current.register([_r,xr,mr,Pr],{from:"min",to:vh,color:h,noteText:h}),kx.current.register([gr,yr,vr],{value:vh,color:h}),jm.current.register([br,wr,tr],[y,v],[l,mh,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),jm.current.register([tr],[y,v,"size"],[l,t,mh]),jm.current.register([ar],[y,v,st],[l,mh]),jm.current.register([or,lr],["open","high","low","close"],[t,l,"downColor",mh]),kx.current.register([or,lr],{open:vh,high:vh,low:"min",close:vh,color:h,downColor:h,noteText:h}),jm.current.register([Ji,Sr],["lower","q1","median","q3","upper","mean","outliers"],[t,l,mh,o]),kx.current.register([Ji,Sr],{lower:vh,q1:vh,median:vh,q3:vh,upper:vh,mean:vh,outliers:h,color:h,noteText:h}),jm.current.register([er,kr],["current","target"],[t,l,"visibleInLegend",mh,o]),kx.current.register([er,kr],{current:vh,target:vh,color:h,noteText:h}),jm.current.register([cr,rr],[st],[t,l,"explode","visibleInLegend","visible",o]),[t,st,y,v]),_h="mousemove",bh="contextmenu",wh="mouseleave",c;function B(t,e,o,i){var r=this,i=(void 0===i&&(i={}),yh.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new xm(this,i),this.chartService.theme=o,this._initElement(t),x({},this.options,e));this._originalOptions=x({},i),this._theme=o,this._initTheme(i,o),this._initHandlers(),this._initSurface(),this.bindCategories(),em.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function Ch(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function Sh(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 kh(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}(yh=A.Class)&&(B.__proto__=yh),((B.prototype=Object.create(yh&&yh.prototype)).constructor=B).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},B.prototype._setElementClass=function(t){ht(t,"k-chart")},B.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o;for(var n=t,s=xh,a=0;a<s.length;a++){var p=s[a]+"Axes";n[p]&&(n[s[a]+"Axis"]=n[p],delete n[p])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=x({},e,t),this.applySeriesColors()},B.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)}},B.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=0<e.width||0<e.height;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&pe(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},B.prototype._resize=function(){this._noTransitionsRedraw()},B.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},B.prototype.getAxis=function(t){return Ai(t,this._plotArea.axes)},B.prototype.findAxisByName=function(t){return this.getAxis(t)},B.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Em(e[o])},B.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Em(e[t])},B.prototype.plotArea=function(){return new Lm(this._plotArea)},B.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=yt(e)?r.filterPoints(e):(xt(e)?(o=e.series,i=e.category):o=i=e,n.type===rr?Ch(r.pointsBySeriesName(o),i):u(n.type,[cr,nr,sr])?Ch((r.charts[0]||{}).points,i):r.pointsBySeriesName(o));e&&this.togglePointsHighlight(t,e)},B.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},B.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;yt(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&T(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(n=this._plotArea.pointsByCategoryIndex(o),r.showAt(n)):e&&r.show(e)},B.prototype.hideTooltip=function(){this._tooltip.hide()},B.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Gt(e,{width:o.width}),o.height&&Gt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=A.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},B.prototype._surfaceWrap=function(){return this.element},B.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 Dx,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Mh(this._plotArea.panes),this._navState||this._cancelDomEvents()},B.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(o=this.options,t=x({},t.options,{chartArea:{width:t.width,height:t.height}}),Th(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),Mh(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},B.prototype._sharedTooltip=function(){return this._plotArea instanceof Vx&&this.options.tooltip&&this.options.tooltip.shared},B.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Hx(this._plotArea,t.pannable))},B.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Ux(this,e))},B.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Fx(this,e))},B.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==o||this.requiresHandlers([Vr,zr,jr])),o=(!1===e||!1===i)&&!this.requiresHandlers([Dr,Hr,Ur]),e=this.element;this._dragZoomEnabled&&t&&o?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&o||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!o)},B.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom)&&o.toggleZoom(e)},B.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Yx(this.chartService,t)},B.prototype._createSharedTooltip=function(t){return new Zx(this._plotArea,t)},B.prototype.applyDefaults=function(t,e){var o,i,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||i.color,e=x({},s,s[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[o],e}for(var p=0;p<xh.length;p++)i=n.axisDefaults||{},r=(r=[].concat(n[o=xh[p]+"Axis"])).map(a),n[o]=1<r.length?r:r[0];var h=t,t=e,l=h.series,c=l.length,u=h.seriesDefaults,d=x({},h.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);Sh(d),Sh(g);for(var y=0;y<c;y++){var v=l[y].type||h.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:h.tooltip},d,u[v]);l[y]._defaults=v,l[y]=x({},v,l[y]),l[y].data=l[y].data||[]}},B.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},B.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new lm(this._modelOptions()),i=(o.chart=this,o._plotArea=e,fm.buildTitle(t.title)),r=fm.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return o.append.apply(o,fm.orderTitles([i,r])),t.legend&&t.legend.visible&&o.append(new Wx(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},B.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return x({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},B.prototype._createPlotArea=function(t){var e=this.options;return Xx.current.create(t?[]:e.series,e,this.chartService)},B.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof wm&&n.select&&!n.vertical&&(i=r.range(),r=new qx(this,r,x({min:i.min,max:i.max},n.select)),e.push(r))}},B.prototype._selectStart=function(t){return this.trigger(Fr,t)},B.prototype._select=function(t){return this.trigger(Nr,t)},B.prototype._selectEnd=function(t){return this.trigger(Gr,t)},B.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=(0,A.throttle)(this._mousemove.bind(this),20)},B.prototype.addObserver=function(t){t&&this.observers.push(t)},B.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},B.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},B.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===Wr?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Rr?this._updateDrilldownPoint(e.point):t===Ir?this._resetDrilldownPoint():t===Or&&this._startDrilldown(e.point);for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},B.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,Ut(e,((t={})[bh]=this._clickHandler,t[Qr]=this._mousewheelHandler,t[wh]=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Ut(e,((t={})[_h]=this._mousemove,t)),this.domEvents=_m.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()},B.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(Lr)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},B.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},B.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},B.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(Ur,{}))},B.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e))&&(e=Math.round(10*e),this._gestureDistance=t.distance,o={delta:e,axisRanges:kh(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger(Dr,o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(Hr,o)&&i.zoom()))},B.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},B.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Vr,zr,jr])&&this._startNavigation(t,e,Vr),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(Dr,{axisRanges:kh(this._plotArea.axes),originalEvent:t})},B.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger(zr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];p.options.name&&0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(zr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},B.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(jr,{axisRanges:kh(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,jr),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Hr,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(Ur,{axisRanges:e,originalEvent:t})))},B.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),o=this._plotArea.paneByPoint(t);if(o)for(var i=0;i<e.length;i++)if(e[i].onPane(o))return!0},B.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return O(t.rate,.3)},B.prototype._mousewheel=function(t){var e=this,o=Vt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:kh(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(Dr,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger(Hr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(Ur,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=i||this._startNavigation(t,r,Dr)?i:this._navState){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(Hr,{delta:o,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,Ur)},150)}}},B.prototype._startNavigation=function(t,e,o){var i,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(i=kh(r),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:e,axes:r}))},B.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},B.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},B.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),i=o&&(i=i.closest(o))&&i.aliasFor?i.aliasFor():i},B.prototype._eventCoordinates=function(t){t=Wt(t);return this._toModelCoordinates(t.x,t.y)},B.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=wt(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},B.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=Nt(this.element);return{left:M(t.x+e.left+o.left),top:M(t.y+e.top+o.top)}},B.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Nt(o),r=this._elementPadding(),o=ue(o).invert(),t=new A.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new I(t.x,t.y)},B.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},B.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},B.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},B.prototype._startHover=function(t,e){return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof wx)}),this._showInactiveOpacity(t,e),t)},B.prototype._displayTooltip=function(t){x({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},B.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);i&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t)):i.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,i))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},B.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},B.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},B.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},B.prototype._updateDrilldownPoint=function(t){t&&t.series&&jm.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},B.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},B.prototype._startDrilldown=function(t){var e,o;t&&t.series&&(e=t.series,o=jm.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:o,sender:this})},B.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},B.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||i;a&&(a.highlight||{}).visible&&s.visual&&(n=(i||s.series).opacity,a===e&&!o||s.visual.opacity(o?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,o,s.series)}},B.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},B.prototype._showInactiveOpacity=function(t,e){var o=this._activePoint,i=1<this._plotArea.series.length,r=this._hasInactiveOpacity();return this._updateHoveredPoint(t,e),t&&o!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),r?this._displayInactiveOpacity(t,i):this._highlight.show(t))),t},B.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},B.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},B.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},B.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},B.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),Ut(document,((t={})[_h]=this._mouseMoveTrackHandler,t)))},B.prototype._mouseMoveTracking=function(t){var e=this.options,o=this._tooltip,i=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&((this._activePoint=n).hover(this,t)||(x({},e.tooltip,n.options.tooltip).visible&&o.show(n),i.show(n))):(Kt(document,((t={})[_h]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},B.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;this._trackCrosshairs(e),o.hover&&((o=o.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!o&&(this._plotAreaHovered=!1,this.trigger(Lr))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},B.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},B.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,p,h;this._suppressHover||(i=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((h=(p=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger(Br,h)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},B.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},B.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},B.prototype._deferRedraw=function(){this._redraw()},B.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},B.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},B.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new Jv,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var f=(o=Bs(t,Ri(l.categoryField,u[0])))?Os:Ri,g=0;g<d;g++){var y=u[g],v=f(l.categoryField,y,this.chartService.intl);!o&&s.get(v)||(a.push([v,y]),o)||s.set(v,!0)}}0<a.length?(i=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(a=o?function(t){for(var e=function(t,e){void 0===e&&(e=zo);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(a,t=void 0===t?zo:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],Yt(i))&&i.push(e[r]);return i}(function(t,e){return zo(t[0],e[0])}):a),t.categories=i[0]):p&&(t.categories=[])},B.prototype._isBindable=function(t){for(var e=jm.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===st?r="field":r+="Field",!T(t[r])){o=!1;break}}return o},B.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},B.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[cr,rr,nr,sr])?t.findPoint(function(t){return t.series.index===e&&t.index===o}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):i.show(n)},B.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Er,Lr])},B.prototype.updateMouseMoveHandler=function(){var t;Kt(this.element,((t={})[_h]=this._mousemove,t)),this._shouldAttachMouseMove()&&Ut(this.element,((t={})[_h]=this._mousemove,t))},B.prototype.applyOptions=function(t,e){Th(this._originalOptions,t),this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},B.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},B.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},B.prototype.setIntlService=function(t){this.chartService.intl=t},B.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},B.prototype.destroy=function(){var t;this._destroyed=!0,Kt(this.element,((t={})[bh]=this._clickHandler,t[Qr]=this._mousewheelHandler,t[_h]=this._mousemove,t[wh]=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Kt(document,((t={})[_h]=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},B.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},B.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},B.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._resetDrilldownPoint(),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)};var Ah,Ph=["data","categories"];function Th(t,e){for(var o in e){var i,r,n;!u(o,Ph)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],T(r))&&((n=null===i)||!T(i)?(delete t[o],n&&delete e[o]):r&&xt(i)&&xt(r)&&Th(r,i))}}function Mh(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e(c=B,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:ir,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});const S1=c;function Oh(){Ah.apply(this,arguments)}(Ah=Zx)&&(Oh.__proto__=Ah),((Oh.prototype=Object.create(Ah&&Ah.prototype)).constructor=Oh).prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new I(this.plotArea.box.x2,e.center().y):new I(e.center().x,-2),align:i}},Oh.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const k1=Oh;var Bh=[$i,er],Rh,Ih,p,Eh,Z;function Lh(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function zh(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function jh(t){return m(t)?[t]:t}function Vh(){Rh.apply(this,arguments)}(Rh=S1)&&(Vh.__proto__=Rh),((Vh.prototype=Object.create(Rh&&Rh.prototype)).constructor=Vh).prototype._setElementClass=function(t){ht(t,"k-sparkline")},Vh.prototype._initElement=function(t){Rh.prototype._initElement.call(this,t),this._initialWidth=Math.floor(Gt(t).width)},Vh.prototype._resize=function(){var t=this.element,e=Lh(t.childNodes);this._initialWidth=Math.floor(Gt(t).width),zh(t.childNodes,e),Rh.prototype._resize.call(this)},Vh.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Lh(e.childNodes),i=document.createElement("span"),t=(i.innerHTML=" ",e.appendChild(i),x({width:this._autoWidth,height:Gt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return Gt(e,{width:t.width,height:t.height}),e.removeChild(i),zh(e.childNodes,o),this.surface&&this.surface.resize(),t},Vh.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Vh.prototype._createPlotArea=function(t){t=Rh.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Vh.prototype._calculateWidth=function(t){for(var e=this.options,o=P(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===$i)return 150;if(p.type===er)return 150;if(p.type===cr)return Gt(r).height;var h=a.categoryAxis;h&&(h=h.categoriesCount()*(!a.options.isStacked&&u(p.type,[ir,kr])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},Vh.prototype._createSharedTooltip=function(t){return new k1(this._plotArea,t)},Vh.normalizeOptions=function(t){t=jh(t);return(t=pt(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:jh(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Bh)||u(t.seriesDefaults.type,Bh)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t},e(p=Vh,{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}]});const A1=p;function Dh(){Ih.apply(this,arguments)}(Ih=A.drawing.Animation)&&(Dh.__proto__=Ih),((Dh.prototype=Object.create(Ih&&Ih.prototype)).constructor=Dh).prototype.setup=function(){this._initialOpacity=parseFloat(wt(this.element,"opacity").opacity)},Dh.prototype.step=function(t){wt(this.element,{opacity:String(Rt(this._initialOpacity,0,t))})},Dh.prototype.abort=function(){Ih.prototype.abort.call(this),wt(this.element,{display:"none",opacity:String(this._initialOpacity)})},Dh.prototype.cancel=function(){Ih.prototype.abort.call(this),wt(this.element,{opacity:String(this._initialOpacity)})};const P1=Dh;function Hh(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}function Uh(t,e,o){Eh.call(this),this.options=x({},this.options,o),this.container=t,this.chartService=e;o=wt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}(Eh=A.Class)&&(Uh.__proto__=Eh),((Uh.prototype=Object.create(Eh&&Eh.prototype)).constructor=Uh).prototype.createElements=function(){var t=this.element=Hh("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Hh("k-tooltip k-chart-tooltip"),o=this.scroll=Hh("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},Uh.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Bo(Vo(t)+Vo(e-t)/2),p=.4*o.width(),h=o.center().x-p,l=(o.center().x-h)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=kt(r),r=(this.clearHideTimeout(),this._visible||(wt(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,wt(s,{left:o.center().x-s.offsetWidth/2,top:o.y1}),wt(s,["marginTop","borderTopWidth","height"]));wt(n,{width:p,left:h+a*l,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),wt(i,{visibility:"visible"})},Uh.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Uh.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new P1(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},Uh.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(Z=Uh,{format:"{0:d} - {1:d}",hideDelay:500});const T1=Z;var Fh,Nh="_navigator",Gh=Nh,Wh="_default",Xh,s;function qh(t){Fh.call(this),this.chart=t;var e=this.options=x({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),T(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new tm(this,((o={})[zr]="_drag",o[jr]="_dragEnd",o[Hr]="_zoom",o[Ur]="_zoomEnd",o)),t.addObserver(this.chartObserver)}function Yh(){}(Fh=A.Class)&&(qh.__proto__=Fh),((qh.prototype=Object.create(Fh&&Fh.prototype)).constructor=qh).prototype.parseDate=function(t){return No(this.chart.chartService.intl,t)},qh.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},qh.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},qh.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},qh.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,i=i.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,p=(Yh.prototype=o,new Yh);0!==o.categoriesCount()&&(this.clean(),p.box=o.box,this.selection=new qx(t,p,{min:r,max:i,from:s||r,to:a||i,mousewheel:O(n,{zoom:"left"}),visible:e.visible},new tm(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new T1(t.element,t.chartService,{min:r,max:i,template:kt(e.hint),format:e.hint.format}))},qh.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Gh].roundedRange(),e=t.min,t=t.max,o=this.options.select||{},i=o.from||e,r=o.to||t;this.options.select=x({},o,{from:i=i<e?e:i,to:r=t<r?t:r}),this.filterAxes()},qh.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Yt(e.panes),t)},qh.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.filter(function(t){return t.options.name!==Nh});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},qh.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(i),i=e._plotArea.categoryAxis,e=t.axisRanges[i.options.name],t=this.options.select;e&&!r&&o&&(i=t.from&&t.to?Vo(t.to)-Vo(t.from):Vo(o.options.to)-Vo(o.options.from),r=Bo(_(Vo(e.min),n.min,Vo(n.max)-i)),t=Bo(_(Vo(r)+i,Vo(n.min)+i,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(r,t),this.showHint(r,t))},qh.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},qh.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},qh.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,o=(t=void 0===t?{}:t).from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Nh&&(n.min=o,n.max=i)}},qh.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:i.from,to:i.to},"category"!==e.options.type&&(e=new Cm(x({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=Io(e.min,-e.baseUnitStep,e.baseUnit),t.to=Io(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},qh.prototype._zoom=function(t){var e,o,i=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),p=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),o=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(p)&&(p*=3),1<a-e?(r.zoom(p,o),this.readSelection()):(i.options.min=s.from,s.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),o).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},qh.prototype._zoomEnd=function(t){this._dragEnd(t)},qh.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},qh.prototype._selectStart=function(t){return this.chart._selectStart(t)},qh.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},qh.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},qh.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Gh]},qh.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},qh.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=x({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=x({},o.pane,{name:Nh}),o.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?i.push(r):i.unshift(r),i.forEach(function(t){return t.name=t.name||Wh}),qh.attachAxes(t,o),qh.attachSeries(t,o,e))},qh.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=(i.concat(t).forEach(function(t){return t.pane=t.pane||Wh}),0===Ms(o,Mr).length),o=x({type:"date",pane:Nh,roundToBaseUnit:!o,justified:o,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),r=e.categoryAxis;i.push(x({},o,{maxDateGroups:200},r,{name:Gh,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},o,r,{name:Gh+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},o,r,{name:Gh+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Gh,pane:Nh,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},qh.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(x({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Gh,categoryAxis:Gh,autoBind:e.autoBindElements}))};const M1=qh;function Zh(){Xh.apply(this,arguments)}(Xh=S1)&&(Zh.__proto__=Xh),((Zh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Zh).prototype.applyDefaults=function(t,e){var o=Gt(this.element).width||600,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}},e=e&&x({},e,o);M1.setup(t,e),Xh.prototype.applyDefaults.call(this,t,e)},Zh.prototype._setElementClass=function(t){ht(t,"k-chart k-stockchart")},Zh.prototype.setOptions=function(t){this.destroyNavigator(),Xh.prototype.setOptions.call(this,t)},Zh.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Zh.prototype._resize=function(){this.noTransitionsRedraw()},Zh.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Zh.prototype._dirty=function(){var t=this.options,t=Mt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Zh.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new M1(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Xh.prototype._redraw.call(this),t.initSelection()},Zh.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Nh?this._unsetActivePoint():Xh.prototype._trackSharedTooltip.call(this,t)},Zh.prototype.bindCategories=function(){Xh.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Zh.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Gh?t=i.categories:t&&i.pane===Nh&&(i.categories=t)}},Zh.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Zh.prototype.destroy=function(){this.destroyNavigator(),Xh.prototype.destroy.call(this)},Zh.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Xh.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Nh},Zh.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e(s=Zh,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});const O1=s;var Qh="arrowPointer",Kh="barPointer",$h=Math.PI/180,Jh="inside",mh="linear",tl="outside",vh="radialPointer",h="radialRangePointer";function el(t,e){var o=t.getOrigin(),i=t.getSize(),e=P(e);return t.setOrigin([o.x-e.left,o.y-e.top]),t.setSize([i.width+(e.left+e.right),i.height+(e.top+e.bottom)]),t}var ol=A.drawing.Group,il=A.drawing.Path,rl=A.drawing.Text;function nl(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=il.fromRect(new A.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new rl(t.text,new A.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=el(t.bbox().clone(),e.padding),e=il.fromRect(i,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),i=new ol;return i.append(o),i.append(e),i.append(t),i}function sl(t,e,o){var i=T(t.from)?t.from:tt,r=T(t.to)?t.to:J;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function al(t,e){e=P(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,el(t,e)}var pl,hl=A.drawing.Path,ll=A.drawing.Surface,l;function cl(t,e,o,i){void 0===i&&(i={}),pl.call(this),this.element=t,this.theme=o,this.contextService=new xm(this,i),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(o),this.redraw()}(pl=A.Class)&&(cl.__proto__=pl),((cl.prototype=Object.create(pl&&pl.prototype)).constructor=cl).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},cl.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},cl.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},cl.prototype.exportVisual=function(){return this._visuals},cl.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(pt(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},cl.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},cl.prototype.resize=function(){this.noTransitionsRedraw()},cl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},cl.prototype.redraw=function(){var t=this._surfaceSize(),t=new A.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),al(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},cl.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},cl.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},cl.prototype.setIntlService=function(t){this.contextService.intl=t},cl.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=x({},e,this.options),this.options),o=t.pointer;if(pt(o)){for(var i=[],r=0;r<o.length;r++)i.push(x({},e.pointer,o[r]));t.pointer=i}},cl.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new A.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=al(e,o.width)),hl.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},cl.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Gt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=ll.create(o,{type:t.renderAs}))},cl.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},cl.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},cl.prototype.getSize=function(){return this._getSize()},cl.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,t=t.offsetHeight;return{width:o=o||e.width,height:t=t||e.height}},cl.prototype._defaultSize=function(){return{width:200,height:200}},cl.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(l=cl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const B1=l;var ul=A.drawing.Path,dl=A.drawing.Group,fl=A.geometry.Point,gl,o,yl,t,vl,c,p,ml,Z;function xl(t,e,o,i){var r,n,s,a,p,h,l=e.length;if(i.visible)for(var c=o.mirror,u=o.lineBox,d=i.skip;d<l;d+=i.step)d%i.skipUnit!=0&&(o.tickX=c?u.x2:u.x2-i.size,o.tickY=c?u.y1-i.size:u.y1,o.position=e[d],t.append((n=i,h=p=a=s=void 0,a=(r=o).position,p=o.tickX,h=o.tickY,r=o.vertical?(s=new fl(p,a),new fl(p+n.size,a)):(s=new fl(a,h),new fl(a,h+n.size)),new ul({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}function _l(t,e){t=t||{};!T(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),gl.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}(gl=Sm)&&(_l.__proto__=gl),((_l.prototype=Object.create(gl&&gl.prototype)).constructor=_l).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Me(t.min,t.max),t},_l.prototype.initFields=function(){},_l.prototype.render=function(){var t=this.elements=new dl,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},_l.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new dl,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=sl(n[h],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(ul.fromRect(new A.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},_l.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new dl,i=0;i<t.length;i++)o.append(nl(t[i],e.labels));return o},_l.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new dl;return 0<t.width&&t.visible&&((t=new ul({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},_l.prototype.renderTicks=function(){var t=new dl,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return xl(t,this.getMajorTickPositions(),i,e.majorTicks),xl(t,this.getMinorTickPositions(),i,x({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e(o=_l,{min:0,max:50,majorTicks:{size:15,align:Jh,color:G,width:.5,visible:!0},minorTicks:{size:10,align:Jh,color:G,width:.5,visible:!0},line:{width:.5},labels:{position:Jh,padding:2},mirror:!1,_alignLines:!1});const R1=o;function bl(t,e){yl.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=x({},this.options,e);e.fill=e.color,this.scale=t,T(e.value)?e.value=_(e.value,i,o):e.value=i}function wl(t,e){vl.call(this,t,e),this.options=x({track:{visible:T(e.track)}},this.options)}(yl=A.Class)&&(bl.__proto__=yl),((bl.prototype=Object.create(yl&&yl.prototype)).constructor=bl).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=T(e._oldValue)?e.value:i,e.value=_(t,i,o),this.elements&&this.repaint()},e(t=bl,{color:G}),(vl=c=t)&&(wl.__proto__=vl),((wl.prototype=Object.create(vl&&vl.prototype)).constructor=wl).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=i.track.size||i.size,p=i.size/2,h=P(i.margin),h=n?h[s?"left":"right"]:h[s?"bottom":"top"],h=s?-h:h;n?(o=new E(r.x1+h,r.y1,r.x1+h,r.y2),s?o.x1-=a:o.x2+=a,i.shape!==Kh&&(t=e=new E(r.x2+h,r.y1-p,r.x2+h,r.y2+p))):(o=new E(r.x1,r.y1-h,r.x2,r.y1-h),s?o.y2+=a:o.y1-=a,i.shape!==Kh&&(t=e=new E(r.x1-p,r.y1-h,r.x2+p,r.y1-h))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},wl.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:T(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},wl.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=P(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},e(p=wl,{shape:Kh,track:{border:{width:1}},color:G,border:{width:1},opacity:1,margin:P(3),animation:{type:Kh},visible:!0});const I1=p;function Cl(){ml.apply(this,arguments)}(ml=A.drawing.Animation)&&(Cl.__proto__=ml),((Cl.prototype=Object.create(ml&&ml.prototype)).constructor=Cl).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e),this.fromScale=new A.geometry.Point(o.x1,o.y1)),n=this.toScale=new A.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Cl.prototype.step=function(t){var e=Rt(this.fromScale.x,this.toScale.x,t),t=Rt(this.fromScale.y,this.toScale.y,t);this.element.transform(A.geometry.transform().translate(e,t))},e(Z=Cl,{easing:mh,duration:250}),A.drawing.AnimationFactory.current.register(Qh,Z);const E1=Z;var Sl,kl=A.geometry.Point,Al=A.drawing.Path,Pl,s;function Tl(t,e){Sl.call(this,t,e),T(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(Sl=I1)&&(Tl.__proto__=Sl),((Tl.prototype=Object.create(Sl&&Sl.prototype)).constructor=Tl).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new kl(0,0-o),new kl(0-i*e,0),new kl(0,0+o)]:[new kl(0-o,0),new kl(0,0+i*e),new kl(0+o,0)]},Tl.prototype.repaint=function(){var t=this.scale,e=this.options,t=new E1(this.elements,x(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},Tl.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type=Qh,new Al({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(A.geometry.transform().translate(i.x1,i.y1)),this.elements=o};const L1=Tl;function Ml(){Pl.apply(this,arguments)}(Pl=A.drawing.Animation)&&(Ml.__proto__=Pl),((Ml.prototype=Object.create(Pl&&Pl.prototype)).constructor=Ml).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,o=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-e)/t.speed*1e3,1)),this._set(e)},Ml.prototype.step=function(t){t=Rt(this.from,this.to,t);this._set(t)},Ml.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},e(s=Ml,{easing:mh,speed:250}),A.drawing.AnimationFactory.current.register(Kh,s);const z1=s;var Ol,Bl=A.drawing.Group,Rl=A.drawing.Path;function Il(t,e){Ol.call(this,t,e),T(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(Ol=I1)&&(Il.__proto__=Ol),((Il.prototype=Object.create(Ol&&Ol.prototype)).constructor=Il).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,i=i.vertical,r=r===i?-1:1,o=o.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=i?v:y,s=i?y:v,r=this._margin()*r,a=new A.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new A.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],i?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return i?(t.translate(o,0),e.translate(o,0)):(t.translate(0,o),e.translate(0,o)),[a,n,t,e]},Il.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue),i=(i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),new z1(i,x(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]})));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},Il.prototype.render=function(){var t=new Bl,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new Rl({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},Il.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Rl.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const j1=Il;var El,Ll=A.drawing.Group,l;function zl(){El.apply(this,arguments)}(El=B1)&&(zl.__proto__=El),((zl.prototype=Object.create(El&&El.prototype)).constructor=zl).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new E(o,i,o+t.width(),i+t.height());this.scale.reflow(o),this._shrinkScaleWidth(o);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(o),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},zl.prototype._buildVisual=function(){var t=new Ll,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},zl.prototype._createModel=function(){var t=this.options,e=this.scale=new R1(t.scale,this.contextService);this.pointers=[];for(var o=pt(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=x({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?L1:j1;this.pointers.push(new n(e,r))}},zl.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},zl.prototype._getBox=function(t){for(var e,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return n=o.options.vertical?(e=n.width()/2,new E(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new E(t.x1,r.y-e,t.x2,r.y+e))},zl.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new E(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new E(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},zl.prototype._shrinkScaleWidth=function(t){var e,o=this.scale;o.options.vertical||0<(e=o.contentBox().width()-t.width())&&(o.box.shrink(e,0),o.box.alignTo(t,"center"),o.reflow(o.box))},zl.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e(l=zl,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const V1=l;var jl=A.drawing.Arc,Vl=A.drawing.Path,Dl=A.drawing.Group,Hl,o,Ul,t;function Fl(t,e,o,i){var r=new Dl,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new A.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Vl({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(h))}return r}function Nl(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}function Gl(t,e){Hl.call(this,0,1,t,e)}(Hl=Sm)&&(Gl.__proto__=Hl),((Gl.prototype=Object.create(Hl&&Hl.prototype)).constructor=Gl).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||Me(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Gl.prototype.initFields=function(){},Gl.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Gl.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!T(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Gl.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-o)/(i-o)*s:(t-o)/(i-o)*s+n)+180},Gl.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Gl.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,o=0;return e.visible&&(o=e.size),o=t.visible?Math.max(t.size,o):o},Gl.prototype.labelsCount=function(){var t=Hl.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Gl.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Dl,s=.05*o,a=(T(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),p=a.position===Jh,h=T(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!h&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,r=P(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=i[f],x=(m-180)*$h,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(p?1:-1),m=m.y+Math.sin(x)*(v+d)*(p?1:-1),x=(g.reflow(new E(_-y,m-v,_+y,m+v)),new A.geometry.Point(g.box.x1,g.box.y1)),_=void 0;h?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||A.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=nl(g,t.labels),n.append(_)),this.bbox=A.geometry.Rect.union(this.bbox,_.bbox())}return n},Gl.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,e=e.rangeSize,i=this.getRangeRadius();this.options.labels.position===Jh&&(i+=e+o);for(var r=i+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=A.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Gl.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Dl;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&o.append(this.createRange(h,l,s,p))}}return o},Gl.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new A.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new jl(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Gl.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(Nl(r,n,s));for(var a=0;a<o;a++)for(var p=sl(e[a],r,n),h=i.length,l=0;l<h;l++){var c=i[l];if(c.from<=p.from&&p.from<=c.to){i.push(Nl(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(Nl(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},Gl.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===tl?t.getRadiusX()-r-i-o:t.getRadiusX()-o},Gl.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new A.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Gl.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Fl(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Dl),n=(r.append(this.majorTicks),o.majorTicks.size),s=o.minorTicks.size;return this._tickDifference=n-s,o.labels.position===tl&&(t=i.getRadiusX(),i.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,o.minorUnit)),this.minorTicks=Fl(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Gl.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;0<=i;i--)i%o==0&&t.splice(i,1);return t},Gl.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),360<=n&&o.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(M(a,X)),a+=p;return M(a)<=t.endAngle&&h.push(a),h},Gl.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)},Gl.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&this.options.labels.position===tl&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,h=a.x-p[0].anchor().x,a=a.y-p[0].anchor().y;t[s].transform((new A.geometry.transform).translate(h,a))}},e(o=Gl,{min:0,max:100,majorTicks:{size:15,align:Jh,color:G,width:.5,visible:!0},minorTicks:{size:10,align:Jh,color:G,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Jh,padding:2}});const D1=o;function Wl(t,e){Ul.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}(Ul=A.drawing.Animation)&&(Wl.__proto__=Ul),((Wl.prototype=Object.create(Ul&&Ul.prototype)).constructor=Wl).prototype.step=function(t){var e=this.options,t=Rt(e.oldAngle,e.newAngle,t);this.element.transform(A.geometry.transform().rotate(t,e.center))},e(t=Wl,{easing:mh,duration:150}),A.drawing.AnimationFactory.current.register(vh,t);const H1=t;var Xl,ql=A.drawing.Circle,Yl=A.drawing.Group,Zl=A.drawing.Path,p;function Ql(){Xl.apply(this,arguments)}(Xl=c)&&(Ql.__proto__=Xl),((Ql.prototype=Object.create(Xl&&Xl.prototype)).constructor=Ql).prototype.setAngle=function(t){this.elements.transform(A.geometry.transform().rotate(t,this.center))},Ql.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new H1(this.elements,x(e.animation,{oldAngle:o,newAngle:t})).play()},Ql.prototype.render=function(){var t=this.scale,e=this.options,o=new Yl;return!1!==e.animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle($h),o},Ql.prototype.reflow=function(t){var e=this.center=t.center,o=_(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(t*this.options.cap.size);this.bbox=A.geometry.Rect.fromPoints(new A.geometry.Point(e.x-o,e.y-o),new A.geometry.Point(e.x+o,e.y+o))},Ql.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new Zl({fill:{color:o},stroke:{color:o,width:.5}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},Ql.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new A.geometry.Circle(this.center,this.capSize);return new ql(e,{fill:{color:t},stroke:{color:t}})},e(p=Ql,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:vh,duration:150}});const U1=p;var Kl,$l=A.drawing.Group,Z,Jl,s,tc,l,ec,oc,ic,o,rc,t;function nc(){Kl.apply(this,arguments)}(Kl=B1)&&(nc.__proto__=Kl),((nc.prototype=Object.create(Kl&&Kl.prototype)).constructor=nc).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=A.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},nc.prototype._buildVisual=function(t,e,o){var i=this._visuals=new $l;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},nc.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},nc.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=M(a,X),h=M(-a,X),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=0<e&&0<i?2*p:e<0&&i<0?2*h:M((p+h)/2||1,X),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(h=r,i=o):(p=r,e=o)},nc.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=A.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},nc.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},nc.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,e=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=A.geometry.Rect.union(r.bbox,n[s].bbox)},nc.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new D1(t.scale,this.contextService);this.pointers=[];for(var i=pt(e)?e:[e],r=0;r<i.length;r++){var n=new U1(o,x({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e(Z=nc,{transitions:!0,gaugeArea:{background:""}});const F1=Z;function sc(){Jl.apply(this,arguments)}(Jl=D1)&&(sc.__proto__=Jl),((sc.prototype=Object.create(Jl&&Jl.prototype)).constructor=sc).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},sc.prototype.hasRanges=function(){return!0},sc.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},sc.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),i=this.slotAngle(i?t:e),t=this.createRange(r,i,this.getRangeRadius(),o);return this.ranges.append(t),t},e(s=sc,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const N1=s;function ac(t,e){tc.call(this,t,e);var e=this.options,o=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=_(o,150,800),t.elements.options.get("stroke.color")),o=t.currentColor();e!==o&&(this.startColor=new A.Color(e),this.color=new A.Color(o))}(tc=A.drawing.Animation)&&(ac.__proto__=tc),((ac.prototype=Object.create(tc&&tc.prototype)).constructor=ac).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=Rt(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=M(Rt(i.r,r.r,t)),e=M(Rt(i.g,r.g,t)),i=M(Rt(i.b,r.b,t)),this.element.stroke(new A.Color(o,e,i).toHex()))},e(l=ac,{easing:mh,duration:150}),A.drawing.AnimationFactory.current.register(h,l);const G1=l;function pc(){ec.apply(this,arguments)}(ec=c)&&(pc.__proto__=ec),((pc.prototype=Object.create(ec&&ec.prototype)).constructor=pc).prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new G1(this,x(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},pc.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},pc.prototype.stroke=function(t){this.elements.stroke(t)},pc.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap}))},pc.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,t=this.options,i=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(i)for(var s=0;s<i.length;s++){var a=i[s],p=a.color,h=a.from,a=(void 0===h&&(h=e),a.to);if(void 0===a&&(a=o),h<=n&&n<=a)return p}return r},pc.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e(o=pc,{animation:{type:h,duration:150}});const W1=o;function hc(){oc.apply(this,arguments)}(oc=F1)&&(hc.__proto__=oc),((hc.prototype=Object.create(oc&&oc.prototype)).constructor=hc).prototype._initTheme=function(t){oc.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},hc.prototype._createModel=function(){var t=this.options,e=this.scale=new N1(t.scale,this.contextService),e=new W1(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},hc.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},hc.prototype._setValueOptions=function(t){this.options.value=t},hc.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},hc.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,i=i.y-e/2;return t<o.width&&(t=r+t,r=Math.max(r,0),t>o.width)&&(r-=t-o.width),e<o.height&&(o=(t=this.scale.bbox).bottomRight().y,e=i+e,i=Math.max(i,t.origin.y),o<e)&&(i-=e-o),{left:r,top:i}};const X1=hc;function lc(){ic.apply(this,arguments)}(ic=X1)&&(lc.__proto__=ic),((lc.prototype=Object.create(ic&&ic.prototype)).constructor=lc).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,ic.prototype._createModel.call(this)};const q1=lc;function cc(t){rc.call(this),this.setOptions(t),this.initProperties()}(rc=A.Class)&&(cc.__proto__=rc),((cc.prototype=Object.create(rc&&rc.prototype)).constructor=cc).prototype.initProperties=function(){},cc.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},cc.prototype.encode=function(t,e,o){t=T(t)?String(t):t;return this.initValue(t,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},cc.prototype.initValue=function(){},cc.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},cc.prototype.addData=function(){},cc.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e(t=cc,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var uc,dc=Object.assign,vh;function fc(){uc.apply(this,arguments)}(uc=t)&&(fc.__proto__=uc),((fc.prototype=Object.create(uc&&uc.prototype)).constructor=fc).prototype.initProperties=function(){uc.prototype.initProperties.call(this),dc(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},fc.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},fc.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},fc.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},fc.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength&&(o=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=o,this.addPattern(this.characterMap[o]))},fc.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},fc.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},fc.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},fc.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},fc.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},e(vh=fc,{addCheckSum:!0});var gc,yc,vc=Object.assign,p,Z;function mc(){gc.apply(this,arguments)}function xc(){yc.apply(this,arguments)}(yc=t)&&(xc.__proto__=yc),((xc.prototype=Object.create(yc&&yc.prototype)).constructor=xc).prototype.initProperties=function(){yc.prototype.initProperties.call(this),vc(this,{minBaseUnitLength:.7})},xc.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},xc.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},xc.prototype.addBase=function(){},(gc=p=xc)&&(mc.__proto__=gc),((mc.prototype=Object.create(gc&&gc.prototype)).constructor=mc).prototype.initProperties=function(){gc.prototype.initProperties.call(this),vc(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},mc.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},mc.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw i=Math.ceil(this.getBaseWidth(o)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+i+"px.");this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},mc.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},mc.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},mc.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},mc.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},mc.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},mc.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},mc.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e(Z=mc,{addCheckSum:!1});var _c,bc,wc,Cc,Sc,kc,Ac,Pc,Tc,Mc,Oc,Bc={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var o=[],i=0;i<this.specialAsciiCodes[t].length;i++)o.push(this.characterMap[this.shiftCharacters[3]]),o.push(this.characterMap[this.specialAsciiCodes[t][i]]);else e=6*Math.floor(t/32)+(t-27)%32+64,o=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return o}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},s=((kc=Z)&&(Gc.__proto__=kc),((Gc.prototype=Object.create(kc&&kc.prototype)).constructor=Gc).prototype.initProperties=function(){kc.prototype.initProperties.call(this),x(this,Bc,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},Gc),Rc=Object.assign;(Sc=p)&&(Nc.__proto__=Sc),((Nc.prototype=Object.create(Sc&&Sc.prototype)).constructor=Nc).prototype.initProperties=function(){Sc.prototype.initProperties.call(this),Rc(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},Nc.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},Nc.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},Nc.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},Nc.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},Nc.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},Nc.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},Nc.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},Nc.prototype._getCheckValues=function(){for(var t,e=this.values,o=e.length,i=0,r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},Nc.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},Nc.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},Nc.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)};var mh,l=((Cc=mh=Nc)&&(Fc.__proto__=Cc),((Fc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Fc).prototype.initProperties=function(){Cc.prototype.initProperties.call(this),x(this,Bc,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,o=0;o<t.length;o++)e=t[o],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},Fc),Ic=/^\d+$/,Ec=Object.assign,c=((wc=t)&&(Uc.__proto__=wc),((Uc.prototype=Object.create(wc&&wc.prototype)).constructor=Uc).prototype.initProperties=function(){wc.prototype.initProperties.call(this),Ec(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},Uc.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},Uc.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},Uc.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},Uc.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},Uc.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},Uc.prototype.validate=function(t){if(Ic.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},Uc.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},Uc),Lc=/^\d+$/,zc=/^[a-z0-9]+$/i,jc=Object.assign;(bc=A.Class)&&(Hc.__proto__=bc),((Hc.prototype=Object.create(bc&&bc.prototype)).constructor=Hc).prototype.initProperties=function(){},Hc.prototype.addStart=function(){},Hc.prototype.is=function(){},Hc.prototype.isCode=function(){return!1},Hc.prototype.move=function(){},Hc.prototype.pushState=function(){};var h,o=((_c=h=Hc)&&(Dc.__proto__=_c),((Dc.prototype=Object.create(_c&&_c.prototype)).constructor=Dc).prototype.initProperties=function(){_c.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},Dc.prototype.addStart=function(){this.encoding.addPattern(this.START)},Dc.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Dc.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Dc.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(u("C",o)&&(o=i.substr(t.index).match(/\d{4,}/g))&&(r=i.indexOf(o[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Dc.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Dc.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Dc.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0},Dc.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Dc),Vc={};function Dc(t,e){_c.call(this,t),this.states=e,this._initMoves(e)}function Hc(t){bc.call(this),this.encoding=t,this.initProperties()}function Uc(){wc.apply(this,arguments)}function Fc(){Cc.apply(this,arguments)}function Nc(){Sc.apply(this,arguments)}function Gc(){kc.apply(this,arguments)}function Wc(t,e){Ac.call(this,t),this.states=e}function Xc(t,e){Pc.call(this,t),this._initSubStates(e)}function qc(){Tc.apply(this,arguments)}function Yc(){Mc.apply(this,arguments)}function Zc(){Oc.apply(this,arguments)}Vc.A=((Oc=o)&&(Zc.__proto__=Oc),((Zc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Zc).prototype.initProperties=function(){Oc.prototype.initProperties.call(this),jc(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Zc.prototype.isCode=function(t){return 0<=t&&t<96},Zc.prototype.getValue=function(t){return t<32?t+64:t-32},Zc),Vc.B=((Mc=o)&&(Yc.__proto__=Mc),((Yc.prototype=Object.create(Mc&&Mc.prototype)).constructor=Yc).prototype.initProperties=function(){Mc.prototype.initProperties.call(this),jc(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Yc.prototype.isCode=function(t){return 32<=t&&t<128},Yc.prototype.getValue=function(t){return t-32},Yc),Vc.C=((Tc=h)&&(qc.__proto__=Tc),((qc.prototype=Object.create(Tc&&Tc.prototype)).constructor=qc).prototype.initProperties=function(){Tc.prototype.initProperties.call(this),jc(this,{key:"C",MOVE:99,START:105})},qc.prototype.addStart=function(){this.encoding.addPattern(this.START)},qc.prototype.is=function(t,e){var o=lu(t,e,4);return(e+4<=t.length||2===t.length)&&Lc.test(o)},qc.prototype.move=function(){this.encoding.addPattern(this.MOVE)},qc.prototype.pushState=function(t){for(var e;(e=lu(t.value,t.index,2))&&Lc.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},qc.prototype.getValue=function(t){return t},qc),Vc.FNC4=((Pc=h)&&(Xc.__proto__=Pc),((Xc.prototype=Object.create(Pc&&Pc.prototype)).constructor=Xc).prototype.initProperties=function(){Pc.prototype.initProperties.call(this),jc(this,{key:"FNC4",dependentStates:["A","B"]})},Xc.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},Xc.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Xc.prototype.isCode=function(t){return 128<=t&&t<256},Xc.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},Xc.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},Xc.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},Xc.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},Xc.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},Xc.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},Xc),Vc.FNC1=((Ac=h)&&(Wc.__proto__=Ac),((Wc.prototype=Object.create(Ac&&Ac.prototype)).constructor=Wc).prototype.initProperties=function(){Ac.prototype.initProperties.call(this),jc(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},Wc.prototype.addStart=function(){this.encoding[this.startState].addStart()},Wc.prototype.is=function(){return u(this.key,this.states)},Wc.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if((e=(p.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},Wc.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!Lc.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!zc.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},Wc.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=lu(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},Wc.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},Wc.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,e),t=t.substring(e+1,o),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},Wc.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&u(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},Wc),(eu=t)&&(hu.__proto__=eu),((hu.prototype=Object.create(eu&&eu.prototype)).constructor=hu).prototype.initProperties=function(){eu.prototype.initProperties.call(this),jc(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},hu.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Vc[this.states[t]](this,this.states)},hu.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},hu.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},hu.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var o;t.shifted?(o=t.state,t.state=t.previousState,t.previousState=o,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},hu.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},hu.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},hu.prototype.addStop=function(){this.addPattern(this.STOP)},hu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},hu.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},hu.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))};var Qc,Kc,$c,Jc,tu,eu,p,o=((tu=p=hu)&&(pu.__proto__=tu),((pu.prototype=Object.create(tu&&tu.prototype)).constructor=pu).prototype.initProperties=function(){tu.prototype.initProperties.call(this),jc(this,{name:"Code 128 A",states:["A"]})},pu),h=((Jc=p)&&(au.__proto__=Jc),((au.prototype=Object.create(Jc&&Jc.prototype)).constructor=au).prototype.initProperties=function(){Jc.prototype.initProperties.call(this),jc(this,{name:"Code 128 B",states:["B"]})},au),ou=(($c=p)&&(su.__proto__=$c),((su.prototype=Object.create($c&&$c.prototype)).constructor=su).prototype.initProperties=function(){$c.prototype.initProperties.call(this),jc(this,{name:"Code 128 C",states:["C"]})},su),iu=((Kc=p)&&(nu.__proto__=Kc),((nu.prototype=Object.create(Kc&&Kc.prototype)).constructor=nu).prototype.initProperties=function(){Kc.prototype.initProperties.call(this),jc(this,{name:"Code 128",states:["C","B","A","FNC4"]})},nu),p=((Qc=p)&&(ru.__proto__=Qc),((ru.prototype=Object.create(Qc&&Qc.prototype)).constructor=ru).prototype.initProperties=function(){Qc.prototype.initProperties.call(this),jc(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},ru);function ru(){Qc.apply(this,arguments)}function nu(){Kc.apply(this,arguments)}function su(){$c.apply(this,arguments)}function au(){Jc.apply(this,arguments)}function pu(){tu.apply(this,arguments)}function hu(t){eu.call(this,t),this._initStates()}function lu(t,e,o){return t.substring(e,e+o)}var cu,uu,du,fu,gu,yu,vu,mu=Object.assign;(vu=t)&&(Lu.__proto__=vu),((Lu.prototype=Object.create(vu&&vu.prototype)).constructor=Lu).prototype.initProperties=function(){vu.prototype.initProperties.call(this),mu(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Cu})},Lu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Lu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Lu.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Lu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Lu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Lu.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])};var xu,_u=((yu=xu=Lu)&&(Eu.__proto__=yu),((Eu.prototype=Object.create(yu&&yu.prototype)).constructor=Eu).prototype.initProperties=function(){yu.prototype.initProperties.call(this),mu(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Eu),bu=((gu=xu)&&(Iu.__proto__=gu),((Iu.prototype=Object.create(gu&&gu.prototype)).constructor=Iu).prototype.initProperties=function(){gu.prototype.initProperties.call(this),mu(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Iu),wu=((fu=xu)&&(Ru.__proto__=fu),((Ru.prototype=Object.create(fu&&fu.prototype)).constructor=Ru).prototype.initProperties=function(){fu.prototype.initProperties.call(this),mu(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Ru),xu=((du=xu)&&(Bu.__proto__=du),((Bu.prototype=Object.create(du&&du.prototype)).constructor=Bu).prototype.initProperties=function(){du.prototype.initProperties.call(this),mu(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Bu),Cu={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Su=Object.assign,t=((uu=t)&&(Ou.__proto__=uu),((Ou.prototype=Object.create(uu&&uu.prototype)).constructor=Ou).prototype.initProperties=function(){uu.prototype.initProperties.call(this),Su(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},Ou.prototype.initValue=function(t,e,o){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},Ou.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},Ou.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},Ou.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},Ou.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},Ou),ku=Object.assign,Au=((cu=t)&&(Mu.__proto__=cu),((Mu.prototype=Object.create(cu&&cu.prototype)).constructor=Mu).prototype.initProperties=function(){cu.prototype.initProperties.call(this),ku(this,{name:"EAN 8"})},Mu.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},Mu),Pu={code11:vh,code39:Z,code39extended:s,code93:mh,code93extended:l,code128:iu,code128a:o,code128b:h,code128c:ou},Tu,vh;function Mu(){cu.apply(this,arguments)}function Ou(){uu.apply(this,arguments)}function Bu(){du.apply(this,arguments)}function Ru(){fu.apply(this,arguments)}function Iu(){gu.apply(this,arguments)}function Eu(){yu.apply(this,arguments)}function Lu(){vu.apply(this,arguments)}function zu(t,e){var o=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=o,e}function ju(t,e,o){void 0===o&&(o=Te),Tu.call(this),this.options=x({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&T(e.value)&&this.redraw()}Pu["gs1-128"]=p,Pu.msimod10=_u,Pu.msimod11=bu,Pu.msimod1010=wu,Pu.msimod1110=xu,Pu.postnet=c,Pu.ean8=Au,Pu.ean13=t,(Tu=A.Class)&&(ju.__proto__=Tu),((ju.prototype=Object.create(Tu&&Tu.prototype)).constructor=ju).prototype.destroy=function(){this._destroySurface()},ju.prototype._initElement=function(){ht(this.element,"k-barcode")},ju.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},ju.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},ju.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},ju.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},ju.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},ju.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},ju.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},ju.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},ju.prototype._resize=function(){this.redraw()},ju.prototype.createVisual=function(){this.visual=this._render()},ju.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=P(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new E(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),p=s.height(),h=new A.drawing.Group;this.contentBox=s,h.append(this._getBackground(n)),i.visible&&(p-=A.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,s.width(),p)}catch(t){return this.onError(t),h}return i.visible&&(n=o,e.checksum&&T(a.checksum)&&(n+=" "+a.checksum),h.append(this._getText(n))),this.barHeight=p,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),h.append(this._bandsGroup),h},ju.prototype.exportVisual=function(){return this._render()},ju.prototype._getSize=function(){var t=zu(this.element,this.options.renderAs),e=new A.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},ju.prototype.value=function(t){if(!T(t))return this.options.value;this.options.value=String(t),this.redraw()},ju.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new A.drawing.Group,n=0;n<t.length;n++){var s,a=(s=xt(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=A.geometry.Rect.fromPoints(new A.geometry.Point(i,s.y1+o.y1),new A.geometry.Point(i+a,s.y2+o.y1)),s=A.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},ju.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new E(0,0,t.width,t.height).unpad(o.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},ju.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new dm(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},ju.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Pu[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Pu[this.type],this.options=x({},this.options,t)},e(vh=ju,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});const Y1=vh;var Vu={width:500,height:100};const Z1=function(t,e){if(void 0===e&&(e=Vu),!t)throw new Error("Please specify barcode type to validate.");var o,i,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),Pu[n])return o=new Pu[n],i=e,r=s,function(t){try{o.encode(r+t,i.width,i.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var Du=Object.assign;function Hu(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function Uu(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Fu(t){return parseInt(t,2)}(Zu=A.Class)&&(sd.__proto__=Zu),((sd.prototype=Object.create(Zu&&Zu.prototype)).constructor=sd).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},sd.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},sd.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Nu,Gu,Wu,Xu,qu,Yu,Zu,Qu=sd,Ku=((Yu=A.Class)&&(nd.__proto__=Yu),(nd.prototype=Object.create(Yu&&Yu.prototype)).constructor=nd),$u=((qu=A.Class)&&(rd.__proto__=qu),((rd.prototype=Object.create(qu&&qu.prototype)).constructor=rd).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(jd(i,Ad,Pd,Td,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=jd(i,Md,Od,Bd,t);r.mode!==t?(t=r.mode,e.push(r),o++):e[o].modeString+=r.modeString,i=i.substr(r.modeString.length)}return e}(),t=Vd(function(t){for(var e=0,o=0;o<t.length;o++)e+=Ju[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var o="",i=0;i<t.length;i++)o+=Ju[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new Ku(e,t)},rd);(Xu=A.Class)&&(id.__proto__=Xu),((id.prototype=Object.create(Xu&&Xu.prototype)).constructor=id).prototype.initProperties=function(){Du(this,{modeIndicator:"",bitsInCharacterCount:[]})},id.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},id.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},id.prototype.getModeCountString=function(t,e){return this.modeIndicator+Uu(t,this.getBitsCharacterCount(e))},id.prototype.encode=function(){},id.prototype.getStringBitsLength=function(){},id.prototype.getValue=function(){};var Z,s=((Wu=Z=id)&&(od.__proto__=Wu),((od.prototype=Object.create(Wu&&Wu.prototype)).constructor=od).prototype.initProperties=function(){Wu.prototype.initProperties.call(this),Du(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},od.prototype.getValue=function(t){return parseInt(t,10)},od.prototype.encode=function(t,e){for(var o=Hu(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=Uu(o[r],10);return i+Uu(o[r],1+3*o[r].length)},od.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0==o?0:1)},od),mh=((Gu=Z)&&(ed.__proto__=Gu),((ed.prototype=Object.create(Gu&&Gu.prototype)).constructor=ed).prototype.initProperties=function(){Gu.prototype.initProperties.call(this),Du(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},ed.prototype.getValue=function(t){return this.characters[t]},ed.prototype.encode=function(t,e){for(var o=Hu(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=Uu(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+Uu(2===o[r].length?45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)):this.getValue(o[r].charAt(0)),1+5*o[r].length)},ed.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},ed),l=((Nu=Z)&&(td.__proto__=Nu),((td.prototype=Object.create(Nu&&Nu.prototype)).constructor=td).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),Du(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},td.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},td.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=Uu(this.getValue(t.charAt(i)),8);return o},td.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},td),Ju={};function td(){Nu.apply(this,arguments)}function ed(){Gu.apply(this,arguments)}function od(){Wu.apply(this,arguments)}function id(){Xu.call(this),this.initProperties()}function rd(){qu.apply(this,arguments)}function nd(t,e){Yu.call(this),this.dataString=t,this.version=e}function sd(t){Zu.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}Ju.numeric=new s,Ju.alphanumeric=new mh,Ju.byte=new l,(ad=A.Class)&&(Id.__proto__=ad),((Id.prototype=Object.create(ad&&ad.prototype)).constructor=Id).prototype.initProperties=function(){Du(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Id.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=Vd(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new Ku(t,e)},Id.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Id.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Id.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=Uu(t,8);else{for(var e=8-e,r=0;r<o;r++)i=Uu(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Id.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var ad,pd=Id,hd=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],ld="numeric",cd="alphanumeric",ud="byte",dd={1:0},fd={0:1},gd={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},yd=[1,0,1,1,1],vd=[1,0,1],md={L:"01",M:"00",Q:"11",H:"10"},xd=["11101100","00010001"],_d=93,bd=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],wd=/^\d+/,iu="A-Z0-9 $%*+./:-",Cd=new RegExp("^[A-Z $%*+./:-]+"),Sd=new RegExp("^["+iu+"]+"),kd=new RegExp("^[^"+iu+"]+"),Ad=8,Pd=5,Td=8,Md=17,Od=9,Bd=16,Rd=[[1,0],[1,25,0]];function Id(){ad.call(this),this.initProperties(),this.mode=Ju[this.encodingMode]}function Ed(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Ld(t,e,o,i){for(var r=0;r<bd.length;r++)t[r][o][i]=bd[r](o,i)?1^e:parseInt(e,10)}function zd(t,e){for(var o,i=Rd[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],p=0;p<s;p++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=fd[(t[i]+e)%255],void 0!==t[--i];);return o}(n,dd[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(p=r.length-1;0<=p;p--)a[e-1-p]=Uu(r[p],8);return a}function jd(t,e,o,i,r){var n,s=wd.exec(t),s=s?s[0]:"",a=Cd.exec(t),a=a?a[0]:"",p=Sd.exec(t),p=p?p[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Sd.test(t.charAt(s.length)))?(n=ld,s):p&&(t.length===p.length||p.length>=i||r===cd)?(n=cd,s||a):(n=ud,p?p+kd.exec(t.substring(p.length))[0]:kd.exec(t)[0]);return{mode:n,modeString:e}}function Vd(t,e){for(var o=0,i=hd.length-1,r=Math.floor(hd.length/2);t<hd[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=hd[o][e].totalDataCodewords?r+1:i+1}function Dd(t,e,o){var i=Fu(e),e=e.length-1,r=t<<e;return Uu(t,o-e)+Uu(function(t,e){for(var o=e.toString(2).length,i=t.toString(2).length,r=t;o<=(i=(r^=e<<i-o).toString(2).length););return r}(r,i),e)}function Hd(t,e){return parseInt(t.charAt(e),10)}function Ud(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&Ed(t,Hd(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&Ed(t,Hd(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)Ed(t,Hd(e,r-1-i++),n,s);for(Ed(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)Ed(t,Hd(e,r-1-i++),n,s)}function Fd(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,Ed(t,r=Hd(e,e.length-p-1),0+o,s+i),Ed(t,r,a+i,0+o)}function Nd(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Ed(t,r=e[a],o+p,i+a),Ed(t,r,o+a,i+p),Ed(t,r,o+s-p,i+s-a),Ed(t,r,o+s-a,i+s-p)}function Gd(t,e,o,i){for(var r=o,n=i,s=t[0];Ed(t,0,r,i),Ed(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function Wd(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===_d&&(o[t]+=40)}function Xd(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function qd(t,e,o){var o=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?pd:$u)).getEncodingResult(t,e),r=o.version,n=hd[r-1][e],t=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var p=s[a][0],h=0;h<p;h++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=Fu(o),i+=8;r.push(c),n.push(zd(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,o=0,i=0,r=t;r.length<e&&o<4;)r+="0000".charAt(o++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=xd[i],i^=1;return r}(o.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<bd.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}(),i=(l=(s=o)[0].length,Nd(s,yd,0,0),Gd(s,[-1,-1],7,7),Nd(s,yd,l-7,0),Gd(s,[1,-1],l-8,7),Nd(s,yd,0,l-7),Gd(s,[-1,1],7,l-8),o),s=r;if(!(s<2)){var a,p=i[0],h=p.length,l=Math.floor(s/7),c=[6],u=0;for((s=gd[s])?a=(h-13-s)/l:s=a=(h-13)/(l+1),c.push(c[u++]+s);c[u]+a<h;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===p[c[d]][c[f]]&&Nd(i,vd,c[d]-2,c[f]-2)}for(var g=o,y=1,v=g[0].length,m=8;m<v-8;m++)Ed(g,y,6,m),Ed(g,y,m,6),y^=1;7<=r&&Fd(o,Uu(0,18)),Ud(o,Uu(0,15));for(var x,_,b,w=o,C=t,S=new Qu(w[0]),k=0;k<C.length;k++)for(x=C[k],_=0;0<x.length;){for(var A=0;A<x.length;A++)for(var P=0;P<8;P++)b=S.getNextCell(),Ld(w,x[A][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)Ld(w,0,b.row,b.column);l=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,p=0;p<t.length;p++)s[p]=[r[p]=o[p]=0,0],n[p]=[0,0],i[p]=[];for(var h=0;h<a;h++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][l],10),i[c][0]===e[h][l]&&h+1<a&&0<=l-1&&e[h+1][l]===i[c][0]&&e[h+1][l-1]===i[c][0]&&(o[c]+=3),Wd(c,n,o,0,e[h][l]),Wd(c,n,o,1,e[l][h]),Xd(c,o,i,e[h][l],s,0),Xd(c,o,i,e[l][h],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(p=0;p<o.length;p++)o[p]+=(d=r[p],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),o[p]<v&&(v=o[p],u=p);return u}(o),s=o[l];return 7<=r&&Fd([s],Dd(r,"1111100100101",18)),Ud([s],function(t){var e="";if(0===Fu(t))return"101010000010010";for(var o=Dd(Fu(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(md[e]+Uu(l,3))),s}for(var Yd,Zd=1;Zd<255;Zd++)255<(Yd=2*fd[Zd-1])&&(Yd^=285),fd[Zd]=Yd,dd[Yd]=Zd;Yd=2*fd[Zd-1]^285,fd[Zd]=Yd,fd[-1]=0;for(var Qd=2;Qd<=68;Qd++){var Kd=Rd[Qd-1];Rd[Qd]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)o[i+r]=void 0===o[i+r]?(t[i]+(0<=e[r]?e[r]:0))%255:dd[fd[o[i+r]]^fd[(t[i]+e[r])%255]];return o}(Kd,[Qd,0])}var $d,Jd=Math.round,tf=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],ef=[[0,1],[1,1],[1,0]],o;function of(t,e,o){void 0===o&&(o=Te),$d.call(this),this.options=x({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}($d=A.Class)&&(of.__proto__=$d),((of.prototype=Object.create($d&&$d.prototype)).constructor=of).prototype.destroy=function(){this._destroySurface()},of.prototype._initElement=function(){ht(this.element,"k-qrcode")},of.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},of.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},of.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},of.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},of.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},of.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},of.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,o={width:0,height:0};return 0<e&&(o.width=e),t&&(o.height=t),o},of.prototype._resize=function(){this.redraw()},of.prototype.createVisual=function(){this.visual=this._render()},of.prototype.exportVisual=function(){return this._render()},of.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0,h=(s.width=p,new A.drawing.Group);try{n&&(o=qd(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,h.append(this._renderBackground(i,s)),h.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?h.append(this._renderLogo(i,t)):this._isSwiss()&&h.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return h},of.prototype._renderLogo=function(t,e){var t=Jd(t/2),e=this._getLogoSize(7*e),o=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new A.geometry.Rect(new A.geometry.Point(t.x,t.y),new A.geometry.Size(e.width,e.height));return new A.drawing.Image(o,t)},of.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,t=t/2,n={},s=new A.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),ef,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,ef,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,tf,"#fff")),s},of.prototype._renderShape=function(t,e,o,i){var r=new A.drawing.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},of.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=zu(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},of.prototype._calculateBaseUnit=function(t,e){var o,i=Math.floor(t/e);return i<1?(o=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))):t<=i*e&&1<=i-1&&i--,i},of.prototype._renderMatrix=function(t,e,o){for(var i=new A.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var a=Jd(o+a*e),p=Jd(n),h=Jd(o+s*e),l=Jd(n+e);i.moveTo(a,p).lineTo(a,l).lineTo(h,l).lineTo(h,p).close()}}return i},of.prototype._renderBackground=function(t,e){t=new E(0,0,t,t).unpad(e.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},of.prototype.setOptions=function(t){this.options=Du(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},of.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},of.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},of.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},of.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},e(o=of,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});const Q1=o,K1=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{qd(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var rf={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function nf(t){return t*t}var sf,af,pf=Math,hf=pf.abs,lf=pf.atan,cf=pf.atan2,uf=pf.cos,df=pf.sin,ff=pf.tan,gf=((af=A.Class)&&(Mf.__proto__=af),((Mf.prototype=Object.create(af&&af.prototype)).constructor=Mf).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Mf.prototype.toArray=function(){return[this.lat,this.lng]},Mf.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Mf.prototype.clone=function(){return new Mf(this.lat,this.lng)},Mf.prototype.round=function(t){return this.lng=M(this.lng,t),this.lat=M(this.lat,t),this},Mf.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Mf.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Mf.prototype.destination=function(t,e,o){var e=Qt(e),o=o||rf.WGS84,i=Qt(this.lat),r=Qt(this.lng),t=t/o.a,o=pf.asin(df(i)*uf(t)+uf(i)*df(t)*uf(e)),r=r+cf(df(e)*df(t)*uf(i),uf(t)-df(i)*df(o));return new Mf(Ft(o),Ft(r))},Mf.prototype.greatCircleTo=function(t,e){var o=Mf.create(void 0),e=e||rf.WGS84;if(!o||this.clone().round(8).equals(o.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var i,r,n=e.a,s=e.b,a=e.f,p=Qt(o.lng-this.lng),e=lf((1-a)*ff(Qt(this.lat))),h=df(e),l=uf(e),e=lf((1-a)*ff(Qt(o.lat))),c=df(e),u=uf(e),d=p,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=df(d),v=uf(d),m=pf.sqrt(nf(u*y)+nf(l*c-h*u*v)),x=cf(m,r=h*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(i=1-nf(_))&&(b=r-2*h*c/i),d),C=a/16*i*(4+a*(4-3*i)),d=p+(1-C)*a*_*(x+C*m*(b+C*r*(2*nf(b)-1))),g=hf(d-w)<=this.DISTANCE_CONVERGENCE;var o=i*(nf(n)-nf(s))/nf(s),e=1+o/16384*(4096+o*(o*(320-175*o)-768)),n=o/1024*(256+o*(o*(74-47*o)-128)),o=n*m*(b+n/4*(r*(2*nf(b)-1)-n/6*b*(4*nf(m)-3)*(4*nf(b)-3))),n=cf(u*y,l*c-h*u*v),S=cf(l*y,-h*u+l*c*v);return{distance:M(s*e*(x-o),this.DISTANCE_PRECISION),azimuthFrom:Ft(n),azimuthTo:Ft(S)}},Mf.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Mf.fromLngLat=function(t){return new Mf(t[1],t[0])},Mf.fromLatLng=function(t){return new Mf(t[0],t[1])},Mf.create=function(t,e){if(T(t))return t instanceof Mf?t.clone():1===arguments.length&&2===t.length?Mf.fromLatLng(t):new Mf(t,e)},Mf),yf=Math,vf=yf.atan,mf=yf.exp,xf=yf.pow,_f=yf.sin,bf=yf.log,wf=yf.tan,Cf=A.geometry.Point,Sf=yf.PI,kf=Sf/2,Af=Sf/4,Pf=Sf/180,h=rf.WGS84,ou;function Tf(t){sf.call(this),this.initProperties(),this._initOptions(t)}function Mf(t,e){af.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}function Of(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Bf(t,e){e.insertBefore(t,e.firstChild)}function Rf(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function If(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(sf=A.Class)&&(Tf.__proto__=sf),((Tf.prototype=Object.create(sf&&sf.prototype)).constructor=Tf).prototype._initOptions=function(t){this.options=x({},this.options,t)},Tf.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Tf.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,r=_(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?_(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=Qt(e-o)*i,e=this._projectLat(r);return new Cf(t,e)},Tf.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=Qt(t),i=wf(Af+t/2),t=o*_f(t),t=xf((1-t)/(1+t),o/2);return e*bf(i*t)},Tf.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(Pf*i)+o,o=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=_(i,-this.MAX_LNG,this.MAX_LNG)),new gf(o,i)},Tf.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=mf(-t/o),s=kf-2*vf(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var p=i*_f(s),p=xf((1-p)/(1+p),r),p=kf-2*vf(n*p)-s;if(s+=p,yf.abs(p)<=this.INVERSE_CONVERGENCE)break}return Ft(s)},e(ou=Tf,{centralMeridian:0,datum:h}),(Lf=ou)&&(Ff.__proto__=Lf),((Ff.prototype=Object.create(Lf&&Lf.prototype)).constructor=Ff).prototype.initProperties=function(){Lf.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},Ff.prototype._projectLat=function(t){var e=this.options.datum.a,t=Qt(t),t=wf(Af+t/2);return e*bf(t)},Ff.prototype._inverseY=function(t){var e=this.options.datum.a,t=mf(-t/e);return Ft(kf-2*vf(t))};var Ef,Lf,zf=Ff,jf=((Ef=A.Class)&&(Uf.__proto__=Ef),((Uf.prototype=Object.create(Ef&&Ef.prototype)).constructor=Uf).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},Uf.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},Uf),Vf=Object.defineProperty,Df=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Hf=function(t){var e,o,i=!1,r=[],n={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},p={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(o in n)if(n.hasOwnProperty(o)&&(r=t.match(n[o]))){if("windows"===o&&"plugins"in navigator)return!1;(i={}).device=o,i.tablet=Nf(o,a,!1),i.browser=Nf(t,p,"default"),i.name=Nf(o,s),i[i.name]=!0,i.majorVersion=r[2],i.minorVersion=(r[3]||"0").replace("_","."),e=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return i};function Uf(){Ef.call(this);var t=this._proj=new zf,t=this.c=2*Sf*t.options.datum.a;this._tm=A.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=A.geometry.transform().scale(t,-t).translate(-.5,-.5)}function Ff(){Lf.apply(this,arguments)}function Nf(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}function Gf(t,e){return t.bind(e)}function Wf(t,e,o,i,r){rg(t,e,o,i,r)}function Xf(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(pt(t=e)?t:(t||"").split(" ")).forEach(function(t){ng(n,t,s,a)})}function qf(t){var e=og(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function Yf(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function Zf(){return Number(new Date)}function Qf(){}function Kf(t){var e=[];if(t)for(var o=Rf(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}function $f(){this._defaultPrevented=!0}function Jf(){return!0===this._defaultPrevented}var tg,eg,og=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=ig();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},ig=function(){var t=Hf(navigator.userAgent),e=function(t){var e,o=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(r.hasOwnProperty(e)&&(i=t.match(r[e]))){(o={})[e]=!0,o[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||i[2],10);break}return o}(navigator.userAgent),o=e.chrome,i=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!o&&!i&&!r&&!e&&window.PointerEvent,n.msPointers=!o&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,p=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,o="string"==typeof s.style[t+"Transition"];if(o||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),p={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},o&&((a=p).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}),s=null,n.transforms=p,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;var t;if(n.mobileOS.android)return!n.browser.chrome||!(n.browser.version<32||((t=document.querySelector("meta[name=viewport]"))?t.getAttribute("content"):"").match(/user-scalable=no/i))}return!1},n},rg=function(s,t,a,p,h){(pt(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=p,(e=a)&&yt(e)&&!i?n=e:e&&"string"==typeof e&&yt(n)&&(r=e),(o=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,Vf(t,"currentTarget",{value:e}),Vf(t,"delegateTarget",{value:o}),n(t))},Boolean(h))})},ng=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},sg="function";(eg=A.Class)&&(hg.__proto__=eg),((hg.prototype=Object.create(eg&&eg.prototype)).constructor=hg).prototype.destroy=function(){this.unbind()},hg.prototype.bind=function(t,e,o){var i,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==sg;if(void 0===e)for(p in t)n.bind(p,t[p]);else for(var p=0,h=s.length;p<h;p++)!function(){var t=s[p];(r=a?e:e[t])&&(o&&(i=r,(r=function(){n.unbind(t,r),i.apply(n,arguments)}).original=i),(n._events[t]=n._events[t]||[]).push(r))}();return n},hg.prototype.one=function(t,e){return this.bind(t,e,!0)},hg.prototype.first=function(t,e){for(var o,i="string"==typeof t?[t]:t,r=typeof e==sg,n=0,s=i.length;n<s;n++){var a=i[n];(o=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(o)}return this},hg.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=$f,n.isDefaultPrevented=Jf,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},hg.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;0<=o;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},hg.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events)&&this._events[i]&&delete this._events[i]}this.bind(this.events,t)};var p,ag=((tg=p=hg)&&(pg.__proto__=tg),((pg.prototype=Object.create(tg&&tg.prototype)).constructor=pg).prototype._initOptions=function(t){this.options=x({},this.options,t)},pg.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},pg.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},pg.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},pg.prototype.clear=function(){this.items=[],Of(this.element)},pg.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var o=this.items[e],o=this._itemText(o);""!==o&&t.push(o)}if(0<t.length){Of(this.element);var i=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=i;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},pg.prototype.hideElement=function(){this.element.style.display="none"},pg.prototype.showElement=function(){this.element.style.display=""},pg.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},pg.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},pg.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},pg);function pg(t,e){tg.call(this),this.element=t,this._initOptions(e),this.items=[],ht(this.element,"k-widget k-attribution")}function hg(){eg.call(this),this._events={}}e(ag,{name:"Attribution",separator:" | "});var lg={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function cg(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+lg[t].className+'" aria-label="move '+t+'">'+se({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Df(t)}(ug=p)&&(fg.__proto__=ug),((fg.prototype=Object.create(ug&&ug.prototype)).constructor=fg).prototype.destroy=function(){this.dispose()},fg.prototype.dispose=function(){Xf(this._keyroot,"keydown",this._keydownHandler)},fg.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},fg.prototype._initOptions=function(t){this.options=x({},this.options,t)},fg.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},fg.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},fg.prototype._keydown=function(t){switch(t.which){case im.UP:this._pan(0,1),t.preventDefault();break;case im.DOWN:this._pan(0,-1),t.preventDefault();break;case im.RIGHT:this._pan(1,0),t.preventDefault();break;case im.LEFT:this._pan(-1,0),t.preventDefault()}};var ug,dg=fg;function fg(t,e){ug.call(this),this.element=t,this._initOptions(e);var t=cg("up",e.icons),o=cg("right",e.icons),i=cg("down",e.icons),e=cg("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(o),this.element.appendChild(i),this.element.appendChild(e),ht(this.element,"k-widget k-navigator"),Wf(this.element,"click",".k-button",Gf(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=Gf(this._keydown,this),Wf(this._keyroot,"keydown",this._keydownHandler)}function gg(t,e,o){t='<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+se({icon:e,iconClass:"k-button-icon",svgIcons:o.svgIcons,type:o.type})+"</button>";return Df(t)}e(dg,{name:"Navigator",panStep:1}),Yf(dg,["pan"]),(yg=p)&&(mg.__proto__=yg),((mg.prototype=Object.create(yg&&yg.prototype)).constructor=mg).prototype.destroy=function(){this.element&&Xf(this.element,"click",this._clickHandler),this._keyroot&&Xf(this._keyroot,"keydown",this._keydownHandler)},mg.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},mg.prototype._initOptions=function(t){this.options=x({},this.options,t)},mg.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},mg.prototype._click=function(t){var e=1;Ot(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},mg.prototype._keydown=function(t){switch(t.which){case im.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case im.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var yg,vg=mg;function mg(t,e,o){yg.call(this),this.element=t,this._initOptions(e);t=gg("in","plus",o),e=gg("out","minus",o),this.element.appendChild(t),this.element.appendChild(e),ht(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Wf(this.element,"click",".k-button",this._clickHandler),o=this.element.parentNode.closest("[data-role]");this._keyroot=o||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Wf(this._keyroot,"keydown",this._keydownHandler)}e(vg,{name:"ZoomControl",zoomStep:1}),Yf(vg,["change"]);var xg,_g,_u,bg=(_u=Math).max,wg=_u.min,Cg=((_g=A.Class)&&(Pg.__proto__=_g),bu={World:{configurable:!0}},((Pg.prototype=Object.create(_g&&_g.prototype)).constructor=Pg).prototype.contains=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),r=O(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},Pg.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new gf(e,o)},Pg.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},Pg.prototype.include=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),t=O(t.lat,t[0]);e.lng=wg(e.lng,i),e.lat=bg(e.lat,t),o.lng=bg(o.lng,i),o.lat=wg(o.lat,t)},Pg.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Pg.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new gf(t.lat,e.lng),se:this.se,sw:new gf(e.lat,t.lng)}},Pg.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new gf(t.lat,e.lng),e,new gf(e.lat,t.lng)]},Pg.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Pg.create=function(t,e){return t instanceof Pg?t:t&&e?new Pg(t,e):t&&4===t.length&&!e?new Pg([t[0],t[1]],[t[2],t[3]]):void 0},bu.World.get=function(){return new Pg([90,-180],[-90,180])},Object.defineProperties(Pg,bu),Pg),Sg="centerChange",kg=((xg=A.Class)&&(Ag.__proto__=xg),wu={anchor:{configurable:!0}},((Ag.prototype=Object.create(xg&&xg.prototype)).constructor=Ag).prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},Ag.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},wu.anchor.get=function(){return this._anchor},wu.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},Ag.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(Ag.prototype,wu),Ag);function Ag(t,e){xg.call(this),this.widgetService=t,this.options=x({},this.options,e),this.offset={x:0,y:0}}function Pg(t,e){_g.call(this);t=gf.create(t),e=gf.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}e(kg,{border:{width:1},opacity:1}),(Tg=A.Class)&&(Rg.__proto__=Tg),((Rg.prototype=Object.create(Tg&&Tg.prototype)).constructor=Rg).prototype.destroy=function(){this._deactivate()},Rg.prototype._initOptions=function(t){this.options=x({},this.options,t)},Rg.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Rg.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Rg.prototype.reset=function(){this._beforeReset(),this._reset()},Rg.prototype._reset=function(){this._applyExtent()},Rg.prototype._beforeReset=function(){},Rg.prototype._resize=function(){},Rg.prototype._panEnd=function(){this._applyExtent()},Rg.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!T(t.minZoom)||e>=t.minZoom,e=!T(t.maxZoom)||e<=t.maxZoom,t=Cg.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Rg.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Rg.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},Rg.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},Rg.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Rg.prototype._readData=function(){return this.options.data||[]},Rg.prototype._hasData=function(){return this._data&&0<this._data.length},Rg.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Tg,xu=Rg,Mg=Math,Og=A.geometry.Point,Bg,c;function Rg(t,e){Tg.call(this),this.support=ig(),this._initOptions(e),this.map=t;e=document.createElement("div");ht(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function Ig(t){return yt(t)?t:$v.compile(t)}function Eg(t){var e=t;return"string"!=typeof t&&(e+="px"),e}function Lg(t,e){Bg.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}(Bg=xu)&&(Lg.__proto__=Bg),((Lg.prototype=Object.create(Bg&&Bg.prototype)).constructor=Lg).prototype.destroy=function(){Bg.prototype.destroy.call(this),this._view.destroy(),this._view=null},Lg.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Lg.prototype._reset=function(){Bg.prototype._reset.call(this),this._updateView(),this._view.reset()},Lg.prototype._viewType=function(){return Vg},Lg.prototype._activate=function(){Bg.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,A.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Lg.prototype._deactivate=function(){Bg.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Lg.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),o={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},Lg.prototype._resize=function(){this._render()},Lg.prototype._panEnd=function(t){Bg.prototype._panEnd.call(this,t),this._render()},Lg.prototype._render=function(){this._updateView(),this._view.render()},e(c=Lg,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1}),(jg=A.Class)&&(Ug.__proto__=jg),((Ug.prototype=Object.create(jg&&jg.prototype)).constructor=Ug).prototype._initOptions=function(t){this.options=x({},this.options,t)},Ug.prototype.center=function(t){this._center=t},Ug.prototype.extent=function(t){this._extent=t},Ug.prototype.viewOrigin=function(t){this._viewOrigin=t},Ug.prototype.zoom=function(t){this._zoom=t},Ug.prototype.pointToTileIndex=function(t){return new Og(Mg.floor(t.x/this.options.tileSize),Mg.floor(t.y/this.options.tileSize))},Ug.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,e=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Mg.ceil((Mg.abs(e.x)+t.width)/this.options.tileSize),y:Mg.ceil((Mg.abs(e.y)+t.height)/this.options.tileSize)}},Ug.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},Ug.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Og(e*this.options.tileSize,t*this.options.tileSize)},Ug.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},Ug.prototype.destroy=function(){Of(this.element),this.pool.empty()},Ug.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},Ug.prototype.render=function(){for(var t,e,o=this.tileCount(),i=this.pointToTileIndex(this._extent.nw),r=0;r<o.x;r++)for(e=0;e<o.y;e++)(t=this.createTile({x:i.x+r,y:i.y+e})).visible||t.show()},Ug.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},Ug.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,i=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:new Og(M((e=i).x),M(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},Ug.prototype.wrapIndex=function(t){var e=Mg.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},Ug.prototype.wrapValue=function(t,e){var o=Mg.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var zg,jg,Vg=Ug,Dg=((zg=A.Class)&&(Hg.__proto__=zg),((Hg.prototype=Object.create(zg&&zg.prototype)).constructor=Hg).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Hg.prototype._initOptions=function(t){this.options=x({},this.options,t)},Hg.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},Hg.prototype.show=function(){var t=this.element,e=(t.style.top=Eg(this.options.offset.y),t.style.left=Eg(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Hg.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Hg.prototype.url=function(){return Ig(this.options.urlTemplate)(this.urlOptions())},Hg.prototype.errorUrl=function(){return Ig(this.options.errorUrlTemplate)(this.urlOptions())},Hg.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},Hg);function Hg(t,e){zg.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function Ug(t,e){jg.call(this),this.element=t,this._initOptions(e),this.pool=new Ng}e(Dg,{urlTemplate:"",errorUrlTemplate:""}),(Fg=A.Class)&&(Gg.__proto__=Fg),((Gg.prototype=Object.create(Fg&&Fg.prototype)).constructor=Gg).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},Gg.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},Gg.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},Gg.prototype._create=function(t){for(var e,o=this._items,i=qt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new Dg(i,t),this._items.push(e)),e},Gg.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);o<n&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))};var Fg,Ng=Gg;function Gg(){Fg.call(this),this._items=[]}function Wg(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}e(Ng,{maxSize:100});var Xg,qg,Yg,Zg,Qg,Kg,$g,Jg=Object.assign,ty="change",ey=(($g=p)&&(fy.__proto__=$g),((fy.prototype=Object.create($g&&$g.prototype)).constructor=fy).prototype.captureNext=function(){this.capture=!0},fy.prototype.cancelCapture=function(){this.capture=!1},fy.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},fy.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},fy),oy=((Kg=p)&&(dy.__proto__=Kg),((dy.prototype=Object.create(Kg&&Kg.prototype)).constructor=dy).prototype.makeVirtual=function(){Jg(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},dy.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},dy.prototype.outOfBounds=function(t){return t>this.max||t<this.min},dy.prototype.forceEnabled=function(){this.forcedEnabled=!0},dy.prototype.getSize=function(){return this.container[this.measure]},dy.prototype.getTotal=function(){return this.element[this.scrollSize]},dy.prototype.rescale=function(t){this.scale=t},dy.prototype.update=function(t){var e=this,o=e.virtual?e._virtualMax:e.getTotal(),i=o*e.scale,r=e.getSize();0===o&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=i,e.min=Math.min(e.max,r-i),e.minScale=r/o,e.centerOffset=(i-r)/2,e.enabled=e.forcedEnabled||r<i,t)||e.trigger(ty,e)},dy),iy=((Qg=p)&&(uy.__proto__=Qg),((uy.prototype=Object.create(Qg&&Qg.prototype)).constructor=uy).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},uy.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},uy.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(ty)},uy),ry=((Zg=p)&&(cy.__proto__=Zg),((cy.prototype=Object.create(Zg&&Zg.prototype)).constructor=cy).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},cy.prototype.dragMove=function(t){var e,o=this.dimension,i=this.axis,r=this.movable,n=r[i]+t;o.enabled&&(e=t,(n<o.min&&t<0||n>o.max&&0<t)&&(e*=this.resistance),r.translateAxis(i,e),this.trigger(ty,this))},cy),ny=((Yg=A.Class)&&(ly.__proto__=Yg),(ly.prototype=Object.create(Yg&&Yg.prototype)).constructor=ly),sy=((qg=p)&&(hy.__proto__=qg),((hy.prototype=Object.create(qg&&qg.prototype)).constructor=hy).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},hy.prototype.scaleTo=function(t){this.scale=t,this.refresh()},hy.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},hy.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},hy.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},hy.prototype.moveTo=function(t){Jg(this,t),this.refresh()},hy.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=Wg(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(ty))},hy.prototype._saveCoordinates=function(t){this.coordinates=t},hy),ay=A.drawing.Group,Au;function py(t,e){Xg.call(this,t,e),this._pan=Gf(this._pan,this),this.surface=A.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new sy(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}function hy(t){qg.call(this);var e=this,t=(e.support=ig(),this.transformStyle=this.support.transitions.prefix+"Transform",e.element=t,e.element.style.webkitTransformOrigin="left top",e.x=0,e.y=0,e.scale=1,Wg(e.x,e.y,e.scale));e.element.style[this.transformStyle]=t,e._saveCoordinates(t)}function ly(t){Yg.call(this);var s,a,p,h=this;Jg(h,{elastic:!0},t),t=h.elastic?.5:0,p=h.movable,h.x=s=new ry({axis:"x",dimension:h.dimensions.x,resistance:t,movable:p}),h.y=a=new ry({axis:"y",dimension:h.dimensions.y,resistance:t,movable:p}),h.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){h.gesture=t,h.offset=Nt(h.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=h.gesture,o=e.center,i=t.center,e=t.distance/e.distance,r=h.dimensions.minScale,n=h.dimensions.maxScale,r=(p.scale<=r&&e<1&&(e+=.8*(1-e)),p.scale*e>=n&&(e=n/p.scale),p.x+h.offset.left),n=p.y+h.offset.top,r={x:(r-o.x)*e+i.x-r,y:(n-o.y)*e+i.y-n};p.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),h.dimensions.rescale(p.scale),(h.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function cy(t){Zg.call(this),Jg(this,t)}function uy(t){Qg.call(this);this.x=new oy(Jg({horizontal:!0},t)),this.y=new oy(Jg({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(ty,t)}function dy(t){Kg.call(this);var e=this;e.forcedEnabled=!1,Jg(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function fy(t,e){$g.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,og(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,Gf(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,Gf(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,Gf(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,Gf(o._release,o))})),o.bind(["press","release"],e||{})}(Xg=xu)&&(py.__proto__=Xg),((py.prototype=Object.create(Xg&&Xg.prototype)).constructor=py).prototype.destroy=function(){Xg.prototype.destroy.call(this),this.surface.destroy()},py.prototype._reset=function(){Xg.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},py.prototype._initRoot=function(){this._root=new ay,this.surface.draw(this._root)},py.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},py.prototype._resize=function(){this.surface.size(this.map.size())},py.prototype._readData=function(){var t=Xg.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},py.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new vy(this.map,this.options.style,this));for(var e=new ay,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},py.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof A.drawing.Circle&&this.map.options.renderPointsAsMarkers?T(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},py.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},py.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},py.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},py.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},py.prototype._panEnd=function(t){Xg.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},py.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},py.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},py.prototype._handler=function(e){var o=this;return function(t){t.element&&o.map.trigger(e,o._eventArgs(t))}},py.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},py.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},py.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},py.prototype._activate=function(){Xg.prototype._activate.call(this),this._panHandler=Gf(this._pan,this),this.map.bind("pan",this.panHandler)},py.prototype._deactivate=function(){Xg.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e(Au=py,{autoBind:!0,zIndex:100}),(yy=A.Class)&&(xy.__proto__=yy),((xy.prototype=Object.create(yy&&yy.prototype)).constructor=xy).prototype.parse=function(t){var e=new ay,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=o&&e.children.length<2?e.children[0]:e},xy.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},xy.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},xy.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},xy.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Yt(e).anchor()))&&(t.options.fill=null)},xy.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},xy.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},xy.prototype._buildPolygon=function(t){for(var e=new(1<t.length?A.drawing.MultiPath:A.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(gf.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},xy.prototype._loadPoint=function(t,e,o){var e=gf.fromLngLat(e),i=this.locator.locationToView(e),i=new A.geometry.Circle(i,10),i=new A.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var gy,yy,vy=xy,t;function my(){gy.apply(this,arguments)}function xy(t,e,o){yy.call(this),this.observer=o,this.locator=t,this.style=e}(gy=Au)&&(my.__proto__=gy),((my.prototype=Object.create(gy&&gy.prototype)).constructor=my).prototype._readData=function(){return this.options.data||[]},my.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=Tt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=Tt(this.options.locationField),s=0;s<i.length;s++){var a,p,h,l=i[s],c=n(l),u=o(l);T(c)&&T(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=gf.create(c),h=this.map.locationToView(c),p=a.map(u),(h=this._createSymbol({center:h,size:p,style:e.style,dataItem:l,location:c})).dataItem=l,h.location=c,h.value=u,this._drawSymbol(h))}}},my.prototype._scaleType=function(){var t=this.options.scale;return yt(t)?t:wy[t]},my.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=yt(e)?e:Cy[e])(t)},my.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},my.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},my.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},e(t=my,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var _y,by,wy={sqrt:((by=A.Class)&&(By.__proto__=by),((By.prototype=Object.create(by&&by.prototype)).constructor=By).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},By)},Cy={circle:function(t){var e=new A.geometry.Circle(t.center,t.size/2);return new A.drawing.Circle(e,t.style)},square:function(t){var e=new A.drawing.Path(t.style),o=t.size/2,t=t.center;return e.moveTo(t.x-o,t.y-o).lineTo(t.x+o,t.y-o).lineTo(t.x+o,t.y+o).lineTo(t.x-o,t.y+o).close(),e}},Sy="mouseenter",ky="mouseleave",Ay=Object.assign,Py="k-marker",Ty="."+Py,My=((_y=xu)&&(Oy.__proto__=_y),((Oy.prototype=Object.create(_y&&_y.prototype)).constructor=Oy).prototype.destroy=function(){_y.prototype.destroy.call(this),Xf(this.element,"click",this._markerClickHandler),this.clear()},Oy.prototype.add=function(t){if(!pt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Oy.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Oy.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Oy.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Oy.prototype._reset=function(){_y.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Oy.prototype.bind=function(t,e){t=Iy.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Oy.prototype._addOne=function(t){t=Iy.create(t,this.options);return t.addTo(this),t},Oy.prototype._readData=function(){return this.options.data||[]},Oy.prototype._load=function(t){this._data=t,this.clear();for(var e=Tt(this.options.locationField),o=Tt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Oy.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},Oy.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Oy.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Oy.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Ay({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Oy);function Oy(t,e){_y.call(this,t,e),this._markerClickHandler=Gf(this._markerClick,this),Wf(this.element,"click",Ty,this._markerClickHandler),this.items=[],this._load(this._readData())}function By(t,e){by.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}e(My,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""}),(Ry=A.Class)&&(Ly.__proto__=Ry),((Ly.prototype=Object.create(Ry&&Ry.prototype)).constructor=Ly).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Ly.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Ly.prototype.location=function(t){return t?(this.options.location=gf.create(t).toArray(),this.layer&&this.layer.update(this),this):gf.create(this.options.location)},Ly.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=If(this._anchor.left),this.element.style.top=If(this._anchor.top)},Ly.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},Ly.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Gf(this._mouseEnter,this),Wf(this.element,Sy,Ty,this._mouseEnterHandler),this._mouseLeaveHandler=Gf(this._mouseLeave,this),Wf(this.element,ky,Ty,this._mouseLeaveHandler))},Ly.prototype.unbindEvents=function(){this.element&&(Xf(this.element,Sy,this._mouseEnterHandler),Xf(this.element,ky,this._mouseLeaveHandler))},Ly.prototype.render=function(){var t,e,o,i,r;this.element||(t=this.options,e=this.layer,ht(o=document.createElement("span"),Py),this.options.template?(i=this._compileTemplate(this.options.template)(this.dataItem),i=Df(i),o.appendChild(i)):t.svgIcon?se(o,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(i={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(i.icon="map-marker-target",se(o,i)):"pin"===t.shape?se(o,i):ht(o,"k-icon k-icon-xxl k-i-marker-"+Rf(t.shape||"pin")):se(o,i)),t.title&&o.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){o.setAttribute(t,r[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents())},Ly.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},Ly.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},Ly.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Ly.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Ly.prototype._compileTemplate=function(t){return $v.compile(t,{paramName:"dataItem",useWithBlock:!1})},Ly.create=function(t,e){return t instanceof Ly?t:new Ly(x({},e,t))};var Ry,Iy=Ly,Ey=Object.assign;function Ly(t){Ry.call(this),this.options=t||{}}function zy(t){window.requestAnimationFrame(t)}function jy(t){t.preventDefault()}(Dy=A.Class)&&(Jy.__proto__=Dy),((Jy.prototype=Object.create(Dy&&Dy.prototype)).constructor=Jy).prototype.tick=function(){},Jy.prototype.done=function(){},Jy.prototype.onEnd=function(){},Jy.prototype.onCancel=function(){},Jy.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,zy(this._tickProxy)))},Jy.prototype.enabled=function(){return!0},Jy.prototype.cancel=function(){this._started=!1,this.onCancel()},Jy.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):zy(this._tickProxy))};var Vy,Dy,vh,Hy=((Vy=vh=Jy)&&($y.__proto__=Vy),(($y.prototype=Object.create(Vy&&Vy.prototype)).constructor=$y).prototype.done=function(){return this.timePassed()>=this.duration},$y.prototype.timePassed=function(){return Math.min(this.duration,Zf()-this.startDate)},$y.prototype.moveTo=function(t){var e=this,o=e.movable;e.initial=o[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=Zf(),e.start()},$y.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},$y.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},$y),Uy=Object.assign,Fy=800,Ny=0,Gy="move",Wy="tap",Xy="doubleTap",qy="release",Yy="gesturechange",Zy="gestureend",Qy="gesturetap",Ky={api:0,touch:0,mouse:9,pointer:9};function $y(t){Vy.call(this),Ey(this,t)}function Jy(){Dy.call(this);this._tickProxy=Gf(this._tick,this),this._started=!1}function tv(t){var e,o,i,r=ig(),n=[],s=t.originalEvent||t,a=t.currentTarget,p=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;p<e;p++)i=o[p],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}(ov=A.Class)&&(sv.__proto__=ov),((sv.prototype=Object.create(ov&&ov.prototype)).constructor=sv).prototype.move=function(t){var e=this,o=t["page"+e.axis],i=Zf(),r=i-e.timeStamp||1;!o&&this.invalidZeroEvents||(e.delta=o-e.location,e._updateLocationData(t),e.initialDelta=o-e.startLocation,e.velocity=e.delta/r,e.timeStamp=i)},sv.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var ev,ov,iv=sv,rv=((ev=A.Class)&&(nv.__proto__=ev),((nv.prototype=Object.create(ev&&ev.prototype)).constructor=nv).prototype.press=function(){this._holdTimeout=setTimeout(Gf(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},nv.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(Wy,t):e._trigger(Xy,t),e.userEvents._clicks=0},300))},nv.prototype._hold=function(){this._trigger("hold",this.pressEvent)},nv.prototype.move=function(t){var e=this,o="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!o){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(fv.current&&fv.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(Gy,t)}},nv.prototype.end=function(t){this.endTime=Zf(),this._finished||(this._finished=!0,this._trigger(qy,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(Wy,t)),clearTimeout(this._holdTimeout),this.dispose())},nv.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},nv.prototype.skip=function(){this.dispose()},nv.prototype.cancel=function(){this.dispose()},nv.prototype.isMoved=function(){return this._moved},nv.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Zf(),this._moved=!0,this._trigger("start",t)},nv.prototype._trigger=function(t,e){var e=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,o)&&e.preventDefault()},nv.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},nv);function nv(t,e,o){ev.call(this),Uy(this,{x:new iv("X",o.location),y:new iv("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||Ky[o.type],userEvents:t,target:e,currentTarget:o.currentTarget,initialTouch:o.target,id:o.id,pressEvent:o,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function sv(t,e){ov.call(this);this.support=ig(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=Zf()}function av(t){for(var e=og(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(dv=p)&&(Tv.__proto__=dv),((Tv.prototype=Object.create(dv&&dv.prototype)).constructor=Tv).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Tv.prototype.destroy=function(){var e,o=this,t=this.options,i=this.element;o._destroyed||(o._destroyed=!0,o.captureUpIfMoved&&this.support.eventCapture&&(e=o.surface,av(function(t){e.removeEventListener(t,o.preventIfMoving)})),Xf(o.surface,qf("move"),this._surfaceMoveHandler),Xf(o.surface,qf("up cancel"),this._surfaceEndHandler),Xf(i,qf("down"),this._elementStartHandler),o.useClickAsTap&&Xf(i,qf("click"),this._elementClickHandler),t.preventDragEvent&&Xf(i,qf("dragstart"),this._elementDragStartHandler),Xf(i,qf("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Tv.prototype.capture=function(){Tv.current=this},Tv.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Tv.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case Gy:a=Yy;break;case"end":a=Zy;break;case Wy:a=Qy}Uy(e,{touches:s},(t=s[0],s=s[1],o=t.x.location,t=t.y.location,r=o-(i=s.x.location),n=t-(s=s.y.location),{center:{x:(o+i)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,Uy(e,{type:a}))},Tv.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Tv.prototype.move=function(t,e){this._apiCall("_move",t,e)},Tv.prototype.end=function(t,e){this._apiCall("_end",t,e)},Tv.prototype._isMultiTouch=function(){return 1<this.touches.length},Tv.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Tv.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Tv.prototype._isMoved=function(){return Mt(this.touches,function(t){return t.isMoved()}).length},Tv.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Tv.prototype._start=function(t){var e,o,i=this,r=0,n=i.filter,s=tv(t),a=s.length,p=t.which;if(!(p&&1<p||i._maxTouchesReached()))for(Tv.current=null,i.currentTarget=t.currentTarget,i.stopPropagation&&t.stopPropagation();r<a&&!i._maxTouchesReached();r++)o=s[r],(e=n?o.currentTarget:i.element)&&0===e.length||(o=new rv(i,e,o),i.touches.push(o),o.press(),i._isMultiTouch()&&i.notify("gesturestart",{}))},Tv.prototype._move=function(t){this._eachTouch("move",t)},Tv.prototype._end=function(t){this._eachTouch("end",t)},Tv.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:Zf(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Tv.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=tv(e),a=this.touches,p=0;p<a.length;p++)n[(o=a[p]).id]=o;for(p=0;p<s.length;p++)(r=n[(i=s[p]).id])&&r[t](i)},Tv.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:Qf,preventDefault:Qf})},Tv.defaultThreshold=function(t){Ny=t},Tv.minHold=function(t){Fy=t};var pv,hv,lv,cv,uv,dv,fv=Tv,gv=Object.assign,yv=Math.abs,vv="change",mv=((uv=vh)&&(Pv.__proto__=uv),((Pv.prototype=Object.create(uv&&uv.prototype)).constructor=Pv).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Pv.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Pv.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Pv.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Pv),xv=((cv=vh)&&(Av.__proto__=cv),((Av.prototype=Object.create(cv&&cv.prototype)).constructor=Av).prototype.onCancel=function(){this.transition.cancel()},Av.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Av.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Av.prototype.done=function(){return yv(this.velocity)<1},Av.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),cv.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),cv.prototype.start.call(this)))},Av.prototype.tick=function(){var t=this,e=t.dimension,o=t.paneAxis.outOfBounds()?.5:t.friction,o=t.velocity*=o,o=t.movable[t.axis]+o;!t.elastic&&e.outOfBounds(o)&&(o=Math.max(Math.min(o,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,o)},Av.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Av.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Av.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Hy.easeOutExpo})},Av),_v=((lv=vh)&&(kv.__proto__=lv),((kv.prototype=Object.create(lv&&lv.prototype)).constructor=kv).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},kv.prototype.done=function(){return yv(this.offset.y)<5&&yv(this.offset.x)<5},kv.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},kv.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},kv.prototype.setCallback=function(t){t&&yt(t)&&(this.callback=t)},kv.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},kv),bv=((hv=A.Class)&&(Sv.__proto__=hv),((Sv.prototype=Object.create(hv&&hv.prototype)).constructor=Sv).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,e=o/e.total,i=Math.round(-i[t]*e),r=Math.round(o*e);this.element.style.display=1<=e?"none":"",o<i+r?r=o-i:i<0&&(r+=i,i=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,i)},Sv.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Sv.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Sv),wv=((pv=p)&&(Cv.__proto__=pv),((Cv.prototype=Object.create(pv&&pv.prototype)).constructor=Cv).prototype._initOptions=function(t){this.options=x({},this.options,t)},Cv.prototype._wheelScroll=function(t){var e,o,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),o=t.originalEvent||t,i=o.wheelDeltaY,o.wheelDelta?void 0!==i&&!i||(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},Cv.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Cv.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Cv.prototype.height=function(){return this.dimensions.y.size},Cv.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Cv.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Cv.prototype._resize=function(){this._native||this.contentResized()},Cv.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Cv.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Cv.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},Cv.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Cv.prototype.enable=function(){this.enabled=!0},Cv.prototype.disable=function(){this.enabled=!1},Cv.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(yv(t)),this.scrollElement.scrollTop(yv(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Cv.prototype.animatedScrollTo=function(t,e,o){var i;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(i,{x:t,y:e}),this.animatedScroller.setCallback(o),this.animatedScroller.start())},Cv.prototype.pullHandled=function(){},Cv.prototype.destroy=function(){var t=this.element;Xf(t,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Cv.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Cv.prototype._initPullToRefresh=function(){},Cv.prototype._dragEnd=function(){},Cv.prototype._paneChange=function(){},Cv.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new bv({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(vv,function(){s.refresh()}),n.bind(vv,function(){s.show()}),e[t+"inertia"]=new xv({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},Cv);function Cv(t,e){pv.call(this);var s=this;this.element=t,this._initOptions(e);e=navigator.userAgent;e=(e=Hf(e)).ios||e.android,s._native=s.options.useNative&&e,e=Df('<div class="km-scroll-header"/>');if(s._native)ht(t,"km-native-scroller"),Bf(e,t),gv(s,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",ht(t,"km-scroll-wrapper");var o=t,i=Df('<div class="km-scroll-container"/>');for(o.appendChild(i);o.firstChild!==i;)i.appendChild(o.firstChild);Bf(e,t);var e=t.children[1],r=new ey(t),n=new sy(e),a=new iy({element:e,container:t,forcedEnabled:s.options.zoom}),p=this.options.avoidScrolling,h=new fv(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:s.options.zoom,supportDoubleTap:s.options.supportDoubleTap,start:function(t){a.refresh();var e=yv(t.x.velocity),o=yv(t.y.velocity),i=o<=2*e;r=s.fixedContainer,n=t.event.target;var r,n,e=e<=2*o;!(r===n||function(t){if(n)for(var e=n.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(r))&&!p(t)&&s.enabled&&(a.x.enabled&&i||a.y.enabled&&e)?h.capture():h.cancel()}}),l=new ny({movable:n,dimensions:a,userEvents:h,elastic:s.options.elastic}),c=new mv({movable:n,dimensions:a,userEvents:h,tapCapture:r}),u=new _v({moveTo:function(t){s.scrollTo(t.x,t.y)}});n.bind(vv,function(){s.scrollTop=-n.y,s.scrollLeft=-n.x,s.trigger("scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),s.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Wf(t,"wheel",this._wheelScrollHandler)),gv(s,{movable:n,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:h,pane:l,tapCapture:r,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),s._initAxis("x"),s._initAxis("y"),s._wheelEnd=function(){s._wheel=!1,s.userEvents.end(0,s._wheelY)},a.refresh(),s.options.pullToRefresh&&s._initPullToRefresh()}}function Sv(t){hv.call(this);var e="x"===t.axis,o=Df('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');gv(this,t,{element:o,elementSize:0,movable:new sy(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(vv,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function kv(t){lv.call(this,t),gv(this,t,{origin:{},destination:{},offset:{}})}function Av(t){cv.call(this);var e=this;gv(e,t,{transition:new Hy({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",Gf(e.start,e)),e.userEvents.bind("gestureend",Gf(e.start,e)),e.userEvents.bind("tap",Gf(e.onEnd,e))}function Pv(t){uv.call(this,t);gv(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Tv(t,e){dv.call(this);var o,i,r,n=this,s=ig(),a=(this.support=s,this.options=e=e||{},o=n.filter=e.filter,n.threshold=e.threshold||Ny,n.minHold=e.minHold||Fy,n.touches=[],n._maxTouches=e.multiTouch?2:1,n.allowSelection=e.allowSelection,n.captureUpIfMoved=e.captureUpIfMoved,n.useClickAsTap=!e.fastTap&&!s.delayedClick(),n._clicks=0,n.supportDoubleTap=e.supportDoubleTap,!s.touch||s.mouseAndTouchPresent);Uy(n,{element:t,surface:e.global&&a?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=Gf(this._move,this),Wf(n.surface,qf("move"),this._surfaceMoveHandler),this._surfaceEndHandler=Gf(this._end,this),Wf(n.surface,qf("up cancel"),this._surfaceEndHandler),this._elementStartHandler=Gf(this._start,this),Wf(t,qf("down"),o,this._elementStartHandler),n.useClickAsTap&&(this._elementClickHandler=Gf(this._click,this),Wf(t,qf("click"),o,this._elementClickHandler)),(s.pointers||s.msPointers)&&(s.browser.version<11?(a="pinch-zoom double-tap-zoom",t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?a+" "+e.touchAction:a):t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=jy,Wf(t,qf("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=Gf(this._select,this),Wf(t,qf("mousedown"),o,this._elementSelectHandler),n.captureUpIfMoved&&s.eventCapture&&(i=n.surface,r=Gf(n.preventIfMoving,n),av(function(t){i.addEventListener(t,r,!0)})),n.bind(["press","hold",Wy,Xy,"start",Gy,"end",qy,"cancel","gesturestart",Yy,Zy,Qy,"select"],e)}function Mv(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}e(wv,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),Yf(wv,["pull","scroll","resize"]),Mv.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const $1=Mv;var Ov,Bv=Math,Rv=Bv.min,Iv=Bv.pow,Ev=A.geometry.Point,Lv="marker",zv="location",jv={bubble:t,shape:Au,tile:c},Z;function R(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Ov.call(this),this._init(t,e,o,i)}jv[Lv]=My,(Ov=p)&&(R.__proto__=Ov),((R.prototype=Object.create(Ov&&Ov.prototype)).constructor=R).prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),pt(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();Xf(this.element,"wheel",this._mousewheelHandler),Ov.prototype.destroy.call(this)},R.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=ig(),this.context=i,this.initObserver(i),this.initServices(i),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new jf,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,A.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Wf(this.element,"wheel",this._mousewheelHandler)},R.prototype._initOptions=function(t){this.options=x({},this.options,t)},R.prototype._initElement=function(t){ht(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Of(t);t=Df("<div />");this.element.appendChild(t)},R.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new $1(this,t)},R.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},R.prototype.addObserver=function(t){t&&this.observers.push(t)},R.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},R.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},R.prototype.trigger=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i||Ov.prototype.trigger.call(this,t,e),i},R.prototype._notifyObserver=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},R.prototype.zoom=function(t){var e=this.options,t=T(t)?(t=Bv.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},R.prototype.center=function(t){var e=t?(t=gf.create(t),e=gf.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Sg,{center:this.options.center}),this._reset()),this):gf.create(this.options.center);return e},R.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},R.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Of(e),this._init(e,t,{},this.context),this._reset()},R.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=gf.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},R.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=Ev.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},R.prototype.locationToView=function(t){var t=gf.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},R.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),t=Ev.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},R.prototype.eventOffset=function(t){var e,o=Nt(this.element);return t=t.x&&t.x[zv]||t.y&&t.y[zv]?(e=t.x[zv]-o.left,t.y[zv]-o.top):(t=t.originalEvent||t,e=O(t.pageX,t.clientX)-o.left,O(t.pageY,t.clientY)-o.top),new A.geometry.Point(e,t)},R.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},R.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},R.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},R.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return{width:o=this.options.wraparound?o:Rv(e,o),height:Rv(e,t.clientHeight)}},R.prototype.exportVisual=function(){return this._reset(),!1},R.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},R.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=gf.create(t);return(t=this.locationToLayer(t,e)).x+=o.width/2,t.y+=o.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(Sg,{center:this.options.center}),this},R.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},R.prototype._setExtent=function(t){var e=Cg.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Cg(e.nw,o));this.center(i.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(i.nw,s),p=this.locationToLayer(i.se,s),h=Bv.abs(p.x-a.x),p=Bv.abs(p.y-a.y);if(h<=r&&p<=n)break}this.zoom(s)},R.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize(),o=(e.x+=o.width,e.y+=o.height,this.layerToLocation(e));return new Cg(t,o)},R.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},R.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},R.prototype._createControlElement=function(t,e){var o,t=t.position||e,e="."+Kf(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(ht(o=document.createElement("div"),"k-map-controls "+Kf(t)),this.element.appendChild(e=o)),document.createElement("div"));return e.appendChild(t),t},R.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new ag(e,t)},R.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new dg(e,x({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},R.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,i=this.element.clientWidth,r=this.element.clientHeight,o=_(o,t.x.min,t.x.max-i),e=_(e,t.y.min,t.y.max-r);this.scroller.one("scroll",Gf(this._scrollEnd,this)),this.scroller.scrollTo(-o,-e)},R.prototype._navigatorCenter=function(){this.center(this.options.center)},R.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new vg(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},R.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},R.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new wv(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",Gf(this._scroll,this)),t.bind("scrollEnd",Gf(this._scrollEnd,this)),t.userEvents.bind("gesturestart",Gf(this._scaleStart,this)),t.userEvents.bind("gestureend",Gf(this._scale,this)),t.userEvents.bind("doubleTap",Gf(this._doubleTap,this)),t.userEvents.bind("tap",Gf(this._tap,this)),this.scrollElement=t.scrollElement},R.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],i=this._createLayer(i);e.push(i)}},R.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],o=e===Lv?x({},this.options.markerDefaults,t,{icons:this.options.icons}):x({},o,t),t=new jv[e](this,o);return e===Lv&&(this.markers=t),t},R.prototype._createTooltip=function(){return new kg(this.widgetService,this.options.tooltip)},R.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===Lv}).length||(this.markers=new My(this,x({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},R.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,o=new A.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._tooltip.offset=o,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},R.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Zf(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},R.prototype._panComplete=function(){return 50<Zf()-(this._panEndTimestamp||0)},R.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},R.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),o=new A.geometry.Point(t.center.x,t.center.y),i=this.viewToLocation(o,e),i=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t})},R.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Bv.log(t)/Bv.log(2);return Bv.round(t)},R.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},R.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=Iv(2,this.options.minZoom-n),t.dimensions.maxScale=Iv(2,this.options.maxZoom-n),{min:-r.x,max:i-r.x}),n={min:-r.y,max:i-r.y};this.options.wraparound&&(t.max=20*i,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(t.min,t.max),o.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},R.prototype._renderLayers=function(){},R.prototype._layerSize=function(t){t=O(t,this.options.zoom);return this.options.minSize*Iv(2,t)},R.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},R.prototype._doubleTap=function(t){var e,o,i;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},R.prototype._mousewheel=function(t){var e=0<Vt(t)?-1:1,o=this.options,i=this.zoom(),e=_(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},R.prototype._toDocumentCoordinates=function(t){var e=Nt(this.element);return{left:M(t.x+e.left),top:M(t.y+e.top)}},e(Z=R,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),Yf(Z,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const J1=Z;var Vv=1.5,Dv=.4,Hv="#000",s,Uv="11px "+(s="Arial, Helvetica, sans-serif"),Fv="12px "+s,Nv="16px "+s,Gv="transparent",Wv="#fff",Xv=function(){return{icon:{border:{width:1}},label:{font:Fv,padding:3},line:{length:10,width:2},visible:!0}},qv=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Wv,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}}},Yv=function(){return{gap:Vv,spacing:Dv,target:{color:"#ff0000"}}},Zv=function(){return{gap:.5,line:{color:Hv,width:1},spacing:Dv}},Qv=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}}},Kv=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Fv},notes:Xv(),title:{font:Nv,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:Uv},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:Vv,spacing:Dv},boxPlot:qv(),bubble:{border:{width:0},labels:{background:Gv},opacity:.6},bullet:Yv(),candlestick:{border:{_brightness:.8,width:1},downColor:Wv,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Hv,width:1},spacing:.3},column:{gap:Vv,spacing:Dv},heatmap:{labels:{color:"",background:Gv,visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},pyramid:Qv(),horizontalWaterfall:Zv(),line:{width:2},notes:Xv(),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:Vv,spacing:Dv},rangeColumn:{gap:Vv,spacing:Dv},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:qv(),verticalBullet:Yv(),verticalLine:{width:2},waterfall:Zv()},title:{font:Nv},subtitle:{font:Fv},legend:{labels:{font:Fv}}}}}return U})())}}});
|
|
1
|
+
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var h_={};return{setters:[function(t){h_.Class=t.Class,h_.Color=t.Color,h_.drawing=t.drawing,h_.geometry=t.geometry,h_.logToConsole=t.logToConsole,h_.parseColor=t.parseColor,h_.support=t.support,h_.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var z={100:t=>{t.exports=h_}},V={};function j(t){var e=V[t];return void 0!==e||(e=V[t]={exports:{}},z[t](e,e.exports,j)),e.exports}j.d=(t,e)=>{for(var o in e)j.o(e,o)&&!j.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},j.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),j.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var D,H,F={};{j.r(F),j.d(F,{Aggregates:()=>Um,ArcGauge:()=>e_,ArcScale:()=>$1,AreaChart:()=>sx,AreaSegment:()=>ix,ArrowLinearPointer:()=>G1,Axis:()=>Pm,AxisGroupRangeTracker:()=>ax,AxisLabel:()=>bm,Bar:()=>hx,BarChart:()=>ux,BarLabel:()=>px,BarLinearPointer:()=>X1,Barcode:()=>i_,Box:()=>E,BoxElement:()=>dm,BoxPlot:()=>gx,BoxPlotChart:()=>vx,BubbleChart:()=>bx,Bullet:()=>Cx,BulletChart:()=>Sx,Candlestick:()=>dx,CandlestickChart:()=>fx,CategoricalChart:()=>qm,CategoricalErrorBar:()=>Xm,CategoricalPlotArea:()=>Xx,CategoryAxis:()=>Tm,Chart:()=>I1,ChartAxis:()=>Dm,ChartContainer:()=>Px,ChartElement:()=>L,ChartPane:()=>Hm,ChartPlotArea:()=>Fm,ChartService:()=>km,CircularGauge:()=>o_,Class:()=>A.Class,ClipAnimation:()=>tx,ClusterLayout:()=>lx,Crosshair:()=>Ax,CrosshairTooltip:()=>kx,CurveProcessor:()=>jm,DateCategoryAxis:()=>Mm,DateValueAxis:()=>Bm,DefaultAggregates:()=>Rx,DomEventsBuilder:()=>Am,DonutChart:()=>d1,DonutPlotArea:()=>f1,DonutSegment:()=>u1,ErrorBarBase:()=>Wm,ErrorRangeCalculator:()=>Gm,Extent:()=>Mg,FloatElement:()=>vm,FontLoader:()=>am,FormatService:()=>Sm,Gauge:()=>H1,Gradients:()=>gm,HashMap:()=>nm,Highlight:()=>qx,InstanceObserver:()=>sm,IntlService:()=>Cm,Legend:()=>Jx,LegendItem:()=>$x,LegendLayout:()=>Kx,LineChart:()=>ox,LinePoint:()=>Qm,LineSegment:()=>Km,LinearGauge:()=>q1,LinearPointer:()=>U1,LinearScale:()=>F1,Location:()=>bf,LogarithmicAxis:()=>Rm,Map:()=>p_,MousewheelZoom:()=>Qx,Navigator:()=>j1,NavigatorHint:()=>V1,Note:()=>wm,NumericAxis:()=>Om,OHLCChart:()=>Ux,OHLCPoint:()=>Fx,Pane:()=>Tx,Pannable:()=>Yx,PieAnimation:()=>r1,PieChart:()=>l1,PieChartMixin:()=>h1,PiePlotArea:()=>c1,PieSegment:()=>p1,PlotAreaBase:()=>Mx,PlotAreaEventsMixin:()=>Ox,PlotAreaFactory:()=>t1,Point:()=>I,PointEventsMixin:()=>Ym,PolarAxis:()=>Lm,QRCode:()=>n_,RadarCategoryAxis:()=>Em,RadarLogarithmicAxis:()=>Vm,RadarNumericAxis:()=>zm,RadialGauge:()=>K1,RadialPointer:()=>Q1,RadialScale:()=>Y1,RangeAreaChart:()=>Hx,RangeAreaPoint:()=>zx,RangeBar:()=>Ix,RangeBarChart:()=>Ex,RangePointer:()=>t_,Ring:()=>lm,RootElement:()=>ym,ScatterChart:()=>xx,ScatterErrorBar:()=>mx,ScatterLineChart:()=>n1,Sector:()=>cm,Selection:()=>e1,SeriesAggregator:()=>Bx,SeriesBinder:()=>Nm,ShapeBuilder:()=>um,ShapeElement:()=>fm,SharedTooltip:()=>i1,Sparkline:()=>L1,SplineAreaSegment:()=>nx,SplineSegment:()=>Jm,StackWrap:()=>cx,StockChart:()=>D1,TemplateService:()=>rm,Text:()=>mm,TextBox:()=>xm,Title:()=>_m,Tooltip:()=>o1,WaterfallChart:()=>Gx,WaterfallSegment:()=>Nx,XYPlotArea:()=>a1,ZoomSelection:()=>Zx,addClass:()=>lt,alignPathToPixel:()=>dt,anyHasZIndex:()=>tn,append:()=>Ft,appendIfNotNull:()=>en,areNumbers:()=>on,autoMajorUnit:()=>Oe,autoTextColor:()=>pm,barcodeValidator:()=>r_,bindEvents:()=>Ut,bindSegments:()=>nn,categoriesCount:()=>sn,chartBaseTheme:()=>im,clockwise:()=>ft,constants:()=>U,convertableToNumber:()=>yt,countNumbers:()=>Mi,createHashSet:()=>Te,createOutOfRangePoints:()=>wn,deepExtend:()=>x,defaultErrorHandler:()=>Me,defined:()=>T,deg:()=>Nt,elementOffset:()=>Gt,elementScale:()=>de,elementSize:()=>Wt,elementStyles:()=>Ct,equalsIgnoreCase:()=>an,evalOptions:()=>hn,eventCoordinates:()=>Xt,eventElement:()=>qt,filterSeriesByType:()=>ln,find:()=>he,findAxisByName:()=>Ai,getDateField:()=>cn,getField:()=>Ri,getSpacing:()=>P,getTemplate:()=>At,getter:()=>Mt,grep:()=>Ot,hasClasses:()=>Bt,hasGradientOverlay:()=>un,hasValue:()=>dn,hashKey:()=>Yt,inArray:()=>u,interpolateValue:()=>It,isArray:()=>ht,isDateAxis:()=>fn,isFunction:()=>vt,isNumber:()=>m,isObject:()=>_t,isPlainObject:()=>zt,isString:()=>gt,keys:()=>hm,last:()=>Zt,limitValue:()=>_,logToConsole:()=>A.logToConsole,map:()=>Vt,mousewheelDelta:()=>Dt,objectKey:()=>Qt,qrcodeValidator:()=>s_,rad:()=>Kt,rectToBox:()=>Xe,removeClass:()=>ut,renderIcon:()=>ae,round:()=>M,segmentVisible:()=>rn,setDefaultOptions:()=>e,singleItemOrArray:()=>gn,sparseArrayLimits:()=>pe,styleValue:()=>bt,unbindEvents:()=>$t,valueOrDefault:()=>O});var U={},N=(j.r(U),j.d(U,{DEFAULT_PANE:()=>Kh,NAVIGATOR_AXIS:()=>Qh,NAVIGATOR_PANE:()=>Zh}),"arc"),G="#000",w="bottom",b="center",W="circle",X=3,q="cross",Y="date",Z="12px sans-serif",g=10,Q=/\{\d+:?/,K="height",$="inside",J="inherit",C="left",tt=Number.MAX_VALUE,et=-Number.MAX_VALUE,ot="none",it="object",rt="outside",S="right",nt="roundedRect",st="string",k="top",at="value",a="#fff",pt="width",y="x",v="y";function ht(t){return Array.isArray(t)}function lt(t,e){for(var o=ht(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var ct=/\s+/g;function ut(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(ct," "))}var A=j(100);function dt(t){var e=.5;t.options.stroke&&A.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function ft(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function gt(t){return typeof t===st}function yt(t){return m(t)||gt(t)&&isFinite(t)}function vt(t){return"function"==typeof t}var mt="object",xt="undefined";function x(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r,n=o[i],s=typeof n;(r=s===mt&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):vt(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===mt&&r||{},t(e[i],n)):s!==xt&&(e[i]=n)}}(t,e[i]);return t}function _t(t){return"object"==typeof t}function bt(t){return m(t)?t+"px":t}var wt=/width|height|top|left|bottom|right/i;function Ct(t,e){var o=gt(e)?[e]:e;if(ht(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=wt.test(s)?parseFloat(r[s]):r[s]}return i}if(_t(e))for(var a in e)t.style[a]=bt(e[a])}function P(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[k]=o[S]=o[w]=o[C]=t:(o[k]=t[k]||e,o[S]=t[S]||e,o[w]=t[w]||e,o[C]=t[C]||e),o}function St(){}var kt={compile:function(t){return t}};St.register=function(t){kt=t},St.compile=function(t,e){return kt.compile(t,e)};const rm=St;function At(t){var e;return(t=void 0===t?{}:t).template?t.template=e=rm.compile(t.template):vt(t.content)&&(e=t.content),e}var Pt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Tt={};function Mt(t){var r;return Tt[t]||(r=[],t.replace(Pt,function(t,e,o,i){r.push(A.drawing.util.defined(e)?e:o||i)}),Tt[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e}),Tt[t]}function Ot(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function Bt(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(t.className.indexOf&&-1!==t.className.indexOf(o[i]))return!0}function Rt(){this._map=new Map}Tt[void 0]=function(t){return t},Rt.prototype.get=function(t){return this._map.get(t)},Rt.prototype.set=function(t,e){this._map.set(t,e)};const nm=Rt;function u(t,e){if(e)return-1!==e.indexOf(t)}function It(t,e,o){return A.drawing.util.round(t+(e-t)*o,X)}function Et(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}var Lt="trigger";Et.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i[Lt]&&(o=this.callObserver(Lt,t,e)),o},Et.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},Et.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};const sm=Et;function zt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Vt(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);A.drawing.util.defined(n)&&i.push(n)}return i}var jt=A.support.browser||{};function Dt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,jt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Ht(){}var t,Ft=(t=A.drawing.util).append,Ut=t.bindEvents,T=t.defined,Nt=t.deg,Gt=t.elementOffset,Wt=t.elementSize,Xt=t.eventCoordinates,qt=t.eventElement,Yt=t.hashKey,Zt=t.last,_=t.limitValue,Qt=t.objectKey,Kt=t.rad,M=t.round,$t=t.unbindEvents,O=t.valueOrDefault;Ht.fetchFonts=function(o,i,r){void 0===r&&(r={depth:0}),!o||5<r.depth||!document.fonts||Object.keys(o).forEach(function(t){var e=o[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?i.push(e):"object"==typeof e&&(r.depth++,Ht.fetchFonts(e,i,r),r.depth--))})},Ht.loadFonts=function(t,e){var o=[];if(0<t.length&&document.fonts){try{o=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,A.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},Ht.preloadFonts=function(t,e){var o=[];Ht.fetchFonts(t,o),Ht.loadFonts(o,e)};const am=Ht;function e(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function Jt(t,e){this.element=t,this.options=x({},this.options,e),this.wrapper()}var te,ee="k-i-",oe="k-svg-i-",t=(Jt.prototype.wrapper=function(){this.addClasses()},Jt.prototype.addClasses=function(){},Jt.prototype.html=function(){return this.element.outerHTML},e(Jt,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(te=Jt)&&(re.__proto__=te),((re.prototype=Object.create(te&&te.prototype)).constructor=re).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(ee)}),e=this.options.icon?(this.options.icon.startsWith(ee)?"":ee)+this.options.icon:"";this._className=e,lt(this.element,"k-icon"),ut(this.element,t),lt(this.element,e),lt(this.element,this.options.iconClass||""),te.prototype.wrapper.call(this)},re),ie,o;function re(t,e){te.call(this,t,e)}function ne(t,e){t.innerHTML="",ie.call(this,t,e)}e(t,{name:"HTMLFontIcon",icon:null}),(ie=Jt)&&(ne.__proto__=ie),((ne.prototype=Object.create(ie&&ie.prototype)).constructor=ne).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,o=this.element.className.split(" ").find(function(t){return t.startsWith(oe)}),i=(!t&&e&&(i=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=i[1],e=e.replace(i[0],"")),gt(t)&&(t=t.replace("k-i-","").replace(/-./g,function(t){return t[1].toUpperCase()}),t=this.options.svgIcons[t]||this.options.svgIcons[t+"Icon"]),t&&t.name?oe+t.name:"");this._className=i,lt(this.element,"k-svg-icon"),ut(this.element,o),lt(this.element,i),lt(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&zt(t)&&((o=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),o.setAttribute("focusable","false"),o.innerHTML=t.content||"",this.element.appendChild(o)),ie.prototype.wrapper.call(this)},e(o=ne,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var se={svg:o,font:t};function ae(t,e){return t&&(!_t(t)||t instanceof HTMLElement)&&!gt(t)||(e=t,t=document.createElement("span")),(e=gt(e)?{icon:e}:e).type||(e.type="svg"),se[e.type]?new se[e.type](t,e).html():null}function pe(t){for(var e=tt,o=et,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===tt?void 0:e,max:o===et?void 0:o}}function he(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var le=A.geometry.Matrix,ce=/matrix\((.*)\)/;function ue(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(ce))||2!==t.length?le.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(le,[null].concat(t))))}function de(t){if(!t)return le.unit();for(var e=ue(t),o=t.parentElement;o;)var i=ue(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}const pm=function(t){return new A.Color(t).isDark()?a:G};var fe,ge,ye,ve,me={},xe=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},o={size:{configurable:!0}},_e=(xe.prototype.values=function(){return this._values.filter(function(t){return t!==me})},xe.prototype.has=function(t){return void 0!==this._index[t]},xe.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},xe.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=me,delete this._index[t])},xe.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(xe.prototype,o),function(t){this._set=new Set(t)}),t={size:{configurable:!0}},be=(_e.prototype.values=function(){return Array.from(this._set)},_e.prototype.has=function(t){return this._set.has(t)},_e.prototype.add=function(t){this._set.add(t)},_e.prototype.delete=function(t){this._set.delete(t)},_e.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(_e.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t}),we,o,Ce,t,Se,o,ke,t,Ae,t,Pe,o;function Te(t){return new(be()?_e:xe)(t)}function Me(t){throw t}const hm={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Oe(t,e){t=M(e-t,g-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=M(t/e,g);return M(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(fe=A.Class)&&(Be.__proto__=fe),((Be.prototype=Object.create(fe&&fe.prototype)).constructor=Be).prototype.clone=function(){return new Be(this.x,this.y)},Be.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Be.prototype.rotate=function(t,e){var e=Kt(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=M(i+(r-i)*o+(n-t)*e,X),this.y=M(t+(n-t)*o-(r-i)*e,X),this},Be.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Be.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Be.onCircle=function(t,e,o){e=Kt(e);return new Be(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};const I=Be;function Be(t,e){fe.call(this),this.x=t||0,this.y=e||0}function Re(t,e,o,i){ge.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function Ie(t,e,o,i,r){r=Kt(r);return new I(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(ge=A.Class)&&(Re.__proto__=ge),((Re.prototype=Object.create(ge&&ge.prototype)).constructor=Re).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Re.prototype.width=function(){return this.x2-this.x1},Re.prototype.height=function(){return this.y2-this.y1},Re.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Re.prototype.move=function(t,e){var o=this.height(),i=this.width();return T(t)&&(this.x1=t,this.x2=this.x1+i),T(e)&&(this.y1=e,this.y2=this.y1+o),this},Re.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},Re.prototype.wrapPoint=function(t){var e=ht(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Re(o,e,o,e)),this},Re.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},Re.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===w?v:y,a=s==v?r:n;return e===b?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===k||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Re.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Re.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Re.prototype.pad=function(t){t=P(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Re.prototype.unpad=function(t){t=P(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Re.prototype.clone=function(){return new Re(this.x1,this.y1,this.x2,this.y2)},Re.prototype.center=function(){return new I(this.x1+this.width()/2,this.y1+this.height()/2)},Re.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Re.prototype.points=function(){return[new I(this.x1,this.y1),new I(this.x2,this.y1),new I(this.x2,this.y2),new I(this.x1,this.y2)]},Re.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Re.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Re.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=Ie(0,0,r,i,t),s=Ie(e,0,r,i,t),a=Ie(e,o,r,i,t),r=Ie(0,o,r,i,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),o=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},Re.prototype.toRect=function(){return new A.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Re.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Re.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===y?pt:K,n=this[e]();u(o,[C,k])?(this[i]=t[i],this[r]=this[i]+n):u(o,[S,w])?(this[r]=t[r],this[i]=this[r]-n):o===b&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};const E=Re;function Ee(t,e,o,i,r){ye.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}function Le(t,e){return t-e}(ye=A.Class)&&(Ee.__proto__=ye),((Ee.prototype=Object.create(ye&&ye.prototype)).constructor=Ee).prototype.clone=function(){return new Ee(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},Ee.prototype.middle=function(){return this.startAngle+this.angle/2},Ee.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},Ee.prototype.point=function(t,e){var t=Kt(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=M(this.center.x-o*e,X),t=M(this.center.y-t*e,X);return new I(o,t)},Ee.prototype.adjacentBox=function(t,e,o){var t=this.clone().expand(t),i=t.middle(),t=t.point(i),r=e/2,n=o/2,s=Math.sin(Kt(i)),i=Math.cos(Kt(i)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-i/Math.abs(i)),Math.abs(i)<.9&&(t+=n*-s/Math.abs(s)),new E(a,t,a+e,t+o)},Ee.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new I(s,t),r=this.point(r),r=new I(r.x-e.x,r.y-e.y),n=this.point(n),n=new I(n.x-e.x,n.y-e.y),e=M(s*s+t*t,X);return(r.equals(a)||ft(r,a))&&!ft(n,a)&&o*o<=e&&e<=i*i},Ee.prototype.getBBox=function(){for(var t=new E(tt,tt,et,et),e=M(this.startAngle%360),o=M((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(Le),n=r.indexOf(e),s=r.indexOf(o),a=e===o?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,i)}return i||t.wrapPoint(this.center),t},Ee.prototype.expand=function(t){return this.radius+=t,this};const lm=Ee;function ze(t,e,o,i){ve.call(this,t,0,e,o,i)}(ve=lm)&&(ze.__proto__=ve),((ze.prototype=Object.create(ve&&ve.prototype)).constructor=ze).prototype.expand=function(t){return ve.prototype.expand.call(this,t)},ze.prototype.clone=function(){return new ze(this.center,this.radius,this.startAngle,this.angle)},ze.prototype.setRadius=function(t){return this.radius=t,this};const cm=ze;function Ve(){we.apply(this,arguments)}(we=A.Class)&&(Ve.__proto__=we),((Ve.prototype=Object.create(we&&we.prototype)).constructor=Ve).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new A.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new A.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=A.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(i),e.lineTo(n.x,n.y),e.arc(i,o,t,t,!0)):e.lineTo(r.x,r.y),e},(o=Ve).current=new o;const um=o;function je(t){Ce.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}(Ce=A.Class)&&(je.__proto__=Ce),((je.prototype=Object.create(Ce&&Ce.prototype)).constructor=je).prototype.initUserOptions=function(t){return t},je.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},je.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},je.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},je.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},je.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},je.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},je.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},je.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},je.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},je.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},je.prototype.createVisual=function(){this.visual=new A.drawing.Group({zIndex:this.options.zIndex,visible:O(this.options.visible,!0)})},je.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=A.drawing.Animation.create(this.visual,this.options.animation))},je.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):T(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},je.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},je.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},je.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,o=this.visual.children,i=o.length,r=0;r<i;r++){var n=o[r];if(O(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},je.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},je.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},je.prototype.renderComplete=function(){},je.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},je.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);T(n.options.zIndex)||(n.options.zIndex=O(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},je.prototype.createGradientOverlay=function(t,e,o){o=new A.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},je.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},je.prototype.supportsPointInactiveOpacity=function(){return!0},(t=je).prototype.options={};const L=t;function De(t){Se.call(this,t),this.options.margin=P(this.options.margin),this.options.padding=P(this.options.padding)}(Se=L)&&(De.__proto__=Se),((De.prototype=Object.create(Se&&Se.prototype)).constructor=De).prototype.reflow=function(t){function e(){i.align(t,y,r.align),i.align(t,v,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),Se.prototype.reflow.call(this,u),o=p?this.box=new E(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(h),e()),this.translateChildren(o.x1-u.x1+h.left+c+l.left,o.y1-u.y1+h.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},De.prototype.align=function(t,e,o){this.box.align(t,e,o)},De.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},De.prototype.createVisual=function(){Se.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},De.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},e(o=De,{align:C,vAlign:k,margin:{},padding:{},border:{color:G,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const dm=o;function He(t,e){ke.call(this,t),this.pointData=e}(ke=dm)&&(He.__proto__=ke),((He.prototype=Object.create(ke&&ke.prototype)).constructor=He).prototype.getElement=function(){var t,e,o=this.options,i=this.paddingBox,r=o.type,n=o.rotation,s=i.center(),a=i.width()/2,p=i.height()/2;return o.visible&&this.hasBox()?(e=this.visualStyle(),r===W?t=new A.drawing.Circle(new A.geometry.Circle([M(i.x1+a,X),M(i.y1+p,X)],Math.min(a,p)),e):"triangle"===r?t=A.drawing.Path.fromPoints([[i.x1+a,i.y1],[i.x1,i.y2],[i.x2,i.y2]],e).close():r===q?((t=new A.drawing.MultiPath(e)).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t.moveTo(i.x1,i.y2).lineTo(i.x2,i.y1)):(p=i.toRect(),r===nt&&(a=O(o.borderRadius,p.width()/5),p.setCornerRadius(a)),t=A.drawing.Path.fromRect(p,e)),n&&t.transform(A.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=o.zIndex,t):null},He.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},He.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}},He.prototype.createVisual=function(){this.visual=this.createElement()},e(t=He,{type:W,align:b,vAlign:b});const fm=t,gm={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:o="radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:o,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:o,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:o,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:o,center:[.5,.5],radius:.5}};function Fe(t){Ae.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}(Ae=L)&&(Fe.__proto__=Ae),((Fe.prototype=Object.create(Ae&&Ae.prototype)).constructor=Fe).prototype.reflow=function(){var t=this.options,e=this.children,o=new E(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i,r,n,s,a,p,h,l,c,u,d,f=0;f<e.length;f++)e[f].reflow(o),i=o,r=e[f].box,d=u=c=l=h=p=a=s=n=void 0,o=(i.x1===r.x1&&i.y1===r.y1&&i.x2===r.x2&&i.y2===r.y2?r:(n=Math.min(i.x1,r.x1),s=Math.max(i.x1,r.x1),a=Math.min(i.x2,r.x2),p=Math.max(i.x2,r.x2),h=Math.min(i.y1,r.y1),l=Math.max(i.y1,r.y1),c=Math.min(i.y2,r.y2),u=Math.max(i.y2,r.y2),(d=[])[0]=new E(s,h,a,l),d[1]=new E(n,l,s,c),d[2]=new E(a,l,p,c),d[3]=new E(s,c,a,u),i.x1===n&&i.y1===h||r.x1===n&&r.y1===h?(d[4]=new E(n,h,s,l),d[5]=new E(a,c,p,u)):(d[4]=new E(a,h,p,l),d[5]=new E(n,c,s,u)),Ot(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new E},Fe.prototype.createVisual=function(){this.visual=new A.drawing.Group,this.createBackground()},Fe.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=A.drawing.Path.fromRect(o.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(o)},Fe.prototype.getRoot=function(){return this},Fe.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Qt(t),r=gm[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new A.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,o=t.length,i=[],r=0;r<o;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,i.push(n)}return i}()),(e=new A.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Fe.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Fe.prototype.size=function(){var t=this.options;return new E(0,0,t.width,t.height)},e(t=Fe,{width:600,height:400,background:a,border:{color:G,width:0},margin:P(5),zIndex:-2});const ym=t;function Ue(t){Pe.call(this,t),this._initDirection()}(Pe=L)&&(Ue.__proto__=Pe),((Ue.prototype=Object.create(Pe&&Pe.prototype)).constructor=Ue).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=pt,this.elementSizeField=K,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=K,this.elementSizeField=pt,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Ue.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ue.prototype.reflowChildren=function(){var t=this,e=t.box,o=t.elementAxis,i=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,p=s.length,h=e[i+1]+this.alignStart(a,e[n]());if(p){for(var l=h,c=0;c<p;c++){for(var u=s[c],d=u.groupElements,f=e[o+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[n],u.groupSize),_=new E;_[i+1]=x,_[i+2]=x+m[n],_[o+1]=f,_[o+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}e[i+1]=h,e[i+2]=h+a,e[o+2]=e[o+1]+t}},Ue.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===w?o=e-t:i===b&&(o=(e-t)/2),o},Ue.prototype.groupOptions=function(){for(var t=this,e=t.box,o=t.children,i=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=M(e[i]()),p=o.length,h=[],l=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=o[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&M(c+n+v[i])>a&&(h.push({groupElements:f,groupSize:l,groupElementsSize:c}),d=Math.max(d,c),u+=s+l,c=l=0,f=[]),l=Math.max(l,v[r]),0<c&&(c+=n),c+=v[i],f.push(y)}return h.push({groupElements:f,groupSize:l,groupElementsSize:c}),{groups:h,groupsSize:u+=l,maxGroupElementsSize:d=Math.max(d,c)}},Ue.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ue.prototype.createVisual=function(){},e(o=Ue,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const vm=o;var Ne,Ge=A.drawing.Text,t;function We(t,e){Ne.call(this,e),this.content=t,this.reflow(new E)}(Ne=L)&&(We.__proto__=Ne),((We.prototype=Object.create(Ne&&Ne.prototype)).constructor=We).prototype.reflow=function(t){var e=this.options,e=e.size=A.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new E(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},We.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new Ge(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},e(t=We,{font:Z,color:G});const mm=t;function Xe(t){var e=t.origin,t=t.bottomRight();return new E(e.x,e.y,t.x,t.y)}var qe,Ye=/\n/m,Ze,o,Qe,t,Ke,o;function $e(t,e,o){qe.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new E)}(qe=dm)&&($e.__proto__=qe),(($e.prototype=Object.create(qe&&qe.prototype)).constructor=$e).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ye),o=new vm({vertical:!0,align:t.align,wrap:!1}),i=x({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new mm(e[r].trim(),i);o.append(n)}},$e.prototype.reflow=function(t){var e,o=this.options,i=o.visual;this.container.options.align=o.align,i&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(i=this.visual=i(this.visualContext(e)))&&(e=Xe(i.clippedBBox()||new A.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(qe.prototype.reflow.call(this,t),o.rotation&&(i=P(o.margin),e=this.box.unpad(i),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=e.clone(),e.pad(i)))},$e.prototype.createVisual=function(){var t=this.options;this.visual=new A.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=A.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},$e.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!T(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):qe.prototype.renderVisual.call(this))},$e.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},$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,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},$e.prototype.rotationTransform=function(){var t,e,o,i=this.options.rotation;return i?(t=(e=this.normalBox.center()).x,e=e.y,o=this.rotatedBox.center(),A.geometry.transform().translate(o.x-t,o.y-e).rotate(i,[t,e])):null};const xm=$e;function Je(t){Ze.call(this,t),this._textBox=new xm(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function to(t){for(var e=1;e<t.length;e++){var o=t[e]._textBox,i=t[e-1]._textBox;i.options.margin=Object.assign(P(i.options.margin),{bottom:0}),o.options.margin=Object.assign(P(o.options.margin),{top:0})}}(Ze=L)&&(Je.__proto__=Ze),((Je.prototype=Object.create(Ze&&Ze.prototype)).constructor=Je).prototype.reflow=function(t){Ze.prototype.reflow.call(this,t),this.box.snapTo(t,y)},Je.buildTitle=function(t,e){var o,t="string"==typeof t?{text:t}:t;return o=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new Je(t):o},Je.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==w}),t=t.filter(function(t){return t&&t.options.position===w});return to(e),to(t),t.reverse(),e.concat(t)},e(o=Je,{color:G,position:k,align:b,margin:P(5),padding:P(5)});const _m=o;function eo(t,e,o,i,r){Qe.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new E)}(Qe=xm)&&(eo.__proto__=Qe),((eo.prototype=Object.create(Qe&&Qe.prototype)).constructor=eo).prototype.visualContext=function(t){t=Qe.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},eo.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:qt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},eo.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Xe(t.bbox(e.matrix()))):Qe.prototype.rotate.call(this),this.box},eo.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return Qe.prototype.rotationTransform.call(this);var o=A.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||k,n=t===k||t===w?y:v,s=t===k||t===w?v:y,t=t===k||t===C?r.origin:r.bottomRight(),a=i.topLeft().transformCopy(o),p=i.topRight().transformCopy(o),h=i.bottomRight().transformCopy(o),i=i.bottomLeft().transformCopy(o),o=A.geometry.Rect.fromPoints(a,p,h,i),l={};l[s]=r.origin[s]-o.origin[s];var c,o=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(p[s]+l[s]-t[s]),s=M(o,g)===M(t,g)?(c=a,p):t<o?(c=p,h):(c=a,i),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,A.geometry.transform().translate(l.x,l.y).rotate(e)},e(t=eo,{_autoReflow:!1});const bm=t;function oo(t,e,o){Ke.call(this,e),this.fields=t,this.chartService=o,this.render()}(Ke=dm)&&(oo.__proto__=Ke),((oo.prototype=Object.create(Ke&&Ke.prototype)).constructor=oo).prototype.hide=function(){this.options.visible=!1},oo.prototype.show=function(){this.options.visible=!0},oo.prototype.render=function(){var t,e,o,i,r,n,s,a,p=this,h=this.options;h.visible&&(o=h.label,h=h.icon,i=new E,r=function(){return p},n=h.size,s=this.fields.text,T(o)&&o.visible&&((a=At(o))?s=a(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color=o.position===$?"#fff":h.background),this.label=new xm(s,x({},o)),this.label.aliasFor=r,o.position!==$||T(n)||(h.type===W?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),h.width=t||n||7,h.height=e||n||7,(a=new fm(x({},h))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new E),this.wrapperBox=i.wrap(a.box))},oo.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(u(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):l===w?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s)&&(r.label.position===rt&&n.box.alignTo(s.box,l),n.reflow(n.box)),this.contentBox=i,this.targetBox=t,this.box=o||i)},oo.prototype.createVisual=function(){Ke.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},oo.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;t.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):Ke.prototype.renderVisual.call(this)},oo.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(dt(t=A.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},oo.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},oo.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},oo.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},oo.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:qt(t),text:T(e.label)?e.label.text:"",visual:this.visual})},e(o=oo,{icon:{visible:!0,type:W},label:{position:$,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:k,zIndex:2});const wm=o;function io(){}var ro={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},t={implementation:{configurable:!0}};io.register=function(t){ro=t},t.implementation.get=function(){return ro},Object.defineProperties(io,t);const Cm=io;function no(t){this._intlService=t}var so=/\{(\d+)(:[^\}]+)?\}/g,o,ao,o;(o={intl:{configurable:!0}}).intl.get=function(){return this._intlService||Cm.implementation},o.intl.set=function(t){this._intlService=t},no.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return gt(t)&&t.match(Q)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},no.prototype.localeAuto=function(t,i,r){var n=this.intl;return gt(t)&&t.match(Q)?t.replace(so,function(t,e,o){e=i[parseInt(e,10)];return n.toString(e,o?o.substring(1):"",r)}):n.toString(i[0],t,r)},Object.defineProperties(no.prototype,o);const Sm=no;function po(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Sm(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}(t={intl:{configurable:!0}}).intl.get=function(){return this._intlService||Cm.implementation},t.intl.set=function(t){this._intlService=t,this.format.intl=t},po.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},po.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(po.prototype,t);const km=po;function ho(){}ho.register=function(t){D=t},ho.create=function(t,e){if(D)return D.create(t,e)};const Am=ho;function lo(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new A.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),dt(n),n}function co(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new A.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(o,r).lineTo(i,r):e.moveTo(r,o).lineTo(r,i),dt(e),e}function i(t,e){void 0===e&&(e=new km),ao.call(this,t),this.chartService=e,this.options.visible||(this.options=x({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==ot},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==ot},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}(ao=L)&&(i.__proto__=ao),((i.prototype=Object.create(ao&&ao.prototype)).constructor=i).prototype.initFields=function(){},i.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},i.prototype.normalizeLabelRotation=function(t){var e=t.rotation;_t(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},i.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:b,o=x({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},s=this.createAxisLabel(n,o,s);s&&(this.append(s),this.labels.push(s))}}},i.prototype.clearLabels=function(){this.children=Ot(this.children,function(t){return!(t instanceof bm)}),this.labels=[]},i.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Ot(this.children,function(t){return t!==e.title}),this.title=void 0)},i.prototype.clear=function(){this.clearLabels(),this.clearTitle()},i.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,i=i?e.y2:e.y1,t=t.line.width||0;return o?new E(r,e.y1,r,e.y2-t):new E(e.x1,i,e.x2-t,i)},i.prototype.createTitle=function(){var t=this.options,t=x({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new xm(t.text,t),this.append(t),this.title=t)},i.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=x({},e,o[i]),r=(r.value=this.parseNoteValue(r.value),new wm({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(T(r.options.position)?t.vertical&&!u(r.options.position,[C,S])?r.options.position=t.reverse?C:S:t.vertical||u(r.options.position,[k,w])||(r.options.position=t.reverse?w:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?w:k,this.append(r),this.notes.push(r))}},i.prototype.parseNoteValue=function(t){return t},i.prototype.renderVisual=function(){ao.prototype.renderVisual.call(this),this.createPlotBands()},i.prototype.createVisual=function(){ao.prototype.createVisual.call(this),this.createBackground(),this.createLine()},i.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new A.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},i.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)T(o)&&n%o==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(lo(h,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},i.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new A.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&dt(e),(o=this._lineGroup=new A.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},i.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},i.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=A.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},i.prototype.createPlotBands=function(){var e=this,t=this.options,o=t.plotBands||[],i=t.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new A.drawing.Group({zIndex:-1}),s=Ot(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var p=o[a],h=void 0,l=void 0,c=p.label,u=void 0,l=i?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new E(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(c=new A.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),h=A.drawing.Path.fromRect(c,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(h),u)&&n.append(u)}this.appendVisual(n)}},i.prototype.createPlotBandLabel=function(t,e,o){var i,r;return!1===t.visible?null:(i=t.text,T(t)&&t.visible&&((r=At(t))?i=r({text:i,item:e}):t.format&&(i=this.chartService.format.auto(t.format,i)),t.color||(t.color=this.options.labels.color)),(r=new xm(i,t)).reflow(o),r.renderVisual(),r.visual)},i.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=M(t[n]);u(s,l)||n%o==0||a&&p===s||(h.position=s,c.append(co(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},i.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?pt:K,i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new E(t.x1,t.y1,t.x1+h+a,t.y2):new E(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},i.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},i.prototype.labelTickIndex=function(t){return t.index},i.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),l=n[p],p=n[p+1],c=void 0,u=void 0,u=i?c=o?l+(p-l)/2-h/2:l-h/2:o?(c=l,p):(c=l-h/2)+h;this.positionLabel(a,r,c,u)}},i.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=S),t.box.move(n,o)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=w):(n+=r,t.options.rotationOrigin=k),new E(o,n,i,n+t.box.height()));t.reflow(s)},i.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},i.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==s?s:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new E);return!0}},i.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?S:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?k:w),e.reflow(this.box))},i.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;T(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},i.prototype.noteSlot=function(t){return this.getSlot(t)},i.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,o=e?v:y;this.box.snapTo(t,o),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[o+1]-=this.lineBox()[o+1]-t[o+1],this.box[o+2]-=this.lineBox()[o+2]-t[o+2]},i.prototype.axisLabelText=function(t,e,o){function i(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=At(e);return n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i()},i.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},i.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),o[e+1]-=t.start,o[e+2]+=t.end):(i[0].options.visible&&o.wrap(i[0].box),(e=i[i.length-1]).options.visible&&o.wrap(e.box))),o},i.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-f)}return{start:p,end:h}},i.prototype.limitRange=function(t,e,o,i,r){var n,s,a=this.options;return t<o&&r<0&&(!T(a.min)||a.min<=o)||i<e&&0<r&&(!T(a.max)||i<=a.max)?null:e<o&&0<r||i<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<o&&r<0?(n=_(t,o,i),s=_(t+a,o+a,i)):i<e&&0<r&&(s=_(e,o,i),n=_(e-a,o,i-a)),{min:n,max:s})},i.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},i.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},i.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),t=t?v:y,i=this.lineDir(),r=t+(1===i?1:2).toString();return{axis:t,axisOrigin:r,axisDir:i,lineBox:e,lineSize:o,lineStart:e[r]}},i.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<i?t[o]-n[r]:n[r]-t[o])/e},i.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},i.prototype.labelsBetweenTicks=function(){return!this.options.justified},i.prototype.prepareUserOptions=function(){},e(o=i,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:G,visible:!0},title:{visible:!0,position:b},majorTicks:{align:rt,size:4,skip:0,step:1},minorTicks:{align:rt,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:rt,minorTickType:ot,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:G,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const Pm=o;var uo="milliseconds",fo="seconds",go="minutes",yo="hours",vo="days",mo="weeks",xo="months",_o="years",bo=1e3,wo=60*bo,Co=60*wo,So=24*Co,ko=7*So,Ao=31*So,Po=365*So,To={years:Po,months:Ao,weeks:ko,days:So,hours:Co,minutes:wo,seconds:bo,milliseconds:1},Mo,t;function Oo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wo}function Bo(t,e){return new Date(t.getTime()+e)}function Ro(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Io(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Eo(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=Ro(t)).getHours(),o===_o?Io(a=new Date(t.getFullYear()+e,0,1),0):o===xo?Io(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===mo?Io(a=Eo(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return Bo(t,-o*So)}(t,r),7*e,vo),i):o===vo?Io(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===yo?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),i=(i.getTimezoneOffset()-s.getTimezoneOffset())*wo,a=Bo(s,i+n*Co)):o===go?0<(a=Bo(t,e*wo)).getSeconds()&&a.setSeconds(0):o===fo?a=Bo(t,e*bo):o===uo&&(a=Bo(t,e)),o!==uo)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function Lo(t,e,o){return Eo(Ro(t),0,e,o)}function zo(t,e,o){t=Ro(t);return t&&Lo(t,e,o).getTime()===t.getTime()?t:Eo(t,1,e,o)}function Vo(t,e){return t&&e?t.getTime()-e.getTime():-1}function jo(t,e){return t.getTime()-e}function d(t){if(ht(t)){for(var e=[],o=0;o<t.length;o++)e.push(d(t[o]));return e}if(t)return Ro(t).getTime()}function Do(t,e){return t&&e?d(t)===d(e):t===e}function Ho(t,e,o){return Oo(t,e)/To[o]}function Fo(t,e,o,i){var t=Ro(t),r=Ro(e);return(o===xo?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Ho(t,new Date(t.getFullYear(),t.getMonth()),vo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===_o?t.getFullYear()-r.getFullYear()+Fo(t,new Date(t.getFullYear(),0),xo,1)/12:o===vo||o===mo?Ho(t,r,o):jo(t,e)/To[o])/i}function Uo(t,e,o){return o===_o?e.getFullYear()-t.getFullYear():o===xo?12*Uo(t,e,_o)+e.getMonth()-t.getMonth():o===vo?Math.floor(jo(e,t)/So):Math.floor(jo(e,t)/To[o])}function No(t,e){return gt(e)&&t.parseDate(e)||Ro(e)}function Go(t,e){if(ht(e)){for(var o=[],i=0;i<e.length;i++)o.push(No(t,e[i]));return o}return No(t,e)}function Wo(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}function r(){Mo.apply(this,arguments)}(Mo=Pm)&&(r.__proto__=Mo),((r.prototype=Object.create(Mo&&Mo.prototype)).constructor=r).prototype.initFields=function(){this._ticks={}},r.prototype.categoriesHash=function(){return""},r.prototype.clone=function(){var t=new r(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},r.prototype.initUserOptions=function(t){var e=t.categories||[],o=T(t.min),i=T(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,i=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,i)),t},r.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},r.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},r.prototype.roundedRange=function(){return this.range()},r.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},r.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(t-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:t}},r.prototype.arrangeLabels=function(){Mo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},r.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?v:y)+1],i=i[t+2],o=r[0],r=Zt(r),(o.box[t+1]>i||o.box[t+2]<e)&&(o.options.visible=!1),r.box[t+1]>i||r.box[t+2]<e)&&(r.options.visible=!1)},r.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},r.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},r.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},r.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,e=e.max,i=Math.ceil(e),r=Math.floor(o),n=[];r<=i;)n.push(r),r+=t;return n},r.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,e=e.reverse,i=this.scaleOptions(),r=i.scale,n=i.box,s=i.min,a=n[(o?v:y)+(e?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+M(r*(p[l]-s),X));return h},r.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),o=i.getHash()+o.min+","+o.max+t.reverse+t.justified;return e._hash!==o&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=o,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]),e},r.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?v:y,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&0<=s;)s--;return t.slice(n,s+1)},r.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,o=this.lineBox(),i=e?o.height():o.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:o,lineSize:i,lineStart:o[r]}},r.prototype.lineDir=function(){return this.options.reverse?-1:1},r.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,i=i.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,p=this.lineInfo(),h=p.axis,p=p.lineStart,l=a.clone(),c=!T(e),t=O(t,0),e=O(e,t),e=Math.max(e-1,t),u=p+(t-n)*s,p=p+(Math.max(t,e)+1-n)*s;return c&&i&&(p=u),o&&(u=_(u,a[h+1],a[h+2]),p=_(p,a[h+1],a[h+2])),l[h+1]=r?p:u,l[h+2]=r?u:p,l},r.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,o=this.lineBox(),i=t.clone();return i[e+1]=_(t[e+1],o[e+1],o[e+2]),i[e+2]=_(t[e+2],o[e+1],o[e+2]),i},r.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=i),Mo.prototype.slot.call(this,t,e,o)},r.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,p=s[e+1],s=s[e+2],t=t[e];return t<p||s<t?null:(s=(e=(o?r:a)+(t-p)/n)%1,i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e))},r.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},r.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},r.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},r.prototype.categoriesCount=function(){return(this.options.categories||[]).length},r.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=M(t/(o/e),g);return{min:t,max:e+t}},r.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.limitedRangeIndices(),i=o.max-o.min,t=this.scaleToDelta(t,i),i=o.min+e*t,o=o.max-(1-e)*t;return{min:i,max:o=o-i<.1?i+.1:o}},r.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,t=this.scaleRange(t,e);return{min:_(t.min,i,o),max:_(t.max,i,o)}},r.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},r.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.limitedRangeIndices(!0),r=i.min,i=i.max,n=Math.floor(r),i=e?(r=Math.ceil(r),Math.floor(i)):(r=Math.floor(r),Math.ceil(i));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-n,max:(t.categories.length?i+(e?1:0):0)-n}},r.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=O(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new bm(i,o,t,r,e)},r.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},r.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},r.prototype.arrangeNotes=function(){Mo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},r.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?v:y,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},r.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),o=this.scaleOptions().scale,t=M(t/o,g),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},r.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,o=o.vertical?v:y,r=this.limitedRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[o+(i?2:1)],i=t[o]-n,t=e[o]-n,e=r.min+i/s,o=r.min+t/s,n=Math.min(e,o),i=Math.max(e,o);if(.01<=i-n)return{min:n,max:i}},r.prototype.valueRange=function(){return this.range()},r.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var o=t,i=e.srcCategories;if(o instanceof Date){for(var r=i.length,n=0;n<r;n++)if(Do(i[n],o))return n;return-1}return i.indexOf(o)},r.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},r.prototype.limitedRangeIndices=function(t){var e=this.options,o=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=_(o,0,t.max),e=_(e,0,t.max)),{min:o,max:e}},r.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},r.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new nm,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},r.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},e(t=r,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:G},labels:{zIndex:1},justified:!1,_deferLabels:!0});const Tm=t;var o={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},Xo=[uo,fo,go,yo,vo,mo,xo,_o],qo="fit",Yo,t;function Zo(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=pe(t)).min=Ro(e.min),e.max=Ro(e.max)),e}function Qo(t){this.options=t}function Ko(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=Eo(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&Do(e,s)&&!o.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),o.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=o.max)?(i=!n&&Do(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,i),this.displayEnd=r?this.roundToTotalStep(t,!n):o.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function $o(t,e,o){for(var i,r,n,s=Zo(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===qo,c=e?Xo.indexOf(e):0,u=l?Xo[c++]:t.baseUnit,d=a/To[u],f=d;!r||h<=d;){for(i=i||p[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===Zt(Xo)){r=Math.ceil(f/h);break}if(!l){h<d&&(r=Math.ceil(f/h));break}u=Xo[c++]||Zt(Xo),f=a/To[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function n(){Yo.apply(this,arguments)}Qo.prototype.displayIndices=function(){return{min:0,max:1}},Qo.prototype.displayRange=function(){return{}},Qo.prototype.total=function(){return{}},Qo.prototype.valueRange=function(){return{}},Qo.prototype.valueIndex=function(){return-1},Qo.prototype.values=function(){return[]},Qo.prototype.totalIndex=function(){return-1},Qo.prototype.valuesCount=function(){return 0},Qo.prototype.totalCount=function(){return 0},Qo.prototype.dateAt=function(){return null},Ko.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ko.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Fo(this.displayStart,this.valueStart,o,t),o=Fo(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},Ko.prototype.total=function(){return{min:this.start,max:this.end}},Ko.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ko.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ko.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Fo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ko.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Fo(t,this.start,e.baseUnit,e.baseUnitStep))},Ko.prototype.dateIndex=function(t){var e=this.options;return Fo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ko.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ko.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=Eo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ko.prototype.dateAt=function(t,e){var o=this.options;return Eo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Ko.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Fo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),Eo(s,e*n,r,i)},(Yo=Tm)&&(n.__proto__=Yo),((n.prototype=Object.create(Yo&&Yo.prototype)).constructor=n).prototype.clone=function(){var t=new n(Object.assign({},this.options),this.chartService);return t.createLabels(),t},n.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},n.prototype.initUserOptions=function(t){return t},n.prototype.initFields=function(){Yo.prototype.initFields.call(this);var t,e=this.chartService,o=e.intl,i=this.options,r=i.categories||[];r._parsed||((r=Go(o,r))._parsed=!0),i=x({roundToBaseUnit:!0},i,{categories:r,min:No(o,i.min),max:No(o,i.max),weekStartDay:Wo(i,o)}),e.panning&&e.isPannable(i.vertical?v:y)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,0<((this.options=i).srcCategories=r).length?(o=Zo(r,!0),e=i.maxDivisions,r=function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==qo&&!u(e,Xo)){for(var o=t,i,r,n=o.categories,s=T(n)?n.length:0,a=tt,p=0;p<s;p++){var h,l=n[p];l&&i&&0<(h=Oo(l,i))&&(r=(a=Math.min(a,h))>=Po?_o:Ao-3*So<=a?xo:ko<=a?mo:So<=a?vo:Co<=a?yo:wo<=a?go:fo),i=l}o.baseUnit=r||vo}return e!==qo&&"auto"!==t.baseUnitStep||$o(t),t}(i),(t=i._forecast)&&(0<t.before&&(o.min=Eo(o.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(o.max=Eo(o.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new Ko(o.min,o.max,r),e?(t=this.dataRange.displayRange(),$o(r=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:t.min,max:t.max,maxDateGroups:e}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Ko(o.min,o.max,r)):this.divisionRange=this.dataRange):(i.baseUnit=i.baseUnit||vo,this.dataRange=this.divisionRange=new Qo(i)),this.rangeLabels=[]},n.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return Yo.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&r.splice(p,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},n.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Vo(t,e.min)&&Vo(t,e.max)<=0&&o.length},n.prototype.parseNoteValue=function(t){return No(this.chartService.intl,t)},n.prototype.noteSlot=function(t){return this.getSlot(t)},n.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=M(t/r,g);return n.min&&n.max&&(r=Bo(e.min||n.min,t),e=Bo(e.max||n.max,t),n={min:Eo(r,0,o,i),max:Eo(e,0,o,i)}),n},n.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},n.prototype.pan=function(t){var e,o,i,r,n;return this.isEmpty()?null:(e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,o=this.dataRange.total(),i=Bo(r,t=M(t/(i/(n-r)),g)*(e.reverse?-1:1)),r=Bo(n,t),(n=this.limitRange(d(i),d(r),d(o.min),d(o.max),t))?(n.min=Ro(n.min),n.max=Ro(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},n.prototype.pointsRange=function(t,e){var o,i;return this.isEmpty()?null:(t=Yo.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=jo(e.max,e.min)/(o.max-o.min),i=this.options,{min:Bo(e.min,t.min*o),max:Bo(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep})},n.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===qo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),p=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(i){var h,l,c=o.autoBaseUnitSteps,e=o.maxDateGroups,i=Zt(c[p])*e*To[p],u=jo(n,s),d=jo(a,t),f=Xo.indexOf(p);if(d<To[p]&&p!==uo)p=Xo[f-1],t=Bo(s,l=(u-(e-1)*(h=Zt(c[p]))*To[p])/2),a=Bo(n,-l);else if(i<d&&p!==_o){var g=0;do{for(p=Xo[++f],g=0,l=2*To[p];h=c[p][g],++g<c[p].length&&l*h<u;);}while(p!==_o&&l*h<u);0<(l=(l*h-u)/2)&&(t=Bo(s,-l),a=Bo(n,l),t=Bo(t,_(a,r.min,r.max)-a),a=Bo(a,_(t,r.min,r.max)-t))}}return t&&a&&0<jo(a,t)?{min:t,max:a,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},n.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<o.min&&(t.min=o.min),t.max>o.max)&&(t.max=o.max),t},n.prototype.range=function(){return this.dataRange.displayRange()},n.prototype.createLabels=function(){Yo.prototype.createLabels.call(this),this.createRangeLabels()},n.prototype.clearLabels=function(){Yo.prototype.clearLabels.call(this),this.rangeLabels=[]},n.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Yo.prototype.arrangeLabels.call(this)},n.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(i=e?t.y1-o.box.height()/2:t.x1,this.positionLabel(o,r,i)),o=n[1])&&(i=e?t.y2-o.box.height()/2:t.x2,this.positionLabel(o,r,i))},n.prototype.autoRotateLabels=function(){Yo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){Yo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},n.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length&&s(o,e[i]);i++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1))}},n.prototype.contentBox=function(){for(var t=Yo.prototype.contentBox.call(this),e=this.rangeLabels,o=0;o<e.length;o++){var i=e[o];i.options.visible&&t.wrap(i.box)}return t},n.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,i=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,o.dataItem=i,this.axisLabelText(r,e,o));if(n)return new bm(r,n,t,i,e)},n.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,o=this.options,r=Object.assign({},o.labels,o.rangeLabels,{align:b,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,o.autoRotateRangeLabels=!0),o=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||o,(o=function(t,e,o){o&&(e=new bm(e,o,t,null,r),i.append(e),i.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),o(1,t,this.axisLabelText(t,r,{index:1,count:2})))},n.prototype.autoRotateRangeLabels=function(){var t,e,i=this,o=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===o.length&&(t=function(t,e,o){e=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,e);0!==o&&(t.options.rotation=o,t.reflow(new E))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},n.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},n.prototype.slot=function(t,e,o){var i=this.dataRange,i=(t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e)),this.getSlot(t,e,o));if(i)return i.toRect()},n.prototype.getSlot=function(t,e,o){return typeof t==it&&(t=this.categoryIndex(t)),typeof e==it&&(e=this.categoryIndex(e)),Yo.prototype.getSlot.call(this,t,e,o)},n.prototype.valueRange=function(){var t=Zo(this.options.srcCategories);return{min:Ro(t.min),max:Ro(t.max)}},n.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},n.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},n.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},n.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},n.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},n.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},n.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},n.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},n.prototype.totalRange=function(){return this.dataRange.total()},n.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},n.prototype.totalCount=function(){return this.dataRange.totalCount()},n.prototype.isEmpty=function(){return!this.options.srcCategories.length},n.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=Zo((t=this.options).srcCategories),new Ko(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())},e(t=n,{type:Y,labels:{dateFormats:o},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});const Mm=t;function Jo(t,e){return M(Math.floor(t/e)*e,g)}function ti(t,e){return M(Math.ceil(t/e)*e,g)}function ei(t){return Math.max(Math.min(t,3e5),-3e5)}var oi,ii=Math.pow(10,1-g),t,ri,t,ni,o,si,t,ai,o;function pi(t,e,o,i){oi.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function hi(t,e,o){t=M(Math.abs(t%e),g);return 0===t||e*(1-o)<t}(oi=Pm)&&(pi.__proto__=oi),((pi.prototype=Object.create(oi&&oi.prototype)).constructor=pi).prototype.initUserOptions=function(t){a=t.seriesMin,o=t.seriesMax,i=(r=t).narrowRange,e=function(t){if(!t&&!o)return 0;if(0<=t&&0<=o){var e=t===o?0:t;if(!1===i||!i&&.2<(o-e)/o)return 0;e=Math.max(0,e-(o-e)/2)}else e=t;return e}(a),a=function(t,e,o){if(!t&&!e)return 1;if(t<=0&&e<=0){var i=t===e?0:e,r=Math.abs((i-t)/i);if(!1===o||!o&&.2<r)return 0;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(a,o,i),n=Oe(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&hi(e,n,1/3)&&(e-=n),0<a)&&hi(a,n,1/3)&&(a+=n),s.min=Jo(e,n),s.max=ti(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:T((a=t).min)?Math.min(e.min,a.min):e.min,max:T(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var p=s,h=["min","max"],l=0;l<h.length;l++){var c=h[l];null===p[c]&&(p[c]=void 0)}var u=T(s.min),d=T(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=Jo(n.min,s.majorUnit),n.max=ti(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=Oe(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=x(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},pi.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},pi.prototype.clone=function(){return new pi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},pi.prototype.startValue=function(){return 0},pi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},pi.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(M(e/t,X))+1)},pi.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&h.push(M(l,X)),l+=a*r;return h},pi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},pi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},pi.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,r=r.lineStart,p=s*(p/(i.max-i.min)),h=O(t,e||0),e=O(e,t||0),t=(o&&(h=_(h,i.min,i.max),e=_(e,i.min,i.max)),Math.min(h,e)-i.min),o=Math.max(h,e)-i.min,h=new E(a.x1,a.y1,a.x1,a.y1);return h[n+1]=ei(r+p*(0<s?t:o)),h[n+2]=ei(r+p*(0<s?o:t)),h},pi.prototype.getValue=function(t){var e=this.options,o=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:M(e+t*(o-e),g)},pi.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=M(t/(n/(r-e)),g);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},pi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},pi.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=M(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new bm(i,o,t,null,e)},pi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},pi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},pi.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(o,t))return{min:o,max:t}},pi.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=(1-e)*t,e=M(this.options.min+e*t,g),t=M(this.options.max-o,g);return{min:e,max:t=t-e<ii?e+ii:t}},pi.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,t=this.scaleRange(t,e);return{min:_(t.min,o,i),max:_(t.max,o,i),narrowRange:!1}},pi.prototype.isValidRange=function(t,e){return ii<e-t},e(t=pi,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:G},labels:{format:"#.####################"},zIndex:1});const Om=t;function li(t,e,o,i){var r,n,s,a,p,h,l,t=Ro(t),e=Ro(e),c=i.intl,o=o||{},u=(u=t,r=e,n=o=x(o||{},{min:No(c,o.min),max:No(c,o.max),axisCrossingValue:Go(c,o.axisCrossingValues||o.axisCrossingValue),weekStartDay:Wo(o,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Oo(r,u),a=yo,Po<=s?a=_o:Ao<=s?a=xo:ko<=s?a=mo:So<=s&&(a=vo),a):yo),a=To[s],p=n.weekStartDay||0,u=Lo(d(u)-1,s,p)||Ro(r),r=zo(d(r)+1,s,p),a=n.majorUnit||ti(Oe(u.getTime(),r.getTime()),a)/a,h=ti(h=Uo(u,r,s),a)-h,l=Math.floor(h/2),h-=l,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Eo(u,-l,s,p),n.max=n.max||Eo(r,h,s,p),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,o=n,ri.call(this,o,i),this.intlService=c,this.seriesMin=t,this.seriesMax=e,o.weekStartDay||0);this.totalMin=d(Lo(d(t)-1,o.baseUnit,u)),this.totalMax=d(zo(d(e)+1,o.baseUnit,u))}(ri=Pm)&&(li.__proto__=ri),((li.prototype=Object.create(ri&&ri.prototype)).constructor=li).prototype.clone=function(){return new li(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},li.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},li.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Uo(e.min,e.max,e.baseUnit)/t+1)},li.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/jo(e.max,e.min),p=e.weekStartDay||0,h=[n],l=1;l<s;l++){var c=n+jo(Eo(e.min,l*t,e.baseUnit,p),e.min)*a*i;h.push(M(c,X))}return h},li.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},li.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},li.prototype.getSlot=function(t,e,o){return Om.prototype.getSlot.call(this,No(this.intlService,t),No(this.intlService,e),o)},li.prototype.getValue=function(t){t=Om.prototype.getValue.call(this,t);return null!==t?Ro(t):null},li.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},li.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min,r=(0<r&&(s=Eo(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new bm(s,n,t,null,e)},li.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,o=i?o.height():o.width(),n=this.range(),o=o/jo(n.max,n.min),n=M(t/o,g);return{min:Bo(e.min,n=!i&&!r||i&&r?n:-n),max:Bo(e.max,n),offset:n}},li.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Vo(t,e.min)&&Vo(t,e.max)<=0},li.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(d(t.min),d(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Ro(t.min),max:Ro(t.max)}},li.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);return{min:Ro(o),max:Ro(t)}},li.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=e*t,e=(1-e)*t,t=Ro(d(this.options.min)+o),o=Ro(d(this.options.max)-e);return{min:t,max:o=o-t<1e3?Ro(d(t)+1e3):o}},li.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:Ro(_(d(t.min),this.totalMin,this.totalMax)),max:Ro(_(d(t.max),this.totalMin,this.totalMax))}},e(t=li,{type:Y,majorGridLines:{visible:!0,width:1,color:G},labels:{dateFormats:o}});const Bm=t;function ci(t,e,o,i){var r,n,s,a,p,h=x({majorUnit:10,min:t,max:e},o),l=h.majorUnit,c=(c=M(di(p=e,u=l),g)%1,p<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,di(p,u)+.2):Math.pow(u,Math.ceil(di(p,u)))),u=(p=t,s=(u=h).majorUnit,(a=p)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(di(p,s)))),a),d=(p=u,s=c,a=o,r=(d=h).min,n=d.max,T(d.axisCrossingValue)&&d.axisCrossingValue<=0&&ui(),T(a.max)?a.max<=0&&ui():n=s,T(a.min)?a.min<=0&&ui():r=p,{min:r,max:n});h.max=d.max,h.min=d.min,h.minorUnit=o.minorUnit||M(l-1,g),ni.call(this,h,i),this.totalMin=T(o.min)?Math.min(u,o.min):u,this.totalMax=T(o.max)?Math.max(c,o.max):c,this.logMin=M(di(d.min,l),g),this.logMax=M(di(d.max,l),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function ui(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function di(t,e){return Math.log(t)/Math.log(e)}(ni=Pm)&&(ci.__proto__=ni),((ci.prototype=Object.create(ni&&ni.prototype)).constructor=ci).prototype.clone=function(){return new ci(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ci.prototype.startValue=function(){return this.options.min},ci.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,i=i.max,p=this.lineInfo(),h=p.axis,l=p.axisDir,c=p.lineBox,u=p.lineSize,p=p.lineStart,u=l*(u/(n-r)),n=O(t,e||1),e=O(e,t||1);if(n<=0||e<=0)return null;o&&(n=_(n,a,i),e=_(e,a,i));n=di(n,s),e=di(e,s),t=Math.min(n,e)-r,o=Math.max(n,e)-r,a=new E(c.x1,c.y1,c.x1,c.y1);return a[h+1]=ei(p+u*(0<l?t:o)),a[h+2]=ei(p+u*(0<l?o:t)),a},ci.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:M(Math.pow(e,o+s*((i-o)/r)),g)},ci.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ci.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=M(t/(s/(i-o)),g);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},ci.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},ci.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},ci.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(lo(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),i.visible&&this.traverseMinorTicksPositions(p,i),[]},ci.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){u(t,n)||(r.position=t,s.append(co(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},ci.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(M(i+r*(a-n),g),e)},ci.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,p=o.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(M(a+p*(di(f,s)-h),g),e)}},ci.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new bm(i,o,t,null,e)},ci.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ci.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ci.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},ci.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=di(this.options.min,o),r=di(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),o=Math.pow(o,r-(1-e)*t);return{min:i,max:o=o-i<1e-6?i+1e-6:o}},ci.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,o=this.totalMax;return{min:_(t.min,e,o),max:_(t.max,e,o)}},ci.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,e=e.majorUnit,i=Math.pow(e,t);return{value:i,minorStep:(Math.pow(e,t+1)-i)/o}},ci.prototype.lineInfo=function(){var t=ni.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},e(o=ci,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:G},zIndex:1,_deferLabels:!0});const Rm=o,Im={createGridLines:function(t){var e,o=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,i,o.majorGridLines)),o.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),Ft(r,this.renderMinorGridLines(e,i,o.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){i=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,i)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},o=this.box.center(),n=new A.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new A.drawing.Path(r);i&&(n.radius=i(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,e=this.intervals(e,o,i,r),o=t.options,s=o.visible&&!1!==(o.line||{}).visible;return Vt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};function fi(){si.apply(this,arguments)}(si=Tm)&&(fi.__proto__=si),((fi.prototype=Object.create(si&&si.prototype)).constructor=fi).prototype.range=function(){return{min:0,max:this.options.categories.length}},fi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},fi.prototype.lineBox=function(){return this.box},fi.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new E,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},fi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=o||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=M(r,X)%360,i&&u(r,i)||h.push(r);return h},fi.prototype.majorIntervals=function(){return this.intervals(1)},fi.prototype.minorIntervals=function(){return this.intervals(.5)},fi.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},fi.prototype.majorAngles=function(){var e=this;return Vt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},fi.prototype.createLine=function(){return[]},fi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},fi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,e=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,e)},fi.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==N)return t=Kt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&u(t,r)?e:i}},fi.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new A.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from),a=(r.startAngle+=s*n.angle,Math.ceil(i.to)-i.to),a=(r.angle-=(a+s)*n.angle,um.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},fi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},fi.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,o=(o.reverse&&!i&&(t=(t+1)%s),n[t=_(Math.floor(t),0,s-1)]),n=(i&&(o-=a/2)<0&&(o+=360),a*(_(Math.ceil(e||t),t,s-1)-t+1));return new lm(r.center(),0,r.height()/2,o,n)},fi.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new A.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},fi.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++)if(this.getSlot(i).containsPoint(t)){o=i;break}return o},e(t=fi,{startAngle:90,labels:{margin:P(10)},majorGridLines:{visible:!0},justified:!0}),x(t.prototype,Im);const Em=t;function gi(t,e){ai.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}(ai=Pm)&&(gi.__proto__=ai),((gi.prototype=Object.create(ai&&ai.prototype)).constructor=gi).prototype.getDivisions=function(t){return Om.prototype.getDivisions.call(this,t)-1},gi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},gi.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,o=o.step||1,r=new E,n=this.intervals(t.majorUnit,i,o),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},gi.prototype.lineBox=function(){return this.box},gi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&u(h,i)||s.push(h)}return s},gi.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},gi.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},gi.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},gi.prototype.createLine=function(){return[]},gi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},gi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,e=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,e)},gi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},gi.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=_(t,o.min,o.max),e=_(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(o=t,t=e,e=o),new lm(i.center(),0,i.height()/2,t,e-t)},gi.prototype.slot=function(t,e){var o=this.options,i=360-o.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=o.reverse?(s=n,t):(s=360-t,360-n),s=(s+i)%360;return new A.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},gi.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,t=t.y-o.y,o=Math.round(Nt(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},gi.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e(o=gi,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:P(10)},majorGridLines:{color:G,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(o.prototype,Im,{createPlotBands:Em.prototype.createPlotBands,majorAngles:Em.prototype.majorAngles,range:Om.prototype.range,labelsCount:Om.prototype.labelsCount,createAxisLabel:Om.prototype.createAxisLabel});const Lm=o;function yi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var vi,t={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var t=this.plotArea.polarAxis,i=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new A.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new lm(r,r.y-a.y2,r.y-a.y1,0,360),a=e===N?um.current.createRing(a,p):A.drawing.Path.fromPoints(this.plotBandPoints(a,i),p).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new A.geometry.Circle(r,t.innerRadius),s=new A.geometry.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),Ft(r,this.renderGridLines(t,o,i,e.minorGridLines))),r},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip,s=(void 0===n&&(n=0),i.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new A.geometry.Circle([t.x,t.y],h);if(i.type===N)a.append(new A.drawing.Circle(l,r));else{for(var c=new A.drawing.Path(r),u=0;u<o.length;u++)c.lineTo(l.pointAt(o[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,o,i=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==N&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(Nt(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return yi(t,o)-yi(e,o)}),r=90-yi(n[0],n[1])/2,t=180-yi(o,n[0])-r,a=s*(Math.sin(Kt(t))/Math.sin(Kt(r)))),this.axisType().prototype.getValue.call(this,new I(i.x1,i.y2-a))}},o,mi,xi,_i,o;function bi(){vi.apply(this,arguments)}(vi=Om)&&(bi.__proto__=vi),((bi.prototype=Object.create(vi&&vi.prototype)).constructor=bi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},bi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},bi.prototype.axisType=function(){return vi},x((o=bi).prototype,t);const zm=o;function wi(){mi.apply(this,arguments)}(mi=Rm)&&(wi.__proto__=mi),((wi.prototype=Object.create(mi&&mi.prototype)).constructor=wi).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},wi.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},wi.prototype.axisType=function(){return mi},x((o=wi).prototype,t);const Vm=o;function Ci(t){return t<=0?-1:1}(xi=A.Class)&&(Si.__proto__=xi),((Si.prototype=Object.create(xi&&xi.prototype)).constructor=Si).prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),!(r<2||2===r&&e[0].equals(e[1]))){var n,s=e[0],a=e[1],p=e[2];for(o.push(new A.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),Zt(o).controlOut(this.firstControlPoint(t,s,a,y,v)),o.push(new A.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{i?(s=e[r-1],a=e[0],p=e[1],l=(t=this.controlPoints(s,a,p))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var h,l,c=l,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],p=e[u+2],h=this.controlPoints(s,a,p),Zt(o).controlOut(c),c=h[1],h=h[0],o.push(new A.geometry.Segment(a,h)));i?(s=e[r-2],a=e[r-1],p=e[0],t=this.controlPoints(s,a,p),Zt(o).controlOut(c),o.push(new A.geometry.Segment(a,t[0])),Zt(o).controlOut(t[1]),o.push(new A.geometry.Segment(p,n))):(l=this.tangent(a,p,y,v),Zt(o).controlOut(c),o.push(new A.geometry.Segment(p,this.secondControlPoint(l,a,p,y,v))))}}return o},Si.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)},Si.prototype.invertAxis=function(t,e,o){var i,r=!1;return t.x===e.x?r=!0:e.x===o.x?(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0):(i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x),t.y<=e.y&&o.y<=i||e.y<=t.y&&o.y>=i||(r=!0)),r},Si.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||M(i,1)===M(o.y,1)},Si.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Si.prototype.controlPoints=function(t,e,o){var i,r=y,n=v,s=!1,a=!1,p=(this.isLine(t,e,o)?i=this.tangent(t,e,y,v):(p={x:this.isMonotonicByField(t,e,o,y),y:this.isMonotonicByField(t,e,o,v)}).x&&p.y?(i=this.tangent(t,o,y,v),s=!0):(this.invertAxis(t,e,o)&&(r=v,n=y),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Ci((o[n]-t[n])*(e[r]-t[r])):-Ci((o[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(i,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(i,e,o,r,n));return s&&(this.restrictControlPoint(t,e,p,i),this.restrictControlPoint(e,o,a,i)),[p,a]},Si.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},Si.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],e=e[i]-t[i];return 0==o?0:e/o},Si.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Si.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],o=.333*(o[i]-n);return this.point(n+o,e[r]+o*t,i,r)},Si.prototype.secondControlPoint=function(t,e,o,i,r){var e=e[i],n=o[i],e=.333*(n-e);return this.point(n-e,o[r]-e*t,i,r)},Si.prototype.point=function(t,e,o,i){var r=new A.geometry.Point;return r[o]=t,r[i]=e,r},Si.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i};const jm=Si;function Si(t){xi.call(this),this.closed=t}function ki(t){_i.call(this),this._axis=t,this.options=t.options}(_i=A.Class)&&(ki.__proto__=_i),((ki.prototype=Object.create(_i&&_i.prototype)).constructor=ki).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},ki.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},ki.prototype.range=function(){return this._axis.range()},ki.prototype.valueRange=function(){return this._axis.valueRange()};const Dm=ki;function Ai(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Dm(e[o])}function Pi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Pi.prototype.findAxisByName=function(t){return Ai(t,this._pane.axes)};const Hm=Pi,Fm=((H=A.Class)&&(Ti.__proto__=H),(Ti.prototype=Object.create(H&&H.prototype)).constructor=Ti);function Ti(t){H.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Mi(t){for(var e=t.length,o=0,i=0;i<e;i++)m(t[i])&&o++;return o}var Oi={min:function(t){for(var e=t.length,o=tt,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.min(o,r))}return o===tt?t[0]:o},max:function(t){for(var e=t.length,o=et,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.max(o,r))}return o===et?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];m(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Mi(t)?Oi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&T(r)&&o++}return o},avg:function(t){var e=Mi(t),o=t[0];return o=0<e?Oi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&T(i))return i}return t[0]}},Bi,t;const Um=Oi;function Ri(t,e){return null===e?e:Mt(t)(e)}function Ii(){Bi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}(Bi=A.Class)&&(Ii.__proto__=Bi),((Ii.prototype=Object.create(Bi&&Bi.prototype)).constructor=Ii).prototype.register=function(t,e,o){void 0===e&&(e=[at]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Ii.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Ii.prototype.valueFields=function(t){return this._valueFields[t.type]||[at]},Ii.prototype.otherFields=function(t){return this._otherFields[t.type]||[at]},Ii.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=T(o)?o:a[e],a={valueFields:{value:o}},e=this.valueFields(t),p=this._otherFields[t.type];return null===o?i=this._nullValue[t.type]:T(o)?Array.isArray(o)?(r=o.slice(e.length),i=this._bindFromArray(o,e),r=this._bindFromArray(r,p)):"object"==typeof o&&(n=this.sourceFields(t,e),s=this.sourceFields(t,p),i=this._bindFromObject(o,e,n),r=this._bindFromObject(o,p,s)):i=this._undefinedValue[t.type],T(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Ii.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Ii.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},Ii.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=Ri(a,t))}return i},Ii.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===at?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},(t=Ii).current=new t;const Nm=t;var Ei,Li=/percent(?:\w*)\((\d+)\)/,zi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");function Vi(t,e,o){Ei.call(this),this.initGlobalRanges(t,e,o)}(Ei=A.Class)&&(Vi.__proto__=Ei),((Vi.prototype=Object.create(Ei&&Ei.prototype)).constructor=Vi).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,p=zi.exec(t);p?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),p=p[1]?parseFloat(p[1]):1,n={low:i.value-r*p,high:i.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Vi.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Nm.current,n=r.valueFields(t),i=T(i[0])?i[0]:{};return ht(i)?o=Mt("["+(e?n.indexOf(e):0)+"]"):m(i)?o=Mt():typeof i==it&&(o=Mt(r.sourceFields(t,n)[n.indexOf(e)])),o},Vi.prototype.getErrorRange=function(t,e){var o;if(!T(e))return null;if(this.globalRange)return this.globalRange(t);if(ht(e))i=t-e[0],r=t+e[1];else if(m(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Li.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(o[1])/100),i=t-Math.abs(e),r=t+Math.abs(e)}return{low:i,high:r}},Vi.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Vi.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,o=o?e.count-1:e.count,r=0,n=0;n<i;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},Vi.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(o+=n,i++)}return{value:o/i,count:i}};const Gm=Vi;var ji,Di,o=A.support.browser||{},Hi=600,Fi="fadeIn",Ui=o.msie?.001:0,Ni="errorLow",Gi="errorHigh",Wi="zero",Xi="interpolate",qi="above",Yi="below",Zi="smooth",Qi="step",Ki="area",$i="bar",Ji="boxPlot",tr="bubble",er="bullet",or="candlestick",ir="column",rr="donut",nr="funnel",sr="pyramid",ar="heatmap",pr="horizontalWaterfall",hr="line",lr="ohlc",cr="pie",ur="polarArea",dr="polarLine",fr="polarScatter",gr="radarArea",yr="radarColumn",vr="radarLine",mr="rangeArea",xr="rangeBar",_r="rangeColumn",br="scatter",wr="scatterLine",Cr="verticalArea",Sr="verticalBoxPlot",kr="verticalBullet",Ar="verticalLine",Pr="verticalRangeArea",Tr="waterfall",Mr=[$i,ir,lr,or,Ji,Sr,er,_r,xr,Tr,pr],t,o,Or=[t="linearTrendline",o="movingAverageTrendline"],Br="seriesClick",Rr="seriesHover",Ir="seriesOver",Er="seriesLeave",Lr="plotAreaHover",zr="plotAreaLeave",Vr="drag",jr="dragEnd",Dr="dragStart",Hr="zoomStart",Fr="zoom",Ur="zoomEnd",Nr="selectStart",Gr="select",Wr="selectEnd",Xr="showTooltip",qr="hideTooltip",Yr="log",t="category",Zr="insideEnd",Qr="outsideEnd",Kr="wheel",o="drilldown",s;function $r(t,e,o,i,r,n){ji.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}(ji=L)&&($r.__proto__=ji),(($r.prototype=Object.create(ji&&ji.prototype)).constructor=$r).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,i),s=i?n.x:n.y,a=s-t,s=s+t;i?(e=[new I(n.x,r.y1),new I(n.x,r.y2)],o&&e.push(new I(a,r.y1),new I(s,r.y1),new I(a,r.y2),new I(s,r.y2)),this.box=new E(a,r.y1,s,r.y2)):(e=[new I(r.x1,n.y),new I(r.x2,n.y)],o&&e.push(new I(r.x1,a),new I(r.x1,s),new I(r.x2,a),new I(r.x2,s)),this.box=new E(r.x1,a,r.x2,s)),this.linePoints=e},$r.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},$r.prototype.createVisual=function(){var e=this,t=this.options,o=t.visual;o?this.visual=o({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},$r.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};ji.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new A.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);dt(r),this.visual.append(r)}},e(s=$r,{animation:{type:Fi,delay:Hi},endCaps:!0,line:{width:2},zIndex:1});const Wm=s;function Jr(){Di.apply(this,arguments)}(Di=Wm)&&(Jr.__proto__=Di),((Jr.prototype=Object.create(Di&&Di.prototype)).constructor=Jr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const Xm=Jr;function tn(t){for(var e=0;e<t.length;e++)if(T(t[e].zIndex))return!0}function en(t,e){null!==e&&t.push(e)}function on(t){return Mi(t)===t.length}function rn(t,e,o){var e=e.visible;return T(e)?e:(e=t.pointVisibility)?e[o]:void 0}function nn(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Nm.current.bindPoint(t,n),a=s.valueFields.value;m(a=gt(a)?parseFloat(a):a)?(s.visible=!1!==rn(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function sn(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}function an(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var pn=5;function hn(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,p=!1;if(o.excluded=o.excluded||[],pn<a)return null;for(r in t)!u(r,o.excluded)&&t.hasOwnProperty(r)&&(vt(n=t[r])?(p=!0,i||(t[r]=O(n(e),s[r]))):_t(n)&&(i||(o.defaults=s[r]),o.depth++,p=hn(n,e,o,i)||p,o.depth--));return p}function ln(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,i)&&o.push(n)}return o}function cn(t,e,o){var i,r;return null===e?e:((r=e[i="_date_"+t])||(r=No(o,Mt(t)(e)),e[i]=r),r)}function un(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function dn(t){return T(t)&&null!==t}function fn(t,e){t=t.type,e=e instanceof Date;return!t&&e||an(t,Y)}function gn(t){return 1===t.length?t[0]:t}var yn=/area/i,vn,s,mn,s,xn,s;function _n(t,e){var o,i=Nm.current.bindPoint(t,null,e).valueFields;for(o in i)if(yt(i[o]))return!0}function bn(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=i;p(l+=r)&&(e=_n(h,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function wn(t,e,o,i,r){var n,s,a,p,h=e.min,e=e.max,l=0<h&&h<o,c=e+1<o;(l||c)&&(((p=t).missingValues||(yn.test(p.type)||p.stack?Wi:Xi))!==Xi?(l&&(n=i(h-1)),c&&(s=i(e+1))):(l&&(n=_n(t,(a=i(h-1)).item)?a:bn({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=_n(t,(a=i(e+1)).item)?a:bn({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function Cn(t,e){vn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}(vn=L)&&(Cn.__proto__=vn),((Cn.prototype=Object.create(vn&&vn.prototype)).constructor=Cn).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Cn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{vertical:!this.options.invertAxes},t)),i},Cn.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,p=o[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||m(p.value)&&(r+=Math.abs(p.value),i.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},Cn.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===st&&h!==l)continue;if(h.group&&h.group!==l.group)continue}h=this.plotValue(p);(0<=h&&r||h<0&&!r)&&(n+=h,i+=h,s=!0,this.options.isStacked100)&&(i=Math.min(i,1))}return s&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,yt(t.value)?t.value:e]},Cn.prototype.stackLimits=function(t,e){for(var o=tt,i=et,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],T(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},Cn.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,pe(n.negative).min)),n.positive.length)&&(p.max=Math.max(p.max,pe(n.positive).max)),p.min!==tt||p.max!==et?i[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},Cn.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields[Ni],e=e.fields[Gi];m(p)&&m(e)?i={low:p,high:e}:a&&T(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Gm(a.value,n,at),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},Cn.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},o={categoryIx:e,series:n}),this.updateRange({value:a},o)),new Xm(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},Cn.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,t=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:i,high:t}},Cn.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o],s=(n||(this.categoryPoints[o]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,T(r.dataItem)||(r.dataItem=i.data[o]),this.addErrorBar(r,t,o)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},Cn.prototype.evalPointOptions=function(t,e,o){var i=o.categoryIx,r=o.category,n=o.series,o=o.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory"]},a=this._evalSeries[o],o=(T(a)||(this._evalSeries[o]=a=hn(t,{},s,!0)),t);return a&&hn(o=x({},o),{value:e,category:r,index:i,series:n,dataItem:n.data[i]},s),o},Cn.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,o=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((o=this.valueAxisRanges[e]=o||{min:tt,max:et}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},Cn.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},Cn.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o,i=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=p[l++],n=a[i];n||(a[i]=n=s.categorySlot(h,i,e)),r&&(i=s.plotRange(r,e.startValue()),(o=s.valueSlot(e,i))?(n=s.pointSlot(n,o),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=i[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},Cn.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Cn.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Zt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},Cn.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Cn.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},Cn.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Cn.prototype.reflowPoint=function(t,e){t.reflow(e)},Cn.prototype.reflowCategories=function(){},Cn.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new E(i.x1,o.y1,i.x2,o.y2)},Cn.prototype.categorySlot=function(t,e){return t.getSlot(e)},Cn.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=sn(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this.plotArea.bindPoint(a,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},Cn.prototype._outOfRangeCallback=function(t,e,o,i){var r,e=t[e];e&&(r=e.categoryIx,i(this.plotArea.bindPoint(t,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:o,dataItem:e.item}))},Cn.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Cn.prototype.pointValue=function(t){return t.valueFields.value},e(s=Cn,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const qm=s,Ym={click:function(t,e){return t.trigger(Br,this.eventArgs(e))},hover:function(t,e){return t.trigger(Rr,this.eventArgs(e))},over:function(t,e){return t.trigger(Ir,this.eventArgs(e))},out:function(t,e){return t.trigger(Er,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:qt(t),originalEvent:t,point:this}}},Zm={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&T(e)&&null!==e&&(this.note=new wm({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};function Sn(t,e){mn.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0}(mn=L)&&(Sn.__proto__=mn),((Sn.prototype=Object.create(mn&&mn.prototype)).constructor=Sn).prototype.render=function(){var t,e,o=this.options,i=o.markers,o=o.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(i=At(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new xm(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Sn.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return T(t.color)||(t.color=new A.Color(e).brightness(.8).toHex()),t},Sn.prototype.createVisual=function(){},Sn.prototype.createMarker=function(){var t=this.options.markers;return new fm({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,zIndex:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Sn.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Sn.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical,r=(this.render(),(this.box=t).clone());if(i?o?r.y1-=r.height():r.y2+=r.height():o?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(i=t.center(),t=new E(i.x,i.y,i.x,i.y)),this.note.reflow(t))},Sn.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e=(e=e===qi?k:e)===Yi?w:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Sn.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),i=new fm({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:O(t.border.opacity,1)},opacity:O(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},Sn.prototype.highlightVisual=function(){return(this.marker||{}).visual},Sn.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,o=this.box.center(),i=new A.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},Sn.prototype.tooltipAnchor=function(){var t,e,o=this.markerBox(),i=this.owner.pane.clipBox();if(!i||i.overlaps(o))return i=o.x2+5,e=C,o=this.aboveAxis?(t=o.y1,w):(t=o.y2,k),{point:new I(i,t),align:{horizontal:e,vertical:o}}},Sn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Sn.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Sn.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Sn.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},(s=Sn).prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:W,border:{width:2},opacity:1},labels:{visible:!1,position:qi,margin:P(3),padding:P(4),animation:{type:Fi,delay:Hi}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},x(s.prototype,Ym),x(s.prototype,Zm);const Qm=s;function kn(t,e,o){xn.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}(xn=L)&&(kn.__proto__=xn),((kn.prototype=Object.create(xn&&xn.prototype)).constructor=kn).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},kn.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},kn.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!T(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},kn.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(vt(o)&&i&&(o=i.color),A.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&i.close(),this.visual=i},kn.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e(s=kn,{closed:!1});const Km=s;function An(t,e,o,i,r){var t=t.box,n=new A.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var Pn,Tn,s={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?y:v,n=i?v:y,s=e?2:1,a=s,p=An(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=An(t[l],r,s,n,a);p[r]!==u[r]&&((c=new A.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return o?p!==Zt(h)&&h.push(p):h.push(An(Zt(t),r,s,n,e?1:2)),h}},p;function Mn(){Pn.apply(this,arguments)}(Pn=Km)&&(Mn.__proto__=Pn),((Mn.prototype=Object.create(Pn&&Pn.prototype)).constructor=Mn).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},x((p=Mn).prototype,s);const $m=p;function On(){Tn.apply(this,arguments)}(Tn=Km)&&(On.__proto__=Tn),((On.prototype=Object.create(Tn&&Tn.prototype)).constructor=On).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(vt(o)&&e&&(o=e.color),new jm(this.options.closed).process(this.points())),o=new A.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});o.segments.push.apply(o.segments,e),this.visual=o};const Jm=On;var Bn,p={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==Xi&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(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){t=t.missingValues;return!t&&this.options.isStacked?Wi:t||Xi},getNearestPoint:function(t,e,o){for(var i,r=new I(t,e),n=this.seriesPoints[o],s=tt,a=0;a<n.length;a++){var p,h=n[a];h&&T(h.value)&&null!==h.value&&!1!==h.visible&&(p=h.box.center().distanceTo(r))<s&&(i=h,s=p)}return i}},h,Rn,In,h,En,Ln,zn,Vn,h,jn,h,Dn,h,Hn,h,Fn,h,Un,h,Nn,h,Gn,h,Wn,Xn,qn,Yn,h,Zn,h,Qn,h,Kn,h,$n,h,Jn,h,ts,h,es,h,os,l,is,l,rs,l;function ns(){Bn.apply(this,arguments)}(Bn=A.drawing.Animation)&&(ns.__proto__=Bn),((ns.prototype=Object.create(Bn&&Bn.prototype)).constructor=ns).prototype.setup=function(){this._setEnd(this.options.box.x1)},ns.prototype.step=function(t){var e=this.options.box;this._setEnd(It(e.x1,e.x2,t))},ns.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),o=o[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)},e(h=ns,{duration:Hi}),A.drawing.AnimationFactory.current.register("clip",h);const tx=h,ex={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=A.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new tx(t,{box:e}),tn(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&T(i.visual.options.zIndex)&&i.visual.clip(t)}}};function ss(){Rn.apply(this,arguments)}(Rn=qm)&&(ss.__proto__=Rn),((ss.prototype=Object.create(Rn&&Rn.prototype)).constructor=ss).prototype.render=function(){Rn.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},ss.prototype.pointType=function(){return Qm},ss.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=this.seriesMissingValues(o),n=t.valueFields.value;if(!T(n)||null===n){if(r!==Wi)return null;n=0}r=this.pointOptions(o,i),r=this.evalPointOptions(r,n,e),i=t.fields.color||o.color,vt(o.color)&&(i=r.color),e=new Qm(n,r);return e.color=i,this.append(e),e},ss.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},ss.prototype.createSegment=function(t,e,o){var i=e.style;return new(i===Qi?$m:i===Zi?Jm:Km)(t,e,o)},ss.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},ss.prototype.supportsPointInactiveOpacity=function(){return!1},x((h=ss).prototype,p,ex);const ox=h;function as(t,e,o,i,r){In.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}(In=Km)&&(as.__proto__=In),((as.prototype=Object.create(In&&In.prototype)).constructor=as).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;vt(i)&&e&&(i=e.color),this.visual=new A.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:x({color:i,opacity:t.opacity,lineCap:"butt"},o)})},as.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},as.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},as.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},as.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},as.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new A.geometry.Segment(t)})},as.prototype.createStroke=function(t){t=new A.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},as.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},as.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),Ft(o,r)),new A.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},as.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(i),i=i.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=Zt(e).anchor(),i=o?i.x1:i.y1;o?t.lineTo(i,e.y).lineTo(i,r.y):t.lineTo(e.x,i).lineTo(r.x,i)};const ix=as;function ps(){En.apply(this,arguments)}(En=ix)&&(ps.__proto__=En),((ps.prototype=Object.create(En&&En.prototype)).constructor=ps).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},ps.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},x((h=ps).prototype,s);const rx=h;function hs(){Ln.apply(this,arguments)}(Ln=ix)&&(hs.__proto__=Ln),((hs.prototype=Object.create(Ln&&Ln.prototype)).constructor=hs).prototype.createStrokeSegments=function(){var t=new jm(this.options.closed),e=this.points();return t.process(e)},hs.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new A.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e};const nx=hs;function ls(){zn.apply(this,arguments)}(zn=ox)&&(ls.__proto__=zn),((ls.prototype=Object.create(zn&&zn.prototype)).constructor=ls).prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<o&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new(a===Qi?rx:a===Zi?nx:ix)(t,e,o,r,n)},ls.prototype.reflow=function(t){zn.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var o=0;o<e.length;o++){var i=e[o],r=this.categoryAxis.getSlot(i.categoryIx);i.reflow(r)}},ls.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?(o!==Qi&&r<p&&!i[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),o!==Qi&&p+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},ls.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;0<s&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},ls.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Qm(0,e);return e.categoryIx=t,e.series={},e},ls.prototype.seriesMissingValues=function(t){return t.missingValues||Wi},ls.prototype.supportsPointInactiveOpacity=function(){return!1};const sx=ls;function cs(){Vn.call(this),this.axisRanges={}}(Vn=A.Class)&&(cs.__proto__=Vn),((cs.prototype=Object.create(Vn&&Vn.prototype)).constructor=cs).prototype.update=function(t){var e,o=this.axisRanges;for(e in t){var i=t[e],r=o[e];o[e]=r=r||{min:tt,max:et},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},cs.prototype.reset=function(t){this.axisRanges[t]=void 0},cs.prototype.query=function(t){return this.axisRanges[t]};const ax=cs;function us(t,e,o){jn.call(this,e),this.textBox=new xm(t,this.options,o),this.append(this.textBox)}(jn=L)&&(us.__proto__=jn),((us.prototype=Object.create(jn&&jn.prototype)).constructor=us).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},us.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?b:C,n.vAlign=o?k:b,e.position===Zr?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=w)):n.align=i?S:C:e.position===b?(n.vAlign=b,n.align=b):"insideBase"===e.position?o?n.vAlign=i?w:k:n.align=i?C:S:e.position===Qr&&(p=o?i?new E(t.x1,t.y1-s.height(),t.x2,t.y1):new E(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=b,i?new E(t.x2,t.y1,t.x2+s.width(),t.y2):new E(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},us.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,o=e+"1",e=e+"2",i=this.children[0],r=this.parent.box;(r[o]<t[o]||t[e]<r[e])&&((i=i.paddingBox.clone())[o]=Math.max(r[o],t[o]),i[e]=Math.min(r[e],t[e]),this.reflow(i))},e(h=us,{position:Qr,margin:P(3),padding:P(4),color:G,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:Fi,delay:Hi},zIndex:2});const px=h;function ds(t,e){Dn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=O(this.options.aboveAxis,!0),this.value=t}(Dn=L)&&(ds.__proto__=Dn),((ds.prototype=Object.create(Dn&&Dn.prototype)).constructor=ds).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},ds.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=At(i))?e(t):this.formatValue(i.format),this.label=new px(e,x({vertical:o.vertical},i),t),this.append(this.label))},ds.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ds.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},ds.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(Dn.prototype.createVisual.call(this),i?(i=this.rectVisual=i({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new A.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},ds.prototype.createRect=function(t){var e=this.options,o=e.border,i=(T(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=A.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}})),i=this.box.width(),o=this.box.height();6<(e.vertical?i:o)&&(dt(r),i<1||o<1)&&(r.options.stroke.lineJoin="round"),t.append(r),un(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},ds.prototype.createHighlight=function(t){return dt(A.drawing.Path.fromRect(this.box.toRect(),t))},ds.prototype.highlightVisual=function(){return this.rectVisual},ds.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},ds.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=T(e)?e:new A.Color(t).brightness(o).toHex()},ds.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=C,h=k;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),h=w)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(h=w,t=s?(p=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,p=S),Math.max(n.y1,a.y1))),{point:new I(t,i),align:{horizontal:p,vertical:h}}},ds.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ds.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}},x((h=ds).prototype,Ym),x(h.prototype,Zm),h.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};const hx=h;function fs(t,e){t.forEach(e)}function gs(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}function ys(t){Hn.call(this,t),this.forEach=t.rtl?gs:fs}(Hn=L)&&(ys.__proto__=Hn),((ys.prototype=Object.create(Hn&&Hn.prototype)).constructor=ys).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+o+r*(n-1),p=(e?i.height():i.width())/a,h=i[s+1]+o/2*p;this.forEach(t,function(t,e){var o=(t.box||i).clone();o[s+1]=h,o[s+2]=h+p,t.reflow(o),e<n-1&&(h+=p*r),h+=p})},e(h=ys,{vertical:!1,gap:0,spacing:0});const lx=h;function vs(){Fn.apply(this,arguments)}(Fn=L)&&(vs.__proto__=Fn),((vs.prototype=Object.create(Fn&&Fn.prototype)).constructor=vs).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,o=this.children,i=o.length,r=this.box=new E,n=0;n<i;n++){var s,a=o[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},e(h=vs,{vertical:!0});const cx=h;function ms(){Un.apply(this,arguments)}(Un=qm)&&(ms.__proto__=Un),((ms.prototype=Object.create(Un&&Un.prototype)).constructor=ms).prototype.render=function(){Un.prototype.render.call(this),this.updateStackRange()},ms.prototype.pointType=function(){return hx},ms.prototype.clusterType=function(){return lx},ms.prototype.stackType=function(){return cx},ms.prototype.stackLimits=function(t,e){return Un.prototype.stackLimits.call(this,t,e)},ms.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.options,s=this.children,a=n.isStacked,p=this.pointValue(t),r=this.pointOptions(i,r),h=r.labels,h=(a&&h.position===Qr&&(h.position=Zr),r.isStacked=a,t.fields.color||i.color),t=(p<0&&r.negativeColor&&(h=r.negativeColor),r=this.evalPointOptions(r,p,e),vt(i.color)&&(h=r.color),new(this.pointType())(p,r)),e=(t.color=h,s[o]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(a?this.getStackWrap(i,e):e).append(t),t},ms.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===st){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}}else o=r[0];return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},ms.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(o=o.getSlot(e,e,!0),t[(e=i.invertAxes?y:v)+1]=t[e+2]=o[e+1]),t},ms.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ms.prototype.createAnimation=function(){this._setAnimationOptions(),Un.prototype.createAnimation.call(this),tn(this.options.series)&&this._setChildrenAnimation()},ms.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&T(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},ms.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),o.origin=new A.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},e(h=ms,{animation:{type:$i}});const ux=h;function xs(t,e){Nn.call(this,e),this.value=t}(Nn=L)&&(xs.__proto__=Nn),((xs.prototype=Object.create(Nn&&Nn.prototype)).constructor=xs).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=e.getSlot(o.open,o.close),e=e.getSlot(o.low,o.high),o=(i.x1=e.x1=t.x1,i.x2=e.x2=t.x2,this.realBody=i,e.center().x),t=[];t.push([[o,e.y1],[o,i.y1]]),t.push([[o,i.y2],[o,e.y2]]),this.lines=t,this.box=e.clone().wrap(i),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},xs.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},xs.prototype.createVisual=function(){Nn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},xs.prototype.mainVisual=function(t){var e=new A.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},xs.prototype.createBody=function(t,e){var o=A.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:O(e.border.opacity,e.opacity)}),dt(o),t.append(o),un(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},xs.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},xs.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:O(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=A.drawing.Path.fromPoints(o[n],r);dt(s),t.append(s)}},xs.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=T(e)?e:new A.Color(this.color).brightness(t._brightness).toHex()},xs.prototype.createOverlay=function(){var t=A.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},xs.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(x({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},xs.prototype.highlightVisual=function(){return this._mainVisual},xs.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},xs.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new I(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},xs.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},xs.prototype.overlapsBox=function(t){return this.box.overlaps(t)},e(h=xs,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),x(h.prototype,Ym),x(h.prototype,Zm);const dx=h;function _s(){Gn.apply(this,arguments)}(Gn=qm)&&(_s.__proto__=Gn),((_s.prototype=Object.create(Gn&&Gn.prototype)).constructor=_s).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},_s.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=on(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new lx({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},_s.prototype.pointType=function(){return dx},_s.prototype.createPoint=function(t,e){var o=e.series,i=this.pointType(),r=t.valueFields,n=x({},o),s=t.fields.color||o.color,n=this.evalPointOptions(n,r,e),e=(o.type===or&&r.open>r.close&&(s=t.fields.downColor||o.downColor||o.color),vt(o.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new i(r,n));return e.color=s,e},_s.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},_s.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:tt,max:et};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},_s.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},_s.prototype.animationPoints=function(){return this.points},x((h=_s).prototype,ex);const fx=h;function bs(t,e){Wn.call(this,t,e),this.createNote()}(Wn=dx)&&(bs.__proto__=Wn),((bs.prototype=Object.create(Wn&&Wn.prototype)).constructor=bs).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,i=this.owner.seriesValueAxis(i),n=(this.boxSlot=o=i.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=i.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),i.getSlot(r.median));r.mean&&(i=i.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,i)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(o),this.reflowNote()},bs.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},bs.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},bs.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},bs.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},bs.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},bs.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],p=x({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),p=(T(p.color)||(T(this.color)?p.color=this.color:p.color=new A.Color(e.background).brightness(.8).toHex()),new fm({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:p,opacity:e.opacity}));p.value=a,n.push(p)}return this.reflowOutliers(n),n},bs.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,r=e.getSlot(r);this.options.vertical?r.move(o.x):r.move(void 0,o.y),this.box=this.box.wrap(r),t[i].reflow(r)}},bs.prototype.mainVisual=function(t){for(var e=Wn.prototype.mainVisual.call(this,t),o=this.renderOutliers(t),i=0;i<o.length;i++){var r=o[i].getElement();r&&e.append(r)}return e},bs.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)},bs.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Wn.prototype.getBorderColor.call(this)},e(h=bs,{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:q,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:W,background:a,border:{width:2,opacity:1},opacity:0}}),x(h.prototype,Ym);const gx=h;function ws(){Xn.apply(this,arguments)}(Xn=gx)&&(ws.__proto__=Xn),((ws.prototype=Object.create(Xn&&Xn.prototype)).constructor=ws).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},ws.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},ws.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},ws.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},ws.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const yx=ws;function Cs(){qn.apply(this,arguments)}(qn=fx)&&(Cs.__proto__=qn),((Cs.prototype=Object.create(qn&&qn.prototype)).constructor=Cs).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=on(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new lx({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},Cs.prototype.pointType=function(){return this.options.invertAxes?yx:gx},Cs.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Cs.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));T(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:tt,max:et},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},Cs.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},Cs.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];T(r)&&null!==r&&o.push(r)}return o},Cs.prototype.supportsPointInactiveOpacity=function(){return!1};const vx=Cs;function Ss(){Yn.apply(this,arguments)}(Yn=Wm)&&(Ss.__proto__=Yn),((Ss.prototype=Object.create(Yn&&Yn.prototype)).constructor=Ss).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const mx=Ss;function ks(t,e){Zn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(Zn=L)&&(ks.__proto__=Zn),((ks.prototype=Object.create(Zn&&Zn.prototype)).constructor=ks).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},ks.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},ks.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,p=t.options.errorBars,h=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];m(r)&&(m(h)&&m(o)&&(i={low:h,high:o}),p&&T(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Gm(p[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),i)&&this.addPointErrorBar(i,t,e)},ks.prototype.addPointErrorBar=function(t,e,o){var i=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=o===v,a={},s=(e[o+"Low"]=i,e[o+"High"]=t,e.errorBars=e.errorBars||[],new mx(i,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[o]=i,this.updateRange(a,r),a[o]=t,this.updateRange(a,r)},ks.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=dn(i)&&dn(r)?t:this.createMissingValue(t,s))&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,y,e),this.addErrorBar(o,v,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},ks.prototype.seriesMissingValues=function(t){return t.missingValues},ks.prototype.createMissingValue=function(){},ks.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[i],s=this.yAxisRanges[e];dn(r)&&(n=this.xAxisRanges[i]=n||{min:tt,max:et},gt(r)&&(r=No(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),dn(t)&&(s=this.yAxisRanges[e]=s||{min:tt,max:et},gt(t)&&(t=No(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},ks.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=hn(t,{},n,!0)),t);return s&&hn(r=x({},t),{value:e,series:i,dataItem:o.dataItem},n),r},ks.prototype.pointType=function(){return Qm},ks.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},ks.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),e=(vt(o.color)&&(r=i.color),new Qm(t,i));return e.color=r,this.append(e),e},ks.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{x:i,y:o};throw new Error("Unable to locate Y axis with name "+t)},ks.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var o=n[a++],e=r.seriesAxes(e.series),i=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);o&&(i&&e?(t=r.pointSlot(i,e),o.reflow(t)):o.visible=!1)}),this.box=t},ks.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},ks.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n),a=s.valueFields,s=s.fields;t(a,x({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},ks.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},ks.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e(h=ks,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(h.prototype,ex);const xx=h;function As(t,e){Qn.call(this,t,e),this.category=t.category}(Qn=Qm)&&(As.__proto__=Qn),((As.prototype=Object.create(Qn&&Qn.prototype)).constructor=As).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new A.drawing.Group,s=new A.drawing.Circle(new A.geometry.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),i=new A.drawing.Circle(new A.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new A.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,i),n},(h=As).prototype.defaults=x({},h.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),h.prototype.defaults.highlight.zIndex=void 0;const _x=h;function Ps(){Kn.apply(this,arguments)}(Kn=xx)&&(Ps.__proto__=Kn),((Ps.prototype=Object.create(Kn&&Kn.prototype)).constructor=Ps).prototype._initFields=function(){this._maxSize=et,Kn.prototype._initFields.call(this)},Ps.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),Kn.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Ps.prototype.reflow=function(t){this.updateBubblesSize(t),Kn.prototype.reflow.call(this,t)},Ps.prototype.pointType=function(){return _x},Ps.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,i=e.pointIx*(Hi/i),r={delay:i,duration:Hi-i,type:tr},n=e.color||o.color,i=(t.size<0&&o.negativeValues.visible&&(n=O(o.negativeValues.color,n)),x({labels:{animation:{delay:i,duration:Hi-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:W,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(vt(o.color)&&(n=i.color),i.markers.background=n,new _x(t,i));return r.color=n,this.append(r),r},Ps.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*h,c=Math.sqrt((p+c)/Math.PI),u=O(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Ps.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},Ps.prototype.createAnimation=function(){},Ps.prototype.createVisual=function(){},e(h=Ps,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const bx=h;function Ts(){$n.apply(this,arguments)}($n=fm)&&(Ts.__proto__=$n),x((h=(Ts.prototype=Object.create($n&&$n.prototype)).constructor=Ts).prototype,Ym);const wx=h;function Ms(t,e){Jn.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}(Jn=L)&&(Ms.__proto__=Jn),((Ms.prototype=Object.create(Jn&&Jn.prototype)).constructor=Ms).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,T(this.value.target)&&(this.target=new wx({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:k,align:S}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},Ms.prototype.createLabel=function(){var t,e,o=this.options.labels;o.visible&&(t=this.pointData(),e=(e=At(o))?e(t):this.formatValue(o.format),this.label=new px(e,o,t),this.append(this.label))},Ms.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),i=i.categorySlot(i.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:i,i=r?i:n,s=(o&&(n=new E(s.x1,i.y1,s.x2,i.y2),o.options.height=r?n.height():e.target.line.width,o.options.width=r?e.target.line.width:n.width(),o.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},Ms.prototype.createVisual=function(){Jn.prototype.createVisual.call(this);var t=this.options,e=A.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:O(t.border.opacity,t.opacity)}),dt(this.bodyVisual=e),this.visual.append(e)},Ms.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=A.drawing.Animation.create(this.bodyVisual,this.options.animation))},Ms.prototype.createHighlight=function(t){return A.drawing.Path.fromRect(this.box.toRect(),t)},Ms.prototype.highlightVisual=function(){return this.bodyVisual},Ms.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Ms.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ms.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},Ms.prototype.overlapsBox=function(t){return this.box.overlaps(t)},(h=Ms).prototype.tooltipAnchor=hx.prototype.tooltipAnchor,e(h,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}}}),x(h.prototype,Ym),x(h.prototype,Zm);const Cx=h;function Os(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||ht(n[0])||_t(n[0])||(r.data=[n])}ts.call(this,t,e)}(ts=qm)&&(Os.__proto__=ts),((Os.prototype=Object.create(ts&&ts.prototype)).constructor=Os).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Os.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Os.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.series,r=this.options,n=this.children,s=t.valueFields,a=x({vertical:!r.invertAxes,overlay:i.overlay,categoryIx:o,invertAxes:r.invertAxes},i),t=t.fields.color||i.color,a=this.evalPointOptions(a,s,e),e=(vt(i.color)&&(t=a.color),new Cx(s,a)),i=(e.color=t,n[o]);return i||(i=new lx({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),i.append(e),e},Os.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];T(o)&&!isNaN(o)&&T(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:tt,max:et}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},Os.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Os.prototype.pointValue=function(t){return t.valueFields.current},Os.prototype.aboveAxis=function(t){return 0<t.value.current},Os.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},(h=Os).prototype._setAnimationOptions=ux.prototype._setAnimationOptions,e(h,{animation:{type:$i}});const Sx=h;function Bs(t,e){es.call(this),this.chartService=t,this.options=x({},this.options,e)}function Rs(t,e,o){os.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}(es=A.Class)&&(Bs.__proto__=es),((Bs.prototype=Object.create(es&&es.prototype)).constructor=Bs).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=O(o,e),i=O(i,e)),P(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:bt(t.border.width),paddingTop:bt(e.top),paddingBottom:bt(e.bottom),paddingLeft:bt(e.left),paddingRight:bt(e.right)}},Bs.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new A.Color(o.backgroundColor);T(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(Xr,t),this.visible=!0},Bs.prototype.hide=function(){this.chartService&&this.chartService.notify(qr),this.visible=!1},Bs.prototype.destroy=function(){delete this.chartService},e(h=Bs,{border:{width:1},opacity:1}),(os=h)&&(Rs.__proto__=os),((Rs.prototype=Object.create(os&&os.prototype)).constructor=Rs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},Rs.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===Y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},Rs.prototype.hide=function(){this.chartService.notify(qr,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},Rs.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,i=i.padding,n=!o.axis.options.vertical,o=o.line.bbox(),n=n?(t=b,r===w?(e=k,o.bottomLeft().translate(0,i)):(e=w,o.topLeft().translate(0,-i))):(e=b,r===C?(t=S,o.topLeft().translate(-i,0)):(t=C,o.topRight().translate(i,0)));return{point:n,align:{horizontal:t,vertical:e}}},e(l=Rs,{padding:10});const kx=l;function Is(t,e,o){is.call(this,o),this.axis=e,this.stickyMode=e instanceof Tm;o=this.options.tooltip;o.visible&&(this.tooltip=new kx(t,this,x({},o,{stickyMode:this.stickyMode})))}(is=L)&&(Is.__proto__=is),((Is.prototype=Object.create(is&&is.prototype)).constructor=Is).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},Is.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},Is.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?v:y,n=new A.geometry.Point(i.x1,i.y1),o=o?new A.geometry.Point(i.x2,i.y1):new A.geometry.Point(i.x1,i.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=o[r]=t.center()[r]):n[r]=o[r]=e[r]),this.box=i,this.line.moveTo(n).lineTo(o)},Is.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},Is.prototype.createVisual=function(){is.prototype.createVisual.call(this);var t=this.options;this.line=new A.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},Is.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),is.prototype.destroy.call(this)},e(l=Is,{color:G,width:2,zIndex:-1,tooltip:{visible:!1}});const Ax=l;function Es(t,e){rs.call(this,t),this.pane=e}(rs=L)&&(Es.__proto__=rs),((Es.prototype=Object.create(rs&&rs.prototype)).constructor=Es).prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},Es.prototype._clipBox=function(){return this.pane.chartsBox()},Es.prototype.createVisual=function(){var t;this.visual=new A.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),dt(t=A.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Es.prototype.stackRoot=function(){return this},Es.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s,a=i[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},Es.prototype.destroy=function(){rs.prototype.destroy.call(this),delete this.parent},(l=Es).prototype.isStackRoot=!0;const Px=l;(Ls=dm)&&(js.__proto__=Ls),((js.prototype=Object.create(Ls&&Ls.prototype)).constructor=js).prototype.createTitle=function(){var t=this.options.title;_t(t)&&(t=x({},t,{align:t.position,position:k})),this.title=_m.buildTitle(t,js.prototype.options.title),this.title&&this.append(this.title)},js.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},js.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},js.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},js.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},js.prototype.reflow=function(t){var e;Zt(this.children)===this.content&&(e=this.children.pop()),Ls.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},js.prototype.visualStyle=function(){var t=Ls.prototype.visualStyle.call(this);return t.zIndex=-10,t},js.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},js.prototype.stackRoot=function(){return this},js.prototype.clipRoot=function(){return this},js.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?i:r,h=0;h<o.length;h++)0===p.length&&a!==(t=o[h]).options.vertical&&Ft(p,s.createGridLines(t))},js.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},js.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new E,i=0;i<e;i++){var r=t[i],n=r.options.vertical?v:y,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),o.x1=h.x1,o.x2=h.x2)}return o},js.prototype.clipBox=function(){return this.chartContainer.clipBox},js.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Hm(this),index:this.paneIndex,name:this.options.name})};var Ls,l,zs=1,Vs,l;function js(t){Ls.call(this,t),this.id="pane"+zs++,this.createTitle(),this.content=new L,this.chartContainer=new Px({},this),this.append(this.content),this.axes=[],this.charts=[]}(l=js).prototype.isStackRoot=!0,e(l,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const Tx=l;function c(t,e,o){Vs.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=e,this.originalSeries=t,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}function Ds(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new E}function Hs(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}(Vs=L)&&(c.__proto__=Vs),((c.prototype=Object.create(Vs&&Vs.prototype)).constructor=c).prototype.initFields=function(){},c.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},c.prototype.bindPoint=function(t,e,o){var i=this._bindCache.get(t);return i||this._bindCache.set(t,i=[]),i[e]||(i[e]=Nm.current.bindPoint(t,e,o))},c.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=x({title:{color:t.color}},e),s=0;s<i;s++){var a=x({},n,o[s]),a=(gt(a.title)&&(a.title=x({text:a.title},n.title)),new Tx(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},c.prototype.crosshairOptions=function(t){return t.options.crosshair},c.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);n&&n.visible&&(r=new Ax(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},c.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;0<=i;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},c.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},c.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},c.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];break}return e},c.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},c.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},c.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},c.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},c.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&At(n)||At(i))&&(p=l({text:dn(p)?p:"",series:u})),l=u._defaults,l=void(vt(h=u.color)&&l&&(h=l.color)),c=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),dn(p))&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d})}Ft(o.items,s)},c.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?o:e).push(s)}return{x:e,y:o,any:e.concat(o)}},c.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},c.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},c.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=P(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},c.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},c.prototype.axisCrossingValues=function(t,e){for(var t=t.options,o=[].concat(t.axisCrossingValues||t.axisCrossingValue),i=e.length-o.length,r=o[0]||0,n=0;n<i;n++)o.push(r);return o},c.prototype.alignAxisTo=function(t,e,o,i){var o=t.getSlot(o,o,!0),r=t.options.reverse?2:1,i=e.getSlot(i,i,!0),n=e.options.reverse?2:1,i=t.box.translate(i[y+n]-o[y+r],i[v+n]-o[v+r]);t.pane!==e.pane&&i.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(i)},c.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,u=Hs(t,u)||o,g=r;u!==o&&(g=this.axisCrossingValues(u,e)),this.alignAxisTo(c,u,n[l],g[l]),c.options._overlap||(M(c.lineBox().x1)===M(u.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),M(c.lineBox().x2)===M(u.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,u,n[l],g[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,S).translate(c.options.margin,0)),f)&&(a[d]=c),0!==l&&i.pane===c.pane&&(c.alignTo(i),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,_=!1!==v.options.visible,m=Hs(e,m)||i,b=n;m!==i&&(b=this.axisCrossingValues(m,t)),this.alignAxisTo(v,m,r[y],b[y]),v.options._overlap||(M(v.lineBox().y1)===M(m.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,m,r[y],b[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,k).translate(0,-v.options.margin)),_)&&(p[x]=v),M(v.lineBox().y2,X)===M(m.lineBox().y2,X)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,w).translate(0,v.options.margin)),_)&&(h[x]=v),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},c.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Ds(e),i=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},c.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Ds(r).height()-i.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},c.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=Ds(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},c.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},c.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Us(o),r=0;r<i.length;r++)i[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},c.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(0<o)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},c.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(i)}},c.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var h=0;h<o;h++){var l=e[h];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},c.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,o=0;o<e;o++)for(var i=t[o],r=0;r<e;r++){var n,s=t[r];i.options.vertical!==s.options.vertical&&(s=i.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},c.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},c.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(A.drawing.Path.fromRect(e[o].toRect()))},c.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},c.prototype.createVisual=function(){Vs.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border,o=(void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&T(o)||(o=a,e=0),this._bgVisual=new A.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(o),this.appendVisual(o)},c.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var i=0;i<e.length;i++)if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&T(s.value)&&null!==s.value&&o.push(s)}}return o},c.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},c.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},c.prototype.filterPoints=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},c.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},c.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},c.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},c.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Hs(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},c.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,i=i.visible;if("end"!==r&&"start"!==r||!1===i)return null;var i=this.groupAxes(this.panes),i=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,i),r="end"===r,n=o.range(),r=r?n.max:n.min;if(_(i[e],n.min,n.max)-r==0)return null;i.splice(e+1,0,r),o.options.axisCrossingValues=i;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n},c.prototype.isTrendline=function(t){return t&&u(t.type,Or)},c.prototype.trendlineFactory=function(){},c.prototype.createTrendlineSeries=function(){var i=this,r=[];return this.series=this.series.map(function(t){if(!i.isTrendline(t))return t;var e,o=i.seriesByName(t.for);if(o)return e=Nm.current.valueFields(o),e=Zt(e),(e=i.trendlineFactory(Object.assign({},{field:e},t),o))&&(!1===o.visible&&(e.visible=!1),e.color===J&&(e.color=o.color),r.push(e)),e;throw new Error('Invalid Configuration: Unable to locate linked series "'+t.for+'" for trendline "'+t.name+'".')}).filter(function(t){return null!==t}),r},c.prototype.seriesByName=function(e){return this.series.find(function(t){return t.name===e})};var Fs,Us=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},Ns,l,Gs,l,Ws,Xs,l,qs,Ys,Zs,l,Qs,l,Ks,$s,Js,s,ta,ea,l;e(l=c,{series:[],plotArea:{margin:{}},background:"",border:{color:G,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Mx=l,Ox={hover:function(t,e){this._dispatchEvent(t,e,Lr)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}},Bx=((Fs=A.Class)&&(oa.__proto__=Fs),((oa.prototype=Object.create(Fs&&Fs.prototype)).constructor=oa).prototype.aggregatePoints=function(t,e){var o,i=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||ht(t)||((o=function(){}).prototype=t,s=new o);for(var a=0;a<r.length;a++){var p=r[a],h=this._bindField(n.values,p.canonicalName),h=p.transform(h,i,n.dataItems,e);if(!(null===h||!_t(h)||T(h.length)||h instanceof Date)){s=h;break}if(T(h)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=p.name;var c=s;var u=h;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),T(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},oa.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},oa.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(T(s[e])?s:n.fields)[e];o.push(s)}return o},oa);function oa(t,e,o){Fs.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var p=0;p<i.length;p++){var h=i[p],l=void 0;if(_t(a))l=a[h];else{if(0!==p&&!u(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:vt(l)?l:Um[l]})}}function ia(){Ns.call(this),this._defaults={}}(Ns=A.Class)&&(ia.__proto__=Ns),((ia.prototype=Object.create(Ns&&Ns.prototype)).constructor=ia).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},ia.prototype.query=function(t){return this._defaults[t]},(l=ia).current=new l;const Rx=l;function ra(){Gs.apply(this,arguments)}(Gs=hx)&&(ra.__proto__=Gs),((ra.prototype=Object.create(Gs&&Gs.prototype)).constructor=ra).prototype.createLabel=function(){var t=this.options.labels,e=x({},t,t.from),t=x({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},ra.prototype._createLabel=function(t){var e=At(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new px(e,x({vertical:this.options.vertical},t),o)},ra.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},(l=ra).prototype.defaults=x({},l.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const Ix=l;function na(){Ws.apply(this,arguments)}(Ws=ux)&&(na.__proto__=Ws),((na.prototype=Object.create(Ws&&Ws.prototype)).constructor=na).prototype.pointType=function(){return Ix},na.prototype.pointValue=function(t){return t.valueFields},na.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)},na.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},na.prototype.updateRange=function(t,e){var e=e.series.axis,o=t.from,i=t.to,r=this.valueAxisRanges[e];null!==t&&m(o)&&m(i)&&((r=this.valueAxisRanges[e]=r||{min:tt,max:et}).min=Math.min(r.min,o),r.max=Math.max(r.max,o),r.min=Math.min(r.min,i),r.max=Math.max(r.max,i))},na.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},(l=na).prototype.plotLimits=qm.prototype.plotLimits;const Ex=l;function sa(){Xs.apply(this,arguments)}(Xs=Qm)&&(sa.__proto__=Xs),((sa.prototype=Object.create(Xs&&Xs.prototype)).constructor=sa).prototype.aliasFor=function(){return this.parent};const Lx=sa;function aa(t,e){qs.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}(qs=L)&&(aa.__proto__=qs),((aa.prototype=Object.create(qs&&qs.prototype)).constructor=aa).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,i=this.value,o=this.fromPoint=new Lx(i,x({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new Lx(i,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},aa.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},aa.prototype.createHighlight=function(){var t=new A.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},aa.prototype.highlightVisual=function(){return this.visual},aa.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},aa.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return o=(r=this.box).center(),i=C,r=this.options.vertical?(t=o.x,e=r.y1-5,w):(t=r.x2+5,e=o.y,b),{point:new I(t,e),align:{horizontal:i,vertical:r}}},aa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},aa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},aa.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},aa.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}"}))},aa.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(i=i?e.y1<=t.y1?(o=qi,Yi):(o=Yi,qi):e.x1<=t.x1?(o=C,S):(o=S,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},aa.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},x((l=aa).prototype,Ym),x(l.prototype,Zm),l.prototype.defaults={markers:{visible:!1,background:a,size:8,type:W,border:{width:2},opacity:1},labels:{visible:!1,margin:P(3),padding:P(4),animation:{type:Fi,delay:Hi},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};const zx=l;function pa(){Ys.apply(this,arguments)}(Ys=ix)&&(pa.__proto__=Ys),((pa.prototype=Object.create(Ys&&Ys.prototype)).constructor=pa).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},pa.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},pa.prototype.createStroke=function(t){var e=new A.drawing.Path(t),t=new A.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},pa.prototype.hasStackSegment=function(){return!0},pa.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},pa.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const Vx=pa;function ha(){Zs.apply(this,arguments)}(Zs=Vx)&&(ha.__proto__=Zs),((ha.prototype=Object.create(Zs&&Zs.prototype)).constructor=ha).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},ha.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},ha.prototype.createCurveSegments=function(t){return(new jm).process(this.toGeometryPoints(t))};const jx=ha;function la(){Qs.apply(this,arguments)}(Qs=Vx)&&(la.__proto__=Qs),((la.prototype=Object.create(Qs&&Qs.prototype)).constructor=la).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},la.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},x((l=la).prototype,s);const Dx=l;function ca(){Ks.apply(this,arguments)}(Ks=qm)&&(ca.__proto__=Ks),((ca.prototype=Object.create(Ks&&Ks.prototype)).constructor=ca).prototype.render=function(){Ks.prototype.render.call(this),this.renderSegments()},ca.prototype.pointType=function(){return zx},ca.prototype.createPoint=function(t,e){var o=e.series,i=e.seriesIx,r=t.valueFields;if(!dn(r.from)&&!dn(r.to)){if(this.seriesMissingValues(o)!==Wi)return null;r={from:0,to:0}}i=this.pointOptions(o,i),i=this.evalPointOptions(i,r,e),e=t.fields.color||o.color,vt(o.color)&&(e=i.color),t=new zx(r,i);return t.color=e,this.append(t),t},ca.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?jx:"step"===i?Dx:Vx)(t,e,o)},ca.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},ca.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(o&&t)return{from:o,to:t}},ca.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new E(i.x1,t.y1,i.x2,t.y2),new E(e.x1,t.y1,e.x2,t.y2)):(o=new E(t.x1,i.y1,t.x2,i.y2),new E(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},ca.prototype.addValue=function(t,e){var o=t.valueFields;m(o.from)||(o.from=o.to),m(o.to)||(o.to=o.from),Ks.prototype.addValue.call(this,t,e)},ca.prototype.updateRange=function(t,e){var o;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:tt,max:et},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},ca.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},ca.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},x((s=ca).prototype,p,ex);const Hx=s;function ua(){$s.apply(this,arguments)}($s=dx)&&(ua.__proto__=$s),((ua.prototype=Object.create($s&&$s.prototype)).constructor=ua).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=[],r=[],n=[],s=e.getSlot(o.low,o.high),a=e.getSlot(o.open,o.open),e=e.getSlot(o.close,o.close),o=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);i.push([a.x1,a.y1]),i.push([o,a.y1]),r.push([o,e.y1]),r.push([e.x2,e.y1]),n.push([o,s.y1]),n.push([o,s.y2]),this.lines=[i,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},ua.prototype.createBody=function(){};const Fx=ua;function da(){Js.apply(this,arguments)}(Js=fx)&&(da.__proto__=Js),((da.prototype=Object.create(Js&&Js.prototype)).constructor=da).prototype.pointType=function(){return Fx};const Ux=da;function fa(t,e,o){ta.call(this),this.from=t,this.to=e,this.series=o}(ta=L)&&(fa.__proto__=ta),((fa.prototype=Object.create(ta&&ta.prototype)).constructor=fa).prototype.linePoints=function(){var t,e=this.from,o=this.from.box,i=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?o.y1:o.y2,r.push([o.x1,t],[i.x2,t])):(t=e.aboveAxis?o.x2:o.x1,r.push([t,o.y1],[t,i.y2])),r},fa.prototype.createVisual=function(){ta.prototype.createVisual.call(this);var t=this.series.line||{},t=A.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});dt(t),this.visual.append(t)},e(l=fa,{animation:{type:Fi,delay:Hi}});const Nx=l;function ga(){ea.apply(this,arguments)}function ya(t,e,o){return(t=t[String(e)])?t(o):null}function va(t,e){for(var o,i,r=0,n=0,s=0,a=0,p=0,h=Number.MAX_VALUE,l=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,u=u.yValue;isFinite(d)&&null!==d&&isFinite(u)&&null!==u&&(h=Math.min(d,h),l=Math.max(d,l),p++,r+=d,n+=u,s+=Math.pow(d,2),a+=d*u)}return 0<p&&(i=(n-(o=(p*a-r*n)/(p*s-Math.pow(r,2)))*r)/p),{slope:o,intercept:i,count:p,xMin:h,xMax:l}}function ma(t,e,o){for(var i=[],r=[],n=Math.max(2,o)-1,s=0,a=0,p=0;p<t.length;p++){var h=e(t[p]),l=h.xValue,h=h.yValue;if(isFinite(h)&&null!==h?(r.push(h),a+=h,s=Math.max(p,s)):r.push(null),n<=p){var h=r.filter(function(t){return null!==t}).length,c=r.shift()||0;if(0<h){i.push([l,a/h]),a-=c;continue}}i.push([l,null])}return i.slice(0,s+1)}(ea=ux)&&(ga.__proto__=ea),((ga.prototype=Object.create(ea&&ea.prototype)).constructor=ga).prototype.render=function(){ea.prototype.render.call(this),this.createSegments()},ga.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=sn(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=Nm.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},ga.prototype.updateRange=function(t,e){ea.prototype.updateRange.call(this,{value:e.to},e)},ga.prototype.aboveAxis=function(t){return 0<=t.value},ga.prototype.plotRange=function(t){return[t.from,t.to]},ga.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new Nx(s,h,r),o.push(p),this.append(p)),s=h}}};const Gx=ga,Wx=s={linearTrendline:function(t){var e=t.options,o=t.categoryAxis,t=function(t){var e,o=t.categoryAxis,i=t.options,t=va((0,t.seriesValues)(),(e=i.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),r=t.slope,n=t.intercept;if(0<t.count){for(var s=[],i=o.totalRangeIndices(),t=o.currentRangeIndices(),a={min:Math.floor(Math.max(t.min-1,i.min)),max:Math.ceil(Math.min(t.max+2,i.max))},p=a.min;p<a.max;p++)s[p]={category:o.categoryAt(p,!0),value:r*(p+1)+n};return{data:s}}return{data:null}}({seriesValues:t.seriesValues,categoryAxis:o,options:e}).data;return t?Object.assign({},e,{type:"line",data:t,categoryField:"category",field:"value"}):null},movingAverageTrendline:function(t){var e=t.options;s=(t=t).categoryAxis,i=t.options,r=t.categoryAxis,t=t.seriesValues,n=(i.trendline||{}).period||2,a=r.totalRangeIndices(),r=r.currentRangeIndices(),r={min:Math.floor(Math.max(r.min-n,a.min)),max:Math.ceil(Math.min(r.max+n+2,a.max))},a=ma(t(r),(o=i.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[o]}}),n),p=[],a.forEach(function(t){var e=t[0],t=t[1];p[e]={category:s.categoryAt(e,!0),value:t}});var o,i,r,n,s,a,p,t=(0<p.length?{data:p}:{data:null}).data;return t?Object.assign({},e,{type:"line",data:t,categoryField:"category",field:"value"}):null}};var xa,_a,ba=[Ki,Cr,mr,Pr],wa=[hr,Ar].concat(ba),l,Ca,s,Sa,ka,Aa,Pa,l;function f(){xa.apply(this,arguments)}function Ta(t,e,o){x([].concat(e instanceof Tm?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}(xa=Mx)&&(f.__proto__=xa),((f.prototype=Object.create(xa&&xa.prototype)).constructor=f).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new ax,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[$i,er,Ar,Cr,Pr,xr,pr,Sr]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},f.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createCategoryAxes(t),this.aggregateCategories(t),this.createTrendlineSeries(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},f.prototype.removeAxis=function(t){var e=t.options.name;xa.prototype.removeAxis.call(this,t),t instanceof Tm?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},f.prototype.trendlineFactory=function(t,e){var o=this.seriesCategoryAxis(t),i=this.seriesValues.bind(this,e.index),t=ya(Wx,t.type,{options:t,categoryAxis:o,seriesValues:i});return t&&(t.categoryAxis=e.categoryAxis,t.valueAxis=e.valueAxis,this.filterSeries(t,o))},f.prototype.trendlineAggregateForecast=function(){return this.series.map(function(t){return(t.trendline||{}).forecast}).filter(function(t){return void 0!==t}).reduce(function(t,e){return{before:Math.max(t.before,e.before||0),after:Math.max(t.after,e.after||0)}},{before:0,after:0})},f.prototype.seriesValues=function(t,e){var o=[],i=this.srcSeries[t],t=this.seriesCategoryAxis(i);an(t.options.type,Y)&&(this._seriesPointsCache={},this._currentPointsCache={},t.options.dataItems=[],i=this.aggregateSeries(i,t,t.totalRangeIndices()));for(var t=e?e.min:0,r=e?e.max:i.data.length,n=t;n<r;n++){var s=this.bindPoint(i,n);o.push({categoryIx:n,category:s.fields.category,valueFields:s.valueFields})}return o},f.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},f.prototype.createChartGroup=function(t,e){this.createAreaChart(ln(t,[Ki,Cr]),e),this.createRangeAreaChart(ln(t,[mr,Pr]),e),this.createBarChart(ln(t,[ir,$i]),e),this.createRangeBarChart(ln(t,[_r,xr]),e),this.createBulletChart(ln(t,[er,kr]),e),this.createCandlestickChart(ln(t,or),e),this.createBoxPlotChart(ln(t,[Ji,Sr]),e),this.createOHLCChart(ln(t,lr),e),this.createWaterfallChart(ln(t,[Tr,pr]),e),this.createLineChart(ln(t,[hr,Ar]),e)},f.prototype.aggregateCategories=function(t){var e=[].concat(this.series),o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r,n,s=e[i];this.isTrendline(s)||(r=this.seriesCategoryAxis(s),n=this.findPane(r.options.pane),s=(an(r.options.type,Y)||s.categoryField)&&u(n,t)?this.aggregateSeries(s,r,r.currentRangeIndices()):this.filterSeries(s,r)),o.push(s)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},f.prototype.filterSeries=function(e,o){var i,t,r,n=(e.data||{}).length;return o._seriesMax=Math.max(o._seriesMax||0,n),T(o.options.min)||T(o.options.max)?(i=o.currentRangeIndices(),t=u(e.type,wa),(r=x({},e)).data=(r.data||[]).slice(i.min,i.max+1),t&&wn(r,i,n,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return T(e.data[t])}),r):e},f.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},f.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,i=an(i.type,Y),n=t.data,s=i?cn:Ri,a=[];i||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];T(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[o]=a},f.prototype.aggregateSeries=function(t,i,r){if(!t.data.length)return t;for(var n=this.seriesSourcePoints(t,i),e=x({},t),s=new Bx(x({},t),Nm.current,Rx.current),o=e.data=[],a=i.options.dataItems||[],p=function(t){var e=t-r.min,o=n[t];return(o=o||(n[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=s.aggregatePoints(o.items,e)),o},h=r.min;h<=r.max;h++){var l=p(h);o[l.categoryIx]=l.item,l.items&&l.items.length&&(a[l.categoryIx]=l.item)}return u(e.type,wa)&&wn(e,r,i.totalCount(),p,function(t){return n[t]}),i.options.dataItems=a,e},f.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,sn(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),xa.prototype.appendChart.call(this,t,e)},f.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=Ot([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},f.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},f.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},f.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,o){return Ot(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},f.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ux(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(t,e))},f.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Ex(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},f.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Sx(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ox(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},f.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new sx(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},f.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new Hx(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Ux(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new fx(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new vx(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Gx(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},f.prototype.axisRequiresRounding=function(t,e){for(var o=ln(this.series,Mr),i=0;i<this.series.length;i++){var r,n=this.series[i];u(n.type,ba)&&(r=n.line)&&r.style===Qi&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},f.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},f.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Tm&&t[e].createLabels()},f.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,p=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?tt:0},n),T(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),p=new(fn(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),Mm):Tm)(n,this.chartService);if(o[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,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},f.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,ba))return!1;return!0},f.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<i.length;a++){var p=i[a];if(u(this.findPane(p.pane),t)){var h=p.name,l=an(p.type,Yr)?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||l,l=(0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max)),new(an(p.type,Yr)?Rm:Om)(l.min,l.max,x({},n,p),this.chartService));if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=l}l.axisIndex=a,s.push(l),this.appendAxis(l)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},f.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new I(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?en(s,h.getValue(r)):en(n,h.getCategory(r))}0===n.length&&en(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:qt(e),originalEvent:e,category:gn(n),value:gn(s)})}},f.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},f.prototype.updateAxisOptions=function(t,e){Ta(this.options,t,e),Ta(this.originalOptions,t,e)},e(l=f,{categoryAxis:{},valueAxis:{}}),x(l.prototype,Ox);const Xx=l;function Ma(){_a.call(this),this._points=[]}function Oa(){this._defaultPrevented=!0}(_a=A.Class)&&(Ma.__proto__=_a),((Ma.prototype=Object.create(_a&&_a.prototype)).constructor=Ma).prototype.destroy=function(){this._points=[]},Ma.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Ma.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;i&&(i(i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Oa,visual:t.highlightVisual(),show:e}),i._defaultPrevented)||t.toggleHighlight(e,o)},Ma.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Ma.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};const qx=Ma;function Ba(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ra(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}function Ia(t,e){Ca.call(this),this.plotArea=t,this.options=x({},this.options,e)}(Ca=A.Class)&&(Ia.__proto__=Ca),((Ia.prototype=Object.create(Ca&&Ca.prototype)).constructor=Ia).prototype.start=function(t){return this._active=Ba(t,this.options.key),this._active},Ia.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Ra(this.axisRanges=t)}},Ia.prototype.end=function(){var t=this._active;return this._active=!1,t},Ia.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},Ia.prototype.destroy=function(){delete this.plotArea},Ia.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,p=n[s];(e===y&&!p.options.vertical||e===v&&p.options.vertical)&&(a=p.pan(i))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},(s=Ia).prototype.options={key:"none",lock:"none"};const Yx=s;function Ea(t,e){Sa.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}(Sa=A.Class)&&(Ea.__proto__=Sa),((Ea.prototype=Object.create(Sa&&Sa.prototype)).constructor=Ea).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},Ea.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Ea.prototype.setStyles=function(t){Ct(this._marquee,t)},Ea.prototype.start=function(t){if(Ba(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(o),o=e?e.chartsBox().clone():null;if(e&&o)return e=this._elementOffset(),o.translate(e.left,e.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},Ea.prototype._elementOffset=function(){var t=this.chart.element,e=Ct(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=Gt(t);return{left:o+t.left,top:e+t.top}},Ea.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Ea.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(t)).left-=e.left,t.top-=e.top,e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Ra(this.axisRanges)},Ea.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},Ea.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Ea.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===y&&!a||o===v&&a||!T(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Ea.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(o.x,i),s=Math.min(o.y,t),a=Math.abs(o.x-i),p=Math.abs(o.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,p=e.height()),i>e.x2&&(a=e.x2-o.x),i<e.x1&&(a=o.x-e.x1),t>e.y2&&(p=e.y2-o.y),t<e.y1&&(p=o.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:p}},(l=Ea).prototype.options={key:"shift",lock:"none"};const Zx=l;function La(t,e){ka.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}(ka=A.Class)&&(La.__proto__=ka),((La.prototype=Object.create(ka&&ka.prototype)).constructor=La).prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(o===y&&!a||o===v&&a)&&s.zoomRange&&(a=_(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a})}return Ra(this.axisRanges=i)},La.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},La.prototype.destroy=function(){delete this.chart};const Qx=La;function za(t,e){Aa.call(this,t),this.chartService=e}(Aa=L)&&(za.__proto__=Aa),((za.prototype=Object.create(Aa&&Aa.prototype)).constructor=za).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new A.drawing.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new E),r.renderVisual()}},za.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Xe(t):new E},za.prototype.renderVisual=function(){this.addVisual()},za.prototype.createVisual=function(){};const Kx=za;function Va(t){Pa.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}(Pa=dm)&&(Va.__proto__=Pa),((Va.prototype=Object.create(Pa&&Pa.prototype)).constructor=Va).prototype.createContainer=function(){this.container=new vm({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},Va.prototype.createMarker=function(){this.container.append(new fm(this.markerOptions()))},Va.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return x({},t.markers,{background:e,border:{color:e}})},Va.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new xm(t.text,e))},Va.prototype.renderComplete=function(){Pa.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=A.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},Va.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},Va.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},Va.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},Va.prototype.eventArgs=function(t){var e=this.options;return{element:qt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},Va.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;o?(this.visual=o({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):Pa.prototype.renderVisual.call(this)};const $x=Va;var ja,Da="horizontal",Ha="custom",s,Fa,l,Ua,Na,s,Ga,l,Wa,s,Xa,h,qa,l,Ya,s,Za,h,Qa,s;function Ka(t,e){void 0===e&&(e={}),ja.call(this,t),this.chartService=e,u(this.options.position,[k,S,w,C,Ha])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}(ja=L)&&(Ka.__proto__=ja),((Ka.prototype=Object.create(ja&&ja.prototype)).constructor=Ka).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=b;e===Ha?i=C:u(e,[k,w])?(i="start"===o?C:"end"===o?S:b,r=e):o&&("start"===o?r=k:"end"===o&&(r=w)),this.container=new dm({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new dm({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Ka.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new Kx({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];i.append(new $x(x({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},Ka.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Ha&&e!==Da||(T(e)?e!==Da:u(t,[C,S]))},Ka.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Ka.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Ha?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new E(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Ka.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===w?y:v,a=this.isVertical(),p=t.clone(),h=t.clone(),i=(i!==C&&i!==S||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,v,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,y,o.options.align)),o.reflow(h),(h=o.box).clone());(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),i[s+1]=t[s+1],i[s+2]=t[s+2],this.box=i},Ka.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new E(i,r,i+t.width(),r+t.height()))},Ka.prototype.renderVisual=function(){this.hasItems()&&ja.prototype.renderVisual.call(this)},Ka.prototype.createLegendTitle=function(t){var e=x({},{color:G,position:k,align:b},t),o=e.text;t&&!1!==t.visible&&(T(e)&&e.visible&&((t=At(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new xm(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Ka.prototype.createTitleLayout=function(){this.layout=new vm({vertical:!0,wrap:!1}),this.container.append(this.layout)},Ka.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},Ka.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e(s=Ka,{position:S,items:[],offsetX:0,offsetY:0,margin:P(5),padding:P(5),border:{color:G,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:C,vAlign:b}});const Jx=s;function $a(){Fa.call(this),this._registry=[]}(Fa=A.Class)&&($a.__proto__=Fa),(($a.prototype=Object.create(Fa&&Fa.prototype)).constructor=$a).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},$a.prototype.create=function(t,e,o){for(var i=this._registry,r=i[0],n=0;n<i.length;n++){var s=i[n],a=ln(t,s.seriesTypes),p=ln(t,Or);if(0<a.length-p.length){r=s;break}}return new r.type(a,e,o)},(l=$a).current=new l;const t1=l;function Ja(t){var e=document.createElement("div");return t&&(e.className=t),e}function tp(t){for(var e=t;e&&!Bt(e,"k-handle");)e=e.parentNode;return e}function ep(t,e,o,i){Ua.call(this);var r=t.element;this.options=x({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Mm,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}(Ua=A.Class)&&(ep.__proto__=Ua),((ep.prototype=Object.create(Ua&&Ua.prototype)).constructor=ep).prototype.onPane=function(t){return this.categoryAxis.pane===t},ep.prototype.createElements=function(){var t=this.options,e=this.wrapper=Ja("k-selector k-pointer-events-none"),o=(Ct(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=Ja("k-selection k-pointer-events-none")),i=(this.leftMask=Ja("k-mask k-pointer-events-none"),this.rightMask=Ja("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),this.body=Ja("k-selection-bg k-pointer-events-none")),i=(o.appendChild(i),this.leftHandle=Ja("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=Ja("k-handle k-right-handle k-pointer-events-auto"),o=(i.appendChild(Ja()),r.appendChild(Ja()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),Ct(o,["borderLeftWidth","borderRightWidth","height"])),n=Ct(i,"height").height,s=Ct(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},Ct(i,{top:(o.height-n)/2}),Ct(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},ep.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),Ut(this.chartElement,((t={})[Kr]=this._mousewheelHandler,t))),this._domEvents=Am.create(this.chartElement,{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)})},ep.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&x(t,{min:No(o,t.min),max:No(o,t.max),from:No(o,t.from),to:No(o,t.to)}),Ct(this.chartElement,["paddingLeft","paddingTop"])),i=o.paddingLeft,o=o.paddingTop;this.options=x({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:o},offset:{left:e.x1+i,top:e.y1+o},from:t.min,to:t.max},t)},ep.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&($t(this.chartElement,((t={})[Kr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},ep.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},ep.prototype._pointInPane=function(t,e){var o=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return o.containsPoint(t)},ep.prototype._start=function(t){var e,o,i=this.options,r=qt(t);!this._state&&r&&(e=Xt(t),this._pointInPane(e.x,e.y))&&(r=tp(r),o=this.body.getBoundingClientRect(),e=!r&&e.x>=o.x&&e.x<=o.x+o.width&&e.y>=o.y&&e.y<=o.y+o.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(i.from),to:this._index(i.to)}},o=this._rangeEventArgs({from:this._index(i.from),to:this._index(i.to)}),this.trigger(Nr,o))&&(this._state=null)},ep.prototype._press=function(t){(t=this._state?this._state.moveTarget:tp(qt(t)))&<(t,"k-handle-active")},ep.prototype._move=function(t){var e,o,i,r,n,s,a,p,h,l,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,o=e.range,u=e.moveTarget,i=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),t=e.startLocation-t.x.location,p=o.from,h=o.to,l=o.to-o.from,c=Ct(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(i?-1:1),u||e.inBody)&&(c=u&&Bt(u,"k-left-handle"),u=u&&Bt(u,"k-right-handle"),e.inBody?(o.from=Math.min(Math.max(s,r-t),a-l),o.to=Math.min(o.from+l,a)):c&&!i||u&&i?(o.from=Math.min(Math.max(s,r-t),a-1),o.to=Math.max(o.from+1,o.to)):(c&&i||u&&!i)&&(o.to=Math.min(Math.max(s+1,n-t),a),o.from=Math.min(o.to-1,o.from)),o.from===p&&o.to===h||(this.move(o.from,o.to),this.trigger(Gr,this._rangeEventArgs(o))))},ep.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&ut(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(Wr,this._rangeEventArgs(t)),delete this._state)},ep.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new I(i.x,o.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},p=3===t.event.which,i=Math.round(r+n/2-i);this._state||p||(this.chart._unsetActivePoint(),o.options.justified||i--,a.from=Math.min(Math.max(s,r-i),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(Gr,this._rangeEventArgs(a)),this._end()))},ep.prototype._mousewheel=function(t){var e,o=this,i=Dt(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(i)&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger(Gr,{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){o._end()},150))},ep.prototype._gesturestart=function(t){var e=this.options,o=t.touches[0];this._pointInPane(o.pageX,o.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},o=this._rangeEventArgs(this._state.range),this.trigger(Nr,o)?this._state=null:t.preventDefault())},ep.prototype._gestureend=function(){this._state&&(this.trigger(Wr,this._rangeEventArgs(this._state.range)),delete this._state)},ep.prototype._gesturechange=function(t){var e,o,i,r,n,s;this._state&&(r=this.chart,i=this._state,e=this.options,o=this.categoryAxis,i=i.range,s=r._toModelCoordinates(t.touches[0].x.location).x,r=r._toModelCoordinates(t.touches[1].x.location).x,n=Math.min(s,r),s=Math.max(s,r),t.preventDefault(),i.from=o.pointCategoryIndex(new I(n))||e.min,i.to=o.pointCategoryIndex(new I(s))||e.max,this.move(i.from,i.to),this.trigger(Gr,this._rangeEventArgs(i)))},ep.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},ep.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},ep.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},ep.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,p="x"+(i?2:1),i=this._slot(i?e:t),e=M(i[p]-r.left+n.left),t=(Ct(this.leftMask,{width:e}),Ct(this.selection,{left:e}),i=this._slot(a),M(o.width-(i[p]-r.left+n.left))),a=(Ct(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),Ct(this.rightMask,{left:a}),Ct(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},ep.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),t=_(this._index(t),i,r),i=_(this._index(e),t+1,r);o.visible&&this.move(t,i),o.from=this._value(t),o.to=this._value(i)},ep.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=x({},s);if(this._state&&(s=this._state.range),r!==S&&(s.from=_(_(n-t,0,e-1),o,i)),r!==C&&(s.to=_(_(e+t,s.from+1,i),o,i)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},ep.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),o=this._index(o.to),s={from:n,to:o},a=x({},s),p=this.categoryAxis.options.reverse,p=y+(p?"2":"1"),h=this.categoryAxis.lineBox(),p=Math.abs(h[p]-e.x),e=h.width(),h=M(p/e,2),p=M(h*t),e=M((1-h)*t);if((s=this._state?this._state.range:s).from=_(_(n-p,0,o-1),i,r),s.to=_(_(o+e,s.from+1,r),i,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},ep.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e(s=ep,{visible:!0,mousewheel:{zoom:"both"},min:et,max:tt});const e1=s;function op(){Na.apply(this,arguments)}(Na=h)&&(op.__proto__=Na),((op.prototype=Object.create(Na&&Na.prototype)).constructor=op).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=x({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,Na.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},op.prototype.hide=function(){delete this._current,Na.prototype.hide.call(this)};const o1=op;function ip(t,e){Ga.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}(Ga=h)&&(ip.__proto__=Ga),((ip.prototype=Object.create(Ga&&Ga.prototype)).constructor=ip).prototype.showAt=function(t,e){var o,i=Ot(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(i=i[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),e=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:e,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},ip.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},ip.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:o?new I(t.x,e.y):new I(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},e(l=ip,{categoryFormat:"{0:d}"});const i1=l;function rp(){Wa.apply(this,arguments)}function np(){Xa.apply(this,arguments)}function sp(){qa.apply(this,arguments)}function ap(){Ya.apply(this,arguments)}(Wa=A.drawing.Animation)&&(rp.__proto__=Wa),((rp.prototype=Object.create(Wa&&Wa.prototype)).constructor=rp).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,o=o.vertical?v:y,(t=this.fromScale=new A.geometry.Point(1,1))[o]=Ui,e.transform(A.geometry.transform().scale(t.x,t.y))):this.abort()},rp.prototype.step=function(t){var e=It(this.fromScale.x,1,t),t=It(this.fromScale.y,1,t);this.element.transform(A.geometry.transform().scale(e,t,this.origin))},rp.prototype.abort=function(){Wa.prototype.abort.call(this),this.element.transform(null)},e(s=rp,{duration:Hi}),A.drawing.AnimationFactory.current.register($i,s),(Xa=A.drawing.Animation)&&(np.__proto__=Xa),((np.prototype=Object.create(Xa&&Xa.prototype)).constructor=np).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(A.geometry.transform().scale(Ui,Ui,t))},np.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.center))},e(h=np,{easing:"easeOutElastic"}),A.drawing.AnimationFactory.current.register(tr,h),(qa=A.drawing.Animation)&&(sp.__proto__=qa),((sp.prototype=Object.create(qa&&qa.prototype)).constructor=sp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},sp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e(l=sp,{duration:200,easing:"linear"}),A.drawing.AnimationFactory.current.register(Fi,l),(Ya=A.drawing.Animation)&&(ap.__proto__=Ya),((ap.prototype=Object.create(Ya&&Ya.prototype)).constructor=ap).prototype.setup=function(){this.element.transform(A.geometry.transform().scale(Ui,Ui,this.options.center))},ap.prototype.step=function(t){this.element.transform(A.geometry.transform().scale(t,t,this.options.center))},e(s=ap,{easing:"easeOutElastic",duration:Hi}),A.drawing.AnimationFactory.current.register(cr,s);const r1=s;function pp(){Za.apply(this,arguments)}function hp(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}(Za=xx)&&(pp.__proto__=Za),((pp.prototype=Object.create(Za&&Za.prototype)).constructor=pp).prototype.render=function(){Za.prototype.render.call(this),this.renderSegments()},pp.prototype.createSegment=function(t,e,o){return new(e.style===Zi?Jm:Km)(t,e,o)},pp.prototype.animationPoints=function(){return Za.prototype.animationPoints.call(this).concat(this._segments)},pp.prototype.createMissingValue=function(t,e){if(e===Wi)return dn((e={x:t.x,y:t.y}).x)||(e.x=0),dn(e.y)||(e.y=0),e},x((h=pp).prototype,p);const n1=h,s1=l={linearTrendline:function(t){var e=t.options,t=function(t){var e=t.options,t=va((0,t.seriesValues)(),hp(e.field)),o=t.slope,i=t.intercept,r=t.count,n=t.xMin,s=t.xMax;if(0<r){var a=[],t=(e.trendline||{}).forecast,r=(t&&(0<t.before&&(n-=t.before),0<t.after)&&(s+=t.after),(e.trendline||{}).samplingInterval),p=O(r,Oe(n,s)/10);r<=0&&(p=s-n);for(var h=n;h<=s;h+=p)a.push([h,o*h+i]);return a}return null}({seriesValues:t.seriesValues,options:e});return t?Object.assign({},e,{type:"scatterLine",data:t}):null},movingAverageTrendline:function(t){var e,o=t.options,i=(i=t.options,t=t.seriesValues,e=(i.trendline||{}).period||2,0<(t=ma(t({before:e,after:e}),hp(i.field),e)).length?t:null);return i?Object.assign({},o,{type:"scatterLine",data:i}):null}};function lp(){Qa.apply(this,arguments)}function cp(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}(Qa=Mx)&&(lp.__proto__=Qa),((lp.prototype=Object.create(Qa&&Qa.prototype)).constructor=lp).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new ax,this.yAxisRangeTracker=new ax},lp.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(ln(r,br),i),this.createScatterLineChart(ln(r,wr),i),this.createBubbleChart(ln(r,tr),i))}this.createAxes(t)},lp.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Qa.prototype.appendChart.call(this,t,e)},lp.prototype.removeAxis=function(t){var e=t.options.name;Qa.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},lp.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Ot([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Ot([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},lp.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new xx(this,{series:t,clip:e.options.clip}),e)},lp.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new n1(this,{series:t,clip:e.options.clip}),e)},lp.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new bx(this,{series:t,clip:e.options.clip}),e)},lp.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=x({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=an(a.type,Yr),p=s.query(),h=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||p||h,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===o&&!f){f=Nm.current.bindPoint(d,0).valueFields;l.push(f[e?"y":"x"]);break}}0===o&&p&&(s.min=Math.min(s.min,p.min),s.max=Math.max(s.max,p.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}h=new(an(a.type,Y)||!a.type&&i?Bm:t?Rm:Om)(s.min,s.max,a,this.chartService);if(h.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=h}return this.appendAxis(h),h},lp.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},lp.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new I(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(o,{element:qt(e),originalEvent:e,x:gn(a),y:gn(p)})},lp.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);cp(this.options,i,o,e),cp(this.originalOptions,i,o,e)},lp.prototype.trendlineFactory=function(t,e){var o=this.seriesValues.bind(this,e.index),t=ya(s1,t.type,{options:t,seriesValues:o});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},lp.prototype.seriesValues=function(t){for(var e=[],o=this.series[t],i=0;i<o.data.length;i++){var r=this.bindPoint(o,i);e.push({pointIx:i,valueFields:r.valueFields})}return e},e(s=lp,{xAxis:{},yAxis:{}}),x(s.prototype,Ox);const a1=s;(up=L)&&(bp.__proto__=up),((bp.prototype=Object.create(up&&up.prototype)).constructor=bp).prototype.render=function(){var t,e,o=this.options.labels,i=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,e=At(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===b||o.position===Zr?(o.color||(o.color=pm(this.options.color)),o.background||(o.background=this.options.color)):(e=i.theme.seriesDefaults.labels,o.color=o.color||e.color,o.background=o.background||e.background),this.label=new xm(r,x({},o,{align:b,vAlign:"",animation:{type:Fi,delay:this.animationDelay}}),t),this.append(this.label)))},bp.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},bp.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):r.position===Zr?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new E(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(i=t.x+o,n.orientation=S):(i=t.x-o,n.orientation=C),n.reflow(new E(i,t.y-e,t.x,t.y))))},bp.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;up.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(t=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new A.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:t,endAngle:t+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new A.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},bp.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},i=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},r=o.color,n={color:r,opacity:o.opacity},i=this.createSegment(e,x({fill:n,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(i),un(o)&&t.append(this.createGradientOverlay(i,{baseColor:r,fallbackFill:n},x({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},bp.prototype.createSegment=function(t,e){return e.singleSegment?new A.drawing.Circle(new A.geometry.Circle(new A.geometry.Point(t.center.x,t.center.y),t.radius),e):um.current.createRing(t,e)},bp.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),up.prototype.createAnimation.call(this)},bp.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,x({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},bp.prototype.highlightVisual=function(){return this.visual.children[0]},bp.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new A.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},bp.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Kt(e+180),e=M(Math.sin(t),g),t=M(Math.cos(t),g),{horizontal:Math.abs(e)>fp?b:t<0?S:C,vertical:Math.abs(e)<dp?b:e<0?w:k})}},bp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},bp.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}};var up,p=bp,dp=M(Kt(30),g),fp=M(Kt(60),g),gp,yp,h,vp,l,mp,xp,_p,s;function bp(t,e,o){up.call(this,o),this.value=t,this.sector=e}e(p,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:Z,margin:P(.5),align:W,zIndex:1,position:Qr},animation:{type:cr},highlight:{visible:!0,border:{width:1}},visible:!0}),x(p.prototype,Ym);const p1=p,h1={createLegendItem:function(t,e,o){var i,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},p=s.labels||{};o&&!1!==o.visibleInLegend&&(a=!(r=!1!==o.visible)&&At(p)||At(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=(r?(i={},e):(i={color:p.color,font:p.font},s.markers||{})).color,dn(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i})}};function wp(t,e){gp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Cp(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),i=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return 0!=i&&(o=n/i,r=new I(t.x+o*(e.x-t.x),t.y+o*(e.y-t.y))),r}(gp=L)&&(wp.__proto__=gp),((wp.prototype=Object.create(gp&&gp.prototype)).constructor=wp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},wp.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=nn(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/h),void 0),f=(T(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===Qr&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==p.length&&Boolean(y.explode),vt(a.color)||(a.color=y.color||o[g%i]),t(v,new lm(null,0,0,f,m),{owner:this,category:T(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:p[g],percentage:0!==l?v/l:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},wp.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;hn(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},wp.prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new p1(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},wp.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs,r=(void 0===i&&(i=[]),o.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new E(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],e=O(e.padding,p);this.targetBox=t,e=a-5<e?a-5:e,h.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new I(d+h.x1+e,d+h.y1+e),g=0;g<r;g++){var y=o[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,i.length&&(x=i[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===l-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(h),y.label);x&&x.options.position===Qr&&m===l-1&&(x.orientation===S?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},wp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},wp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},wp.prototype.distanceBetweenLabels=function(t){var e=Zt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=M(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var p=t[a+1].box,n=t[a].box,s=M(p.y1-n.y2);r.push(s)}return s=M(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},wp.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;0<r&&(0<=o||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},wp.prototype._takeDistance=function(t,e,o,i){var r;return 0<t[o]&&(i-=r=Math.min(t[o],i),t[o]-=r,t[e]+=r),i},wp.prototype.reflowLabels=function(t,e){var o,i=Zt(this.points),r=i.sector,n=i.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 l=e[h],c=l.box;p+=t[h],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===S),l.orientation===S?(n.align!==W&&(o=r.radius+r.center.x+a),l.reflow(new E(o+c.width(),p,o,p))):(n.align!==W&&(o=r.center.x-r.radius-a),l.reflow(new E(o-c.width(),p,o,p))),p+=c.height()}},wp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;gp.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,p,h,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new A.drawing.Path({stroke:{color:g,width:t.width},animation:{type:Fi,delay:c.animationDelay}}),d.options.position===Qr)&&(r=d.box,n=u.center,l=u.point(f),s=new I(r.x1,r.center().y),h=p=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===S?(h=Cp(n,l,s,p=new I(r.x1-t.padding,r.center().y)),s=new I(p.x-4,p.y),(h=h||s).x=Math.min(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===ir||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))):(h=Cp(n,l,s,p=new I(r.x2+t.padding,r.center().y)),s=new I(p.x+4,p.y),(h=h||s).x=Math.max(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===ir||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))),g.lineTo(p.x,p.y),this._connectorLines.push(g),this.visual.append(g))}},wp.prototype.renderVisual=function(){var t,e,o,i;gp.prototype.renderVisual.call(this),he(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),i=this.visual.bbox())&&(o=i.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-i.origin.y),(t.y2-e.y)/(o.y-e.y),(e.x-t.x1)/(e.x-i.origin.x),(t.x2-e.x)/(o.x-e.x)))<1)&&this.visual.transform(A.geometry.transform().scale(i,i,[e.x,e.y]))},wp.prototype.labelComparator=function(t){var o=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*o}},wp.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,e=e.center,s=e.x,e=e.y,o=Math.min(Math.abs(e-o),Math.abs(e-i));return n<o?t:s+Math.sqrt(n*n-o*o)*(r?1:-1)},wp.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},wp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},wp.prototype.animationDelay=function(t){return 70*t},wp.prototype.stackRoot=function(){return this},e(h=wp,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(h.prototype,h1),h.prototype.isStackRoot=!0;const l1=h;function Sp(){yp.apply(this,arguments)}(yp=Mx)&&(Sp.__proto__=yp),((Sp.prototype=Object.create(yp&&yp.prototype)).constructor=Sp).prototype.render=function(){this.createPieChart(this.series)},Sp.prototype.createPieChart=function(t){var e=t[0],t=new l1(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Sp.prototype.appendChart=function(t,e){yp.prototype.appendChart.call(this,t,e),Ft(this.options.legend.items,t.legendItems)};const c1=Sp;function kp(){vp.apply(this,arguments)}(vp=p1)&&(kp.__proto__=vp),((kp.prototype=Object.create(vp&&vp.prototype)).constructor=kp).prototype.reflowLabel=function(){var t,e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();o&&(t=o.box.height(),e.position===b?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new E(e.x,e.y-t/2,e.x,e.y))):vp.prototype.reflowLabel.call(this))},kp.prototype.createSegment=function(t,e){return um.current.createRing(t,e)},e(l=kp,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:cr}}),x(l.prototype,Ym);const u1=l;function Ap(){mp.apply(this,arguments)}(mp=l1)&&(Ap.__proto__=mp),((Ap.prototype=Object.create(mp&&mp.prototype)).constructor=Ap).prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new u1(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Ap.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),i=Math.min(i.width(),i.height()),r=i/2,n=o.series,s=n.length,o=O(o.padding,i-.85*i),a=r-(o=r-5<o?r-5:o),p=0,h=0;h<s;h++){var l=n[h];0===h&&T(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),T(l.size)?a-=l.size:p++,T(l.margin)&&h!==s-1&&(a-=l.margin)}T(e)||(a-=e=(r-o)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+O(f.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}mp.prototype.reflow.call(this,t)},Ap.prototype.animationDelay=function(t,e,o){return 50*t+Hi*(e+1)/(o+1)},e(s=Ap,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const d1=s;function Pp(){xp.apply(this,arguments)}(xp=c1)&&(Pp.__proto__=xp),((Pp.prototype=Object.create(xp&&xp.prototype)).constructor=Pp).prototype.render=function(){this.createDonutChart(this.series)},Pp.prototype.createDonutChart=function(t){var e=t[0],t=new d1(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)};const f1=Pp;function Tp(){_p.apply(this,arguments)}(_p=Mx)&&(Tp.__proto__=_p),((Tp.prototype=Object.create(_p&&_p.prototype)).constructor=Tp).prototype.initFields=function(){this.valueAxisRangeTracker=new ax},Tp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Tp.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),o=this.polarAxis.getSlot(0).center,o=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(o)},Tp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=i.type===Yr?(t=Vm,{min:.1,max:1}):(t=zm,{min:0,max:1}),e=e.query(name)||o||r,r=(e&&o&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max)),new t(e.min,e.max,i,this.chartService));this.valueAxis=r,this.appendAxis(r)},Tp.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),t=P(t.padding||{},r),r=i.clone().unpad(t),i=r.clone(),t=(i.y2=i.y1+Math.min(i.width(),i.height()),i.align(r,v,b),i.clone().shrink(0,i.height()/2)),r=(o.reflow(i),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=i,this.alignAxes(i)},Tp.prototype.backgroundBox=function(){return this.box},Tp.prototype.detachLabels=function(){};var Mp,Z=Tp,p,Op,Bp,Rp,Ip,h,Ep,l;function Lp(){Mp.apply(this,arguments)}(Mp=xx)&&(Lp.__proto__=Mp),((Lp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Lp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=I.onCircle(t.center,t.startAngle,e);return new E(t.x,t.y,t.x,t.y)},e(p=Lp,{clip:!1});const g1=p;function zp(){Op.apply(this,arguments)}(Op=n1)&&(zp.__proto__=Op),(h=(zp.prototype=Object.create(Op&&Op.prototype)).constructor=zp).prototype.pointSlot=g1.prototype.pointSlot,e(h,{clip:!1});const y1=h;function Vp(){Bp.apply(this,arguments)}(Bp=nx)&&(Vp.__proto__=Bp),((Vp.prototype=Object.create(Bp&&Bp.prototype)).constructor=Vp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},Vp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},Vp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new jm(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i};const v1=Vp;function jp(){Rp.apply(this,arguments)}(Rp=ix)&&(jp.__proto__=Rp),((jp.prototype=Object.create(Rp&&Rp.prototype)).constructor=jp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new A.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const m1=jp;function Dp(){Ip.apply(this,arguments)}function Hp(t,e){return t.value.x-e.value.x}(Ip=y1)&&(Dp.__proto__=Ip),((Dp.prototype=Object.create(Ip&&Ip.prototype)).constructor=Dp).prototype.createSegment=function(t,e,o){return new((e.line||{}).style===Zi?v1:m1)(t,e,o)},Dp.prototype.createMissingValue=function(t,e){var o;return dn(t.x)&&e!==Xi&&(o={x:t.x,y:t.y},e===Wi)&&(o.y=0),o},Dp.prototype.seriesMissingValues=function(t){return t.missingValues||Wi},Dp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Dp.prototype.sortPoints=function(t){if(t.sort(Hp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];!o||dn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t};const x1=Dp;function Fp(){Ep.apply(this,arguments)}(Ep=Z)&&(Fp.__proto__=Ep),((Fp.prototype=Object.create(Ep&&Ep.prototype)).constructor=Fp).prototype.createPolarAxis=function(){var t=new Lm(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Fp.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),Ep.prototype.render.call(this)},Fp.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:N},minorGridLines:{type:N}},this.options.yAxis)},Fp.prototype.createValueAxis=function(){Ep.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Fp.prototype.trendlineFactory=function(t,e){t=a1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=dr),t},Fp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Mx.prototype.appendChart.call(this,t,e)},Fp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(ln(t,[dr]),e),this.createScatterChart(ln(t,[fr]),e),this.createAreaChart(ln(t,[ur]),e)},Fp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new y1(this,{series:t}),this.appendChart(t,e))},Fp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new g1(this,{series:t}),this.appendChart(t,e))},Fp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new x1(this,{series:t}),this.appendChart(t,e))},Fp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new I(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:qt(e),x:r,y:i})},Fp.prototype.createCrosshairs=function(){},e(l=Fp,{xAxis:{},yAxis:{}}),x(l.prototype,Ox,{seriesValues:a1.prototype.seriesValues});var Up,Np,Gp,Wp,s=l,p,Xp,h,qp,Yp,l,Zp,p,Qp,h;function Kp(){Up.apply(this,arguments)}(Up=ox)&&(Kp.__proto__=Up),((Kp.prototype=Object.create(Up&&Up.prototype)).constructor=Kp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=I.onCircle(t.center,t.middle(),e);return new E(t.x,t.y,t.x,t.y)},Kp.prototype.renderSegments=function(){if(Up.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),e=0;e<t.length;e++){var o,i,r,n=t[e];n&&1<n.length&&(o=n[0].linePoints[0],r=Zt(n),r=Zt(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i)&&r&&Zt(n).linePoints.push(o)}},Kp.prototype.createSegment=function(t,e,o){var o=new(e.style===Zi?Jm:Km)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==Xi||(o.options.closed=!0),o},e(p=Kp,{clip:!1,limitPoints:!1});const _1=p;function $p(){Np.apply(this,arguments)}(Np=nx)&&($p.__proto__=Np),(($p.prototype=Object.create(Np&&Np.prototype)).constructor=$p).prototype.fillToAxes=function(){};const b1=$p;function Jp(){Gp.apply(this,arguments)}(Gp=ix)&&(Jp.__proto__=Gp),((Jp.prototype=Object.create(Gp&&Gp.prototype)).constructor=Jp).prototype.fillToAxes=function(){};const w1=Jp;function th(){Wp.apply(this,arguments)}(Wp=_1)&&(th.__proto__=Wp),((th.prototype=Object.create(Wp&&Wp.prototype)).constructor=th).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),p===Zi?(s=new b1(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new w1(t,e,o,r,n)),s},th.prototype.seriesMissingValues=function(t){return t.missingValues||Wi};const C1=th;function eh(t,e){Xp.call(this,t,null,e)}(Xp=u1)&&(eh.__proto__=Xp),e(h=(eh.prototype=Object.create(Xp&&Xp.prototype)).constructor=eh,{overlay:{gradient:"none"},labels:{distance:10}});const S1=h;function oh(t){qp.call(this,t),this.forEach=t.rtl?gs:fs}(qp=L)&&(oh.__proto__=qp),((oh.prototype=Object.create(qp&&qp.prototype)).constructor=oh).prototype.reflow=function(o){var t=this.options,e=this.children,i=t.gap,r=t.spacing,t=e.length,n=o.angle/(t+i+r*(t-1)),s=o.startAngle+i/2*n;this.forEach(e,function(t){var e=o.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},e(l=oh,{gap:1,spacing:0});const k1=l;function ih(){Yp.apply(this,arguments)}(Yp=L)&&(ih.__proto__=Yp),((ih.prototype=Object.create(Yp&&Yp.prototype)).constructor=ih).prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new E;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const A1=ih;function rh(){Zp.apply(this,arguments)}(Zp=ux)&&(rh.__proto__=Zp),((rh.prototype=Object.create(Zp&&Zp.prototype)).constructor=rh).prototype.pointType=function(){return S1},rh.prototype.clusterType=function(){return k1},rh.prototype.stackType=function(){return A1},rh.prototype.categorySlot=function(t,e){return t.getSlot(e)},rh.prototype.pointSlot=function(t,e){var o=t.clone(),t=t.center.y;return o.radius=t-e.y1,o.innerRadius=t-e.y2,o},rh.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},rh.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Zp.prototype.createAnimation.call(this)},(p=rh).prototype.reflow=qm.prototype.reflow,e(p,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const P1=p;function nh(){Qp.apply(this,arguments)}(Qp=Z)&&(nh.__proto__=Qp),((nh.prototype=Object.create(Qp&&Qp.prototype)).constructor=nh).prototype.createPolarAxis=function(){var t=new Em(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},nh.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:N},minorGridLines:{type:N}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},nh.prototype.aggregateCategories=function(){Xx.prototype.aggregateCategories.call(this,this.panes)},nh.prototype.createCategoryAxesLabels=function(){Xx.prototype.createCategoryAxesLabels.call(this,this.panes)},nh.prototype.filterSeries=function(t){return t},nh.prototype.trendlineFactory=function(t,e){t=Xx.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=vr),t},nh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(ln(t,[gr]),e),this.createLineChart(ln(t,[vr]),e),this.createBarChart(ln(t,[yr]),e)},nh.prototype.chartOptions=function(t){var e={series:t},o=t[0];return o&&(t=this.filterVisibleSeries(t),o=o.stack,e.isStacked=o&&1<t.length,e.isStacked100=o&&"100%"===o.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},nh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new C1(this,this.chartOptions(t)),this.appendChart(t,e))},nh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new _1(this,this.chartOptions(t)),this.appendChart(t,e))},nh.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,o=new P1(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},nh.prototype.seriesCategoryAxis=function(){return this.categoryAxis},nh.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new I(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:qt(e),category:r,value:i})},nh.prototype.createCrosshairs=function(){},x((h=nh).prototype,Ox,{appendChart:Xx.prototype.appendChart,aggregateSeries:Xx.prototype.aggregateSeries,seriesSourcePoints:Xx.prototype.seriesSourcePoints,seriesValues:Xx.prototype.seriesValues}),e(h,{categoryAxis:{categories:[]},valueAxis:{}});var sh,l=h,p,ah,ph,hh,Z;function lh(t,e,o){sh.call(this,e),this.value=t,this.options.index=o.index}(sh=L)&&(lh.__proto__=sh),((lh.prototype=Object.create(sh&&sh.prototype)).constructor=lh).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new E(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new E(t.x1,e[0].y,t.x2,e[2].y))},lh.prototype.createVisual=function(){var t=this,e=this.options;sh.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},lh.prototype.createPath=function(){var t=this.options,e=t.border;return A.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},lh.prototype.createHighlight=function(t){return A.drawing.Path.fromPoints(this.points,t)},lh.prototype.highlightVisual=function(){return this.visual.children[0]},lh.prototype.highlightVisualArgs=function(){var t=A.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},lh.prototype.tooltipAnchor=function(){var t=this.box;return{point:new I(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},lh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},e(p=lh,{color:a,border:{width:1}}),x(p.prototype,Ym);const T1=p;function ch(t,e){ah.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}(ah=L)&&(ch.__proto__=ah),((ch.prototype=Object.create(ah&&ah.prototype)).constructor=ch).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},ch.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,o=(void 0===e&&(e=[]),t.series[0]),i=o.data;if(i)for(var t=nn(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(a=h.fields,vt(o.color)||(o.color=a.color||e[s%e.length]),a=x({index:s,owner:this,series:o,dataItem:i[s],percentage:h.value/r},a,{visible:h.visible}),h=h.valueFields.value,p=this.createSegment(h,a),h=this.createLabel(h,a),p)&&h&&p.append(h)}},ch.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;hn(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},ch.prototype.createSegment=function(t,e){var o=x({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible)return t=new T1(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},ch.prototype.createLabel=function(t,e){var o,i=e.series,r=e.dataItem,n=x({},this.options.labels,i.labels),s=t;if(n.visible)return o=At(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:i},o?s=o(r):n.format&&(s=this.plotArea.chartService.format.auto(n.format,s)),n.color||(n.color=pm(i.color),n.background)||(n.background=i.color),this.evalSegmentOptions(n,t,e),o=new xm(s,x({vAlign:n.position},n),r),this.labels.push(o),o},ch.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i,r=t[o].options.align;r!==b&&(i=t[o].box.width(),r===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},ch.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=i.dynamicHeight?o*d:o/n,d=_(d?(e-h*(f/d))/2:f?0:e/2,0,e);g.push(new A.geometry.Point(t.x1+l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new A.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new A.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+i.segmentSpacing,h=_(e-2*(l=d),0,e)}},ch.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,p=s?0:(e-e/i.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?h*d:h/n,d=i.dynamicHeight?o*d:o/n;u.push(new A.geometry.Point(t.x1+p,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new A.geometry.Point(t.x1+e-p-f,t.y1+d+l)),u.push(new A.geometry.Point(t.x1+p+f,t.y1+d+l)),p+=f,l+=d+i.segmentSpacing}},ch.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},e(Z=ch,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),x(Z.prototype,h1);const M1=Z;function uh(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,ph.call(this,t,e)}(ph=M1)&&(uh.__proto__=ph);const O1=(uh.prototype=Object.create(ph&&ph.prototype)).constructor=uh;function dh(){hh.apply(this,arguments)}(hh=Mx)&&(dh.__proto__=hh),((dh.prototype=Object.create(hh&&hh.prototype)).constructor=dh).prototype.render=function(){this.createChart(M1,ln(this.series,[nr])),this.createChart(O1,ln(this.series,[sr]))},dh.prototype.createChart=function(t,e){var o=e[0];o&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:o.neckRatio,dynamicHeight:o.dynamicHeight,dynamicSlope:o.dynamicSlope,segmentSpacing:o.segmentSpacing,highlight:o.highlight}),this.appendChart(t))},dh.prototype.appendChart=function(t,e){hh.prototype.appendChart.call(this,t,e),Ft(this.options.legend.items,t.legendItems)};var fh,h=dh,p,gh,Z,yh,p;function vh(t,e){fh.call(this),this.options=e,this.color=e.color||a,this.value=t}(fh=L)&&(vh.__proto__=fh),((vh.prototype=Object.create(fh&&fh.prototype)).constructor=vh).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},vh.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=At(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||pm(this.color),this.label=new xm(e,x({align:b,vAlign:b,margin:{left:5,right:5},zIndex:O(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},vh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},vh.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},vh.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r=O(e.type,"rect")===nt,o=O(o.width,r?1:0),r=Math.round(o/2);return e.size&&(t=i.center(),i.size.width=i.size.height=e.size,i.origin.x=Math.round(t.x-i.size.width/2),i.origin.y=Math.round(t.y-i.size.height/2)),i.size.width-=o,i.size.height-=o,i.origin.y+=r+.5,i.origin.x+=r+.5,Xe(i)},vh.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=O(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},vh.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new fm({type:O(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=e,this.append(e)},vh.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new fm({type:O(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:O(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},vh.prototype.highlightVisual=function(){return this.rectVisual},vh.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},vh.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new I(t,e),align:{horizontal:b,vertical:w}}},vh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},vh.prototype.unclipElements=function(){},vh.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},x((p=vh).prototype,Ym),x(p.prototype,Zm),p.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};const B1=p;function mh(t,e){gh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(gh=L)&&(mh.__proto__=gh),((mh.prototype=Object.create(gh&&gh.prototype)).constructor=mh).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:tt,max:et},this._evalSeries=[]},mh.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},mh.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this.plotArea.bindPoint(o,i).valueFields;T(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},mh.prototype.addValue=function(t,e){var o;t&&T(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},mh.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=hn(t,{},n,!0)),t);return s&&hn(r=x({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},mh.prototype.pointType=function(){return B1},mh.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},mh.prototype.createPoint=function(t,e){var o,i,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(vt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=(0,A.parseColor)(e),r=1-o,a=function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}(t.value/this.valueRange.max)),new B1(t,s));return n.color=a,this.append(n),n},mh.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{xAxis:i,yAxis:o};throw new Error("Unable to locate Y axis with name "+t)},mh.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var o=s[p++],e=n.seriesAxes(e.series),i=e.xAxis,e=e.yAxis,r=i.categoryIndex(t.x),t=e.categoryIndex(t.y),i=i.getSlot(r,r,a),r=e.getSlot(t,t,a);o&&(i&&r?(e=n.pointSlot(i,r),o.reflow(e)):o.visible=!1)}),this.box=t},mh.prototype.pointSlot=function(t,e){return new E(t.x1,e.y1,t.x2,e.y2)},mh.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var l=this.plotArea.bindPoint(i,h),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=p.min<=d&&d<=p.max;u&&d&&t(c,x({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},l))}},mh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},mh.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},e(Z=mh,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const R1=Z;function xh(){yh.apply(this,arguments)}function _h(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}(yh=Mx)&&(xh.__proto__=yh),((xh.prototype=Object.create(yh&&yh.prototype)).constructor=xh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},xh.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},xh.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=Te(n.categories||[]),a=Te(r.categories||[]),p=0;p<i.length;p++){var h=Nm.current.bindPoint(o,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},xh.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(ln(r,[ar]),i)}},xh.prototype.createHeatmapChart=function(t,e){t=new R1(this,{series:t});this.appendChart(t,e)},xh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Ot([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Ot([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},xh.prototype.seriesAxes=function(t){var e=this.options,o=[].concat(e.xAxis),i=t.xAxis,o=i?o.find(function(t){return t.name===i}):o[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!o)throw new Error("Unable to locate X axis with name "+i);if(t)return{xAxis:o,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},xh.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},xh.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){c=Nm.current.bindPoint(l,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(an(s.type,Y)||!s.type&&i?Mm:Tm)(s,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.mapCategories(),t},xh.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},xh.prototype.removeAxis=function(t){var e=t.options.name;yh.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},xh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new I(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];en(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(o,{element:qt(e),originalEvent:e,x:gn(a),y:gn(p)})},xh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);_h(this.options,i,o,e),_h(this.originalOptions,i,o,e)},xh.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},e(p=xh,{xAxis:{},yAxis:{}}),x(p.prototype,Ox);var bh,Z=p,p="color",wh="first",Ch="max",Sh="noteText",kh=(t1.current.register(Xx,[$i,ir,hr,Ar,Ki,Cr,or,lr,er,kr,Ji,Sr,_r,xr,Tr,pr,mr,Pr].concat(Or)),t1.current.register(a1,[br,wr,tr].concat(Or)),t1.current.register(c1,[cr]),t1.current.register(f1,[rr]),t1.current.register(h,[nr,sr]),t1.current.register(s,[ur,dr,fr].concat(Or)),t1.current.register(l,[gr,yr,vr].concat(Or)),t1.current.register(Z,[ar]),Nm.current.register([$i,ir,hr,Ar,Ki,Cr],[at],[t,p,Sh,Ni,Gi,o]),Nm.current.register([_r,xr,mr,Pr],["from","to"],[t,p,Sh,o]),Nm.current.register([Tr,pr],[at],[t,p,Sh,"summary",o]),Nm.current.register([ur,dr,fr],[y,v],[p,o]),Nm.current.register([gr,yr,vr],[at],[p,o]),Nm.current.register([nr,sr],[at],[t,p,"visibleInLegend","visible",o]),Rx.current.register([$i,ir,hr,Ar,Ki,Cr,Tr,pr],{value:Ch,color:wh,noteText:wh,errorLow:"min",errorHigh:Ch}),Rx.current.register([_r,xr,mr,Pr],{from:"min",to:Ch,color:wh,noteText:wh}),Rx.current.register([gr,yr,vr],{value:Ch,color:wh}),Nm.current.register([br,wr,tr],[y,v],[p,Sh,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Nm.current.register([tr],[y,v,"size"],[p,t,Sh]),Nm.current.register([ar],[y,v,at],[p,Sh]),Nm.current.register([or,lr],["open","high","low","close"],[t,p,"downColor",Sh]),Rx.current.register([or,lr],{open:Ch,high:Ch,low:"min",close:Ch,color:wh,downColor:wh,noteText:wh}),Nm.current.register([Ji,Sr],["lower","q1","median","q3","upper","mean","outliers"],[t,p,Sh,o]),Rx.current.register([Ji,Sr],{lower:Ch,q1:Ch,median:Ch,q3:Ch,upper:Ch,mean:Ch,outliers:wh,color:wh,noteText:wh}),Nm.current.register([er,kr],["current","target"],[t,p,"visibleInLegend",Sh,o]),Rx.current.register([er,kr],{current:Ch,target:Ch,color:wh,noteText:wh}),Nm.current.register([cr,rr],[at],[t,p,"explode","visibleInLegend","visible",o]),[t,at,y,v]),Ah="mousemove",Ph="contextmenu",Th="mouseleave",h;function B(t,e,o,i){var r=this,i=(void 0===i&&(i={}),bh.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new km(this,i),this.chartService.theme=o,this._initElement(t),x({},this.options,e));this._originalOptions=x({},i),this._theme=o,this._initTheme(i,o),this._initHandlers(),this._initSurface(),this.bindCategories(),am.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function Mh(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function Oh(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 Bh(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}(bh=A.Class)&&(B.__proto__=bh),((B.prototype=Object.create(bh&&bh.prototype)).constructor=B).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},B.prototype._setElementClass=function(t){lt(t,"k-chart")},B.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o;for(var n=t,s=kh,a=0;a<s.length;a++){var p=s[a]+"Axes";n[p]&&(n[s[a]+"Axis"]=n[p],delete n[p])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=x({},e,t),this.applySeriesColors()},B.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)}},B.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=0<e.width||0<e.height;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&he(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},B.prototype._resize=function(){this._noTransitionsRedraw()},B.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},B.prototype.getAxis=function(t){return Ai(t,this._plotArea.axes)},B.prototype.findAxisByName=function(t){return this.getAxis(t)},B.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Hm(e[o])},B.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Hm(e[t])},B.prototype.plotArea=function(){return new Fm(this._plotArea)},B.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=vt(e)?r.filterPoints(e):(_t(e)?(o=e.series,i=e.category):o=i=e,n.type===rr?Mh(r.pointsBySeriesName(o),i):u(n.type,[cr,nr,sr])?Mh((r.charts[0]||{}).points,i):r.pointsBySeriesName(o));e&&this.togglePointsHighlight(t,e)},B.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},B.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;vt(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&T(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(n=this._plotArea.pointsByCategoryIndex(o),r.showAt(n)):e&&r.show(e)},B.prototype.hideTooltip=function(){this._tooltip.hide()},B.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Wt(e,{width:o.width}),o.height&&Wt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=A.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},B.prototype._surfaceWrap=function(){return this.element},B.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 qx,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Lh(this._plotArea.panes),this._navState||this._cancelDomEvents()},B.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(o=this.options,t=x({},t.options,{chartArea:{width:t.width,height:t.height}}),Eh(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),Lh(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},B.prototype._sharedTooltip=function(){return this._plotArea instanceof Xx&&this.options.tooltip&&this.options.tooltip.shared},B.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Yx(this._plotArea,t.pannable))},B.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Zx(this,e))},B.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Qx(this,e))},B.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==o||this.requiresHandlers([Dr,Vr,jr])),o=(!1===e||!1===i)&&!this.requiresHandlers([Hr,Fr,Ur]),e=this.element;this._dragZoomEnabled&&t&&o?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&o||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!o)},B.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom)&&o.toggleZoom(e)},B.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new o1(this.chartService,t)},B.prototype._createSharedTooltip=function(t){return new i1(this._plotArea,t)},B.prototype.applyDefaults=function(t,e){var o,i,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||i.color,e=x({},s,s[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[o],e}for(var p=0;p<kh.length;p++)i=n.axisDefaults||{},r=(r=[].concat(n[o=kh[p]+"Axis"])).map(a),n[o]=1<r.length?r:r[0];var h=t,t=e,l=h.series,c=l.length,u=h.seriesDefaults,d=x({},h.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);Oh(d),Oh(g);for(var y=0;y<c;y++){var v=l[y].type||h.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:h.tooltip},d,u[v]);l[y]._defaults=v,l[y]=x({},v,l[y]),l[y].data=l[y].data||[]}},B.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},B.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new ym(this._modelOptions()),i=(o.chart=this,o._plotArea=e,_m.buildTitle(t.title)),r=_m.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return o.append.apply(o,_m.orderTitles([i,r])),t.legend&&t.legend.visible&&o.append(new Jx(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},B.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return x({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},B.prototype._createPlotArea=function(t){var e=this.options;return t1.current.create(t?[]:e.series,e,this.chartService)},B.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof Tm&&n.select&&!n.vertical&&(i=r.range(),r=new e1(this,r,x({min:i.min,max:i.max},n.select)),e.push(r))}},B.prototype._selectStart=function(t){return this.trigger(Nr,t)},B.prototype._select=function(t){return this.trigger(Gr,t)},B.prototype._selectEnd=function(t){return this.trigger(Wr,t)},B.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=(0,A.throttle)(this._mousemove.bind(this),20)},B.prototype.addObserver=function(t){t&&this.observers.push(t)},B.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},B.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},B.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===Xr?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Ir?this._updateDrilldownPoint(e.point):t===Er?this._resetDrilldownPoint():t===Br&&this._startDrilldown(e.point);for(var o=this.observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},B.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,Ut(e,((t={})[Ph]=this._clickHandler,t[Kr]=this._mousewheelHandler,t[Th]=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Ut(e,((t={})[Ah]=this._mousemove,t)),this.domEvents=Am.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()},B.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(zr)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},B.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},B.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},B.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(Ur,{}))},B.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e))&&(e=Math.round(10*e),this._gestureDistance=t.distance,o={delta:e,axisRanges:Bh(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger(Hr,o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(Fr,o)&&i.zoom()))},B.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},B.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Dr,Vr,jr])&&this._startNavigation(t,e,Dr),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(Hr,{axisRanges:Bh(this._plotArea.axes),originalEvent:t})},B.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger(Vr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];p.options.name&&0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(Vr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},B.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(jr,{axisRanges:Bh(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,jr),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Fr,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(Ur,{axisRanges:e,originalEvent:t})))},B.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),o=this._plotArea.paneByPoint(t);if(o)for(var i=0;i<e.length;i++)if(e[i].onPane(o))return!0},B.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return O(t.rate,.3)},B.prototype._mousewheel=function(t){var e=this,o=Dt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:Bh(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(Hr,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger(Fr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(Ur,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=i||this._startNavigation(t,r,Hr)?i:this._navState){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(Fr,{delta:o,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,Ur)},150)}}},B.prototype._startNavigation=function(t,e,o){var i,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(i=Bh(r),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:e,axes:r}))},B.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},B.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},B.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),i=o&&(i=i.closest(o))&&i.aliasFor?i.aliasFor():i},B.prototype._eventCoordinates=function(t){t=Xt(t);return this._toModelCoordinates(t.x,t.y)},B.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=Ct(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},B.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=Gt(this.element);return{left:M(t.x+e.left+o.left),top:M(t.y+e.top+o.top)}},B.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Gt(o),r=this._elementPadding(),o=de(o).invert(),t=new A.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new I(t.x,t.y)},B.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},B.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},B.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},B.prototype._startHover=function(t,e){return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Mx)}),this._showInactiveOpacity(t,e),t)},B.prototype._displayTooltip=function(t){x({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},B.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);i&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t)):i.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,i))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},B.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},B.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},B.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},B.prototype._updateDrilldownPoint=function(t){t&&t.series&&Nm.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},B.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},B.prototype._startDrilldown=function(t){var e,o;t&&t.series&&(e=t.series,o=Nm.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:o,sender:this})},B.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},B.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||i;a&&(a.highlight||{}).visible&&s.visual&&(n=(i||s.series).opacity,a===e&&!o||s.visual.opacity(o?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,o,s.series)}},B.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},B.prototype._showInactiveOpacity=function(t,e){var o=this._activePoint,i=1<this._plotArea.series.length,r=this._hasInactiveOpacity();return this._updateHoveredPoint(t,e),t&&o!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),r?this._displayInactiveOpacity(t,i):this._highlight.show(t))),t},B.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},B.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},B.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},B.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},B.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),Ut(document,((t={})[Ah]=this._mouseMoveTrackHandler,t)))},B.prototype._mouseMoveTracking=function(t){var e=this.options,o=this._tooltip,i=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&((this._activePoint=n).hover(this,t)||(x({},e.tooltip,n.options.tooltip).visible&&o.show(n),i.show(n))):($t(document,((t={})[Ah]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},B.prototype._mousemove=function(t){var e=this._eventCoordinates(t),o=this._plotArea;this._trackCrosshairs(e),o.hover&&((o=o.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!o&&(this._plotAreaHovered=!1,this.trigger(zr))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},B.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},B.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,p,h;this._suppressHover||(i=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((h=(p=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger(Rr,h)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},B.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},B.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},B.prototype._deferRedraw=function(){this._redraw()},B.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},B.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},B.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new nm,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var f=(o=fn(t,Ri(l.categoryField,u[0])))?cn:Ri,g=0;g<d;g++){var y=u[g],v=f(l.categoryField,y,this.chartService.intl);!o&&s.get(v)||(a.push([v,y]),o)||s.set(v,!0)}}0<a.length?(i=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(a=o?function(t){for(var e=function(t,e){void 0===e&&(e=Vo);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(a,t=void 0===t?Vo:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],Zt(i))&&i.push(e[r]);return i}(function(t,e){return Vo(t[0],e[0])}):a),t.categories=i[0]):p&&(t.categories=[])},B.prototype._isBindable=function(t){for(var e=Nm.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===at?r="field":r+="Field",!T(t[r])){o=!1;break}}return o},B.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},B.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[cr,rr,nr,sr])?t.findPoint(function(t){return t.series.index===e&&t.index===o}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):i.show(n)},B.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Lr,zr])},B.prototype.updateMouseMoveHandler=function(){var t;$t(this.element,((t={})[Ah]=this._mousemove,t)),this._shouldAttachMouseMove()&&Ut(this.element,((t={})[Ah]=this._mousemove,t))},B.prototype.applyOptions=function(t,e){Eh(this._originalOptions,t),this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},B.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},B.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},B.prototype.setIntlService=function(t){this.chartService.intl=t},B.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},B.prototype.destroy=function(){var t;this._destroyed=!0,$t(this.element,((t={})[Ph]=this._clickHandler,t[Kr]=this._mousewheelHandler,t[Ah]=this._mousemove,t[Th]=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&$t(document,((t={})[Ah]=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},B.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},B.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},B.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._resetDrilldownPoint(),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)};var Rh,Ih=["data","categories"];function Eh(t,e){for(var o in e){var i,r,n;!u(o,Ih)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],T(r))&&((n=null===i)||!T(i)?(delete t[o],n&&delete e[o]):r&&_t(i)&&_t(r)&&Eh(r,i))}}function Lh(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e(h=B,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:ir,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});const I1=h;function zh(){Rh.apply(this,arguments)}(Rh=i1)&&(zh.__proto__=Rh),((zh.prototype=Object.create(Rh&&Rh.prototype)).constructor=zh).prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new I(this.plotArea.box.x2,e.center().y):new I(e.center().x,-2),align:i}},zh.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const E1=zh;var Vh=[$i,er],jh,Dh,s,Hh,l;function Fh(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function Uh(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Nh(t){return m(t)?[t]:t}function Gh(){jh.apply(this,arguments)}(jh=I1)&&(Gh.__proto__=jh),((Gh.prototype=Object.create(jh&&jh.prototype)).constructor=Gh).prototype._setElementClass=function(t){lt(t,"k-sparkline")},Gh.prototype._initElement=function(t){jh.prototype._initElement.call(this,t),this._initialWidth=Math.floor(Wt(t).width)},Gh.prototype._resize=function(){var t=this.element,e=Fh(t.childNodes);this._initialWidth=Math.floor(Wt(t).width),Uh(t.childNodes,e),jh.prototype._resize.call(this)},Gh.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Fh(e.childNodes),i=document.createElement("span"),t=(i.innerHTML=" ",e.appendChild(i),x({width:this._autoWidth,height:Wt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return Wt(e,{width:t.width,height:t.height}),e.removeChild(i),Uh(e.childNodes,o),this.surface&&this.surface.resize(),t},Gh.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Gh.prototype._createPlotArea=function(t){t=jh.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Gh.prototype._calculateWidth=function(t){for(var e=this.options,o=P(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===$i)return 150;if(p.type===er)return 150;if(p.type===cr)return Wt(r).height;var h=a.categoryAxis;h&&(h=h.categoriesCount()*(!a.options.isStacked&&u(p.type,[ir,kr])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},Gh.prototype._createSharedTooltip=function(t){return new E1(this._plotArea,t)},Gh.normalizeOptions=function(t){t=Nh(t);return(t=ht(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:Nh(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Vh)||u(t.seriesDefaults.type,Vh)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t},e(s=Gh,{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}]});const L1=s;function Wh(){Dh.apply(this,arguments)}(Dh=A.drawing.Animation)&&(Wh.__proto__=Dh),((Wh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Wh).prototype.setup=function(){this._initialOpacity=parseFloat(Ct(this.element,"opacity").opacity)},Wh.prototype.step=function(t){Ct(this.element,{opacity:String(It(this._initialOpacity,0,t))})},Wh.prototype.abort=function(){Dh.prototype.abort.call(this),Ct(this.element,{display:"none",opacity:String(this._initialOpacity)})},Wh.prototype.cancel=function(){Dh.prototype.abort.call(this),Ct(this.element,{opacity:String(this._initialOpacity)})};const z1=Wh;function Xh(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}function qh(t,e,o){Hh.call(this),this.options=x({},this.options,o),this.container=t,this.chartService=e;o=Ct(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}(Hh=A.Class)&&(qh.__proto__=Hh),((qh.prototype=Object.create(Hh&&Hh.prototype)).constructor=qh).prototype.createElements=function(){var t=this.element=Xh("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Xh("k-tooltip k-chart-tooltip"),o=this.scroll=Xh("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},qh.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Ro(d(t)+d(e-t)/2),p=.4*o.width(),h=o.center().x-p,l=(o.center().x-h)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=At(r),r=(this.clearHideTimeout(),this._visible||(Ct(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,Ct(s,{left:o.center().x-s.offsetWidth/2,top:o.y1}),Ct(s,["marginTop","borderTopWidth","height"]));Ct(n,{width:p,left:h+a*l,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),Ct(i,{visibility:"visible"})},qh.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},qh.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new z1(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},qh.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(l=qh,{format:"{0:d} - {1:d}",hideDelay:500});const V1=l;var Yh,Zh="_navigator",Qh=Zh,Kh="_default",$h,Z;function Jh(t){Yh.call(this),this.chart=t;var e=this.options=x({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),T(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new sm(this,((o={})[Vr]="_drag",o[jr]="_dragEnd",o[Fr]="_zoom",o[Ur]="_zoomEnd",o)),t.addObserver(this.chartObserver)}function tl(){}(Yh=A.Class)&&(Jh.__proto__=Yh),((Jh.prototype=Object.create(Yh&&Yh.prototype)).constructor=Jh).prototype.parseDate=function(t){return No(this.chart.chartService.intl,t)},Jh.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Jh.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Jh.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Jh.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,i=i.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,p=(tl.prototype=o,new tl);0!==o.categoriesCount()&&(this.clean(),p.box=o.box,this.selection=new e1(t,p,{min:r,max:i,from:s||r,to:a||i,mousewheel:O(n,{zoom:"left"}),visible:e.visible},new sm(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new V1(t.element,t.chartService,{min:r,max:i,template:At(e.hint),format:e.hint.format}))},Jh.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Qh].roundedRange(),e=t.min,t=t.max,o=this.options.select||{},i=o.from||e,r=o.to||t;this.options.select=x({},o,{from:i=i<e?e:i,to:r=t<r?t:r}),this.filterAxes()},Jh.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Zt(e.panes),t)},Jh.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.filter(function(t){return t.options.name!==Zh});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},Jh.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(i),i=e._plotArea.categoryAxis,e=t.axisRanges[i.options.name],t=this.options.select;e&&!r&&o&&(i=t.from&&t.to?d(t.to)-d(t.from):d(o.options.to)-d(o.options.from),r=Ro(_(d(e.min),n.min,d(n.max)-i)),t=Ro(_(d(r)+i,d(n.min)+i,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(r,t),this.showHint(r,t))},Jh.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Jh.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},Jh.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,o=(t=void 0===t?{}:t).from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Zh&&(n.min=o,n.max=i)}},Jh.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:i.from,to:i.to},"category"!==e.options.type&&(e=new Mm(x({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=Eo(e.min,-e.baseUnitStep,e.baseUnit),t.to=Eo(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},Jh.prototype._zoom=function(t){var e,o,i=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),p=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),o=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(p)&&(p*=3),1<a-e?(r.zoom(p,o),this.readSelection()):(i.options.min=s.from,s.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),o).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},Jh.prototype._zoomEnd=function(t){this._dragEnd(t)},Jh.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},Jh.prototype._selectStart=function(t){return this.chart._selectStart(t)},Jh.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Jh.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Jh.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Qh]},Jh.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},Jh.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=x({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=x({},o.pane,{name:Zh}),o.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?i.push(r):i.unshift(r),i.forEach(function(t){return t.name=t.name||Kh}),Jh.attachAxes(t,o),Jh.attachSeries(t,o,e))},Jh.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=(i.concat(t).forEach(function(t){return t.pane=t.pane||Kh}),0===ln(o,Mr).length),o=x({type:"date",pane:Zh,roundToBaseUnit:!o,justified:o,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),r=e.categoryAxis;i.push(x({},o,{maxDateGroups:200},r,{name:Qh,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},o,r,{name:Qh+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},o,r,{name:Qh+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Qh,pane:Zh,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Jh.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(x({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Qh,categoryAxis:Qh,autoBind:e.autoBindElements}))};const j1=Jh;function el(){$h.apply(this,arguments)}($h=I1)&&(el.__proto__=$h),((el.prototype=Object.create($h&&$h.prototype)).constructor=el).prototype.applyDefaults=function(t,e){var o=Wt(this.element).width||600,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}},e=e&&x({},e,o);j1.setup(t,e),$h.prototype.applyDefaults.call(this,t,e)},el.prototype._setElementClass=function(t){lt(t,"k-chart k-stockchart")},el.prototype.setOptions=function(t){this.destroyNavigator(),$h.prototype.setOptions.call(this,t)},el.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},el.prototype._resize=function(){this.noTransitionsRedraw()},el.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},el.prototype._dirty=function(){var t=this.options,t=Ot([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},el.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new j1(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),$h.prototype._redraw.call(this),t.initSelection()},el.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Zh?this._unsetActivePoint():$h.prototype._trackSharedTooltip.call(this,t)},el.prototype.bindCategories=function(){$h.prototype.bindCategories.call(this),this.copyNavigatorCategories()},el.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Qh?t=i.categories:t&&i.pane===Zh&&(i.categories=t)}},el.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},el.prototype.destroy=function(){this.destroyNavigator(),$h.prototype.destroy.call(this)},el.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return $h.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Zh},el.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e(Z=el,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});const D1=Z;var ol="arrowPointer",il="barPointer",rl=Math.PI/180,nl="inside",Sh="linear",sl="outside",Ch="radialPointer",wh="radialRangePointer";function al(t,e){var o=t.getOrigin(),i=t.getSize(),e=P(e);return t.setOrigin([o.x-e.left,o.y-e.top]),t.setSize([i.width+(e.left+e.right),i.height+(e.top+e.bottom)]),t}var pl=A.drawing.Group,hl=A.drawing.Path,ll=A.drawing.Text;function cl(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=hl.fromRect(new A.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new ll(t.text,new A.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=al(t.bbox().clone(),e.padding),e=hl.fromRect(i,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),i=new pl;return i.append(o),i.append(e),i.append(t),i}function ul(t,e,o){var i=T(t.from)?t.from:et,r=T(t.to)?t.to:tt;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function dl(t,e){e=P(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,al(t,e)}var fl,gl=A.drawing.Path,yl=A.drawing.Surface,p;function vl(t,e,o,i){void 0===i&&(i={}),fl.call(this),this.element=t,this.theme=o,this.contextService=new km(this,i),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(o),this.redraw()}(fl=A.Class)&&(vl.__proto__=fl),((vl.prototype=Object.create(fl&&fl.prototype)).constructor=vl).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},vl.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},vl.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},vl.prototype.exportVisual=function(){return this._visuals},vl.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(ht(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},vl.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},vl.prototype.resize=function(){this.noTransitionsRedraw()},vl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},vl.prototype.redraw=function(){var t=this._surfaceSize(),t=new A.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),dl(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},vl.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},vl.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},vl.prototype.setIntlService=function(t){this.contextService.intl=t},vl.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=x({},e,this.options),this.options),o=t.pointer;if(ht(o)){for(var i=[],r=0;r<o.length;r++)i.push(x({},e.pointer,o[r]));t.pointer=i}},vl.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new A.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=dl(e,o.width)),gl.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},vl.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Wt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=yl.create(o,{type:t.renderAs}))},vl.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},vl.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},vl.prototype.getSize=function(){return this._getSize()},vl.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,t=t.offsetHeight;return{width:o=o||e.width,height:t=t||e.height}},vl.prototype._defaultSize=function(){return{width:200,height:200}},vl.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(p=vl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const H1=p;var ml=A.drawing.Path,xl=A.drawing.Group,_l=A.geometry.Point,bl,o,wl,t,Cl,h,s,Sl,l;function kl(t,e,o,i){var r,n,s,a,p,h,l=e.length;if(i.visible)for(var c=o.mirror,u=o.lineBox,d=i.skip;d<l;d+=i.step)d%i.skipUnit!=0&&(o.tickX=c?u.x2:u.x2-i.size,o.tickY=c?u.y1-i.size:u.y1,o.position=e[d],t.append((n=i,h=p=a=s=void 0,a=(r=o).position,p=o.tickX,h=o.tickY,r=o.vertical?(s=new _l(p,a),new _l(p+n.size,a)):(s=new _l(a,h),new _l(a,h+n.size)),new ml({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}function Al(t,e){t=t||{};!T(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),bl.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}(bl=Om)&&(Al.__proto__=bl),((Al.prototype=Object.create(bl&&bl.prototype)).constructor=Al).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Oe(t.min,t.max),t},Al.prototype.initFields=function(){},Al.prototype.render=function(){var t=this.elements=new xl,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},Al.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new xl,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=ul(n[h],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(ml.fromRect(new A.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},Al.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new xl,i=0;i<t.length;i++)o.append(cl(t[i],e.labels));return o},Al.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new xl;return 0<t.width&&t.visible&&((t=new ml({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},Al.prototype.renderTicks=function(){var t=new xl,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return kl(t,this.getMajorTickPositions(),i,e.majorTicks),kl(t,this.getMinorTickPositions(),i,x({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},e(o=Al,{min:0,max:50,majorTicks:{size:15,align:nl,color:G,width:.5,visible:!0},minorTicks:{size:10,align:nl,color:G,width:.5,visible:!0},line:{width:.5},labels:{position:nl,padding:2},mirror:!1,_alignLines:!1});const F1=o;function Pl(t,e){wl.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=x({},this.options,e);e.fill=e.color,this.scale=t,T(e.value)?e.value=_(e.value,i,o):e.value=i}function Tl(t,e){Cl.call(this,t,e),this.options=x({track:{visible:T(e.track)}},this.options)}(wl=A.Class)&&(Pl.__proto__=wl),((Pl.prototype=Object.create(wl&&wl.prototype)).constructor=Pl).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=T(e._oldValue)?e.value:i,e.value=_(t,i,o),this.elements&&this.repaint()},e(t=Pl,{color:G}),(Cl=h=t)&&(Tl.__proto__=Cl),((Tl.prototype=Object.create(Cl&&Cl.prototype)).constructor=Tl).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=i.track.size||i.size,p=i.size/2,h=P(i.margin),h=n?h[s?"left":"right"]:h[s?"bottom":"top"],h=s?-h:h;n?(o=new E(r.x1+h,r.y1,r.x1+h,r.y2),s?o.x1-=a:o.x2+=a,i.shape!==il&&(t=e=new E(r.x2+h,r.y1-p,r.x2+h,r.y2+p))):(o=new E(r.x1,r.y1-h,r.x2,r.y1-h),s?o.y2+=a:o.y1-=a,i.shape!==il&&(t=e=new E(r.x1-p,r.y1-h,r.x2+p,r.y1-h))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},Tl.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:T(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Tl.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=P(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},e(s=Tl,{shape:il,track:{border:{width:1}},color:G,border:{width:1},opacity:1,margin:P(3),animation:{type:il},visible:!0});const U1=s;function Ml(){Sl.apply(this,arguments)}(Sl=A.drawing.Animation)&&(Ml.__proto__=Sl),((Ml.prototype=Object.create(Sl&&Sl.prototype)).constructor=Ml).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e),this.fromScale=new A.geometry.Point(o.x1,o.y1)),n=this.toScale=new A.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Ml.prototype.step=function(t){var e=It(this.fromScale.x,this.toScale.x,t),t=It(this.fromScale.y,this.toScale.y,t);this.element.transform(A.geometry.transform().translate(e,t))},e(l=Ml,{easing:Sh,duration:250}),A.drawing.AnimationFactory.current.register(ol,l);const N1=l;var Ol,Bl=A.geometry.Point,Rl=A.drawing.Path,Il,Z;function El(t,e){Ol.call(this,t,e),T(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(Ol=U1)&&(El.__proto__=Ol),((El.prototype=Object.create(Ol&&Ol.prototype)).constructor=El).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new Bl(0,0-o),new Bl(0-i*e,0),new Bl(0,0+o)]:[new Bl(0-o,0),new Bl(0,0+i*e),new Bl(0+o,0)]},El.prototype.repaint=function(){var t=this.scale,e=this.options,t=new N1(this.elements,x(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},El.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type=ol,new Rl({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(A.geometry.transform().translate(i.x1,i.y1)),this.elements=o};const G1=El;function Ll(){Il.apply(this,arguments)}(Il=A.drawing.Animation)&&(Ll.__proto__=Il),((Ll.prototype=Object.create(Il&&Il.prototype)).constructor=Ll).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,o=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-e)/t.speed*1e3,1)),this._set(e)},Ll.prototype.step=function(t){t=It(this.from,this.to,t);this._set(t)},Ll.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},e(Z=Ll,{easing:Sh,speed:250}),A.drawing.AnimationFactory.current.register(il,Z);const W1=Z;var zl,Vl=A.drawing.Group,jl=A.drawing.Path;function Dl(t,e){zl.call(this,t,e),T(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(zl=U1)&&(Dl.__proto__=zl),((Dl.prototype=Object.create(zl&&zl.prototype)).constructor=Dl).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,i=i.vertical,r=r===i?-1:1,o=o.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=i?v:y,s=i?y:v,r=this._margin()*r,a=new A.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new A.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],i?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return i?(t.translate(o,0),e.translate(o,0)):(t.translate(0,o),e.translate(0,o)),[a,n,t,e]},Dl.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue),i=(i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),new W1(i,x(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]})));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},Dl.prototype.render=function(){var t=new Vl,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new jl({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},Dl.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new jl.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const X1=Dl;var Hl,Fl=A.drawing.Group,p;function Ul(){Hl.apply(this,arguments)}(Hl=H1)&&(Ul.__proto__=Hl),((Ul.prototype=Object.create(Hl&&Hl.prototype)).constructor=Ul).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new E(o,i,o+t.width(),i+t.height());this.scale.reflow(o),this._shrinkScaleWidth(o);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(o),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Ul.prototype._buildVisual=function(){var t=new Fl,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},Ul.prototype._createModel=function(){var t=this.options,e=this.scale=new F1(t.scale,this.contextService);this.pointers=[];for(var o=ht(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=x({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?G1:X1;this.pointers.push(new n(e,r))}},Ul.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Ul.prototype._getBox=function(t){for(var e,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return n=o.options.vertical?(e=n.width()/2,new E(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new E(t.x1,r.y-e,t.x2,r.y+e))},Ul.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new E(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new E(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Ul.prototype._shrinkScaleWidth=function(t){var e,o=this.scale;o.options.vertical||0<(e=o.contentBox().width()-t.width())&&(o.box.shrink(e,0),o.box.alignTo(t,"center"),o.reflow(o.box))},Ul.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e(p=Ul,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const q1=p;var Nl=A.drawing.Arc,Gl=A.drawing.Path,Wl=A.drawing.Group,Xl,o,ql,t;function Yl(t,e,o,i){var r=new Wl,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new A.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Gl({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(h))}return r}function Zl(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}function Ql(t,e){Xl.call(this,0,1,t,e)}(Xl=Om)&&(Ql.__proto__=Xl),((Ql.prototype=Object.create(Xl&&Xl.prototype)).constructor=Ql).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||Oe(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Ql.prototype.initFields=function(){},Ql.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Ql.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!T(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Ql.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-o)/(i-o)*s:(t-o)/(i-o)*s+n)+180},Ql.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Ql.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,o=0;return e.visible&&(o=e.size),o=t.visible?Math.max(t.size,o):o},Ql.prototype.labelsCount=function(){var t=Xl.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Ql.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Wl,s=.05*o,a=(T(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),p=a.position===nl,h=T(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!h&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,r=P(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=i[f],x=(m-180)*rl,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(p?1:-1),m=m.y+Math.sin(x)*(v+d)*(p?1:-1),x=(g.reflow(new E(_-y,m-v,_+y,m+v)),new A.geometry.Point(g.box.x1,g.box.y1)),_=void 0;h?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||A.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=cl(g,t.labels),n.append(_)),this.bbox=A.geometry.Rect.union(this.bbox,_.bbox())}return n},Ql.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,e=e.rangeSize,i=this.getRangeRadius();this.options.labels.position===nl&&(i+=e+o);for(var r=i+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=A.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Ql.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Wl;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&o.append(this.createRange(h,l,s,p))}}return o},Ql.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new A.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Nl(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Ql.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(Zl(r,n,s));for(var a=0;a<o;a++)for(var p=ul(e[a],r,n),h=i.length,l=0;l<h;l++){var c=i[l];if(c.from<=p.from&&p.from<=c.to){i.push(Zl(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(Zl(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},Ql.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===sl?t.getRadiusX()-r-i-o:t.getRadiusX()-o},Ql.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new A.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Ql.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Yl(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Wl),n=(r.append(this.majorTicks),o.majorTicks.size),s=o.minorTicks.size;return this._tickDifference=n-s,o.labels.position===sl&&(t=i.getRadiusX(),i.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,o.minorUnit)),this.minorTicks=Yl(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Ql.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;0<=i;i--)i%o==0&&t.splice(i,1);return t},Ql.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),360<=n&&o.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(M(a,X)),a+=p;return M(a)<=t.endAngle&&h.push(a),h},Ql.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)},Ql.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&this.options.labels.position===sl&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,h=a.x-p[0].anchor().x,a=a.y-p[0].anchor().y;t[s].transform((new A.geometry.transform).translate(h,a))}},e(o=Ql,{min:0,max:100,majorTicks:{size:15,align:nl,color:G,width:.5,visible:!0},minorTicks:{size:10,align:nl,color:G,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:nl,padding:2}});const Y1=o;function Kl(t,e){ql.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}(ql=A.drawing.Animation)&&(Kl.__proto__=ql),((Kl.prototype=Object.create(ql&&ql.prototype)).constructor=Kl).prototype.step=function(t){var e=this.options,t=It(e.oldAngle,e.newAngle,t);this.element.transform(A.geometry.transform().rotate(t,e.center))},e(t=Kl,{easing:Sh,duration:150}),A.drawing.AnimationFactory.current.register(Ch,t);const Z1=t;var $l,Jl=A.drawing.Circle,tc=A.drawing.Group,ec=A.drawing.Path,s;function oc(){$l.apply(this,arguments)}($l=h)&&(oc.__proto__=$l),((oc.prototype=Object.create($l&&$l.prototype)).constructor=oc).prototype.setAngle=function(t){this.elements.transform(A.geometry.transform().rotate(t,this.center))},oc.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new Z1(this.elements,x(e.animation,{oldAngle:o,newAngle:t})).play()},oc.prototype.render=function(){var t=this.scale,e=this.options,o=new tc;return!1!==e.animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(rl),o},oc.prototype.reflow=function(t){var e=this.center=t.center,o=_(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(t*this.options.cap.size);this.bbox=A.geometry.Rect.fromPoints(new A.geometry.Point(e.x-o,e.y-o),new A.geometry.Point(e.x+o,e.y+o))},oc.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new ec({fill:{color:o},stroke:{color:o,width:.5}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},oc.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new A.geometry.Circle(this.center,this.capSize);return new Jl(e,{fill:{color:t},stroke:{color:t}})},e(s=oc,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:Ch,duration:150}});const Q1=s;var ic,rc=A.drawing.Group,l,nc,Z,sc,p,ac,pc,hc,o,lc,t;function cc(){ic.apply(this,arguments)}(ic=H1)&&(cc.__proto__=ic),((cc.prototype=Object.create(ic&&ic.prototype)).constructor=cc).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=A.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},cc.prototype._buildVisual=function(t,e,o){var i=this._visuals=new rc;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},cc.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},cc.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=M(a,X),h=M(-a,X),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=0<e&&0<i?2*p:e<0&&i<0?2*h:M((p+h)/2||1,X),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(h=r,i=o):(p=r,e=o)},cc.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=A.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},cc.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},cc.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,e=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=A.geometry.Rect.union(r.bbox,n[s].bbox)},cc.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Y1(t.scale,this.contextService);this.pointers=[];for(var i=ht(e)?e:[e],r=0;r<i.length;r++){var n=new Q1(o,x({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e(l=cc,{transitions:!0,gaugeArea:{background:""}});const K1=l;function uc(){nc.apply(this,arguments)}(nc=Y1)&&(uc.__proto__=nc),((uc.prototype=Object.create(nc&&nc.prototype)).constructor=uc).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},uc.prototype.hasRanges=function(){return!0},uc.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},uc.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),i=this.slotAngle(i?t:e),t=this.createRange(r,i,this.getRangeRadius(),o);return this.ranges.append(t),t},e(Z=uc,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const $1=Z;function dc(t,e){sc.call(this,t,e);var e=this.options,o=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=_(o,150,800),t.elements.options.get("stroke.color")),o=t.currentColor();e!==o&&(this.startColor=new A.Color(e),this.color=new A.Color(o))}(sc=A.drawing.Animation)&&(dc.__proto__=sc),((dc.prototype=Object.create(sc&&sc.prototype)).constructor=dc).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=It(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=M(It(i.r,r.r,t)),e=M(It(i.g,r.g,t)),i=M(It(i.b,r.b,t)),this.element.stroke(new A.Color(o,e,i).toHex()))},e(p=dc,{easing:Sh,duration:150}),A.drawing.AnimationFactory.current.register(wh,p);const J1=p;function fc(){ac.apply(this,arguments)}(ac=h)&&(fc.__proto__=ac),((fc.prototype=Object.create(ac&&ac.prototype)).constructor=fc).prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new J1(this,x(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},fc.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},fc.prototype.stroke=function(t){this.elements.stroke(t)},fc.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap}))},fc.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,t=this.options,i=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(i)for(var s=0;s<i.length;s++){var a=i[s],p=a.color,h=a.from,a=(void 0===h&&(h=e),a.to);if(void 0===a&&(a=o),h<=n&&n<=a)return p}return r},fc.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e(o=fc,{animation:{type:wh,duration:150}});const t_=o;function gc(){pc.apply(this,arguments)}(pc=K1)&&(gc.__proto__=pc),((gc.prototype=Object.create(pc&&pc.prototype)).constructor=gc).prototype._initTheme=function(t){pc.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},gc.prototype._createModel=function(){var t=this.options,e=this.scale=new $1(t.scale,this.contextService),e=new t_(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},gc.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},gc.prototype._setValueOptions=function(t){this.options.value=t},gc.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},gc.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,i=i.y-e/2;return t<o.width&&(t=r+t,r=Math.max(r,0),t>o.width)&&(r-=t-o.width),e<o.height&&(o=(t=this.scale.bbox).bottomRight().y,e=i+e,i=Math.max(i,t.origin.y),o<e)&&(i-=e-o),{left:r,top:i}};const e_=gc;function yc(){hc.apply(this,arguments)}(hc=e_)&&(yc.__proto__=hc),((yc.prototype=Object.create(hc&&hc.prototype)).constructor=yc).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,hc.prototype._createModel.call(this)};const o_=yc;function vc(t){lc.call(this),this.setOptions(t),this.initProperties()}(lc=A.Class)&&(vc.__proto__=lc),((vc.prototype=Object.create(lc&&lc.prototype)).constructor=vc).prototype.initProperties=function(){},vc.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},vc.prototype.encode=function(t,e,o){t=T(t)?String(t):t;return this.initValue(t,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},vc.prototype.initValue=function(){},vc.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},vc.prototype.addData=function(){},vc.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e(t=vc,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var mc,xc=Object.assign,Ch;function _c(){mc.apply(this,arguments)}(mc=t)&&(_c.__proto__=mc),((_c.prototype=Object.create(mc&&mc.prototype)).constructor=_c).prototype.initProperties=function(){mc.prototype.initProperties.call(this),xc(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},_c.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},_c.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},_c.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},_c.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength&&(o=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=o,this.addPattern(this.characterMap[o]))},_c.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},_c.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},_c.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},_c.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},_c.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},e(Ch=_c,{addCheckSum:!0});var bc,wc,Cc=Object.assign,s,l;function Sc(){bc.apply(this,arguments)}function kc(){wc.apply(this,arguments)}(wc=t)&&(kc.__proto__=wc),((kc.prototype=Object.create(wc&&wc.prototype)).constructor=kc).prototype.initProperties=function(){wc.prototype.initProperties.call(this),Cc(this,{minBaseUnitLength:.7})},kc.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},kc.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},kc.prototype.addBase=function(){},(bc=s=kc)&&(Sc.__proto__=bc),((Sc.prototype=Object.create(bc&&bc.prototype)).constructor=Sc).prototype.initProperties=function(){bc.prototype.initProperties.call(this),Cc(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},Sc.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Sc.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw i=Math.ceil(this.getBaseWidth(o)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+i+"px.");this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},Sc.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Sc.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Sc.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Sc.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Sc.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Sc.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Sc.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e(l=Sc,{addCheckSum:!1});var Ac,Pc,Tc,Mc,Oc,Bc,Rc,Ic,Ec,Lc,zc,Vc={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var o=[],i=0;i<this.specialAsciiCodes[t].length;i++)o.push(this.characterMap[this.shiftCharacters[3]]),o.push(this.characterMap[this.specialAsciiCodes[t][i]]);else e=6*Math.floor(t/32)+(t-27)%32+64,o=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return o}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},Z=((Bc=l)&&(Qc.__proto__=Bc),((Qc.prototype=Object.create(Bc&&Bc.prototype)).constructor=Qc).prototype.initProperties=function(){Bc.prototype.initProperties.call(this),x(this,Vc,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},Qc),jc=Object.assign;(Oc=s)&&(Zc.__proto__=Oc),((Zc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Zc).prototype.initProperties=function(){Oc.prototype.initProperties.call(this),jc(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},Zc.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},Zc.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},Zc.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},Zc.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},Zc.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},Zc.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},Zc.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},Zc.prototype._getCheckValues=function(){for(var t,e=this.values,o=e.length,i=0,r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},Zc.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},Zc.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},Zc.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)};var Sh,p=((Mc=Sh=Zc)&&(Yc.__proto__=Mc),((Yc.prototype=Object.create(Mc&&Mc.prototype)).constructor=Yc).prototype.initProperties=function(){Mc.prototype.initProperties.call(this),x(this,Vc,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,o=0;o<t.length;o++)e=t[o],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},Yc),Dc=/^\d+$/,Hc=Object.assign,h=((Tc=t)&&(qc.__proto__=Tc),((qc.prototype=Object.create(Tc&&Tc.prototype)).constructor=qc).prototype.initProperties=function(){Tc.prototype.initProperties.call(this),Hc(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},qc.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},qc.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},qc.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},qc.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},qc.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},qc.prototype.validate=function(t){if(Dc.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},qc.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},qc),Fc=/^\d+$/,Uc=/^[a-z0-9]+$/i,Nc=Object.assign;(Pc=A.Class)&&(Xc.__proto__=Pc),((Xc.prototype=Object.create(Pc&&Pc.prototype)).constructor=Xc).prototype.initProperties=function(){},Xc.prototype.addStart=function(){},Xc.prototype.is=function(){},Xc.prototype.isCode=function(){return!1},Xc.prototype.move=function(){},Xc.prototype.pushState=function(){};var wh,o=((Ac=wh=Xc)&&(Wc.__proto__=Ac),((Wc.prototype=Object.create(Ac&&Ac.prototype)).constructor=Wc).prototype.initProperties=function(){Ac.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},Wc.prototype.addStart=function(){this.encoding.addPattern(this.START)},Wc.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Wc.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Wc.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(u("C",o)&&(o=i.substr(t.index).match(/\d{4,}/g))&&(r=i.indexOf(o[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Wc.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Wc.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Wc.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0},Wc.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Wc),Gc={};function Wc(t,e){Ac.call(this,t),this.states=e,this._initMoves(e)}function Xc(t){Pc.call(this),this.encoding=t,this.initProperties()}function qc(){Tc.apply(this,arguments)}function Yc(){Mc.apply(this,arguments)}function Zc(){Oc.apply(this,arguments)}function Qc(){Bc.apply(this,arguments)}function Kc(t,e){Rc.call(this,t),this.states=e}function $c(t,e){Ic.call(this,t),this._initSubStates(e)}function Jc(){Ec.apply(this,arguments)}function tu(){Lc.apply(this,arguments)}function eu(){zc.apply(this,arguments)}Gc.A=((zc=o)&&(eu.__proto__=zc),((eu.prototype=Object.create(zc&&zc.prototype)).constructor=eu).prototype.initProperties=function(){zc.prototype.initProperties.call(this),Nc(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},eu.prototype.isCode=function(t){return 0<=t&&t<96},eu.prototype.getValue=function(t){return t<32?t+64:t-32},eu),Gc.B=((Lc=o)&&(tu.__proto__=Lc),((tu.prototype=Object.create(Lc&&Lc.prototype)).constructor=tu).prototype.initProperties=function(){Lc.prototype.initProperties.call(this),Nc(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},tu.prototype.isCode=function(t){return 32<=t&&t<128},tu.prototype.getValue=function(t){return t-32},tu),Gc.C=((Ec=wh)&&(Jc.__proto__=Ec),((Jc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Jc).prototype.initProperties=function(){Ec.prototype.initProperties.call(this),Nc(this,{key:"C",MOVE:99,START:105})},Jc.prototype.addStart=function(){this.encoding.addPattern(this.START)},Jc.prototype.is=function(t,e){var o=yu(t,e,4);return(e+4<=t.length||2===t.length)&&Fc.test(o)},Jc.prototype.move=function(){this.encoding.addPattern(this.MOVE)},Jc.prototype.pushState=function(t){for(var e;(e=yu(t.value,t.index,2))&&Fc.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},Jc.prototype.getValue=function(t){return t},Jc),Gc.FNC4=((Ic=wh)&&($c.__proto__=Ic),(($c.prototype=Object.create(Ic&&Ic.prototype)).constructor=$c).prototype.initProperties=function(){Ic.prototype.initProperties.call(this),Nc(this,{key:"FNC4",dependentStates:["A","B"]})},$c.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},$c.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},$c.prototype.isCode=function(t){return 128<=t&&t<256},$c.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},$c.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},$c.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},$c.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},$c.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},$c.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},$c),Gc.FNC1=((Rc=wh)&&(Kc.__proto__=Rc),((Kc.prototype=Object.create(Rc&&Rc.prototype)).constructor=Kc).prototype.initProperties=function(){Rc.prototype.initProperties.call(this),Nc(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},Kc.prototype.addStart=function(){this.encoding[this.startState].addStart()},Kc.prototype.is=function(){return u(this.key,this.states)},Kc.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if((e=(p.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},Kc.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!Fc.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Uc.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},Kc.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=yu(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},Kc.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},Kc.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,e),t=t.substring(e+1,o),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},Kc.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&u(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},Kc),(au=t)&&(gu.__proto__=au),((gu.prototype=Object.create(au&&au.prototype)).constructor=gu).prototype.initProperties=function(){au.prototype.initProperties.call(this),Nc(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},gu.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Gc[this.states[t]](this,this.states)},gu.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},gu.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},gu.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var o;t.shifted?(o=t.state,t.state=t.previousState,t.previousState=o,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},gu.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},gu.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},gu.prototype.addStop=function(){this.addPattern(this.STOP)},gu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},gu.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},gu.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))};var ou,iu,ru,nu,su,au,s,o=((su=s=gu)&&(fu.__proto__=su),((fu.prototype=Object.create(su&&su.prototype)).constructor=fu).prototype.initProperties=function(){su.prototype.initProperties.call(this),Nc(this,{name:"Code 128 A",states:["A"]})},fu),wh=((nu=s)&&(du.__proto__=nu),((du.prototype=Object.create(nu&&nu.prototype)).constructor=du).prototype.initProperties=function(){nu.prototype.initProperties.call(this),Nc(this,{name:"Code 128 B",states:["B"]})},du),pu=((ru=s)&&(uu.__proto__=ru),((uu.prototype=Object.create(ru&&ru.prototype)).constructor=uu).prototype.initProperties=function(){ru.prototype.initProperties.call(this),Nc(this,{name:"Code 128 C",states:["C"]})},uu),hu=((iu=s)&&(cu.__proto__=iu),((cu.prototype=Object.create(iu&&iu.prototype)).constructor=cu).prototype.initProperties=function(){iu.prototype.initProperties.call(this),Nc(this,{name:"Code 128",states:["C","B","A","FNC4"]})},cu),s=((ou=s)&&(lu.__proto__=ou),((lu.prototype=Object.create(ou&&ou.prototype)).constructor=lu).prototype.initProperties=function(){ou.prototype.initProperties.call(this),Nc(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},lu);function lu(){ou.apply(this,arguments)}function cu(){iu.apply(this,arguments)}function uu(){ru.apply(this,arguments)}function du(){nu.apply(this,arguments)}function fu(){su.apply(this,arguments)}function gu(t){au.call(this,t),this._initStates()}function yu(t,e,o){return t.substring(e,e+o)}var vu,mu,xu,_u,bu,wu,Cu,Su=Object.assign;(Cu=t)&&(Fu.__proto__=Cu),((Fu.prototype=Object.create(Cu&&Cu.prototype)).constructor=Fu).prototype.initProperties=function(){Cu.prototype.initProperties.call(this),Su(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Mu})},Fu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Fu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Fu.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Fu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Fu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Fu.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])};var ku,Au=((wu=ku=Fu)&&(Hu.__proto__=wu),((Hu.prototype=Object.create(wu&&wu.prototype)).constructor=Hu).prototype.initProperties=function(){wu.prototype.initProperties.call(this),Su(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Hu),Pu=((bu=ku)&&(Du.__proto__=bu),((Du.prototype=Object.create(bu&&bu.prototype)).constructor=Du).prototype.initProperties=function(){bu.prototype.initProperties.call(this),Su(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Du),Tu=((_u=ku)&&(ju.__proto__=_u),((ju.prototype=Object.create(_u&&_u.prototype)).constructor=ju).prototype.initProperties=function(){_u.prototype.initProperties.call(this),Su(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},ju),ku=((xu=ku)&&(Vu.__proto__=xu),((Vu.prototype=Object.create(xu&&xu.prototype)).constructor=Vu).prototype.initProperties=function(){xu.prototype.initProperties.call(this),Su(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Vu),Mu={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Ou=Object.assign,t=((mu=t)&&(zu.__proto__=mu),((zu.prototype=Object.create(mu&&mu.prototype)).constructor=zu).prototype.initProperties=function(){mu.prototype.initProperties.call(this),Ou(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},zu.prototype.initValue=function(t,e,o){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},zu.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},zu.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},zu.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},zu.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},zu),Bu=Object.assign,Ru=((vu=t)&&(Lu.__proto__=vu),((Lu.prototype=Object.create(vu&&vu.prototype)).constructor=Lu).prototype.initProperties=function(){vu.prototype.initProperties.call(this),Bu(this,{name:"EAN 8"})},Lu.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},Lu),Iu={code11:Ch,code39:l,code39extended:Z,code93:Sh,code93extended:p,code128:hu,code128a:o,code128b:wh,code128c:pu},Eu,Ch;function Lu(){vu.apply(this,arguments)}function zu(){mu.apply(this,arguments)}function Vu(){xu.apply(this,arguments)}function ju(){_u.apply(this,arguments)}function Du(){bu.apply(this,arguments)}function Hu(){wu.apply(this,arguments)}function Fu(){Cu.apply(this,arguments)}function Uu(t,e){var o=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=o,e}function Nu(t,e,o){void 0===o&&(o=Me),Eu.call(this),this.options=x({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&T(e.value)&&this.redraw()}Iu["gs1-128"]=s,Iu.msimod10=Au,Iu.msimod11=Pu,Iu.msimod1010=Tu,Iu.msimod1110=ku,Iu.postnet=h,Iu.ean8=Ru,Iu.ean13=t,(Eu=A.Class)&&(Nu.__proto__=Eu),((Nu.prototype=Object.create(Eu&&Eu.prototype)).constructor=Nu).prototype.destroy=function(){this._destroySurface()},Nu.prototype._initElement=function(){lt(this.element,"k-barcode")},Nu.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Nu.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Nu.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Nu.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Nu.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Nu.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},Nu.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},Nu.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Nu.prototype._resize=function(){this.redraw()},Nu.prototype.createVisual=function(){this.visual=this._render()},Nu.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=P(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new E(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),p=s.height(),h=new A.drawing.Group;this.contentBox=s,h.append(this._getBackground(n)),i.visible&&(p-=A.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,s.width(),p)}catch(t){return this.onError(t),h}return i.visible&&(n=o,e.checksum&&T(a.checksum)&&(n+=" "+a.checksum),h.append(this._getText(n))),this.barHeight=p,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),h.append(this._bandsGroup),h},Nu.prototype.exportVisual=function(){return this._render()},Nu.prototype._getSize=function(){var t=Uu(this.element,this.options.renderAs),e=new A.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},Nu.prototype.value=function(t){if(!T(t))return this.options.value;this.options.value=String(t),this.redraw()},Nu.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new A.drawing.Group,n=0;n<t.length;n++){var s,a=(s=_t(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=A.geometry.Rect.fromPoints(new A.geometry.Point(i,s.y1+o.y1),new A.geometry.Point(i+a,s.y2+o.y1)),s=A.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},Nu.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new E(0,0,t.width,t.height).unpad(o.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},Nu.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new xm(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},Nu.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Iu[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Iu[this.type],this.options=x({},this.options,t)},e(Ch=Nu,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});const i_=Ch;var Gu={width:500,height:100};const r_=function(t,e){if(void 0===e&&(e=Gu),!t)throw new Error("Please specify barcode type to validate.");var o,i,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),Iu[n])return o=new Iu[n],i=e,r=s,function(t){try{o.encode(r+t,i.width,i.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var Wu=Object.assign;function Xu(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function qu(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Yu(t){return parseInt(t,2)}(ed=A.Class)&&(ud.__proto__=ed),((ud.prototype=Object.create(ed&&ed.prototype)).constructor=ud).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},ud.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},ud.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Zu,Qu,Ku,$u,Ju,td,ed,od=ud,id=((td=A.Class)&&(cd.__proto__=td),(cd.prototype=Object.create(td&&td.prototype)).constructor=cd),rd=((Ju=A.Class)&&(ld.__proto__=Ju),((ld.prototype=Object.create(Ju&&Ju.prototype)).constructor=ld).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(Nd(i,Rd,Id,Ed,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=Nd(i,Ld,zd,Vd,t);r.mode!==t?(t=r.mode,e.push(r),o++):e[o].modeString+=r.modeString,i=i.substr(r.modeString.length)}return e}(),t=Gd(function(t){for(var e=0,o=0;o<t.length;o++)e+=nd[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var o="",i=0;i<t.length;i++)o+=nd[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new id(e,t)},ld);($u=A.Class)&&(hd.__proto__=$u),((hd.prototype=Object.create($u&&$u.prototype)).constructor=hd).prototype.initProperties=function(){Wu(this,{modeIndicator:"",bitsInCharacterCount:[]})},hd.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},hd.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},hd.prototype.getModeCountString=function(t,e){return this.modeIndicator+qu(t,this.getBitsCharacterCount(e))},hd.prototype.encode=function(){},hd.prototype.getStringBitsLength=function(){},hd.prototype.getValue=function(){};var l,Z=((Ku=l=hd)&&(pd.__proto__=Ku),((pd.prototype=Object.create(Ku&&Ku.prototype)).constructor=pd).prototype.initProperties=function(){Ku.prototype.initProperties.call(this),Wu(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},pd.prototype.getValue=function(t){return parseInt(t,10)},pd.prototype.encode=function(t,e){for(var o=Xu(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=qu(o[r],10);return i+qu(o[r],1+3*o[r].length)},pd.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0==o?0:1)},pd),Sh=((Qu=l)&&(ad.__proto__=Qu),((ad.prototype=Object.create(Qu&&Qu.prototype)).constructor=ad).prototype.initProperties=function(){Qu.prototype.initProperties.call(this),Wu(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},ad.prototype.getValue=function(t){return this.characters[t]},ad.prototype.encode=function(t,e){for(var o=Xu(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=qu(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+qu(2===o[r].length?45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)):this.getValue(o[r].charAt(0)),1+5*o[r].length)},ad.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},ad),p=((Zu=l)&&(sd.__proto__=Zu),((sd.prototype=Object.create(Zu&&Zu.prototype)).constructor=sd).prototype.initProperties=function(){Zu.prototype.initProperties.call(this),Wu(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},sd.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},sd.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=qu(this.getValue(t.charAt(i)),8);return o},sd.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},sd),nd={};function sd(){Zu.apply(this,arguments)}function ad(){Qu.apply(this,arguments)}function pd(){Ku.apply(this,arguments)}function hd(){$u.call(this),this.initProperties()}function ld(){Ju.apply(this,arguments)}function cd(t,e){td.call(this),this.dataString=t,this.version=e}function ud(t){ed.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}nd.numeric=new Z,nd.alphanumeric=new Sh,nd.byte=new p,(dd=A.Class)&&(Dd.__proto__=dd),((Dd.prototype=Object.create(dd&&dd.prototype)).constructor=Dd).prototype.initProperties=function(){Wu(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Dd.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=Gd(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new id(t,e)},Dd.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Dd.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Dd.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=qu(t,8);else{for(var e=8-e,r=0;r<o;r++)i=qu(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Dd.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var dd,fd=Dd,gd=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],yd="numeric",vd="alphanumeric",md="byte",xd={1:0},_d={0:1},bd={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},wd=[1,0,1,1,1],Cd=[1,0,1],Sd={L:"01",M:"00",Q:"11",H:"10"},kd=["11101100","00010001"],Ad=93,Pd=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Td=/^\d+/,hu="A-Z0-9 $%*+./:-",Md=new RegExp("^[A-Z $%*+./:-]+"),Od=new RegExp("^["+hu+"]+"),Bd=new RegExp("^[^"+hu+"]+"),Rd=8,Id=5,Ed=8,Ld=17,zd=9,Vd=16,jd=[[1,0],[1,25,0]];function Dd(){dd.call(this),this.initProperties(),this.mode=nd[this.encodingMode]}function Hd(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Fd(t,e,o,i){for(var r=0;r<Pd.length;r++)t[r][o][i]=Pd[r](o,i)?1^e:parseInt(e,10)}function Ud(t,e){for(var o,i=jd[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],p=0;p<s;p++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=_d[(t[i]+e)%255],void 0!==t[--i];);return o}(n,xd[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(p=r.length-1;0<=p;p--)a[e-1-p]=qu(r[p],8);return a}function Nd(t,e,o,i,r){var n,s=Td.exec(t),s=s?s[0]:"",a=Md.exec(t),a=a?a[0]:"",p=Od.exec(t),p=p?p[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Od.test(t.charAt(s.length)))?(n=yd,s):p&&(t.length===p.length||p.length>=i||r===vd)?(n=vd,s||a):(n=md,p?p+Bd.exec(t.substring(p.length))[0]:Bd.exec(t)[0]);return{mode:n,modeString:e}}function Gd(t,e){for(var o=0,i=gd.length-1,r=Math.floor(gd.length/2);t<gd[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=gd[o][e].totalDataCodewords?r+1:i+1}function Wd(t,e,o){var i=Yu(e),e=e.length-1,r=t<<e;return qu(t,o-e)+qu(function(t,e){for(var o=e.toString(2).length,i=t.toString(2).length,r=t;o<=(i=(r^=e<<i-o).toString(2).length););return r}(r,i),e)}function Xd(t,e){return parseInt(t.charAt(e),10)}function qd(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&Hd(t,Xd(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&Hd(t,Xd(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)Hd(t,Xd(e,r-1-i++),n,s);for(Hd(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)Hd(t,Xd(e,r-1-i++),n,s)}function Yd(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,Hd(t,r=Xd(e,e.length-p-1),0+o,s+i),Hd(t,r,a+i,0+o)}function Zd(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Hd(t,r=e[a],o+p,i+a),Hd(t,r,o+a,i+p),Hd(t,r,o+s-p,i+s-a),Hd(t,r,o+s-a,i+s-p)}function Qd(t,e,o,i){for(var r=o,n=i,s=t[0];Hd(t,0,r,i),Hd(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function Kd(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===Ad&&(o[t]+=40)}function $d(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function Jd(t,e,o){var o=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?fd:rd)).getEncodingResult(t,e),r=o.version,n=gd[r-1][e],t=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var p=s[a][0],h=0;h<p;h++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=Yu(o),i+=8;r.push(c),n.push(Ud(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,o=0,i=0,r=t;r.length<e&&o<4;)r+="0000".charAt(o++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=kd[i],i^=1;return r}(o.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Pd.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}(),i=(l=(s=o)[0].length,Zd(s,wd,0,0),Qd(s,[-1,-1],7,7),Zd(s,wd,l-7,0),Qd(s,[1,-1],l-8,7),Zd(s,wd,0,l-7),Qd(s,[-1,1],7,l-8),o),s=r;if(!(s<2)){var a,p=i[0],h=p.length,l=Math.floor(s/7),c=[6],u=0;for((s=bd[s])?a=(h-13-s)/l:s=a=(h-13)/(l+1),c.push(c[u++]+s);c[u]+a<h;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===p[c[d]][c[f]]&&Zd(i,Cd,c[d]-2,c[f]-2)}for(var g=o,y=1,v=g[0].length,m=8;m<v-8;m++)Hd(g,y,6,m),Hd(g,y,m,6),y^=1;7<=r&&Yd(o,qu(0,18)),qd(o,qu(0,15));for(var x,_,b,w=o,C=t,S=new od(w[0]),k=0;k<C.length;k++)for(x=C[k],_=0;0<x.length;){for(var A=0;A<x.length;A++)for(var P=0;P<8;P++)b=S.getNextCell(),Fd(w,x[A][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)Fd(w,0,b.row,b.column);l=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,p=0;p<t.length;p++)s[p]=[r[p]=o[p]=0,0],n[p]=[0,0],i[p]=[];for(var h=0;h<a;h++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][l],10),i[c][0]===e[h][l]&&h+1<a&&0<=l-1&&e[h+1][l]===i[c][0]&&e[h+1][l-1]===i[c][0]&&(o[c]+=3),Kd(c,n,o,0,e[h][l]),Kd(c,n,o,1,e[l][h]),$d(c,o,i,e[h][l],s,0),$d(c,o,i,e[l][h],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(p=0;p<o.length;p++)o[p]+=(d=r[p],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),o[p]<v&&(v=o[p],u=p);return u}(o),s=o[l];return 7<=r&&Yd([s],Wd(r,"1111100100101",18)),qd([s],function(t){var e="";if(0===Yu(t))return"101010000010010";for(var o=Wd(Yu(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(Sd[e]+qu(l,3))),s}for(var tf,ef=1;ef<255;ef++)255<(tf=2*_d[ef-1])&&(tf^=285),_d[ef]=tf,xd[tf]=ef;tf=2*_d[ef-1]^285,_d[ef]=tf,_d[-1]=0;for(var of=2;of<=68;of++){var rf=jd[of-1];jd[of]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)o[i+r]=void 0===o[i+r]?(t[i]+(0<=e[r]?e[r]:0))%255:xd[_d[o[i+r]]^_d[(t[i]+e[r])%255]];return o}(rf,[of,0])}var nf,sf=Math.round,af=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],pf=[[0,1],[1,1],[1,0]],o;function hf(t,e,o){void 0===o&&(o=Me),nf.call(this),this.options=x({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}(nf=A.Class)&&(hf.__proto__=nf),((hf.prototype=Object.create(nf&&nf.prototype)).constructor=hf).prototype.destroy=function(){this._destroySurface()},hf.prototype._initElement=function(){lt(this.element,"k-qrcode")},hf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},hf.prototype._createSurface=function(){return A.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},hf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},hf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},hf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},hf.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},hf.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,o={width:0,height:0};return 0<e&&(o.width=e),t&&(o.height=t),o},hf.prototype._resize=function(){this.redraw()},hf.prototype.createVisual=function(){this.visual=this._render()},hf.prototype.exportVisual=function(){return this._render()},hf.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0,h=(s.width=p,new A.drawing.Group);try{n&&(o=Jd(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,h.append(this._renderBackground(i,s)),h.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?h.append(this._renderLogo(i,t)):this._isSwiss()&&h.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return h},hf.prototype._renderLogo=function(t,e){var t=sf(t/2),e=this._getLogoSize(7*e),o=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new A.geometry.Rect(new A.geometry.Point(t.x,t.y),new A.geometry.Size(e.width,e.height));return new A.drawing.Image(o,t)},hf.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,t=t/2,n={},s=new A.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),pf,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,pf,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,af,"#fff")),s},hf.prototype._renderShape=function(t,e,o,i){var r=new A.drawing.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},hf.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Uu(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},hf.prototype._calculateBaseUnit=function(t,e){var o,i=Math.floor(t/e);return i<1?(o=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))):t<=i*e&&1<=i-1&&i--,i},hf.prototype._renderMatrix=function(t,e,o){for(var i=new A.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var a=sf(o+a*e),p=sf(n),h=sf(o+s*e),l=sf(n+e);i.moveTo(a,p).lineTo(a,l).lineTo(h,l).lineTo(h,p).close()}}return i},hf.prototype._renderBackground=function(t,e){t=new E(0,0,t,t).unpad(e.width/2);return A.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},hf.prototype.setOptions=function(t){this.options=Wu(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},hf.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},hf.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},hf.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},hf.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},e(o=hf,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});const n_=o,s_=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{Jd(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var lf={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function cf(t){return t*t}var uf,df,ff=Math,gf=ff.abs,yf=ff.atan,vf=ff.atan2,mf=ff.cos,xf=ff.sin,_f=ff.tan,bf=((df=A.Class)&&(Lf.__proto__=df),((Lf.prototype=Object.create(df&&df.prototype)).constructor=Lf).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Lf.prototype.toArray=function(){return[this.lat,this.lng]},Lf.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Lf.prototype.clone=function(){return new Lf(this.lat,this.lng)},Lf.prototype.round=function(t){return this.lng=M(this.lng,t),this.lat=M(this.lat,t),this},Lf.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Lf.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Lf.prototype.destination=function(t,e,o){var e=Kt(e),o=o||lf.WGS84,i=Kt(this.lat),r=Kt(this.lng),t=t/o.a,o=ff.asin(xf(i)*mf(t)+mf(i)*xf(t)*mf(e)),r=r+vf(xf(e)*xf(t)*mf(i),mf(t)-xf(i)*xf(o));return new Lf(Nt(o),Nt(r))},Lf.prototype.greatCircleTo=function(t,e){var o=Lf.create(void 0),e=e||lf.WGS84;if(!o||this.clone().round(8).equals(o.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var i,r,n=e.a,s=e.b,a=e.f,p=Kt(o.lng-this.lng),e=yf((1-a)*_f(Kt(this.lat))),h=xf(e),l=mf(e),e=yf((1-a)*_f(Kt(o.lat))),c=xf(e),u=mf(e),d=p,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=xf(d),v=mf(d),m=ff.sqrt(cf(u*y)+cf(l*c-h*u*v)),x=vf(m,r=h*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(i=1-cf(_))&&(b=r-2*h*c/i),d),C=a/16*i*(4+a*(4-3*i)),d=p+(1-C)*a*_*(x+C*m*(b+C*r*(2*cf(b)-1))),g=gf(d-w)<=this.DISTANCE_CONVERGENCE;var o=i*(cf(n)-cf(s))/cf(s),e=1+o/16384*(4096+o*(o*(320-175*o)-768)),n=o/1024*(256+o*(o*(74-47*o)-128)),o=n*m*(b+n/4*(r*(2*cf(b)-1)-n/6*b*(4*cf(m)-3)*(4*cf(b)-3))),n=vf(u*y,l*c-h*u*v),S=vf(l*y,-h*u+l*c*v);return{distance:M(s*e*(x-o),this.DISTANCE_PRECISION),azimuthFrom:Nt(n),azimuthTo:Nt(S)}},Lf.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Lf.fromLngLat=function(t){return new Lf(t[1],t[0])},Lf.fromLatLng=function(t){return new Lf(t[0],t[1])},Lf.create=function(t,e){if(T(t))return t instanceof Lf?t.clone():1===arguments.length&&2===t.length?Lf.fromLatLng(t):new Lf(t,e)},Lf),wf=Math,Cf=wf.atan,Sf=wf.exp,kf=wf.pow,Af=wf.sin,Pf=wf.log,Tf=wf.tan,Mf=A.geometry.Point,Of=wf.PI,Bf=Of/2,Rf=Of/4,If=Of/180,wh=lf.WGS84,pu;function Ef(t){uf.call(this),this.initProperties(),this._initOptions(t)}function Lf(t,e){df.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}function zf(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Vf(t,e){e.insertBefore(t,e.firstChild)}function jf(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Df(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(uf=A.Class)&&(Ef.__proto__=uf),((Ef.prototype=Object.create(uf&&uf.prototype)).constructor=Ef).prototype._initOptions=function(t){this.options=x({},this.options,t)},Ef.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Ef.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,r=_(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?_(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=Kt(e-o)*i,e=this._projectLat(r);return new Mf(t,e)},Ef.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=Kt(t),i=Tf(Rf+t/2),t=o*Af(t),t=kf((1-t)/(1+t),o/2);return e*Pf(i*t)},Ef.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(If*i)+o,o=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=_(i,-this.MAX_LNG,this.MAX_LNG)),new bf(o,i)},Ef.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Sf(-t/o),s=Bf-2*Cf(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var p=i*Af(s),p=kf((1-p)/(1+p),r),p=Bf-2*Cf(n*p)-s;if(s+=p,wf.abs(p)<=this.INVERSE_CONVERGENCE)break}return Nt(s)},e(pu=Ef,{centralMeridian:0,datum:wh}),(Ff=pu)&&(Yf.__proto__=Ff),((Yf.prototype=Object.create(Ff&&Ff.prototype)).constructor=Yf).prototype.initProperties=function(){Ff.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},Yf.prototype._projectLat=function(t){var e=this.options.datum.a,t=Kt(t),t=Tf(Rf+t/2);return e*Pf(t)},Yf.prototype._inverseY=function(t){var e=this.options.datum.a,t=Sf(-t/e);return Nt(Bf-2*Cf(t))};var Hf,Ff,Uf=Yf,Nf=((Hf=A.Class)&&(qf.__proto__=Hf),((qf.prototype=Object.create(Hf&&Hf.prototype)).constructor=qf).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},qf.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},qf),Gf=Object.defineProperty,Wf=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Xf=function(t){var e,o,i=!1,r=[],n={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},p={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(o in n)if(n.hasOwnProperty(o)&&(r=t.match(n[o]))){if("windows"===o&&"plugins"in navigator)return!1;(i={}).device=o,i.tablet=Zf(o,a,!1),i.browser=Zf(t,p,"default"),i.name=Zf(o,s),i[i.name]=!0,i.majorVersion=r[2],i.minorVersion=(r[3]||"0").replace("_","."),e=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return i};function qf(){Hf.call(this);var t=this._proj=new Uf,t=this.c=2*Of*t.options.datum.a;this._tm=A.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=A.geometry.transform().scale(t,-t).translate(-.5,-.5)}function Yf(){Ff.apply(this,arguments)}function Zf(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}function Qf(t,e){return t.bind(e)}function Kf(t,e,o,i,r){lg(t,e,o,i,r)}function $f(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(ht(t=e)?t:(t||"").split(" ")).forEach(function(t){cg(n,t,s,a)})}function Jf(t){var e=pg(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function tg(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function eg(){return Number(new Date)}function og(){}function ig(t){var e=[];if(t)for(var o=jf(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}function rg(){this._defaultPrevented=!0}function ng(){return!0===this._defaultPrevented}var sg,ag,pg=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=hg();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},hg=function(){var t=Xf(navigator.userAgent),e=function(t){var e,o=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(r.hasOwnProperty(e)&&(i=t.match(r[e]))){(o={})[e]=!0,o[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||i[2],10);break}return o}(navigator.userAgent),o=e.chrome,i=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!o&&!i&&!r&&!e&&window.PointerEvent,n.msPointers=!o&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,p=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,o="string"==typeof s.style[t+"Transition"];if(o||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),p={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},o&&((a=p).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}),s=null,n.transforms=p,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;var t;if(n.mobileOS.android)return!n.browser.chrome||!(n.browser.version<32||((t=document.querySelector("meta[name=viewport]"))?t.getAttribute("content"):"").match(/user-scalable=no/i))}return!1},n},lg=function(s,t,a,p,h){(ht(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=p,(e=a)&&vt(e)&&!i?n=e:e&&"string"==typeof e&&vt(n)&&(r=e),(o=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,Gf(t,"currentTarget",{value:e}),Gf(t,"delegateTarget",{value:o}),n(t))},Boolean(h))})},cg=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},ug="function";(ag=A.Class)&&(gg.__proto__=ag),((gg.prototype=Object.create(ag&&ag.prototype)).constructor=gg).prototype.destroy=function(){this.unbind()},gg.prototype.bind=function(t,e,o){var i,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==ug;if(void 0===e)for(p in t)n.bind(p,t[p]);else for(var p=0,h=s.length;p<h;p++)!function(){var t=s[p];(r=a?e:e[t])&&(o&&(i=r,(r=function(){n.unbind(t,r),i.apply(n,arguments)}).original=i),(n._events[t]=n._events[t]||[]).push(r))}();return n},gg.prototype.one=function(t,e){return this.bind(t,e,!0)},gg.prototype.first=function(t,e){for(var o,i="string"==typeof t?[t]:t,r=typeof e==ug,n=0,s=i.length;n<s;n++){var a=i[n];(o=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(o)}return this},gg.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=rg,n.isDefaultPrevented=ng,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},gg.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;0<=o;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},gg.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events)&&this._events[i]&&delete this._events[i]}this.bind(this.events,t)};var s,dg=((sg=s=gg)&&(fg.__proto__=sg),((fg.prototype=Object.create(sg&&sg.prototype)).constructor=fg).prototype._initOptions=function(t){this.options=x({},this.options,t)},fg.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},fg.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},fg.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},fg.prototype.clear=function(){this.items=[],zf(this.element)},fg.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var o=this.items[e],o=this._itemText(o);""!==o&&t.push(o)}if(0<t.length){zf(this.element);var i=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=i;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},fg.prototype.hideElement=function(){this.element.style.display="none"},fg.prototype.showElement=function(){this.element.style.display=""},fg.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},fg.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},fg.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},fg);function fg(t,e){sg.call(this),this.element=t,this._initOptions(e),this.items=[],lt(this.element,"k-widget k-attribution")}function gg(){ag.call(this),this._events={}}e(dg,{name:"Attribution",separator:" | "});var yg={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function vg(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+yg[t].className+'" aria-label="move '+t+'">'+ae({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Wf(t)}(mg=s)&&(_g.__proto__=mg),((_g.prototype=Object.create(mg&&mg.prototype)).constructor=_g).prototype.destroy=function(){this.dispose()},_g.prototype.dispose=function(){$f(this._keyroot,"keydown",this._keydownHandler)},_g.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},_g.prototype._initOptions=function(t){this.options=x({},this.options,t)},_g.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},_g.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},_g.prototype._keydown=function(t){switch(t.which){case hm.UP:this._pan(0,1),t.preventDefault();break;case hm.DOWN:this._pan(0,-1),t.preventDefault();break;case hm.RIGHT:this._pan(1,0),t.preventDefault();break;case hm.LEFT:this._pan(-1,0),t.preventDefault()}};var mg,xg=_g;function _g(t,e){mg.call(this),this.element=t,this._initOptions(e);var t=vg("up",e.icons),o=vg("right",e.icons),i=vg("down",e.icons),e=vg("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(o),this.element.appendChild(i),this.element.appendChild(e),lt(this.element,"k-widget k-navigator"),Kf(this.element,"click",".k-button",Qf(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=Qf(this._keydown,this),Kf(this._keyroot,"keydown",this._keydownHandler)}function bg(t,e,o){t='<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+ae({icon:e,iconClass:"k-button-icon",svgIcons:o.svgIcons,type:o.type})+"</button>";return Wf(t)}e(xg,{name:"Navigator",panStep:1}),tg(xg,["pan"]),(wg=s)&&(Sg.__proto__=wg),((Sg.prototype=Object.create(wg&&wg.prototype)).constructor=Sg).prototype.destroy=function(){this.element&&$f(this.element,"click",this._clickHandler),this._keyroot&&$f(this._keyroot,"keydown",this._keydownHandler)},Sg.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},Sg.prototype._initOptions=function(t){this.options=x({},this.options,t)},Sg.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Sg.prototype._click=function(t){var e=1;Bt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Sg.prototype._keydown=function(t){switch(t.which){case hm.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case hm.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var wg,Cg=Sg;function Sg(t,e,o){wg.call(this),this.element=t,this._initOptions(e);t=bg("in","plus",o),e=bg("out","minus",o),this.element.appendChild(t),this.element.appendChild(e),lt(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Kf(this.element,"click",".k-button",this._clickHandler),o=this.element.parentNode.closest("[data-role]");this._keyroot=o||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Kf(this._keyroot,"keydown",this._keydownHandler)}e(Cg,{name:"ZoomControl",zoomStep:1}),tg(Cg,["change"]);var kg,Ag,Au,Pg=(Au=Math).max,Tg=Au.min,Mg=((Ag=A.Class)&&(Ig.__proto__=Ag),Pu={World:{configurable:!0}},((Ig.prototype=Object.create(Ag&&Ag.prototype)).constructor=Ig).prototype.contains=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),r=O(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},Ig.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new bf(e,o)},Ig.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},Ig.prototype.include=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),t=O(t.lat,t[0]);e.lng=Tg(e.lng,i),e.lat=Pg(e.lat,t),o.lng=Pg(o.lng,i),o.lat=Tg(o.lat,t)},Ig.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Ig.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new bf(t.lat,e.lng),se:this.se,sw:new bf(e.lat,t.lng)}},Ig.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new bf(t.lat,e.lng),e,new bf(e.lat,t.lng)]},Ig.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Ig.create=function(t,e){return t instanceof Ig?t:t&&e?new Ig(t,e):t&&4===t.length&&!e?new Ig([t[0],t[1]],[t[2],t[3]]):void 0},Pu.World.get=function(){return new Ig([90,-180],[-90,180])},Object.defineProperties(Ig,Pu),Ig),Og="centerChange",Bg=((kg=A.Class)&&(Rg.__proto__=kg),Tu={anchor:{configurable:!0}},((Rg.prototype=Object.create(kg&&kg.prototype)).constructor=Rg).prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},Rg.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},Tu.anchor.get=function(){return this._anchor},Tu.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},Rg.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(Rg.prototype,Tu),Rg);function Rg(t,e){kg.call(this),this.widgetService=t,this.options=x({},this.options,e),this.offset={x:0,y:0}}function Ig(t,e){Ag.call(this);t=bf.create(t),e=bf.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}e(Bg,{border:{width:1},opacity:1}),(Eg=A.Class)&&(jg.__proto__=Eg),((jg.prototype=Object.create(Eg&&Eg.prototype)).constructor=jg).prototype.destroy=function(){this._deactivate()},jg.prototype._initOptions=function(t){this.options=x({},this.options,t)},jg.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},jg.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},jg.prototype.reset=function(){this._beforeReset(),this._reset()},jg.prototype._reset=function(){this._applyExtent()},jg.prototype._beforeReset=function(){},jg.prototype._resize=function(){},jg.prototype._panEnd=function(){this._applyExtent()},jg.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!T(t.minZoom)||e>=t.minZoom,e=!T(t.maxZoom)||e<=t.maxZoom,t=Mg.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},jg.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},jg.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},jg.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},jg.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},jg.prototype._readData=function(){return this.options.data||[]},jg.prototype._hasData=function(){return this._data&&0<this._data.length},jg.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Eg,ku=jg,Lg=Math,zg=A.geometry.Point,Vg,h;function jg(t,e){Eg.call(this),this.support=hg(),this._initOptions(e),this.map=t;e=document.createElement("div");lt(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function Dg(t){return vt(t)?t:rm.compile(t)}function Hg(t){var e=t;return"string"!=typeof t&&(e+="px"),e}function Fg(t,e){Vg.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}(Vg=ku)&&(Fg.__proto__=Vg),((Fg.prototype=Object.create(Vg&&Vg.prototype)).constructor=Fg).prototype.destroy=function(){Vg.prototype.destroy.call(this),this._view.destroy(),this._view=null},Fg.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Fg.prototype._reset=function(){Vg.prototype._reset.call(this),this._updateView(),this._view.reset()},Fg.prototype._viewType=function(){return Gg},Fg.prototype._activate=function(){Vg.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,A.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Fg.prototype._deactivate=function(){Vg.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Fg.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),o={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},Fg.prototype._resize=function(){this._render()},Fg.prototype._panEnd=function(t){Vg.prototype._panEnd.call(this,t),this._render()},Fg.prototype._render=function(){this._updateView(),this._view.render()},e(h=Fg,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1}),(Ng=A.Class)&&(qg.__proto__=Ng),((qg.prototype=Object.create(Ng&&Ng.prototype)).constructor=qg).prototype._initOptions=function(t){this.options=x({},this.options,t)},qg.prototype.center=function(t){this._center=t},qg.prototype.extent=function(t){this._extent=t},qg.prototype.viewOrigin=function(t){this._viewOrigin=t},qg.prototype.zoom=function(t){this._zoom=t},qg.prototype.pointToTileIndex=function(t){return new zg(Lg.floor(t.x/this.options.tileSize),Lg.floor(t.y/this.options.tileSize))},qg.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,e=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Lg.ceil((Lg.abs(e.x)+t.width)/this.options.tileSize),y:Lg.ceil((Lg.abs(e.y)+t.height)/this.options.tileSize)}},qg.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},qg.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new zg(e*this.options.tileSize,t*this.options.tileSize)},qg.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},qg.prototype.destroy=function(){zf(this.element),this.pool.empty()},qg.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},qg.prototype.render=function(){for(var t,e,o=this.tileCount(),i=this.pointToTileIndex(this._extent.nw),r=0;r<o.x;r++)for(e=0;e<o.y;e++)(t=this.createTile({x:i.x+r,y:i.y+e})).visible||t.show()},qg.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},qg.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,i=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:new zg(M((e=i).x),M(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},qg.prototype.wrapIndex=function(t){var e=Lg.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},qg.prototype.wrapValue=function(t,e){var o=Lg.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var Ug,Ng,Gg=qg,Wg=((Ug=A.Class)&&(Xg.__proto__=Ug),((Xg.prototype=Object.create(Ug&&Ug.prototype)).constructor=Xg).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Xg.prototype._initOptions=function(t){this.options=x({},this.options,t)},Xg.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},Xg.prototype.show=function(){var t=this.element,e=(t.style.top=Hg(this.options.offset.y),t.style.left=Hg(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Xg.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Xg.prototype.url=function(){return Dg(this.options.urlTemplate)(this.urlOptions())},Xg.prototype.errorUrl=function(){return Dg(this.options.errorUrlTemplate)(this.urlOptions())},Xg.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},Xg);function Xg(t,e){Ug.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function qg(t,e){Ng.call(this),this.element=t,this._initOptions(e),this.pool=new Zg}e(Wg,{urlTemplate:"",errorUrlTemplate:""}),(Yg=A.Class)&&(Qg.__proto__=Yg),((Qg.prototype=Object.create(Yg&&Yg.prototype)).constructor=Qg).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},Qg.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},Qg.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},Qg.prototype._create=function(t){for(var e,o=this._items,i=Yt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new Wg(i,t),this._items.push(e)),e},Qg.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);o<n&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))};var Yg,Zg=Qg;function Qg(){Yg.call(this),this._items=[]}function Kg(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}e(Zg,{maxSize:100});var $g,Jg,ty,ey,oy,iy,ry,ny=Object.assign,sy="change",ay=((ry=s)&&(_y.__proto__=ry),((_y.prototype=Object.create(ry&&ry.prototype)).constructor=_y).prototype.captureNext=function(){this.capture=!0},_y.prototype.cancelCapture=function(){this.capture=!1},_y.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},_y.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},_y),py=((iy=s)&&(xy.__proto__=iy),((xy.prototype=Object.create(iy&&iy.prototype)).constructor=xy).prototype.makeVirtual=function(){ny(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},xy.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},xy.prototype.outOfBounds=function(t){return t>this.max||t<this.min},xy.prototype.forceEnabled=function(){this.forcedEnabled=!0},xy.prototype.getSize=function(){return this.container[this.measure]},xy.prototype.getTotal=function(){return this.element[this.scrollSize]},xy.prototype.rescale=function(t){this.scale=t},xy.prototype.update=function(t){var e=this,o=e.virtual?e._virtualMax:e.getTotal(),i=o*e.scale,r=e.getSize();0===o&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=i,e.min=Math.min(e.max,r-i),e.minScale=r/o,e.centerOffset=(i-r)/2,e.enabled=e.forcedEnabled||r<i,t)||e.trigger(sy,e)},xy),hy=((oy=s)&&(my.__proto__=oy),((my.prototype=Object.create(oy&&oy.prototype)).constructor=my).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},my.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},my.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(sy)},my),ly=((ey=s)&&(vy.__proto__=ey),((vy.prototype=Object.create(ey&&ey.prototype)).constructor=vy).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},vy.prototype.dragMove=function(t){var e,o=this.dimension,i=this.axis,r=this.movable,n=r[i]+t;o.enabled&&(e=t,(n<o.min&&t<0||n>o.max&&0<t)&&(e*=this.resistance),r.translateAxis(i,e),this.trigger(sy,this))},vy),cy=((ty=A.Class)&&(yy.__proto__=ty),(yy.prototype=Object.create(ty&&ty.prototype)).constructor=yy),uy=((Jg=s)&&(gy.__proto__=Jg),((gy.prototype=Object.create(Jg&&Jg.prototype)).constructor=gy).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},gy.prototype.scaleTo=function(t){this.scale=t,this.refresh()},gy.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},gy.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},gy.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},gy.prototype.moveTo=function(t){ny(this,t),this.refresh()},gy.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=Kg(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(sy))},gy.prototype._saveCoordinates=function(t){this.coordinates=t},gy),dy=A.drawing.Group,Ru;function fy(t,e){$g.call(this,t,e),this._pan=Qf(this._pan,this),this.surface=A.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new uy(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}function gy(t){Jg.call(this);var e=this,t=(e.support=hg(),this.transformStyle=this.support.transitions.prefix+"Transform",e.element=t,e.element.style.webkitTransformOrigin="left top",e.x=0,e.y=0,e.scale=1,Kg(e.x,e.y,e.scale));e.element.style[this.transformStyle]=t,e._saveCoordinates(t)}function yy(t){ty.call(this);var s,a,p,h=this;ny(h,{elastic:!0},t),t=h.elastic?.5:0,p=h.movable,h.x=s=new ly({axis:"x",dimension:h.dimensions.x,resistance:t,movable:p}),h.y=a=new ly({axis:"y",dimension:h.dimensions.y,resistance:t,movable:p}),h.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){h.gesture=t,h.offset=Gt(h.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=h.gesture,o=e.center,i=t.center,e=t.distance/e.distance,r=h.dimensions.minScale,n=h.dimensions.maxScale,r=(p.scale<=r&&e<1&&(e+=.8*(1-e)),p.scale*e>=n&&(e=n/p.scale),p.x+h.offset.left),n=p.y+h.offset.top,r={x:(r-o.x)*e+i.x-r,y:(n-o.y)*e+i.y-n};p.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),h.dimensions.rescale(p.scale),(h.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function vy(t){ey.call(this),ny(this,t)}function my(t){oy.call(this);this.x=new py(ny({horizontal:!0},t)),this.y=new py(ny({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(sy,t)}function xy(t){iy.call(this);var e=this;e.forcedEnabled=!1,ny(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function _y(t,e){ry.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,pg(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,Qf(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,Qf(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,Qf(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,Qf(o._release,o))})),o.bind(["press","release"],e||{})}($g=ku)&&(fy.__proto__=$g),((fy.prototype=Object.create($g&&$g.prototype)).constructor=fy).prototype.destroy=function(){$g.prototype.destroy.call(this),this.surface.destroy()},fy.prototype._reset=function(){$g.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},fy.prototype._initRoot=function(){this._root=new dy,this.surface.draw(this._root)},fy.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},fy.prototype._resize=function(){this.surface.size(this.map.size())},fy.prototype._readData=function(){var t=$g.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},fy.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Cy(this.map,this.options.style,this));for(var e=new dy,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},fy.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof A.drawing.Circle&&this.map.options.renderPointsAsMarkers?T(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},fy.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},fy.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},fy.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},fy.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},fy.prototype._panEnd=function(t){$g.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},fy.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},fy.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},fy.prototype._handler=function(e){var o=this;return function(t){t.element&&o.map.trigger(e,o._eventArgs(t))}},fy.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},fy.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},fy.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},fy.prototype._activate=function(){$g.prototype._activate.call(this),this._panHandler=Qf(this._pan,this),this.map.bind("pan",this.panHandler)},fy.prototype._deactivate=function(){$g.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e(Ru=fy,{autoBind:!0,zIndex:100}),(wy=A.Class)&&(ky.__proto__=wy),((ky.prototype=Object.create(wy&&wy.prototype)).constructor=ky).prototype.parse=function(t){var e=new dy,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=o&&e.children.length<2?e.children[0]:e},ky.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},ky.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},ky.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},ky.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Zt(e).anchor()))&&(t.options.fill=null)},ky.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},ky.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},ky.prototype._buildPolygon=function(t){for(var e=new(1<t.length?A.drawing.MultiPath:A.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(bf.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},ky.prototype._loadPoint=function(t,e,o){var e=bf.fromLngLat(e),i=this.locator.locationToView(e),i=new A.geometry.Circle(i,10),i=new A.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var by,wy,Cy=ky,t;function Sy(){by.apply(this,arguments)}function ky(t,e,o){wy.call(this),this.observer=o,this.locator=t,this.style=e}(by=Ru)&&(Sy.__proto__=by),((Sy.prototype=Object.create(by&&by.prototype)).constructor=Sy).prototype._readData=function(){return this.options.data||[]},Sy.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=Mt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=Mt(this.options.locationField),s=0;s<i.length;s++){var a,p,h,l=i[s],c=n(l),u=o(l);T(c)&&T(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=bf.create(c),h=this.map.locationToView(c),p=a.map(u),(h=this._createSymbol({center:h,size:p,style:e.style,dataItem:l,location:c})).dataItem=l,h.location=c,h.value=u,this._drawSymbol(h))}}},Sy.prototype._scaleType=function(){var t=this.options.scale;return vt(t)?t:Ty[t]},Sy.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=vt(e)?e:My[e])(t)},Sy.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Sy.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},Sy.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},e(t=Sy,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Ay,Py,Ty={sqrt:((Py=A.Class)&&(Vy.__proto__=Py),((Vy.prototype=Object.create(Py&&Py.prototype)).constructor=Vy).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Vy)},My={circle:function(t){var e=new A.geometry.Circle(t.center,t.size/2);return new A.drawing.Circle(e,t.style)},square:function(t){var e=new A.drawing.Path(t.style),o=t.size/2,t=t.center;return e.moveTo(t.x-o,t.y-o).lineTo(t.x+o,t.y-o).lineTo(t.x+o,t.y+o).lineTo(t.x-o,t.y+o).close(),e}},Oy="mouseenter",By="mouseleave",Ry=Object.assign,Iy="k-marker",Ey="."+Iy,Ly=((Ay=ku)&&(zy.__proto__=Ay),((zy.prototype=Object.create(Ay&&Ay.prototype)).constructor=zy).prototype.destroy=function(){Ay.prototype.destroy.call(this),$f(this.element,"click",this._markerClickHandler),this.clear()},zy.prototype.add=function(t){if(!ht(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},zy.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},zy.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},zy.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},zy.prototype._reset=function(){Ay.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},zy.prototype.bind=function(t,e){t=Dy.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},zy.prototype._addOne=function(t){t=Dy.create(t,this.options);return t.addTo(this),t},zy.prototype._readData=function(){return this.options.data||[]},zy.prototype._load=function(t){this._data=t,this.clear();for(var e=Mt(this.options.locationField),o=Mt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},zy.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},zy.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},zy.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},zy.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Ry({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},zy);function zy(t,e){Ay.call(this,t,e),this._markerClickHandler=Qf(this._markerClick,this),Kf(this.element,"click",Ey,this._markerClickHandler),this.items=[],this._load(this._readData())}function Vy(t,e){Py.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}e(Ly,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""}),(jy=A.Class)&&(Fy.__proto__=jy),((Fy.prototype=Object.create(jy&&jy.prototype)).constructor=Fy).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Fy.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Fy.prototype.location=function(t){return t?(this.options.location=bf.create(t).toArray(),this.layer&&this.layer.update(this),this):bf.create(this.options.location)},Fy.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=Df(this._anchor.left),this.element.style.top=Df(this._anchor.top)},Fy.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},Fy.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=Qf(this._mouseEnter,this),Kf(this.element,Oy,Ey,this._mouseEnterHandler),this._mouseLeaveHandler=Qf(this._mouseLeave,this),Kf(this.element,By,Ey,this._mouseLeaveHandler))},Fy.prototype.unbindEvents=function(){this.element&&($f(this.element,Oy,this._mouseEnterHandler),$f(this.element,By,this._mouseLeaveHandler))},Fy.prototype.render=function(){var t,e,o,i,r;this.element||(t=this.options,e=this.layer,lt(o=document.createElement("span"),Iy),this.options.template?(i=this._compileTemplate(this.options.template)(this.dataItem),i=Wf(i),o.appendChild(i)):t.svgIcon?ae(o,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(i={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(i.icon="map-marker-target",ae(o,i)):"pin"===t.shape?ae(o,i):lt(o,"k-icon k-icon-xxl k-i-marker-"+jf(t.shape||"pin")):ae(o,i)),t.title&&o.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){o.setAttribute(t,r[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents())},Fy.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},Fy.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},Fy.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Fy.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Fy.prototype._compileTemplate=function(t){return rm.compile(t,{paramName:"dataItem",useWithBlock:!1})},Fy.create=function(t,e){return t instanceof Fy?t:new Fy(x({},e,t))};var jy,Dy=Fy,Hy=Object.assign;function Fy(t){jy.call(this),this.options=t||{}}function Uy(t){window.requestAnimationFrame(t)}function Ny(t){t.preventDefault()}(Wy=A.Class)&&(nv.__proto__=Wy),((nv.prototype=Object.create(Wy&&Wy.prototype)).constructor=nv).prototype.tick=function(){},nv.prototype.done=function(){},nv.prototype.onEnd=function(){},nv.prototype.onCancel=function(){},nv.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Uy(this._tickProxy)))},nv.prototype.enabled=function(){return!0},nv.prototype.cancel=function(){this._started=!1,this.onCancel()},nv.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Uy(this._tickProxy))};var Gy,Wy,Ch,Xy=((Gy=Ch=nv)&&(rv.__proto__=Gy),((rv.prototype=Object.create(Gy&&Gy.prototype)).constructor=rv).prototype.done=function(){return this.timePassed()>=this.duration},rv.prototype.timePassed=function(){return Math.min(this.duration,eg()-this.startDate)},rv.prototype.moveTo=function(t){var e=this,o=e.movable;e.initial=o[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=eg(),e.start()},rv.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},rv.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},rv),qy=Object.assign,Yy=800,Zy=0,Qy="move",Ky="tap",$y="doubleTap",Jy="release",tv="gesturechange",ev="gestureend",ov="gesturetap",iv={api:0,touch:0,mouse:9,pointer:9};function rv(t){Gy.call(this),Hy(this,t)}function nv(){Wy.call(this);this._tickProxy=Qf(this._tick,this),this._started=!1}function sv(t){var e,o,i,r=hg(),n=[],s=t.originalEvent||t,a=t.currentTarget,p=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;p<e;p++)i=o[p],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}(pv=A.Class)&&(uv.__proto__=pv),((uv.prototype=Object.create(pv&&pv.prototype)).constructor=uv).prototype.move=function(t){var e=this,o=t["page"+e.axis],i=eg(),r=i-e.timeStamp||1;!o&&this.invalidZeroEvents||(e.delta=o-e.location,e._updateLocationData(t),e.initialDelta=o-e.startLocation,e.velocity=e.delta/r,e.timeStamp=i)},uv.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var av,pv,hv=uv,lv=((av=A.Class)&&(cv.__proto__=av),((cv.prototype=Object.create(av&&av.prototype)).constructor=cv).prototype.press=function(){this._holdTimeout=setTimeout(Qf(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},cv.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(Ky,t):e._trigger($y,t),e.userEvents._clicks=0},300))},cv.prototype._hold=function(){this._trigger("hold",this.pressEvent)},cv.prototype.move=function(t){var e=this,o="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!o){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(_v.current&&_v.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(Qy,t)}},cv.prototype.end=function(t){this.endTime=eg(),this._finished||(this._finished=!0,this._trigger(Jy,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(Ky,t)),clearTimeout(this._holdTimeout),this.dispose())},cv.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},cv.prototype.skip=function(){this.dispose()},cv.prototype.cancel=function(){this.dispose()},cv.prototype.isMoved=function(){return this._moved},cv.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=eg(),this._moved=!0,this._trigger("start",t)},cv.prototype._trigger=function(t,e){var e=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,o)&&e.preventDefault()},cv.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},cv);function cv(t,e,o){av.call(this),qy(this,{x:new hv("X",o.location),y:new hv("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||iv[o.type],userEvents:t,target:e,currentTarget:o.currentTarget,initialTouch:o.target,id:o.id,pressEvent:o,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function uv(t,e){pv.call(this);this.support=hg(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=eg()}function dv(t){for(var e=pg(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(xv=s)&&(Ev.__proto__=xv),((Ev.prototype=Object.create(xv&&xv.prototype)).constructor=Ev).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Ev.prototype.destroy=function(){var e,o=this,t=this.options,i=this.element;o._destroyed||(o._destroyed=!0,o.captureUpIfMoved&&this.support.eventCapture&&(e=o.surface,dv(function(t){e.removeEventListener(t,o.preventIfMoving)})),$f(o.surface,Jf("move"),this._surfaceMoveHandler),$f(o.surface,Jf("up cancel"),this._surfaceEndHandler),$f(i,Jf("down"),this._elementStartHandler),o.useClickAsTap&&$f(i,Jf("click"),this._elementClickHandler),t.preventDragEvent&&$f(i,Jf("dragstart"),this._elementDragStartHandler),$f(i,Jf("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Ev.prototype.capture=function(){Ev.current=this},Ev.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Ev.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case Qy:a=tv;break;case"end":a=ev;break;case Ky:a=ov}qy(e,{touches:s},(t=s[0],s=s[1],o=t.x.location,t=t.y.location,r=o-(i=s.x.location),n=t-(s=s.y.location),{center:{x:(o+i)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,qy(e,{type:a}))},Ev.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Ev.prototype.move=function(t,e){this._apiCall("_move",t,e)},Ev.prototype.end=function(t,e){this._apiCall("_end",t,e)},Ev.prototype._isMultiTouch=function(){return 1<this.touches.length},Ev.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Ev.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Ev.prototype._isMoved=function(){return Ot(this.touches,function(t){return t.isMoved()}).length},Ev.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Ev.prototype._start=function(t){var e,o,i=this,r=0,n=i.filter,s=sv(t),a=s.length,p=t.which;if(!(p&&1<p||i._maxTouchesReached()))for(Ev.current=null,i.currentTarget=t.currentTarget,i.stopPropagation&&t.stopPropagation();r<a&&!i._maxTouchesReached();r++)o=s[r],(e=n?o.currentTarget:i.element)&&0===e.length||(o=new lv(i,e,o),i.touches.push(o),o.press(),i._isMultiTouch()&&i.notify("gesturestart",{}))},Ev.prototype._move=function(t){this._eachTouch("move",t)},Ev.prototype._end=function(t){this._eachTouch("end",t)},Ev.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:eg(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Ev.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=sv(e),a=this.touches,p=0;p<a.length;p++)n[(o=a[p]).id]=o;for(p=0;p<s.length;p++)(r=n[(i=s[p]).id])&&r[t](i)},Ev.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:og,preventDefault:og})},Ev.defaultThreshold=function(t){Zy=t},Ev.minHold=function(t){Yy=t};var fv,gv,yv,vv,mv,xv,_v=Ev,bv=Object.assign,wv=Math.abs,Cv="change",Sv=((mv=Ch)&&(Iv.__proto__=mv),((Iv.prototype=Object.create(mv&&mv.prototype)).constructor=Iv).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Iv.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Iv.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Iv.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Iv),kv=((vv=Ch)&&(Rv.__proto__=vv),((Rv.prototype=Object.create(vv&&vv.prototype)).constructor=Rv).prototype.onCancel=function(){this.transition.cancel()},Rv.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Rv.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Rv.prototype.done=function(){return wv(this.velocity)<1},Rv.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),vv.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),vv.prototype.start.call(this)))},Rv.prototype.tick=function(){var t=this,e=t.dimension,o=t.paneAxis.outOfBounds()?.5:t.friction,o=t.velocity*=o,o=t.movable[t.axis]+o;!t.elastic&&e.outOfBounds(o)&&(o=Math.max(Math.min(o,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,o)},Rv.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Rv.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Rv.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Xy.easeOutExpo})},Rv),Av=((yv=Ch)&&(Bv.__proto__=yv),((Bv.prototype=Object.create(yv&&yv.prototype)).constructor=Bv).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Bv.prototype.done=function(){return wv(this.offset.y)<5&&wv(this.offset.x)<5},Bv.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Bv.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Bv.prototype.setCallback=function(t){t&&vt(t)&&(this.callback=t)},Bv.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},Bv),Pv=((gv=A.Class)&&(Ov.__proto__=gv),((Ov.prototype=Object.create(gv&&gv.prototype)).constructor=Ov).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,e=o/e.total,i=Math.round(-i[t]*e),r=Math.round(o*e);this.element.style.display=1<=e?"none":"",o<i+r?r=o-i:i<0&&(r+=i,i=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,i)},Ov.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Ov.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Ov),Tv=((fv=s)&&(Mv.__proto__=fv),((Mv.prototype=Object.create(fv&&fv.prototype)).constructor=Mv).prototype._initOptions=function(t){this.options=x({},this.options,t)},Mv.prototype._wheelScroll=function(t){var e,o,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),o=t.originalEvent||t,i=o.wheelDeltaY,o.wheelDelta?void 0!==i&&!i||(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},Mv.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Mv.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Mv.prototype.height=function(){return this.dimensions.y.size},Mv.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Mv.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Mv.prototype._resize=function(){this._native||this.contentResized()},Mv.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Mv.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Mv.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},Mv.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Mv.prototype.enable=function(){this.enabled=!0},Mv.prototype.disable=function(){this.enabled=!1},Mv.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(wv(t)),this.scrollElement.scrollTop(wv(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Mv.prototype.animatedScrollTo=function(t,e,o){var i;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(i,{x:t,y:e}),this.animatedScroller.setCallback(o),this.animatedScroller.start())},Mv.prototype.pullHandled=function(){},Mv.prototype.destroy=function(){var t=this.element;$f(t,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Mv.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Mv.prototype._initPullToRefresh=function(){},Mv.prototype._dragEnd=function(){},Mv.prototype._paneChange=function(){},Mv.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new Pv({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Cv,function(){s.refresh()}),n.bind(Cv,function(){s.show()}),e[t+"inertia"]=new kv({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},Mv);function Mv(t,e){fv.call(this);var s=this;this.element=t,this._initOptions(e);e=navigator.userAgent;e=(e=Xf(e)).ios||e.android,s._native=s.options.useNative&&e,e=Wf('<div class="km-scroll-header"/>');if(s._native)lt(t,"km-native-scroller"),Vf(e,t),bv(s,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",lt(t,"km-scroll-wrapper");var o=t,i=Wf('<div class="km-scroll-container"/>');for(o.appendChild(i);o.firstChild!==i;)i.appendChild(o.firstChild);Vf(e,t);var e=t.children[1],r=new ay(t),n=new uy(e),a=new hy({element:e,container:t,forcedEnabled:s.options.zoom}),p=this.options.avoidScrolling,h=new _v(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:s.options.zoom,supportDoubleTap:s.options.supportDoubleTap,start:function(t){a.refresh();var e=wv(t.x.velocity),o=wv(t.y.velocity),i=o<=2*e;r=s.fixedContainer,n=t.event.target;var r,n,e=e<=2*o;!(r===n||function(t){if(n)for(var e=n.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(r))&&!p(t)&&s.enabled&&(a.x.enabled&&i||a.y.enabled&&e)?h.capture():h.cancel()}}),l=new cy({movable:n,dimensions:a,userEvents:h,elastic:s.options.elastic}),c=new Sv({movable:n,dimensions:a,userEvents:h,tapCapture:r}),u=new Av({moveTo:function(t){s.scrollTo(t.x,t.y)}});n.bind(Cv,function(){s.scrollTop=-n.y,s.scrollLeft=-n.x,s.trigger("scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),s.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Kf(t,"wheel",this._wheelScrollHandler)),bv(s,{movable:n,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:h,pane:l,tapCapture:r,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),s._initAxis("x"),s._initAxis("y"),s._wheelEnd=function(){s._wheel=!1,s.userEvents.end(0,s._wheelY)},a.refresh(),s.options.pullToRefresh&&s._initPullToRefresh()}}function Ov(t){gv.call(this);var e="x"===t.axis,o=Wf('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');bv(this,t,{element:o,elementSize:0,movable:new uy(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Cv,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Bv(t){yv.call(this,t),bv(this,t,{origin:{},destination:{},offset:{}})}function Rv(t){vv.call(this);var e=this;bv(e,t,{transition:new Xy({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",Qf(e.start,e)),e.userEvents.bind("gestureend",Qf(e.start,e)),e.userEvents.bind("tap",Qf(e.onEnd,e))}function Iv(t){mv.call(this,t);bv(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Ev(t,e){xv.call(this);var o,i,r,n=this,s=hg(),a=(this.support=s,this.options=e=e||{},o=n.filter=e.filter,n.threshold=e.threshold||Zy,n.minHold=e.minHold||Yy,n.touches=[],n._maxTouches=e.multiTouch?2:1,n.allowSelection=e.allowSelection,n.captureUpIfMoved=e.captureUpIfMoved,n.useClickAsTap=!e.fastTap&&!s.delayedClick(),n._clicks=0,n.supportDoubleTap=e.supportDoubleTap,!s.touch||s.mouseAndTouchPresent);qy(n,{element:t,surface:e.global&&a?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=Qf(this._move,this),Kf(n.surface,Jf("move"),this._surfaceMoveHandler),this._surfaceEndHandler=Qf(this._end,this),Kf(n.surface,Jf("up cancel"),this._surfaceEndHandler),this._elementStartHandler=Qf(this._start,this),Kf(t,Jf("down"),o,this._elementStartHandler),n.useClickAsTap&&(this._elementClickHandler=Qf(this._click,this),Kf(t,Jf("click"),o,this._elementClickHandler)),(s.pointers||s.msPointers)&&(s.browser.version<11?(a="pinch-zoom double-tap-zoom",t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?a+" "+e.touchAction:a):t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=Ny,Kf(t,Jf("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=Qf(this._select,this),Kf(t,Jf("mousedown"),o,this._elementSelectHandler),n.captureUpIfMoved&&s.eventCapture&&(i=n.surface,r=Qf(n.preventIfMoving,n),dv(function(t){i.addEventListener(t,r,!0)})),n.bind(["press","hold",Ky,$y,"start",Qy,"end",Jy,"cancel","gesturestart",tv,ev,ov,"select"],e)}function Lv(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}e(Tv,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),tg(Tv,["pull","scroll","resize"]),Lv.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const a_=Lv;var zv,Vv=Math,jv=Vv.min,Dv=Vv.pow,Hv=A.geometry.Point,Fv="marker",Uv="location",Nv={bubble:t,shape:Ru,tile:h},l;function R(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),zv.call(this),this._init(t,e,o,i)}Nv[Fv]=Ly,(zv=s)&&(R.__proto__=zv),((R.prototype=Object.create(zv&&zv.prototype)).constructor=R).prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),ht(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();$f(this.element,"wheel",this._mousewheelHandler),zv.prototype.destroy.call(this)},R.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=hg(),this.context=i,this.initObserver(i),this.initServices(i),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new Nf,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,A.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Kf(this.element,"wheel",this._mousewheelHandler)},R.prototype._initOptions=function(t){this.options=x({},this.options,t)},R.prototype._initElement=function(t){lt(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),zf(t);t=Wf("<div />");this.element.appendChild(t)},R.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new a_(this,t)},R.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},R.prototype.addObserver=function(t){t&&this.observers.push(t)},R.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},R.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},R.prototype.trigger=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i||zv.prototype.trigger.call(this,t,e),i},R.prototype._notifyObserver=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},R.prototype.zoom=function(t){var e=this.options,t=T(t)?(t=Vv.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},R.prototype.center=function(t){var e=t?(t=bf.create(t),e=bf.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Og,{center:this.options.center}),this._reset()),this):bf.create(this.options.center);return e},R.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},R.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),zf(e),this._init(e,t,{},this.context),this._reset()},R.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=bf.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},R.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=Hv.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},R.prototype.locationToView=function(t){var t=bf.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},R.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),t=Hv.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},R.prototype.eventOffset=function(t){var e,o=Gt(this.element);return t=t.x&&t.x[Uv]||t.y&&t.y[Uv]?(e=t.x[Uv]-o.left,t.y[Uv]-o.top):(t=t.originalEvent||t,e=O(t.pageX,t.clientX)-o.left,O(t.pageY,t.clientY)-o.top),new A.geometry.Point(e,t)},R.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},R.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},R.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},R.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return{width:o=this.options.wraparound?o:jv(e,o),height:jv(e,t.clientHeight)}},R.prototype.exportVisual=function(){return this._reset(),!1},R.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},R.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=bf.create(t);return(t=this.locationToLayer(t,e)).x+=o.width/2,t.y+=o.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(Og,{center:this.options.center}),this},R.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},R.prototype._setExtent=function(t){var e=Mg.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Mg(e.nw,o));this.center(i.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(i.nw,s),p=this.locationToLayer(i.se,s),h=Vv.abs(p.x-a.x),p=Vv.abs(p.y-a.y);if(h<=r&&p<=n)break}this.zoom(s)},R.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize(),o=(e.x+=o.width,e.y+=o.height,this.layerToLocation(e));return new Mg(t,o)},R.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},R.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},R.prototype._createControlElement=function(t,e){var o,t=t.position||e,e="."+ig(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(lt(o=document.createElement("div"),"k-map-controls "+ig(t)),this.element.appendChild(e=o)),document.createElement("div"));return e.appendChild(t),t},R.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new dg(e,t)},R.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new xg(e,x({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},R.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,i=this.element.clientWidth,r=this.element.clientHeight,o=_(o,t.x.min,t.x.max-i),e=_(e,t.y.min,t.y.max-r);this.scroller.one("scroll",Qf(this._scrollEnd,this)),this.scroller.scrollTo(-o,-e)},R.prototype._navigatorCenter=function(){this.center(this.options.center)},R.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Cg(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},R.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},R.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new Tv(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",Qf(this._scroll,this)),t.bind("scrollEnd",Qf(this._scrollEnd,this)),t.userEvents.bind("gesturestart",Qf(this._scaleStart,this)),t.userEvents.bind("gestureend",Qf(this._scale,this)),t.userEvents.bind("doubleTap",Qf(this._doubleTap,this)),t.userEvents.bind("tap",Qf(this._tap,this)),this.scrollElement=t.scrollElement},R.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],i=this._createLayer(i);e.push(i)}},R.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],o=e===Fv?x({},this.options.markerDefaults,t,{icons:this.options.icons}):x({},o,t),t=new Nv[e](this,o);return e===Fv&&(this.markers=t),t},R.prototype._createTooltip=function(){return new Bg(this.widgetService,this.options.tooltip)},R.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===Fv}).length||(this.markers=new Ly(this,x({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},R.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,o=new A.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._tooltip.offset=o,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},R.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=eg(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},R.prototype._panComplete=function(){return 50<eg()-(this._panEndTimestamp||0)},R.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},R.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),o=new A.geometry.Point(t.center.x,t.center.y),i=this.viewToLocation(o,e),i=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t})},R.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Vv.log(t)/Vv.log(2);return Vv.round(t)},R.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},R.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=Dv(2,this.options.minZoom-n),t.dimensions.maxScale=Dv(2,this.options.maxZoom-n),{min:-r.x,max:i-r.x}),n={min:-r.y,max:i-r.y};this.options.wraparound&&(t.max=20*i,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(t.min,t.max),o.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},R.prototype._renderLayers=function(){},R.prototype._layerSize=function(t){t=O(t,this.options.zoom);return this.options.minSize*Dv(2,t)},R.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},R.prototype._doubleTap=function(t){var e,o,i;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},R.prototype._mousewheel=function(t){var e=0<Dt(t)?-1:1,o=this.options,i=this.zoom(),e=_(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},R.prototype._toDocumentCoordinates=function(t){var e=Gt(this.element);return{left:M(t.x+e.left),top:M(t.y+e.top)}},e(l=R,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),tg(l,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const p_=l;var Gv=1.5,Wv=.4,Xv="#000",Z,qv="11px "+(Z="Arial, Helvetica, sans-serif"),Yv="12px "+Z,Zv="16px "+Z,Qv="transparent",Kv="#fff",$v=function(){return{icon:{border:{width:1}},label:{font:Yv,padding:3},line:{length:10,width:2},visible:!0}},Jv=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Kv,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}}},tm=function(){return{gap:Gv,spacing:Wv,target:{color:"#ff0000"}}},em=function(){return{gap:.5,line:{color:Xv,width:1},spacing:Wv}},om=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}}},im=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Yv},notes:$v(),title:{font:Zv,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:(t=t,Object.assign({visible:!0,labels:{font:qv},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:Gv,spacing:Wv},boxPlot:Jv(),bubble:{border:{width:0},labels:{background:Qv},opacity:.6},bullet:tm(),candlestick:{border:{_brightness:.8,width:1},downColor:Kv,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Xv,width:1},spacing:.3},column:{gap:Gv,spacing:Wv},heatmap:{labels:{color:"",background:Qv,visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},pyramid:om(),horizontalWaterfall:em(),line:{width:2},notes:$v(),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:Gv,spacing:Wv},rangeColumn:{gap:Gv,spacing:Wv},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:Jv(),verticalBullet:tm(),verticalLine:{width:2},waterfall:em()},Or.reduce(function(t,e){return t[e]={color:J,trendline:{},markers:{visible:!1},width:1,dashType:"longDash"},t},{}))),title:{font:Zv},subtitle:{font:Yv},legend:{labels:{font:Yv}}}}}return F})())}}});
|