@progress/kendo-charts 2.7.0-dev.202501020821 → 2.7.0-dev.202501200911

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var v0={};return{setters:[function(t){v0.Class=t.Class,v0.Color=t.Color,v0.drawing=t.drawing,v0.geometry=t.geometry,v0.logToConsole=t.logToConsole,v0.parseColor=t.parseColor,v0.support=t.support,v0.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var V={100:t=>{t.exports=v0}},z={};function j(t){var e=z[t];return void 0!==e||(e=z[t]={exports:{}},V[t](e,e.exports,j)),e.exports}j.d=(t,e)=>{for(var i in e)j.o(e,i)&&!j.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},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,F,H={};{j.r(H),j.d(H,{Aggregates:()=>W_,ArcGauge:()=>l0,ArcScale:()=>s0,AreaChart:()=>lb,AreaSegment:()=>sb,ArrowLinearPointer:()=>$1,Axis:()=>O_,AxisGroupRangeTracker:()=>pb,AxisLabel:()=>A_,Bar:()=>db,BarChart:()=>yb,BarLabel:()=>cb,BarLinearPointer:()=>t0,Barcode:()=>c0,Box:()=>R,BoxElement:()=>y_,BoxPlot:()=>xb,BoxPlotChart:()=>bb,BubbleChart:()=>Sb,Bullet:()=>Pb,BulletChart:()=>Tb,Candlestick:()=>vb,CandlestickChart:()=>mb,CategoricalChart:()=>Q_,CategoricalErrorBar:()=>Z_,CategoricalPlotArea:()=>Qb,CategoryAxis:()=>L_,Chart:()=>H1,ChartAxis:()=>N_,ChartContainer:()=>Lb,ChartElement:()=>g_,ChartPane:()=>U_,ChartPlotArea:()=>G_,ChartService:()=>T_,ChartWizardCommon:()=>Ix,CircularGauge:()=>p0,Class:()=>M.Class,ClipAnimation:()=>ob,ClusterLayout:()=>fb,Crosshair:()=>Ob,CrosshairTooltip:()=>Mb,CurveProcessor:()=>H_,DateCategoryAxis:()=>I_,DateValueAxis:()=>E_,DefaultAggregates:()=>Vb,DomEventsBuilder:()=>M_,DonutChart:()=>b1,DonutPlotArea:()=>w1,DonutSegment:()=>_1,ErrorBarBase:()=>q_,ErrorRangeCalculator:()=>Y_,Extent:()=>Ey,FloatElement:()=>__,FontLoader:()=>s_,FormatService:()=>P_,Gauge:()=>q1,Gradients:()=>m_,HashMap:()=>r_,Highlight:()=>Kb,InstanceObserver:()=>n_,IntlService:()=>C_,Legend:()=>a1,LegendItem:()=>s1,LegendLayout:()=>e1,LineChart:()=>nb,LinePoint:()=>J_,LineSegment:()=>tb,LinearGauge:()=>e0,LinearPointer:()=>Q1,LinearScale:()=>Z1,Location:()=>Ug,LogarithmicAxis:()=>R_,Map:()=>y0,Matrix:()=>l_,MousewheelZoom:()=>t1,Navigator:()=>X1,NavigatorHint:()=>W1,Note:()=>S_,NumericAxis:()=>B_,OHLCChart:()=>Xb,OHLCPoint:()=>Wb,Observable:()=>p_,Pane:()=>Ib,Pannable:()=>$b,PieAnimation:()=>u1,PieChart:()=>m1,PieChartMixin:()=>v1,PiePlotArea:()=>x1,PieSegment:()=>y1,PlotAreaBase:()=>Bb,PlotAreaEventsMixin:()=>Eb,PlotAreaFactory:()=>h1,Point:()=>E,PointEventsMixin:()=>K_,PolarAxis:()=>j_,QRCode:()=>d0,RadarCategoryAxis:()=>z_,RadarLogarithmicAxis:()=>F_,RadarNumericAxis:()=>D_,RadialGauge:()=>n0,RadialPointer:()=>r0,RadialScale:()=>i0,RangeAreaChart:()=>Gb,RangeAreaPoint:()=>Fb,RangeBar:()=>zb,RangeBarChart:()=>jb,RangePointer:()=>h0,Ring:()=>u_,RootElement:()=>x_,Sankey:()=>lx,ScatterChart:()=>kb,ScatterErrorBar:()=>wb,ScatterLineChart:()=>d1,Sector:()=>d_,Selection:()=>l1,SeriesAggregator:()=>Rb,SeriesBinder:()=>X_,ShapeBuilder:()=>f_,ShapeElement:()=>v_,SharedTooltip:()=>c1,Sparkline:()=>U1,SplineAreaSegment:()=>hb,SplineSegment:()=>ib,StackWrap:()=>gb,StockChart:()=>Y1,TemplateService:()=>o_,Text:()=>b_,TextBox:()=>w_,Title:()=>k_,Tooltip:()=>p1,UserEvents:()=>c_,WaterfallChart:()=>qb,WaterfallSegment:()=>Yb,XYPlotArea:()=>g1,ZoomSelection:()=>Jb,addClass:()=>_t,alignPathToPixel:()=>kt,anyHasZIndex:()=>ps,append:()=>ee,appendIfNotNull:()=>cs,applyEventMap:()=>je,areNumbers:()=>us,autoMajorUnit:()=>Pi,autoTextColor:()=>a_,barcodeValidator:()=>u0,bindEvents:()=>ie,bindSegments:()=>fs,categoriesCount:()=>gs,chartBaseTheme:()=>i_,clockwise:()=>At,constants:()=>N,convertableToNumber:()=>Ct,countNumbers:()=>Er,createHashSet:()=>Ie,createOutOfRangePoints:()=>Is,createPatternFill:()=>Hi,createSankeyData:()=>px,cycleDown:()=>Tt,cycleIndex:()=>Mt,cycleUp:()=>Pt,deepExtend:()=>O,defaultErrorHandler:()=>Be,defined:()=>k,deg:()=>oe,elementOffset:()=>re,elementScale:()=>Pe,elementSize:()=>ne,elementStyles:()=>Vt,equalsIgnoreCase:()=>ys,evalOptions:()=>ms,eventCoordinates:()=>se,eventElement:()=>ae,eventMap:()=>Ve,filterSeriesByType:()=>xs,find:()=>ke,findAxisByName:()=>Lr,getAriaTemplate:()=>Ft,getField:()=>zr,getSpacing:()=>w,getSupportedFeatures:()=>Ge,getTemplate:()=>Dt,getter:()=>Ut,grep:()=>Gt,hasClasses:()=>Wt,hasGradientOverlay:()=>ws,hasOwnProperty:()=>Ee,hasValue:()=>ks,hashKey:()=>he,inArray:()=>u,interpolateValue:()=>Yt,isArray:()=>xt,isDateAxis:()=>As,isFunction:()=>Ot,isNumber:()=>m,isObject:()=>Bt,isPlainObject:()=>Qt,isString:()=>St,keys:()=>h_,last:()=>le,limitValue:()=>x,logToConsole:()=>M.logToConsole,map:()=>Kt,mousewheelDelta:()=>Jt,noop:()=>We,now:()=>Xe,objectKey:()=>pe,off:()=>Ue,on:()=>Ne,parseDateCategory:()=>bs,qrcodeValidator:()=>f0,rad:()=>ce,rectToBox:()=>Qi,removeClass:()=>wt,renderIcon:()=>be,round:()=>L,segmentVisible:()=>ds,setDefaultOptions:()=>e,singleItemOrArray:()=>Ss,sparseArrayLimits:()=>we,styleValue:()=>Et,unbindEvents:()=>ue,valueOrDefault:()=>_});var N={},U=(j.r(N),j.d(N,{DEFAULT_PANE:()=>_c,NAVIGATOR_AXIS:()=>xc,NAVIGATOR_PANE:()=>mc}),"arc"),G="ArrowUp",W="ArrowDown",X="ArrowLeft",Y="ArrowRight",q="aria-activedescendant",Z="#000",S="bottom",b="center",Q="circle",K=3,$="cross",J="date",tt="12px sans-serif",et=10,it="end",ot=/\{\d+:?/,rt="height",nt="inside",st="inherit",C="left",at=Number.MAX_VALUE,ht=-Number.MAX_VALUE,lt="none",pt="object",ct="outside",P="right",ut="roundedRect",dt="start",ft="string",T="top",gt="value",a="#fff",yt="width",y="x",v="y",vt="pointer",mt="horizontal";function xt(t){return Array.isArray(t)}function _t(t,e){for(var i=xt(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var bt=/\s+/g;function wt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(bt," "))}var M=j(100);function kt(t){var e=.5;t.options.stroke&&M.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function At(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function St(t){return typeof t===ft}function Ct(t){return m(t)||St(t)&&isFinite(t)}function Pt(t,e){return(t+1)%e}function Tt(t,e){t-=1;return t<0?e-1:t}function Mt(t,e){return 1===e||t%e==0?0:t<0?e+t%e:e<=t?t%e:t}function Ot(t){return"function"==typeof t}var Lt="object",It="undefined";function O(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r,n,s;"__proto__"!==o&&"constructor"!==o&&((s=(n=typeof(r=i[o]))===Lt&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):Ot(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===Lt&&s||{},t(e[o],r)):n!==It&&(e[o]=r))}}(t,e[o]);return t}function Bt(t){return"object"==typeof t}function Et(t){return m(t)?t+"px":t}var Rt=/width|height|top|left|bottom|right/i;function Vt(t,e){var i=St(e)?[e]:e;if(xt(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=Rt.test(s)?parseFloat(r[s]):r[s]}return o}if(Bt(e))for(var a in e)t.style[a]=Et(e[a])}function w(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[T]=i[P]=i[S]=i[C]=t:(i[T]=t[T]||e,i[P]=t[P]||e,i[S]=t[S]||e,i[C]=t[C]||e),i}function zt(){}var jt={compile:function(t){return t}};zt.register=function(t){jt=t},zt.compile=function(t,e){return jt.compile(t,e)};const o_=zt;function Dt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=o_.compile(t.template):Ot(t.content)&&(e=t.content),e}function Ft(t){var e;return(t=void 0===t?{}:t).ariaTemplate?t.ariaTemplate=e=o_.compile(t.ariaTemplate):Ot(t.ariaContent)&&(e=t.ariaContent),e}var Ht=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Nt={};function Ut(t){var r;return Nt[t]||(r=[],t.replace(Ht,function(t,e,i,o){r.push(M.drawing.util.defined(e)?e:i||o)}),Nt[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e}),Nt[t]}function Gt(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function Wt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}function Xt(){this._map=new Map}Nt[void 0]=function(t){return t},Xt.prototype.get=function(t){return this._map.get(t)},Xt.prototype.set=function(t,e){this._map.set(t,e)};const r_=Xt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Yt(t,e,i){return M.drawing.util.round(t+(e-t)*i,K)}function qt(t,e){this.observer=t,this.handlerMap=O({},this.handlerMap,e)}var Zt="trigger";qt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[Zt]&&(i=this.callObserver(Zt,t,e)),i},qt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},qt.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 n_=qt;function Qt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Kt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);M.drawing.util.defined(n)&&o.push(n)}return o}var $t=M.support.browser||{};function Jt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,$t.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function te(){}var t,ee=(t=M.drawing.util).append,ie=t.bindEvents,k=t.defined,oe=t.deg,re=t.elementOffset,ne=t.elementSize,se=t.eventCoordinates,ae=t.eventElement,he=t.hashKey,le=t.last,x=t.limitValue,pe=t.objectKey,ce=t.rad,L=t.round,ue=t.unbindEvents,_=t.valueOrDefault;te.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,te.fetchFonts(e,o,r),r.depth--))})},te.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,M.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},te.preloadFonts=function(t,e){var i=[];te.fetchFonts(t,i),te.loadFonts(i,e)};const s_=te;function e(t,e){t=t.prototype;t.options?t.options=O({},t.options,e):t.options=e}function de(t,e){this.element=t,this.options=O({},this.options,e),this.wrapper()}var fe,ge="k-i-",ye="k-svg-i-",t=(de.prototype.wrapper=function(){this.addClasses()},de.prototype.addClasses=function(){},de.prototype.html=function(){return this.element.outerHTML},e(de,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(fe=de)&&(me.__proto__=fe),((me.prototype=Object.create(fe&&fe.prototype)).constructor=me).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(ge)}),e=this.options.icon?(this.options.icon.startsWith(ge)?"":ge)+this.options.icon:"";this._className=e,_t(this.element,"k-icon"),_t(this.element,"k-font-icon"),wt(this.element,t),_t(this.element,e),_t(this.element,this.options.iconClass||""),fe.prototype.wrapper.call(this)},me),ve,i;function me(t,e){fe.call(this,t,e)}function xe(t,e){t.innerHTML="",ve.call(this,t,e)}e(t,{name:"HTMLFontIcon",icon:null}),(ve=de)&&(xe.__proto__=ve),((xe.prototype=Object.create(ve&&ve.prototype)).constructor=xe).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,i=this.element.className.split(" ").find(function(t){return t.startsWith(ye)}),o=(!t&&e&&(o=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=o[1],e=e.replace(o[0],"")),St(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?ye+t.name:"");this._className=o,_t(this.element,"k-svg-icon"),wt(this.element,i),_t(this.element,o),_t(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&Qt(t)&&((i=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),i.setAttribute("focusable","false"),i.innerHTML=t.content||"",this.element.appendChild(i)),ve.prototype.wrapper.call(this)},e(i=xe,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var _e={svg:i,font:t};function be(t,e){return t&&(!Bt(t)||t instanceof HTMLElement)&&!St(t)||(e=t,t=document.createElement("span")),(e=St(e)?{icon:e}:e).type||(e.type="svg"),_e[e.type]?new _e[e.type](t,e).html():null}function we(t){for(var e=at,i=ht,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===at?void 0:e,max:i===ht?void 0:i}}function ke(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Ae=M.geometry.Matrix,Se=/matrix\((.*)\)/;function Ce(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(Se))||2!==t.length?Ae.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Ae,[null].concat(t))))}function Pe(t){if(!t)return Ae.unit();for(var e=Ce(t),i=t.parentElement;i;)var o=Ce(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}const a_=function(t){return new M.Color(t).isDark()?a:Z};var Te={},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},i={size:{configurable:!0}},Oe=(Me.prototype.values=function(){return this._values.filter(function(t){return t!==Te})},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]=Te,delete this._index[t])},Me.prototype.clear=function(){this._index={},this._values=[]},i.size.get=function(){return this._values.length},Object.defineProperties(Me.prototype,i),function(t){this._set=new Set(t)}),t={size:{configurable:!0}},Le=(Oe.prototype.values=function(){return Array.from(this._set)},Oe.prototype.has=function(t){return this._set.has(t)},Oe.prototype.add=function(t){this._set.add(t)},Oe.prototype.delete=function(t){this._set.delete(t)},Oe.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(Oe.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Ie(t){return new(Le()?Oe:Me)(t)}function Be(t){throw t}const h_={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 Ee(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Re(){this.height=0,this.width=0,this.data=[]}Re.prototype.clone=function(){var t=new Re;return t.height=this.height,t.width=this.width,t.data=this.data.map(function(t){return t.slice()}),t},Re.prototype.get=function(t,e){t=this.data[t];return t?t[e]:null},Re.prototype.set=function(t,e,i){var o=this.data[t];(o=null==o?this.data[t]=[]:o)[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Re.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},Re.prototype.map=function(o,t){var r=new Re;return this.each(function(t,e,i){r.set(e,i,o(t,e,i))},t),r},Re.prototype.transpose=function(){var o=new Re;return this.each(function(t,e,i){o.set(i,e,t)}),o},Re.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;0<=--i;)for(var o=e[i]=new Array(t),r=t;0<=--r;)o[r]=i===r?1:0;return this},Re.prototype.multiply=function(t){for(var e=new Re,i=0;i<this.height;++i)for(var o=0;o<t.width;++o){for(var r=0,n=0;n<this.width;++n){var s=this.get(i,n),a=t.get(n,o);"number"==typeof s&&"number"==typeof a&&(r+=s*a)}e.set(i,o,r)}return e},Re.prototype.inverse=function(){for(var n=this.width,t=this.augment((new Re).unit(n)),s=t.data,e=0;e<n;++e){var i=function(e){var t,i=function(t,e,i){for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);o<s&&(o=s,r=t)}return r}(e,n,function(t){return s[t][e]});if(!s[i][e])return{v:null};e!==i&&(t=s[e],s[e]=s[i],s[i]=t);for(var o=e+1;o<n;++o){for(var r=e+1;r<2*n;++r)s[o][r]-=s[e][r]*s[o][e]/s[e][e];s[o][e]=0}}(e);if(i)return i.v}for(var o=0;o<n;++o)for(var r=s[o][o],a=0;a<2*n;++a)s[o][a]/=r;for(var h=n;0<=--h;)for(var l=h;0<=--l;)if(s[l][h])for(var p=2*n;--p>=n;)s[l][p]-=s[h][p]*s[l][h];return t.slice(0,n,n,n)},Re.prototype.augment=function(t){var o=this.clone(),r=o.width;return t.each(function(t,e,i){o.set(e,i+r,t)}),o},Re.prototype.slice=function(t,e,i,o){for(var r=new Re,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};const l_=Re;var Ve={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function ze(t){return Ve[t]||t}var je=function(t){return t.replace(/([^ ]+)/g,ze)};function De(){for(var t,e="",i=0;i<32;i++)t=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(e+="-"),e+=(12===i?4:16===i?3&t|8:t).toString(16);return e}var Fe=new WeakMap,He=Symbol("id");function Ne(t,e,i,o,r){var a,h,l,p;a=t,h=i,l=o,p=r,(xt(t=e)?t:(t||"").split(" ")).forEach(function(t){function e(t){var e=t.target?t.target.closest(n):null;(!n||t.target&&e)&&(e=n?e:t.currentTarget,Object.defineProperty(t,"currentTarget",{value:e}),Object.defineProperty(t,"delegateTarget",{value:i}),s(t))}var i,o,r,n,s;i=a,t=t,r=p,s=l,(o=h)&&Ot(o)&&!l?s=o:o&&"string"==typeof o&&Ot(s)&&(n=o),s[He]=De(),(o=Fe.get(i))||(o=new Map,Fe.set(i,o)),o.set(s[He],e),i.addEventListener(t,e,Boolean(r))})}function Ue(t,e,i,o,r){var s,a,h;s=t,a=i,h=o,(xt(t=e)?t:(t||"").split(" ")).forEach(function(t){var e,i,o,r,n;e=s,t=t,i=a,o=h,(n=Fe.get(e))&&i&&i[He]&&(i=i[He],r=n.get(i),n.delete(i),r)&&e.removeEventListener(t,r,Boolean(o))})}function Ge(){var t=function(t){var e,i=!1,o={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_]+)/,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},r={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(e in o)if(t.match(o[e])){if("windows"===e&&"plugins"in navigator)return!1;(i={}).device=e,i.name=function(t,e,i){for(var o in e)if(e[o].test(t))return o;return void 0!==i?i:t}(e,r),i[i.name]=!0;break}return i}(navigator.userAgent),e={};return e.mobileOS=t,e}function We(){}function Xe(){return(new Date).getTime()}function Ye(){this._defaultPrevented=!0}function qe(){return!0===this._defaultPrevented}var Ze,Qe="function";function Ke(){Ze.call(this),this._events={}}(Ze=M.Class)&&(Ke.__proto__=Ze),((Ke.prototype=Object.create(Ze&&Ze.prototype)).constructor=Ke).prototype.destroy=function(){this.unbind()},Ke.prototype.bind=function(t,e,i){var o,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==Qe;if(void 0===e)for(h in t)n.bind(h,t[h]);else for(var h=0,l=s.length;h<l;h++)!function(){var t=s[h];(r=a?e:e[t])&&(i&&(o=r,(r=function(){n.unbind(t,r),o.apply(n,arguments)}).original=o),(n._events[t]=n._events[t]||[]).push(r))}();return n},Ke.prototype.one=function(t,e){return this.bind(t,e,!0)},Ke.prototype.first=function(t,e){for(var i,o="string"==typeof t?[t]:t,r=typeof e==Qe,n=0,s=o.length;n<s;n++){var a=o[n];(i=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(i)}return this},Ke.prototype.trigger=function(t,e){var i,o,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=Ye,n.isDefaultPrevented=qe,i=0,o=(r=r.slice()).length;i<o;i++)r[i].call(this,n);return!0===n._defaultPrevented}return!1},Ke.prototype.unbind=function(t,e){var i,o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(i=o.length-1;0<=i;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},Ke.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events)&&this._events[o]&&delete this._events[o]}this.bind(this.events,t)};const p_=Ke;function $e(t){t.preventDefault()}var Je=Object.assign,ti=800,ei=0,ii="move",oi="tap",ri="doubleTap",ni="release",si="gesturechange",ai="gestureend",hi="gesturetap",li={api:0,touch:0,mouse:9,pointer:9};function pi(t){var e=[],i=t.originalEvent||t,o=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:i,event:t,target:t.target,currentTarget:o,id:i.pointerId,type:"pointer"}),e}(ui=M.Class)&&(yi.__proto__=ui),((yi.prototype=Object.create(ui&&ui.prototype)).constructor=yi).prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Xe(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},yi.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var ci,ui,di=yi,fi=((ci=M.Class)&&(gi.__proto__=ci),((gi.prototype=Object.create(ci&&ci.prototype)).constructor=gi).prototype.press=function(){var t=this;this._holdTimeout=setTimeout(function(){return t._hold()},this.userEvents.minHold),this._trigger("press",this.pressEvent)},gi.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(oi,t):e._trigger(ri,t),e.userEvents._clicks=0},300))},gi.prototype._hold=function(){this._trigger("hold",this.pressEvent)},gi.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(ki.current&&ki.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(ii,t)}},gi.prototype.end=function(t){this.endTime=Xe(),this._finished||(this._finished=!0,this._trigger(ni,t),this._moved?this._trigger("end",t):this.supportDoubleTap?this._tap(t):this._trigger(oi,t),clearTimeout(this._holdTimeout),this.dispose())},gi.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)},gi.prototype.skip=function(){this.dispose()},gi.prototype.cancel=function(){this.dispose()},gi.prototype.isMoved=function(){return this._moved},gi.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Xe(),this._moved=!0,this._trigger("start",t)},gi.prototype._trigger=function(t,e){var e=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,i)&&e.preventDefault()},gi.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},gi);function gi(t,e,i){ci.call(this),Je(this,{x:new di("X",i.location),y:new di("Y",i.location),type:i.type,threshold:t.threshold||li[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function yi(t,e){ui.call(this);var i=this;i.support=Ge(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=t,i._updateLocationData(e),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=Xe()}function vi(t){for(var e=Ve.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}(mi=p_)&&(Ci.__proto__=mi),((Ci.prototype=Object.create(mi&&mi.prototype)).constructor=Ci).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Ci.prototype.destroy=function(){var e,i=this,t=this.options,o=this.element;i._destroyed||(i._destroyed=!0,i.captureUpIfMoved&&(e=i.surface,vi(function(t){e.removeEventListener(t,i.preventIfMoving)})),Ue(i.surface,je("move"),this._surfaceMoveHandler),Ue(i.surface,je("up cancel"),this._surfaceEndHandler),Ue(o,je("down"),this._elementStartHandler),t.preventDragEvent&&Ue(o,je("dragstart"),this._elementDragStartHandler),Ue(o,je("mousedown"),this._elementSelectHandler),i._disposeAll(),i.unbind(),delete i.surface,delete i.element,delete i.currentTarget)},Ci.prototype.capture=function(){Ci.current=this},Ci.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Ci.prototype.notify=function(t,e){var i,o,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case ii:a=si;break;case"end":a=ai;break;case oi:a=hi}Je(e,{touches:s},(t=s[0],s=s[1],i=t.x.location,t=t.y.location,r=i-(o=s.x.location),n=t-(s=s.y.location),{center:{x:(i+o)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,Je(e,{type:a}))},Ci.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},Ci.prototype.move=function(t,e){this._apiCall("_move",t,e)},Ci.prototype.end=function(t,e){this._apiCall("_end",t,e)},Ci.prototype._isMultiTouch=function(){return 1<this.touches.length},Ci.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Ci.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Ci.prototype._isMoved=function(){return Gt(this.touches,function(t){return t.isMoved()}).length},Ci.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Ci.prototype._start=function(t){if(!(t.which&&1<t.which||this._maxTouchesReached())){Ci.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var e=pi(t),i=0;i<e.length&&!this._maxTouchesReached();i++){var o,r=e[i];(o=this.filter?r.currentTarget:this.element)&&0===o.length||(o=new fi(this,o,r),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))}}},Ci.prototype._move=function(t){this._eachTouch("move",t)},Ci.prototype._end=function(t){this._eachTouch("end",t)},Ci.prototype._eachTouch=function(t,e){for(var i,o,r,n={},s=pi(e),a=this.touches,h=0;h<a.length;h++)n[(i=a[h]).id]=i;for(h=0;h<s.length;h++)(r=n[(o=s[h]).id])&&("move"!==t||"pointer"!==o.type||this.surface.hasPointerCapture(o.id)||this.surface.setPointerCapture(o.id),r[t](o))},Ci.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:We,preventDefault:We})},Ci.defaultThreshold=function(t){ei=t},Ci.minHold=function(t){ti=t};var mi,xi,_i,bi,wi,ki=Ci,Ai,i,Si,t;function Ci(t,e){mi.call(this);var i,o,r=this,n=Ge();this.support=n,this.options=e=e||{},n=r.filter=e.filter,r.threshold=e.threshold||ei,r.minHold=e.minHold||ti,r.touches=[],r._maxTouches=e.multiTouch?2:1,r.allowSelection=e.allowSelection,r.captureUpIfMoved=e.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=e.supportDoubleTap,Je(r,{element:t,surface:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Ne(r.surface,je("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Ne(r.surface,je("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Ne(t,je("down"),n,this._elementStartHandler),t.style["touch-action"]=e.touchAction||"none",e.preventDragEvent&&(this._elementDragStartHandler=$e,Ne(t,je("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Ne(t,je("mousedown"),n,this._elementSelectHandler),r.captureUpIfMoved&&(i=r.surface,o=r.preventIfMoving.bind(r),vi(function(t){i.addEventListener(t,o,!0)})),r.bind(["press","hold",oi,ri,"start",ii,"end",ni,"cancel","gesturestart",si,ai,hi,"select"],e)}const c_=ki;function Pi(t,e){t=L(e-t,et-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=L(t/e,et);return L(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),et)}(xi=M.Class)&&(Ti.__proto__=xi),((Ti.prototype=Object.create(xi&&xi.prototype)).constructor=Ti).prototype.clone=function(){return new Ti(this.x,this.y)},Ti.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ti.prototype.rotate=function(t,e){var e=ce(e),i=Math.cos(e),e=Math.sin(e),o=t.x,t=t.y,r=this.x,n=this.y;return this.x=L(o+(r-o)*i+(n-t)*e,K),this.y=L(t+(n-t)*i-(r-o)*e,K),this},Ti.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ti.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ti.onCircle=function(t,e,i){e=ce(e);return new Ti(t.x-i*Math.cos(e),t.y-i*Math.sin(e))};const E=Ti;function Ti(t,e){xi.call(this),this.x=t||0,this.y=e||0}function Mi(t,e,i,o){_i.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Oi(t,e,i,o,r){r=ce(r);return new E(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}(_i=M.Class)&&(Mi.__proto__=_i),((Mi.prototype=Object.create(_i&&_i.prototype)).constructor=Mi).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Mi.prototype.width=function(){return this.x2-this.x1},Mi.prototype.height=function(){return this.y2-this.y1},Mi.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Mi.prototype.move=function(t,e){var i=this.height(),o=this.width();return k(t)&&(this.x1=t,this.x2=this.x1+o),k(e)&&(this.y1=e,this.y2=this.y1+i),this},Mi.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},Mi.prototype.wrapPoint=function(t){var e=xt(t),i=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Mi(i,e,i,e)),this},Mi.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},Mi.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===T||e===S?v:y,a=s==v?r:n;return e===b?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===T||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Mi.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Mi.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Mi.prototype.pad=function(t){t=w(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Mi.prototype.unpad=function(t){t=w(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Mi.prototype.clone=function(){return new Mi(this.x1,this.y1,this.x2,this.y2)},Mi.prototype.center=function(){return new E(this.x1+this.width()/2,this.y1+this.height()/2)},Mi.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Mi.prototype.points=function(){return[new E(this.x1,this.y1),new E(this.x2,this.y1),new E(this.x2,this.y2),new E(this.x1,this.y2)]},Mi.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Mi.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Mi.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,o=o.y,n=Oi(0,0,r,o,t),s=Oi(e,0,r,o,t),a=Oi(e,i,r,o,t),r=Oi(0,i,r,o,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),i=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+i,this},Mi.prototype.toRect=function(){return new M.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Mi.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Mi.prototype.align=function(t,e,i){var o=e+1,r=e+2,e=e===y?yt:rt,n=this[e]();u(i,[C,T])?(this[o]=t[o],this[r]=this[o]+n):u(i,[P,S])?(this[r]=t[r],this[o]=this[r]-n):i===b&&(this[o]=t[o]+(t[e]()-n)/2,this[r]=this[o]+n)};const R=Mi;function Li(t,e,i,o,r){bi.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}function Ii(t,e){return t-e}(bi=M.Class)&&(Li.__proto__=bi),((Li.prototype=Object.create(bi&&bi.prototype)).constructor=Li).prototype.clone=function(){return new Li(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},Li.prototype.middle=function(){return this.startAngle+this.angle/2},Li.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},Li.prototype.point=function(t,e){var t=ce(t),i=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,i=L(this.center.x-i*e,K),t=L(this.center.y-t*e,K);return new E(i,t)},Li.prototype.adjacentBox=function(t,e,i){var t=this.clone().expand(t),o=t.middle(),t=t.point(o),r=e/2,n=i/2,s=Math.sin(ce(o)),o=Math.cos(ce(o)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-o/Math.abs(o)),Math.abs(o)<.9&&(t+=n*-s/Math.abs(s)),new R(a,t,a+e,t+i)},Li.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new E(s,t),r=this.point(r),r=new E(r.x-e.x,r.y-e.y),n=this.point(n),n=new E(n.x-e.x,n.y-e.y),e=L(s*s+t*t,K);return(r.equals(a)||At(r,a))&&!At(n,a)&&i*i<=e&&e<=o*o},Li.prototype.getBBox=function(){for(var t=new R(at,at,ht,ht),e=L(this.startAngle%360),i=L((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(Ii),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),h=0;h<a.length;h++){var l=this.point(a[h]);t.wrapPoint(l),t.wrapPoint(l,o)}return o||t.wrapPoint(this.center),t},Li.prototype.expand=function(t){return this.radius+=t,this};const u_=Li;function Bi(t,e,i,o){wi.call(this,t,0,e,i,o)}(wi=u_)&&(Bi.__proto__=wi),((Bi.prototype=Object.create(wi&&wi.prototype)).constructor=Bi).prototype.expand=function(t){return wi.prototype.expand.call(this,t)},Bi.prototype.clone=function(){return new Bi(this.center,this.radius,this.startAngle,this.angle)},Bi.prototype.setRadius=function(t){return this.radius=t,this};const d_=Bi;function Ei(){Ai.apply(this,arguments)}(Ai=M.Class)&&(Ei.__proto__=Ai),((Ei.prototype=Object.create(Ai&&Ai.prototype)).constructor=Ei).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i,r=((0===t.angle||0<t.angle&&i===o)&&(o+=.001),new M.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new M.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=M.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},(i=Ei).current=new i;const f_=i;function Ri(t){Si.call(this),this.children=[],this.options=O({},this.options,this.initUserOptions(t))}(Si=M.Class)&&(Ri.__proto__=Si),((Ri.prototype=Object.create(Si&&Si.prototype)).constructor=Ri).prototype.initUserOptions=function(t){return t},Ri.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},Ri.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},Ri.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},Ri.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},Ri.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},Ri.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},Ri.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},Ri.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},Ri.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},Ri.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},Ri.prototype.createVisual=function(){this.visual=new M.drawing.Group({zIndex:this.options.zIndex,visible:_(this.options.visible,!0)})},Ri.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=M.drawing.Animation.create(this.visual,this.options.animation))},Ri.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):k(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},Ri.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},Ri.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},Ri.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(_(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},Ri.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},Ri.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},Ri.prototype.renderComplete=function(){},Ri.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},Ri.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);k(n.options.zIndex)||(n.options.zIndex=_(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},Ri.prototype.toggleFocusHighlight=function(t){var e,i=(this.options||{}).focusHighlight||{},o=this._focusHighlight;(t||o)&&(o||(e=this.getRoot().options.background,e=a_(e),e={fill:{opacity:i.opacity,color:i.color},stroke:Object.assign({},{color:e},i.border),zIndex:i.zIndex},o=this._focusHighlight=this.createFocusHighlight(e),this.appendVisual(o)),o.visible(t))},Ri.prototype.createGradientOverlay=function(t,e,i){i=new M.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},Ri.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},Ri.prototype.supportsPointInactiveOpacity=function(){return!0},(t=Ri).prototype.options={};const g_=t;var Vi={dots:M.drawing.dotsPattern,verticalStripes:M.drawing.verticalStripesPattern,crosshatch:M.drawing.crosshatchPattern,diagonalStripes:M.drawing.diagonalStripesPattern,grid:M.drawing.gridPattern},zi,i,ji,t,Di,t,Fi,i;function Hi(t,e,i){i=Ot(t=t)?t(i):t,t=i&&Vi[i.type];return t?t(Object.assign({},e,i)):e}function Ni(t){zi.call(this,t),this.options.margin=w(this.options.margin),this.options.padding=w(this.options.padding)}(zi=g_)&&(Ni.__proto__=zi),((Ni.prototype=Object.create(zi&&zi.prototype)).constructor=Ni).prototype.reflow=function(t){function e(){o.align(t,y,r.align),o.align(t,v,r.vAlign),o.paddingBox=i.clone().unpad(l).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,l=r.margin,p=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(l).unpad(c).unpad(p),zi.prototype.reflow.call(this,u),i=h?this.box=new R(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(p)):(u=this.contentBox=i.clone(),i.pad(p).pad(c).pad(l),e()),this.translateChildren(i.x1-u.x1+l.left+c+p.left,i.y1-u.y1+l.top+c+p.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},Ni.prototype.align=function(t,e,i){this.box.align(t,e,i)},Ni.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},Ni.prototype.createVisual=function(){zi.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},Ni.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:Hi(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},e(i=Ni,{align:C,vAlign:T,margin:{},padding:{},border:{color:Z,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const y_=i;function Ui(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}function Gi(t,e){ji.call(this,t),this.pointData=e}(ji=y_)&&(Gi.__proto__=ji),((Gi.prototype=Object.create(ji&&ji.prototype)).constructor=Gi).prototype.getElement=function(){var t,e,i=this.options,o=this.paddingBox,r=i.type,n=i.rotation,s=o.center(),a=o.width()/2,h=o.height()/2;return i.visible&&this.hasBox()?(e=this.visualStyle(),r===Q?t=new M.drawing.Circle(new M.geometry.Circle([L(o.x1+a,K),L(o.y1+h,K)],Math.min(a,h)),e):"triangle"===r?t=M.drawing.Path.fromPoints([[o.x1+a,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===$?((t=new M.drawing.MultiPath(e)).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):(h=o.toRect(),r===ut&&(a=_(i.borderRadius,h.width()/5),h.setCornerRadius(a)),t=M.drawing.Path.fromRect(h,e)),n&&t.transform(M.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=i.zIndex,t):null},Gi.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},Gi.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}},Gi.prototype.createVisual=function(){this.visual=this.createElement(),Ui(this.visual,this.options.accessibilityOptions)},e(t=Gi,{type:Q,align:b,vAlign:b});const v_=t,m_={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:i="radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:i,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:i,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:i,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:i,center:[.5,.5],radius:.5}};function Wi(t){Di.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}(Di=g_)&&(Wi.__proto__=Di),((Wi.prototype=Object.create(Di&&Di.prototype)).constructor=Wi).prototype.reflow=function(){var t=this.options,e=this.children,i=new R(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o,r,n,s,a,h,l,p,c,u,d,f=0;f<e.length;f++)e[f].reflow(i),o=i,r=e[f].box,d=u=c=p=l=h=a=s=n=void 0,i=(o.x1===r.x1&&o.y1===r.y1&&o.x2===r.x2&&o.y2===r.y2?r:(n=Math.min(o.x1,r.x1),s=Math.max(o.x1,r.x1),a=Math.min(o.x2,r.x2),h=Math.max(o.x2,r.x2),l=Math.min(o.y1,r.y1),p=Math.max(o.y1,r.y1),c=Math.min(o.y2,r.y2),u=Math.max(o.y2,r.y2),(d=[])[0]=new R(s,l,a,p),d[1]=new R(n,p,s,c),d[2]=new R(a,p,h,c),d[3]=new R(s,c,a,u),o.x1===n&&o.y1===l||r.x1===n&&r.y1===l?(d[4]=new R(n,l,s,p),d[5]=new R(a,c,h,u)):(d[4]=new R(a,l,h,p),d[5]=new R(n,c,s,u)),Gt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new R},Wi.prototype.createVisual=function(){this.visual=new M.drawing.Group,this.createBackground()},Wi.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),i=M.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(i)},Wi.prototype.getRoot=function(){return this},Wi.prototype.createGradient=function(t){var e,s,i=this.gradients,o=pe(t),r=m_[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new M.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o}()),(e=new M.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},Wi.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Wi.prototype.size=function(){var t=this.options;return new R(0,0,t.width,t.height)},e(t=Wi,{width:600,height:400,background:a,border:{color:Z,width:0},margin:w(5),zIndex:-2});const x_=t;function Xi(t){Fi.call(this,t),this._initDirection()}(Fi=g_)&&(Xi.__proto__=Fi),((Xi.prototype=Object.create(Fi&&Fi.prototype)).constructor=Xi).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=yt,this.elementSizeField=rt,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=rt,this.elementSizeField=yt,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Xi.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Xi.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,h=s.length,l=e[o+1]+this.alignStart(a,e[n]());if(h){for(var p=l,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=e[i+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=p+this.alignStart(m[n],u.groupSize),_=new R;_[o+1]=x,_[o+2]=x+m[n],_[i+1]=f,_[i+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}p+=u.groupSize+this.groupSpacing}e[o+1]=l,e[o+2]=l+a,e[i+2]=e[i+1]+t}},Xi.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===P||o===S?i=e-t:o===b&&(i=(e-t)/2),i},Xi.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=L(e[o]()),h=i.length,l=[],p=0,c=0,u=0,d=0,f=[],g=0;g<h;g++){var y=i[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&L(c+n+v[o])>a&&(l.push({groupElements:f,groupSize:p,groupElementsSize:c}),d=Math.max(d,c),u+=s+p,c=p=0,f=[]),p=Math.max(p,v[r]),0<c&&(c+=n),c+=v[o],f.push(y)}return l.push({groupElements:f,groupSize:p,groupElementsSize:c}),{groups:l,groupsSize:u+=p,maxGroupElementsSize:d=Math.max(d,c)}},Xi.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Xi.prototype.createVisual=function(){},e(i=Xi,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const __=i;var Yi,qi=M.drawing.Text,t;function Zi(t,e){Yi.call(this,e),this.content=t,this.reflow(new R)}(Yi=g_)&&(Zi.__proto__=Yi),((Zi.prototype=Object.create(Yi&&Yi.prototype)).constructor=Zi).prototype.reflow=function(t){var e=this.options,e=e.size=M.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new R(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Zi.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,t=t.paintOrder;this.visual=new qi(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:t})},e(t=Zi,{font:tt,color:Z});const b_=t;function Qi(t){var e=t.origin,t=t.bottomRight();return new R(e.x,e.y,t.x,t.y)}var Ki,$i=/\n/m,Ji,i,to,t,eo,i;function io(t,e,i){Ki.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new R)}(Ki=y_)&&(io.__proto__=Ki),((io.prototype=Object.create(Ki&&Ki.prototype)).constructor=io).prototype._initContainer=function(){var t=this.options,e=String(this.content).split($i),i=new __({vertical:!0,align:t.align,wrap:!1}),o=O({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new b_(e[r].trim(),o);i.append(n)}},io.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=Qi(o.clippedBBox()||new M.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(Ki.prototype.reflow.call(this,t),i.rotation&&(o=w(i.margin),e=this.box.unpad(o),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(o.left-o.right,o.top-o.bottom),this.rotatedBox=e.clone(),e.pad(o)))},io.prototype.createVisual=function(){var t=this.options;this.visual=new M.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},io.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!k(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Ki.prototype.renderVisual.call(this))},io.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},io.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},io.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},io.prototype.rotationTransform=function(){var t,e,i,o=this.options.rotation;return o?(t=(e=this.normalBox.center()).x,e=e.y,i=this.rotatedBox.center(),M.geometry.transform().translate(i.x-t,i.y-e).rotate(o,[t,e])):null};const w_=io;function oo(t){Ji.call(this,t),this._textBox=new w_(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function ro(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(w(o.options.margin),{bottom:0}),i.options.margin=Object.assign(w(i.options.margin),{top:0})}}(Ji=g_)&&(oo.__proto__=Ji),((oo.prototype=Object.create(Ji&&Ji.prototype)).constructor=oo).prototype.reflow=function(t){Ji.prototype.reflow.call(this,t),this.box.snapTo(t,y)},oo.buildTitle=function(t,e){var i,t="string"==typeof t?{text:t}:t;return i=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new oo(t):i},oo.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==S}),t=t.filter(function(t){return t&&t.options.position===S});return ro(e),ro(t),t.reverse(),e.concat(t)},e(i=oo,{color:Z,position:T,align:b,margin:w(5),padding:w(5)});const k_=i;function no(t,e,i,o,r){to.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new R)}(to=w_)&&(no.__proto__=to),((no.prototype=Object.create(to&&to.prototype)).constructor=no).prototype.visualContext=function(t){t=to.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},no.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:ae(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},no.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Qi(t.bbox(e.matrix()))):to.prototype.rotate.call(this),this.box},no.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return to.prototype.rotationTransform.call(this);var i=M.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||T,n=t===T||t===S?y:v,s=t===T||t===S?v:y,t=t===T||t===C?r.origin:r.bottomRight(),a=o.topLeft().transformCopy(i),h=o.topRight().transformCopy(i),l=o.bottomRight().transformCopy(i),o=o.bottomLeft().transformCopy(i),i=M.geometry.Rect.fromPoints(a,h,l,o),p={};p[s]=r.origin[s]-i.origin[s];var c,i=Math.abs(a[s]+p[s]-t[s]),t=Math.abs(h[s]+p[s]-t[s]),s=L(i,et)===L(t,et)?(c=a,h):t<i?(c=h,l):(c=a,o),t=c[n]+(s[n]-c[n])/2;return p[n]=r.center()[n]-t,M.geometry.transform().translate(p.x,p.y).rotate(e)},e(t=no,{_autoReflow:!1});const A_=t;function so(t,e,i){eo.call(this,e),this.fields=t,this.chartService=i,this.render()}(eo=y_)&&(so.__proto__=eo),((so.prototype=Object.create(eo&&eo.prototype)).constructor=so).prototype.hide=function(){this.options.visible=!1},so.prototype.show=function(){this.options.visible=!0},so.prototype.render=function(){var t,e,i,o,r,n,s,a,h=this,l=this.options;l.visible&&(i=l.label,l=l.icon,o=new R,r=function(){return h},n=l.size,s=this.fields.text,k(i)&&i.visible&&((a=Dt(i))?s=a(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color=i.position===nt?"#fff":l.background),this.label=new w_(s,O({},i)),this.label.aliasFor=r,i.position!==nt||k(n)||(l.type===Q?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),l.width=t||n||7,l.height=e||n||7,(a=new v_(O({},l))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new R),this.wrapperBox=o.wrap(a.box))},so.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),l=r.line.length,p=r.position;r.visible&&(u(p,[C,P])?p===C?(o=a.alignTo(t,p).translate(-l,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[o.x2,h.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(l,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[o.x1,h.y]],i=o.clone().wrapPoint(e))):p===S?(o=a.alignTo(t,p).translate(t.center().x-a.center().x,l),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(t.center().x-a.center().x,-l),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s)&&(r.label.position===ct&&n.box.alignTo(s.box,p),n.reflow(n.box)),this.contentBox=o,this.targetBox=t,this.box=i||o)},so.prototype.createVisual=function(){eo.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},so.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(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()):eo.prototype.renderVisual.call(this)},so.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(kt(t=M.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},so.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},so.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},so.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},so.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:ae(t),text:k(e.label)?e.label.text:"",visual:this.visual})},e(i=so,{icon:{visible:!0,type:Q},label:{position:nt,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:T,zIndex:2});const S_=i;function ao(){}var ho={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}};ao.register=function(t){ho=t},t.implementation.get=function(){return ho},Object.defineProperties(ao,t);const C_=ao;function lo(t){this._intlService=t}var po=/\{(\d+)(:[^\}]+)?\}/g,i,co,i;(i={intl:{configurable:!0}}).intl.get=function(){return this._intlService||C_.implementation},i.intl.set=function(t){this._intlService=t},lo.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return St(t)&&t.match(ot)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},lo.prototype.localeAuto=function(t,o,r){var n=this.intl;return St(t)&&t.match(ot)?t.replace(po,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(lo.prototype,i);const P_=lo;function uo(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new P_(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}(t={intl:{configurable:!0}}).intl.get=function(){return this._intlService||C_.implementation},t.intl.set=function(t){this._intlService=t,this.format.intl=t},uo.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},uo.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(uo.prototype,t);const T_=uo;function fo(){}fo.register=function(t){D=t},fo.create=function(t,e){return D?D.create(t,e):new c_(t,Object.assign({},{multiTouch:!0},e))};const M_=fo;function go(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new M.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),kt(n),n}function yo(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),kt(e),e}function o(t,e){void 0===e&&(e=new T_),co.call(this,t),this.chartService=e,this.options.visible||(this.options=O({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==lt},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==lt},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}(co=g_)&&(o.__proto__=co),((o.prototype=Object.create(co&&co.prototype)).constructor=o).prototype.initFields=function(){},o.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},o.prototype.normalizeLabelRotation=function(t){var e=t.rotation;Bt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},o.prototype.createLabels=function(){var t=this.options,e=t.vertical?P:b,i=O({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},s=this.createAxisLabel(n,i,s);s&&(this.append(s),this.labels.push(s))}}},o.prototype.clearLabels=function(){this.children=Gt(this.children,function(t){return!(t instanceof A_)}),this.labels=[]},o.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Gt(this.children,function(t){return t!==e.title}),this.title=void 0)},o.prototype.clear=function(){this.clearLabels(),this.clearTitle()},o.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new R(r,e.y1,r,e.y2-t):new R(e.x1,o,e.x2-t,o)},o.prototype.createTitle=function(){var t=this.options,t=O({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new w_(t.text,t),this.append(t),this.title=t)},o.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=O({},e,i[o]),r=(r.value=this.parseNoteValue(r.value),new S_({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(k(r.options.position)?t.vertical&&!u(r.options.position,[C,P])?r.options.position=t.reverse?C:P:t.vertical||u(r.options.position,[T,S])||(r.options.position=t.reverse?S:T):t.vertical?r.options.position=t.reverse?C:P:r.options.position=t.reverse?S:T,this.append(r),this.notes.push(r))}},o.prototype.parseNoteValue=function(t){return t},o.prototype.renderVisual=function(){co.prototype.renderVisual.call(this),this.createPlotBands()},o.prototype.createVisual=function(){co.prototype.createVisual.call(this),this.createBackground(),this.createLine()},o.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new M.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},o.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),h=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,l={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)k(i)&&n%i==0||(l.tickX=h?a.x2:a.x2-e.size,l.tickY=h?a.y1-e.size:a.y1,l.position=t[n],s.append(go(l,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},o.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&kt(e),(i=this._lineGroup=new M.drawing.Group).append(e),this.visual.append(i),this.createTicks(i))},o.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},o.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=M.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},o.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=Gt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var h=i[a],l=void 0,p=void 0,c=h.label,u=void 0,p=o?(l=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(l=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,h,new R(l.x1,p.y1,l.x2,p.y2))),0!==l.width()&&0!==p.height()&&(c=new M.geometry.Rect([l.x1,p.y1],[l.width(),p.height()]),l=M.drawing.Path.fromRect(c,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(l),u)&&n.append(u)}this.appendVisual(n)}},o.prototype.createPlotBandLabel=function(t,e,i){var o,r;return!1===t.visible?null:(o=t.text,k(t)&&t.visible&&((r=Dt(t))?o=r({text:o,item:e}):t.format&&(o=this.chartService.format.auto(t.format,o)),t.color||(t.color=this.options.labels.color)),(r=new w_(o,t)).reflow(i),r.renderVisual(),r.visual)},o.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],l={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},p=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=L(t[n]);u(s,p)||n%i==0||a&&h===s||(l.position=s,c.append(yo(l,e)),p.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},o.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?yt:rt,o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,h=((this.getRoot()||{}).box||t)[s](),l=0,p=0;p<n;p++){var c=i[p].box[s]();c+a<=h&&(l=Math.max(l,c))}this.box=r?new R(t.x1,t.y1,t.x1+l+a,t.y2):new R(t.x1,t.y1,t.x2,t.y1+l+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},o.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},o.prototype.labelTickIndex=function(t){return t.index},o.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),l=o?a.box.height():a.box.width(),p=n[h],h=n[h+1],c=void 0,u=void 0,u=o?c=i?p+(h-p)/2-l/2:p-l/2:i?(c=p,h):(c=p-l/2)+l;this.positionLabel(a,r,c,u)}},o.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);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=P),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=T),new R(i,n,o,n+t.box.height()));t.reflow(s)},o.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},o.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(o=0!==s?s:o))break}if(0!==o){for(var a=0;a<e.length;a++)e[a].options.rotation=o,e[a].reflow(new R);return!0}},o.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=i?P:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?T:S),e.reflow(this.box))},o.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;k(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},o.prototype.noteSlot=function(t){return this.getSlot(t)},o.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,i=e?v:y;this.box.snapTo(t,i),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[i+1]-=this.lineBox()[i+1]-t[i+1],this.box[i+2]-=this.lineBox()[i+2]-t[i+2]},o.prototype.axisLabelText=function(t,e,i){function o(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=Dt(e);return n?n(Object.assign({},i,{get text(){return o()},value:t,format:e.format,culture:e.culture})):o()},o.prototype.slot=function(t,e,i){t=this.getSlot(t,e,i);if(t)return t.toRect()},o.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),i[e+1]-=t.start,i[e+2]+=t.end):(o[0].options.visible&&i.wrap(o[0].box),(e=o[o.length-1]).options.visible&&i.wrap(e.box))),i},o.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,h=0,l=0,p=0;p<n.length;p++){var c=n[p],u=this.labelTickIndex(c),d=void 0,f=void 0;i?(d=o[u+s],f=o[u+a]):d=f=o[u],h=Math.max(h,d-c.box[r+1]),l=Math.max(l,c.box[r+2]-f)}return{start:h,end:l}},o.prototype.limitRange=function(t,e,i,o,r){var n,s,a=this.options;return t<i&&r<0&&(!k(a.min)||a.min<=i)||o<e&&0<r&&(!k(a.max)||o<=a.max)?null:e<i&&0<r||o<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<i&&r<0?(n=x(t,i,o),s=x(t+a,i+a,o)):o<e&&0<r&&(s=x(e,i,o),n=x(e-a,i,o-a)),{min:n,max:s})},o.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},o.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},o.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),t=t?v:y,o=this.lineDir(),r=t+(1===o?1:2).toString();return{axis:t,axisOrigin:r,axisDir:o,lineBox:e,lineSize:i,lineStart:e[r]}},o.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<o?t[i]-n[r]:n[r]-t[i])/e},o.prototype.scaleToDelta=function(t,e){t=x(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},o.prototype.labelsBetweenTicks=function(){return!this.options.justified},o.prototype.prepareUserOptions=function(){},e(i=o,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Z,visible:!0},title:{visible:!0,position:b},majorTicks:{align:ct,size:4,skip:0,step:1},minorTicks:{align:ct,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:ct,minorTickType:lt,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Z,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const O_=i;var vo="milliseconds",mo="seconds",xo="minutes",_o="hours",bo="days",wo="weeks",ko="months",Ao="years",So=1e3,Co=60*So,Po=60*Co,To=24*Po,Mo=7*To,Oo=31*To,Lo=365*To,Io={years:Lo,months:Oo,weeks:Mo,days:To,hours:Po,minutes:Co,seconds:So,milliseconds:1},Bo,t;function Eo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Co}function Ro(t,e){return new Date(t.getTime()+e)}function Vo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function zo(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function jo(t,e,i,r){var o,n,s,a=t;return t&&(o=(t=Vo(t)).getHours(),i===Ao?zo(a=new Date(t.getFullYear()+e,0,1),0):i===ko?zo(a=new Date(t.getFullYear(),t.getMonth()+e,1),o):i===wo?zo(a=jo(function(t,e){void 0===r&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return Ro(t,-i*To)}(t,r),7*e,bo),o):i===bo?zo(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),o):i===_o?(o=t,n=e,(s=new Date(o)).setMinutes(0,0,0),o=(o.getTimezoneOffset()-s.getTimezoneOffset())*Co,a=Ro(s,o+n*Po)):i===xo?0<(a=Ro(t,e*Co)).getSeconds()&&a.setSeconds(0):i===mo?a=Ro(t,e*So):i===vo&&(a=Ro(t,e)),i!==vo)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function Do(t,e,i){return jo(Vo(t),0,e,i)}function Fo(t,e,i){t=Vo(t);return t&&Do(t,e,i).getTime()===t.getTime()?t:jo(t,1,e,i)}function Ho(t,e){return t&&e?t.getTime()-e.getTime():-1}function No(t,e){return t.getTime()-e}function Uo(t){if(xt(t)){for(var e=[],i=0;i<t.length;i++)e.push(Uo(t[i]));return e}if(t)return Vo(t).getTime()}function Go(t,e){return t&&e?Uo(t)===Uo(e):t===e}function Wo(t,e,i){return Eo(t,e)/Io[i]}function Xo(t,e,i,o){var t=Vo(t),r=Vo(e);return(i===ko?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Wo(t,new Date(t.getFullYear(),t.getMonth()),bo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():i===Ao?t.getFullYear()-r.getFullYear()+Xo(t,new Date(t.getFullYear(),0),ko,1)/12:i===bo||i===wo?Wo(t,r,i):No(t,e)/Io[i])/o}function Yo(t,e,i){return i===Ao?e.getFullYear()-t.getFullYear():i===ko?12*Yo(t,e,Ao)+e.getMonth()-t.getMonth():i===bo?Math.floor(No(e,t)/To):Math.floor(No(e,t)/Io[i])}function qo(t,e){return St(e)&&t.parseDate(e)||Vo(e)}function Zo(t,e){if(xt(e)){for(var i=[],o=0;o<e.length;o++)i.push(qo(t,e[o]));return i}return qo(t,e)}function Qo(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}function r(){Bo.apply(this,arguments)}(Bo=O_)&&(r.__proto__=Bo),((r.prototype=Object.create(Bo&&Bo.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||[],i=k(t.min),o=k(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,o=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,o)),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,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(t-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:t}},r.prototype.arrangeLabels=function(){Bo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},r.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;0<r.length&&(e=o[(t=this.options.vertical?v:y)+1],o=o[t+2],i=r[0],r=le(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),r.box[t+1]>o||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(),i=e.min,e=e.max,o=Math.ceil(e),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},r.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,e=e.reverse,o=this.scaleOptions(),r=o.scale,n=o.box,s=o.min,a=n[(i?v:y)+(e?2:1)],h=this.tickIndices(t),l=[],p=0;p<h.length;p++)l.push(a+L(r*(h[p]-s),K));return l},r.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},r.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?v:y,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},r.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,i=this.lineBox(),o=e?i.height():i.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:i,lineSize:o,lineStart:i[r]}},r.prototype.lineDir=function(){return this.options.reverse?-1:1},r.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,o=o.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,h=this.lineInfo(),l=h.axis,h=h.lineStart,p=a.clone(),c=!k(e),t=_(t,0),e=_(e,t),e=Math.max(e-1,t),u=h+(t-n)*s,h=h+(Math.max(t,e)+1-n)*s;return c&&o&&(h=u),i&&(u=x(u,a[l+1],a[l+2]),h=x(h,a[l+1],a[l+2])),p[l+1]=r?h:u,p[l+2]=r?u:h,p},r.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,i=this.lineBox(),o=t.clone();return o[e+1]=x(t[e+1],i[e+1],i[e+2]),o[e+2]=x(t[e+2],i[e+1],i[e+2]),o},r.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=o),Bo.prototype.slot.call(this,t,e,i)},r.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,h=s[e+1],s=s[e+2],t=t[e];return t<h||s<t?null:(s=(e=(i?r:a)+(t-h)/n)%1,o?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 i=this.options;return(e?i.srcCategories:i.categories)[t]},r.prototype.categoriesCount=function(){return(this.options.categories||[]).length},r.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,t=L(t/(i/e),et);return{min:t,max:e+t}},r.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),o=i.max-i.min,t=this.scaleToDelta(t,o),o=i.min+e*t,i=i.max-(1-e)*t;return{min:o,max:i=i-o<.1?o+.1:i}},r.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,i=i.max,t=this.scaleRange(t,e);return{min:x(t.min,o,i),max:x(t.max,o,i)}},r.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},r.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,o=o.max,n=Math.floor(r),o=e?(r=Math.ceil(r),Math.floor(o)):(r=Math.floor(r),Math.ceil(o));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-n,max:(t.categories.length?o+(e?1:0):0)-n}},r.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,o=_(o.categories[t],""),i=(i.dataItem=r,this.axisLabelText(o,e,i));return new A_(o,i,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(){Bo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},r.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?v:y,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},r.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,t=L(t/i,et),i=this.totalRange(),o=e.min+t,e=e.max+t;return this.limitRange(o,e,0,i.max,t)},r.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,i=i.vertical?v:y,r=this.limitedRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[i+(o?2:1)],o=t[i]-n,t=e[i]-n,e=r.min+o/s,i=r.min+t/s,n=Math.min(e,i),o=Math.max(e,i);if(.01<=o-n)return{min:n,max:o}},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 i=t,o=e.srcCategories;if(i instanceof Date){for(var r=o.length,n=0;n<r;n++)if(Go(o[n],i))return n;return-1}return o.indexOf(i)},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,i=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=x(i,0,t.max),e=x(e,0,t.max)),{min:i,max:e}},r.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},r.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new r_,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},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:Z},labels:{zIndex:1},justified:!1,_deferLabels:!0});const L_=t;var i={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"},Ko=[vo,mo,xo,_o,bo,wo,ko,Ao],$o="fit",Jo,t;function tr(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=we(t)).min=Vo(e.min),e.max=Vo(e.max)),e}function er(t){this.options=t}function ir(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o,r=i.roundToBaseUnit,n=i.justified,s=(this.start=jo(t,0,i.baseUnit,i.weekStartDay),this.roundToTotalStep(e)),a=!n&&Go(e,s)&&!i.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),i.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=i.max)?(o=!n&&Go(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,o),this.displayEnd=r?this.roundToTotalStep(t,!n):i.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 or(t,e,i){for(var o,r,n,s=tr(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,l=t.maxDateGroups,p=t.baseUnit===$o,c=e?Ko.indexOf(e):0,u=p?Ko[c++]:t.baseUnit,d=a/Io[u],f=d;!r||l<=d;){for(o=o||h[u].slice(0);(n=o.shift())&&e===u&&n<i;);if(n)d=f/(r=n);else{if(u===le(Ko)){r=Math.ceil(f/l);break}if(!p){l<d&&(r=Math.ceil(f/l));break}u=Ko[c++]||le(Ko),f=a/Io[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function n(){Jo.apply(this,arguments)}er.prototype.displayIndices=function(){return{min:0,max:1}},er.prototype.displayRange=function(){return{}},er.prototype.total=function(){return{}},er.prototype.valueRange=function(){return{}},er.prototype.valueIndex=function(){return-1},er.prototype.values=function(){return[]},er.prototype.totalIndex=function(){return-1},er.prototype.valuesCount=function(){return 0},er.prototype.totalCount=function(){return 0},er.prototype.dateAt=function(){return null},ir.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},ir.prototype.displayIndices=function(){var t,e,i;return this._indices||(i=(t=this.options).baseUnit,t=t.baseUnitStep,e=Xo(this.displayStart,this.valueStart,i,t),i=Xo(this.displayEnd,this.valueStart,i,t),this._indices={min:e,max:i}),this._indices},ir.prototype.total=function(){return{min:this.start,max:this.end}},ir.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},ir.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},ir.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Xo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},ir.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Xo(t,this.start,e.baseUnit,e.baseUnitStep))},ir.prototype.dateIndex=function(t){var e=this.options;return Xo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},ir.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},ir.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=jo(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},ir.prototype.dateAt=function(t,e){var i=this.options;return jo(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},ir.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,o=o.weekStartDay,s=this.start,t=Xo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return i&&(e+=i),jo(s,e*n,r,o)},(Jo=L_)&&(n.__proto__=Jo),((n.prototype=Object.create(Jo&&Jo.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(){Jo.prototype.initFields.call(this);var t,e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];r._parsed||((r=Zo(i,r))._parsed=!0),o=O({roundToBaseUnit:!0},o,{categories:r,min:qo(i,o.min),max:qo(i,o.max),weekStartDay:Qo(o,i)}),e.panning&&e.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=r).length?(i=tr(r,!0),e=o.maxDivisions,r=function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==$o&&!u(e,Ko)){for(var i=t,o,r,n=i.categories,s=k(n)?n.length:0,a=at,h=0;h<s;h++){var l,p=n[h];p&&o&&0!==(l=Math.abs(Eo(p,o)))&&(r=(a=Math.min(a,l))>=Lo?Ao:Oo-3*To<=a?ko:Mo<=a?wo:To<=a?bo:Po<=a?_o:Co<=a?xo:mo),o=p}i.baseUnit=r||bo}return e!==$o&&"auto"!==t.baseUnitStep||or(t),t}(o),(t=o._forecast)&&(0<t.before&&(i.min=jo(i.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(i.max=jo(i.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new ir(i.min,i.max,r),e?(t=this.dataRange.displayRange(),or(r=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:t.min,max:t.max,maxDateGroups:e}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new ir(i.min,i.max,r)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||bo,this.dataRange=this.divisionRange=new er(o)),this.rangeLabels=[]},n.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return Jo.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,h=0;h<n.length;h++)r.push(e.dateIndex(n[h])+s),1!==t&&1<=h&&r.splice(h,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},n.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=Ho(t,e.min)&&Ho(t,e.max)<=0&&i.length},n.prototype.parseNoteValue=function(t){return qo(this.chartService.intl,t)},n.prototype.noteSlot=function(t){return this.getSlot(t)},n.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=L(t/r,et);return n.min&&n.max&&(r=Ro(e.min||n.min,t),e=Ro(e.max||n.max,t),n={min:jo(r,0,i,o),max:jo(e,0,i,o)}),n},n.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},n.prototype.pan=function(t){var e,i,o,r,n;return this.isEmpty()?null:(e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,i=this.dataRange.total(),o=Ro(r,t=L(t/(o/(n-r)),et)*(e.reverse?-1:1)),r=Ro(n,t),(n=this.limitRange(Uo(o),Uo(r),Uo(i.min),Uo(i.max),t))?(n.min=Vo(n.min),n.max=Vo(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 i,o;return this.isEmpty()?null:(t=Jo.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),i=No(e.max,e.min)/(i.max-i.min),o=this.options,{min:Ro(e.min,t.min*i),max:Ro(e.min,t.max*i),baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep})},n.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===$o,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),h=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(o){var l,p,c=i.autoBaseUnitSteps,e=i.maxDateGroups,o=le(c[h])*e*Io[h],u=No(n,s),d=No(a,t),f=Ko.indexOf(h);if(d<Io[h]&&h!==vo)h=Ko[f-1],t=Ro(s,p=(u-(e-1)*(l=le(c[h]))*Io[h])/2),a=Ro(n,-p);else if(o<d&&h!==Ao){var g=0;do{for(h=Ko[++f],g=0,p=2*Io[h];l=c[h][g],++g<c[h].length&&p*l<u;);}while(h!==Ao&&p*l<u);0<(p=(p*l-u)/2)&&(t=Ro(s,-p),a=Ro(n,p),t=Ro(t,x(a,r.min,r.max)-a),a=Ro(a,x(t,r.min,r.max)-t))}}return t&&a&&0<No(a,t)?{min:t,max:a,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},n.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<i.min&&(t.min=i.min),t.max>i.max)&&(t.max=i.max),t},n.prototype.range=function(){return this.dataRange.displayRange()},n.prototype.createLabels=function(){Jo.prototype.createLabels.call(this),this.createRangeLabels()},n.prototype.clearLabels=function(){Jo.prototype.clearLabels.call(this),this.rangeLabels=[]},n.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Jo.prototype.arrangeLabels.call(this)},n.prototype.arrangeRangeLabels=function(){var t,e,i,o,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(i=n[0])&&(o=e?t.y1-i.box.height()/2:t.x1,this.positionLabel(i,r,o)),i=n[1])&&(o=e?t.y2-i.box.height()/2:t.x2,this.positionLabel(i,r,o))},n.prototype.autoRotateLabels=function(){Jo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){Jo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},n.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);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=Jo.prototype.contentBox.call(this),e=this.rangeLabels,i=0;i<e.length;i++){var o=e[i];o.options.visible&&t.wrap(o.box)}return t},n.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,o=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,i.dataItem=o,this.axisLabelText(r,e,i));if(n)return new A_(r,n,t,o,e)},n.prototype.createRangeLabels=function(){var o=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,i=this.options,r=Object.assign({},i.labels,i.rangeLabels,{align:b,zIndex:i.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,i.autoRotateRangeLabels=!0),i=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||i,(i=function(t,e,i){i&&(e=new A_(e,i,t,null,r),o.append(e),o.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),i(1,t,this.axisLabelText(t,r,{index:1,count:2})))},n.prototype.autoRotateRangeLabels=function(){var t,e,o=this,i=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===i.length&&(t=function(t,e,i){e=2*Math.abs(e[i+1]-e[i]),i=o.autoRotateLabelAngle(t.box,e);0!==i&&(t.options.rotation=i,t.reflow(new R))},e=this.getMajorTickPositions(),t(i[0],e,0),t(i[1],e,e.length-2))},n.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},n.prototype.slot=function(t,e,i){var o=this.dataRange,o=(t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e)),this.getSlot(t,e,i));if(o)return o.toRect()},n.prototype.getSlot=function(t,e,i){return typeof t==pt&&(t=this.categoryIndex(t)),typeof e==pt&&(e=this.categoryIndex(e)),Jo.prototype.getSlot.call(this,t,e,i)},n.prototype.valueRange=function(){var t=tr(this.options.srcCategories);return{min:Vo(t.min),max:Vo(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=tr((t=this.options).srcCategories),new ir(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())},e(t=n,{type:J,labels:{dateFormats:i},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 I_=t;function rr(t,e){return L(Math.floor(t/e)*e,et)}function nr(t,e){return L(Math.ceil(t/e)*e,et)}function sr(t){return Math.max(Math.min(t,3e5),-3e5)}var ar,hr=Math.pow(10,1-et),t,lr,t,pr,i,cr,t,ur,i;function dr(t,e,i,o){ar.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function fr(t,e,i){t=L(Math.abs(t%e),et);return 0===t||e*(1-i)<t}(ar=O_)&&(dr.__proto__=ar),((dr.prototype=Object.create(ar&&ar.prototype)).constructor=dr).prototype.initUserOptions=function(t){a=t.seriesMin,i=t.seriesMax,o=(r=t).narrowRange,e=function(t){if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e}(a),a=function(t,e,i){if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;r=Math.min(0,o-(t-o)/2)}else r=e;return r}(a,i,o),n=Pi(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&fr(e,n,1/3)&&(e-=n),0<a)&&fr(a,n,1/3)&&(a+=n),s.min=rr(e,n),s.max=nr(a,n);var i,o,e,r=s,n=(this.totalOptions=(e=r,{min:k((a=t).min)?Math.min(e.min,a.min):e.min,max:k(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var h=s,l=["min","max"],p=0;p<l.length;p++){var c=l[p];null===h[c]&&(h[c]=void 0)}var u=k(s.min),d=k(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=rr(n.min,s.majorUnit),n.max=nr(n.max,s.majorUnit)):f&&(a=O(n,s),n.majorUnit=Pi(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=O(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},dr.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},dr.prototype.clone=function(){return new dr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},dr.prototype.startValue=function(){return 0},dr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},dr.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(L(e/t,K))+1)},dr.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),h=this.getDivisions(t),l=[],p=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&l.push(L(p,K)),p+=a*r;return l},dr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},dr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},dr.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,h=r.lineSize,r=r.lineStart,h=s*(h/(o.max-o.min)),l=_(t,e||0),e=_(e,t||0),t=(i&&(l=x(l,o.min,o.max),e=x(e,o.min,o.max)),Math.min(l,e)-o.min),i=Math.max(l,e)-o.min,l=new R(a.x1,a.y1,a.x1,a.y1);return l[n+1]=sr(r+h*(0<s?t:i)),l[n+2]=sr(r+h*(0<s?i:t)),l},dr.prototype.getValue=function(t){var e=this.options,i=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:L(e+t*(i-e),et)},dr.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=L(t/(n/(r-e)),et);return{min:e+(t=!i&&!o||i&&o?t:-t),max:r+t,offset:t}},dr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},dr.prototype.createAxisLabel=function(t,e,i){var o=this.options,o=L(o.min+t*o.majorUnit,et),i=this.axisLabelText(o,e,i);return new A_(o,i,t,null,e)},dr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},dr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},dr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(i,t))return{min:i,max:t}},dr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=(1-e)*t,e=L(this.options.min+e*t,et),t=L(this.options.max-i,et);return{min:e,max:t=t-e<hr?e+hr:t}},dr.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,t=this.scaleRange(t,e);return{min:x(t.min,i,o),max:x(t.max,i,o),narrowRange:!1}},dr.prototype.isValidRange=function(t,e){return hr<e-t},e(t=dr,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Z},labels:{format:"#.####################"},zIndex:1});const B_=t;function gr(t,e,i,o){var r,n,s,a,h,l,p,t=Vo(t),e=Vo(e),c=o.intl,i=i||{},u=(u=t,r=e,n=i=O(i||{},{min:qo(c,i.min),max:qo(c,i.max),axisCrossingValue:Zo(c,i.axisCrossingValues||i.axisCrossingValue),weekStartDay:Qo(i,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Eo(r,u),a=_o,Lo<=s?a=Ao:Oo<=s?a=ko:Mo<=s?a=wo:To<=s&&(a=bo),a):_o),a=Io[s],h=n.weekStartDay||0,u=Do(Uo(u)-1,s,h)||Vo(r),r=Fo(Uo(r)+1,s,h),a=n.majorUnit||nr(Pi(u.getTime(),r.getTime()),a)/a,l=nr(l=Yo(u,r,s),a)-l,p=Math.floor(l/2),l-=p,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||jo(u,-p,s,h),n.max=n.max||jo(r,l,s,h),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,i=n,lr.call(this,i,o),this.intlService=c,this.seriesMin=t,this.seriesMax=e,i.weekStartDay||0);this.totalMin=Uo(Do(Uo(t)-1,i.baseUnit,u)),this.totalMax=Uo(Fo(Uo(e)+1,i.baseUnit,u))}(lr=O_)&&(gr.__proto__=lr),((gr.prototype=Object.create(lr&&lr.prototype)).constructor=gr).prototype.clone=function(){return new gr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},gr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},gr.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Yo(e.min,e.max,e.baseUnit)/t+1)},gr.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/No(e.max,e.min),h=e.weekStartDay||0,l=[n],p=1;p<s;p++){var c=n+No(jo(e.min,p*t,e.baseUnit,h),e.min)*a*o;l.push(L(c,K))}return l},gr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},gr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},gr.prototype.getSlot=function(t,e,i){return B_.prototype.getSlot.call(this,qo(this.intlService,t),qo(this.intlService,e),i)},gr.prototype.getValue=function(t){t=B_.prototype.getValue.call(this,t);return null!==t?Vo(t):null},gr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},gr.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min,r=(0<r&&(s=jo(s,r,o.baseUnit,n)),e.dateFormats[o.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,i));return new A_(s,n,t,null,e)},gr.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,i=o?i.height():i.width(),n=this.range(),i=i/No(n.max,n.min),n=L(t/i,et);return{min:Ro(e.min,n=!o&&!r||o&&r?n:-n),max:Ro(e.max,n),offset:n}},gr.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Ho(t,e.min)&&Ho(t,e.max)<=0},gr.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Uo(t.min),Uo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Vo(t.min),max:Vo(t.max)}},gr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);return{min:Vo(i),max:Vo(t)}},gr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=e*t,e=(1-e)*t,t=Vo(Uo(this.options.min)+i),i=Vo(Uo(this.options.max)-e);return{min:t,max:i=i-t<1e3?Vo(Uo(t)+1e3):i}},gr.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:Vo(x(Uo(t.min),this.totalMin,this.totalMax)),max:Vo(x(Uo(t.max),this.totalMin,this.totalMax))}},e(t=gr,{type:J,majorGridLines:{visible:!0,width:1,color:Z},labels:{dateFormats:i}});const E_=t;function yr(t,e,i,o){var r,n,s,a,h,l=O({majorUnit:10,min:t,max:e},i),p=l.majorUnit,c=(c=L(mr(h=e,u=p),et)%1,h<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,mr(h,u)+.2):Math.pow(u,Math.ceil(mr(h,u)))),u=(h=t,s=(u=l).majorUnit,(a=h)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(mr(h,s)))),a),d=(h=u,s=c,a=i,r=(d=l).min,n=d.max,k(d.axisCrossingValue)&&d.axisCrossingValue<=0&&vr(),k(a.max)?a.max<=0&&vr():n=s,k(a.min)?a.min<=0&&vr():r=h,{min:r,max:n});l.max=d.max,l.min=d.min,l.minorUnit=i.minorUnit||L(p-1,et),pr.call(this,l,o),this.totalMin=k(i.min)?Math.min(u,i.min):u,this.totalMax=k(i.max)?Math.max(c,i.max):c,this.logMin=L(mr(d.min,p),et),this.logMax=L(mr(d.max,p),et),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function vr(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function mr(t,e){return Math.log(t)/Math.log(e)}(pr=O_)&&(yr.__proto__=pr),((yr.prototype=Object.create(pr&&pr.prototype)).constructor=yr).prototype.clone=function(){return new yr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},yr.prototype.startValue=function(){return this.options.min},yr.prototype.getSlot=function(t,e,i){var o=this.options,r=this.logMin,n=this.logMax,s=o.majorUnit,a=o.min,o=o.max,h=this.lineInfo(),l=h.axis,p=h.axisDir,c=h.lineBox,u=h.lineSize,h=h.lineStart,u=p*(u/(n-r)),n=_(t,e||1),e=_(e,t||1);if(n<=0||e<=0)return null;i&&(n=x(n,a,o),e=x(e,a,o));n=mr(n,s),e=mr(e,s),t=Math.min(n,e)-r,i=Math.max(n,e)-r,a=new R(c.x1,c.y1,c.x1,c.y1);return a[l+1]=sr(h+u*(0<p?t:i)),a[l+2]=sr(h+u*(0<p?i:t)),a},yr.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=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:L(Math.pow(e,i+s*((o-i)/r)),et)},yr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},yr.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=L(t/(s/(o-i)),et);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,i+t),max:Math.pow(e,o+t),offset:t}},yr.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},yr.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},yr.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function h(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(go(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),o.visible&&this.traverseMinorTicksPositions(h,o),[]},yr.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=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(yo(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},yr.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(L(o+r*(a-n),et),e)},yr.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this.lineInfo(),a=i.lineStart,h=i.step,l=this.logMin,p=this.logMax,c=Math.floor(l);c<p;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;o<=f&&t(L(a+h*(mr(f,s)-l),et),e)}},yr.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,o),i=this.axisLabelText(o,e,i);return new A_(o,i,t,null,e)},yr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},yr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},yr.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},yr.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=mr(this.options.min,i),r=mr(this.options.max,i),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-o),o=Math.pow(i,o+e*t),i=Math.pow(i,r-(1-e)*t);return{min:o,max:i=i-o<1e-6?o+1e-6:i}},yr.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,i=this.totalMax;return{min:x(t.min,e,i),max:x(t.max,e,i)}},yr.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,e=e.majorUnit,o=Math.pow(e,t);return{value:o,minorStep:(Math.pow(e,t+1)-o)/i}},yr.prototype.lineInfo=function(){var t=pr.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},e(i=yr,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Z},zIndex:1,_deferLabels:!0});const R_=i,V_={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),ee(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){o=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,o)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new M.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new M.drawing.Path(r);o&&(n.radius=o(t[a])),h.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(h)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,e=this.intervals(e,i,o,r),i=t.options,s=i.visible&&!1!==(i.line||{}).visible;return Kt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};function xr(){cr.apply(this,arguments)}(cr=L_)&&(xr.__proto__=cr),((xr.prototype=Object.create(cr&&cr.prototype)).constructor=xr).prototype.range=function(){return{min:0,max:this.options.categories.length}},xr.prototype.reflow=function(t){this.box=t,this.reflowLabels()},xr.prototype.lineBox=function(){return this.box},xr.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new R,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},xr.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=i||1,l=[],p=e||0;p<s;p+=h)r=n.reverse?360-p*a:p*a,r=L(r,K)%360,o&&u(r,o)||l.push(r);return l},xr.prototype.majorIntervals=function(){return this.intervals(1)},xr.prototype.minorIntervals=function(){return this.intervals(.5)},xr.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},xr.prototype.majorAngles=function(){var e=this;return Kt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},xr.prototype.createLine=function(){return[]},xr.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},xr.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,e=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,e)},xr.prototype.radiusCallback=function(e,t,i){var o,r;if(t.options.type!==U)return t=ce(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles(),function(t){return!i&&u(t,r)?e:o}},xr.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from),a=(r.startAngle+=s*n.angle,Math.ceil(o.to)-o.to),a=(r.angle-=(a+s)*n.angle,f_.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}}));e.append(a)}this.appendVisual(e)},xr.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},xr.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,i=(i.reverse&&!o&&(t=(t+1)%s),n[t=x(Math.floor(t),0,s-1)]),n=(o&&(i-=a/2)<0&&(i+=360),a*(x(Math.ceil(e||t),t,s-1)-t+1));return new u_(r.center(),0,r.height()/2,i,n)},xr.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,i=e+t.angle;return new M.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:i,radiusX:t.radius,radiusY:t.radius})},xr.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},e(t=xr,{startAngle:90,labels:{margin:w(10)},majorGridLines:{visible:!0},justified:!0}),O(t.prototype,V_);const z_=t;function _r(t,e){ur.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}(ur=O_)&&(_r.__proto__=ur),((_r.prototype=Object.create(ur&&ur.prototype)).constructor=_r).prototype.getDivisions=function(t){return B_.prototype.getDivisions.call(this,t)-1},_r.prototype.reflow=function(t){this.box=t,this.reflowLabels()},_r.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new R,n=this.intervals(t.majorUnit,o,i),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()))}},_r.prototype.lineBox=function(){return this.box},_r.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,h=e||0;h<n;h+=a){var l=(360+r+h*t)%360;o&&u(l,o)||s.push(l)}return s},_r.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},_r.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},_r.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},_r.prototype.createLine=function(){return[]},_r.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},_r.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,e=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,e)},_r.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},_r.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=x(t,i.min,i.max),e=x(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(i=t,t=e,e=i),new u_(o.center(),0,o.height()/2,t,e-t)},_r.prototype.slot=function(t,e){var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=i.reverse?(s=n,t):(s=360-t,360-n),s=(s+o)%360;return new M.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+o)%360,radiusX:r.radius,radiusY:r.radius})},_r.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,t=t.y-i.y,i=Math.round(oe(Math.atan2(t,o))),t=e.startAngle;return e.reverse||(i*=-1,t*=-1),(i+t+360)%360},_r.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e(i=_r,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:w(10)},majorGridLines:{color:Z,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),O(i.prototype,V_,{createPlotBands:z_.prototype.createPlotBands,majorAngles:z_.prototype.majorAngles,range:B_.prototype.range,labelsCount:B_.prototype.labelsCount,createAxisLabel:B_.prototype.createAxisLabel});const j_=i;function br(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var wr,t={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],h={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new u_(r,r.y-a.y2,r.y-a.y1,0,360),a=e===U?f_.current.createRing(a,h):M.drawing.Path.fromPoints(this.plotBandPoints(a,o),h).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new M.geometry.Circle(r,t.innerRadius),s=new M.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),ee(r,this.renderGridLines(t,i,o,e.minorGridLines))),r},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip,s=(void 0===n&&(n=0),o.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),h=n;h<e.length;h+=s){var l=t.y-e[h];if(0<l){var p=new M.geometry.Circle([t.x,t.y],l);if(o.type===U)a.append(new M.drawing.Circle(p,r));else{for(var c=new M.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(p.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,i,o=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==U&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,i=(oe(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return br(t,i)-br(e,i)}),r=90-br(n[0],n[1])/2,t=180-br(i,n[0])-r,a=s*(Math.sin(ce(t))/Math.sin(ce(r)))),this.axisType().prototype.getValue.call(this,new E(o.x1,o.y2-a))}},i,kr,Ar,Sr,i;function Cr(){wr.apply(this,arguments)}(wr=B_)&&(Cr.__proto__=wr),((Cr.prototype=Object.create(wr&&wr.prototype)).constructor=Cr).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Cr.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Cr.prototype.axisType=function(){return wr},O((i=Cr).prototype,t);const D_=i;function Pr(){kr.apply(this,arguments)}(kr=R_)&&(Pr.__proto__=kr),((Pr.prototype=Object.create(kr&&kr.prototype)).constructor=Pr).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Pr.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Pr.prototype.axisType=function(){return kr},O((i=Pr).prototype,t);const F_=i;function Tr(t){return t<=0?-1:1}(Ar=M.Class)&&(Mr.__proto__=Ar),((Mr.prototype=Object.create(Ar&&Ar.prototype)).constructor=Mr).prototype.process=function(t){var e=t.slice(0),i=[],o=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],h=e[2];for(i.push(new M.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),le(i).controlOut(this.firstControlPoint(t,s,a,y,v)),i.push(new M.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{o?(s=e[r-1],a=e[0],h=e[1],p=(t=this.controlPoints(s,a,h))[1],n=t[0]):(t=this.tangent(s,a,y,v),p=this.firstControlPoint(t,s,a,y,v));for(var l,p,c=p,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],h=e[u+2],l=this.controlPoints(s,a,h),le(i).controlOut(c),c=l[1],l=l[0],i.push(new M.geometry.Segment(a,l)));o?(s=e[r-2],a=e[r-1],h=e[0],t=this.controlPoints(s,a,h),le(i).controlOut(c),i.push(new M.geometry.Segment(a,t[0])),le(i).controlOut(t[1]),i.push(new M.geometry.Segment(h,n))):(p=this.tangent(a,h,y,v),le(i).controlOut(c),i.push(new M.geometry.Segment(h,this.secondControlPoint(p,a,h,y,v))))}}return i},Mr.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)},Mr.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},Mr.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||L(o,1)===L(i.y,1)},Mr.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Mr.prototype.controlPoints=function(t,e,i){var o,r=y,n=v,s=!1,a=!1,h=(this.isLine(t,e,i)?o=this.tangent(t,e,y,v):(h={x:this.isMonotonicByField(t,e,i,y),y:this.isMonotonicByField(t,e,i,v)}).x&&h.y?(o=this.tangent(t,i,y,v),s=!0):(this.invertAxis(t,e,i)&&(r=v,n=y),h[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Tr((i[n]-t[n])*(e[r]-t[r])):-Tr((i[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(o,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(o,e,i,r,n));return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,a,o)),[h,a]},Mr.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},Mr.prototype.tangent=function(t,e,i,o){i=e[i]-t[i],e=e[o]-t[o];return 0==i?0:e/i},Mr.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},Mr.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},Mr.prototype.secondControlPoint=function(t,e,i,o,r){var e=e[o],n=i[o],e=.333*(n-e);return this.point(n-e,i[r]-e*t,o,r)},Mr.prototype.point=function(t,e,i,o){var r=new M.geometry.Point;return r[i]=t,r[o]=e,r},Mr.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};const H_=Mr;function Mr(t){Ar.call(this),this.closed=t}function Or(t){Sr.call(this),this._axis=t,this.options=t.options}(Sr=M.Class)&&(Or.__proto__=Sr),((Or.prototype=Object.create(Sr&&Sr.prototype)).constructor=Or).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Or.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},Or.prototype.range=function(){return this._axis.range()},Or.prototype.valueRange=function(){return this._axis.valueRange()};const N_=Or;function Lr(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new N_(e[i])}function Ir(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Ir.prototype.findAxisByName=function(t){return Lr(t,this._pane.axes)};const U_=Ir,G_=((F=M.Class)&&(Br.__proto__=F),(Br.prototype=Object.create(F&&F.prototype)).constructor=Br);function Br(t){F.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Er(t){for(var e=t.length,i=0,o=0;o<e;o++)m(t[o])&&i++;return i}var Rr={min:function(t){for(var e=t.length,i=at,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.min(i,r))}return i===at?t[0]:i},max:function(t){for(var e=t.length,i=ht,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.max(i,r))}return i===ht?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];m(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return e=Er(t)?Rr.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&k(r)&&i++}return i},avg:function(t){var e=Er(t),i=t[0];return i=0<e?Rr.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&k(o))return o}return t[0]}},Vr,t;const W_=Rr;function zr(t,e){return null===e?e:Ut(t)(e)}function jr(){Vr.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}(Vr=M.Class)&&(jr.__proto__=Vr),((jr.prototype=Object.create(Vr&&Vr.prototype)).constructor=jr).prototype.register=function(t,e,i){void 0===e&&(e=[gt]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},jr.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},jr.prototype.valueFields=function(t){return this._valueFields[t.type]||[gt]},jr.prototype.otherFields=function(t){return this._otherFields[t.type]||[gt]},jr.prototype.bindPoint=function(t,e,i){var o,r,n,s,a=t.data,i=k(i)?i:a[e],a={valueFields:{value:i}},e=this.valueFields(t),h=this._otherFields[t.type];return null===i?o=this._nullValue[t.type]:k(i)?Array.isArray(i)?(r=i.slice(e.length),o=this._bindFromArray(i,e),r=this._bindFromArray(r,h)):"object"==typeof i&&(n=this.sourceFields(t,e),s=this.sourceFields(t,h),o=this._bindFromObject(i,e,n),r=this._bindFromObject(i,h,s)):o=this._undefinedValue[t.type],k(o)&&(1===e.length?a.valueFields.value=o[e[0]]:a.valueFields=o),a.fields=r||{},a},jr.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},jr.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},jr.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=zr(a,t))}return o},jr.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===gt?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},(t=jr).current=new t;const X_=t;var Dr,Fr=/percent(?:\w*)\((\d+)\)/,Hr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");function Nr(t,e,i){Dr.call(this),this.initGlobalRanges(t,e,i)}(Dr=M.Class)&&(Nr.__proto__=Dr),((Nr.prototype=Object.create(Dr&&Dr.prototype)).constructor=Nr).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,h=Hr.exec(t);h?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),h=h[1]?parseFloat(h[1]):1,n={low:o.value-r*h,high:o.value+r*h},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Nr.prototype.createValueGetter=function(t,e){var i,o=t.data,r=X_.current,n=r.valueFields(t),o=k(o[0])?o[0]:{};return xt(o)?i=Ut("["+(e?n.indexOf(e):0)+"]"):m(o)?i=Ut():typeof o==pt&&(i=Ut(r.sourceFields(t,n)[n.indexOf(e)])),i},Nr.prototype.getErrorRange=function(t,e){var i;if(!k(e))return null;if(this.globalRange)return this.globalRange(t);if(xt(e))o=t-e[0],r=t+e[1];else if(m(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Fr.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(i[1])/100),o=t-Math.abs(e),r=t+Math.abs(e)}return{low:o,high:r}},Nr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Nr.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},Nr.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(i+=n,o++)}return{value:i/o,count:o}};const Y_=Nr;var Ur,Gr,i=M.support.browser||{},Wr=600,Xr="fadeIn",Yr=i.msie?.001:0,qr="errorLow",Zr="errorHigh",Qr="zero",Kr="interpolate",$r="above",Jr="below",tn="smooth",en="step",on="area",rn="bar",nn="boxPlot",sn="bubble",an="bullet",hn="candlestick",ln="column",pn="donut",cn="funnel",un="pyramid",dn="heatmap",fn="horizontalWaterfall",gn="line",yn="ohlc",vn="pie",mn="polarArea",xn="polarLine",_n="polarScatter",bn="radarArea",wn="radarColumn",kn="radarLine",An="rangeArea",Sn="rangeBar",Cn="rangeColumn",Pn="scatter",Tn="scatterLine",Mn="verticalArea",On="verticalBoxPlot",Ln="verticalBullet",In="verticalLine",Bn="verticalRangeArea",En="waterfall",Rn=[rn,ln,yn,hn,nn,On,an,Cn,Sn,En,fn],t,i,s,Vn,zn,jn,Dn=[t="exponentialTrendline",i="linearTrendline",s="logarithmicTrendline",Vn="movingAverageTrendline",zn="polynomialTrendline",jn="powerTrendline"],Fn="legendItemClick",Hn="seriesClick",Nn="seriesHover",Un="seriesOver",Gn="seriesLeave",Wn="plotAreaHover",Xn="plotAreaLeave",Yn="drag",qn="dragEnd",Zn="dragStart",Qn="zoomStart",Kn="zoom",$n="zoomEnd",Jn="selectStart",ts="select",es="selectEnd",is="showTooltip",os="hideTooltip",t="graphics-symbol",i="k-chart-point",s="Point",rs="log",Vn="category",ns="insideEnd",ss="outsideEnd",as="wheel",zn="drilldown",jn="pattern",h;function hs(t,e,i,o,r,n){Ur.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}(Ur=g_)&&(hs.__proto__=Ur),((hs.prototype=Object.create(Ur&&Ur.prototype)).constructor=hs).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,o),s=o?n.x:n.y,a=s-t,s=s+t;o?(e=[new E(n.x,r.y1),new E(n.x,r.y2)],i&&e.push(new E(a,r.y1),new E(s,r.y1),new E(a,r.y2),new E(s,r.y2)),this.box=new R(a,r.y1,s,r.y2)):(e=[new E(r.x1,n.y),new E(r.x2,n.y)],i&&e.push(new E(r.x1,a),new E(r.x1,s),new E(r.x2,a),new E(r.x2,s)),this.box=new R(r.x1,a,r.x2,s)),this.linePoints=e},hs.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},hs.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({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()},hs.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Ur.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new M.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);kt(r),this.visual.append(r)}},e(h=hs,{animation:{type:Xr,delay:Wr},endCaps:!0,line:{width:2},zIndex:1});const q_=h;function ls(){Gr.apply(this,arguments)}(Gr=q_)&&(ls.__proto__=Gr),((ls.prototype=Object.create(Gr&&Gr.prototype)).constructor=ls).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const Z_=ls;function ps(t){for(var e=0;e<t.length;e++)if(k(t[e].zIndex))return!0}function cs(t,e){null!==e&&t.push(e)}function us(t){return Er(t)===t.length}function ds(t,e,i){var e=e.visible;return k(e)?e:(e=t.pointVisibility)?e[i]:void 0}function fs(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=X_.current.bindPoint(t,n),a=s.valueFields.value;m(a=St(a)?parseFloat(a):a)?(s.visible=!1!==ds(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function gs(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function ys(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var vs=5;function ms(t,e,i,o){void 0===o&&(o=!1);var r,n,s=(i=void 0===i?{}:i).defaults=i.defaults||{},a=i.depth=i.depth||0,h=!1;if(i.excluded=i.excluded||[],vs<a)return null;for(r in t)!u(r,i.excluded)&&Ee(t,r)&&(Ot(n=t[r])?(h=!0,o||(t[r]=_(n(e),s[r]))):Bt(n)&&(o||(i.defaults=s[r]),i.depth++,h=ms(n,e,i,o)||h,i.depth--));return h}function xs(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,o)&&i.push(n)}return i}var _s=new WeakMap;function bs(t,e,i){var o;return null===e||"object"!=typeof e?qo(i,t):((o=_s.get(e))||(o=qo(i,t),_s.set(e,o)),o)}function ws(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function ks(t){return k(t)&&null!==t}function As(t,e){t=t.type,e=e instanceof Date;return!t&&e||ys(t,J)}function Ss(t){return 1===t.length?t[0]:t}var Cs=/area/i,Ps,h,Ts,h,Ms,h;function Os(t,e){var i,o=X_.current.bindPoint(t,null,e).valueFields;for(i in o)if(Ct(o[i]))return!0}function Ls(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,l=t.series,p=o;h(p+=r)&&(e=Os(l,(i=a(p)).item)),n<=p&&p<=s&&!e;);if(e)return i}function Is(t,e,i,o,r){var n,s,a,h,l=e.min,e=e.max,p=0<l&&l<i,c=e+1<i;(p||c)&&(((h=t).missingValues||(Cs.test(h.type)||h.stack?Qr:Kr))!==Kr?(p&&(n=o(l-1)),c&&(s=o(e+1))):(p&&(n=Os(t,(a=o(l-1)).item)?a:Ls({start:l,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Os(t,(a=o(e+1)).item)?a:Ls({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function Bs(t,e){Ps.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()}(Ps=g_)&&(Bs.__proto__=Ps),((Bs.prototype=Object.create(Ps&&Ps.prototype)).constructor=Bs).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Bs.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{vertical:!this.options.invertAxes},t)),o},Bs.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,h=i[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||m(h.value)&&(r+=Math.abs(h.value),o.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},Bs.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=k(t.series.stack)?t.series.stack:this.options.defaultStack,h=function(t){return!0===t||typeof t==pt&&!t.group};if(a)for(var l=0;l<i.length;l++){var p=i[l];if(t===p)break;var c=k(p.series.stack)?p.series.stack:this.options.defaultStack;!c||typeof a===ft&&a!==c||h(a)&&!h(c)||a.group&&a.group!==c.group||!(0<=(c=this.plotValue(p))&&r||c<0&&!r)||0!==e&&0===c||(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=t.series,u=this.seriesValueAxis(u),u=this.categoryAxisCrossingValue(u);return[u,Ct(t.value)?t.value:u]},Bs.prototype.stackLimits=function(t,e){for(var i=at,o=ht,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],k(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},Bs.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,h=o[a];h||(h=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(h.min=Math.min(h.min,we(n.negative).min)),n.positive.length)&&(h.max=Math.max(h.max,we(n.positive).max)),h.min!==at||h.max!==ht?o[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},Bs.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,h=e.fields[qr],e=e.fields[Zr];m(h)&&m(e)?o={low:h,high:e}:a&&k(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Y_(a.value,n,gt),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},Bs.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(this.updateRange({value:s},i={categoryIx:e,series:n}),this.updateRange({value:a},i)),new Z_(s,a,o,this,n,r));t.errorBars=[e],t.append(e)},Bs.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,t=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:o,high:t}},Bs.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i],s=(n||(this.categoryPoints[i]=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,k(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},Bs.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,i=i.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},a=this._evalSeries[i],i=(k(a)||(this._evalSeries[i]=a=ms(t,{},s,!0)),t);return a&&ms(i=O({},i),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},s),i},Bs.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,i=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((i=this.valueAxisRanges[e]=i||{min:at,max:ht}).min=Math.min(i.min,t),i.max=Math.max(i.max,t))},Bs.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)},Bs.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],h=this.points,l=this.categoryAxis,p=0;this.traverseDataPoints(function(t,e){var i,o=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=h[p++],n=a[o];n||(a[o]=n=s.categorySlot(l,o,e)),r&&(o=s.plotRange(r,e.startValue()),(i=s.valueSlot(e,o))?(n=s.pointSlot(n,i),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=o[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},Bs.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Bs.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(le(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},Bs.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Bs.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},Bs.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Bs.prototype.reflowPoint=function(t,e){t.reflow(e)},Bs.prototype.reflowCategories=function(){},Bs.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new R(o.x1,i.y1,o.x2,i.y2)},Bs.prototype.categorySlot=function(t,e){return t.getSlot(e)},Bs.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=gs(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],h=this.categoryAxis.categoryAt(n);t(this.plotArea.bindPoint(a,n),{category:h,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var l=0;l<o;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},Bs.prototype._outOfRangeCallback=function(t,e,i,o){var r,e=t[e];e&&(r=e.categoryIx,o(this.plotArea.bindPoint(t,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:i,dataItem:e.item}))},Bs.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Bs.prototype.pointValue=function(t){return t.valueFields.value},e(h=Bs,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const Q_=h,K_={click:function(t,e){return t.trigger(Hn,this.eventArgs(e))},hover:function(t,e){return t.trigger(Nn,this.eventArgs(e))},over:function(t,e){return t.trigger(Un,this.eventArgs(e))},out:function(t,e){return t.trigger(Gn,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:ae(t),originalEvent:t,point:this}}},$_={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&k(e)&&null!==e&&(this.note=new S_({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 Es(t,e){Ts.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=De()}(Ts=g_)&&(Es.__proto__=Ts),((Es.prototype=Object.create(Ts&&Ts.prototype)).constructor=Es).prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Es.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Es.prototype.createLabelElement=function(t){return new w_(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t),this.pointData())},Es.prototype.getLabelText=function(t){var e=Dt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Es.prototype.getAriaLabelText=function(){var t=this.options.labels,e=Ft(t);return e?e(this.pointData()):this.getLabelText(t)},Es.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=O({color:this.color},t.border);return k(t.color)||(t.color=new M.Color(e).brightness(.8).toHex()),t},Es.prototype.createVisual=function(){},Es.prototype.createMarker=function(){var t=this.options.markers;return new v_({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:_(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:O({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Es.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Es.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical,r=(this.render(),(this.box=t).clone());if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(o=t.center(),t=new R(o.x,o.y,o.x,o.y)),this.note.reflow(t))},Es.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===$r?T:e)===Jr?S:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},Es.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),o=new v_({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:_(t.border.opacity,1)},opacity:_(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},Es.prototype.highlightVisual=function(){return(this.marker||{}).visual},Es.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,i=this.box.center(),o=new M.geometry.Rect([i.x-e,i.y-e],[r,r])),{options:this.options,rect:o,visual:t}},Es.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=t.size+(t.border.width||0),i=new v_({type:t.type,width:i,height:i,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this._childBox),i.getElement()},Es.prototype.tooltipAnchor=function(){var t,e,i=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(i))return o=i.x2+5,e=C,i=this.aboveAxis?(t=i.y1,S):(t=i.y2,T),{point:new E(o,t),align:{horizontal:e,vertical:i}}},Es.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Es.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Es.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Es.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Es.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},Es.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},Es.prototype.getIndex=function(){return k(this.categoryIx)?this.categoryIx:this.pointIx},(h=Es).prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:Q,border:{width:2},opacity:1},labels:{visible:!1,position:$r,margin:w(3),padding:w(4),animation:{type:Xr,delay:Wr}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:t,className:i,ariaRoleDescription:s}},O(h.prototype,K_),O(h.prototype,$_);const J_=h;function Rs(t,e,i){Ms.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}(Ms=g_)&&(Rs.__proto__=Ms),((Rs.prototype=Object.create(Ms&&Ms.prototype)).constructor=Rs).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Rs.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},Rs.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&&!k(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Rs.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Ot(i)&&o&&(i=o.color),M.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&o.close(),this.visual=o},Rs.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e(h=Rs,{closed:!1});const tb=h;function Vs(t,e,i,o,r){var t=t.box,n=new M.geometry.Point;return n[e]=t[e+i],n[o]=t[o+r],n}var zs,js,h={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?y:v,n=o?v:y,s=e?2:1,a=s,h=Vs(t[0],r,s,n,a),l=[h],p=1;p<t.length;p++){var c,u=Vs(t[p],r,s,n,a);h[r]!==u[r]&&((c=new M.geometry.Point)[r]=h[r],c[n]=u[n],l.push(c,u)),h=u}return i?h!==le(l)&&l.push(h):l.push(Vs(le(t),r,s,n,e?1:2)),l}},l;function Ds(){zs.apply(this,arguments)}(zs=tb)&&(Ds.__proto__=zs),((Ds.prototype=Object.create(zs&&zs.prototype)).constructor=Ds).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},O((l=Ds).prototype,h);const eb=l;function Fs(){js.apply(this,arguments)}(js=tb)&&(Fs.__proto__=js),((Fs.prototype=Object.create(js&&js.prototype)).constructor=Fs).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Ot(i)&&e&&(i=e.color),new H_(this.options.closed).process(this.points())),i=new M.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,e),this.visual=i};const ib=Fs;var Hs,l={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),h=a.length,l=[],p=0;p<h;p++){var c=a[p];c?l.push(c):this.seriesMissingValues(s)!==Kr&&(1<l.length&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}1<l.length&&(t=this.createSegment(l,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?Qr:t||Kr},getNearestPoint:function(t,e,i){for(var o,r=new E(t,e),n=this.seriesPoints[i],s=at,a=0;a<n.length;a++){var h,l=n[a];l&&k(l.value)&&null!==l.value&&!1!==l.visible&&(h=l.box.center().distanceTo(r))<s&&(o=l,s=h)}return o}},p,Ns,Us,p,Gs,Ws,Xs,Ys,p,qs,p,Zs,p,Qs,p,Ks,p,$s,p,Js,p,ta,p,ea,ia,oa,ra,p,na,p,sa,p,aa,p,ha,p,la,p,pa,p,ca,p,ua,c,da,c,fa,c;function ga(){Hs.apply(this,arguments)}(Hs=M.drawing.Animation)&&(ga.__proto__=Hs),((ga.prototype=Object.create(Hs&&Hs.prototype)).constructor=ga).prototype.setup=function(){this._setEnd(this.options.box.x1)},ga.prototype.step=function(t){var e=this.options.box;this._setEnd(Yt(e.x1,e.x2,t))},ga.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},e(p=ga,{duration:Wr}),M.drawing.AnimationFactory.current.register("clip",p);const ob=p,rb={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=M.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new ob(t,{box:e}),ps(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&k(o.visual.options.zIndex)&&o.visual.clip(t)}}};function ya(){Ns.apply(this,arguments)}(Ns=Q_)&&(ya.__proto__=Ns),((ya.prototype=Object.create(Ns&&Ns.prototype)).constructor=ya).prototype.render=function(){Ns.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},ya.prototype.pointType=function(){return J_},ya.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(!k(n)||null===n){if(r!==Qr)return null;n=0}r=this.pointOptions(i,o),r=this.evalPointOptions(r,n,e),o=t.fields.color||i.color,Ot(i.color)&&(o=r.color),e=new J_(n,r);return e.color=o,this.append(e),e},ya.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},ya.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===en?eb:o===tn?ib:tb)(t,e,i)},ya.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},ya.prototype.supportsPointInactiveOpacity=function(){return!1},O((p=ya).prototype,l,rb);const nb=p;function va(t,e,i,o,r){Us.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}(Us=tb)&&(va.__proto__=Us),((va.prototype=Object.create(Us&&Us.prototype)).constructor=va).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Ot(o)&&e&&(o=e.color),this.visual=new M.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Hi(t.pattern,{color:o,opacity:t.opacity}),stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:O({color:o,opacity:t.opacity,lineCap:"butt"},i)})},va.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},va.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},va.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},va.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},va.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new M.geometry.Segment(t)})},va.prototype.createStroke=function(t){t=new M.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},va.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},va.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment(),r=(o&&(r=this.stackSegments(),ee(i,r)),new M.drawing.Path(t));r.segments.push.apply(r.segments,i),!o&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},va.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(o),o=o.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=le(e).anchor(),o=i?o.x1:o.y1;i?t.lineTo(o,e.y).lineTo(o,r.y):t.lineTo(e.x,o).lineTo(r.x,o)};const sb=va;function ma(){Gs.apply(this,arguments)}(Gs=sb)&&(ma.__proto__=Gs),((ma.prototype=Object.create(Gs&&Gs.prototype)).constructor=ma).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},ma.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},O((p=ma).prototype,h);const ab=p;function xa(){Ws.apply(this,arguments)}(Ws=sb)&&(xa.__proto__=Ws),((xa.prototype=Object.create(Ws&&Ws.prototype)).constructor=xa).prototype.createStrokeSegments=function(){var t=new H_(this.options.closed),e=this.points();return t.process(e)},xa.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new M.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e};const hb=xa;function _a(){Xs.apply(this,arguments)}(Xs=nb)&&(_a.__proto__=Xs),((_a.prototype=Object.create(Xs&&Xs.prototype)).constructor=_a).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===en?ab:a===tn?hb:sb)(t,e,i,r,n)},_a.prototype.reflow=function(t){Xs.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},_a.prototype._gapStackPoints=function(t,e,i){var o=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 h=r;h<n;h++){for(var l,p=h+s,c=e,u=void 0;u=o[--c][p],0<c&&!u;);u?(i!==en&&r<h&&!o[c][p-1]&&a.push(this._previousSegmentPoint(h,p,p-1,c)),a.push(u),i!==en&&h+1<n&&!o[c][p+1]&&a.push(this._previousSegmentPoint(h,p,p+1,c))):(l=this._createGapStackPoint(h),this._stackPoints.push(l),a.push(l))}return a},_a.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},_a.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new J_(0,e);return e.categoryIx=t,e.series={},e},_a.prototype.seriesMissingValues=function(t){return t.missingValues||Qr},_a.prototype.supportsPointInactiveOpacity=function(){return!1};const lb=_a;function ba(){Ys.call(this),this.axisRanges={}}(Ys=M.Class)&&(ba.__proto__=Ys),((ba.prototype=Object.create(Ys&&Ys.prototype)).constructor=ba).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:at,max:ht},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},ba.prototype.reset=function(t){this.axisRanges[t]=void 0},ba.prototype.query=function(t){return this.axisRanges[t]};const pb=ba;function wa(t,e,i){qs.call(this,e),this.textBox=new w_(t,this.options,i),this.append(this.textBox)}(qs=g_)&&(wa.__proto__=qs),((wa.prototype=Object.create(qs&&qs.prototype)).constructor=wa).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},wa.prototype.reflow=function(t){var e,i=this.options,o=i.vertical,r=i.aboveAxis,n=this.children[0],s=n.options,a=n.box,h=n.options.padding,l=t;s.align=o?b:C,s.vAlign=o?T:b,i.position===ns?o?(s.vAlign=T,!r&&a.height()<t.height()&&(s.vAlign=S)):s.align=r?P:C:i.position===b?(s.vAlign=b,s.align=b):"insideBase"===i.position?o?s.vAlign=r?S:T:s.align=r?C:P:i.position===ss&&(l=o?r?(e=(a.width()-t.width()-h.left-h.right)/2,new R(t.x1-e,t.y1-a.height(),t.x2+e,t.y1)):new R(t.x1,t.y2,t.x2,t.y2+a.height()):(s.align=b,r?new R(t.x2,t.y1,t.x2+a.width(),t.y2):new R(t.x1-a.width(),t.y1,t.x1,t.y2))),i.rotation||(o?h.left=h.right=(l.width()-n.contentBox.width())/2:h.top=h.bottom=(l.height()-n.contentBox.height())/2),n.reflow(l)},wa.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,i=e+"1",e=e+"2",o=this.children[0],r=this.parent.box;(r[i]<t[i]||t[e]<r[e])&&((o=o.paddingBox.clone())[i]=Math.max(r[i],t[i]),o[e]=Math.min(r[e],t[e]),this.reflow(o))},e(p=wa,{position:ss,margin:w(3),padding:w(4),color:Z,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:Xr,delay:Wr},zIndex:2});const cb=p,ub={addAccessibilityAttributesToVisual:function(){this._id=this._id||De();var t=O({ariaLabel:this.getAriaLabelText()},this.options.accessibility);Ui(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=Ft(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}};function ka(t,e){Zs.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=_(this.options.aboveAxis,!0),this.value=t}(Zs=g_)&&(ka.__proto__=Zs),((ka.prototype=Object.create(Zs&&Zs.prototype)).constructor=ka).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},ka.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},ka.prototype.createLabelElement=function(t){return new cb(this.getLabelText(t),O({vertical:this.options.vertical},t),this.pointData())},ka.prototype.getLabelText=function(t){var e=Dt(t);return e?e(this.pointData()):this.formatValue(t.format)},ka.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ka.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},ka.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(Zs.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),o?(o=this.rectVisual=o({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 M.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},ka.prototype.createRect=function(t){var e=this.options,i=e.border,o=(k(i.opacity)?i:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=M.drawing.Path.fromRect(r,{fill:Hi(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}})),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(kt(r),o<1||i<1)&&(r.options.stroke.lineJoin="round"),t.append(r),ws(e)&&(o=this.createGradientOverlay(r,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(o))},ka.prototype.createHighlight=function(t){return kt(M.drawing.Path.fromRect(this.box.toRect(),t))},ka.prototype.highlightVisual=function(){return this.rectVisual},ka.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},ka.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return kt(M.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},ka.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return e=k(e)?e:new M.Color(t).brightness(i).toHex()},ka.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=C,l=T;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),l=S)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(l=S,t=s?(h=P,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,h=P),Math.max(n.y1,a.y1))),{point:new E(t,o),align:{horizontal:h,vertical:l}}},ka.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ka.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}},ka.prototype.getIndex=function(){return this.categoryIx},O((p=ka).prototype,K_),O(p.prototype,$_),O(p.prototype,ub),p.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}};const db=p;function Aa(t,e){t.forEach(e)}function Sa(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}function Ca(t){Qs.call(this,t),this.forEach=t.rtl?Sa:Aa}(Qs=g_)&&(Ca.__proto__=Qs),((Ca.prototype=Object.create(Qs&&Qs.prototype)).constructor=Ca).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+i+r*(n-1),h=(e?o.height():o.width())/a,l=o[s+1]+i/2*h;this.forEach(t,function(t,e){var i=(t.box||o).clone();i[s+1]=l,i[s+2]=l+h,t.reflow(i),e<n-1&&(l+=h*r),l+=h})},e(p=Ca,{vertical:!1,gap:0,spacing:0});const fb=p;function Pa(){Ks.apply(this,arguments)}(Ks=g_)&&(Pa.__proto__=Ks),((Pa.prototype=Object.create(Ks&&Ks.prototype)).constructor=Pa).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new R,n=0;n<o;n++){var s,a=i[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(p=Pa,{vertical:!0});const gb=p;function Ta(){$s.apply(this,arguments)}($s=Q_)&&(Ta.__proto__=$s),((Ta.prototype=Object.create($s&&$s.prototype)).constructor=Ta).prototype.render=function(){$s.prototype.render.call(this),this.updateStackRange()},Ta.prototype.pointType=function(){return db},Ta.prototype.clusterType=function(){return fb},Ta.prototype.stackType=function(){return gb},Ta.prototype.stackLimits=function(t,e){return $s.prototype.stackLimits.call(this,t,e)},Ta.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=k(o.stack)?o.stack:n.defaultStack,h=this.pointValue(t),r=this.pointOptions(o,r),l=r.labels,l=(a&&l.position===ss&&(l.position=ns),r.isStacked=a,t.fields.color||o.color),t=(h<0&&r.negativeColor&&(l=r.negativeColor),r=this.evalPointOptions(r,h,e),Ot(o.color)&&(l=r.color),new(this.pointType())(h,r)),e=(t.color=l,s[i]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(n.isStacked?this.getStackWrap(a,e):e).append(t),t},Ta.prototype.getStackWrap=function(t,e){var i,o=typeof t==pt?t.group||!0:t,r=e.children;if(typeof o===ft||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},Ta.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(i=i.getSlot(e,e,!0),t[(e=o.invertAxes?y:v)+1]=t[e+2]=i[e+1]),t},Ta.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Ta.prototype.createAnimation=function(){this._setAnimationOptions(),$s.prototype.createAnimation.call(this),ps(this.options.series)&&this._setChildrenAnimation()},Ta.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&k(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},Ta.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new M.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e(p=Ta,{animation:{type:rn}});const yb=p;function Ma(t,e){Js.call(this,e),this.value=t}(Js=g_)&&(Ma.__proto__=Js),((Ma.prototype=Object.create(Js&&Js.prototype)).constructor=Ma).prototype.getLabelText=function(t){return this.formatValue(t.format)},Ma.prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=e.getSlot(i.open,i.close),e=e.getSlot(i.low,i.high),i=(o.x1=e.x1=t.x1,o.x2=e.x2=t.x2,this.realBody=o,e.center().x),t=[];t.push([[i,e.y1],[i,o.y1]]),t.push([[i,o.y2],[i,e.y2]]),this.lines=t,this.box=e.clone().wrap(o),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},Ma.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Ma.prototype.createVisual=function(){Js.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Ma.prototype.mainVisual=function(t){var e=new M.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Ma.prototype.createBody=function(t,e){var i=M.drawing.Path.fromRect(this.realBody.toRect(),{fill:Hi(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:_(e.border.opacity,e.opacity)}),kt(i),t.append(i),ws(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)))},Ma.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Ma.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:_(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=M.drawing.Path.fromPoints(i[n],r);kt(s),t.append(s)}},Ma.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=k(e)?e:new M.Color(this.color).brightness(t._brightness).toHex()},Ma.prototype.createOverlay=function(){var t=M.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Ma.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(O({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},Ma.prototype.highlightVisual=function(){return this._mainVisual},Ma.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Ma.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new E(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:T}}},Ma.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ma.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Ma.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},Ma.prototype.getIndex=function(){return this.categoryIx},(p=Ma).prototype.createFocusHighlight=db.prototype.createFocusHighlight,e(p,{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>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(p.prototype,K_),O(p.prototype,$_),O(p.prototype,ub);const vb=p;function Oa(){ta.apply(this,arguments)}(ta=Q_)&&(Oa.__proto__=ta),((Oa.prototype=Object.create(ta&&ta.prototype)).constructor=Oa).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Oa.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,l=t.valueFields,p=us(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new fb({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(l,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},Oa.prototype.pointType=function(){return vb},Oa.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=O({},i),s=t.fields.color||i.color,n=this.evalPointOptions(n,r,e),e=(i.type!==hn&&i.type!==yn||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),Ot(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},Oa.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Oa.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),i=this.valueAxisRanges[e]||{min:at,max:ht};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([i.min])),max:Math.max.apply(Math,t.concat([i.max]))}},Oa.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},Oa.prototype.animationPoints=function(){return this.points},O((p=Oa).prototype,rb);const mb=p;function La(t,e){ea.call(this,t,e),this.createNote()}(ea=vb)&&(La.__proto__=ea),((La.prototype=Object.create(ea&&ea.prototype)).constructor=La).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,o=this.owner.seriesValueAxis(o),n=(this.boxSlot=i=o.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=o.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),o.getSlot(r.median));r.mean&&(o=o.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,o)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},La.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},La.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},La.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},La.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},La.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},La.prototype.renderOutliers=function(t){for(var e,i=this.value,o=i.outliers||[],r=3*Math.abs(i.q3-i.q1),n=[],s=(t.markers,0);s<o.length;s++){var a=o[s],h=O({},(e=a<i.q3+r&&a>i.q1-r?t.outliers:t.extremes).border),h=(k(h.color)||(k(this.color)?h.color=this.color:h.color=new M.Color(e.background).brightness(.8).toHex()),new v_({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:h,opacity:e.opacity}));h.value=a,n.push(h)}return this.reflowOutliers(n),n},La.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},La.prototype.mainVisual=function(t){for(var e=ea.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},La.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)},La.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||ea.prototype.getBorderColor.call(this)},e(p=La,{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:$,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:Q,background:a,border:{width:2,opacity:1},opacity:0}}),O(p.prototype,K_);const xb=p;function Ia(){ia.apply(this,arguments)}(ia=xb)&&(Ia.__proto__=ia),((Ia.prototype=Object.create(ia&&ia.prototype)).constructor=Ia).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Ia.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Ia.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ia.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},Ia.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const _b=Ia;function Ba(){oa.apply(this,arguments)}(oa=mb)&&(Ba.__proto__=oa),((Ba.prototype=Object.create(oa&&oa.prototype)).constructor=Ba).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,l=t.valueFields,p=us(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new fb({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(l,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Ba.prototype.pointType=function(){return this.options.invertAxes?_b:xb},Ba.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Ba.prototype.updateRange=function(t,e){var e=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers)),t=(k(t.mean)&&(i=i.concat(t.mean)),this.valueAxisRanges[e]||{min:at,max:ht});this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([t.min])),max:Math.max.apply(Math,i.concat([t.max]))}},Ba.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Ba.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];k(r)&&null!==r&&i.push(r)}return i},Ba.prototype.supportsPointInactiveOpacity=function(){return!1};const bb=Ba;function Ea(){ra.apply(this,arguments)}(ra=q_)&&(Ea.__proto__=ra),((Ea.prototype=Object.create(ra&&ra.prototype)).constructor=Ea).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const wb=Ea;function Ra(t,e){na.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(na=g_)&&(Ra.__proto__=na),((Ra.prototype=Object.create(na&&na.prototype)).constructor=Ra).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Ra.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Ra.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=i.seriesIx,a=i.series,h=t.options.errorBars,l=i[e+"ErrorLow"],i=i[e+"ErrorHigh"];m(r)&&(m(l)&&m(i)&&(o={low:l,high:i}),h&&k(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Y_(h[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),o)&&this.addPointErrorBar(o,t,e)},Ra.prototype.addPointErrorBar=function(t,e,i){var o=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=i===v,a={},s=(e[i+"Low"]=o,e[i+"High"]=t,e.errorBars=e.errorBars||[],new wb(o,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[i]=o,this.updateRange(a,r),a[i]=t,this.updateRange(a,r)},Ra.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=ks(o)&&ks(r)?t:this.createMissingValue(t,s))&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,y,e),this.addErrorBar(i,v,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Ra.prototype.seriesMissingValues=function(t){return t.missingValues},Ra.prototype.createMissingValue=function(){},Ra.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[o],s=this.yAxisRanges[e];ks(r)&&(n=this.xAxisRanges[o]=n||{min:at,max:ht},St(r)&&(r=qo(i,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),ks(t)&&(s=this.yAxisRanges[e]=s||{min:at,max:ht},St(t)&&(t=qo(i,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Ra.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(k(s)||(this._evalSeries[r]=s=ms(t,{},n,!0)),t);return s&&ms(r=O({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Ra.prototype.pointType=function(){return J_},Ra.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Ra.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e),e=(Ot(i.color)&&(r=o.color),new J_(t,o));return e.color=r,this.append(e),e},Ra.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{x:o,y:i};throw new Error("Unable to locate Y axis with name "+t)},Ra.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],e=r.seriesAxes(e.series),o=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);i&&(o&&e?(t=r.pointSlot(o,e),i.reflow(t)):i.visible=!1)}),this.box=t},Ra.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},Ra.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n),a=s.valueFields,s=s.fields;t(a,O({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s))}}},Ra.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Ra.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e(p=Ra,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),O(p.prototype,rb);const kb=p;function Va(t,e){sa.call(this,t,e),this.category=t.category}(sa=J_)&&(Va.__proto__=sa),((Va.prototype=Object.create(sa&&sa.prototype)).constructor=Va).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new M.drawing.Group,s=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),o=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new M.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:Hi(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,o),n},Va.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,i=this.options.markers,o=this.box.center(),i=(i.size+i.border.width)/2+e.border.width/2;return new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],i),t)},(p=Va).prototype.defaults=O({},p.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),p.prototype.defaults.highlight.zIndex=void 0;const Ab=p;function za(){aa.apply(this,arguments)}(aa=kb)&&(za.__proto__=aa),((za.prototype=Object.create(aa&&aa.prototype)).constructor=za).prototype._initFields=function(){this._maxSize=ht,aa.prototype._initFields.call(this)},za.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)),aa.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},za.prototype.reflow=function(t){this.updateBubblesSize(t),aa.prototype.reflow.call(this,t)},za.prototype.pointType=function(){return Ab},za.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,o=e.pointIx*(Wr/o),r={delay:o,duration:Wr-o,type:sn},n=e.color||i.color,o=(t.size<0&&i.negativeValues.visible&&(n=_(i.negativeValues.color,n)),O({labels:{animation:{delay:o,duration:Wr-o}}},this.pointOptions(i,e.seriesIx),{markers:{type:Q,border:i.border,opacity:i.opacity,animation:r}})),o=this.evalPointOptions(o,t,e),r=(Ot(i.color)&&(n=o.color),o.markers.background=n,new Ab(t,o));return r.color=n,this.append(r),r},za.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,h=Math.PI*s*s,l=(Math.PI*a*a-h)/this._maxSize,p=0;p<n.length;p++){var c,u,d=n[p];d&&(c=Math.abs(d.value.size)*l,c=Math.sqrt((h+c)/Math.PI),u=_(d.options.zIndex,0)+(1-c/a),O(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},za.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},za.prototype.createAnimation=function(){},za.prototype.createVisual=function(){},e(p=za,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const Sb=p;function ja(){ha.apply(this,arguments)}(ha=v_)&&(ja.__proto__=ha),O((p=(ja.prototype=Object.create(ha&&ha.prototype)).constructor=ja).prototype,K_);const Cb=p;function Da(t,e){la.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}(la=g_)&&(Da.__proto__=la),((Da.prototype=Object.create(la&&la.prototype)).constructor=Da).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,k(this.value.target)&&(this.target=new Cb({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:T,align:P}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},Da.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Da.prototype.createLabelElement=function(t){return new cb(this.getLabelText(t),t,this.pointData())},Da.prototype.getLabelText=function(t){var e=Dt(t);return e?e(this.pointData()):this.formatValue(t.format)},Da.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),o=o.categorySlot(o.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:o,o=r?o:n,s=(i&&(n=new R(s.x1,o.y1,s.x2,o.y2),i.options.height=r?n.height():e.target.line.width,i.options.width=r?e.target.line.width:n.width(),i.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},Da.prototype.createVisual=function(){la.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var t=this.options,e=M.drawing.Path.fromRect(this.box.toRect(),{fill:Hi(t.pattern,{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:_(t.border.opacity,t.opacity)}),kt(this.bodyVisual=e),this.visual.append(e)},Da.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=M.drawing.Animation.create(this.bodyVisual,this.options.animation))},Da.prototype.createHighlight=function(t){return M.drawing.Path.fromRect(this.box.toRect(),t)},Da.prototype.highlightVisual=function(){return this.bodyVisual},Da.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Da.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Da.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},Da.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Da.prototype.getIndex=function(){return this.categoryIx},(p=Da).prototype.tooltipAnchor=db.prototype.tooltipAnchor,p.prototype.createFocusHighlight=db.prototype.createFocusHighlight,e(p,{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:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(p.prototype,K_),O(p.prototype,$_),O(p.prototype,ub);const Pb=p;function Fa(t,e){for(var i=e.series,o=0;o<i.length;o++){var r=i[o],n=r.data;!n||xt(n[0])||Bt(n[0])||(r.data=[n])}pa.call(this,t,e)}(pa=Q_)&&(Fa.__proto__=pa),((Fa.prototype=Object.create(pa&&pa.prototype)).constructor=Fa).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Fa.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Fa.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=O({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),t=t.fields.color||o.color,a=this.evalPointOptions(a,s,e),e=(Ot(o.color)&&(t=a.color),new Pb(s,a)),o=(e.color=t,n[i]);return o||(o=new fb({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},Fa.prototype.updateRange=function(t,e){var i=t.current,t=t.target,e=e.series.axis,o=this.valueAxisRanges[e];k(i)&&!isNaN(i)&&k(t&&!isNaN(t))&&((o=this.valueAxisRanges[e]=o||{min:at,max:ht}).min=Math.min(o.min,i,t),o.max=Math.max(o.max,i,t))},Fa.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Fa.prototype.pointValue=function(t){return t.valueFields.current},Fa.prototype.aboveAxis=function(t){return 0<t.value.current},Fa.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},(p=Fa).prototype._setAnimationOptions=yb.prototype._setAnimationOptions,e(p,{animation:{type:rn}});const Tb=p;function Ha(t,e){ca.call(this),this.chartService=t,this.options=O({},this.options,e)}function Na(t,e,i){ua.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}(ca=M.Class)&&(Ha.__proto__=ca),((Ha.prototype=Object.create(ca&&ca.prototype)).constructor=Ha).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color,e=(e&&(e=e.color||e.options.color,i=_(i,e),o=_(o,e)),void 0!==t.padding?w(t.padding):{});return"object"==typeof t.padding&&(e.top=void 0!==t.padding.top?e.top:void 0,e.right=void 0!==t.padding.right?e.right:void 0,e.bottom=void 0!==t.padding.bottom?e.bottom:void 0,e.left=void 0!==t.padding.left?e.left:void 0),{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:Et(t.border.width),paddingTop:Et(e.top),paddingBottom:Et(e.bottom),paddingLeft:Et(e.left),paddingRight:Et(e.right)}},Ha.prototype.show=function(t,e,i){this.chartService&&(t.format=e.format,i=this.getStyle(e,i),t.style=i,i=new M.Color(i.backgroundColor),k(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(is,t),this.visible=!0)},Ha.prototype.hide=function(){this.chartService&&this.chartService.notify(os),this.visible=!1},Ha.prototype.destroy=function(){delete this.chartService},e(p=Ha,{border:{width:1},opacity:1}),(ua=p)&&(Na.__proto__=ua),((Na.prototype=Object.create(ua&&ua.prototype)).constructor=Na).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},Na.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===J&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},Na.prototype.hide=function(){this.chartService.notify(os,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},Na.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,o=o.padding,n=!i.axis.options.vertical,i=i.line.bbox(),n=n?(t=b,r===S?(e=T,i.bottomLeft().translate(0,o)):(e=S,i.topLeft().translate(0,-o))):(e=b,r===C?(t=P,i.topLeft().translate(-o,0)):(t=C,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},e(c=Na,{padding:10});const Mb=c;function Ua(t,e,i){da.call(this,i),this.axis=e,this.stickyMode=e instanceof L_;i=this.options.tooltip;i.visible&&(this.tooltip=new Mb(t,this,O({},i,{stickyMode:this.stickyMode})))}(da=g_)&&(Ua.__proto__=da),((Ua.prototype=Object.create(da&&da.prototype)).constructor=Ua).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},Ua.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},Ua.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?v:y,n=new M.geometry.Point(o.x1,o.y1),i=i?new M.geometry.Point(o.x2,o.y1):new M.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},Ua.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<o;s++){var a=i[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},Ua.prototype.createVisual=function(){da.prototype.createVisual.call(this);var t=this.options;this.line=new M.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},Ua.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),da.prototype.destroy.call(this)},e(c=Ua,{color:Z,width:2,zIndex:-1,tooltip:{visible:!1}});const Ob=c;function Ga(t,e){fa.call(this,t),this.pane=e}(fa=g_)&&(Ga.__proto__=fa),((Ga.prototype=Object.create(fa&&fa.prototype)).constructor=Ga).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},Ga.prototype._clipBox=function(){return this.pane.chartsBox()},Ga.prototype.createVisual=function(){var t;this.visual=new M.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),kt(t=M.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Ga.prototype.stackRoot=function(){return this},Ga.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[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)))}},Ga.prototype.destroy=function(){fa.prototype.destroy.call(this),delete this.parent},(c=Ga).prototype.isStackRoot=!0;const Lb=c;(Wa=y_)&&(qa.__proto__=Wa),((qa.prototype=Object.create(Wa&&Wa.prototype)).constructor=qa).prototype.createTitle=function(){var t=this.options.title;Bt(t)&&(t=O({},t,{align:t.position,position:T})),this.title=k_.buildTitle(t,qa.prototype.options.title),this.title&&this.append(this.title)},qa.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},qa.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},qa.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},qa.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},qa.prototype.reflow=function(t){var e;le(this.children)===this.content&&(e=this.children.pop()),Wa.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},qa.prototype.visualStyle=function(){var t=Wa.prototype.visualStyle.call(this);return t.zIndex=-10,t},qa.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},qa.prototype.stackRoot=function(){return this},qa.prototype.clipRoot=function(){return this},qa.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,h=a?o:r,l=0;l<i.length;l++)0===h.length&&a!==(t=i[l]).options.vertical&&ee(h,s.createGridLines(t))},qa.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()},qa.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new R,o=0;o<e;o++){var r=t[o],n=r.options.vertical?v:y,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,h=0;h<a;h++){var l=s[h];l.options.vertical||(l=l.lineBox(),i.x1=l.x1,i.x2=l.x2)}return i},qa.prototype.clipBox=function(){return this.chartContainer.clipBox},qa.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new U_(this),index:this.paneIndex,name:this.options.name})};var Wa,c,Xa=1,Ya,c;function qa(t){Wa.call(this,t),this.id="pane"+Xa++,this.createTitle(),this.content=new g_,this.chartContainer=new Lb({},this),this.append(this.content),this.axes=[],this.charts=[]}(c=qa).prototype.isStackRoot=!0,e(c,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const Ib=c;function Za(t){return!1!==t.options.visible}function d(t,e,i){Ya.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.originalSeries=t,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}function Qa(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],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 R}function Ka(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}(Ya=g_)&&(d.__proto__=Ya),((d.prototype=Object.create(Ya&&Ya.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.bindPoint=function(t,e,i){var o=this._bindCache.get(t);return o||this._bindCache.set(t,o=[]),o[e]||(o[e]=X_.current.bindPoint(t,e,i))},d.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=O({title:{color:t.color}},e),s=0;s<o;s++){var a=O({},n,i[s]),a=(St(a.title)&&(a.title=O({text:a.title},n.title)),new Ib(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 i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);n&&n.visible&&(r=new Ob(this.chartService,r,n),this.crosshairs.push(r),i.content.append(r))}},d.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,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,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},d.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},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=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.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=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},d.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,l,p,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(p=!d&&Dt(n)||Dt(o))&&(h=p({text:ks(h)?h:"",series:u})),p=u._defaults,p=void(Ot(l=u.color)&&p&&(l=p.color)),c=void 0,c=d?(p={},l):(p={color:n.color,font:n.font},r.markers.color),ks(h))&&""!==h&&s.push({text:h,labels:p,markerColor:c,series:u,active:d})}ee(i.data,s)},d.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},d.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},d.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},d.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=w(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},d.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var o=0;o<e.length;o++)e[o].refresh()},d.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},d.prototype.alignAxisTo=function(t,e,i,o){var i=t.getSlot(i,i,!0),r=t.options.reverse?2:1,o=e.getSlot(o,o,!0),n=e.options.reverse?2:1,o=t.box.translate(o[y+n]-i[y+r],o[v+n]-i[v+r]);t.pane!==e.pane&&o.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(o)},d.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},h={},l={},p=0;p<e.length;p++){var c=e[p],u=c.pane,d=u.id,f=!1!==c.options.visible,g=Ka(t,u)||i,y=r;g!==i&&(y=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[p],y[p]),c.options._overlap||(L(c.lineBox().x1)===L(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),L(c.lineBox().x2)===L(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[p],y[p]),a[d]&&c.reflow(c.box.alignTo(a[d].box,P).translate(c.options.margin,0)),f)&&(a[d]=c),(g=Ka(e,u)||o)!==c&&(c.alignTo(g),c.reflow(c.box)))}for(var v=0;v<t.length;v++){var m=t[v],x=m.pane,_=x.id,b=!1!==m.options.visible,x=Ka(e,x)||o,w=n;x!==o&&(w=this.axisCrossingValues(x,t)),this.alignAxisTo(m,x,r[v],w[v]),m.options._overlap||(L(m.lineBox().y1)===L(x.lineBox().y1)&&(m._mirrored||(m.options.labels.mirror=!m.options.labels.mirror,m._mirrored=!0),this.alignAxisTo(m,x,r[v],w[v]),h[_]&&m.reflow(m.box.alignTo(h[_].box,T).translate(0,-m.options.margin)),b)&&(h[_]=m),L(m.lineBox().y2,K)===L(x.lineBox().y2,K)&&(l[_]&&m.reflow(m.box.alignTo(l[_].box,S).translate(0,m.options.margin)),b)&&(l[_]=m),0!==v&&(m.alignTo(i),m.reflow(m.box)))}},d.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Qa(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},d.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,Qa(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},d.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=Qa(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),i=Math.max(i,r.x1-s.x1),h=0;h<n.length;h++){var l=n[h];l.reflow(l.box.translate(0,a))}}for(var p=0;p<e.length;p++){var c=e[p];c.reflow(c.box.translate(i,0))}},d.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);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,i=this.panes,o=Ja(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},d.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},d.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(o)}},d.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var l=0;l<i;l++){var p=e[l];p.options.height||(p.options.height=o/r)}for(var c=0;c<i;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,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.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=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},d.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(M.drawing.Path.fromRect(e[i].toRect()))},d.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},d.prototype.createVisual=function(){Ya.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border,i=(void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&k(i)||(i=a,e=0),this._bgVisual=new M.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(i),this.appendVisual(i)},d.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&k(s.value)&&null!==s.value&&i.push(s)}}return i},d.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},d.prototype.pointsByPointIndex=function(e){return this.filterPoints(function(t){return t.getIndex()===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,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},d.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},d.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},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 i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=Ka(e,n)||e[0],s=this.createLabelAxis(r,o+i,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},d.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,o=o.visible;if(r!==it&&r!==dt||!1===o)return null;var o=this.groupAxes(this.panes),o=i.options.vertical?o.x:o.y,o=this.axisCrossingValues(i,o),r=r===it,n=i.range(),r=r?n.max:n.min;if(x(o[e],n.min,n.max)-r==0)return null;o.splice(e+1,0,r),i.options.axisCrossingValues=o;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},d.prototype.isTrendline=function(t){return t&&u(t.type,Dn)},d.prototype.trendlineFactory=function(){},d.prototype.createTrendlineSeries=function(){var o=this,r=[];return this.series=this.series.map(function(t){if(!o.isTrendline(t))return t;var e,i=o.seriesByName(t.for);if(i)return e=X_.current.valueFields(i),e=le(e),(e=o.trendlineFactory(Object.assign({},{field:e},t),i))&&(!1===i.visible&&(e.visible=!1),e.color===st&&(e.color=i.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},d.prototype.seriesByName=function(e){return this.series.find(function(t){return t.name===e})},d.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(Za);if(e)return e}},d.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},d.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},d.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},d.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},d.prototype._getNextPoint=function(o,r,t){function e(t){for(var e,i=0;0===(e=r.call(n,o,i+=t).filter(Za)).length;);return e}var n=this,i=r.call(this,o).filter(Za),t=i.indexOf(o)+t;return t<0?(i=e(-1)).at(-1):t>=i.length?(i=e(1)).at(0):i[t]},d.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},d.prototype._pointsByHorizontal=function(t,e){t=Mt(t.series.index+(e=void 0===e?0:e),this.series.length);return this.pointsBySeriesIndex(t)};var $a,Ja=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},th,c,eh,c,ih,oh,c,rh,nh,sh,c,ah,c,hh,lh,ph,h,ch,uh,c;e(c=d,{series:[],plotArea:{margin:{}},background:"",border:{color:Z,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Bb=c,Eb={hover:function(t,e){this._dispatchEvent(t,e,Wn)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function dh(t,e,i){$a.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var h=0;h<o.length;h++){var l=o[h],p=void 0;if(Bt(a))p=a[l];else{if(0!==h&&!u(l,r))break;p=a}p&&s.push({canonicalName:l,name:n[h],transform:Ot(p)?p:W_[p]})}}($a=M.Class)&&(dh.__proto__=$a),((dh.prototype=Object.create($a&&$a.prototype)).constructor=dh).prototype.aggregatePoints=function(t,e){var i,o=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||xt(t)||((i=function(){}).prototype=t,s=new i);for(var a=0;a<r.length;a++){var h=r[a],l=this._bindField(n.values,h.canonicalName),l=h.transform(l,o,n.dataItems,e);if(!(null===l||!Bt(l)||k(l.length)||l instanceof Date)){s=l;break}if(k(l)){p=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var p=h.name;var c=s;var u=l;var d=c,f=p;if(-1<p.indexOf(".")){for(var g=p.split(".");1<g.length;)f=g.shift(),k(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},dh.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},dh.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,s=(k(s[e])?s:n.fields)[e];i.push(s)}return i};const Rb=dh;function fh(){th.call(this),this._defaults={}}(th=M.Class)&&(fh.__proto__=th),((fh.prototype=Object.create(th&&th.prototype)).constructor=fh).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},fh.prototype.query=function(t){return this._defaults[t]},(c=fh).current=new c;const Vb=c;function gh(){eh.apply(this,arguments)}(eh=db)&&(gh.__proto__=eh),((gh.prototype=Object.create(eh&&eh.prototype)).constructor=gh).prototype.createLabel=function(){var t=this.options.labels,e=O({},t,t.from),t=O({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this.createLabelElement(t),this.append(this.labelTo))},gh.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},(c=gh).prototype.defaults=O({},c.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const zb=c;function yh(){ih.apply(this,arguments)}(ih=yb)&&(yh.__proto__=ih),((yh.prototype=Object.create(ih&&ih.prototype)).constructor=yh).prototype.pointType=function(){return zb},yh.prototype.pointValue=function(t){return t.valueFields},yh.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)},yh.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},yh.prototype.updateRange=function(t,e){var e=e.series.axis,i=t.from,o=t.to,r=this.valueAxisRanges[e];null!==t&&m(i)&&m(o)&&((r=this.valueAxisRanges[e]=r||{min:at,max:ht}).min=Math.min(r.min,i),r.max=Math.max(r.max,i),r.min=Math.min(r.min,o),r.max=Math.max(r.max,o))},yh.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},(c=yh).prototype.plotLimits=Q_.prototype.plotLimits;const jb=c;function vh(){oh.apply(this,arguments)}(oh=J_)&&(vh.__proto__=oh),((vh.prototype=Object.create(oh&&oh.prototype)).constructor=vh).prototype.aliasFor=function(){return this.parent};const Db=vh;function mh(t,e){rh.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=De(),this.initLabelsFormat()}(rh=g_)&&(mh.__proto__=rh),((mh.prototype=Object.create(rh&&rh.prototype)).constructor=mh).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,o=this.value,i=this.fromPoint=new Db(o,O({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new Db(o,O({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},mh.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())},mh.prototype.createHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},mh.prototype.highlightVisual=function(){return this.visual},mh.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},mh.prototype.createFocusHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},mh.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return i=(r=this.box).center(),o=C,r=this.options.vertical?(t=i.x,e=r.y1-5,S):(t=r.x2+5,e=i.y,b),{point:new E(t,e),align:{horizontal:o,vertical:r}}},mh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},mh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},mh.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},mh.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}"}))},mh.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels,o=o.vertical;"auto"===r.position&&(o=o?e.y1<=t.y1?(i=$r,Jr):(i=Jr,$r):e.x1<=t.x1?(i=C,P):(i=P,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},mh.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},mh.prototype.focusVisual=function(){this.fromPoint.focusVisual()},mh.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},mh.prototype.getIndex=function(){return this.categoryIx},O((c=mh).prototype,K_),O(c.prototype,$_),c.prototype.defaults={markers:{visible:!1,background:a,size:8,type:Q,border:{width:2},opacity:1},labels:{visible:!1,margin:w(3),padding:w(4),animation:{type:Xr,delay:Wr},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:t,className:i,ariaRoleDescription:s}};const Fb=c;function xh(){nh.apply(this,arguments)}(nh=sb)&&(xh.__proto__=nh),((xh.prototype=Object.create(nh&&nh.prototype)).constructor=xh).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},xh.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},xh.prototype.createStroke=function(t){var e=new M.drawing.Path(t),t=new M.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)},xh.prototype.hasStackSegment=function(){return!0},xh.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},xh.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const Hb=xh;function _h(){sh.apply(this,arguments)}(sh=Hb)&&(_h.__proto__=sh),((_h.prototype=Object.create(sh&&sh.prototype)).constructor=_h).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},_h.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},_h.prototype.createCurveSegments=function(t){return(new H_).process(this.toGeometryPoints(t))};const Nb=_h;function bh(){ah.apply(this,arguments)}(ah=Hb)&&(bh.__proto__=ah),((bh.prototype=Object.create(ah&&ah.prototype)).constructor=bh).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},bh.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},O((c=bh).prototype,h);const Ub=c;function wh(){hh.apply(this,arguments)}(hh=Q_)&&(wh.__proto__=hh),((wh.prototype=Object.create(hh&&hh.prototype)).constructor=wh).prototype.render=function(){hh.prototype.render.call(this),this.renderSegments()},wh.prototype.pointType=function(){return Fb},wh.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!ks(r.from)&&!ks(r.to)){if(this.seriesMissingValues(i)!==Qr)return null;r={from:0,to:0}}o=this.pointOptions(i,o),o=this.evalPointOptions(o,r,e),e=t.fields.color||i.color,Ot(i.color)&&(e=o.color),t=new Fb(r,o);return t.color=e,this.append(t),t},wh.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?Nb:"step"===o?Ub:Hb)(t,e,i)},wh.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},wh.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(i&&t)return{from:i,to:t}},wh.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new R(o.x1,t.y1,o.x2,t.y2),new R(e.x1,t.y1,e.x2,t.y2)):(i=new R(t.x1,o.y1,t.x2,o.y2),new R(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},wh.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),hh.prototype.addValue.call(this,t,e)},wh.prototype.updateRange=function(t,e){var i;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:at,max:ht},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},wh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},wh.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},O((h=wh).prototype,l,rb);const Gb=h;function kh(){lh.apply(this,arguments)}(lh=vb)&&(kh.__proto__=lh),((kh.prototype=Object.create(lh&&lh.prototype)).constructor=kh).prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=[],r=[],n=[],s=e.getSlot(i.low,i.high),a=e.getSlot(i.open,i.open),e=e.getSlot(i.close,i.close),i=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);o.push([a.x1,a.y1]),o.push([i,a.y1]),r.push([i,e.y1]),r.push([e.x2,e.y1]),n.push([i,s.y1]),n.push([i,s.y2]),this.lines=[o,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},kh.prototype.createBody=function(){};const Wb=kh;function Ah(){ph.apply(this,arguments)}(ph=mb)&&(Ah.__proto__=ph),((Ah.prototype=Object.create(ph&&ph.prototype)).constructor=Ah).prototype.pointType=function(){return Wb};const Xb=Ah;function Sh(t,e,i){ch.call(this),this.from=t,this.to=e,this.series=i}(ch=g_)&&(Sh.__proto__=ch),((Sh.prototype=Object.create(ch&&ch.prototype)).constructor=Sh).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(t=e.aboveAxis?i.x2:i.x1,r.push([t,i.y1],[t,o.y2])),r},Sh.prototype.createVisual=function(){ch.prototype.createVisual.call(this);var t=this.series.line||{},t=M.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});kt(t),this.visual.append(t)},e(c=Sh,{animation:{type:Xr,delay:Wr}});const Yb=c;function Ch(){uh.apply(this,arguments)}function Ph(t,e,i){return(t=t[String(e)])?t(i):null}function Th(t,e){for(var i,o,r=0,n=0,s=0,a=0,h=0,l=Number.MAX_VALUE,p=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&&(l=Math.min(d,l),p=Math.max(d,p),h++,r+=d,n+=u,s+=Math.pow(d,2),a+=d*u)}return 0<h&&(o=(n-(i=(h*a-r*n)/(h*s-Math.pow(r,2)))*r)/h),{slope:i,intercept:o,count:h,xMin:l,xMax:p}}function Mh(t,e){return t.every(function(t){t=t.valueFields;return!ks(t[e])||0<t[e]})}function Oh(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i}function Lh(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,h=0;h<t.length;h++){var l=e(t[h]),p=l.xValue,l=l.yValue;if(isFinite(l)&&null!==l?(r.push(l),a+=l,s=Math.max(h,s)):r.push(null),n<=h){var l=r.filter(function(t){return null!==t}).length,c=r.shift()||0;if(0<l){o.push([p,a/l]),a-=c;continue}}o.push([p,null])}return o.slice(0,s+1)}function Ih(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new l_,n=new l_,s=0,a=Number.MAX_VALUE,h=Number.MIN_VALUE,i=function(t){return t},l=[],p=0;p<t.length;p++){var c=e(t[p]),u=c.xValue,c=c.yValue;if(isFinite(u)&&null!==u&&isFinite(c)&&null!==c){a=Math.min(u,a),h=Math.max(u,h),s++,n.set(p,0,c),r.set(p,0,1),r.set(p,1,u);for(var d=2;d<=o;d++)r.set(p,d,Math.pow(r.get(p,1),d))}else r.set(p,0,0)}return r.width=Math.min(o,s),0<s&&(l=function(t,e){for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r}(r,n),i=function(o){return l.reduce(function(t,e,i){return t+e*Math.pow(o,i)},0)}),{coefficients:l,count:s,valueMapper:i,xMin:a,xMax:h}}(uh=yb)&&(Ch.__proto__=uh),((Ch.prototype=Object.create(uh&&uh.prototype)).constructor=Ch).prototype.render=function(){uh.prototype.render.call(this),this.createSegments()},Ch.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=gs(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<i;h++){var l=X_.current.bindPoint(n,h),p=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=l.valueFields.value=s):(d=u-(l.valueFields.value=a),a=0):m(p)&&(a+=p,d=s+=p),t(l,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},Ch.prototype.updateRange=function(t,e){uh.prototype.updateRange.call(this,{value:e.to},e)},Ch.prototype.aboveAxis=function(t){return 0<=t.value},Ch.prototype.plotRange=function(t){return[t.from,t.to]},Ch.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var h,l=n[a];l&&s&&(h=new Yb(s,l,r),i.push(h),this.append(h)),s=l}}};const qb=Ch,Zb=h={exponentialTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Mh(t,n.field)&&(n=(t=Th(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:e+1,yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Oh(function(t){return o*Math.exp(r*t)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},linearTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.categoryAxis,s=t.options,t=Th((0,t.seriesValues)(),(e=s.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),i=t.slope,o=t.intercept,0<t.count?Oh(function(t){return i*t+o},n):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},logarithmicTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,r=t.options,t=Th((0,t.seriesValues)(),(i=r.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:t[i]}})),r=t.slope,n=t.intercept,0<t.count?(e=r,o=n,Oh(function(t){return e*Math.log(t)+o},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},movingAverageTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,t=(n=(t=t).categoryAxis,i=t.options,o=t.categoryAxis,t=t.seriesValues,r=(i.trendline||{}).period||2,s=o.totalRangeIndices(),o=o.currentRangeIndices(),o={min:Math.floor(Math.max(o.min-r,s.min)),max:Math.ceil(Math.min(o.max+r+2,s.max))},s=Lh(t(o),(e=i.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),r),a=[],s.forEach(function(t){var e=t[0],t=t[1];a[e]={category:n.categoryAt(e,!0),value:t}}),0<a.length?a:null);return t?Object.assign({},h,{type:"line",data:t,categoryField:"category",field:"value"}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.seriesValues,i=t.categoryAxis,s=((t=t.options).trendline||{}).order,n=Ih(n(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=n.count,o=n.valueMapper,0<t?Oh(function(t){return o(t)},i):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},powerTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Mh(t,n.field)&&(n=(t=Th(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Oh(function(t){return o*Math.pow(t,r)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}};var Bh,Eh,Rh=[on,Mn,An,Bn],Vh=[gn,In].concat(Rh),c,zh,h,jh,Dh,Fh,c,Hh,h,Nh,c,Uh,h,Gh,c,Wh,h;function f(){Bh.apply(this,arguments)}function Xh(t,e,i){O([].concat(e instanceof L_?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}(Bh=Bb)&&(f.__proto__=Bh),((f.prototype=Object.create(Bh&&Bh.prototype)).constructor=f).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new pb,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[rn,an,In,Mn,Bn,Sn,fn,On]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.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;Bh.prototype.removeAxis.call(this,t),t instanceof L_?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 i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),t=Ph(Zb,t.type,{options:t,categoryAxis:i,seriesValues:o});return t&&(t.categoryAxis=e.categoryAxis,t.valueAxis=e.valueAxis,this.filterSeries(t,i))},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 i=[],o=this.srcSeries[t],t=this.seriesCategoryAxis(o);ys(t.options.type,J)&&(this._seriesPointsCache={},this._currentPointsCache={},t.options.dataItems=[],o=this.aggregateSeries(o,t,t.totalRangeIndices()));for(var t=e?e.min:0,r=e?e.max:o.data.length,n=t;n<r;n++){var s=this.bindPoint(o,n);i.push({categoryIx:n,category:s.fields.category,valueFields:s.valueFields})}return i},f.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],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],o)}},f.prototype.createChartGroup=function(t,e){this.createAreaChart(xs(t,[on,Mn]),e),this.createRangeAreaChart(xs(t,[An,Bn]),e),this.createBarChart(xs(t,[ln,rn]),e),this.createRangeBarChart(xs(t,[Cn,Sn]),e),this.createBulletChart(xs(t,[an,Ln]),e),this.createCandlestickChart(xs(t,hn),e),this.createBoxPlotChart(xs(t,[nn,On]),e),this.createOHLCChart(xs(t,yn),e),this.createWaterfallChart(xs(t,[En,fn]),e),this.createLineChart(xs(t,[gn,In]),e)},f.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r,n,s=e[o];this.isTrendline(s)||(r=this.seriesCategoryAxis(s),n=this.findPane(r.options.pane),s=(ys(r.options.type,J)||s.categoryField)&&u(n,t)?this.aggregateSeries(s,r,r.currentRangeIndices()):this.filterSeries(s,r)),i.push(s)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},f.prototype.filterSeries=function(e,i){var o,t,r,n=(e.data||{}).length;return i._seriesMax=Math.max(i._seriesMax||0,n),k(i.options.min)||k(i.options.max)?(o=i.currentRangeIndices(),t=u(e.type,Vh),(r=O({},e)).data=(r.data||[]).slice(o.min,o.max+1),t&&Is(r,o,n,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return k(e.data[t])}),r):e},f.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},f.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=ys(o.type,J),s=t.data,a=[];n||e.indexCategories();for(var h=0;h<s.length;h++){var l,p=X_.current.bindPoint(t,h).fields.category;n&&(p=bs(p,s[h],this.chartService.intl)),k(p)||(p=r[h]),k(p)&&null!==p&&(a[l=e.totalIndex(p)]=a[l]||{items:[],category:p},a[l].items.push(h))}return this._currentPointsCache[i]=a},f.prototype.aggregateSeries=function(t,o,r){if(!t.data.length)return t;for(var n=this.seriesSourcePoints(t,o),e=O({},t),s=new Rb(O({},t),X_.current,Vb.current),i=e.data=[],a=o.options.dataItems||[],h=function(t){var e=t-r.min,i=n[t];return(i=i||(n[t]={})).categoryIx=e,i.item||(e=o.categoryAt(t,!0),i.category=e,i.item=s.aggregatePoints(i.items,e)),i},l=r.min;l<=r.max;l++){var p=h(l);i[p.categoryIx]=p.item,p.items&&p.items.length&&(a[p.categoryIx]=p.item)}return u(e.type,Vh)&&Is(e,r,o.totalCount(),h,function(t){return n[t]}),o.options.dataItems=a,e},f.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,gs(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Bh.prototype.appendChart.call(this,t,e)},f.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=Gt([].concat(e.valueAxis),function(t){return t.name===i})[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){var i=t.some(function(t){return t.stack}),o=t.some(function(t){return t.stack&&"100%"===t.stack.type}),e=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:e}},f.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";Ee(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,i){return Gt(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},f.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new yb(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e))),this.appendChart(i,e))},f.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new jb(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Tb(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createLineChart=function(t,e){0!==t.length&&(t=new nb(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new lb(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new Gb(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Xb(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new mb(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new bb(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new qb(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.axisRequiresRounding=function(t,e){for(var i=xs(this.series,Rn),o=0;o<this.series.length;o++){var r,n=this.series[o];u(n.type,Rh)&&(r=n.line)&&r.style===en&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},f.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},f.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof L_&&t[e].createLabels()},f.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,h=(void 0===a&&(a=[]),n=O({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?at:0},n),k(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(As(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),I_):L_)(n,this.chartService);if(i[r].categories=h.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=h}h.axisIndex=r,o.push(h),this.appendAxis(h)}}var l=this.categoryAxis||o[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},f.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Rh))return!1;return!0},f.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var h=o[a];if(u(this.findPane(h.pane),t)){var l=h.name,p=ys(h.type,rs)?{min:.1,max:1}:{min:0,max:1},p=e.query(l)||i||p,p=(0===a&&p&&i&&(p.min=Math.min(p.min,i.min),p.max=Math.max(p.max,i.max)),new(ys(h.type,rs)?R_:B_)(p.min,p.max,O({},n,h),this.chartService));if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},f.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new E(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,h=0;h<a.length;h++){var l=a[h];l.getValue?cs(s,l.getValue(r)):cs(n,l.getCategory(r))}0===n.length&&cs(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:ae(e),originalEvent:e,category:Ss(n),value:Ss(s)})}},f.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},f.prototype.updateAxisOptions=function(t,e){Xh(this.options,t,e),Xh(this.originalOptions,t,e)},f.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},f.prototype._pointsByHorizontal=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsByPointIndex(t.getIndex()):(t=this._siblingsBySeriesIndex(t.series.index,e),this.chartService.rtl?t.reverse():t)},f.prototype._siblingsByPointIndex=function(e){for(var t=this.charts,i=[],o=0;o<t.length;o++){var r=t[o];r.pane&&"_navigator"===r.pane.options.name||(r=r.points.filter(function(t){return t&&!1!==t.visible&&t.getIndex()===e}),i.push.apply(i,r.sort(this._getSeriesCompareFn(r[0]))))}return i},f.prototype._siblingsBySeriesIndex=function(t,e){t=Mt(t+e,this.series.length);return this.pointsBySeriesIndex(t)},f.prototype._getSeriesCompareFn=function(t){t=this._isInStackedSeries(t);return t&&this.invertAxes||!t&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},f.prototype._isInStackedSeries=function(t){var e=u(t.series.type,[on,Mn,An,Bn,gn,In,kn,bn]),i=u(t.series.type,[ln,rn]);return e||i&&t.options.isStacked},e(c=f,{categoryAxis:{},valueAxis:{}}),O(c.prototype,Eb);const Qb=c;function Yh(){Eh.call(this),this._points=[]}function qh(){this._defaultPrevented=!0}(Eh=M.Class)&&(Yh.__proto__=Eh),((Yh.prototype=Object.create(Eh&&Eh.prototype)).constructor=Yh).prototype.destroy=function(){this._points=[]},Yh.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Yh.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o&&(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:qh,visual:t.highlightVisual(),show:e}),o._defaultPrevented)||t.toggleHighlight(e,i)},Yh.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Yh.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1};const Kb=Yh;function Zh(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Qh(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}function Kh(t,e){zh.call(this),this.plotArea=t,this.options=O({},this.options,e)}(zh=M.Class)&&(Kh.__proto__=zh),((Kh.prototype=Object.create(zh&&zh.prototype)).constructor=Kh).prototype.start=function(t){return this._active=Zh(t,this.options.key),this._active},Kh.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Qh(this.axisRanges=t)}},Kh.prototype.end=function(){var t=this._active;return this._active=!1,t},Kh.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},Kh.prototype.destroy=function(){delete this.plotArea},Kh.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,h=n[s];(e===y&&!h.options.vertical||e===v&&h.options.vertical)&&(a=h.pan(o))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r},(h=Kh).prototype.options={key:"none",lock:"none"};const $b=h;function $h(t,e){jh.call(this),this.chart=t,this.options=O({},this.options,e),this.createElement()}(jh=M.Class)&&($h.__proto__=jh),(($h.prototype=Object.create(jh&&jh.prototype)).constructor=$h).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)},$h.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},$h.prototype.setStyles=function(t){Vt(this._marquee,t)},$h.prototype.start=function(t){if(Zh(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i)return e=this._elementOffset(),i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},$h.prototype._elementOffset=function(){var t=this.chart.element,e=Vt(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=re(t);return{left:i+t.left,top:e+t.top}},$h.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},$h.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,Qh(this.axisRanges)},$h.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},$h.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},$h.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===y&&!a||i===v&&a||!k(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},$h.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(i.x,o),s=Math.min(i.y,t),a=Math.abs(i.x-o),h=Math.abs(i.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,h=e.height()),o>e.x2&&(a=e.x2-i.x),o<e.x1&&(a=i.x-e.x1),t>e.y2&&(h=e.y2-i.y),t<e.y1&&(h=i.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:h}},(c=$h).prototype.options={key:"shift",lock:"none"};const Jb=c;function Jh(t,e){Dh.call(this),this.chart=t,this.options=O({rate:.3},this.options,e)}(Dh=M.Class)&&(Jh.__proto__=Dh),((Jh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Jh).prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(i===y&&!a||i===v&&a)&&s.zoomRange&&(a=x(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&o.push({axis:s,range:a})}return Qh(this.axisRanges=o)},Jh.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Jh.prototype.destroy=function(){delete this.chart};const t1=Jh;function tl(t,e){Fh.call(this,t),this.chartService=e}(Fh=g_)&&(tl.__proto__=Fh),((tl.prototype=Object.create(Fh&&Fh.prototype)).constructor=tl).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new M.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":mt,reverse:e.rtl,alignItems:i?e.rtl?it:dt:b});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new R),r.renderVisual()}},tl.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Qi(t):new R},tl.prototype.renderVisual=function(){this.addVisual()},tl.prototype.createVisual=function(){};const e1=tl;function el(){Hh.apply(this,arguments)}(Hh=v_)&&(el.__proto__=Hh),((el.prototype=Object.create(Hh&&Hh.prototype)).constructor=el).prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},el.prototype.markerOptions=function(){return this.options},el.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return O({},t,{background:t.border.color},t.highlight,t.type===$?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},el.prototype.createHighlight=function(){var t=new Hh(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},e(h=el,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:T,align:C,highlight:{width:10,height:10,border:{color:a,width:2}}});const i1=h;function il(){Nh.apply(this,arguments)}(Nh=v_)&&(il.__proto__=Nh),((il.prototype=Object.create(Nh&&Nh.prototype)).constructor=il).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},e(c=il,{width:15,height:15,align:P,vAlign:S,margin:{right:-2,bottom:2}});const o1=c;function ol(){Uh.apply(this,arguments)}(Uh=v_)&&(ol.__proto__=Uh),((ol.prototype=Object.create(Uh&&Uh.prototype)).constructor=ol).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},ol.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},ol.prototype.createHighlightLine=function(){var t=O({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),t=new o1(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},ol.prototype.createHighlightMarker=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),e=new Uh(t),i=this.parent.paddingBox,t=t.border.width,o=this.parent.box.clone();return o.pad({left:t-i.x1,top:t-i.y1}),e.reflow(o),this.highlightMarker=e.getElement(),this.highlightMarker},e(h=ol,{border:{width:0},type:"rect",align:C,vAlign:b,highlight:{border:{width:2},markers:{type:Q,width:10,height:10,border:{width:2,color:a},align:C,vAlign:T}}});const r1=h;function rl(){Gh.apply(this,arguments)}(Gh=v_)&&(rl.__proto__=Gh),((rl.prototype=Object.create(Gh&&Gh.prototype)).constructor=rl).prototype.createHighlight=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),t=new Gh(t),e=this.paddingBox.clone(),i=this.parent.box.clone();return e.align(i,y,C),e.align(i,v,T),t.reflow(e),this.highlight=[t.getElement()],this.highlight},e(c=rl,{highlight:{markers:{type:Q,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});const n1=c;function nl(t){Wh.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=De(),this.options.accessibility.ariaChecked=t.active}(Wh=y_)&&(nl.__proto__=Wh),((nl.prototype=Object.create(Wh&&Wh.prototype)).constructor=nl).prototype.createContainer=function(){this.container=new __({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},nl.prototype.createMarker=function(){this.markerWrap=new Wh({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},nl.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,t=t.line,e={border:{color:(t=void 0===t?{}:t).color||e,opacity:t.opacity,dashType:t.dashType}};return this._createLine(e)||this._createMarkerLine(e,t)||this._createSquare()},nl.prototype.markerOptions=function(){var t=this.options,e=t.markers,i=t.markerColor,o=(e=void 0===e?{}:e).border;return void 0===o&&(o={}),e.zIndex=void 0,O({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},nl.prototype._highlightOptions=function(){var t=this.options;return O({markers:{type:t.markers.type}},t.highlight)},nl.prototype._createLine=function(t){var e=this.options;return e.type!==gn||e.markers.visible||(this._line=new r1(O({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},nl.prototype._createMarkerLine=function(t,e){return this.options.type===gn&&(this._markerLineArea=new o1(O({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},nl.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},nl.prototype._createSquare=function(){var t,e=this.options;return e.type===on&&((t=e.pattern||(e.series||{}).pattern)&&("function"==typeof t&&(t=t(e.series)),t=structuredClone(t),this._reduceSize(t,"gap"),this._reduceSize(t,"width"),this._reduceSize(t,"radius")),this._square=new n1(Object.assign({},{border:e.border,vAlign:e.markers.visible?S:b,highlight:this._highlightOptions()},e.area,{pattern:t,background:e.area.background||e.markerColor})),this.markerWrap.append(this._square)),this._square},nl.prototype._createMarker=function(){return new i1(this.markerOptions())},nl.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},nl.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},nl.prototype._toggleHighlight=function(e){var t,i,o=this;this.options.highlight.visible&&((t=this._marker||this._square||this._line)&&t===this._line&&this._line.visual.visible(!e),t)&&((i=t.highlight)||(i=t.createHighlight()).forEach(function(t){return t&&o.markerWrap.appendVisual(t)}),i.forEach(function(t){return t&&t.visible(e)}))},nl.prototype.createLabel=function(){var t=this.options,e=O({},t.labels);this.container.append(new w_(t.text,e))},nl.prototype.getAriaLabelText=function(){return this.options.text},nl.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},nl.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},nl.prototype.renderComplete=function(){Wh.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=M.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},nl.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(Fn,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},nl.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},nl.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},nl.prototype.eventArgs=function(t){var e=this.options;return{element:ae(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},nl.prototype.createVisual=function(){Wh.prototype.createVisual.call(this);var t=this.options;this.options.visible&&(t=O({ariaLabel:void 0!==t.accessibility.ariaLabel?t.accessibility.ariaLabel:t.text},t.accessibility),Ui(this.visual,t))},nl.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{type:t.type,markers:O({background:this.options.markerColor},this.markerOptions()),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):Wh.prototype.renderVisual.call(this)},nl.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return M.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},e(h=nl,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const s1=h;var sl,al="custom",c,hl,h,ll,pl,c,cl,h,ul,c,dl,p,fl,h,gl,c,yl,p,vl,c;function ml(t,e){void 0===e&&(e={}),sl.call(this,t),this.chartService=e,u(this.options.position,[T,P,S,C,al])||(this.options.position=P),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}(sl=g_)&&(ml.__proto__=sl),((ml.prototype=Object.create(sl&&sl.prototype)).constructor=ml).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=b;e===al?o=C:u(e,[T,S])?(o=i===dt?C:i===it?P:b,r=e):i&&(i===dt?r=T:i===it&&(r=S)),this.container=new y_({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new y_({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},ml.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new e1({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s],h=a.series||{},l=h.markers,p=(void 0===l&&(l={}),h.dashType),c=h.legendItem,h=h.opacity,l=O({visible:!1!==l.visible,type:Q},l),l=(delete l.size,O({},{markers:l,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:p},e.line),area:Object.assign({},{opacity:h},e.area),opacity:h,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers}));o.append(new s1(l))}o.render(),this.itemsContainer.append(o)},ml.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===al&&e!==mt||(k(e)?e!==mt:u(t,[C,P]))},ml.prototype.hasItems=function(){return 0<this.container.children[0].children.length},ml.prototype.getItems=function(){return this.itemsContainer.children[0].children},ml.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===al?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new R(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},ml.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===T||o===S?y:v,a=this.isVertical(),h=t.clone(),l=t.clone(),o=(o!==C&&o!==P||(l.y1=h.y1=0),a&&n?(l.y2=l.y1+n,l.align(h,v,i.options.vAlign)):!a&&r&&(l.x2=l.x1+r,l.align(h,y,i.options.align)),i.reflow(l),(l=i.box).clone());(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),i.reflow(l)),o[s+1]=t[s+1],o[s+2]=t[s+2],this.box=o},ml.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=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),i.reflow(t),t=i.box,i.reflow(new R(o,r,o+t.width(),r+t.height()))},ml.prototype.renderVisual=function(){this.hasItems()&&sl.prototype.renderVisual.call(this)},ml.prototype.createLegendTitle=function(t){var e=O({},{color:Z,position:T,align:b},t),i=e.text;t&&!1!==t.visible&&t.text&&(k(e)&&e.visible&&((t=Dt(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new w_(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},ml.prototype.createTitleLayout=function(){this.layout=new __({vertical:!0,wrap:!1}),this.container.append(this.layout)},ml.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},ml.prototype.appendTitleLayoutContent=function(){this.options.title.position===S?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e(c=ml,{position:P,data:[],offsetX:0,offsetY:0,margin:w(2),padding:w(5),border:{color:Z,width:0},item:{cursor:vt,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:vt,opacity:1},area:{type:"square",align:P,width:15,height:15}});const a1=c;function xl(){hl.call(this),this._registry=[]}(hl=M.Class)&&(xl.__proto__=hl),((xl.prototype=Object.create(hl&&hl.prototype)).constructor=xl).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},xl.prototype.create=function(t,e,i){for(var o=this._registry,r=o[0],n=0;n<o.length;n++){var s=o[n],a=xs(t,s.seriesTypes),h=xs(t,Dn);if(0<a.length-h.length){r=s;break}}return new r.type(a,e,i)},(h=xl).current=new h;const h1=h;function _l(t){var e=document.createElement("div");return t&&(e.className=t),e}function bl(t){for(var e=t;e&&!Wt(e,"k-handle");)e=e.parentNode;return e}function wl(t,e,i,o){ll.call(this);var r=t.element;this.options=O({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof I_,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())}(ll=M.Class)&&(wl.__proto__=ll),((wl.prototype=Object.create(ll&&ll.prototype)).constructor=wl).prototype.onPane=function(t){return this.categoryAxis.pane===t},wl.prototype.createElements=function(){var t=this.options,e=this.wrapper=_l("k-selector k-pointer-events-none"),i=(Vt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=_l("k-selection k-pointer-events-none")),o=(this.leftMask=_l("k-mask k-pointer-events-none"),this.rightMask=_l("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=_l("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=_l("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=_l("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(_l()),r.appendChild(_l()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),Vt(i,["borderLeftWidth","borderRightWidth","height"])),n=Vt(o,"height").height,s=Vt(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},Vt(o,{top:(i.height-n)/2}),Vt(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},wl.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ie(this.chartElement,((t={})[as]=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)})},wl.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl,i=(this._dateAxis&&O(t,{min:qo(i,t.min),max:qo(i,t.max),from:qo(i,t.from),to:qo(i,t.to)}),Vt(this.chartElement,["paddingLeft","paddingTop"])),o=i.paddingLeft,i=i.paddingTop;this.options=O({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},wl.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(ue(this.chartElement,((t={})[as]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},wl.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},wl.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},wl.prototype._start=function(t){var e,i,o=this.options,r=ae(t);!this._state&&r&&(e=se(t),this._pointInPane(e.x,e.y))&&(r=bl(r),i=this.body.getBoundingClientRect(),e=!r&&e.x>=i.x&&e.x<=i.x+i.width&&e.y>=i.y&&e.y<=i.y+i.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(o.from),to:this._index(o.to)}},i=this._rangeEventArgs({from:this._index(o.from),to:this._index(o.to)}),this.trigger(Jn,i))&&(this._state=null)},wl.prototype._press=function(t){(t=this._state?this._state.moveTarget:bl(ae(t)))&&_t(t,"k-handle-active")},wl.prototype._move=function(t){var e,i,o,r,n,s,a,h,l,p,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,i=e.range,u=e.moveTarget,o=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,h=i.from,l=i.to,p=i.to-i.from,c=Vt(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(o?-1:1),u||e.inBody)&&(c=u&&Wt(u,"k-left-handle"),u=u&&Wt(u,"k-right-handle"),e.inBody?(i.from=Math.min(Math.max(s,r-t),a-p),i.to=Math.min(i.from+p,a)):c&&!o||u&&o?(i.from=Math.min(Math.max(s,r-t),a-1),i.to=Math.max(i.from+1,i.to)):(c&&o||u&&!o)&&(i.to=Math.min(Math.max(s+1,n-t),a),i.from=Math.min(i.to-1,i.from)),i.from===h&&i.to===l||(this.move(i.from,i.to),this.trigger(ts,this._rangeEventArgs(i))))},wl.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&wt(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(es,this._rangeEventArgs(t)),delete this._state)},wl.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),o=i.pointCategoryIndex(new E(o.x,i.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={},h=3===t.event.which,o=Math.round(r+n/2-o);this._state||h||(this.chart._unsetActivePoint(),i.options.justified||o--,a.from=Math.min(Math.max(s,r-o),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(ts,this._rangeEventArgs(a)),this._end()))},wl.prototype._mousewheel=function(t){var e,i=this,o=Jt(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(ts,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},wl.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];this._pointInPane(i.pageX,i.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},i=this._rangeEventArgs(this._state.range),this.trigger(Jn,i)?this._state=null:t.preventDefault())},wl.prototype._gestureend=function(){this._state&&(this.trigger(es,this._rangeEventArgs(this._state.range)),delete this._state)},wl.prototype._gesturechange=function(t){var e,i,o,r,n,s;this._state&&(r=this.chart,o=this._state,e=this.options,i=this.categoryAxis,o=o.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(),o.from=i.pointCategoryIndex(new E(n))||e.min,o.to=i.pointCategoryIndex(new E(s))||e.max,this.move(o.from,o.to),this.trigger(ts,this._rangeEventArgs(o)))},wl.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},wl.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},wl.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},wl.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?t:e,h="x"+(o?2:1),o=this._slot(o?e:t),e=L(o[h]-r.left+n.left),t=(Vt(this.leftMask,{width:e}),Vt(this.selection,{left:e}),o=this._slot(a),L(i.width-(o[h]-r.left+n.left))),a=(Vt(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),Vt(this.rightMask,{left:a}),Vt(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},wl.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),t=x(this._index(t),o,r),o=x(this._index(e),t+1,r);i.visible&&this.move(t,o),i.from=this._value(t),i.to=this._value(o)},wl.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=O({},s);if(this._state&&(s=this._state.range),r!==P&&(s.from=x(x(n-t,0,e-1),i,o)),r!==C&&(s.to=x(x(e+t,s.from+1,o),i,o)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},wl.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),i=this._index(i.to),s={from:n,to:i},a=O({},s),h=this.categoryAxis.options.reverse,h=y+(h?"2":"1"),l=this.categoryAxis.lineBox(),h=Math.abs(l[h]-e.x),e=l.width(),l=L(h/e,2),h=L(l*t),e=L((1-l)*t);if((s=this._state?this._state.range:s).from=x(x(n-h,0,i-1),o,r),s.to=x(x(i+e,s.from+1,r),o,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},wl.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e(c=wl,{visible:!0,mousewheel:{zoom:"both"},min:ht,max:at});const l1=c;function kl(){pl.apply(this,arguments)}(pl=p)&&(kl.__proto__=pl),((kl.prototype=Object.create(pl&&pl.prototype)).constructor=kl).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=O({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,pl.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},kl.prototype.hide=function(){delete this._current,pl.prototype.hide.call(this)};const p1=kl;function Al(t,e){cl.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}(cl=p)&&(Al.__proto__=cl),((Al.prototype=Object.create(cl&&cl.prototype)).constructor=Al).prototype.showAt=function(t,e){var i,o=Gt(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(o=o[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),e=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:e,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Al.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Al.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:i?new E(t.x,e.y):new E(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},e(h=Al,{categoryFormat:"{0:d}"});const c1=h;function Sl(){ul.apply(this,arguments)}function Cl(){dl.apply(this,arguments)}function Pl(){fl.apply(this,arguments)}function Tl(){gl.apply(this,arguments)}(ul=M.drawing.Animation)&&(Sl.__proto__=ul),((Sl.prototype=Object.create(ul&&ul.prototype)).constructor=Sl).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,i=i.vertical?v:y,(t=this.fromScale=new M.geometry.Point(1,1))[i]=Yr,e.transform(M.geometry.transform().scale(t.x,t.y))):this.abort()},Sl.prototype.step=function(t){var e=Yt(this.fromScale.x,1,t),t=Yt(this.fromScale.y,1,t);this.element.transform(M.geometry.transform().scale(e,t,this.origin))},Sl.prototype.abort=function(){ul.prototype.abort.call(this),this.element.transform(null)},e(c=Sl,{duration:Wr}),M.drawing.AnimationFactory.current.register(rn,c),(dl=M.drawing.Animation)&&(Cl.__proto__=dl),((Cl.prototype=Object.create(dl&&dl.prototype)).constructor=Cl).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(M.geometry.transform().scale(Yr,Yr,t))},Cl.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.center))},e(p=Cl,{easing:"easeOutElastic"}),M.drawing.AnimationFactory.current.register(sn,p),(fl=M.drawing.Animation)&&(Pl.__proto__=fl),((Pl.prototype=Object.create(fl&&fl.prototype)).constructor=Pl).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Pl.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e(h=Pl,{duration:200,easing:"linear"}),M.drawing.AnimationFactory.current.register(Xr,h),(gl=M.drawing.Animation)&&(Tl.__proto__=gl),((Tl.prototype=Object.create(gl&&gl.prototype)).constructor=Tl).prototype.setup=function(){this.element.transform(M.geometry.transform().scale(Yr,Yr,this.options.center))},Tl.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.options.center))},e(c=Tl,{easing:"easeOutElastic",duration:Wr}),M.drawing.AnimationFactory.current.register(vn,c);const u1=c;function Ml(){yl.apply(this,arguments)}function Ol(t,e,i){var o=[],r=e.xMin,n=e.xMax,e=((e=(i||{}).forecast)&&(0<e.before&&(r-=e.before),0<e.after)&&(n+=e.after),(i||{}).samplingInterval),s=_(e,Pi(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function Ll(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function Il(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,n=n.yValue;isFinite(s)&&null!==s&&isFinite(n)&&null!==n&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}}(yl=kb)&&(Ml.__proto__=yl),((Ml.prototype=Object.create(yl&&yl.prototype)).constructor=Ml).prototype.render=function(){yl.prototype.render.call(this),this.renderSegments()},Ml.prototype.createSegment=function(t,e,i){return new(e.style===tn?ib:tb)(t,e,i)},Ml.prototype.animationPoints=function(){return yl.prototype.animationPoints.call(this).concat(this._segments)},Ml.prototype.createMissingValue=function(t,e){if(e===Qr)return ks((e={x:t.x,y:t.y}).x)||(e.x=0),ks(e.y)||(e.y=0),e},O((p=Ml).prototype,l);const d1=p,f1=h={exponentialTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Mh(t,s.field)&&(i=(t=Th(t,(e=s.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:Math.log(t[e])}}))).slope,o=t.intercept,h=t.count,t={xMin:t.xMin,xMax:t.xMax},0<h)?(r=Math.exp(o),n=i,Ol(function(t){return r*Math.exp(n*t)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null},linearTrendline:function(t){var e,i,o,r,n=t.options,s=(t={seriesValues:t.seriesValues,options:n},e=t.options,t=Th((0,t.seriesValues)(),Ll(e.field)),i=t.slope,o=t.intercept,s=t.count,r=t.xMin,t=t.xMax,0<s?Ol(function(t){return i*t+o},{xMin:r,xMax:t},e.trendline):null);return s?Object.assign({},n,{type:"scatterLine",data:s}):null},logarithmicTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,l=(t={seriesValues:t.seriesValues,options:h},a=t.options,t=(0,t.seriesValues)(),Mh(t,"x")&&(i=(l=Th(t,(e=a.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:t[e]}}))).slope,o=l.intercept,l=l.count,t=Il(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<l)?(n=i,s=o,Ol(function(t){return n*Math.log(t)+s},t,a.trendline)):null);return l?Object.assign({},h,{type:"scatterLine",data:l}):null},movingAverageTrendline:function(t){var e,i=t.options,o=(o=t.options,t=t.seriesValues,e=(o.trendline||{}).period||2,0<(t=Lh(t({before:e,after:e}),Ll(o.field),e)).length?t:null);return o?Object.assign({},i,{type:"scatterLine",data:o}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=(t={seriesValues:t.seriesValues,options:r},e=t.seriesValues,i=((t=t.options).trendline||{}).order,n=Ll(t.field),e=Ih(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?Ol(i,{xMin:o,xMax:e},t.trendline):null);return n?Object.assign({},r,{type:"scatterLine",data:n}):null},powerTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Mh(t,"x")&&(i=(h=Th(t,(e=s.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:Math.log(t[e])}}))).slope,o=h.intercept,h=h.count,t=Il(t,Ll(s.field)),0<h)?(r=Math.exp(o),n=i,Ol(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null}};function Bl(){vl.apply(this,arguments)}function El(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}(vl=Bb)&&(Bl.__proto__=vl),((Bl.prototype=Object.create(vl&&vl.prototype)).constructor=Bl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new pb,this.yAxisRangeTracker=new pb},Bl.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(xs(r,Pn),o),this.createScatterLineChart(xs(r,Tn),o),this.createBubbleChart(xs(r,sn),o))}this.createAxes(t)},Bl.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),vl.prototype.appendChart.call(this,t,e)},Bl.prototype.removeAxis=function(t){var e=t.options.name;vl.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},Bl.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Gt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Gt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Bl.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new kb(this,{series:t,clip:e.options.clip}),e)},Bl.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new d1(this,{series:t,clip:e.options.clip}),e)},Bl.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Sb(this,{series:t,clip:e.options.clip}),e)},Bl.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=O({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=ys(a.type,rs),h=s.query(),l=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||h||l,p=[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===i&&!f){f=X_.current.bindPoint(d,0).valueFields;p.push(f[e?"y":"x"]);break}}0===i&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max));for(var g=0;g<p.length;g++)if(p[g]instanceof Date){o=!0;break}l=new(ys(a.type,J)||!a.type&&o?E_:t?R_:B_)(s.min,s.max,a,this.chartService);if(l.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=l}return this.appendAxis(l),l},Bl.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[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||o[0],this.axisY=this.axisY||n[0]},Bl.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new E(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],l=0;l<s;l++){var p=n[l],c=p.options.vertical?h:a,p=p.getValue(r);null!==p&&c.push(p)}0<a.length&&0<h.length&&t.trigger(i,{element:ae(e),originalEvent:e,x:Ss(a),y:Ss(h)})},Bl.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);El(this.options,o,i,e),El(this.originalOptions,o,i,e)},Bl.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=Ph(f1,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},Bl.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},e(c=Bl,{xAxis:{},yAxis:{}}),O(c.prototype,Eb);const g1=c;(Rl=g_)&&(Gl.__proto__=Rl),((Gl.prototype=Object.create(Rl&&Rl.prototype)).constructor=Gl).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},Gl.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);t.visible&&(i||0===i)&&(t.position===b||t.position===ns?(t.color||(t.color=a_(this.options.color)),t.background||(t.background=this.options.color)):(e=e.theme.seriesDefaults.labels,t.color=t.color||e.color,t.background=t.background||e.background),this.label=new w_(i,O({},t,{align:b,vAlign:"",animation:{type:Xr,delay:this.animationDelay}}),this.pointData()),this.append(this.label))},Gl.prototype.getLabelText=function(t){var e=Dt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},Gl.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Gl.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,h=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new R(t.x,t.y-e/2,t.x,t.y))):r.position===ns?(s.radius=s.radius-e/2,t=s.point(h),n.reflow(new R(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(h)).x>=s.center.x?(o=t.x+i,n.orientation=P):(o=t.x-i,n.orientation=C),n.reflow(new R(o,t.y-e,t.x,t.y))))},Gl.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;Rl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value&&(o.visual?(t=(i.startAngle+180)%360,(t=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new M.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new M.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Gl.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},o=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},r=i.color,n=Hi(i.pattern,{color:r,opacity:i.opacity}),o=this.createSegment(e,O({fill:n,stroke:{opacity:i.opacity},zIndex:i.zIndex},o));t.append(o),ws(i)&&t.append(this.createGradientOverlay(o,{baseColor:r,fallbackFill:n},O({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Gl.prototype.createSegment=function(t,e){return e.singleSegment?new M.drawing.Circle(new M.geometry.Circle(new M.geometry.Point(t.center.x,t.center.y),t.radius),e):f_.current.createRing(t,e)},Gl.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;O(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Rl.prototype.createAnimation.call(this)},Gl.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,O({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Gl.prototype.highlightVisual=function(){return this.visual.children[0]},Gl.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new M.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Gl.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=this.createSegment(this.sector,O({},t,{stroke:{width:2*e}})),e=new M.drawing.MultiPath;return e.paths.push(M.drawing.Path.fromRect(t.bbox())),e.paths.push(this.createSegment(this.sector,{})),t.clip(e),t},Gl.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=ce(e+180),e=L(Math.sin(t),et),t=L(Math.cos(t),et),{horizontal:Math.abs(e)>zl?b:t<0?P:C,vertical:Math.abs(e)<Vl?b:e<0?S:T})}},Gl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Gl.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Gl.prototype.getIndex=function(){return this.index};var Rl,l=Gl,Vl=L(ce(30),et),zl=L(ce(60),et),jl,Dl,p,Fl,h,Hl,Nl,Ul,c;function Gl(t,e,i){Rl.call(this,i),this.value=t,this.sector=e}e(l,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:tt,margin:w(.5),align:Q,zIndex:1,position:ss},animation:{type:vn},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(l.prototype,K_),O(l.prototype,ub);const y1=l,v1={createLegendItem:function(t,e,i){var o,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},h=s.labels||{};i&&!1!==i.visibleInLegend&&(a=!(r=!1!==i.visible)&&Dt(h)||Dt(a),n=i.category,a&&(n=a({text:n,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=(r?(o={},e):(o={color:h.color,font:h.font},s.markers||{})).color,ks(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,pattern:e.pattern,labels:o})}};function Wl(t,e){jl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Xl(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),o=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=o&&(i=n/o,r=new E(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))),r}(jl=g_)&&(Wl.__proto__=jl),((Wl.prototype=Object.create(jl&&jl.prototype)).constructor=Wl).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Wl.prototype.traverseDataPoints=function(t){for(var e=this.options,i=this.plotArea.options.seriesColors,o=(i=void 0===i?[]:i).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,l=fs(a),p=l.total,c=l.points,l=l.count,u=360/p,d=void 0,f=(isFinite(u)||(d=360/l),void 0),f=(k(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===ss&&(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!==h.length&&Boolean(y.explode),Ot(a.color)||(a.color=y.color||i[g%o]),t(v,new u_(null,0,0,f,m),{owner:this,category:k(y.category)?y.category:"",pattern:(k(y.pattern)?y:a).pattern,index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==p?v/p:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},Wl.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ms(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},Wl.prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new y1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Wl.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs,r=(void 0===o&&(o=[]),i.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,h=s-.85*s,l=new R(n.x1,n.y1,n.x1+s,n.y1+s),s=l.center(),n=n.center(),p=e.series.length,c=[],u=[],e=_(e.padding,h);this.targetBox=t,e=a-5<e?a-5:e,l.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new E(d+l.x1+e,d+l.y1+e),g=0;g<r;g++){var y=i[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,o.length&&(x=o[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===p-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(l),y.label);x&&x.options.position===ss&&m===p-1&&(x.orientation===P?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=l},Wl.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Wl.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Wl.prototype.distanceBetweenLabels=function(t){var e=le(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=L(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var h=t[a+1].box,n=t[a].box,s=L(h.y1-n.y2);r.push(s)}return s=L(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Wl.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Wl.prototype._takeDistance=function(t,e,i,o){var r;return 0<t[i]&&(o-=r=Math.min(t[i],o),t[i]-=r,t[e]+=r),o},Wl.prototype.reflowLabels=function(t,e){var i,o=le(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var l=0;l<s;l++){var p=e[l],c=p.box;h+=t[l],i=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),p.orientation===P),p.orientation===P?(n.align!==Q&&(i=r.radius+r.center.x+a),p.reflow(new R(i+c.width(),h,i,h))):(n.align!==Q&&(i=r.center.x-r.radius-a),p.reflow(new R(i-c.width(),h,i,h))),h+=c.height()}},Wl.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;jl.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,h,l,p,c=e[o],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new M.drawing.Path({stroke:{color:g,width:t.width},animation:{type:Xr,delay:c.animationDelay}}),d.options.position===ss)&&(r=d.box,n=u.center,p=u.point(f),s=new E(r.x1,r.center().y),l=h=a=void 0,p=u.clone().expand(t.padding).point(f),g.moveTo(p.x,p.y),d.orientation===P?(l=Xl(n,p,s,h=new E(r.x1-t.padding,r.center().y)),s=new E(h.x-4,h.y),(l=l||s).x=Math.min(l.x,s.x),this.pointInCircle(l,u.center,u.radius+4)||l.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===ln||a<s.x?g.lineTo(a,p.y):g.lineTo(p.x+8,p.y),g.lineTo(s.x,h.y)):(l.y=h.y,g.lineTo(l.x,l.y))):(l=Xl(n,p,s,h=new E(r.x2+t.padding,r.center().y)),s=new E(h.x+4,h.y),(l=l||s).x=Math.max(l.x,s.x),this.pointInCircle(l,u.center,u.radius+4)||l.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===ln||a>s.x?g.lineTo(a,p.y):g.lineTo(p.x-8,p.y),g.lineTo(s.x,h.y)):(l.y=h.y,g.lineTo(l.x,l.y))),g.lineTo(h.x,h.y),this._connectorLines.push(g),this.visual.append(g))}},Wl.prototype.renderVisual=function(){var t,e,i,o;jl.prototype.renderVisual.call(this),ke(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),o=this.visual.bbox())&&(i=o.bottomRight(),(o=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1)&&this.visual.transform(M.geometry.transform().scale(o,o,[e.x,e.y]))},Wl.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Wl.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,e=e.center,s=e.x,e=e.y,i=Math.min(Math.abs(e-i),Math.abs(e-o));return n<i?t:s+Math.sqrt(n*n-i*i)*(r?1:-1)},Wl.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},Wl.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Wl.prototype.animationDelay=function(t){return 70*t},Wl.prototype.stackRoot=function(){return this},e(p=Wl,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),O(p.prototype,v1),p.prototype.isStackRoot=!0;const m1=p;function Yl(){Dl.apply(this,arguments)}(Dl=Bb)&&(Yl.__proto__=Dl),((Yl.prototype=Object.create(Dl&&Dl.prototype)).constructor=Yl).prototype.render=function(){this.createPieChart(this.series)},Yl.prototype.createPieChart=function(t){var e=t[0],t=new m1(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Yl.prototype.appendChart=function(t,e){Dl.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},Yl.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},Yl.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)};const x1=Yl;function ql(){Fl.apply(this,arguments)}(Fl=y1)&&(ql.__proto__=Fl),((ql.prototype=Object.create(Fl&&Fl.prototype)).constructor=ql).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===b?(o.radius-=(o.radius-o.innerRadius)/2,e=o.point(r),i.reflow(new R(e.x,e.y-t/2,e.x,e.y))):Fl.prototype.reflowLabel.call(this))},ql.prototype.createSegment=function(t,e){return f_.current.createRing(t,e)},e(h=ql,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:vn}}),O(h.prototype,K_);const _1=h;function Zl(){Hl.apply(this,arguments)}(Hl=m1)&&(Zl.__proto__=Hl),((Zl.prototype=Object.create(Hl&&Hl.prototype)).constructor=Zl).prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new _1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Zl.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),o=Math.min(o.width(),o.height()),r=o/2,n=i.series,s=n.length,i=_(i.padding,o-.85*o),a=r-(i=r-5<i?r-5:i),h=0,l=0;l<s;l++){var p=n[l];0===l&&k(p.holeSize)&&(e=p.holeSize,a-=p.holeSize),k(p.size)?a-=p.size:h++,k(p.margin)&&l!==s-1&&(a-=p.margin)}k(e)||(a-=e=(r-i)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+_(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Hl.prototype.reflow.call(this,t)},Zl.prototype.animationDelay=function(t,e,i){return 50*t+Wr*(e+1)/(i+1)},e(c=Zl,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const b1=c;function Ql(){Nl.apply(this,arguments)}(Nl=x1)&&(Ql.__proto__=Nl),((Ql.prototype=Object.create(Nl&&Nl.prototype)).constructor=Ql).prototype.render=function(){this.createDonutChart(this.series)},Ql.prototype.createDonutChart=function(t){var e=t[0],t=new b1(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Ql.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},Ql.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)};const w1=Ql;function Kl(){Ul.apply(this,arguments)}(Ul=Bb)&&(Kl.__proto__=Ul),((Kl.prototype=Object.create(Ul&&Ul.prototype)).constructor=Kl).prototype.initFields=function(){this.valueAxisRangeTracker=new pb},Kl.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Kl.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),i=this.polarAxis.getSlot(0).center,i=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(i)},Kl.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,i=e.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=o.type===rs?(t=F_,{min:.1,max:1}):(t=D_,{min:0,max:1}),e=e.query(name)||i||r,r=(e&&i&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max)),new t(e.min,e.max,o,this.chartService));this.valueAxis=r,this.appendAxis(r)},Kl.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),t=w(t.padding||{},r),r=o.clone().unpad(t),o=r.clone(),t=(o.y2=o.y1+Math.min(o.width(),o.height()),o.align(r,v,b),o.clone().shrink(0,o.height()/2)),r=(i.reflow(o),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=o,this.alignAxes(o)},Kl.prototype.backgroundBox=function(){return this.box},Kl.prototype.detachLabels=function(){};var $l,tt=Kl,l,Jl,tp,ep,ip,p,op,h;function rp(){$l.apply(this,arguments)}($l=kb)&&(rp.__proto__=$l),((rp.prototype=Object.create($l&&$l.prototype)).constructor=rp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=E.onCircle(t.center,t.startAngle,e);return new R(t.x,t.y,t.x,t.y)},e(l=rp,{clip:!1});const k1=l;function np(){Jl.apply(this,arguments)}(Jl=d1)&&(np.__proto__=Jl),(p=(np.prototype=Object.create(Jl&&Jl.prototype)).constructor=np).prototype.pointSlot=k1.prototype.pointSlot,e(p,{clip:!1});const A1=p;function sp(){tp.apply(this,arguments)}(tp=hb)&&(sp.__proto__=tp),((sp.prototype=Object.create(tp&&tp.prototype)).constructor=sp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},sp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},sp.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new H_(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o};const S1=sp;function ap(){ep.apply(this,arguments)}(ep=sb)&&(ap.__proto__=ep),((ap.prototype=Object.create(ep&&ep.prototype)).constructor=ap).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new M.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const C1=ap;function hp(){ip.apply(this,arguments)}function lp(t,e){return t.value.x-e.value.x}(ip=A1)&&(hp.__proto__=ip),((hp.prototype=Object.create(ip&&ip.prototype)).constructor=hp).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===tn?S1:C1)(t,e,i)},hp.prototype.createMissingValue=function(t,e){var i;return ks(t.x)&&e!==Kr&&(i={x:t.x,y:t.y},e===Qr)&&(i.y=0),i},hp.prototype.seriesMissingValues=function(t){return t.missingValues||Qr},hp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},hp.prototype.sortPoints=function(t){if(t.sort(lp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||ks(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t};const P1=hp;function pp(){op.apply(this,arguments)}(op=tt)&&(pp.__proto__=op),((pp.prototype=Object.create(op&&op.prototype)).constructor=pp).prototype.createPolarAxis=function(){var t=new j_(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},pp.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),op.prototype.render.call(this)},pp.prototype.valueAxisOptions=function(t){return O(t,{majorGridLines:{type:U},minorGridLines:{type:U}},this.options.yAxis)},pp.prototype.createValueAxis=function(){op.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},pp.prototype.trendlineFactory=function(t,e){t=g1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=xn),t},pp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Bb.prototype.appendChart.call(this,t,e)},pp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(xs(t,[xn]),e),this.createScatterChart(xs(t,[_n]),e),this.createAreaChart(xs(t,[mn]),e)},pp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new A1(this,{series:t}),this.appendChart(t,e))},pp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new k1(this,{series:t}),this.appendChart(t,e))},pp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new P1(this,{series:t}),this.appendChart(t,e))},pp.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new E(o.x,o.y),r=this.axisX.getValue(o),o=this.axisY.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ae(e),x:r,y:o})},pp.prototype.createCrosshairs=function(){},e(h=pp,{xAxis:{},yAxis:{}}),O(h.prototype,Eb,{seriesValues:g1.prototype.seriesValues});var cp,up,dp,fp,c=h,l,gp,p,yp,vp,h,mp,l,xp,p;function _p(){cp.apply(this,arguments)}(cp=nb)&&(_p.__proto__=cp),((_p.prototype=Object.create(cp&&cp.prototype)).constructor=_p).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=E.onCircle(t.center,t.middle(),e);return new R(t.x,t.y,t.x,t.y)},_p.prototype.renderSegments=function(){if(cp.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],r=le(n),r=le(r.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o)&&r&&le(n).linePoints.push(i)}},_p.prototype.createSegment=function(t,e,i){var i=new(e.style===tn?ib:tb)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==Kr||(i.options.closed=!0),i},e(l=_p,{clip:!1,limitPoints:!1});const T1=l;function bp(){up.apply(this,arguments)}(up=hb)&&(bp.__proto__=up),((bp.prototype=Object.create(up&&up.prototype)).constructor=bp).prototype.fillToAxes=function(){};const M1=bp;function wp(){dp.apply(this,arguments)}(dp=sb)&&(wp.__proto__=dp),((wp.prototype=Object.create(dp&&dp.prototype)).constructor=wp).prototype.fillToAxes=function(){};const O1=wp;function kp(){fp.apply(this,arguments)}(fp=T1)&&(kp.__proto__=fp),((kp.prototype=Object.create(fp&&fp.prototype)).constructor=kp).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,h=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),h===tn?(s=new M1(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new O1(t,e,i,r,n)),s},kp.prototype.seriesMissingValues=function(t){return t.missingValues||Qr};const L1=kp;function Ap(t,e){gp.call(this,t,null,e)}(gp=_1)&&(Ap.__proto__=gp),((Ap.prototype=Object.create(gp&&gp.prototype)).constructor=Ap).prototype.getIndex=function(){return this.categoryIx},e(p=Ap,{overlay:{gradient:"none"},labels:{distance:10}});const I1=p;function Sp(t){yp.call(this,t),this.forEach=t.rtl?Sa:Aa}(yp=g_)&&(Sp.__proto__=yp),((Sp.prototype=Object.create(yp&&yp.prototype)).constructor=Sp).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,n=i.angle/(t+o+r*(t-1)),s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.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(h=Sp,{gap:1,spacing:0});const B1=h;function Cp(){vp.apply(this,arguments)}(vp=g_)&&(Cp.__proto__=vp),((Cp.prototype=Object.create(vp&&vp.prototype)).constructor=Cp).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new R;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const E1=Cp;function Pp(){mp.apply(this,arguments)}(mp=yb)&&(Pp.__proto__=mp),((Pp.prototype=Object.create(mp&&mp.prototype)).constructor=Pp).prototype.pointType=function(){return I1},Pp.prototype.clusterType=function(){return B1},Pp.prototype.stackType=function(){return E1},Pp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Pp.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Pp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Pp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),mp.prototype.createAnimation.call(this)},(l=Pp).prototype.reflow=Q_.prototype.reflow,e(l,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const R1=l;function Tp(){xp.apply(this,arguments)}(xp=tt)&&(Tp.__proto__=xp),((Tp.prototype=Object.create(xp&&xp.prototype)).constructor=Tp).prototype.createPolarAxis=function(){var t=new z_(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},Tp.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&O(t,{majorGridLines:{type:U},minorGridLines:{type:U}}),this._isStacked100&&O(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),O(t,this.options.valueAxis)},Tp.prototype.aggregateCategories=function(){Qb.prototype.aggregateCategories.call(this,this.panes)},Tp.prototype.createCategoryAxesLabels=function(){Qb.prototype.createCategoryAxesLabels.call(this,this.panes)},Tp.prototype.filterSeries=function(t){return t},Tp.prototype.trendlineFactory=function(t,e){t=Qb.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=kn),t},Tp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(xs(t,[bn]),e),this.createLineChart(xs(t,[kn]),e),this.createBarChart(xs(t,[wn]),e)},Tp.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},Tp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new L1(this,this.chartOptions(t)),this.appendChart(t,e))},Tp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new T1(this,this.chartOptions(t)),this.appendChart(t,e))},Tp.prototype.createBarChart=function(t,e){var i,o,r,n;0!==t.length&&(n=t[0],i=this.chartOptions(t),o=(t=this.filterVisibleSeries(t)).some(function(t){return t.stack}),r=t.some(function(t){return t.stack&&"100%"===t.stack.type}),i.gap=n.gap,i.spacing=n.spacing,i.defaultStack=n.stack&&1<t.length,i.isStacked=o&&1<t.length,i.isStacked100=r&&1<t.length,n=new R1(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},Tp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Tp.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new E(o.x,o.y),r=this.categoryAxis.getCategory(o),o=this.valueAxis.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ae(e),category:r,value:o})},Tp.prototype.createCrosshairs=function(){},Tp.prototype._pointsByVertical=function(t){return xp.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},Tp.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},O((p=Tp).prototype,Eb,{appendChart:Qb.prototype.appendChart,aggregateSeries:Qb.prototype.aggregateSeries,seriesSourcePoints:Qb.prototype.seriesSourcePoints,seriesValues:Qb.prototype.seriesValues}),e(p,{categoryAxis:{categories:[]},valueAxis:{}});var Mp,h=p,l,Op,Lp,Ip,tt;function Bp(t,e,i){Mp.call(this,e),this.value=t,this.options.index=i.index}(Mp=g_)&&(Bp.__proto__=Mp),((Bp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Bp).prototype.getLabelText=function(t){var e=Dt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Bp.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new R(o,e[0].y,r,e[2].y),i&&i.reflow(new R(t.x1,e[0].y,t.x2,e[2].y))},Bp.prototype.createVisual=function(){var t=this,e=this.options;Mp.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(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)},Bp.prototype.createPath=function(){var t=this.options,e=t.border;return M.drawing.Path.fromPoints(this.points,{fill:Hi(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Bp.prototype.createHighlight=function(t){return M.drawing.Path.fromPoints(this.points,t)},Bp.prototype.highlightVisual=function(){return this.visual.children[0]},Bp.prototype.highlightVisualArgs=function(){var t=M.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Bp.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=M.drawing.Path.fromPoints(this.points,O({},t,{stroke:{width:2*e}})).close(),i=new M.drawing.MultiPath;return i.paths.push(M.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(M.drawing.Path.fromPoints(this.points)),t.clip(i),t},Bp.prototype.tooltipAnchor=function(){var t=this.box;return{point:new E(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},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}},Bp.prototype.getIndex=function(){return this.index},e(l=Bp,{color:a,border:{width:1},labels:{format:""},accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(l.prototype,K_),O(l.prototype,ub);const V1=l;function Ep(t,e){Op.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}(Op=g_)&&(Ep.__proto__=Op),((Ep.prototype=Object.create(Op&&Op.prototype)).constructor=Ep).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},Ep.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,i=(void 0===e&&(e=[]),t.series[0]),o=i.data;if(o)for(var t=fs(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,l=n[s];l&&(a=l.fields,Ot(i.color)||(i.color=a.color||e[s%e.length]),a=O({index:s,owner:this,series:i,seriesIx:0,dataItem:o[s],percentage:l.value/r},a,{visible:l.visible}),l=l.valueFields.value,h=this.createSegment(l,a),l=this.createLabel(l,a),h)&&l&&h.append(l)}},Ep.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ms(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},Ep.prototype.createSegment=function(t,e){var i=O({},e.series);if(i.pattern=e.pattern||i.pattern,this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible)return t=new V1(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},Ep.prototype.createLabel=function(t,e){var i,o=e.series,r=e.dataItem,n=O({},this.options.labels,o.labels),s=t;if(n.visible)return i=Dt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o},i?s=i(r):n.format&&(s=this.chartService.format.auto(n.format,s)),n.color||(n.color=a_(o.color),n.background)||(n.background=o.color),this.evalSegmentOptions(n,t,e),i=new w_(s,O({vAlign:n.position},n),r),this.labels.push(i),i},Ep.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==b&&(o=t[i].box.width(),r===C?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Ep.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var l=s.percentage/a.percentage*e,p=(e-l)/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=o.dynamicHeight?i*d:i/n,d=x(d?(e-l*(f/d))/2:f?0:e/2,0,e);g.push(new M.geometry.Point(t.x1+p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new M.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+o.segmentSpacing,l=x(e-2*(p=d),0,e)}},Ep.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,h=s?0:(e-e/o.neckRatio)/2,l=((s?e:e-2*h)-a)/2,p=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?l*d:l/n,d=o.dynamicHeight?i*d:i/n;u.push(new M.geometry.Point(t.x1+h,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-h,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-h-f,t.y1+d+p)),u.push(new M.geometry.Point(t.x1+h+f,t.y1+d+p)),h+=f,p+=d+o.segmentSpacing}},Ep.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},e(tt=Ep,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),O(tt.prototype,v1);const z1=tt;function Rp(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,Lp.call(this,t,e)}(Lp=z1)&&(Rp.__proto__=Lp);const j1=(Rp.prototype=Object.create(Lp&&Lp.prototype)).constructor=Rp;function Vp(){Ip.apply(this,arguments)}(Ip=Bb)&&(Vp.__proto__=Ip),((Vp.prototype=Object.create(Ip&&Ip.prototype)).constructor=Vp).prototype.render=function(){this.createChart(z1,xs(this.series,[cn])),this.createChart(j1,xs(this.series,[un]))},Vp.prototype.createChart=function(t,e){var i=e[0];i&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight}),this.appendChart(t))},Vp.prototype.appendChart=function(t,e){Ip.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},Vp.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},Vp.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},Vp.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)};var zp,p=Vp,l,jp,tt,Dp,t;function Fp(t,e){zp.call(this),this.options=e,this.color=e.color||a,this.value=t}(zp=g_)&&(Fp.__proto__=zp),((Fp.prototype=Object.create(zp&&zp.prototype)).constructor=Fp).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},Fp.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Fp.prototype.createLabelElement=function(t){var e=(e=t.color)||a_(this.color);return new w_(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},Fp.prototype.getLabelText=function(t){var e=Dt(t);return e?e(this.pointData()):this.formatValue(t.format)},Fp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Fp.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())},Fp.prototype.createVisual=function(){zp.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},Fp.prototype.markerBox=function(){var t,e=this.options.markers,i=e.border,o=this.box.toRect(),r=_(e.type,"rect")===ut,i=_(i.width,r?1:0),r=Math.round(i/2);return e.size&&(t=o.center(),o.size.width=o.size.height=e.size,o.origin.x=Math.round(t.x-o.size.width/2),o.origin.y=Math.round(t.y-o.size.height/2)),o.size.width-=i,o.size.height-=i,o.origin.y+=r+.5,o.origin.x+=r+.5,Qi(o)},Fp.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=_(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},Fp.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new v_({type:_(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:_(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)},Fp.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,i=new v_({type:_(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:_(e.zIndex,this.series.zIndex)}),e=(i.reflow(this.markerBox()),i.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},Fp.prototype.highlightVisual=function(){return this.rectVisual},Fp.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Fp.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,t=new v_({type:_(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return t.reflow(this.markerBox()),t.getElement()},Fp.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new E(t,e),align:{horizontal:b,vertical:S}}},Fp.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Fp.prototype.unclipElements=function(){},Fp.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},O((l=Fp).prototype,K_),O(l.prototype,$_),O(l.prototype,ub),l.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}};const D1=l;function Hp(t,e){jp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(jp=g_)&&(Hp.__proto__=jp),((Hp.prototype=Object.create(jp&&jp.prototype)).constructor=Hp).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:at,max:ht},this._evalSeries=[]},Hp.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},Hp.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;k(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))}},Hp.prototype.addValue=function(t,e){var i;t&&k(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},Hp.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(k(s)||(this._evalSeries[r]=s=ms(t,{},n,!0)),t);return s&&ms(r=O({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},Hp.prototype.pointType=function(){return D1},Hp.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),Object.assign({},o)},Hp.prototype.createPoint=function(t,e){var i,o,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,n=(s.pattern=e.pattern||s.pattern,s=this.evalPointOptions(s,t,e),Ot(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===i&&(i=.05),o=(0,M.parseColor)(e),r=1-i,a=function(t){var e=o.toHSL(),i=100-e.l;return e.l+=Math.min((r-t)*i,i),e.toCss()}(t.value/this.valueRange.max)),new D1(t,s));return n.color=a,this.append(n),n},Hp.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{xAxis:o,yAxis:i};throw new Error("Unable to locate Y axis with name "+t)},Hp.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,h=0;this.traverseDataPoints(function(t,e){var i=s[h++],e=n.seriesAxes(e.series),o=e.xAxis,e=e.yAxis,r=o.categoryIndex(t.x),t=e.categoryIndex(t.y),o=o.getSlot(r,r,a),r=e.getSlot(t,t,a);i&&(o&&r?(e=n.pointSlot(o,r),i.reflow(e)):i.visible=!1)}),this.box=t},Hp.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},Hp.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),l=0;l<o.data.length;l++){var p=this.plotArea.bindPoint(o,l),c=p.valueFields,p=p.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=h.min<=d&&d<=h.max;u&&d&&t(c,O({pointIx:l,series:o,seriesIx:i,dataItem:o.data[l],owner:this},p))}},Hp.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},Hp.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e(tt=Hp,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const F1=tt;function Np(){Dp.apply(this,arguments)}function Up(t,e){return t instanceof Date&&e instanceof Date?Go(t,e):t===e}function Gp(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}(Dp=Bb)&&(Np.__proto__=Dp),((Np.prototype=Object.create(Dp&&Dp.prototype)).constructor=Np).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},Np.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},Np.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,r=r.yAxis,s=Ie(n.categories||[]),a=Ie(r.categories||[]),h=0;h<o.length;h++){var l=X_.current.bindPoint(i,h).valueFields,p=l.x,l=l.y;s.has(p)||s.add(p),a.has(l)||a.add(l)}n.categories=s.values(),r.categories=a.values()}},Np.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(xs(r,[dn]),o)}},Np.prototype.createHeatmapChart=function(t,e){t=new F1(this,{series:t});this.appendChart(t,e)},Np.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Gt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Gt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Np.prototype.seriesAxes=function(t){var e=this.options,i=[].concat(e.xAxis),o=t.xAxis,i=o?i.find(function(t){return t.name===o}):i[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!i)throw new Error("Unable to locate X axis with name "+o);if(t)return{xAxis:i,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},Np.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},Np.prototype.createXYAxis=function(t,e,i){for(var o,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],h=this.series,l=0;l<h.length;l++){var p=h[l],c=p[e?"yAxis":"xAxis"];if(c===s.name||0===i&&!c){c=X_.current.bindPoint(p,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){o=!0;break}t=new(ys(s.type,J)||!s.type&&o?I_:L_)(s,this.chartService);if(t.axisIndex=i,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.indexCategories(),t},Np.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[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||o[0],this.axisY=this.axisY||n[0]},Np.prototype.removeAxis=function(t){var e=t.options.name;Dp.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},Np.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new E(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],l=0;l<s;l++){var p=n[l];cs(p.options.vertical?h:a,p.getCategory(r))}0<a.length&&0<h.length&&t.trigger(i,{element:ae(e),originalEvent:e,x:Ss(a),y:Ss(h)})},Np.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Gp(this.options,o,i,e),Gp(this.originalOptions,o,i,e)},Np.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},Np.prototype._pointsByVertical=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisX.options.reverse?-1*e:e),o=this.axisX.children,r=o[Mt(this._getPointAxisXIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return Up(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},Np.prototype._pointsByHorizontal=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisY.options.reverse?-1*e:e),o=this.axisY.children,r=o[Mt(this._getPointAxisYIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return Up(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},Np.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},Np.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},Np.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return Up(e,t.value)})},e(t=Np,{xAxis:{},yAxis:{}}),O(t.prototype,Eb);var Wp,i=t,s="color",l="first",tt="max",t="noteText",Xp=(h1.current.register(Qb,[rn,ln,gn,In,on,Mn,hn,yn,an,Ln,nn,On,Cn,Sn,En,fn,An,Bn].concat(Dn)),h1.current.register(g1,[Pn,Tn,sn].concat(Dn)),h1.current.register(x1,[vn]),h1.current.register(w1,[pn]),h1.current.register(p,[cn,un]),h1.current.register(c,[mn,xn,_n].concat(Dn)),h1.current.register(h,[bn,wn,kn].concat(Dn)),h1.current.register(i,[dn]),X_.current.register([rn,ln,gn,In,on,Mn],[gt],[Vn,s,t,qr,Zr,zn,jn]),X_.current.register([Cn,Sn,An,Bn],["from","to"],[Vn,s,t,zn,jn]),X_.current.register([En,fn],[gt],[Vn,s,t,"summary",zn,jn]),X_.current.register([mn,xn,_n],[y,v],[s,zn,jn]),X_.current.register([bn,wn,kn],[gt],[Vn,s,zn,jn]),X_.current.register([cn,un],[gt],[Vn,s,"visibleInLegend","visible",zn,jn]),Vb.current.register([rn,ln,gn,In,on,Mn,En,fn],{value:tt,color:l,noteText:l,errorLow:"min",errorHigh:tt}),Vb.current.register([Cn,Sn,An,Bn],{from:"min",to:tt,color:l,noteText:l}),Vb.current.register([bn,wn,kn],{value:tt,color:l}),X_.current.register([Pn,Tn,sn],[y,v],[s,t,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),X_.current.register([sn],[y,v,"size"],[s,Vn,t,jn]),X_.current.register([dn],[y,v,gt],[s,t,jn]),X_.current.register([hn,yn],["open","high","low","close"],[Vn,s,"downColor",t,jn]),Vb.current.register([hn,yn],{open:tt,high:tt,low:"min",close:tt,color:l,downColor:l,noteText:l}),X_.current.register([nn,On],["lower","q1","median","q3","upper","mean","outliers"],[Vn,s,t,zn,jn]),Vb.current.register([nn,On],{lower:tt,q1:tt,median:tt,q3:tt,upper:tt,mean:tt,outliers:l,color:l,noteText:l}),X_.current.register([an,Ln],["current","target"],[Vn,s,"visibleInLegend",t,zn,jn]),Vb.current.register([an,Ln],{current:tt,target:tt,color:l,noteText:l}),X_.current.register([vn,pn],[gt],[Vn,s,"explode","visibleInLegend","visible",zn,jn]),[Vn,gt,y,v]),Yp="mousemove",qp="contextmenu",Zp="mouseleave",Qp="keydown",Kp="k-chart-overlay-top",p;function g(t,e,i,o){var r=this,o=(void 0===o&&(o={}),Wp.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new T_(this,o),this.chartService.theme=i,this._initElement(t),O({},this.options,e));this._originalOptions=O({},o),this._theme=i,this._initTheme(o,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),s_.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents(),r._restoreOverlayElement())})}function $p(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Jp(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 tc(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}(Wp=M.Class)&&(g.__proto__=Wp),((g.prototype=Object.create(Wp&&Wp.prototype)).constructor=g).prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;0<=e;e--){var i=t.childNodes[e];Wt(i,"k-chart-overlay")?this.overlayElement=i:t.removeChild(i)}this.element=t},g.prototype._setElementClass=function(t){_t(t,"k-chart")},g.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":((!this.options.title||this.options.title&&this.options.title.position!==S?_t:wt)(this.overlayElement,Kp),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element)&&this.element.appendChild(this.overlayElement)},g.prototype._hasSeriesData=function(){var t=this.options.series||[];return 0<t.length&&t.some(function(t){return t.data&&0<t.data.length})},g.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i;for(var n=t,s=Xp,a=0;a<s.length;a++){var h=s[a]+"Axes";n[h]&&(n[s[a]+"Axis"]=n[h],delete n[h])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,St(t.title)&&(t.title={text:t.title}),this.options=O({},e,t),this.applySeriesColors()},g.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)}},g.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&ke(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},g.prototype._resize=function(){this._noTransitionsRedraw()},g.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()},g.prototype.getAxis=function(t){return Lr(t,this._plotArea.axes)},g.prototype.findAxisByName=function(t){return this.getAxis(t)},g.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new U_(e[i])},g.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new U_(e[t])},g.prototype.plotArea=function(){return new G_(this._plotArea)},g.prototype.toggleHighlight=function(t,e){var i,o,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=Ot(e)?r.filterPoints(e):(Bt(e)?(i=e.series,o=e.category):i=o=e,n.type===pn?$p(r.pointsBySeriesName(i),o):u(n.type,[vn,cn,un])?$p((r.charts[0]||{}).points,o):r.pointsBySeriesName(i));e&&this.togglePointsHighlight(t,e)},g.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},g.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;Ot(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&k(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(n=this._plotArea.pointsByCategoryIndex(i),r.showAt(n)):e&&r.show(e)},g.prototype.hideTooltip=function(){this._tooltip.hide()},g.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&ne(e,{width:i.width}),i.height&&ne(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=M.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},g.prototype._surfaceWrap=function(){return this.element},g.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,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 Kb,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),rc(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},g.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},g.prototype._redrawFocusHighlight=function(){var t,e;this._destroyed||(t=(e=this._focusState).legendInFocus,e=e.preserveHighlight,t&&e&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1))},g.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,t=St(t)?t:t.description||t.text;t&&this.element.setAttribute("aria-roledescription",t)},g.prototype._kendoExportVisual=function(t){var e;return t&&t.width&&t.height?(e={width:(e=this._originalOptions.chartArea||{}).width||t.width,height:e.height||t.height},this.exportVisual(e)):this.exportVisual()},g.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(i=this.options,t=O({},t.options,{chartArea:{width:t.width,height:t.height}}),oc(this._originalOptions,t),this.options=O({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),rc(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},g.prototype._sharedTooltip=function(){return this._plotArea instanceof Qb&&this.options.tooltip&&this.options.tooltip.shared},g.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new $b(this._plotArea,t.pannable))},g.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Jb(this,e))},g.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new t1(this,e))},g.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==i||this.requiresHandlers([Zn,Yn,qn])),i=(!1===e||!1===o)&&!this.requiresHandlers([Qn,Kn,$n]),e=this.element;this._dragZoomEnabled&&t&&i?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&i||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!i)},g.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom)&&i.toggleZoom(e)},g.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new p1(this.chartService,t)},g.prototype._createSharedTooltip=function(t){return new c1(this._plotArea,t)},g.prototype.applyDefaults=function(t,e){var i,o,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||o.color,e=O({},s,s[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[i],e}for(var h=0;h<Xp.length;h++)o=n.axisDefaults||{},r=(r=[].concat(n[i=Xp[h]+"Axis"])).map(a),n[i]=1<r.length?r:r[0];var l=t,t=e,p=l.series,c=p.length,u=l.seriesDefaults,d=O({},l.seriesDefaults),f=t?O({},t.seriesDefaults):{},g=O({},f);Jp(d),Jp(g);for(var y=0;y<c;y++){var v=p[y].type||l.seriesDefaults.type,v=O({data:[]},g,f[v],{tooltip:l.tooltip},d,u[v]);p[y]._defaults=v,p[y]=O({},v,p[y]),p[y].data=p[y].data||[]}},g.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},g.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new x_(this._modelOptions()),o=(i.chart=this,i._plotArea=e,k_.buildTitle(t.title)),r=k_.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return i.append.apply(i,k_.orderTitles([o,r])),t.legend&&t.legend.visible&&(t=new a1(e.options.legend,this.chartService),i.append(t),i._legend=t),i.append(e),i.reflow(),this._setTitleBox(o,r),i},g.prototype._setTitleBox=function(t,e){var i,o,r;(t||e)&&(this._titleBox=(t||e).box.clone(),i=t?t.options.position:"",r=(o=e?e.options.position:"")!==S,i===o&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone()))},g.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return O({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},g.prototype._createPlotArea=function(t){var e=this.options;return h1.current.create(t?[]:e.series,e,this.chartService)},g.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof L_&&n.select&&!n.vertical&&(o=r.range(),r=new l1(this,r,O({min:o.min,max:o.max},n.select)),e.push(r))}},g.prototype._selectStart=function(t){return this.trigger(Jn,t)},g.prototype._select=function(t){return this.trigger(ts,t)},g.prototype._selectEnd=function(t){return this.trigger(es,t)},g.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.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,M.throttle)(this._mousemove.bind(this),20)},g.prototype.addObserver=function(t){t&&this.observers.push(t)},g.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},g.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},g.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===is?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Un?this._updateDrilldownPoint(e.point):t===Gn?this._resetDrilldownPoint():t===Hn?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===Fn&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},g.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},g.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ie(e,((t={})[qp]=this._clickHandler,t[as]=this._mousewheelHandler,t[Zp]=this._mouseleaveHandler,t[Qp]=this._keydownHandler,t.mousedown=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&ie(e,((t={})[Yp]=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()},g.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(Xn)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},g.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},g.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},g.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger($n,{}))},g.prototype._gesturechange=function(t){var e,i,o=this._mousewheelZoom;o&&!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,i={delta:e,axisRanges:tc(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger(Qn,i)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(i.axisRanges=o.updateRanges(e,t))&&!this.trigger(Kn,i)&&o.zoom()))},g.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},g.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Zn,Yn,qn])&&this._startNavigation(t,e,Zn),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection)&&this._zoomSelection.start(t)&&this.trigger(Qn,{axisRanges:tc(this._plotArea.axes),originalEvent:t})},g.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(Yn,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,h=n[s];h.options.name&&0!=(a=(a=h.options.vertical?t.y:t.x).startLocation-a.location)&&(r[h.options.name]=h.translateRange(a))}e.axisRanges=r,this.trigger(Yn,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},g.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(qn,{axisRanges:tc(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,qn),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Kn,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger($n,{axisRanges:e,originalEvent:t})))},g.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},g.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return _(t.rate,.3)},g.prototype._mousewheel=function(t){var e=this,i=Jt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:tc(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(Qn,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger(Kn,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger($n,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=o||this._startNavigation(t,r,Qn)?o:this._navState){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,h={},l=0;l<a.length;l++){var p=a[l],c=p.options.name;c&&(h[c]=p.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(Kn,{delta:i,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,$n)},150)}}},g.prototype._startNavigation=function(t,e,i){var o,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(o=tc(r),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:o,pane:e,axes:r}))},g.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},g.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},g.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),o=i&&(o=o.closest(i))&&o.aliasFor?o.aliasFor():o},g.prototype._eventCoordinates=function(t){t=se(t);return this._toModelCoordinates(t.x,t.y)},g.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=Vt(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},g.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=re(this.element);return{left:L(t.x+e.left+i.left),top:L(t.y+e.top+i.top)}},g.prototype._toModelCoordinates=function(t,e){var i=this.element,o=re(i),r=this._elementPadding(),i=Pe(i).invert(),t=new M.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new E(t.x,t.y)},g.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},g.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},g.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},g.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===T||t===C)},g.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},g.prototype._keydown=function(t){var e,i=this._focusState,o=i.legendInFocus,i=i.focusedElement,r=this._legend;"Tab"===t.key?(this._clearFocusedElement(),e=this._isLegendBeforeChart(),o&&e!==t.shiftKey?this._navigatePoints(t):!o&&e===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)):"Escape"===t.key?(i&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?i&&(this._focusState.preserveHighlight=!0,this._propagateClick(i,t),this._focusElement(i)):o?this._navigateLegend(t):this._navigatePoints(t)},g.prototype._navigatePoints=function(e){var i=this,o=this._focusState,t=this._plotArea;if(o.legendInFocus=!1,o.focusedElement){var r=function(t){o.focusedPoint=t,i._focusElement(o.focusedPoint),i._displayTooltip(t),e.preventDefault()};switch(e.key){case Y:r(t.getPointToTheRight(o.focusedPoint));break;case X:r(t.getPointToTheLeft(o.focusedPoint));break;case W:r(t.getPointBelow(o.focusedPoint));break;case G:r(t.getPointAbove(o.focusedPoint))}}else this._focusFirstPoint(),e.preventDefault()},g.prototype._navigateLegend=function(e){var i=this,o=this._focusState,t=this._legend,r=this.chartService.rtl;if(o.legendInFocus=!0,o.focusedElement){var n=t.getItems().length,s=function(t){o.focusedLegendItemIndex=t(o.focusedLegendItemIndex,n),i._focusElement(i._getFocusedLegendItem()),e.preventDefault()};switch(e.key){case G:case X:s(r?Pt:Tt);break;case W:case Y:s(r?Tt:Pt)}}else this._focusFirstLegendItem(),e.preventDefault()},g.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},g.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},g.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},g.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},g.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},g.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},g.prototype._focusLegendItem=function(e){var t=this._focusState;t.focusedLegendItemIndex=this._legend.getItems().findIndex(function(t){return t.options.series.index===e.seriesIndex&&t.options.pointIndex===e.pointIndex}),t.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},g.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},g.prototype._focusElement=function(t,e){var i=this._focusState;this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e)&&(t.focusVisual(),i.legendInFocus?(e=t.options,this._showSeriesInactiveOpacity(e.series.index,e.pointIndex)):this._showInactiveOpacity(t))},g.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},g.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(q,t._id)},g.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(q)},g.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility,t=(e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription),i.ariaChecked);return k(t)&&e.setAttribute("aria-checked",t),e},g.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},g.prototype._startHover=function(t,e){var i;return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Bb)}),i=this._activePoint,this._updateHoveredPoint(t,e),t&&i!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),this._showInactiveOpacity(t))),t)},g.prototype._displayTooltip=function(t){O({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},g.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},g.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);o&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,o))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},g.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},g.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},g.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},g.prototype._updateDrilldownPoint=function(t){t&&t.series&&X_.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},g.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},g.prototype._startDrilldown=function(t){var e,i;t&&t.series&&(e=t.series,i=X_.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:i,sender:this})},g.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},g.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&(a.highlight||{}).visible&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},g.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},g.prototype._showInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},g.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)},g.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},g.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},g.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},g.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),ie(document,((t={})[Yp]=this._mouseMoveTrackHandler,t)))},g.prototype._mouseMoveTracking=function(t){var e=this.options,i=this._tooltip,o=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)||(O({},e.tooltip,n.options.tooltip).visible&&i.show(n),o.show(n))):(ue(document,((t={})[Yp]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},g.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(e),i.hover&&((i=i.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger(Xn))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},g.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},g.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,h,l;this._suppressHover||(o=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&&i?((l=(h=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=h,0<a.length&&!this.trigger(Nn,l)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},g.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},g.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},g.prototype._deferRedraw=function(){this._redraw()},g.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},g.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},g.prototype.bindCategoryAxisFromSeries=function(i,e){var o=this,r=new Set,t=this.options.series.filter(function(t){return t.categoryAxis===i.name||!t.categoryAxis&&0===e}),n=t.some(function(t){return Boolean(t.categoryField)}),t=t.filter(function(t){return t.data&&0<t.data.length}),s=t.map(function(t){return X_.current.bindPoint(t,0).fields.category}),a=s.reduce(function(t,e){return t||As(i,e)},!1);t.filter(function(t,e){return t.categoryField||k(s[e])}).forEach(function(i){return i.data.forEach(function(t,e){e=X_.current.bindPoint(i,e).fields.category;a&&(e=(t=bs(e,t,o.chartService.intl))?t.getTime():void 0),r.add(e)})}),0<r.size?(t=Array.from(r.values()),a&&(t=t.sort().map(function(t){return t&&new Date(t)})),i.categories=t):n&&(i.categories=[])},g.prototype._isBindable=function(t){for(var e=X_.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===gt?r="field":r+="Field",!k(t[r])){i=!1;break}}return i},g.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},g.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},g.prototype._showSeriesInactiveOpacity=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[vn,pn,cn,un])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},g.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Wn,Xn])},g.prototype.updateMouseMoveHandler=function(){var t;ue(this.element,((t={})[Yp]=this._mousemove,t)),this._shouldAttachMouseMove()&&ie(this.element,((t={})[Yp]=this._mousemove,t))},g.prototype.applyOptions=function(t,e){oc(this._originalOptions,t),this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},g.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement()},g.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},g.prototype.setIntlService=function(t){this.chartService.intl=t},g.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},g.prototype.destroy=function(){var t;this._destroyed=!0,ue(this.element,((t={})[qp]=this._clickHandler,t[as]=this._mousewheelHandler,t[Yp]=this._mousemove,t[Zp]=this._mouseleaveHandler,t[Qp]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&ue(document,((t={})[Yp]=this._mouseMoveTrackHandler,t)),this._focusState=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},g.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},g.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},g.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),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 ec,ic=["data","categories"];function oc(t,e){for(var i in e){var o,r,n;!u(i,ic)&&Ee(e,i)&&(o=e[i],r=t[i],k(r))&&((n=null===o)||!k(o)?(delete t[i],n&&delete e[i]):r&&Bt(o)&&Bt(r)&&oc(r,o))}}function rc(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e(p=g,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:Z,width:2}}},categoryAxis:{},seriesDefaults:{type:ln,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const H1=p;function nc(){ec.apply(this,arguments)}(ec=c1)&&(nc.__proto__=ec),((nc.prototype=Object.create(ec&&ec.prototype)).constructor=nc).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new E(this.plotArea.box.x2,e.center().y):new E(e.center().x,-2),align:o}},nc.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const N1=nc;var sc=[rn,an],ac,hc,c,lc,h;function pc(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function cc(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function uc(t){return m(t)?[t]:t}function dc(){ac.apply(this,arguments)}(ac=H1)&&(dc.__proto__=ac),((dc.prototype=Object.create(ac&&ac.prototype)).constructor=dc).prototype._setElementClass=function(t){_t(t,"k-sparkline")},dc.prototype._initElement=function(t){ac.prototype._initElement.call(this,t),this._initialWidth=Math.floor(ne(t).width)},dc.prototype._resize=function(){var t=this.element,e=pc(t.childNodes);this._initialWidth=Math.floor(ne(t).width),cc(t.childNodes,e),ac.prototype._resize.call(this)},dc.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=pc(e.childNodes),o=document.createElement("span"),t=(o.innerHTML="&nbsp;",e.appendChild(o),O({width:this._autoWidth,height:ne(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return ne(e,{width:t.width,height:t.height}),e.removeChild(o),cc(e.childNodes,i),this.surface&&this.surface.resize(),t},dc.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},dc.prototype._createPlotArea=function(t){t=ac.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},dc.prototype._calculateWidth=function(t){for(var e=this.options,i=w(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],h=(a.options.series||[])[0];if(h){if(h.type===rn)return 150;if(h.type===an)return 150;if(h.type===vn)return ne(r).height;var l=a.categoryAxis;l&&(l=l.categoriesCount()*(!a.options.isStacked&&u(h.type,[ln,Ln])?a.seriesOptions.length:1),n=Math.max(n,l))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},dc.prototype._createSharedTooltip=function(t){return new N1(this._plotArea,t)},dc.normalizeOptions=function(t){t=uc(t);return(t=xt(t)?{seriesDefaults:{data:t}}:O({},t)).series||(t.series=[{data:uc(t.data)}]),O(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,sc)||u(t.seriesDefaults.type,sc)?O({},{categoryAxis:{crosshair:{visible:!1}}},t):t},e(c=dc,{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 U1=c;function fc(){hc.apply(this,arguments)}(hc=M.drawing.Animation)&&(fc.__proto__=hc),((fc.prototype=Object.create(hc&&hc.prototype)).constructor=fc).prototype.setup=function(){this._initialOpacity=parseFloat(Vt(this.element,"opacity").opacity)},fc.prototype.step=function(t){Vt(this.element,{opacity:String(Yt(this._initialOpacity,0,t))})},fc.prototype.abort=function(){hc.prototype.abort.call(this),Vt(this.element,{display:"none",opacity:String(this._initialOpacity)})},fc.prototype.cancel=function(){hc.prototype.abort.call(this),Vt(this.element,{opacity:String(this._initialOpacity)})};const G1=fc;function gc(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}function yc(t,e,i){lc.call(this),this.options=O({},this.options,i),this.container=t,this.chartService=e;i=Vt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),t.appendChild(this.element)}(lc=M.Class)&&(yc.__proto__=lc),((yc.prototype=Object.create(lc&&lc.prototype)).constructor=yc).prototype.createElements=function(){var t=this.element=gc("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=gc("k-tooltip k-chart-tooltip"),i=this.scroll=gc("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},yc.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Vo(Uo(t)+Uo(e-t)/2),h=.4*i.width(),l=i.center().x-h,p=(i.center().x-l)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=Dt(r),r=(this.clearHideTimeout(),this._visible||(Vt(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,Vt(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),Vt(s,["marginTop","borderTopWidth","height"]));Vt(n,{width:h,left:l+a*p,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),Vt(o,{visibility:"visible"})},yc.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},yc.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new G1(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},yc.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(h=yc,{format:"{0:d} - {1:d}",hideDelay:500});const W1=h;var vc,mc="_navigator",xc=mc,_c="_default",bc,i;function wc(t){vc.call(this),this.chart=t;var e=this.options=O({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),k(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new n_(this,((i={})[Yn]="_drag",i[qn]="_dragEnd",i[Kn]="_zoom",i[$n]="_zoomEnd",i)),t.addObserver(this.chartObserver)}function kc(){}(vc=M.Class)&&(wc.__proto__=vc),((wc.prototype=Object.create(vc&&vc.prototype)).constructor=wc).prototype.parseDate=function(t){return qo(this.chart.chartService.intl,t)},wc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},wc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},wc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},wc.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,o=o.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,h=(kc.prototype=i,new kc);0!==i.categoriesCount()&&(this.clean(),h.box=i.box,this.selection=new l1(t,h,{min:r,max:o,from:s||r,to:a||o,mousewheel:_(n,{zoom:"left"}),visible:e.visible},new n_(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new W1(t.element,t.chartService,{min:r,max:o,template:Dt(e.hint),format:e.hint.format}))},wc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[xc].roundedRange(),e=t.min,t=t.max,i=this.options.select||{},o=i.from||e,r=i.to||t;this.options.select=O({},i,{from:o=o<e?e:o,to:r=t<r?t:r}),this.filterAxes()},wc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(le(e.panes),t)},wc.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==mc});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},wc.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(o),o=e._plotArea.categoryAxis,e=t.axisRanges[o.options.name],t=this.options.select;e&&!r&&i&&(o=t.from&&t.to?Uo(t.to)-Uo(t.from):Uo(i.options.to)-Uo(i.options.from),r=Vo(x(Uo(e.min),n.min,Uo(n.max)-o)),t=Vo(x(Uo(r)+o,Uo(n.min)+o,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(r,t),this.showHint(r,t))},wc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},wc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},wc.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,i=(t=void 0===t?{}:t).from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==mc&&(n.min=i,n.max=o)}},wc.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:o.from,to:o.to},"category"!==e.options.type&&(e=new I_(O({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,t.from=jo(e.min,-e.baseUnitStep,e.baseUnit),t.to=jo(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},wc.prototype._zoom=function(t){var e,i,o=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),h=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),i=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<a-e?(r.zoom(h,i),this.readSelection()):(o.options.min=s.from,s.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),i).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},wc.prototype._zoomEnd=function(t){this._dragEnd(t)},wc.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},wc.prototype._selectStart=function(t){return this.chart._selectStart(t)},wc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},wc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},wc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[xc]},wc.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},wc.setup=function(t,e){var i,o,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,i=O({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=O({},i.pane,{name:mc}),i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach(function(t){t.name=t.name||_c}),wc.attachAxes(t,i),wc.attachSeries(t,i,e))},wc.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),i=(o.concat(t).forEach(function(t){t.pane=t.pane||_c}),0===xs(i,Rn).length),i=O({type:"date",pane:mc,roundToBaseUnit:!i,justified:i,_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;o.push(O({},i,{maxDateGroups:200},r,{name:xc,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),O({},i,r,{name:xc+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),O({},i,r,{name:xc+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(O({name:xc,pane:mc,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},wc.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(O({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:xc,categoryAxis:xc,autoBind:e.autoBindElements}))};const X1=wc;function Ac(){bc.apply(this,arguments)}(bc=H1)&&(Ac.__proto__=bc),((Ac.prototype=Object.create(bc&&bc.prototype)).constructor=Ac).prototype.applyDefaults=function(t,e){var i=ne(this.element).width||600,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&O({},e,i);X1.setup(t,e),bc.prototype.applyDefaults.call(this,t,e)},Ac.prototype._setElementClass=function(t){_t(t,"k-chart k-stockchart")},Ac.prototype.setOptions=function(t){this.destroyNavigator(),bc.prototype.setOptions.call(this,t)},Ac.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Ac.prototype._resize=function(){this.noTransitionsRedraw()},Ac.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Ac.prototype._dirty=function(){var t=this.options,t=Gt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Ac.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new X1(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),bc.prototype._redraw.call(this),t.initSelection()},Ac.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===mc?this._unsetActivePoint():bc.prototype._trackSharedTooltip.call(this,t)},Ac.prototype.bindCategories=function(){bc.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Ac.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===xc?t=o.categories:t&&o.pane===mc&&(o.categories=t)}},Ac.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Ac.prototype.destroy=function(){this.destroyNavigator(),bc.prototype.destroy.call(this)},Ac.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return bc.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===mc},Ac.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e(i=Ac,{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 Y1=i;var Sc="arrowPointer",Cc="barPointer",Pc=Math.PI/180,Tc="inside",t="linear",Mc="outside",tt="radialPointer",l="radialRangePointer";function Oc(t,e){var i=t.getOrigin(),o=t.getSize(),e=w(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var Lc=M.drawing.Group,Ic=M.drawing.Path,Bc=M.drawing.Text;function Ec(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=Ic.fromRect(new M.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new Bc(t.text,new M.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=Oc(t.bbox().clone(),e.padding),e=Ic.fromRect(o,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),o=new Lc;return o.append(i),o.append(e),o.append(t),o}function Rc(t,e,i){var o=k(t.from)?t.from:ht,r=k(t.to)?t.to:at;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Vc(t,e){e=w(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Oc(t,e)}var zc,jc=M.drawing.Path,Dc=M.drawing.Surface,s;function Fc(t,e,i,o){void 0===o&&(o={}),zc.call(this),this.element=t,this.theme=i,this.contextService=new T_(this,o),this._originalOptions=O({},this.options,e),this.options=O({},this._originalOptions),this._initTheme(i),this.redraw()}(zc=M.Class)&&(Fc.__proto__=zc),((Fc.prototype=Object.create(zc&&zc.prototype)).constructor=Fc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},Fc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},Fc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},Fc.prototype.exportVisual=function(){return this._visuals},Fc.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(xt(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},Fc.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},Fc.prototype.resize=function(){this.noTransitionsRedraw()},Fc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},Fc.prototype.redraw=function(){var t=this._surfaceSize(),t=new M.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),Vc(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},Fc.prototype.setOptions=function(t,e){this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),this._initTheme(e),this.redraw()},Fc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},Fc.prototype.setIntlService=function(t){this.contextService.intl=t},Fc.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=O({},e,this.options),this.options),i=t.pointer;if(xt(i)){for(var o=[],r=0;r<i.length;r++)o.push(O({},e.pointer,i[r]));t.pointer=o}},Fc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new M.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=Vc(e,i.width)),jc.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},Fc.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();ne(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Dc.create(i,{type:t.renderAs}))},Fc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&O(e,t.gaugeArea),e},Fc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},Fc.prototype.getSize=function(){return this._getSize()},Fc.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},Fc.prototype._defaultSize=function(){return{width:200,height:200}},Fc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e(s=Fc,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const q1=s;var Hc=M.drawing.Path,Nc=M.drawing.Group,Uc=M.geometry.Point,Gc,zn,Wc,jn,Xc,Vn,p,Yc,c;function qc(t,e,i,o){var r,n,s,a,h,l,p=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<p;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,l=h=a=s=void 0,a=(r=i).position,h=i.tickX,l=i.tickY,r=i.vertical?(s=new Uc(h,a),new Uc(h+n.size,a)):(s=new Uc(a,l),new Uc(a,l+n.size)),new Hc({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}function Zc(t,e){t=t||{};!k(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Gc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}(Gc=B_)&&(Zc.__proto__=Gc),((Zc.prototype=Object.create(Gc&&Gc.prototype)).constructor=Zc).prototype.initUserOptions=function(t){t=O({},this.options,t);return(t=O({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Pi(t.min,t.max),t},Zc.prototype.initFields=function(){},Zc.prototype.render=function(){var t=this.elements=new Nc,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},Zc.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Nc,a=n.length,h=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var p=Rc(n[l],e,i),c=this.getSlot(p.from,p.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(Hc.fromRect(new M.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:p.color,opacity:p.opacity},stroke:{}}))}return s},Zc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Nc,o=0;o<t.length;o++)i.append(Ec(t[o],e.labels));return i},Zc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Nc;return 0<t.width&&t.visible&&((t=new Hc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},Zc.prototype.renderTicks=function(){var t=new Nc,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return qc(t,this.getMajorTickPositions(),o,e.majorTicks),qc(t,this.getMinorTickPositions(),o,O({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e(zn=Zc,{min:0,max:50,majorTicks:{size:15,align:Tc,color:Z,width:.5,visible:!0},minorTicks:{size:10,align:Tc,color:Z,width:.5,visible:!0},line:{width:.5},labels:{position:Tc,padding:2},mirror:!1,_alignLines:!1});const Z1=zn;function Qc(t,e){Wc.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=O({},this.options,e);e.fill=e.color,this.scale=t,k(e.value)?e.value=x(e.value,o,i):e.value=o}function Kc(t,e){Xc.call(this,t,e),this.options=O({track:{visible:k(e.track)}},this.options)}(Wc=M.Class)&&(Qc.__proto__=Wc),((Qc.prototype=Object.create(Wc&&Wc.prototype)).constructor=Qc).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=k(e._oldValue)?e.value:o,e.value=x(t,o,i),this.elements&&this.repaint()},e(jn=Qc,{color:Z}),(Xc=Vn=jn)&&(Kc.__proto__=Xc),((Kc.prototype=Object.create(Xc&&Xc.prototype)).constructor=Kc).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=o.track.size||o.size,h=o.size/2,l=w(o.margin),l=n?l[s?"left":"right"]:l[s?"bottom":"top"],l=s?-l:l;n?(i=new R(r.x1+l,r.y1,r.x1+l,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==Cc&&(t=e=new R(r.x2+l,r.y1-h,r.x2+l,r.y2+h))):(i=new R(r.x1,r.y1-l,r.x2,r.y1-l),s?i.y2+=a:i.y1-=a,o.shape!==Cc&&(t=e=new R(r.x1-h,r.y1-l,r.x2+h,r.y1-l))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},Kc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:k(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Kc.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,i=t.mirror,t=t.vertical,e=w(e.margin);return t?e[i?"left":"right"]:e[i?"bottom":"top"]},e(p=Kc,{shape:Cc,track:{border:{width:1}},color:Z,border:{width:1},opacity:1,margin:w(3),animation:{type:Cc},visible:!0});const Q1=p;function $c(){Yc.apply(this,arguments)}(Yc=M.drawing.Animation)&&($c.__proto__=Yc),(($c.prototype=Object.create(Yc&&Yc.prototype)).constructor=$c).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e),this.fromScale=new M.geometry.Point(i.x1,i.y1)),n=this.toScale=new M.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},$c.prototype.step=function(t){var e=Yt(this.fromScale.x,this.toScale.x,t),t=Yt(this.fromScale.y,this.toScale.y,t);this.element.transform(M.geometry.transform().translate(e,t))},e(c=$c,{easing:t,duration:250}),M.drawing.AnimationFactory.current.register(Sc,c);const K1=c;var Jc,tu=M.geometry.Point,eu=M.drawing.Path,iu,h;function ou(t,e){Jc.call(this,t,e),k(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(Jc=Q1)&&(ou.__proto__=Jc),((ou.prototype=Object.create(Jc&&Jc.prototype)).constructor=ou).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new tu(0,0-i),new tu(0-o*e,0),new tu(0,0+i)]:[new tu(0-i,0),new tu(0,0+o*e),new tu(0+i,0)]},ou.prototype.repaint=function(){var t=this.scale,e=this.options,t=new K1(this.elements,O(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()},ou.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=Sc,new eu({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close()),o=t.getSlot(e.value);return i.transform(M.geometry.transform().translate(o.x1,o.y1)),this.elements=i};const $1=ou;function ru(){iu.apply(this,arguments)}(iu=M.drawing.Animation)&&(ru.__proto__=iu),((ru.prototype=Object.create(iu&&iu.prototype)).constructor=ru).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},ru.prototype.step=function(t){t=Yt(this.from,this.to,t);this._set(t)},ru.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},e(h=ru,{easing:t,speed:250}),M.drawing.AnimationFactory.current.register(Cc,h);const J1=h;var nu,su=M.drawing.Group,au=M.drawing.Path;function hu(t,e){nu.call(this,t,e),k(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(nu=Q1)&&(hu.__proto__=nu),((hu.prototype=Object.create(nu&&nu.prototype)).constructor=hu).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,o=o.vertical,r=r===o?-1:1,i=i.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=o?v:y,s=o?y:v,r=this._margin()*r,a=new M.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new M.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],o?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return o?(t.translate(i,0),e.translate(i,0)):(t.translate(0,i),e.translate(0,i)),[a,n,t,e]},hu.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue),o=(o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close(),new J1(o,O(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]})));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},hu.prototype.render=function(){var t=new su,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new au({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},hu.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new au.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const t0=hu;var lu,pu=M.drawing.Group,i;function cu(){lu.apply(this,arguments)}(lu=q1)&&(cu.__proto__=lu),((cu.prototype=Object.create(lu&&lu.prototype)).constructor=cu).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new R(i,o,i+t.width(),o+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},cu.prototype._buildVisual=function(){var t=new pu,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},cu.prototype._createModel=function(){var t=this.options,e=this.scale=new Z1(t.scale,this.contextService);this.pointers=[];for(var i=xt(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=O({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?$1:t0;this.pointers.push(new n(e,r))}},cu.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},cu.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new R(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new R(t.x1,r.y-e,t.x2,r.y+e))},cu.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new R(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new R(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},cu.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},cu.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e(i=cu,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const e0=i;var uu=M.drawing.Arc,du=M.drawing.Path,fu=M.drawing.Group,gu,s,yu,zn;function vu(t,e,i,o){var r=new fu,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),l=new M.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new du({stroke:{color:o.color,width:o.width}}).moveTo(h).lineTo(l))}return r}function mu(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}function xu(t,e){gu.call(this,0,1,t,e)}(gu=B_)&&(xu.__proto__=gu),((xu.prototype=Object.create(gu&&gu.prototype)).constructor=xu).prototype.initUserOptions=function(t){t=O({},this.options,t);return t.majorUnit=t.majorUnit||Pi(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},xu.prototype.initFields=function(){},xu.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()},xu.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!k(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},xu.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-i)/(o-i)*s:(t-i)/(o-i)*s+n)+180},xu.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},xu.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,i=0;return e.visible&&(i=e.size),i=t.visible?Math.max(t.size,i):i},xu.prototype.labelsCount=function(){var t=gu.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},xu.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new fu,s=.05*i,a=(k(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),h=a.position===Tc,l=k(this.labelElements);h&&(i-=this.ticksSize(),this.hasRanges()&&!l&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var p=this.labels,c=p.length,r=w(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=p[f],y=g.box.width()/2,v=g.box.height()/2,m=o[f],x=(m-180)*Pc,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(h?1:-1),m=m.y+Math.sin(x)*(v+d)*(h?1:-1),x=(g.reflow(new R(_-y,m-v,_+y,m+v)),new M.geometry.Point(g.box.x1,g.box.y1)),_=void 0;l?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||M.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=Ec(g,t.labels),n.append(_)),this.bbox=M.geometry.Rect.union(this.bbox,_.bbox())}return n},xu.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,e=e.rangeSize,o=this.getRangeRadius();this.options.labels.position===Tc&&(o+=e+i);for(var r=o+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=M.geometry.Rect.union(this.bbox,this.ranges.bbox())}},xu.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new fu;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var h=t[a],l=this.slotAngle(h[n?"to":"from"]),p=this.slotAngle(h[n?"from":"to"]);p-l!=0&&i.append(this.createRange(l,p,s,h))}}return i},xu.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,i=new M.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new uu(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},xu.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(mu(r,n,s));for(var a=0;a<i;a++)for(var h=Rc(e[a],r,n),l=o.length,p=0;p<l;p++){var c=o[p];if(c.from<=h.from&&h.from<=c.to){o.push(mu(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&o.push(mu(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return o},xu.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Mc?t.getRadiusX()-r-o-i:t.getRadiusX()-i},xu.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new M.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},xu.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=vu(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new fu),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===Mc&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=vu(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},xu.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},xu.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;o&&(a+=n,h=-h),360<=n&&i.max%e==0&&--s;for(var l=[],p=0;p<s;p++)l.push(L(a,K)),a+=h;return L(a)<=t.endAngle&&l.push(a),l},xu.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)},xu.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===Mc&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,l=a.x-h[0].anchor().x,a=a.y-h[0].anchor().y;t[s].transform((new M.geometry.transform).translate(l,a))}},e(s=xu,{min:0,max:100,majorTicks:{size:15,align:Tc,color:Z,width:.5,visible:!0},minorTicks:{size:10,align:Tc,color:Z,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Tc,padding:2}});const i0=s;function _u(t,e){yu.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}(yu=M.drawing.Animation)&&(_u.__proto__=yu),((_u.prototype=Object.create(yu&&yu.prototype)).constructor=_u).prototype.step=function(t){var e=this.options,t=Yt(e.oldAngle,e.newAngle,t);this.element.transform(M.geometry.transform().rotate(t,e.center))},e(zn=_u,{easing:t,duration:150}),M.drawing.AnimationFactory.current.register(tt,zn);const o0=zn;var bu,wu=M.drawing.Circle,ku=M.drawing.Group,Au=M.drawing.Path,jn;function Su(){bu.apply(this,arguments)}(bu=Vn)&&(Su.__proto__=bu),((Su.prototype=Object.create(bu&&bu.prototype)).constructor=Su).prototype.setAngle=function(t){this.elements.transform(M.geometry.transform().rotate(t,this.center))},Su.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new o0(this.elements,O(e.animation,{oldAngle:i,newAngle:t})).play()},Su.prototype.render=function(){var t=this.scale,e=this.options,i=new ku;return!1!==e.animation&&O(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Pc),i},Su.prototype.reflow=function(t){var e=this.center=t.center,i=x(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(t*this.options.cap.size);this.bbox=M.geometry.Rect.fromPoints(new M.geometry.Point(e.x-i,e.y-i),new M.geometry.Point(e.x+i,e.y+i))},Su.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Au({fill:{color:i},stroke:{color:i,width:.5}});return i.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(),i},Su.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new M.geometry.Circle(this.center,this.capSize);return new wu(e,{fill:{color:t},stroke:{color:t}})},e(jn=Su,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:tt,duration:150}});const r0=jn;var Cu,Pu=M.drawing.Group,p,Tu,c,Mu,h,Ou,Lu,Iu,i,Bu,s;function Eu(){Cu.apply(this,arguments)}(Cu=q1)&&(Eu.__proto__=Cu),((Eu.prototype=Object.create(Cu&&Cu.prototype)).constructor=Eu).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=M.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},Eu.prototype._buildVisual=function(t,e,i){var o=this._visuals=new Pu;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Eu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},Eu.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),h=L(a,K),l=L(-a,K),p=0,c=0;!(!(c++<100)||5<(p=n===o?p+1:0)||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||l!==r&&0<=(o=this.getPlotBox(l,t,s))&&o<=2||(r=0<e&&0<o?2*h:e<0&&o<0?2*l:L((h+l)/2||1,K),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(l=r,o=i):(h=r,e=i)},Eu.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=M.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},Eu.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Eu.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,e=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=M.geometry.Rect.union(r.bbox,n[s].bbox)},Eu.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new i0(t.scale,this.contextService);this.pointers=[];for(var o=xt(e)?e:[e],r=0;r<o.length;r++){var n=new r0(i,O({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e(p=Eu,{transitions:!0,gaugeArea:{background:""}});const n0=p;function Ru(){Tu.apply(this,arguments)}(Tu=i0)&&(Ru.__proto__=Tu),((Ru.prototype=Object.create(Tu&&Tu.prototype)).constructor=Ru).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},Ru.prototype.hasRanges=function(){return!0},Ru.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},Ru.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),o=this.slotAngle(o?t:e),t=this.createRange(r,o,this.getRangeRadius(),i);return this.ranges.append(t),t},e(c=Ru,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const s0=c;function Vu(t,e){Mu.call(this,t,e);var e=this.options,i=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=x(i,150,800),t.elements.options.get("stroke.color")),i=t.currentColor();e!==i&&(this.startColor=new M.Color(e),this.color=new M.Color(i))}(Mu=M.drawing.Animation)&&(Vu.__proto__=Mu),((Vu.prototype=Object.create(Mu&&Mu.prototype)).constructor=Vu).prototype.step=function(t){var e,i=this.options,o=this.startColor,r=this.color,i=Yt(i.oldAngle,i.newAngle,t);this.element.angle(i),r&&(i=L(Yt(o.r,r.r,t)),e=L(Yt(o.g,r.g,t)),o=L(Yt(o.b,r.b,t)),this.element.stroke(new M.Color(i,e,o).toHex()))},e(h=Vu,{easing:t,duration:150}),M.drawing.AnimationFactory.current.register(l,h);const a0=h;function zu(){Ou.apply(this,arguments)}(Ou=Vn)&&(zu.__proto__=Ou),((zu.prototype=Object.create(Ou&&Ou.prototype)).constructor=zu).prototype.repaint=function(){var t=this.scale,e=this.options,i=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 a0(this,O(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},zu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},zu.prototype.stroke=function(t){this.elements.stroke(t)},zu.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&O(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}))},zu.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,t=this.options,o=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(o)for(var s=0;s<o.length;s++){var a=o[s],h=a.color,l=a.from,a=(void 0===l&&(l=e),a.to);if(void 0===a&&(a=i),l<=n&&n<=a)return h}return r},zu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e(i=zu,{animation:{type:l,duration:150}});const h0=i;function ju(){Lu.apply(this,arguments)}(Lu=n0)&&(ju.__proto__=Lu),((ju.prototype=Object.create(Lu&&Lu.prototype)).constructor=ju).prototype._initTheme=function(t){Lu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},ju.prototype._createModel=function(){var t=this.options,e=this.scale=new s0(t.scale,this.contextService),e=new h0(e,O({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},ju.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},ju.prototype._setValueOptions=function(t){this.options.value=t},ju.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},ju.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,o=o.y-e/2;return t<i.width&&(t=r+t,r=Math.max(r,0),t>i.width)&&(r-=t-i.width),e<i.height&&(i=(t=this.scale.bbox).bottomRight().y,e=o+e,o=Math.max(o,t.origin.y),i<e)&&(o-=e-i),{left:r,top:o}};const l0=ju;function Du(){Iu.apply(this,arguments)}(Iu=l0)&&(Du.__proto__=Iu),((Du.prototype=Object.create(Iu&&Iu.prototype)).constructor=Du).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Iu.prototype._createModel.call(this)};const p0=Du;function Fu(t){Bu.call(this),this.setOptions(t),this.initProperties()}(Bu=M.Class)&&(Fu.__proto__=Bu),((Fu.prototype=Object.create(Bu&&Bu.prototype)).constructor=Fu).prototype.initProperties=function(){},Fu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},Fu.prototype.encode=function(t,e,i){t=k(t)?String(t):t;return this.initValue(t,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},Fu.prototype.initValue=function(){},Fu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},Fu.prototype.addData=function(){},Fu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e(s=Fu,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Hu,Nu=Object.assign,zn;function Uu(){Hu.apply(this,arguments)}(Hu=s)&&(Uu.__proto__=Hu),((Uu.prototype=Object.create(Hu&&Hu.prototype)).constructor=Uu).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Nu(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"})},Uu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Uu.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()},Uu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Uu.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength&&(i=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=i,this.addPattern(this.characterMap[i]))},Uu.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},Uu.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},Uu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Uu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Uu.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},e(zn=Uu,{addCheckSum:!0});var Gu,Wu,Xu=Object.assign,tt,jn;function Yu(){Gu.apply(this,arguments)}function qu(){Wu.apply(this,arguments)}(Wu=s)&&(qu.__proto__=Wu),((qu.prototype=Object.create(Wu&&Wu.prototype)).constructor=qu).prototype.initProperties=function(){Wu.prototype.initProperties.call(this),Xu(this,{minBaseUnitLength:.7})},qu.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()},qu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},qu.prototype.addBase=function(){},(Gu=tt=qu)&&(Yu.__proto__=Gu),((Yu.prototype=Object.create(Gu&&Gu.prototype)).constructor=Yu).prototype.initProperties=function(){Gu.prototype.initProperties.call(this),Xu(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"}}})},Yu.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Yu.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&i<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw o=Math.ceil(this.getBaseWidth(i)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+o+"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))},Yu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Yu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Yu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Yu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Yu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Yu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Yu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e(jn=Yu,{addCheckSum:!1});var Zu,Qu,Ku,$u,Ju,td,ed,id,od,rd,nd,sd={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,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];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 i=[],o=0;o<this.specialAsciiCodes[t].length;o++)i.push(this.characterMap[this.shiftCharacters[3]]),i.push(this.characterMap[this.specialAsciiCodes[t][o]]);else e=6*Math.floor(t/32)+(t-27)%32+64,i=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return i}],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"]},p=((td=jn)&&(xd.__proto__=td),((xd.prototype=Object.create(td&&td.prototype)).constructor=xd).prototype.initProperties=function(){td.prototype.initProperties.call(this),O(this,sd,{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}}})},xd),ad=Object.assign;(Ju=tt)&&(md.__proto__=Ju),((md.prototype=Object.create(Ju&&Ju.prototype)).constructor=md).prototype.initProperties=function(){Ju.prototype.initProperties.call(this),ad(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"}})},md.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},md.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.")},md.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},md.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},md.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},md.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},md.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},md.prototype._getCheckValues=function(){for(var t,e=this.values,i=e.length,o=0,r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r,this.cCheckSumTotal);for(t=o%this.checkSumMod,o=this.weightedValue(t,1,this.kCheckSumTotal),r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r+1,this.kCheckSumTotal);return[t,o%this.checkSumMod]},md.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},md.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},md.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)};var c,t=(($u=c=md)&&(vd.__proto__=$u),((vd.prototype=Object.create($u&&$u.prototype)).constructor=vd).prototype.initProperties=function(){$u.prototype.initProperties.call(this),O(this,sd,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,i=0;i<t.length;i++)e=t[i],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},vd),hd=/^\d+$/,ld=Object.assign,h=((Ku=s)&&(yd.__proto__=Ku),((yd.prototype=Object.create(Ku&&Ku.prototype)).constructor=yd).prototype.initProperties=function(){Ku.prototype.initProperties.call(this),ld(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},yd.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},yd.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()},yd.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},yd.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},yd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},yd.prototype.validate=function(t){if(hd.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(",")+".")},yd.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},yd),pd=/^\d+$/,cd=/^[a-z0-9]+$/i,ud=Object.assign;(Qu=M.Class)&&(gd.__proto__=Qu),((gd.prototype=Object.create(Qu&&Qu.prototype)).constructor=gd).prototype.initProperties=function(){},gd.prototype.addStart=function(){},gd.prototype.is=function(){},gd.prototype.isCode=function(){return!1},gd.prototype.move=function(){},gd.prototype.pushState=function(){};var Vn,l=((Zu=Vn=gd)&&(fd.__proto__=Zu),((fd.prototype=Object.create(Zu&&Zu.prototype)).constructor=fd).prototype.initProperties=function(){Zu.prototype.initProperties.call(this),O(this,{FNC4:"FNC4",SHIFT:98})},fd.prototype.addStart=function(){this.encoding.addPattern(this.START)},fd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},fd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},fd.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;for(u("C",i)&&(i=o.substr(t.index).match(/\d{4,}/g))&&(r=o.indexOf(i[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},fd.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)},fd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},fd.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},fd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},fd),dd={};function fd(t,e){Zu.call(this,t),this.states=e,this._initMoves(e)}function gd(t){Qu.call(this),this.encoding=t,this.initProperties()}function yd(){Ku.apply(this,arguments)}function vd(){$u.apply(this,arguments)}function md(){Ju.apply(this,arguments)}function xd(){td.apply(this,arguments)}function _d(t,e){ed.call(this,t),this.states=e}function bd(t,e){id.call(this,t),this._initSubStates(e)}function wd(){od.apply(this,arguments)}function kd(){rd.apply(this,arguments)}function Ad(){nd.apply(this,arguments)}dd.A=((nd=l)&&(Ad.__proto__=nd),((Ad.prototype=Object.create(nd&&nd.prototype)).constructor=Ad).prototype.initProperties=function(){nd.prototype.initProperties.call(this),ud(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Ad.prototype.isCode=function(t){return 0<=t&&t<96},Ad.prototype.getValue=function(t){return t<32?t+64:t-32},Ad),dd.B=((rd=l)&&(kd.__proto__=rd),((kd.prototype=Object.create(rd&&rd.prototype)).constructor=kd).prototype.initProperties=function(){rd.prototype.initProperties.call(this),ud(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},kd.prototype.isCode=function(t){return 32<=t&&t<128},kd.prototype.getValue=function(t){return t-32},kd),dd.C=((od=Vn)&&(wd.__proto__=od),((wd.prototype=Object.create(od&&od.prototype)).constructor=wd).prototype.initProperties=function(){od.prototype.initProperties.call(this),ud(this,{key:"C",MOVE:99,START:105})},wd.prototype.addStart=function(){this.encoding.addPattern(this.START)},wd.prototype.is=function(t,e){var i=jd(t,e,4);return(e+4<=t.length||2===t.length)&&pd.test(i)},wd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},wd.prototype.pushState=function(t){for(var e;(e=jd(t.value,t.index,2))&&pd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},wd.prototype.getValue=function(t){return t},wd),dd.FNC4=((id=Vn)&&(bd.__proto__=id),((bd.prototype=Object.create(id&&id.prototype)).constructor=bd).prototype.initProperties=function(){id.prototype.initProperties.call(this),ud(this,{key:"FNC4",dependentStates:["A","B"]})},bd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},bd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},bd.prototype.isCode=function(t){return 128<=t&&t<256},bd.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},bd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},bd.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},bd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},bd.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]},bd.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},bd),dd.FNC1=((ed=Vn)&&(_d.__proto__=ed),((_d.prototype=Object.create(ed&&ed.prototype)).constructor=_d).prototype.initProperties=function(){ed.prototype.initProperties.call(this),ud(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})},_d.prototype.addStart=function(){this.encoding[this.startState].addStart()},_d.prototype.is=function(){return u(this.key,this.states)},_d.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,h={state:this.startState};for(r.addPattern(this.START);;){if((e=(h.index=0)<(o=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(h.value=n.substring(a,i).replace(s,""),this.validate(e,h.value),r.pushData(h,this.dependentStates),i>=n.length)break;a=i,h.state!==this.startState&&(r[this.startState].move(h),h.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},_d.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!pd.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!cd.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},_d.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=jd(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},_d.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},_d.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,e),t=t.substring(e+1,i),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},_d.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&u(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},_d),(Od=s)&&(zd.__proto__=Od),((zd.prototype=Object.create(Od&&Od.prototype)).constructor=zd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),ud(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})},zd.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new dd[this.states[t]](this,this.states)},zd.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},zd.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())},zd.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var i;t.shifted?(i=t.state,t.state=t.previousState,t.previousState=i,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},zd.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},zd.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},zd.prototype.addStop=function(){this.addPattern(this.STOP)},zd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},zd.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},zd.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))};var Sd,Cd,Pd,Td,Md,Od,i,tt=((Md=i=zd)&&(Vd.__proto__=Md),((Vd.prototype=Object.create(Md&&Md.prototype)).constructor=Vd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),ud(this,{name:"Code 128 A",states:["A"]})},Vd),l=((Td=i)&&(Rd.__proto__=Td),((Rd.prototype=Object.create(Td&&Td.prototype)).constructor=Rd).prototype.initProperties=function(){Td.prototype.initProperties.call(this),ud(this,{name:"Code 128 B",states:["B"]})},Rd),Vn=((Pd=i)&&(Ed.__proto__=Pd),((Ed.prototype=Object.create(Pd&&Pd.prototype)).constructor=Ed).prototype.initProperties=function(){Pd.prototype.initProperties.call(this),ud(this,{name:"Code 128 C",states:["C"]})},Ed),Ld=((Cd=i)&&(Bd.__proto__=Cd),((Bd.prototype=Object.create(Cd&&Cd.prototype)).constructor=Bd).prototype.initProperties=function(){Cd.prototype.initProperties.call(this),ud(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Bd),i=((Sd=i)&&(Id.__proto__=Sd),((Id.prototype=Object.create(Sd&&Sd.prototype)).constructor=Id).prototype.initProperties=function(){Sd.prototype.initProperties.call(this),ud(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},Id);function Id(){Sd.apply(this,arguments)}function Bd(){Cd.apply(this,arguments)}function Ed(){Pd.apply(this,arguments)}function Rd(){Td.apply(this,arguments)}function Vd(){Md.apply(this,arguments)}function zd(t){Od.call(this,t),this._initStates()}function jd(t,e,i){return t.substring(e,e+i)}var Dd,Fd,Hd,Nd,Ud,Gd,Wd,Xd=Object.assign;(Wd=s)&&(pf.__proto__=Wd),((pf.prototype=Object.create(Wd&&Wd.prototype)).constructor=pf).prototype.initProperties=function(){Wd.prototype.initProperties.call(this),Xd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Kd})},pf.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},pf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},pf.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()},pf.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},pf.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},pf.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 Yd,qd=((Gd=Yd=pf)&&(lf.__proto__=Gd),((lf.prototype=Object.create(Gd&&Gd.prototype)).constructor=lf).prototype.initProperties=function(){Gd.prototype.initProperties.call(this),Xd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},lf),Zd=((Ud=Yd)&&(hf.__proto__=Ud),((hf.prototype=Object.create(Ud&&Ud.prototype)).constructor=hf).prototype.initProperties=function(){Ud.prototype.initProperties.call(this),Xd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},hf),Qd=((Nd=Yd)&&(af.__proto__=Nd),((af.prototype=Object.create(Nd&&Nd.prototype)).constructor=af).prototype.initProperties=function(){Nd.prototype.initProperties.call(this),Xd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},af),Yd=((Hd=Yd)&&(sf.__proto__=Hd),((sf.prototype=Object.create(Hd&&Hd.prototype)).constructor=sf).prototype.initProperties=function(){Hd.prototype.initProperties.call(this),Xd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},sf),Kd={Modulo10:function(t){for(var e,i,o=[0,""],r=t.length%2,n=0;n<t.length;n++)o[(n+r)%2]+=parseInt(t.charAt(n),10);for(i=o[0],e=(2*o[1]).toString(),n=0;n<e.length;n++)i+=parseInt(e.charAt(n),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%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))}},$d=Object.assign,s=((Fd=s)&&(nf.__proto__=Fd),((nf.prototype=Object.create(Fd&&Fd.prototype)).constructor=nf).prototype.initProperties=function(){Fd.prototype.initProperties.call(this),$d(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]}})},nf.prototype.initValue=function(t,e,i){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=i,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},nf.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)},nf.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},nf.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},nf.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},nf),Jd=Object.assign,tf=((Dd=s)&&(rf.__proto__=Dd),((rf.prototype=Object.create(Dd&&Dd.prototype)).constructor=rf).prototype.initProperties=function(){Dd.prototype.initProperties.call(this),Jd(this,{name:"EAN 8"})},rf.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,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)},rf),ef={code11:zn,code39:jn,code39extended:p,code93:c,code93extended:t,code128:Ld,code128a:tt,code128b:l,code128c:Vn},of,zn;function rf(){Dd.apply(this,arguments)}function nf(){Fd.apply(this,arguments)}function sf(){Hd.apply(this,arguments)}function af(){Nd.apply(this,arguments)}function hf(){Ud.apply(this,arguments)}function lf(){Gd.apply(this,arguments)}function pf(){Wd.apply(this,arguments)}function cf(t,e){var i=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=i,e}function uf(t,e,i){void 0===i&&(i=Be),of.call(this),this.options=O({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&k(e.value)&&this.redraw()}ef["gs1-128"]=i,ef.msimod10=qd,ef.msimod11=Zd,ef.msimod1010=Qd,ef.msimod1110=Yd,ef.postnet=h,ef.ean8=tf,ef.ean13=s,(of=M.Class)&&(uf.__proto__=of),((uf.prototype=Object.create(of&&of.prototype)).constructor=uf).prototype.destroy=function(){this._destroySurface()},uf.prototype._initElement=function(){_t(this.element,"k-barcode")},uf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},uf.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},uf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},uf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},uf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},uf.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},uf.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)},uf.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},uf.prototype._resize=function(){this.redraw()},uf.prototype.createVisual=function(){this.visual=this._render()},uf.prototype._render=function(){var t,e=this.options,i=e.value,o=e.text,r=w(o.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new R(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),l=new M.drawing.Group;this.contentBox=s,l.append(this._getBackground(n)),o.visible&&(h-=M.drawing.util.measureText(i,{font:o.font}).height+r.top+r.bottom);try{t=a.encode(i,s.width(),h)}catch(t){return this.onError(t),l}return o.visible&&(n=i,e.checksum&&k(a.checksum)&&(n+=" "+a.checksum),l.append(this._getText(n))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),l.append(this._bandsGroup),l},uf.prototype.exportVisual=function(){return this._render()},uf.prototype._getSize=function(){var t=cf(this.element,this.options.renderAs),e=new M.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},uf.prototype.value=function(t){if(!k(t))return this.options.value;this.options.value=String(t),this.redraw()},uf.prototype._getBands=function(t,e){for(var i=this.contentBox,o=i.x1,r=new M.drawing.Group,n=0;n<t.length;n++){var s,a=(s=Bt(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=M.geometry.Rect.fromPoints(new M.geometry.Point(o,s.y1+i.y1),new M.geometry.Point(o+a,s.y2+i.y1)),s=M.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),o+=a}return r},uf.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new R(0,0,t.width,t.height).unpad(i.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},uf.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new w_(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},uf.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),!ef[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new ef[this.type],this.options=O({},this.options,t)},e(zn=uf,{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 c0=zn;var df={width:500,height:100};const u0=function(t,e){if(void 0===e&&(e=df),!t)throw new Error("Please specify barcode type to validate.");var i,o,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),ef[n])return i=new ef[n],o=e,r=s,function(t){try{i.encode(r+t,o.width,o.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var ff=Object.assign;function gf(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function yf(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function vf(t){return parseInt(t,2)}(Af=M.Class)&&(Rf.__proto__=Af),((Rf.prototype=Object.create(Af&&Af.prototype)).constructor=Rf).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Rf.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}},Rf.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var mf,xf,_f,bf,wf,kf,Af,Sf=Rf,Cf=((kf=M.Class)&&(Ef.__proto__=kf),(Ef.prototype=Object.create(kf&&kf.prototype)).constructor=Ef),Pf=((wf=M.Class)&&(Bf.__proto__=wf),((Bf.prototype=Object.create(wf&&wf.prototype)).constructor=Bf).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],i=0,o=n;for(e.push(ug(o,eg,ig,og,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=ug(o,rg,ng,sg,t);r.mode!==t?(t=r.mode,e.push(r),i++):e[i].modeString+=r.modeString,o=o.substr(r.modeString.length)}return e}(),t=dg(function(t){for(var e=0,i=0;i<t.length;i++)e+=Tf[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var i="",o=0;o<t.length;o++)i+=Tf[t[o].mode].encode(t[o].modeString,e);return i}(e,t);return new Cf(e,t)},Bf);(bf=M.Class)&&(If.__proto__=bf),((If.prototype=Object.create(bf&&bf.prototype)).constructor=If).prototype.initProperties=function(){ff(this,{modeIndicator:"",bitsInCharacterCount:[]})},If.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},If.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},If.prototype.getModeCountString=function(t,e){return this.modeIndicator+yf(t,this.getBitsCharacterCount(e))},If.prototype.encode=function(){},If.prototype.getStringBitsLength=function(){},If.prototype.getValue=function(){};var jn,p=((_f=jn=If)&&(Lf.__proto__=_f),((Lf.prototype=Object.create(_f&&_f.prototype)).constructor=Lf).prototype.initProperties=function(){_f.prototype.initProperties.call(this),ff(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},Lf.prototype.getValue=function(t){return parseInt(t,10)},Lf.prototype.encode=function(t,e){for(var i=gf(t,3),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=yf(i[r],10);return o+yf(i[r],1+3*i[r].length)},Lf.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0==i?0:1)},Lf),c=((xf=jn)&&(Of.__proto__=xf),((Of.prototype=Object.create(xf&&xf.prototype)).constructor=Of).prototype.initProperties=function(){xf.prototype.initProperties.call(this),ff(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"})},Of.prototype.getValue=function(t){return this.characters[t]},Of.prototype.encode=function(t,e){for(var i=gf(t,2),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=yf(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+yf(2===i[r].length?45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)):this.getValue(i[r].charAt(0)),1+5*i[r].length)},Of.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},Of),t=((mf=jn)&&(Mf.__proto__=mf),((Mf.prototype=Object.create(mf&&mf.prototype)).constructor=Mf).prototype.initProperties=function(){mf.prototype.initProperties.call(this),ff(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},Mf.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+'".')},Mf.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=yf(this.getValue(t.charAt(o)),8);return i},Mf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},Mf),Tf={};function Mf(){mf.apply(this,arguments)}function Of(){xf.apply(this,arguments)}function Lf(){_f.apply(this,arguments)}function If(){bf.call(this),this.initProperties()}function Bf(){wf.apply(this,arguments)}function Ef(t,e){kf.call(this),this.dataString=t,this.version=e}function Rf(t){Af.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}Tf.numeric=new p,Tf.alphanumeric=new c,Tf.byte=new t,(Vf=M.Class)&&(hg.__proto__=Vf),((hg.prototype=Object.create(Vf&&Vf.prototype)).constructor=hg).prototype.initProperties=function(){ff(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},hg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=dg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new Cf(t,e)},hg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},hg.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},hg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=yf(t,8);else{for(var e=8-e,r=0;r<i;r++)o=yf(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},hg.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1};var Vf,zf=hg,jf=[{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}}],Df="numeric",Ff="alphanumeric",Hf="byte",Nf={1:0},Uf={0:1},Gf={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},Wf=[1,0,1,1,1],Xf=[1,0,1],Yf={L:"01",M:"00",Q:"11",H:"10"},qf=["11101100","00010001"],Zf=93,Qf=[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}],Kf=/^\d+/,Ld="A-Z0-9 $%*+./:-",$f=new RegExp("^[A-Z $%*+./:-]+"),Jf=new RegExp("^["+Ld+"]+"),tg=new RegExp("^[^"+Ld+"]+"),eg=8,ig=5,og=8,rg=17,ng=9,sg=16,ag=[[1,0],[1,25,0]];function hg(){Vf.call(this),this.initProperties(),this.mode=Tf[this.encodingMode]}function lg(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function pg(t,e,i,o){for(var r=0;r<Qf.length;r++)t[r][i][o]=Qf[r](i,o)?1^e:parseInt(e,10)}function cg(t,e){for(var i,o=ag[e-1],r=new Array(e).concat(t),n=new Array(r.length-o.length).concat(o),s=t.length,a=[],h=0;h<s;h++)i=function(t,e){for(var i=[],o=t.length-1;i[o]=Uf[(t[o]+e)%255],void 0!==t[--o];);return i}(n,Nf[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var i=[],o=t.length-2;0<=o;o--)i[o]=t[o]^e[o];return i}(i,r);for(h=r.length-1;0<=h;h--)a[e-1-h]=yf(r[h],8);return a}function ug(t,e,i,o,r){var n,s=Kf.exec(t),s=s?s[0]:"",a=$f.exec(t),a=a?a[0]:"",h=Jf.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!Jf.test(t.charAt(s.length)))?(n=Df,s):h&&(t.length===h.length||h.length>=o||r===Ff)?(n=Ff,s||a):(n=Hf,h?h+tg.exec(t.substring(h.length))[0]:tg.exec(t)[0]);return{mode:n,modeString:e}}function dg(t,e){for(var i=0,o=jf.length-1,r=Math.floor(jf.length/2);t<jf[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=jf[i][e].totalDataCodewords?r+1:o+1}function fg(t,e,i){var o=vf(e),e=e.length-1,r=t<<e;return yf(t,i-e)+yf(function(t,e){for(var i=e.toString(2).length,o=t.toString(2).length,r=t;i<=(o=(r^=e<<o-i).toString(2).length););return r}(r,o),e)}function gg(t,e){return parseInt(t.charAt(e),10)}function yg(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&lg(t,gg(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&lg(t,gg(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)lg(t,gg(e,r-1-o++),n,s);for(lg(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)lg(t,gg(e,r-1-o++),n,s)}function vg(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,h=0;h<e.length;h++)i=Math.floor(h/3),o=h%3,lg(t,r=gg(e,e.length-h-1),0+i,s+o),lg(t,r,a+o,0+i)}function mg(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var h=a;h<n-a;h++)lg(t,r=e[a],i+h,o+a),lg(t,r,i+a,o+h),lg(t,r,i+s-h,o+s-a),lg(t,r,i+s-a,o+s-h)}function xg(t,e,i,o){for(var r=i,n=o,s=t[0];lg(t,0,r,o),lg(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function _g(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,e[t][o]===Zf&&(i[t]+=40)}function bg(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function wg(t,e,i){var i=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?zf:Pf)).getEncodingResult(t,e),r=i.version,n=jf[r-1][e],t=function(t,e){for(var i,o=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var h=s[a][0],l=0;l<h;l++){for(var p=s[a][1],c=[],u=[],d=1;d<=p;d++)i=t.substring(o,o+8),c.push(i),u[p-d]=vf(i),o+=8;r.push(c),n.push(cg(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,i=0,o=0,r=t;r.length<e&&i<4;)r+="0000".charAt(i++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=qf[o],o^=1;return r}(i.dataString),n),i=function(){for(var t=[],e=17+4*r,i=0;i<Qf.length;i++){t[i]=new Array(e);for(var o=0;o<e;o++)t[i][o]=new Array(e)}return t}(),o=(p=(s=i)[0].length,mg(s,Wf,0,0),xg(s,[-1,-1],7,7),mg(s,Wf,p-7,0),xg(s,[1,-1],p-8,7),mg(s,Wf,0,p-7),xg(s,[-1,1],7,p-8),i),s=r;if(!(s<2)){var a,h=o[0],l=h.length,p=Math.floor(s/7),c=[6],u=0;for((s=Gf[s])?a=(l-13-s)/p:s=a=(l-13)/(p+1),c.push(c[u++]+s);c[u]+a<l;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===h[c[d]][c[f]]&&mg(o,Xf,c[d]-2,c[f]-2)}for(var g=i,y=1,v=g[0].length,m=8;m<v-8;m++)lg(g,y,6,m),lg(g,y,m,6),y^=1;7<=r&&vg(i,yf(0,18)),yg(i,yf(0,15));for(var x,_,b,w=i,k=t,A=new Sf(w[0]),S=0;S<k.length;S++)for(x=k[S],_=0;0<x.length;){for(var C=0;C<x.length;C++)for(var P=0;P<8;P++)b=A.getNextCell(),pg(w,x[C][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=A.getNextRemainderCell();)pg(w,0,b.row,b.column);p=function(t){for(var e,i=[],o=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)s[h]=[r[h]=i[h]=0,0],n[h]=[0,0],o[h]=[];for(var l=0;l<a;l++)for(var p=0;p<a;p++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[l][p],10),o[c][0]===e[l][p]&&l+1<a&&0<=p-1&&e[l+1][p]===o[c][0]&&e[l+1][p-1]===o[c][0]&&(i[c]+=3),_g(c,n,i,0,e[l][p]),_g(c,n,i,1,e[p][l]),bg(c,i,o,e[l][p],s,0),bg(c,i,o,e[p][l],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<i.length;h++)i[h]+=(d=r[h],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)),i[h]<v&&(v=i[h],u=h);return u}(i),s=i[p];return 7<=r&&vg([s],fg(r,"1111100100101",18)),yg([s],function(t){var e="";if(0===vf(t))return"101010000010010";for(var i=fg(vf(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e}(Yf[e]+yf(p,3))),s}for(var kg,Ag=1;Ag<255;Ag++)255<(kg=2*Uf[Ag-1])&&(kg^=285),Uf[Ag]=kg,Nf[kg]=Ag;kg=2*Uf[Ag-1]^285,Uf[Ag]=kg,Uf[-1]=0;for(var Sg=2;Sg<=68;Sg++){var Cg=ag[Sg-1];ag[Sg]=function(t,e){for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)i[o+r]=void 0===i[o+r]?(t[o]+(0<=e[r]?e[r]:0))%255:Nf[Uf[i[o+r]]^Uf[(t[o]+e[r])%255]];return i}(Cg,[Sg,0])}var Pg,Tg=Math.round,Mg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Og=[[0,1],[1,1],[1,0]],tt;function Lg(t,e,i){void 0===i&&(i=Be),Pg.call(this),this.options=O({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)}(Pg=M.Class)&&(Lg.__proto__=Pg),((Lg.prototype=Object.create(Pg&&Pg.prototype)).constructor=Lg).prototype.destroy=function(){this._destroySurface()},Lg.prototype._initElement=function(){_t(this.element,"k-qrcode")},Lg.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Lg.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Lg.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Lg.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Lg.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Lg.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},Lg.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,i={width:0,height:0};return 0<e&&(i.width=e),t&&(i.height=t),i},Lg.prototype._resize=function(){this.redraw()},Lg.prototype.createVisual=function(){this.visual=this._render()},Lg.prototype.exportVisual=function(){return this._render()},Lg.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,h=s.width||0,l=(s.width=h,new M.drawing.Group);try{n&&(i=wg(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(h+a),t=this._calculateBaseUnit(r,i.length),e=h+a+(r-i.length*t)/2,l.append(this._renderBackground(o,s)),l.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(o,t)):this._isSwiss()&&l.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return l},Lg.prototype._renderLogo=function(t,e){var t=Tg(t/2),e=this._getLogoSize(7*e),i=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new M.geometry.Rect(new M.geometry.Point(t.x,t.y),new M.geometry.Size(e.width,e.height));return new M.drawing.Image(i,t)},Lg.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,t=t/2,n={},s=new M.drawing.Group;return n.x=n.y=Math.ceil(t-e-i/2),s.append(this._renderShape(n,Math.ceil(i+2*e),Og,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,Og,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,Mg,"#fff")),s},Lg.prototype._renderShape=function(t,e,i,o){var r=new M.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},Lg.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=cf(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},Lg.prototype._calculateBaseUnit=function(t,e){var i,o=Math.floor(t/e);return o<1?(i=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))):t<=o*e&&1<=o-1&&o--,o},Lg.prototype._renderMatrix=function(t,e,i){for(var o=new M.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+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=Tg(i+a*e),h=Tg(n),l=Tg(i+s*e),p=Tg(n+e);o.moveTo(a,h).lineTo(a,p).lineTo(l,p).lineTo(l,h).close()}}return o},Lg.prototype._renderBackground=function(t,e){t=new R(0,0,t,t).unpad(e.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},Lg.prototype.setOptions=function(t){this.options=ff(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},Lg.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},Lg.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},Lg.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},Lg.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},e(tt=Lg,{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 d0=tt,f0=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{wg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var Ig={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Bg(t){return t*t}var Eg,Rg,Vg=Math,zg=Vg.abs,jg=Vg.atan,Dg=Vg.atan2,Fg=Vg.cos,Hg=Vg.sin,Ng=Vg.tan,Ug=((Rg=M.Class)&&(oy.__proto__=Rg),((oy.prototype=Object.create(Rg&&Rg.prototype)).constructor=oy).prototype.initProperties=function(){O(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},oy.prototype.toArray=function(){return[this.lat,this.lng]},oy.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},oy.prototype.clone=function(){return new oy(this.lat,this.lng)},oy.prototype.round=function(t){return this.lng=L(this.lng,t),this.lat=L(this.lat,t),this},oy.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},oy.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},oy.prototype.destination=function(t,e,i){var e=ce(e),i=i||Ig.WGS84,o=ce(this.lat),r=ce(this.lng),t=t/i.a,i=Vg.asin(Hg(o)*Fg(t)+Fg(o)*Hg(t)*Fg(e)),r=r+Dg(Hg(e)*Hg(t)*Fg(o),Fg(t)-Hg(o)*Hg(i));return new oy(oe(i),oe(r))},oy.prototype.greatCircleTo=function(t,e){var i=oy.create(void 0),e=e||Ig.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,r,n=e.a,s=e.b,a=e.f,h=ce(i.lng-this.lng),e=jg((1-a)*Ng(ce(this.lat))),l=Hg(e),p=Fg(e),e=jg((1-a)*Ng(ce(i.lat))),c=Hg(e),u=Fg(e),d=h,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Hg(d),v=Fg(d),m=Vg.sqrt(Bg(u*y)+Bg(p*c-l*u*v)),x=Dg(m,r=l*c+p*u*v),_=p*u*y/m,b=0,w=(0!=(o=1-Bg(_))&&(b=r-2*l*c/o),d),k=a/16*o*(4+a*(4-3*o)),d=h+(1-k)*a*_*(x+k*m*(b+k*r*(2*Bg(b)-1))),g=zg(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(Bg(n)-Bg(s))/Bg(s),e=1+i/16384*(4096+i*(i*(320-175*i)-768)),n=i/1024*(256+i*(i*(74-47*i)-128)),i=n*m*(b+n/4*(r*(2*Bg(b)-1)-n/6*b*(4*Bg(m)-3)*(4*Bg(b)-3))),n=Dg(u*y,p*c-l*u*v),A=Dg(p*y,-l*u+p*c*v);return{distance:L(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:oe(n),azimuthTo:oe(A)}},oy.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},oy.fromLngLat=function(t){return new oy(t[1],t[0])},oy.fromLatLng=function(t){return new oy(t[0],t[1])},oy.create=function(t,e){if(k(t))return t instanceof oy?t.clone():1===arguments.length&&2===t.length?oy.fromLatLng(t):new oy(t,e)},oy),Gg=Math,Wg=Gg.atan,Xg=Gg.exp,Yg=Gg.pow,qg=Gg.sin,Zg=Gg.log,Qg=Gg.tan,Kg=M.geometry.Point,$g=Gg.PI,Jg=$g/2,ty=$g/4,ey=$g/180,l=Ig.WGS84,Vn;function iy(t){Eg.call(this),this.initProperties(),this._initOptions(t)}function oy(t,e){Rg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}function ry(t,e){return t.bind(e)}function ny(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function sy(t,e){e.insertBefore(t,e.firstChild)}function ay(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function hy(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}function ly(t,e){var i=t.prototype;i.events?e.forEach(function(t){i.events.indexOf(t)<0&&i.events.push(t)}):i.events=e}function py(t){var e=[];if(t)for(var i=ay(t).split("-"),o=0;o<i.length;o++)e.push("k-pos-"+i[o]);return e.join(" ")}(Eg=M.Class)&&(iy.__proto__=Eg),((iy.prototype=Object.create(Eg&&Eg.prototype)).constructor=iy).prototype._initOptions=function(t){this.options=O({},this.options,t)},iy.prototype.initProperties=function(){O(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},iy.prototype.forward=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,r=x(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?x(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=ce(e-i)*o,e=this._projectLat(r);return new Kg(t,e)},iy.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=ce(t),o=Qg(ty+t/2),t=i*qg(t),t=Yg((1-t)/(1+t),i/2);return e*Zg(o*t)},iy.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,o=t.x/(ey*o)+i,i=x(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=x(o,-this.MAX_LNG,this.MAX_LNG)),new Ug(i,o)},iy.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=Xg(-t/i),s=Jg-2*Wg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=o*qg(s),h=Yg((1-h)/(1+h),r),h=Jg-2*Wg(n*h)-s;if(s+=h,Gg.abs(h)<=this.INVERSE_CONVERGENCE)break}return oe(s)},e(Vn=iy,{centralMeridian:0,datum:l}),(dy=Vn)&&(_y.__proto__=dy),((_y.prototype=Object.create(dy&&dy.prototype)).constructor=_y).prototype.initProperties=function(){dy.prototype.initProperties.call(this),O(this,{MAX_LAT:85.0511287798})},_y.prototype._projectLat=function(t){var e=this.options.datum.a,t=ce(t),t=Qg(ty+t/2);return e*Zg(t)},_y.prototype._inverseY=function(t){var e=this.options.datum.a,t=Xg(-t/e);return oe(Jg-2*Wg(t))};var cy,uy,dy,fy=_y,gy=((uy=M.Class)&&(xy.__proto__=uy),((xy.prototype=Object.create(uy&&uy.prototype)).constructor=xy).prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},xy.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},xy),yy=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),vy=((cy=p_)&&(my.__proto__=cy),((my.prototype=Object.create(cy&&cy.prototype)).constructor=my).prototype._initOptions=function(t){this.options=O({},this.options,t)},my.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},my.prototype.add=function(t){var e=t;k(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},my.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},my.prototype.clear=function(){this.items=[],ny(this.element)},my.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],i=this._itemText(i);""!==i&&t.push(i)}if(0<t.length){ny(this.element);var o=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=o;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},my.prototype.hideElement=function(){this.element.style.display="none"},my.prototype.showElement=function(){this.element.style.display=""},my.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},my.prototype._inZoomLevel=function(t,e){t=_(t,-Number.MAX_VALUE),e=_(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},my.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},my);function my(t,e){cy.call(this),this.element=t,this._initOptions(e),this.items=[],_t(this.element,"k-widget k-attribution")}function xy(){uy.call(this);var t=this._proj=new fy,t=this.c=2*$g*t.options.datum.a;this._tm=M.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=M.geometry.transform().scale(t,-t).translate(-.5,-.5)}function _y(){dy.apply(this,arguments)}e(vy,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var by={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 wy(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+by[t].className+'" aria-label="move '+t+'">'+be({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return yy(t)}(ky=p_)&&(Sy.__proto__=ky),((Sy.prototype=Object.create(ky&&ky.prototype)).constructor=Sy).prototype.destroy=function(){this.dispose()},Sy.prototype.dispose=function(){Ue(this._keyroot,"keydown",this._keydownHandler)},Sy.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Sy.prototype._initOptions=function(t){this.options=O({},this.options,t)},Sy.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},Sy.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},Sy.prototype._keydown=function(t){switch(t.which){case h_.UP:this._pan(0,1),t.preventDefault();break;case h_.DOWN:this._pan(0,-1),t.preventDefault();break;case h_.RIGHT:this._pan(1,0),t.preventDefault();break;case h_.LEFT:this._pan(-1,0),t.preventDefault()}};var ky,Ay=Sy;function Sy(t,e){ky.call(this),this.element=t,this._initOptions(e);var t=wy("up",e.icons),i=wy("right",e.icons),o=wy("down",e.icons),e=wy("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(i),this.element.appendChild(o),this.element.appendChild(e),_t(this.element,"k-widget k-navigator"),Ne(this.element,"click",".k-button",ry(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=ry(this._keydown,this),Ne(this._keyroot,"keydown",this._keydownHandler)}function Cy(t,e,i){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+'">'+be({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return yy(t)}e(Ay,{name:"Navigator",panStep:1}),ly(Ay,["pan"]),(Py=p_)&&(My.__proto__=Py),((My.prototype=Object.create(Py&&Py.prototype)).constructor=My).prototype.destroy=function(){this.element&&Ue(this.element,"click",this._clickHandler),this._keyroot&&Ue(this._keyroot,"keydown",this._keydownHandler)},My.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},My.prototype._initOptions=function(t){this.options=O({},this.options,t)},My.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},My.prototype._click=function(t){var e=1;Wt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},My.prototype._keydown=function(t){switch(t.which){case h_.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case h_.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var Py,Ty=My;function My(t,e,i){Py.call(this),this.element=t,this._initOptions(e);t=Cy("in","plus",i),e=Cy("out","minus",i),this.element.appendChild(t),this.element.appendChild(e),this.element.setAttribute("role","group"),_t(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Ne(this.element,"click",".k-button",this._clickHandler),i=this.element.parentNode.closest("[data-role]");this._keyroot=i||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Ne(this._keyroot,"keydown",this._keydownHandler)}e(Ty,{name:"ZoomControl",zoomStep:1}),ly(Ty,["change"]);var Oy,Ly,i,Iy=(i=Math).max,By=i.min,Ey=((Ly=M.Class)&&(jy.__proto__=Ly),qd={World:{configurable:!0}},((jy.prototype=Object.create(Ly&&Ly.prototype)).constructor=jy).prototype.contains=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),r=_(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},jy.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new Ug(e,i)},jy.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},jy.prototype.include=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),t=_(t.lat,t[0]);e.lng=By(e.lng,o),e.lat=Iy(e.lat,t),i.lng=Iy(i.lng,o),i.lat=By(i.lat,t)},jy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},jy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Ug(t.lat,e.lng),se:this.se,sw:new Ug(e.lat,t.lng)}},jy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Ug(t.lat,e.lng),e,new Ug(e.lat,t.lng)]},jy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},jy.create=function(t,e){return t instanceof jy?t:t&&e?new jy(t,e):t&&4===t.length&&!e?new jy([t[0],t[1]],[t[2],t[3]]):void 0},qd.World.get=function(){return new jy([90,-180],[-90,180])},Object.defineProperties(jy,qd),jy),Ry="centerChange",Vy=((Oy=M.Class)&&(zy.__proto__=Oy),Zd={anchor:{configurable:!0}},((zy.prototype=Object.create(Oy&&Oy.prototype)).constructor=zy).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)},zy.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},Zd.anchor.get=function(){return this._anchor},Zd.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}},zy.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(zy.prototype,Zd),zy);function zy(t,e){Oy.call(this),this.widgetService=t,this.options=O({},this.options,e),this.offset={x:0,y:0}}function jy(t,e){Ly.call(this);t=Ug.create(t),e=Ug.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(Vy,{border:{width:1},opacity:1}),(Dy=M.Class)&&(Uy.__proto__=Dy),((Uy.prototype=Object.create(Dy&&Dy.prototype)).constructor=Uy).prototype.destroy=function(){this._deactivate()},Uy.prototype._initOptions=function(t){this.options=O({},this.options,t)},Uy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Uy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Uy.prototype.reset=function(){this._beforeReset(),this._reset()},Uy.prototype._reset=function(){this._applyExtent()},Uy.prototype._beforeReset=function(){},Uy.prototype._resize=function(){},Uy.prototype._panEnd=function(){this._applyExtent()},Uy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!k(t.minZoom)||e>=t.minZoom,e=!k(t.maxZoom)||e<=t.maxZoom,t=Ey.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},Uy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Uy.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)},Uy.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)},Uy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Uy.prototype._readData=function(){return this.options.data||[]},Uy.prototype._hasData=function(){return this._data&&0<this._data.length},Uy.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Dy,Qd=Uy,Fy=Math,Hy=M.geometry.Point,Ny,Yd;function Uy(t,e){Dy.call(this),this.support=Ge(),this._initOptions(e),this.map=t;e=document.createElement("div");_t(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 Gy(t){return Ot(t)?t:o_.compile(t)}function Wy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}function Xy(t,e){Ny.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)}(Ny=Qd)&&(Xy.__proto__=Ny),((Xy.prototype=Object.create(Ny&&Ny.prototype)).constructor=Xy).prototype.destroy=function(){Ny.prototype.destroy.call(this),this._view.destroy(),this._view=null},Xy.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Xy.prototype._reset=function(){Ny.prototype._reset.call(this),this._updateView(),this._view.reset()},Xy.prototype._viewType=function(){return Zy},Xy.prototype._activate=function(){Ny.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,M.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Xy.prototype._deactivate=function(){Ny.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Xy.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),i={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},Xy.prototype._resize=function(){this._render()},Xy.prototype._panEnd=function(t){Ny.prototype._panEnd.call(this,t),this._render()},Xy.prototype._render=function(){this._updateView(),this._view.render()},e(Yd=Xy,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1}),(qy=M.Class)&&($y.__proto__=qy),(($y.prototype=Object.create(qy&&qy.prototype)).constructor=$y).prototype._initOptions=function(t){this.options=O({},this.options,t)},$y.prototype.center=function(t){this._center=t},$y.prototype.extent=function(t){this._extent=t},$y.prototype.viewOrigin=function(t){this._viewOrigin=t},$y.prototype.zoom=function(t){this._zoom=t},$y.prototype.pointToTileIndex=function(t){return new Hy(Fy.floor(t.x/this.options.tileSize),Fy.floor(t.y/this.options.tileSize))},$y.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,e=this.indexToPoint(e).translate(-i.x,-i.y);return{x:Fy.ceil((Fy.abs(e.x)+t.width)/this.options.tileSize),y:Fy.ceil((Fy.abs(e.y)+t.height)/this.options.tileSize)}},$y.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}},$y.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Hy(e*this.options.tileSize,t*this.options.tileSize)},$y.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},$y.prototype.destroy=function(){ny(this.element),this.pool.empty()},$y.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},$y.prototype.render=function(){for(var t,e,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw),r=0;r<i.x;r++)for(e=0;e<i.y;e++)(t=this.createTile({x:o.x+r,y:o.y+e})).visible||t.show()},$y.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},$y.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,o=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:new Hy(L((e=o).x),L(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},$y.prototype.wrapIndex=function(t){var e=Fy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:x(t.y,0,e-1)}},$y.prototype.wrapValue=function(t,e){var i=Fy.abs(t)%e;return 0<=t?i:e-(0==i?e:i)};var Yy,qy,Zy=$y,Qy=((Yy=M.Class)&&(Ky.__proto__=Yy),((Ky.prototype=Object.create(Yy&&Yy.prototype)).constructor=Ky).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Ky.prototype._initOptions=function(t){this.options=O({},this.options,t)},Ky.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),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},Ky.prototype.show=function(){var t=this.element,e=(t.style.top=Wy(this.options.offset.y),t.style.left=Wy(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Ky.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Ky.prototype.url=function(){return Gy(this.options.urlTemplate)(this.urlOptions())},Ky.prototype.errorUrl=function(){return Gy(this.options.errorUrlTemplate)(this.urlOptions())},Ky.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}},Ky);function Ky(t,e){Yy.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function $y(t,e){qy.call(this),this.element=t,this._initOptions(e),this.pool=new tv}e(Qy,{urlTemplate:"",errorUrlTemplate:""}),(Jy=M.Class)&&(ev.__proto__=Jy),((ev.prototype=Object.create(Jy&&Jy.prototype)).constructor=ev).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},ev.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},ev.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},ev.prototype._create=function(t){for(var e,i=this._items,o=he(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new Qy(o,t),this._items.push(e)),e},ev.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);i<n&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))};var Jy,tv=ev;function ev(){Jy.call(this),this._items=[]}function iv(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}e(tv,{maxSize:100});var ov,rv,nv,sv,av,hv,lv,pv=Object.assign,cv="change",uv=((lv=p_)&&(Sv.__proto__=lv),((Sv.prototype=Object.create(lv&&lv.prototype)).constructor=Sv).prototype.captureNext=function(){this.capture=!0},Sv.prototype.cancelCapture=function(){this.capture=!1},Sv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Sv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Sv),dv=((hv=p_)&&(Av.__proto__=hv),((Av.prototype=Object.create(hv&&hv.prototype)).constructor=Av).prototype.makeVirtual=function(){pv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Av.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Av.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Av.prototype.forceEnabled=function(){this.forcedEnabled=!0},Av.prototype.getSize=function(){return this.container[this.measure]},Av.prototype.getTotal=function(){return this.element[this.scrollSize]},Av.prototype.rescale=function(t){this.scale=t},Av.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();0===i&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||r<o,t)||e.trigger(cv,e)},Av),fv=((av=p_)&&(kv.__proto__=av),((kv.prototype=Object.create(av&&av.prototype)).constructor=kv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},kv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},kv.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(cv)},kv),gv=((sv=p_)&&(wv.__proto__=sv),((wv.prototype=Object.create(sv&&sv.prototype)).constructor=wv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},wv.prototype.dragMove=function(t){var e,i=this.dimension,o=this.axis,r=this.movable,n=r[o]+t;i.enabled&&(e=t,(n<i.min&&t<0||n>i.max&&0<t)&&(e*=this.resistance),r.translateAxis(o,e),this.trigger(cv,this))},wv),yv=((nv=M.Class)&&(bv.__proto__=nv),(bv.prototype=Object.create(nv&&nv.prototype)).constructor=bv),vv=((rv=p_)&&(_v.__proto__=rv),((_v.prototype=Object.create(rv&&rv.prototype)).constructor=_v).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},_v.prototype.scaleTo=function(t){this.scale=t,this.refresh()},_v.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},_v.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},_v.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},_v.prototype.moveTo=function(t){pv(this,t),this.refresh()},_v.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=iv(t,e,this.scale))!==this.coordinates&&(this.element.style.transform=t,this._saveCoordinates(t),this.trigger(cv))},_v.prototype._saveCoordinates=function(t){this.coordinates=t},_v),mv=M.drawing.Group,h;function xv(t,e){ov.call(this,t,e),this._pan=ry(this._pan,this),this.surface=M.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new vv(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 _v(t){rv.call(this);var e=this,t=(e.element=t,e.element.style.transformOrigin="left top",e.x=0,e.y=0,e.scale=1,iv(e.x,e.y,e.scale));e.element.style.transform=t,e._saveCoordinates(t)}function bv(t){nv.call(this);var s,a,h,l=this;pv(l,{elastic:!0},t),t=l.elastic?.5:0,h=l.movable,l.x=s=new gv({axis:"x",dimension:l.dimensions.x,resistance:t,movable:h}),l.y=a=new gv({axis:"y",dimension:l.dimensions.y,resistance:t,movable:h}),l.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){l.gesture=t,l.offset=re(l.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=l.gesture,i=e.center,o=t.center,e=t.distance/e.distance,r=l.dimensions.minScale,n=l.dimensions.maxScale,r=(h.scale<=r&&e<1&&(e+=.8*(1-e)),h.scale*e>=n&&(e=n/h.scale),h.x+l.offset.left),n=h.y+l.offset.top,r={x:(r-i.x)*e+o.x-r,y:(n-i.y)*e+o.y-n};h.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),l.dimensions.rescale(h.scale),(l.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 wv(t){sv.call(this),pv(this,t)}function kv(t){av.call(this);this.x=new dv(pv({horizontal:!0},t)),this.y=new dv(pv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(cv,t)}function Av(t){hv.call(this);var e=this;e.forcedEnabled=!1,pv(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 Sv(t,e){lv.call(this);var i=this,o=t[0]||t;i.capture=!1,o.addEventListener?(Ve.down.split(" ").forEach(function(t){o.addEventListener(t,ry(i._press,i),!0)}),Ve.up.split(" ").forEach(function(t){o.addEventListener(t,ry(i._release,i),!0)})):(Ve.down.split(" ").forEach(function(t){o.attachEvent(t,ry(i._press,i))}),Ve.up.split(" ").forEach(function(t){o.attachEvent(t,ry(i._release,i))})),i.bind(["press","release"],e||{})}(ov=Qd)&&(xv.__proto__=ov),((xv.prototype=Object.create(ov&&ov.prototype)).constructor=xv).prototype.destroy=function(){ov.prototype.destroy.call(this),this.surface.destroy()},xv.prototype._reset=function(){ov.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},xv.prototype._initRoot=function(){this._root=new mv,this.surface.draw(this._root)},xv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},xv.prototype._resize=function(){this.surface.size(this.map.size())},xv.prototype._readData=function(){var t=ov.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},xv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Tv(this.map,this.options.style,this));for(var e=new mv,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},xv.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof M.drawing.Circle&&this.map.options.renderPointsAsMarkers?k(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},xv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},xv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},xv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},xv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},xv.prototype._panEnd=function(t){ov.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},xv.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}))},xv.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},xv.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},xv.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)))},xv.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},xv.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},xv.prototype._activate=function(){ov.prototype._activate.call(this),this._panHandler=ry(this._pan,this),this.map.bind("pan",this.panHandler)},xv.prototype._deactivate=function(){ov.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e(h=xv,{autoBind:!0,zIndex:100}),(Pv=M.Class)&&(Ov.__proto__=Pv),((Ov.prototype=Object.create(Pv&&Pv.prototype)).constructor=Ov).prototype.parse=function(t){var e=new mv,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=i&&e.children.length<2?e.children[0]:e},Ov.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Ov.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Ov.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},Ov.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(le(e).anchor()))&&(t.options.fill=null)},Ov.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Ov.prototype._loadPolygon=function(t,e,i){e=this._buildPolygon(e);return e.dataItem=i,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},Ov.prototype._buildPolygon=function(t){for(var e=new(1<t.length?M.drawing.MultiPath:M.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(Ug.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Ov.prototype._loadPoint=function(t,e,i){var e=Ug.fromLngLat(e),o=this.locator.locationToView(e),o=new M.geometry.Circle(o,10),o=new M.drawing.Circle(o,this.style);return o.dataItem=i,o.location=e,this._loadShape(t,o)};var Cv,Pv,Tv=Ov,tf;function Mv(){Cv.apply(this,arguments)}function Ov(t,e,i){Pv.call(this),this.observer=i,this.locator=t,this.style=e}(Cv=h)&&(Mv.__proto__=Cv),((Mv.prototype=Object.create(Cv&&Cv.prototype)).constructor=Mv).prototype._readData=function(){return this.options.data||[]},Mv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=Ut(e.valueField),o=t.slice(0);o.sort(function(t,e){return i(e)-i(t)});for(var r=this._scaleType(),n=Ut(this.options.locationField),s=0;s<o.length;s++){var a,h,l,p=o[s],c=n(p),u=i(p);k(c)&&k(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=Ug.create(c),l=this.map.locationToView(c),h=a.map(u),(l=this._createSymbol({center:l,size:h,style:e.style,dataItem:p,location:c})).dataItem=p,l.location=c,l.value=u,this._drawSymbol(l))}}},Mv.prototype._scaleType=function(){var t=this.options.scale;return Ot(t)?t:Bv[t]},Mv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Ot(e)?e:Ev[e])(t)},Mv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Mv.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},Mv.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},e(tf=Mv,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200}),(Iv=M.Class)&&(Nv.__proto__=Iv),((Nv.prototype=Object.create(Iv&&Iv.prototype)).constructor=Nv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var Lv,Iv,Bv={sqrt:Nv},Ev={circle:function(t){var e=new M.geometry.Circle(t.center,t.size/2);return new M.drawing.Circle(e,t.style)},square:function(t){var e=new M.drawing.Path(t.style),i=t.size/2,t=t.center;return e.moveTo(t.x-i,t.y-i).lineTo(t.x+i,t.y-i).lineTo(t.x+i,t.y+i).lineTo(t.x-i,t.y+i).close(),e}},Rv="mouseenter",Vv="mouseleave",zv=Object.assign,jv="k-marker",Dv="."+jv,Fv=((Lv=Qd)&&(Hv.__proto__=Lv),((Hv.prototype=Object.create(Lv&&Lv.prototype)).constructor=Hv).prototype.destroy=function(){Lv.prototype.destroy.call(this),Ue(this.element,"click",this._markerClickHandler),this.clear()},Hv.prototype.add=function(t){if(!xt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Hv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Hv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Hv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Hv.prototype._reset=function(){Lv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Hv.prototype.bind=function(t,e){t=Gv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Hv.prototype._addOne=function(t){t=Gv.create(t,this.options);return t.addTo(this),t},Hv.prototype._readData=function(){return this.options.data||[]},Hv.prototype._load=function(t){this._data=t,this.clear();for(var e=Ut(this.options.locationField),i=Ut(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},Hv.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)},Hv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Hv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Hv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return zv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Hv);function Hv(t,e){Lv.call(this,t,e),this._markerClickHandler=ry(this._markerClick,this),Ne(this.element,"click",Dv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Nv(t,e){Iv.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(Fv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""}),(Uv=M.Class)&&(Xv.__proto__=Uv),((Xv.prototype=Object.create(Uv&&Uv.prototype)).constructor=Xv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Xv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Xv.prototype.location=function(t){return t?(this.options.location=Ug.create(t).toArray(),this.layer&&this.layer.update(this),this):Ug.create(this.options.location)},Xv.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=hy(this._anchor.left),this.element.style.top=hy(this._anchor.top)},Xv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},Xv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=ry(this._mouseEnter,this),Ne(this.element,Rv,Dv,this._mouseEnterHandler),this._mouseLeaveHandler=ry(this._mouseLeave,this),Ne(this.element,Vv,Dv,this._mouseLeaveHandler))},Xv.prototype.unbindEvents=function(){this.element&&(Ue(this.element,Rv,this._mouseEnterHandler),Ue(this.element,Vv,this._mouseLeaveHandler))},Xv.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,_t(i=document.createElement("span"),jv),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=yy(o),i.appendChild(o)):t.svgIcon?be(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(o={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(o.icon="map-marker-target",be(i,o)):"pin"===t.shape?be(i,o):_t(i,"k-icon k-icon-xxl k-i-marker-"+ay(t.shape||"pin")):be(i,o)),t.title&&i.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){i.setAttribute(t,r[t])}),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents())},Xv.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())},Xv.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()}},Xv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Xv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Xv.prototype._compileTemplate=function(t){return o_.compile(t,{paramName:"dataItem",useWithBlock:!1})},Xv.create=function(t,e){return t instanceof Xv?t:new Xv(O({},e,t))};var Uv,Gv=Xv,Wv=Object.assign;function Xv(t){Uv.call(this),this.options=t||{}}function Yv(t){window.requestAnimationFrame(t)}(tm=M.Class)&&(ym.__proto__=tm),((ym.prototype=Object.create(tm&&tm.prototype)).constructor=ym).prototype.tick=function(){},ym.prototype.done=function(){},ym.prototype.onEnd=function(){},ym.prototype.onCancel=function(){},ym.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Yv(this._tickProxy)))},ym.prototype.enabled=function(){return!0},ym.prototype.cancel=function(){this._started=!1,this.onCancel()},ym.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Yv(this._tickProxy))};var qv,Zv,Qv,Kv,$v,Jv,tm,s,em=((Jv=s=ym)&&(gm.__proto__=Jv),((gm.prototype=Object.create(Jv&&Jv.prototype)).constructor=gm).prototype.done=function(){return this.timePassed()>=this.duration},gm.prototype.timePassed=function(){return Math.min(this.duration,Xe()-this.startDate)},gm.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[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=Xe(),e.start()},gm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},gm.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},gm),im=Object.assign,om=Math.abs,rm="change",nm=(($v=s)&&(fm.__proto__=$v),((fm.prototype=Object.create($v&&$v.prototype)).constructor=fm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},fm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},fm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},fm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},fm),sm=((Kv=s)&&(dm.__proto__=Kv),((dm.prototype=Object.create(Kv&&Kv.prototype)).constructor=dm).prototype.onCancel=function(){this.transition.cancel()},dm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},dm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},dm.prototype.done=function(){return om(this.velocity)<1},dm.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),Kv.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(),Kv.prototype.start.call(this)))},dm.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=i,i=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(i)&&(i=Math.max(Math.min(i,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,i)},dm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},dm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},dm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:em.easeOutExpo})},dm),am=((Qv=s)&&(um.__proto__=Qv),((um.prototype=Object.create(Qv&&Qv.prototype)).constructor=um).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},um.prototype.done=function(){return om(this.offset.y)<5&&om(this.offset.x)<5},um.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},um.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},um.prototype.setCallback=function(t){t&&Ot(t)&&(this.callback=t)},um.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}},um),hm=((Zv=M.Class)&&(cm.__proto__=Zv),((cm.prototype=Object.create(Zv&&Zv.prototype)).constructor=cm).prototype.refresh=function(){var t=this.axis,e=this.dimension,i=e.size,o=this.scrollMovable,e=i/e.total,o=Math.round(-o[t]*e),r=Math.round(i*e);this.element.style.display=1<=e?"none":"",i<o+r?r=i-o:o<0&&(r+=o,o=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,o)},cm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},cm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},cm),lm=((qv=p_)&&(pm.__proto__=qv),((pm.prototype=Object.create(qv&&qv.prototype)).constructor=pm).prototype._initOptions=function(t){this.options=O({},this.options,t)},pm.prototype._wheelScroll=function(t){var e,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),i=t.wheelDeltaY,t.wheelDelta?void 0!==i&&!i||(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},pm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},pm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},pm.prototype.height=function(){return this.dimensions.y.size},pm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},pm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},pm.prototype._resize=function(){this._native||this.contentResized()},pm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},pm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},pm.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)},pm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},pm.prototype.enable=function(){this.enabled=!0},pm.prototype.disable=function(){this.enabled=!1},pm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(om(t)),this.scrollElement.scrollTop(om(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},pm.prototype.animatedScrollTo=function(t,e,i){var o;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(o,{x:t,y:e}),this.animatedScroller.setCallback(i),this.animatedScroller.start())},pm.prototype.pullHandled=function(){},pm.prototype.destroy=function(){Ue(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},pm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},pm.prototype._initPullToRefresh=function(){},pm.prototype._dragEnd=function(){},pm.prototype._paneChange=function(){},pm.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new hm({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(rm,function(){s.refresh()}),n.bind(rm,function(){s.show()}),e[t+"inertia"]=new sm({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,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})}})},pm);function pm(t,e){qv.call(this);var r=this;this.element=t,this._initOptions(e);navigator.userAgent;e=(e=Ge().mobileOS).ios||e.android,r._native=r.options.useNative&&e,e=yy('<div class="km-scroll-header"/>');if(r._native)_t(t,"km-native-scroller"),sy(e,t),im(r,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",_t(t,"km-scroll-wrapper");var i=t,o=yy('<div class="km-scroll-container"/>');for(i.appendChild(o);i.firstChild!==o;)o.appendChild(i.firstChild);sy(e,t);var e=t.children[1],n=new uv(t),s=new vv(e),a=new fv({element:e,container:t,forcedEnabled:r.options.zoom}),h=this.options.avoidScrolling,l=new c_(t,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:r.options.zoom,supportDoubleTap:r.options.supportDoubleTap,start:function(t){a.refresh();var e=om(t.x.velocity),i=om(t.y.velocity),o=i<=2*e,e=e<=2*i;!r.fixedContainer.contains(t.event.target)&&!h(t)&&r.enabled&&(a.x.enabled&&o||a.y.enabled&&e)?l.capture():l.cancel()}}),p=new yv({movable:s,dimensions:a,userEvents:l,elastic:r.options.elastic}),c=new nm({movable:s,dimensions:a,userEvents:l,tapCapture:n}),u=new am({moveTo:function(t){r.scrollTo(t.x,t.y)}});s.bind(rm,function(){r.scrollTop=-s.y,r.scrollLeft=-s.x,r.trigger("scroll",{scrollTop:r.scrollTop,scrollLeft:r.scrollLeft})}),r.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Ne(t,"wheel",this._wheelScrollHandler)),im(r,{movable:s,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:l,pane:p,tapCapture:n,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),r._initAxis("x"),r._initAxis("y"),r._wheelEnd=function(){r._wheel=!1,r.userEvents.end(0,r._wheelY)},a.refresh(),r.options.pullToRefresh&&r._initPullToRefresh()}}function cm(t){Zv.call(this);var e="x"===t.axis,i=yy('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');im(this,t,{element:i,elementSize:0,movable:new vv(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(rm,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}function um(t){Qv.call(this,t),im(this,t,{origin:{},destination:{},offset:{}})}function dm(t){Kv.call(this);var e=this;im(e,t,{transition:new em({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",ry(e.start,e)),e.userEvents.bind("gestureend",ry(e.start,e)),e.userEvents.bind("tap",ry(e.onEnd,e))}function fm(t){$v.call(this,t);im(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function gm(t){Jv.call(this),Wv(this,t)}function ym(){tm.call(this);this._tickProxy=ry(this._tick,this),this._started=!1}function vm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}e(lm,{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"}}),ly(lm,["pull","scroll","resize"]),vm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const g0=vm;var mm,xm=Math,_m=xm.min,bm=xm.pow,wm=M.geometry.Point,km="marker",Am="location",Sm={bubble:tf,shape:h,tile:Yd},zn;function A(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),mm.call(this),this._init(t,e,i,o)}Sm[km]=Fv,(mm=p_)&&(A.__proto__=mm),((A.prototype=Object.create(mm&&mm.prototype)).constructor=A).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(),xt(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();Ue(this.element,"wheel",this._mousewheelHandler),mm.prototype.destroy.call(this)},A.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=Ge(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new gy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,M.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Ne(this.element,"wheel",this._mousewheelHandler)},A.prototype._initOptions=function(t){this.options=O({},this.options,t)},A.prototype._initElement=function(t){_t(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),ny(t);t=yy("<div />");this.element.appendChild(t)},A.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new g0(this,t)},A.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},A.prototype.addObserver=function(t){t&&this.observers.push(t)},A.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},A.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},A.prototype.trigger=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o||mm.prototype.trigger.call(this,t,e),o},A.prototype._notifyObserver=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},A.prototype.zoom=function(t){var e=this.options,t=k(t)?(t=xm.round(x(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},A.prototype.center=function(t){var e=t?(t=Ug.create(t),e=Ug.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Ry,{center:this.options.center}),this._reset()),this):Ug.create(this.options.center);return e},A.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},A.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),ny(e),this._init(e,t,{},this.context),this._reset()},A.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=Ug.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},A.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=wm.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},A.prototype.locationToView=function(t){var t=Ug.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},A.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=wm.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},A.prototype.eventOffset=function(t){var e,i=re(this.element);return t=t.x&&t.x[Am]||t.y&&t.y[Am]?(e=t.x[Am]-i.left,t.y[Am]-i.top):(t=t.originalEvent||t,e=_(t.pageX,t.clientX)-i.left,_(t.pageY,t.clientY)-i.top),new M.geometry.Point(e,t)},A.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},A.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},A.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},A.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:_m(e,i),height:_m(e,t.clientHeight)}},A.prototype.exportVisual=function(){return this._reset(),!1},A.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},A.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=Ug.create(t);return(t=this.locationToLayer(t,e)).x+=i.width/2,t.y+=i.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(Ry,{center:this.options.center}),this},A.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},A.prototype._setExtent=function(t){var e=Ey.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new Ey(e.nw,i));this.center(o.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(o.nw,s),h=this.locationToLayer(o.se,s),l=xm.abs(h.x-a.x),h=xm.abs(h.y-a.y);if(l<=r&&h<=n)break}this.zoom(s)},A.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize(),i=(e.x+=i.width,e.y+=i.height,this.layerToLocation(e));return new Ey(t,i)},A.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},A.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))},A.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+py(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(_t(i=document.createElement("div"),"k-map-controls "+py(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},A.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new vy(e,t)},A.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Ay(e,O({},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)},A.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,o=this.element.clientWidth,r=this.element.clientHeight,i=x(i,t.x.min,t.x.max-o),e=x(e,t.y.min,t.y.max-r);this.scroller.one("scroll",ry(this._scrollEnd,this)),this.scroller.scrollTo(-i,-e)},A.prototype._navigatorCenter=function(){this.center(this.options.center)},A.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Ty(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},A.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},A.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new lm(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",ry(this._scroll,this)),t.bind("scrollEnd",ry(this._scrollEnd,this)),t.userEvents.bind("gesturestart",ry(this._scaleStart,this)),t.userEvents.bind("gestureend",ry(this._scale,this)),t.userEvents.bind("doubleTap",ry(this._doubleTap,this)),t.userEvents.bind("tap",ry(this._tap,this)),this.scrollElement=t.scrollElement},A.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],o=this._createLayer(o);e.push(o)}},A.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===km?O({},this.options.markerDefaults,t,{icons:this.options.icons}):O({},i,t),t=new Sm[e](this,i);return e===km&&(this.markers=t),t},A.prototype._createTooltip=function(){return new Vy(this.widgetService,this.options.tooltip)},A.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===km}).length||(this.markers=new Fv(this,O({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},A.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,i=new M.geometry.Point(i.x,i.y).scale(-1).scale(1/i.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,this._tooltip.offset=i,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},A.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Xe(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},A.prototype._panComplete=function(){return 50<Xe()-(this._panEndTimestamp||0)},A.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},A.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),i=new M.geometry.Point(t.center.x,t.center.y),o=this.viewToLocation(i,e),o=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t})},A.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=xm.log(t)/xm.log(2);return xm.round(t)},A.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")},A.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=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=bm(2,this.options.minZoom-n),t.dimensions.maxScale=bm(2,this.options.maxZoom-n),{min:-r.x,max:o-r.x}),n={min:-r.y,max:o-r.y};this.options.wraparound&&(t.max=20*o,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(),i.makeVirtual(),e.virtualSize(t.min,t.max),i.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},A.prototype._renderLayers=function(){},A.prototype._layerSize=function(t){t=_(t,this.options.zoom);return this.options.minSize*bm(2,t)},A.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},A.prototype._doubleTap=function(t){var e,i,o;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},A.prototype._mousewheel=function(t){var e=0<Jt(t)?-1:1,i=this.options,o=this.zoom(),e=x(o+e,i.minZoom,i.maxZoom);!1===i.zoomable||e===o||this.trigger("zoomStart",{originalEvent:t})||(i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},A.prototype._toDocumentCoordinates=function(t){var e=re(this.element);return{left:L(t.x+e.left),top:L(t.y+e.top)}},e(zn=A,{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}),ly(zn,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const y0=zn;function Cm(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function Pm(t,e){return Om(t.source,e.source)}function Tm(t,e){return Om(t.target,e.target)}function Mm(t){return t.value}var Om=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function Lm(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(Tm)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(Pm)})})}function Im(t){var e=t.nodesOptions,i=e.offset,o=(void 0===i&&(i={}),e.align);this.data={nodes:t.nodes.map(function(t){return O({},{offset:i,align:o},t)}),links:t.links.map(function(t){return O({},t)})},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout}function Bm(t){return new Im(t).calculate()}function Em(t,e,i,o,r,n){n=(n-e)*(i-t),i=(o-e)*(r-t);return i<n?1:n==i?0:-1}function Rm(t,e,i,o){return e=O({},e,e.node),O({},{color:(i=i,o=o,t.color||i[o%i.length])},e,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})}function Vm(t,e,i,o,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*i*a*n+o*a*r}Im.prototype.calculate=function(){var t=this.data,e=t.nodes,t=t.links,t=(this.connectLinksToNodes(e,t),this.calculateNodeValues(e),this.calculateNodeHeights(e));if(t)return{nodes:[],links:[],columns:[],circularLinks:t};this.calculateNodeDepths(e);t=this.calculateNodeColumns(e);return this.calculateNodeBreadths(t),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:t})},Im.prototype.connectLinksToNodes=function(t,e){var i=new Map;t.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,i.set(t.id,t)}),e.forEach(function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)})},Im.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(Cm(t.sourceLinks,Mm),Cm(t.targetLinks,Mm))})},Im.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var h=s.sourceLinks[a];i.add(h.target)}}o++,e=i,i=new Set}},Im.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach(function(t){o.add(t.source)})};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},Im.prototype.calculateNodeColumns=function(t){for(var e,i=Math.max.apply(null,t.map(function(t){return t.depth})),o=(this.width-this.offsetX-this.nodeWidth)/i,r=new Array(i+1),n=0;n<t.length;n++){var s=t[n],a=Math.max(0,Math.min(i,(e=i,"left"===(a=s).align?a.depth:"right"===a.align?e-a.height:a.sourceLinks.length?a.depth:e)));s.x0=this.offsetX+a*o,s.x1=s.x0+this.nodeWidth,r[s.layer=a]=r[a]||[],r[a].push(s)}return r},Im.prototype.calculateNodeBreadths=function(t){var e=this,o=Math.min.apply(null,t.map(function(t){return(e.height-e.offsetY-(t.length-1)*e.nodePadding)/Cm(t,Mm)}));if(t.forEach(function(t){var i=e.offsetY;t.forEach(function(t){t.y0=i,t.y1=i+t.value*o,i=t.y1+e.nodePadding,t.sourceLinks.forEach(function(t){t.width=t.value*o})}),i=(e.height-i+e.nodePadding)/(t.length+1),t.forEach(function(t,e){t.y0+=i*(e+1),t.y1+=i*(e+1)})}),!1!==this.autoLayout)for(var i=void 0!==this.loops?this.loops:t.length-1,r=this.targetColumnIndex||1,n=0;n<i;n++)this.reverse?(this.uncurlLinksToRight(t,r),this.uncurlLinksToLeft(t,r)):(this.uncurlLinksToLeft(t,r),this.uncurlLinksToRight(t,r));t.forEach(Lm)},Im.prototype.applyNodesOffset=function(t){t.forEach(function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i})},Im.prototype.calculateLinkBreadths=function(t){t.forEach(function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach(function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width}),i.forEach(function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width})})},Im.prototype.uncurlLinksToRight=function(t,e){for(var n=this,i=t.length,o=e;o<i;o++){var r=t[o];r.forEach(function(i){var o=0,r=0,t=(i.targetLinks.forEach(function(t){var e=t.value*(i.layer-t.source.layer);o+=n.targetTopPos(t.source,i)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Lm([i])}),r.sort(Om),this.arrangeNodesVertically(r)}},Im.prototype.uncurlLinksToLeft=function(t,e){for(var n=this,i=t.length-1-e;0<=i;i--){for(var s=t[i],o=0;o<s.length;o++)!function(t){var i=s[t],o=0,r=0,t=(i.sourceLinks.forEach(function(t){var e=t.value*(t.target.layer-i.layer);o+=n.sourceTopPos(i,t.target)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Lm([i])}(o);s.sort(Om),this.arrangeNodesVertically(s)}},Im.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},Im.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},Im.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;0<=r;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},Im.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},Im.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i},(Fm=M.Class)&&(Qm.__proto__=Fm),((Qm.prototype=Object.create(Fm&&Fm.prototype)).constructor=Qm).prototype.createVisual=function(){this.visual=this.createElement()},Qm.prototype.exportVisual=function(){return this.visual},Qm.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},Qm.prototype.getSender=function(){return this};var zm,jm,Dm,Fm,jn,Hm=((Dm=jn=Qm)&&(Zm.__proto__=Dm),((Zm.prototype=Object.create(Dm&&Dm.prototype)).constructor=Zm).prototype.getElement=function(){return M.drawing.Path.fromRect(this.getRect(),this.visualOptions())},Zm.prototype.getRect=function(){var t=this.options.node;return new M.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},Zm.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},Zm.prototype.visualOptions=function(){var t=O({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},Zm.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=M.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},Zm.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.node.id,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(q,t)},Zm.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(q)},Zm),Nm=((jm=jn)&&(qm.__proto__=jm),((qm.prototype=Object.create(jm&&jm.prototype)).constructor=qm).prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,t=t.y1,r=(e+i)/2;return new M.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([r,o],[r,t],[i,t])},qm.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},qm.prototype.visualOptions=function(){var t=this.options,e=this.options.link,i=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:(k(e.opacity)?e:t).opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:i}},qm.prototype.createFocusHighlight=function(){var t,e,i,o,r,n,s,a,h,l,p,c,u,d,f,g,y,v,m,x;this.options.navigatable&&(t=(m=this.options.link).x0,e=m.x1,i=m.y0,o=m.y1,r=(t+e)/2,n=m.width/2,s=this.options.rtl,l=m.width/2,p=s?m.x1:m.x0,c=s?m.x0:m.x1,u=s?m.y1:m.y0,s=s?m.y0:m.y1,f=[d=(p+c)/2,Vm(u,u,s,s,.5)],g=[Vm(p,d,d,c,.4999),Vm(u,u,s,s,.4999)],v=f[0],f=f[1],y=g[0],g=g[1],m=m.width,x=(v+y)/2,h=(f+g)/2,f=f===g?(a=0,m/2):v===y?(a=m/2,0):(g=-1/((g-f)/(y-v)))*(a=m/2/Math.sqrt(1+g*g)),v=[d,Vm(u+l,u+l,s+l,s+l,.5)],m=(y={P1:{x:x-a,y:h-f},P2:{x:x+a,y:h+f}}).P1.y>y.P2.y?y.P1:y.P2,g=p,x=c,l=d-(a=m,h={x:v[0],y:v[1]},f=l,y={x:v[0],y:v[1]},p={x:Math.max(1,v[0]+(s<u?1:-1)*l),y:v[1]},c=(a.x+h.x)/2,d=(a.y+h.y)/2,s=h.x-a.x,h=-(h.y-a.y),a=s,s=Math.sqrt(h*h+a*a),u=c+(h=h/s*f),s=d+(a=a/s*f),f=c-h,c=d-a,a=(d=p.y-y.y)*(u-f)-(h=p.x-y.x)*(s-c),(((!(Math.abs(a)<1e-10)&&(p=((u-f)*(c-y.y)-(s-c)*(f-y.x))/a,0<=(s=(h*(c-y.y)-d*(f-y.x))/a))&&s<=1&&0<=p&&p<=1?{x:f+s*(u-f)}:null)||{x:(v[0]+m.x)/2}).x-.125*g-.125*x)/.75),this._highlight=new M.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(t,i+n).lineTo(t,i-n).curveTo([r+l,i-n],[r+l,o-n],[e,o-n]).lineTo(e,o+n).curveTo([r-l,o+n],[r-l,i+n],[t,i+n]))},qm.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.link.sourceId+"->"+this.options.link.targetId,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(q,t)},qm.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(q)},qm),Um="inside",Gm="before",Wm="after",Xm=((zm=jn)&&(Ym.__proto__=zm),((Ym.prototype=Object.create(zm&&zm.prototype)).constructor=Ym).prototype.getElement=function(){var t,e=O({},this.options,this.options.node.label),i=e.node,o=e.diagramMinX,r=e.diagramMaxX,n=e.text,s=e.offset,a=e.rtl,h=e.position;return a&&h!==Um&&(h=h===Gm?Wm:Gm),e.visible&&n?(e=new R(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),a&&!t.align&&(t.align="right"),(n=new w_(n,t)).reflow(new R),t=n.box,e=e.center().y-t.height()/2,r=i.x1+t.width()>r,o=i.x0-t.width()<o,r=h===Gm||h===Um&&r?Gm:Wm,a=[(r=a?h===Wm||h===Um&&o?Wm:Gm:r)===Gm?i.x0-t.width():i.x1,e],(h=new R(a[0],a[1],a[0]+t.width(),a[1]+t.height())).translate(s.left||0,s.top||0),n.reflow(h),n.renderVisual(),n.visual):null},Ym.prototype.visualOptions=function(){var t=O({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},Ym);function Ym(){zm.apply(this,arguments)}function qm(){jm.apply(this,arguments)}function Zm(){Dm.apply(this,arguments)}function Qm(t){Fm.call(this),this.options=O({},this.options,t),this.createVisual()}function Km(t,e,i,o,r){return O({},e,{node:t,diagramMinX:o,diagramMaxX:r,rtl:i,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})}e(Xm,{position:Um}),($m=jn)&&(tx.__proto__=$m),((tx.prototype=Object.create($m&&$m.prototype)).constructor=tx).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;return!1!==t.visible&&i?((i=k_.buildTitle(i,t)).reflow(e),i.renderVisual(),i.visual):null},tx.prototype.createElement=function(){return this.getElement()};var $m,Jm=tx;function tx(){$m.apply(this,arguments)}function ex(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}function ix(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0}e(Jm,{align:b,border:{width:0},margin:w(5),padding:w(5)}),(ox=jn)&&(nx.__proto__=ox),((nx.prototype=Object.create(ox&&ox.prototype)).constructor=nx).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.rtl,o=t.nodes,r=(void 0===o&&(o=[]),t.item),n=t.position;return!1!==t.visible&&o.length?((o=o.map(function(t){return{text:t.label&&t.label.text||"",area:{background:void 0!==r.areaBackground?r.areaBackground:t.color,opacity:void 0!==r.areaOpacity?r.areaOpacity:t.opacity},node:t}})).sort(i?ix:ex),n=i&&n!==C&&n!==P,(t=new a1(Object.assign({},t,{data:o,reverse:n}),{rtl:i})).reflow(e),t.renderVisual(),t.visual):null},nx.prototype.createElement=function(){return this.getElement()};var ox,rx=nx;function nx(){ox.apply(this,arguments)}e(rx,{markers:{visible:!1},item:{type:on,cursor:vt,opacity:1},position:S,align:b,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var sx,ax="link",hx="node",lx=((sx=p_)&&(I.__proto__=sx),((I.prototype=Object.create(sx&&sx.prototype)).constructor=I).prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},I.prototype._initElement=function(t){_t(this.element=t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},I.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},I.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},I.prototype.firstFocusableNode=function(){return this.columns[0][0]},I.prototype._initResizeObserver=function(){var o=this,t=new ResizeObserver(function(t){t.forEach(function(t){var e=t.contentRect,i=e.width,e=e.height;t.target!==o.element||o.size&&o.size.width===i&&o.size.height===e||(o.size={width:i,height:e},o.surface.setSize(o.size),o.resize=!0,o._redraw())})});(this._resizeObserver=t).observe(this.element)},I.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},I.prototype._initTheme=function(t){t=t||this.theme||{};this.theme=t,this.options=O({},t,this.options)},I.prototype.setLinksOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.opacity)})},I.prototype.setLinksInactivityOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.highlight.inactiveOpacity)})},I.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:k(i)?i:e}))},I.prototype.trigger=function(t,e){var i=e.element.dataItem,o=e.element.type,e=Object.assign({},e,{type:t,targetType:o,dataItem:i});return sx.prototype.trigger.call(this,t,e)},I.prototype._mouseenter=function(t){var e=t.element,i=e.type===ax,o=e.type===hx,r=Boolean(e.chartElement&&e.chartElement.options.node);i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t)||(t=this.options.links.highlight,i?(this.setLinksInactivityOpacity(t.inactiveOpacity),this.setOpacity(e,t.opacity,e.linkOptions.highlight.opacity)):o?this.highlightLinks(e,t):r&&(i=this.nodesVisuals.get(e.chartElement.options.node.id),this.highlightLinks(i,t)))},I.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===ax,r=i.type===hx,i=Boolean(i.chartElement&&i.chartElement.options.node),n=t.originalEvent.relatedTarget;o&&n&&"text"===n.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t))||r&&this.trigger("nodeLeave",t)||(o||r||i)&&this.linksVisuals.forEach(function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})},I.prototype._mousemove=function(t){var e,i,o,r=this,n=this.options.tooltip,s=n.followPointer,n=n.delay,a=t.element,h=a.type;h!==ax&&h!==hx||this.tooltipShown&&!s||(e=t.originalEvent,o=this.element.getBoundingClientRect(),i=e.clientX-o.left<o.width/2,o=e.clientY-o.top<o.height/2,t.tooltipData={popupOffset:{left:e.pageX,top:e.pageY},popupAlign:{horizontal:i?"left":"right",vertical:o?"top":"bottom"}},h===hx&&(i=(e=a.dataItem).sourceLinks,h=(o=e.targetLinks).length?o:i,t.nodeValue=h.reduce(function(t,e){return t+e.value},0)),this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),a=s&&this.tooltipShown?0:n,this.tooltipTimeOut=setTimeout(function(){r.trigger("tooltipShow",t),r.tooltipShown=!0,r.tooltipTimeOut=null},a))},I.prototype._click=function(t){var e=t.element,i=e.dataItem,o=e.type===ax,e=e.type===hx,r=this._focusState||{};e?(!r.link&&this.sameNode(r.node,i)||(this._focusState={node:i,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t)):o&&(e={sourceId:i.source.id,targetId:i.target.id,value:i.value},this.sameLink(r.link,e)||(this._focusState={node:i.source,link:e},this._focusLink({highlight:!1})),this.trigger("linkClick",t))},I.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},I.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},I.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},I.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},I.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this.columns.findIndex(function(t){return t.find(function(t){return t.id===e.id})}),i=this.columns[i],o=i.findIndex(function(t){return t.id===e.id}),i=i[o+t];i&&(this._focusState.node=i,this._focusNode())},I.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this._focusState.link,o=e.sourceLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId}),r=e.targetLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId});-1!==o?(o=e.sourceLinks[o+t])&&(this._focusState.link=o,this._focusLink()):-1!==r&&(o=e.targetLinks[r+t])&&(this._focusState.link=o,this._focusLink())},I.prototype._focusSourceNode=function(){var t=this._focusState.link,t=this.models.map.get(t.sourceId);this._focusState={node:t.options.node,link:null},this._focusNode()},I.prototype._focusTargetNode=function(){var t=this._focusState.link,t=this.models.map.get(t.targetId);this._focusState={node:t.options.node,link:null},this._focusNode()},I.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},I.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},I.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},I.prototype._blur=function(){this._cleanFocusHighlight()},I.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},I.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},I.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach(function(t){return t.blur()}),this.models.links.forEach(function(t){return t.blur()})},I.prototype._keydown=function(t){var e=this["on"+t.key],i=this.options.rtl;i&&"ArrowLeft"===t.key?e=this.onArrowRight:i&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},I.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},I.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},I.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},I.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},I.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},I.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach(function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)}))},I.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},I.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},I.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},I.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},I.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},I.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,t=t.height;this.size={width:e,height:t},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},I.prototype._getSize=function(){return this.element.getBoundingClientRect()},I.prototype.createVisual=function(){this.visual=this._render()},I.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new Jm(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},I.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new rx(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},I.prototype.calculateSankey=function(o,t){var e=t.title,i=t.legend,r=t.data,n=t.nodes,s=t.labels,a=t.nodeColors,h=t.disableAutoLayout,l=t.disableKeyboardNavigation,p=t.rtl,t=!h,h=((n.focusHighlight||{}).border||{}).width||0,l=l?0:h/2,h=new R(0,0,o.width,o.height),l=(h.unpad(l),this.titleBox(e,h)),c=h.clone(),e=(l&&(u=l.height(),c=e.position===T?(h.unpad({top:u}),new R(0,u,o.width,o.height)):(h.shrink(0,u),new R(0,0,o.width,o.height-u))),this.legendBox(i,r.nodes,c)),u=i&&i.position||rx.prototype.options.position,r=(e&&(u===C&&h.unpad({left:e.width()}),u===P&&h.shrink(e.width(),0),u===T&&h.unpad({top:e.height()}),u===S)&&h.shrink(0,e.height()),Bm(Object.assign({},o,{offsetX:0,offsetY:0,width:h.width(),height:h.height()}))),c=r.nodes,i=r.circularLinks;if(i)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:i},legendBox:e,titleBox:l};var d=new R,f=c.reduce(function(t,e){return Math.min(t,e.x0)},1/0),g=c.reduce(function(t,e){return Math.max(t,e.x1)},0),y=(c.forEach(function(t,e){p&&(o=t.x0,i=t.x1,t.x0=g-i,t.x1=g-o);var i=Rm(t,n,a,e),o=new Hm(i),e=(d.wrap(Qi(o.exportVisual().rawBBox())),new Xm(Km(t,s,p,f,g)).exportVisual());e&&d.wrap(Qi(e.rawBBox()))}),h.x1),v=h.y1,m=h.width()+y,x=h.height()+v;if(m-=d.x2>h.width()?d.x2-h.width():0,x-=d.y2>h.height()?d.y2-h.height():0,y+=d.x1<0?-d.x1:0,v+=d.y1<0?-d.y1:0,!1==t)return{sankey:Bm(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})),legendBox:e,titleBox:l};if(this.resize&&t&&this.permutation)this.resize=!1;else{for(var _=Bm(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})).columns.length,b=[],w=function(t,e){var i=function(t){for(var e=0,i=t.length,o=0;o<i;o++)for(var r=t[o],n=o+1;n<i;n++){var s=t[n],a=Em((p=r).x0,p.y0,p.x1,p.y1,s.x1,s.y1),h=Em(p.x0,p.y0,p.x1,p.y1,s.x0,s.y0),l=Em(p.x0,p.y0,s.x0,s.y0,s.x1,s.y1),p=Em(p.x1,p.y1,s.x0,s.y0,s.x1,s.y1);a!==h&&l!==p&&(e+=Math.min(r.value,s.value))}return e}(Bm(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,loops:2,targetColumnIndex:t,reverse:e})).links);return b.push({crosses:i,reverse:e,targetColumnIndex:t}),0===i},k=1;k<=_-1&&!w(k,!1)&&!w(k,!0);k++);var A=Math.min.apply(null,b.map(function(t){return t.crosses})),u=b.find(function(t){return t.crosses===A});this.permutation={targetColumnIndex:u.targetColumnIndex,reverse:u.reverse}}return{sankey:Bm(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x},this.permutation)),legendBox:e,titleBox:l}},I.prototype._render=function(t,e){var o,r,h,l,p,c,i,n,t=t||this.options,u=e||this,s=t.labels,a=t.nodes,d=t.links,f=t.nodeColors,e=t.title,g=t.legend,y=t.rtl,v=t.disableKeyboardNavigation,m=t.data,x=u.size,_=x.width,x=x.height,b=Object.assign({},m,{width:_,height:x,nodesOptions:a,title:e,legend:g}),b=this.calculateSankey(b,t),t=b.sankey,w=b.titleBox,b=b.legendBox,k=(y&&(k=t.nodes,A=t.links,o=Math.min.apply(Math,k.map(function(t){return t.x0})),r=Math.max.apply(Math,k.map(function(t){return t.x1}))-o,k.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x0=e,t.x1=i}),A.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x1=e,t.x0=i})),t.nodes),A=t.links,S=t.columns,C=(u.columns=S.map(function(t){t=t.slice();return t.sort(function(t,e){return t.y0-e.y0}),t}),new M.drawing.Group({clip:M.drawing.Path.fromRect(new M.geometry.Rect([0,0],[_,x]))}));return w&&(S=new Jm(Object.assign({},e,{drawingRect:w})).exportVisual(),C.append(S)),t.circularLinks||(h=new Map,u.nodesVisuals=h,l={nodes:[],links:[],map:new Map},u.models=l,p=[],k.forEach(function(t,e){var i=Rm(t,a,f,e),o=(i.root=function(){return u.element},i.navigatable=!0!==v,new Hm(i)),r=o.exportVisual();r.links=[],r.type=hx,t.color=i.color,t.opacity=i.opacity,r.dataItem=Object.assign({},m.nodes[e],{color:i.color,opacity:i.opacity,sourceLinks:t.sourceLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}),targetLinks:t.targetLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})}),h.set(t.id,r),l.nodes.push(o),l.map.set(t.id,o),C.append(r),o.createFocusHighlight(),o._highlight&&p.push(o._highlight)}),_=A.slice().sort(function(t,e){return e.value-t.value}),c=[],u.linksVisuals=c,_.forEach(function(t){var e=t.source,i=t.target,o=h.get(e.id),r=h.get(i.id),n=(n=o,s=r,"source"===(a=O({},d,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight})).colorType?a.color=n.options.fill.color:"target"===a.colorType&&(a.color=s.options.fill.color),a),s=(n.root=function(){return u.element},n.navigatable=!0!==v,n.rtl=y,new Nm(n)),a=s.exportVisual();a.type=ax,a.dataItem={source:Object.assign({},o.dataItem),target:Object.assign({},r.dataItem),value:t.value},a.linkOptions=n,c.push(a),o.links.push(a),r.links.push(a),l.links.push(s),l.map.set(e.id+"-"+i.id,s),s.createFocusHighlight(),s._highlight&&p.push(s._highlight),C.append(a)}),i=k.reduce(function(t,e){return Math.min(t,e.x0)},1/0),n=k.reduce(function(t,e){return Math.max(t,e.x1)},0),k.forEach(function(t){t=Km(t,s,y,i,n),t=new Xm(t).exportVisual();t&&C.append(t)}),b&&(x=new rx(Object.assign({},g,{rtl:y,drawingRect:b,nodes:k})).exportVisual(),C.append(x)),0!==p.length&&((e=new M.drawing.Group).append.apply(e,p),C.append(e))),C},I.prototype.exportVisual=function(t){var e=t&&t.options?O({},this.options,t.options):this.options,t={size:{width:(k(t&&t.width)?t:this.size).width,height:(k(t&&t.height)?t:this.size).height}};return this._render(e,t)},I.prototype._setOptions=function(t){this.options=O({},this.options,t)},I),p={opacity:1,width:2,color:Z};function I(t,e,i){sx.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(t))}e(lx,{title:{position:T},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},p)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},p)},labels:{ariaTemplate:function(t){t=t.link;return t.source.label.text+" to "+t.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var px=function(t,a,h){var l=new Set,p=new Map,c=new Map,o=(t.forEach(function(e){a.forEach(function(t){l.add(t.value(e))});for(var t=0;t<a.length-1;t++){var i=a[t].value(e),o=a[t+1].value(e),r=i+"_"+o,n=h.value(e),s=p.get(r);void 0!==s?p.set(r,s+n):(p.set(r,n),c.set(r,{source:i,target:o}))}}),new Map);return{nodes:Array.from(l).map(function(t,e){return o.set(t,e),{id:e,label:{text:String(t)}}}),links:Array.from(p).map(function(t){var e=t[0],t=t[1],e=c.get(e),i=e.source,e=e.target;return{sourceId:o.get(i),targetId:o.get(e),value:t}})}},B=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),cx="12px",c,ux=(c=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}])[0].value,dx="scatter",fx=["column","bar","line",dx],gx={type:"line",width:0};function yx(t){return t&&fx.includes(t)}var t,Ld,vx={bar:[{axisType:"category",types:t=["string","date","number"]},{axisType:"value",types:Ld=["number"]}],column:[{axisType:"category",types:t},{axisType:"value",types:Ld}],line:[{axisType:"category",types:t},{axisType:"value",types:Ld}],pie:[{axisType:"category",types:t},{axisType:"value",types:Ld,count:1}],scatter:[{axisType:"category",types:t},{axisType:"value",types:Ld}]};function mx(t,e){return((e||"")+" "+(t||"")).trim()}function xx(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}function _x(t,e,i){return i=xx(i).size,t?mx(t,i||e):""}function bx(t,e,i){return i=xx(i).name,t?mx(i||e,t):""}function wx(r){var t=structuredClone(r[0]);return t.forEach(function(t,e){if(!Sx(t.value))for(var i=0;i<r.length;i++){var o=r[i][e].value;if(Sx(o)){t.value=o;break}}}),t}function kx(o,r,t){var n,e,i,s,a=Tx(),h=(a.seriesType=r,a.data=o||[],a.legend={visible:!0,position:"bottom"},vx[r]);return h&&o.length&&(n=o[0].slice(),a.columns=o[0].map(function(t){return String(t.field)}),i=h.find(function(t){return"category"===t.axisType}),e=-1,i&&(e=t&&t.categoryAxis?a.columns.indexOf(t.categoryAxis):Cx(o,i)),t=h.filter(function(t){return"value"===t.axisType}),(i=Px(o,t)).includes(e)&&(1<i.length?i=i.filter(function(t){return t!==e}):e=-1),s=[],i.forEach(function(e){var t=n[e],i=[];o.forEach(function(t){i.push(t[e].value)}),s.push(Object.assign({},{name:t.field,type:r,data:i,stack:!1,labels:{visible:!1}},r===dx?gx:{}))}),h=-1<e?o.map(function(t){return String(Sx(t[e].value)?t[e].value:" ")}):[],s.length&&(a.series=s.map(function(t,e){return Object.assign({},t,{id:e})}),a.initialSeries=structuredClone(a.series)),a.categoryAxis=[{categories:h,labels:{visible:!0,rotation:"auto"}}],a.categoryField=a.columns[e]),a}function Ax(t,e,i){var o,r,n,s,a,h=Tx(),l=(h.seriesType=e,h.data=t||[],vx[e]);return l&&t.length&&(o=t[0].map(function(t){return t.field}),n=l.find(function(t){return"category"===t.axisType}),r=-1,n&&(r=i&&i.categoryAxis?o.indexOf(i.categoryAxis):Cx(t,n)),n=l.filter(function(t){return"value"===t.axisType}),s=[],(s=i&&i.valueAxis?[o.indexOf(i.valueAxis)]:Px(t,n)).includes(r)&&1<s.length&&(s=s.filter(function(t){return t!==r})),"number"==typeof n[0].count&&(s=s.slice(0,n[0].count)),l=-1<r?t.map(function(t){return String(t[r].value)}):[],a=[],t.forEach(function(e){var i={};s.forEach(function(t){t=e[t];i[t.field]=t.value||0,i[e[r].field]=e[r].value||" "}),a.push(i)}),h.columns=o,h.categoryAxis=[{categories:l,title:{text:""}}],h.series=[{id:0,data:a,type:e,name:o[r],labels:{visible:!0},categoryField:o[r],field:o[s[0]]}],h.categoryField=o[r],h.valueField=o[s[0]],h.initialSeries=structuredClone(h.series)),h}var Sx=function(t){return null!=t},Cx=function(i,t){var o=[],e=wx(i),t=(t.types.forEach(function(i){e.forEach(function(t,e){typeof t.value===i&&o.push(e)})}),o.findIndex(function(e){var t=i.map(function(t){return t[e].value});return new Set(t).size===t.length}));return Math.max(t,0)},Px=function(t,e){var o=[],r=wx(t);return e.forEach(function(t){t.types.forEach(function(i){r.forEach(function(t,e){typeof t.value===i&&o.push(e)})})}),o},Tx=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})};function Mx(t,e){return(yx(e)?kx:Ax)(t,e)}function Ox(t,e){var i=structuredClone(e);if(i.legend=t.legend,i.area=t.area,i.title=t.title,i.subtitle=t.subtitle,i.series.length===t.series.length)for(var o=0;o<i.series.length;o++)i.series[o].color=t.series[o].color,i.series[o].labels=t.series[o].labels;return t.series.every(function(t){return t.labels&&t.labels.visible})&&yx(i.seriesType)&&yx(t.seriesType)&&i.series.forEach(function(t){t.labels=t.labels||{},t.labels.visible=!0}),i}function Lx(t,e,i){var o=Object.assign({},t);switch(e){case B.seriesType:return Mx(o.data,i);case B.stacked:return o.series=o.series.map(function(t){return Object.assign({},t,{stack:i})}),o.stack=i,o;case B.categoryAxisX:return o.seriesType&&yx(o.seriesType)?Ox(o,kx(o.data,o.seriesType,{categoryAxis:i})):"pie"===o.seriesType?Ox(o,Ax(o.data,o.seriesType,{categoryAxis:i})):o;case B.valueAxisY:return"pie"===o.seriesType?Ox(o,Ax(o.data,o.seriesType,{categoryAxis:o.categoryField,valueAxis:i})):o;case B.seriesChange:return o.series=i,o;case B.areaMarginLeft:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{left:i})}),o;case B.areaMarginRight:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{right:i})}),o;case B.areaMarginTop:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{top:i})}),o;case B.areaMarginBottom:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{bottom:i})}),o;case B.areaBackground:return o.area=Object.assign({},o.area,{background:i}),o;case B.titleText:return o.title=Object.assign({},o.title,{text:i}),o;case B.titleFontName:return o.title=Object.assign({},o.title,{font:_x(i,"20px",o.title&&o.title.font)}),o;case B.titleFontSize:return o.title=Object.assign({},o.title,{font:bx(i,ux,o.title&&o.title.font)}),o;case B.titleColor:return o.title=Object.assign({},o.title,{color:i}),o;case B.subtitleText:return o.subtitle=Object.assign({},o.subtitle,{text:i}),o;case B.subtitleFontName:return o.subtitle=Object.assign({},o.subtitle,{font:_x(i,"16px",o.subtitle&&o.subtitle.font)}),o;case B.subtitleFontSize:return o.subtitle=Object.assign({},o.subtitle,{font:bx(i,ux,o.subtitle&&o.subtitle.font)}),o;case B.subtitleColor:return o.subtitle=Object.assign({},o.subtitle,{color:i}),o;case B.seriesColor:return o.series=o.series.map(function(t){return Object.assign({},t,{color:(i.seriesName===t.name?i:t).color})}),o;case B.seriesLabel:return o.series=o.series.map(function(t){return i.all||i.seriesName===t.name?Object.assign({},t,{labels:{visible:i.visible}}):t}),o;case B.legendVisible:return o.legend=Object.assign({},o.legend,{visible:i}),o;case B.legendFontName:var r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:_x(i,cx,r.labels&&r.labels.font)})}),o;case B.legendFontSize:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:bx(i,ux,r.labels&&r.labels.font)})}),o;case B.legendColor:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{color:i})}),o;case B.legendPosition:return o.legend=Object.assign({},o.legend,{position:i}),o;case B.categoryAxisTitleText:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}),o;case B.categoryAxisTitleFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:_x(i,"16px",t.title&&t.title.font)})})}),o;case B.categoryAxisTitleFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:bx(i,ux,t.title&&t.title.font)})})}),o;case B.categoryAxisTitleColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case B.categoryAxisLabelsFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:_x(i,cx,t.labels&&t.labels.font)})})}),o;case B.categoryAxisLabelsFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:bx(i,ux,t.labels&&t.labels.font)})})}),o;case B.categoryAxisLabelsColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case B.categoryAxisLabelsRotation:var n=Sx(i)?i:"auto";return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:n})})}),o;case B.categoryAxisReverseOrder:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{reverse:i})}),o;case B.valueAxisTitleText:return o.valueAxis&&0!==o.valueAxis.length?o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}):o.valueAxis=[{title:{text:i}}],o;case B.valueAxisTitleFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:_x(i,"16px",t.title&&t.title.font)})})}),o;case B.valueAxisTitleFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:bx(i,ux,t.title&&t.title.font)})})}),o;case B.valueAxisTitleColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case B.valueAxisLabelsFormat:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:i})})}),o;case B.valueAxisLabelsFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:_x(i,cx,t.labels&&t.labels.font)})})}),o;case B.valueAxisLabelsFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:bx(i,ux,t.labels&&t.labels.font)})})}),o;case B.valueAxisLabelsColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case B.valueAxisLabelsRotation:var s=Sx(i)?i:"auto";return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:s})})}),o;default:return o}}var tt=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),Ix=Object.freeze({getWizardDataFromDataRows:function(t){var o=[];return t.forEach(function(t){var e=t.dataItem,t=t.dataColumns,i=[];t.forEach(function(t){i.push({field:t.title||t.field,value:Ut(t.field)(e)})}),o.push(i)}),o},ActionTypes:B,createInitialState:function(t,e,i){t=Mx(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?Lx(t,B.stacked,i.stack):t},createState:Mx,fontNames:c,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:yx,mergeStates:Ox,parseFont:xx,updateState:Lx,messages:tt}),Bx=1.5,Ex=.4,Rx="#000",l,Vx="11px "+(l="Arial, Helvetica, sans-serif"),zx="12px "+l,jx="16px "+l,Dx="transparent",Fx="#fff",Hx={type:gn},Nx={type:on},Ux=Object.assign({},Nx,{markers:{visible:!1},highlight:{visible:!1}}),Gx=function(){return{icon:{border:{width:1}},label:{font:zx,padding:3},line:{length:10,width:2},legendItem:Ux,visible:!0}},Wx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Nx,opacity:.4}},Xx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Nx,opacity:.4}},Yx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Fx,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},legendItem:Ux}},qx=function(){return{gap:Bx,spacing:Ex,target:{color:"#ff0000"},legendItem:Ux}},Zx=function(){return{width:2,legendItem:Hx}},Qx=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Nx,opacity:.5}},Kx=function(){return{markers:{visible:!1},legendItem:Hx,width:2}},$x=function(){return{gap:.5,line:{color:Rx,width:1},legendItem:Ux,spacing:Ex}},Jx=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Ux}},t_=Jx,e_=function(t){return Object.assign({color:st,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:Hx},t)},i_=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:zx},notes:Gx(),title:{font:jx,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:Vx},overlay:t.gradients?{}:{gradient:"none"},area:Wx(),rangeArea:Xx(),verticalRangeArea:Xx(),bar:{gap:Bx,spacing:Ex,legendItem:Ux},boxPlot:Yx(),bubble:{border:{width:0},labels:{background:Dx},legendItem:Ux,opacity:.6},bullet:qx(),candlestick:{border:{_brightness:.8,width:1},downColor:Fx,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Rx,width:1},legendItem:Ux,spacing:.3},column:{gap:Bx,spacing:Ex,legendItem:Ux},heatmap:{labels:{color:"",background:Dx,visible:!0},highlight:{border:{width:0}},legendItem:Ux},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Ux},donut:{margin:1,legendItem:Ux},funnel:Jx(),pyramid:t_(),horizontalWaterfall:$x(),line:Zx(),notes:Gx(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:Ux,spacing:.3},radarArea:Qx(),radarLine:Kx(),radarColumn:{legendItem:Ux},polarArea:Qx(),polarLine:Kx(),polarScatter:{legendItem:Hx},rangeBar:{gap:Bx,spacing:Ex,legendItem:Ux},rangeColumn:{gap:Bx,spacing:Ex,legendItem:Ux},scatter:{legendItem:Hx},scatterLine:{width:1,legendItem:Hx},verticalArea:Wx(),verticalBoxPlot:Yx(),verticalBullet:qx(),verticalLine:Zx(),waterfall:$x(),linearTrendline:e_(),exponentialTrendline:e_({style:"smooth"}),logarithmicTrendline:e_({style:"smooth"}),polynomialTrendline:e_({style:"smooth"}),powerTrendline:e_({style:"smooth"}),movingAverageTrendline:e_()},title:{font:jx},subtitle:{font:zx},legend:{labels:{font:zx}}}}}return H})())}}});
1
+ System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var P0={};return{setters:[function(t){P0.Class=t.Class,P0.Color=t.Color,P0.drawing=t.drawing,P0.geometry=t.geometry,P0.logToConsole=t.logToConsole,P0.parseColor=t.parseColor,P0.support=t.support,P0.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var V={100:t=>{t.exports=P0}},z={};function j(t){var e=z[t];return void 0!==e||(e=z[t]={exports:{}},V[t](e,e.exports,j)),e.exports}j.d=(t,e)=>{for(var i in e)j.o(e,i)&&!j.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},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,F,H={};{j.r(H),j.d(H,{Aggregates:()=>eb,ArcGauge:()=>x0,ArcScale:()=>y0,AreaChart:()=>xb,AreaSegment:()=>yb,ArrowLinearPointer:()=>h0,Axis:()=>F_,AxisGroupRangeTracker:()=>_b,AxisLabel:()=>E_,Bar:()=>kb,BarChart:()=>Cb,BarLabel:()=>bb,BarLinearPointer:()=>p0,Barcode:()=>b0,Box:()=>R,BoxElement:()=>C_,BoxPlot:()=>Mb,BoxPlotChart:()=>Lb,BubbleChart:()=>Rb,Bullet:()=>zb,BulletChart:()=>jb,Candlestick:()=>Pb,CandlestickChart:()=>Tb,CategoricalChart:()=>sb,CategoricalErrorBar:()=>nb,CategoricalPlotArea:()=>s1,CategoryAxis:()=>H_,Chart:()=>K1,ChartAxis:()=>$_,ChartContainer:()=>Hb,ChartElement:()=>S_,ChartPane:()=>J_,ChartPlotArea:()=>tb,ChartService:()=>j_,ChartWizardCommon:()=>Vx,CircularGauge:()=>_0,Class:()=>M.Class,ClipAnimation:()=>db,ClusterLayout:()=>Ab,Crosshair:()=>Fb,CrosshairTooltip:()=>Db,CurveProcessor:()=>K_,DateCategoryAxis:()=>N_,DateValueAxis:()=>G_,DefaultAggregates:()=>Xb,DomEventsBuilder:()=>D_,DonutChart:()=>L1,DonutPlotArea:()=>I1,DonutSegment:()=>O1,ErrorBarBase:()=>rb,ErrorRangeCalculator:()=>ob,Extent:()=>Ry,FloatElement:()=>O_,FontLoader:()=>y_,FormatService:()=>z_,Gauge:()=>r0,Gradients:()=>T_,HashMap:()=>f_,Highlight:()=>a1,InstanceObserver:()=>g_,IntlService:()=>V_,Legend:()=>v1,LegendItem:()=>y1,LegendLayout:()=>c1,LineChart:()=>gb,LinePoint:()=>lb,LineSegment:()=>pb,LinearGauge:()=>c0,LinearPointer:()=>s0,LinearScale:()=>n0,Location:()=>Gg,LogarithmicAxis:()=>W_,Map:()=>C0,Matrix:()=>x_,MousewheelZoom:()=>p1,Navigator:()=>i0,NavigatorHint:()=>e0,Note:()=>R_,NumericAxis:()=>U_,OHLCChart:()=>i1,OHLCPoint:()=>e1,Observable:()=>__,Pane:()=>Nb,Pannable:()=>h1,PieAnimation:()=>w1,PieChart:()=>T1,PieChartMixin:()=>P1,PiePlotArea:()=>M1,PieSegment:()=>C1,PlotAreaBase:()=>Ub,PlotAreaEventsMixin:()=>Gb,PlotAreaFactory:()=>m1,Point:()=>E,PointEventsMixin:()=>ab,PolarAxis:()=>q_,QRCode:()=>k0,RadarCategoryAxis:()=>Y_,RadarLogarithmicAxis:()=>Q_,RadarNumericAxis:()=>Z_,RadialGauge:()=>g0,RadialPointer:()=>f0,RadialScale:()=>u0,RangeAreaChart:()=>t1,RangeAreaPoint:()=>Qb,RangeBar:()=>Yb,RangeBarChart:()=>qb,RangePointer:()=>m0,Ring:()=>w_,RootElement:()=>M_,Sankey:()=>px,ScatterChart:()=>Bb,ScatterErrorBar:()=>Ib,ScatterLineChart:()=>k1,Sector:()=>k_,Selection:()=>x1,SeriesAggregator:()=>Wb,SeriesBinder:()=>ib,ShapeBuilder:()=>A_,ShapeElement:()=>P_,SharedTooltip:()=>b1,Sparkline:()=>J1,SplineAreaSegment:()=>mb,SplineSegment:()=>ub,StackWrap:()=>Sb,StockChart:()=>o0,TemplateService:()=>d_,Text:()=>L_,TextBox:()=>I_,Title:()=>B_,Tooltip:()=>_1,UserEvents:()=>b_,WaterfallChart:()=>r1,WaterfallSegment:()=>o1,XYPlotArea:()=>S1,ZoomSelection:()=>l1,addClass:()=>_t,alignPathToPixel:()=>kt,anyHasZIndex:()=>cs,append:()=>ie,appendIfNotNull:()=>us,applyEventMap:()=>De,areNumbers:()=>ds,autoMajorUnit:()=>Ti,autoTextColor:()=>v_,barcodeValidator:()=>w0,bindEvents:()=>oe,bindSegments:()=>gs,categoriesCount:()=>ys,chartBaseTheme:()=>s_,chartTheme:()=>u_,clockwise:()=>At,constants:()=>N,convertableToNumber:()=>Ct,countNumbers:()=>Rr,createHashSet:()=>Be,createOutOfRangePoints:()=>Bs,createPatternFill:()=>Ni,createSankeyData:()=>cx,cycleDown:()=>Tt,cycleIndex:()=>Mt,cycleUp:()=>Pt,deepExtend:()=>O,defaultErrorHandler:()=>Ee,defined:()=>w,deg:()=>re,elementOffset:()=>ne,elementScale:()=>Te,elementSize:()=>se,elementStyles:()=>Vt,equalsIgnoreCase:()=>vs,evalOptions:()=>xs,eventCoordinates:()=>ae,eventElement:()=>he,eventMap:()=>ze,filterSeriesByType:()=>_s,find:()=>Ae,findAxisByName:()=>Ir,gaugeTheme:()=>p_,getAriaTemplate:()=>Ht,getField:()=>jr,getSpacing:()=>zt,getSupportedFeatures:()=>We,getTemplate:()=>Ft,getter:()=>Gt,grep:()=>Wt,hasClasses:()=>Xt,hasGradientOverlay:()=>ks,hasOwnProperty:()=>Re,hasValue:()=>As,hashKey:()=>le,inArray:()=>u,interpolateValue:()=>qt,isArray:()=>xt,isDateAxis:()=>Ss,isFunction:()=>Ot,isNumber:()=>m,isObject:()=>Bt,isPlainObject:()=>Kt,isString:()=>St,keys:()=>m_,last:()=>pe,limitValue:()=>x,logToConsole:()=>M.logToConsole,map:()=>$t,mousewheelDelta:()=>te,noop:()=>Xe,now:()=>Ye,objectKey:()=>ce,off:()=>Ge,on:()=>Ue,parseDateCategory:()=>ws,qrcodeValidator:()=>A0,rad:()=>ue,rectToBox:()=>Ki,removeClass:()=>wt,renderIcon:()=>we,round:()=>L,sankeyTheme:()=>c_,segmentVisible:()=>fs,setDefaultOptions:()=>e,singleItemOrArray:()=>Cs,sparseArrayLimits:()=>ke,styleValue:()=>Et,unbindEvents:()=>de,valueOrDefault:()=>_});var N={},U=(j.r(N),j.d(N,{DEFAULT_PANE:()=>bc,NAVIGATOR_AXIS:()=>_c,NAVIGATOR_PANE:()=>xc}),"arc"),G="ArrowUp",W="ArrowDown",X="ArrowLeft",Y="ArrowRight",q="aria-activedescendant",Z="#000",S="bottom",b="center",Q="circle",K=3,$="cross",J="date",tt="12px sans-serif",et=10,it="end",ot=/\{\d+:?/,rt="height",nt="inside",st="inherit",C="left",at=Number.MAX_VALUE,ht=-Number.MAX_VALUE,lt="none",pt="object",ct="outside",P="right",ut="roundedRect",dt="start",ft="string",T="top",gt="value",a="#fff",yt="width",y="x",v="y",vt="pointer",mt="horizontal";function xt(t){return Array.isArray(t)}function _t(t,e){for(var i=xt(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var bt=/\s+/g;function wt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(bt," "))}var M=j(100);function kt(t){var e=.5;t.options.stroke&&M.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function At(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function St(t){return typeof t===ft}function Ct(t){return m(t)||St(t)&&isFinite(t)}function Pt(t,e){return(t+1)%e}function Tt(t,e){t-=1;return t<0?e-1:t}function Mt(t,e){return 1===e||t%e==0?0:t<0?e+t%e:e<=t?t%e:t}function Ot(t){return"function"==typeof t}var Lt="object",It="undefined";function O(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r,n,s;"__proto__"!==o&&"constructor"!==o&&((s=(n=typeof(r=i[o]))===Lt&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):Ot(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===Lt&&s||{},t(e[o],r)):n!==It&&(e[o]=r))}}(t,e[o]);return t}function Bt(t){return"object"==typeof t}function Et(t){return m(t)?t+"px":t}var Rt=/width|height|top|left|bottom|right/i;function Vt(t,e){var i=St(e)?[e]:e;if(xt(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=Rt.test(s)?parseFloat(r[s]):r[s]}return o}if(Bt(e))for(var a in e)t.style[a]=Et(e[a])}function zt(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[T]=i[P]=i[S]=i[C]=t:(i[T]=t[T]||e,i[P]=t[P]||e,i[S]=t[S]||e,i[C]=t[C]||e),i}function jt(){}var Dt={compile:function(t){return t}};jt.register=function(t){Dt=t},jt.compile=function(t,e){return Dt.compile(t,e)};const d_=jt;function Ft(t){var e;return(t=void 0===t?{}:t).template?t.template=e=d_.compile(t.template):Ot(t.content)&&(e=t.content),e}function Ht(t){var e;return(t=void 0===t?{}:t).ariaTemplate?t.ariaTemplate=e=d_.compile(t.ariaTemplate):Ot(t.ariaContent)&&(e=t.ariaContent),e}var Nt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Ut={};function Gt(t){var r;return Ut[t]||(r=[],t.replace(Nt,function(t,e,i,o){r.push(M.drawing.util.defined(e)?e:i||o)}),Ut[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e}),Ut[t]}function Wt(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function Xt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}function Yt(){this._map=new Map}Ut[void 0]=function(t){return t},Yt.prototype.get=function(t){return this._map.get(t)},Yt.prototype.set=function(t,e){this._map.set(t,e)};const f_=Yt;function u(t,e){if(e)return-1!==e.indexOf(t)}function qt(t,e,i){return M.drawing.util.round(t+(e-t)*i,K)}function Zt(t,e){this.observer=t,this.handlerMap=O({},this.handlerMap,e)}var Qt="trigger";Zt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[Qt]&&(i=this.callObserver(Qt,t,e)),i},Zt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Zt.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 g_=Zt;function Kt(t){return"[object Object]"===Object.prototype.toString.call(t)}function $t(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);M.drawing.util.defined(n)&&o.push(n)}return o}var Jt=M.support.browser||{};function te(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 ee(){}var t,ie=(t=M.drawing.util).append,oe=t.bindEvents,w=t.defined,re=t.deg,ne=t.elementOffset,se=t.elementSize,ae=t.eventCoordinates,he=t.eventElement,le=t.hashKey,pe=t.last,x=t.limitValue,ce=t.objectKey,ue=t.rad,L=t.round,de=t.unbindEvents,_=t.valueOrDefault;ee.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,ee.fetchFonts(e,o,r),r.depth--))})},ee.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,M.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},ee.preloadFonts=function(t,e){var i=[];ee.fetchFonts(t,i),ee.loadFonts(i,e)};const y_=ee;function e(t,e){t=t.prototype;t.options?t.options=O({},t.options,e):t.options=e}function fe(t,e){this.element=t,this.options=O({},this.options,e),this.wrapper()}var ge,ye="k-i-",ve="k-svg-i-",t=(fe.prototype.wrapper=function(){this.addClasses()},fe.prototype.addClasses=function(){},fe.prototype.html=function(){return this.element.outerHTML},e(fe,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(ge=fe)&&(xe.__proto__=ge),((xe.prototype=Object.create(ge&&ge.prototype)).constructor=xe).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(ye)}),e=this.options.icon?(this.options.icon.startsWith(ye)?"":ye)+this.options.icon:"";this._className=e,_t(this.element,"k-icon"),_t(this.element,"k-font-icon"),wt(this.element,t),_t(this.element,e),_t(this.element,this.options.iconClass||""),ge.prototype.wrapper.call(this)},xe),me,i;function xe(t,e){ge.call(this,t,e)}function _e(t,e){t.innerHTML="",me.call(this,t,e)}e(t,{name:"HTMLFontIcon",icon:null}),(me=fe)&&(_e.__proto__=me),((_e.prototype=Object.create(me&&me.prototype)).constructor=_e).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,i=this.element.className.split(" ").find(function(t){return t.startsWith(ve)}),o=(!t&&e&&(o=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=o[1],e=e.replace(o[0],"")),St(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?ve+t.name:"");this._className=o,_t(this.element,"k-svg-icon"),wt(this.element,i),_t(this.element,o),_t(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&Kt(t)&&((i=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),i.setAttribute("focusable","false"),i.innerHTML=t.content||"",this.element.appendChild(i)),me.prototype.wrapper.call(this)},e(i=_e,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var be={svg:i,font:t};function we(t,e){return t&&(!Bt(t)||t instanceof HTMLElement)&&!St(t)||(e=t,t=document.createElement("span")),(e=St(e)?{icon:e}:e).type||(e.type="svg"),be[e.type]?new be[e.type](t,e).html():null}function ke(t){for(var e=at,i=ht,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===at?void 0:e,max:i===ht?void 0:i}}function Ae(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Se=M.geometry.Matrix,Ce=/matrix\((.*)\)/;function Pe(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(Ce))||2!==t.length?Se.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Se,[null].concat(t))))}function Te(t){if(!t)return Se.unit();for(var e=Pe(t),i=t.parentElement;i;)var o=Pe(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}const v_=function(t){return new M.Color(t).isDark()?a:Z};var Me={},Oe=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},i={size:{configurable:!0}},Le=(Oe.prototype.values=function(){return this._values.filter(function(t){return t!==Me})},Oe.prototype.has=function(t){return void 0!==this._index[t]},Oe.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Oe.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Me,delete this._index[t])},Oe.prototype.clear=function(){this._index={},this._values=[]},i.size.get=function(){return this._values.length},Object.defineProperties(Oe.prototype,i),function(t){this._set=new Set(t)}),t={size:{configurable:!0}},Ie=(Le.prototype.values=function(){return Array.from(this._set)},Le.prototype.has=function(t){return this._set.has(t)},Le.prototype.add=function(t){this._set.add(t)},Le.prototype.delete=function(t){this._set.delete(t)},Le.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(Le.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Be(t){return new(Ie()?Le:Oe)(t)}function Ee(t){throw t}const m_={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 Re(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ve(){this.height=0,this.width=0,this.data=[]}Ve.prototype.clone=function(){var t=new Ve;return t.height=this.height,t.width=this.width,t.data=this.data.map(function(t){return t.slice()}),t},Ve.prototype.get=function(t,e){t=this.data[t];return t?t[e]:null},Ve.prototype.set=function(t,e,i){var o=this.data[t];(o=null==o?this.data[t]=[]:o)[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},Ve.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},Ve.prototype.map=function(o,t){var r=new Ve;return this.each(function(t,e,i){r.set(e,i,o(t,e,i))},t),r},Ve.prototype.transpose=function(){var o=new Ve;return this.each(function(t,e,i){o.set(i,e,t)}),o},Ve.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;0<=--i;)for(var o=e[i]=new Array(t),r=t;0<=--r;)o[r]=i===r?1:0;return this},Ve.prototype.multiply=function(t){for(var e=new Ve,i=0;i<this.height;++i)for(var o=0;o<t.width;++o){for(var r=0,n=0;n<this.width;++n){var s=this.get(i,n),a=t.get(n,o);"number"==typeof s&&"number"==typeof a&&(r+=s*a)}e.set(i,o,r)}return e},Ve.prototype.inverse=function(){for(var n=this.width,t=this.augment((new Ve).unit(n)),s=t.data,e=0;e<n;++e){var i=function(e){var t,i=function(t,e,i){for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);o<s&&(o=s,r=t)}return r}(e,n,function(t){return s[t][e]});if(!s[i][e])return{v:null};e!==i&&(t=s[e],s[e]=s[i],s[i]=t);for(var o=e+1;o<n;++o){for(var r=e+1;r<2*n;++r)s[o][r]-=s[e][r]*s[o][e]/s[e][e];s[o][e]=0}}(e);if(i)return i.v}for(var o=0;o<n;++o)for(var r=s[o][o],a=0;a<2*n;++a)s[o][a]/=r;for(var h=n;0<=--h;)for(var l=h;0<=--l;)if(s[l][h])for(var p=2*n;--p>=n;)s[l][p]-=s[h][p]*s[l][h];return t.slice(0,n,n,n)},Ve.prototype.augment=function(t){var o=this.clone(),r=o.width;return t.each(function(t,e,i){o.set(e,i+r,t)}),o},Ve.prototype.slice=function(t,e,i,o){for(var r=new Ve,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};const x_=Ve;var ze={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function je(t){return ze[t]||t}var De=function(t){return t.replace(/([^ ]+)/g,je)};function Fe(){for(var t,e="",i=0;i<32;i++)t=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(e+="-"),e+=(12===i?4:16===i?3&t|8:t).toString(16);return e}var He=new WeakMap,Ne=Symbol("id");function Ue(t,e,i,o,r){var a,h,l,p;a=t,h=i,l=o,p=r,(xt(t=e)?t:(t||"").split(" ")).forEach(function(t){function e(t){var e=t.target?t.target.closest(n):null;(!n||t.target&&e)&&(e=n?e:t.currentTarget,Object.defineProperty(t,"currentTarget",{value:e}),Object.defineProperty(t,"delegateTarget",{value:i}),s(t))}var i,o,r,n,s;i=a,t=t,r=p,s=l,(o=h)&&Ot(o)&&!l?s=o:o&&"string"==typeof o&&Ot(s)&&(n=o),s[Ne]=Fe(),(o=He.get(i))||(o=new Map,He.set(i,o)),o.set(s[Ne],e),i.addEventListener(t,e,Boolean(r))})}function Ge(t,e,i,o,r){var s,a,h;s=t,a=i,h=o,(xt(t=e)?t:(t||"").split(" ")).forEach(function(t){var e,i,o,r,n;e=s,t=t,i=a,o=h,(n=He.get(e))&&i&&i[Ne]&&(i=i[Ne],r=n.get(i),n.delete(i),r)&&e.removeEventListener(t,r,Boolean(o))})}function We(){var t=function(t){var e,i=!1,o={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_]+)/,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},r={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(e in o)if(t.match(o[e])){if("windows"===e&&"plugins"in navigator)return!1;(i={}).device=e,i.name=function(t,e,i){for(var o in e)if(e[o].test(t))return o;return void 0!==i?i:t}(e,r),i[i.name]=!0;break}return i}(navigator.userAgent),e={};return e.mobileOS=t,e}function Xe(){}function Ye(){return(new Date).getTime()}function qe(){this._defaultPrevented=!0}function Ze(){return!0===this._defaultPrevented}var Qe,Ke="function";function $e(){Qe.call(this),this._events={}}(Qe=M.Class)&&($e.__proto__=Qe),(($e.prototype=Object.create(Qe&&Qe.prototype)).constructor=$e).prototype.destroy=function(){this.unbind()},$e.prototype.bind=function(t,e,i){var o,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==Ke;if(void 0===e)for(h in t)n.bind(h,t[h]);else for(var h=0,l=s.length;h<l;h++)!function(){var t=s[h];(r=a?e:e[t])&&(i&&(o=r,(r=function(){n.unbind(t,r),o.apply(n,arguments)}).original=o),(n._events[t]=n._events[t]||[]).push(r))}();return n},$e.prototype.one=function(t,e){return this.bind(t,e,!0)},$e.prototype.first=function(t,e){for(var i,o="string"==typeof t?[t]:t,r=typeof e==Ke,n=0,s=o.length;n<s;n++){var a=o[n];(i=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(i)}return this},$e.prototype.trigger=function(t,e){var i,o,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=qe,n.isDefaultPrevented=Ze,i=0,o=(r=r.slice()).length;i<o;i++)r[i].call(this,n);return!0===n._defaultPrevented}return!1},$e.prototype.unbind=function(t,e){var i,o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(i=o.length-1;0<=i;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},$e.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events)&&this._events[o]&&delete this._events[o]}this.bind(this.events,t)};const __=$e;function Je(t){t.preventDefault()}var ti=Object.assign,ei=800,ii=0,oi="move",ri="tap",ni="doubleTap",si="release",ai="gesturechange",hi="gestureend",li="gesturetap",pi={api:0,touch:0,mouse:9,pointer:9};function ci(t){var e=[],i=t.originalEvent||t,o=t.currentTarget;return t.api?e.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}):e.push({location:i,event:t,target:t.target,currentTarget:o,id:i.pointerId,type:"pointer"}),e}(di=M.Class)&&(vi.__proto__=di),((vi.prototype=Object.create(di&&di.prototype)).constructor=vi).prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Ye(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},vi.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var ui,di,fi=vi,gi=((ui=M.Class)&&(yi.__proto__=ui),((yi.prototype=Object.create(ui&&ui.prototype)).constructor=yi).prototype.press=function(){var t=this;this._holdTimeout=setTimeout(function(){return t._hold()},this.userEvents.minHold),this._trigger("press",this.pressEvent)},yi.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(ri,t):e._trigger(ni,t),e.userEvents._clicks=0},300))},yi.prototype._hold=function(){this._trigger("hold",this.pressEvent)},yi.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(Ai.current&&Ai.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(oi,t)}},yi.prototype.end=function(t){this.endTime=Ye(),this._finished||(this._finished=!0,this._trigger(si,t),this._moved?this._trigger("end",t):this.supportDoubleTap?this._tap(t):this._trigger(ri,t),clearTimeout(this._holdTimeout),this.dispose())},yi.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)},yi.prototype.skip=function(){this.dispose()},yi.prototype.cancel=function(){this.dispose()},yi.prototype.isMoved=function(){return this._moved},yi.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Ye(),this._moved=!0,this._trigger("start",t)},yi.prototype._trigger=function(t,e){var e=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,i)&&e.preventDefault()},yi.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},yi);function yi(t,e,i){ui.call(this),ti(this,{x:new fi("X",i.location),y:new fi("Y",i.location),type:i.type,threshold:t.threshold||pi[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function vi(t,e){di.call(this);var i=this;i.support=We(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=t,i._updateLocationData(e),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=Ye()}function mi(t){for(var e=ze.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}(xi=__)&&(Pi.__proto__=xi),((Pi.prototype=Object.create(xi&&xi.prototype)).constructor=Pi).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Pi.prototype.destroy=function(){var e,i=this,t=this.options,o=this.element;i._destroyed||(i._destroyed=!0,i.captureUpIfMoved&&(e=i.surface,mi(function(t){e.removeEventListener(t,i.preventIfMoving)})),Ge(i.surface,De("move"),this._surfaceMoveHandler),Ge(i.surface,De("up cancel"),this._surfaceEndHandler),Ge(o,De("down"),this._elementStartHandler),t.preventDragEvent&&Ge(o,De("dragstart"),this._elementDragStartHandler),Ge(o,De("mousedown"),this._elementSelectHandler),i._disposeAll(),i.unbind(),delete i.surface,delete i.element,delete i.currentTarget)},Pi.prototype.capture=function(){Pi.current=this},Pi.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Pi.prototype.notify=function(t,e){var i,o,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case oi:a=ai;break;case"end":a=hi;break;case ri:a=li}ti(e,{touches:s},(t=s[0],s=s[1],i=t.x.location,t=t.y.location,r=i-(o=s.x.location),n=t-(s=s.y.location),{center:{x:(i+o)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,ti(e,{type:a}))},Pi.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},Pi.prototype.move=function(t,e){this._apiCall("_move",t,e)},Pi.prototype.end=function(t,e){this._apiCall("_end",t,e)},Pi.prototype._isMultiTouch=function(){return 1<this.touches.length},Pi.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Pi.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Pi.prototype._isMoved=function(){return Wt(this.touches,function(t){return t.isMoved()}).length},Pi.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Pi.prototype._start=function(t){if(!(t.which&&1<t.which||this._maxTouchesReached())){Pi.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var e=ci(t),i=0;i<e.length&&!this._maxTouchesReached();i++){var o,r=e[i];(o=this.filter?r.currentTarget:this.element)&&0===o.length||(o=new gi(this,o,r),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))}}},Pi.prototype._move=function(t){this._eachTouch("move",t)},Pi.prototype._end=function(t){this._eachTouch("end",t)},Pi.prototype._eachTouch=function(t,e){for(var i,o,r,n={},s=ci(e),a=this.touches,h=0;h<a.length;h++)n[(i=a[h]).id]=i;for(h=0;h<s.length;h++)(r=n[(o=s[h]).id])&&("move"!==t||"pointer"!==o.type||this.surface.hasPointerCapture(o.id)||this.surface.setPointerCapture(o.id),r[t](o))},Pi.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:Xe,preventDefault:Xe})},Pi.defaultThreshold=function(t){ii=t},Pi.minHold=function(t){ei=t};var xi,_i,bi,wi,ki,Ai=Pi,Si,i,Ci,t;function Pi(t,e){xi.call(this);var i,o,r=this,n=We();this.support=n,this.options=e=e||{},n=r.filter=e.filter,r.threshold=e.threshold||ii,r.minHold=e.minHold||ei,r.touches=[],r._maxTouches=e.multiTouch?2:1,r.allowSelection=e.allowSelection,r.captureUpIfMoved=e.captureUpIfMoved,r._clicks=0,r.supportDoubleTap=e.supportDoubleTap,ti(r,{element:t,surface:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Ue(r.surface,De("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Ue(r.surface,De("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Ue(t,De("down"),n,this._elementStartHandler),t.style["touch-action"]=e.touchAction||"none",e.preventDragEvent&&(this._elementDragStartHandler=Je,Ue(t,De("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Ue(t,De("mousedown"),n,this._elementSelectHandler),r.captureUpIfMoved&&(i=r.surface,o=r.preventIfMoving.bind(r),mi(function(t){i.addEventListener(t,o,!0)})),r.bind(["press","hold",ri,ni,"start",oi,"end",si,"cancel","gesturestart",ai,hi,li,"select"],e)}const b_=Ai;function Ti(t,e){t=L(e-t,et-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=L(t/e,et);return L(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),et)}(_i=M.Class)&&(Mi.__proto__=_i),((Mi.prototype=Object.create(_i&&_i.prototype)).constructor=Mi).prototype.clone=function(){return new Mi(this.x,this.y)},Mi.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Mi.prototype.rotate=function(t,e){var e=ue(e),i=Math.cos(e),e=Math.sin(e),o=t.x,t=t.y,r=this.x,n=this.y;return this.x=L(o+(r-o)*i+(n-t)*e,K),this.y=L(t+(n-t)*i-(r-o)*e,K),this},Mi.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Mi.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Mi.onCircle=function(t,e,i){e=ue(e);return new Mi(t.x-i*Math.cos(e),t.y-i*Math.sin(e))};const E=Mi;function Mi(t,e){_i.call(this),this.x=t||0,this.y=e||0}function Oi(t,e,i,o){bi.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Li(t,e,i,o,r){r=ue(r);return new E(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}(bi=M.Class)&&(Oi.__proto__=bi),((Oi.prototype=Object.create(bi&&bi.prototype)).constructor=Oi).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Oi.prototype.width=function(){return this.x2-this.x1},Oi.prototype.height=function(){return this.y2-this.y1},Oi.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Oi.prototype.move=function(t,e){var i=this.height(),o=this.width();return w(t)&&(this.x1=t,this.x2=this.x1+o),w(e)&&(this.y1=e,this.y2=this.y1+i),this},Oi.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},Oi.prototype.wrapPoint=function(t){var e=xt(t),i=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Oi(i,e,i,e)),this},Oi.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},Oi.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===T||e===S?v:y,a=s==v?r:n;return e===b?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===T||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Oi.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Oi.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Oi.prototype.pad=function(t){t=zt(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Oi.prototype.unpad=function(t){t=zt(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Oi.prototype.clone=function(){return new Oi(this.x1,this.y1,this.x2,this.y2)},Oi.prototype.center=function(){return new E(this.x1+this.width()/2,this.y1+this.height()/2)},Oi.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Oi.prototype.points=function(){return[new E(this.x1,this.y1),new E(this.x2,this.y1),new E(this.x2,this.y2),new E(this.x1,this.y2)]},Oi.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Oi.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Oi.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,o=o.y,n=Li(0,0,r,o,t),s=Li(e,0,r,o,t),a=Li(e,i,r,o,t),r=Li(0,i,r,o,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),i=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+i,this},Oi.prototype.toRect=function(){return new M.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Oi.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Oi.prototype.align=function(t,e,i){var o=e+1,r=e+2,e=e===y?yt:rt,n=this[e]();u(i,[C,T])?(this[o]=t[o],this[r]=this[o]+n):u(i,[P,S])?(this[r]=t[r],this[o]=this[r]-n):i===b&&(this[o]=t[o]+(t[e]()-n)/2,this[r]=this[o]+n)};const R=Oi;function Ii(t,e,i,o,r){wi.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}function Bi(t,e){return t-e}(wi=M.Class)&&(Ii.__proto__=wi),((Ii.prototype=Object.create(wi&&wi.prototype)).constructor=Ii).prototype.clone=function(){return new Ii(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},Ii.prototype.middle=function(){return this.startAngle+this.angle/2},Ii.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},Ii.prototype.point=function(t,e){var t=ue(t),i=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,i=L(this.center.x-i*e,K),t=L(this.center.y-t*e,K);return new E(i,t)},Ii.prototype.adjacentBox=function(t,e,i){var t=this.clone().expand(t),o=t.middle(),t=t.point(o),r=e/2,n=i/2,s=Math.sin(ue(o)),o=Math.cos(ue(o)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-o/Math.abs(o)),Math.abs(o)<.9&&(t+=n*-s/Math.abs(s)),new R(a,t,a+e,t+i)},Ii.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new E(s,t),r=this.point(r),r=new E(r.x-e.x,r.y-e.y),n=this.point(n),n=new E(n.x-e.x,n.y-e.y),e=L(s*s+t*t,K);return(r.equals(a)||At(r,a))&&!At(n,a)&&i*i<=e&&e<=o*o},Ii.prototype.getBBox=function(){for(var t=new R(at,at,ht,ht),e=L(this.startAngle%360),i=L((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(Bi),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),h=0;h<a.length;h++){var l=this.point(a[h]);t.wrapPoint(l),t.wrapPoint(l,o)}return o||t.wrapPoint(this.center),t},Ii.prototype.expand=function(t){return this.radius+=t,this};const w_=Ii;function Ei(t,e,i,o){ki.call(this,t,0,e,i,o)}(ki=w_)&&(Ei.__proto__=ki),((Ei.prototype=Object.create(ki&&ki.prototype)).constructor=Ei).prototype.expand=function(t){return ki.prototype.expand.call(this,t)},Ei.prototype.clone=function(){return new Ei(this.center,this.radius,this.startAngle,this.angle)},Ei.prototype.setRadius=function(t){return this.radius=t,this};const k_=Ei;function Ri(){Si.apply(this,arguments)}(Si=M.Class)&&(Ri.__proto__=Si),((Ri.prototype=Object.create(Si&&Si.prototype)).constructor=Ri).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i,r=((0===t.angle||0<t.angle&&i===o)&&(o+=.001),new M.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new M.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=M.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},(i=Ri).current=new i;const A_=i;function Vi(t){Ci.call(this),this.children=[],this.options=O({},this.options,this.initUserOptions(t))}(Ci=M.Class)&&(Vi.__proto__=Ci),((Vi.prototype=Object.create(Ci&&Ci.prototype)).constructor=Vi).prototype.initUserOptions=function(t){return t},Vi.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},Vi.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},Vi.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},Vi.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},Vi.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},Vi.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},Vi.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},Vi.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},Vi.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},Vi.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},Vi.prototype.createVisual=function(){this.visual=new M.drawing.Group({zIndex:this.options.zIndex,visible:_(this.options.visible,!0)})},Vi.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=M.drawing.Animation.create(this.visual,this.options.animation))},Vi.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):w(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},Vi.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},Vi.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},Vi.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(_(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},Vi.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},Vi.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},Vi.prototype.renderComplete=function(){},Vi.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},Vi.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);w(n.options.zIndex)||(n.options.zIndex=_(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},Vi.prototype.toggleFocusHighlight=function(t){var e,i=(this.options||{}).focusHighlight||{},o=this._focusHighlight;(t||o)&&(o||(e=this.getRoot().options.background,e=v_(e),e={fill:{opacity:i.opacity,color:i.color},stroke:Object.assign({},{color:e},i.border),zIndex:i.zIndex},o=this._focusHighlight=this.createFocusHighlight(e),this.appendVisual(o)),o.visible(t))},Vi.prototype.createGradientOverlay=function(t,e,i){i=new M.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},Vi.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},Vi.prototype.supportsPointInactiveOpacity=function(){return!0},(t=Vi).prototype.options={};const S_=t;var zi={dots:M.drawing.dotsPattern,verticalStripes:M.drawing.verticalStripesPattern,crosshatch:M.drawing.crosshatchPattern,diagonalStripes:M.drawing.diagonalStripesPattern,grid:M.drawing.gridPattern},ji,i,Di,t,Fi,t,Hi,i;function Ni(t,e,i){i=Ot(t=t)?t(i):t,t=i&&zi[i.type];return t?t(Object.assign({},e,i)):e}function Ui(t){ji.call(this,t),this.options.margin=zt(this.options.margin),this.options.padding=zt(this.options.padding)}(ji=S_)&&(Ui.__proto__=ji),((Ui.prototype=Object.create(ji&&ji.prototype)).constructor=Ui).prototype.reflow=function(t){function e(){o.align(t,y,r.align),o.align(t,v,r.vAlign),o.paddingBox=i.clone().unpad(l).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,l=r.margin,p=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(l).unpad(c).unpad(p),ji.prototype.reflow.call(this,u),i=h?this.box=new R(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(p)):(u=this.contentBox=i.clone(),i.pad(p).pad(c).pad(l),e()),this.translateChildren(i.x1-u.x1+l.left+c+p.left,i.y1-u.y1+l.top+c+p.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},Ui.prototype.align=function(t,e,i){this.box.align(t,e,i)},Ui.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},Ui.prototype.createVisual=function(){ji.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},Ui.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:Ni(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}},e(i=Ui,{align:C,vAlign:T,margin:{},padding:{},border:{color:Z,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const C_=i;function Gi(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}function Wi(t,e){Di.call(this,t),this.pointData=e}(Di=C_)&&(Wi.__proto__=Di),((Wi.prototype=Object.create(Di&&Di.prototype)).constructor=Wi).prototype.getElement=function(){var t,e,i=this.options,o=this.paddingBox,r=i.type,n=i.rotation,s=o.center(),a=o.width()/2,h=o.height()/2;return i.visible&&this.hasBox()?(e=this.visualStyle(),r===Q?t=new M.drawing.Circle(new M.geometry.Circle([L(o.x1+a,K),L(o.y1+h,K)],Math.min(a,h)),e):"triangle"===r?t=M.drawing.Path.fromPoints([[o.x1+a,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===$?((t=new M.drawing.MultiPath(e)).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):(h=o.toRect(),r===ut&&(a=_(i.borderRadius,h.width()/5),h.setCornerRadius(a)),t=M.drawing.Path.fromRect(h,e)),n&&t.transform(M.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=i.zIndex,t):null},Wi.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},Wi.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}},Wi.prototype.createVisual=function(){this.visual=this.createElement(),Gi(this.visual,this.options.accessibilityOptions)},e(t=Wi,{type:Q,align:b,vAlign:b});const P_=t,T_={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:i="radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:i,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:i,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:i,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:i,center:[.5,.5],radius:.5}};function Xi(t){Fi.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}(Fi=S_)&&(Xi.__proto__=Fi),((Xi.prototype=Object.create(Fi&&Fi.prototype)).constructor=Xi).prototype.reflow=function(){var t=this.options,e=this.children,i=new R(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o,r,n,s,a,h,l,p,c,u,d,f=0;f<e.length;f++)e[f].reflow(i),o=i,r=e[f].box,d=u=c=p=l=h=a=s=n=void 0,i=(o.x1===r.x1&&o.y1===r.y1&&o.x2===r.x2&&o.y2===r.y2?r:(n=Math.min(o.x1,r.x1),s=Math.max(o.x1,r.x1),a=Math.min(o.x2,r.x2),h=Math.max(o.x2,r.x2),l=Math.min(o.y1,r.y1),p=Math.max(o.y1,r.y1),c=Math.min(o.y2,r.y2),u=Math.max(o.y2,r.y2),(d=[])[0]=new R(s,l,a,p),d[1]=new R(n,p,s,c),d[2]=new R(a,p,h,c),d[3]=new R(s,c,a,u),o.x1===n&&o.y1===l||r.x1===n&&r.y1===l?(d[4]=new R(n,l,s,p),d[5]=new R(a,c,h,u)):(d[4]=new R(a,l,h,p),d[5]=new R(n,c,s,u)),Wt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new R},Xi.prototype.createVisual=function(){this.visual=new M.drawing.Group,this.createBackground()},Xi.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),i=M.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(i)},Xi.prototype.getRoot=function(){return this},Xi.prototype.createGradient=function(t){var e,s,i=this.gradients,o=ce(t),r=T_[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new M.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o}()),(e=new M.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},Xi.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Xi.prototype.size=function(){var t=this.options;return new R(0,0,t.width,t.height)},e(t=Xi,{width:600,height:400,background:a,border:{color:Z,width:0},margin:zt(5),zIndex:-2});const M_=t;function Yi(t){Hi.call(this,t),this._initDirection()}(Hi=S_)&&(Yi.__proto__=Hi),((Yi.prototype=Object.create(Hi&&Hi.prototype)).constructor=Yi).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=yt,this.elementSizeField=rt,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=rt,this.elementSizeField=yt,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Yi.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Yi.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,h=s.length,l=e[o+1]+this.alignStart(a,e[n]());if(h){for(var p=l,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=e[i+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=p+this.alignStart(m[n],u.groupSize),_=new R;_[o+1]=x,_[o+2]=x+m[n],_[i+1]=f,_[i+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}p+=u.groupSize+this.groupSpacing}e[o+1]=l,e[o+2]=l+a,e[i+2]=e[i+1]+t}},Yi.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===P||o===S?i=e-t:o===b&&(i=(e-t)/2),i},Yi.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=L(e[o]()),h=i.length,l=[],p=0,c=0,u=0,d=0,f=[],g=0;g<h;g++){var y=i[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&L(c+n+v[o])>a&&(l.push({groupElements:f,groupSize:p,groupElementsSize:c}),d=Math.max(d,c),u+=s+p,c=p=0,f=[]),p=Math.max(p,v[r]),0<c&&(c+=n),c+=v[o],f.push(y)}return l.push({groupElements:f,groupSize:p,groupElementsSize:c}),{groups:l,groupsSize:u+=p,maxGroupElementsSize:d=Math.max(d,c)}},Yi.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Yi.prototype.createVisual=function(){},e(i=Yi,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const O_=i;var qi,Zi=M.drawing.Text,t;function Qi(t,e){qi.call(this,e),this.content=t,this.reflow(new R)}(qi=S_)&&(Qi.__proto__=qi),((Qi.prototype=Object.create(qi&&qi.prototype)).constructor=Qi).prototype.reflow=function(t){var e=this.options,e=e.size=M.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new R(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Qi.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,t=t.paintOrder;this.visual=new Zi(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:t})},e(t=Qi,{font:tt,color:Z});const L_=t;function Ki(t){var e=t.origin,t=t.bottomRight();return new R(e.x,e.y,t.x,t.y)}var $i,Ji=/\n/m,to,i,eo,t,io,i;function oo(t,e,i){$i.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new R)}($i=C_)&&(oo.__proto__=$i),((oo.prototype=Object.create($i&&$i.prototype)).constructor=oo).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ji),i=new O_({vertical:!0,align:t.align,wrap:!1}),o=O({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new L_(e[r].trim(),o);i.append(n)}},oo.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=Ki(o.clippedBBox()||new M.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):($i.prototype.reflow.call(this,t),i.rotation&&(o=zt(i.margin),e=this.box.unpad(o),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(o.left-o.right,o.top-o.bottom),this.rotatedBox=e.clone(),e.pad(o)))},oo.prototype.createVisual=function(){var t=this.options;this.visual=new M.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},oo.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!w(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):$i.prototype.renderVisual.call(this))},oo.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},oo.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},oo.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},oo.prototype.rotationTransform=function(){var t,e,i,o=this.options.rotation;return o?(t=(e=this.normalBox.center()).x,e=e.y,i=this.rotatedBox.center(),M.geometry.transform().translate(i.x-t,i.y-e).rotate(o,[t,e])):null};const I_=oo;function ro(t){to.call(this,t),this._textBox=new I_(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function no(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(zt(o.options.margin),{bottom:0}),i.options.margin=Object.assign(zt(i.options.margin),{top:0})}}(to=S_)&&(ro.__proto__=to),((ro.prototype=Object.create(to&&to.prototype)).constructor=ro).prototype.reflow=function(t){to.prototype.reflow.call(this,t),this.box.snapTo(t,y)},ro.buildTitle=function(t,e){var i,t="string"==typeof t?{text:t}:t;return i=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new ro(t):i},ro.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==S}),t=t.filter(function(t){return t&&t.options.position===S});return no(e),no(t),t.reverse(),e.concat(t)},e(i=ro,{color:Z,position:T,align:b,margin:zt(5),padding:zt(5)});const B_=i;function so(t,e,i,o,r){eo.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new R)}(eo=I_)&&(so.__proto__=eo),((so.prototype=Object.create(eo&&eo.prototype)).constructor=so).prototype.visualContext=function(t){t=eo.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},so.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:he(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},so.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ki(t.bbox(e.matrix()))):eo.prototype.rotate.call(this),this.box},so.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return eo.prototype.rotationTransform.call(this);var i=M.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||T,n=t===T||t===S?y:v,s=t===T||t===S?v:y,t=t===T||t===C?r.origin:r.bottomRight(),a=o.topLeft().transformCopy(i),h=o.topRight().transformCopy(i),l=o.bottomRight().transformCopy(i),o=o.bottomLeft().transformCopy(i),i=M.geometry.Rect.fromPoints(a,h,l,o),p={};p[s]=r.origin[s]-i.origin[s];var c,i=Math.abs(a[s]+p[s]-t[s]),t=Math.abs(h[s]+p[s]-t[s]),s=L(i,et)===L(t,et)?(c=a,h):t<i?(c=h,l):(c=a,o),t=c[n]+(s[n]-c[n])/2;return p[n]=r.center()[n]-t,M.geometry.transform().translate(p.x,p.y).rotate(e)},e(t=so,{_autoReflow:!1});const E_=t;function ao(t,e,i){io.call(this,e),this.fields=t,this.chartService=i,this.render()}(io=C_)&&(ao.__proto__=io),((ao.prototype=Object.create(io&&io.prototype)).constructor=ao).prototype.hide=function(){this.options.visible=!1},ao.prototype.show=function(){this.options.visible=!0},ao.prototype.render=function(){var t,e,i,o,r,n,s,a,h=this,l=this.options;l.visible&&(i=l.label,l=l.icon,o=new R,r=function(){return h},n=l.size,s=this.fields.text,w(i)&&i.visible&&((a=Ft(i))?s=a(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color=i.position===nt?"#fff":l.background),this.label=new I_(s,O({},i)),this.label.aliasFor=r,i.position!==nt||w(n)||(l.type===Q?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),l.width=t||n||7,l.height=e||n||7,(a=new P_(O({},l))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new R),this.wrapperBox=o.wrap(a.box))},ao.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),l=r.line.length,p=r.position;r.visible&&(u(p,[C,P])?p===C?(o=a.alignTo(t,p).translate(-l,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[o.x2,h.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(l,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[o.x1,h.y]],i=o.clone().wrapPoint(e))):p===S?(o=a.alignTo(t,p).translate(t.center().x-a.center().x,l),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(t.center().x-a.center().x,-l),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s)&&(r.label.position===ct&&n.box.alignTo(s.box,p),n.reflow(n.box)),this.contentBox=o,this.targetBox=t,this.box=i||o)},ao.prototype.createVisual=function(){io.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},ao.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(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()):io.prototype.renderVisual.call(this)},ao.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(kt(t=M.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},ao.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},ao.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},ao.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},ao.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:he(t),text:w(e.label)?e.label.text:"",visual:this.visual})},e(i=ao,{icon:{visible:!0,type:Q},label:{position:nt,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:T,zIndex:2});const R_=i;function ho(){}var lo={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}};ho.register=function(t){lo=t},t.implementation.get=function(){return lo},Object.defineProperties(ho,t);const V_=ho;function po(t){this._intlService=t}var co=/\{(\d+)(:[^\}]+)?\}/g,i,uo,i;(i={intl:{configurable:!0}}).intl.get=function(){return this._intlService||V_.implementation},i.intl.set=function(t){this._intlService=t},po.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return St(t)&&t.match(ot)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},po.prototype.localeAuto=function(t,o,r){var n=this.intl;return St(t)&&t.match(ot)?t.replace(co,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(po.prototype,i);const z_=po;function fo(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new z_(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}(t={intl:{configurable:!0}}).intl.get=function(){return this._intlService||V_.implementation},t.intl.set=function(t){this._intlService=t,this.format.intl=t},fo.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},fo.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(fo.prototype,t);const j_=fo;function go(){}go.register=function(t){D=t},go.create=function(t,e){return D?D.create(t,e):new b_(t,Object.assign({},{multiTouch:!0},e))};const D_=go;function yo(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new M.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),kt(n),n}function vo(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),kt(e),e}function o(t,e){void 0===e&&(e=new j_),uo.call(this,t),this.chartService=e,this.options.visible||(this.options=O({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==lt},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==lt},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}(uo=S_)&&(o.__proto__=uo),((o.prototype=Object.create(uo&&uo.prototype)).constructor=o).prototype.initFields=function(){},o.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},o.prototype.normalizeLabelRotation=function(t){var e=t.rotation;Bt(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},o.prototype.createLabels=function(){var t=this.options,e=t.vertical?P:b,i=O({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},s=this.createAxisLabel(n,i,s);s&&(this.append(s),this.labels.push(s))}}},o.prototype.clearLabels=function(){this.children=Wt(this.children,function(t){return!(t instanceof E_)}),this.labels=[]},o.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Wt(this.children,function(t){return t!==e.title}),this.title=void 0)},o.prototype.clear=function(){this.clearLabels(),this.clearTitle()},o.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new R(r,e.y1,r,e.y2-t):new R(e.x1,o,e.x2-t,o)},o.prototype.createTitle=function(){var t=this.options,t=O({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new I_(t.text,t),this.append(t),this.title=t)},o.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=O({},e,i[o]),r=(r.value=this.parseNoteValue(r.value),new R_({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(w(r.options.position)?t.vertical&&!u(r.options.position,[C,P])?r.options.position=t.reverse?C:P:t.vertical||u(r.options.position,[T,S])||(r.options.position=t.reverse?S:T):t.vertical?r.options.position=t.reverse?C:P:r.options.position=t.reverse?S:T,this.append(r),this.notes.push(r))}},o.prototype.parseNoteValue=function(t){return t},o.prototype.renderVisual=function(){uo.prototype.renderVisual.call(this),this.createPlotBands()},o.prototype.createVisual=function(){uo.prototype.createVisual.call(this),this.createBackground(),this.createLine()},o.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new M.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},o.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),h=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,l={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)w(i)&&n%i==0||(l.tickX=h?a.x2:a.x2-e.size,l.tickY=h?a.y1-e.size:a.y1,l.position=t[n],s.append(yo(l,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},o.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&kt(e),(i=this._lineGroup=new M.drawing.Group).append(e),this.visual.append(i),this.createTicks(i))},o.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},o.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=M.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},o.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=Wt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var h=i[a],l=void 0,p=void 0,c=h.label,u=void 0,p=o?(l=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(l=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,h,new R(l.x1,p.y1,l.x2,p.y2))),0!==l.width()&&0!==p.height()&&(c=new M.geometry.Rect([l.x1,p.y1],[l.width(),p.height()]),l=M.drawing.Path.fromRect(c,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(l),u)&&n.append(u)}this.appendVisual(n)}},o.prototype.createPlotBandLabel=function(t,e,i){var o,r;return!1===t.visible?null:(o=t.text,w(t)&&t.visible&&((r=Ft(t))?o=r({text:o,item:e}):t.format&&(o=this.chartService.format.auto(t.format,o)),t.color||(t.color=this.options.labels.color)),(r=new I_(o,t)).reflow(i),r.renderVisual(),r.visual)},o.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],l={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},p=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=L(t[n]);u(s,p)||n%i==0||a&&h===s||(l.position=s,c.append(vo(l,e)),p.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},o.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?yt:rt,o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,h=((this.getRoot()||{}).box||t)[s](),l=0,p=0;p<n;p++){var c=i[p].box[s]();c+a<=h&&(l=Math.max(l,c))}this.box=r?new R(t.x1,t.y1,t.x1+l+a,t.y2):new R(t.x1,t.y1,t.x2,t.y1+l+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},o.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},o.prototype.labelTickIndex=function(t){return t.index},o.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),l=o?a.box.height():a.box.width(),p=n[h],h=n[h+1],c=void 0,u=void 0,u=o?c=i?p+(h-p)/2-l/2:p-l/2:i?(c=p,h):(c=p-l/2)+l;this.positionLabel(a,r,c,u)}},o.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);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=P),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=T),new R(i,n,o,n+t.box.height()));t.reflow(s)},o.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},o.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(o=0!==s?s:o))break}if(0!==o){for(var a=0;a<e.length;a++)e[a].options.rotation=o,e[a].reflow(new R);return!0}},o.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=i?P:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?T:S),e.reflow(this.box))},o.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;w(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},o.prototype.noteSlot=function(t){return this.getSlot(t)},o.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,i=e?v:y;this.box.snapTo(t,i),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[i+1]-=this.lineBox()[i+1]-t[i+1],this.box[i+2]-=this.lineBox()[i+2]-t[i+2]},o.prototype.axisLabelText=function(t,e,i){function o(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=Ft(e);return n?n(Object.assign({},i,{get text(){return o()},value:t,format:e.format,culture:e.culture})):o()},o.prototype.slot=function(t,e,i){t=this.getSlot(t,e,i);if(t)return t.toRect()},o.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),i[e+1]-=t.start,i[e+2]+=t.end):(o[0].options.visible&&i.wrap(o[0].box),(e=o[o.length-1]).options.visible&&i.wrap(e.box))),i},o.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,h=0,l=0,p=0;p<n.length;p++){var c=n[p],u=this.labelTickIndex(c),d=void 0,f=void 0;i?(d=o[u+s],f=o[u+a]):d=f=o[u],h=Math.max(h,d-c.box[r+1]),l=Math.max(l,c.box[r+2]-f)}return{start:h,end:l}},o.prototype.limitRange=function(t,e,i,o,r){var n,s,a=this.options;return t<i&&r<0&&(!w(a.min)||a.min<=i)||o<e&&0<r&&(!w(a.max)||o<=a.max)?null:e<i&&0<r||o<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<i&&r<0?(n=x(t,i,o),s=x(t+a,i+a,o)):o<e&&0<r&&(s=x(e,i,o),n=x(e-a,i,o-a)),{min:n,max:s})},o.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},o.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},o.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),t=t?v:y,o=this.lineDir(),r=t+(1===o?1:2).toString();return{axis:t,axisOrigin:r,axisDir:o,lineBox:e,lineSize:i,lineStart:e[r]}},o.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<o?t[i]-n[r]:n[r]-t[i])/e},o.prototype.scaleToDelta=function(t,e){t=x(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},o.prototype.labelsBetweenTicks=function(){return!this.options.justified},o.prototype.prepareUserOptions=function(){},e(i=o,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Z,visible:!0},title:{visible:!0,position:b},majorTicks:{align:ct,size:4,skip:0,step:1},minorTicks:{align:ct,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:ct,minorTickType:lt,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Z,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const F_=i;var mo="milliseconds",xo="seconds",_o="minutes",bo="hours",wo="days",ko="weeks",Ao="months",So="years",Co=1e3,Po=60*Co,To=60*Po,Mo=24*To,Oo=7*Mo,Lo=31*Mo,Io=365*Mo,Bo={years:Io,months:Lo,weeks:Oo,days:Mo,hours:To,minutes:Po,seconds:Co,milliseconds:1},Eo,t;function Ro(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Po}function Vo(t,e){return new Date(t.getTime()+e)}function zo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function jo(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Do(t,e,i,r){var o,n,s,a=t;return t&&(o=(t=zo(t)).getHours(),i===So?jo(a=new Date(t.getFullYear()+e,0,1),0):i===Ao?jo(a=new Date(t.getFullYear(),t.getMonth()+e,1),o):i===ko?jo(a=Do(function(t,e){void 0===r&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return Vo(t,-i*Mo)}(t,r),7*e,wo),o):i===wo?jo(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),o):i===bo?(o=t,n=e,(s=new Date(o)).setMinutes(0,0,0),o=(o.getTimezoneOffset()-s.getTimezoneOffset())*Po,a=Vo(s,o+n*To)):i===_o?0<(a=Vo(t,e*Po)).getSeconds()&&a.setSeconds(0):i===xo?a=Vo(t,e*Co):i===mo&&(a=Vo(t,e)),i!==mo)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function Fo(t,e,i){return Do(zo(t),0,e,i)}function Ho(t,e,i){t=zo(t);return t&&Fo(t,e,i).getTime()===t.getTime()?t:Do(t,1,e,i)}function No(t,e){return t&&e?t.getTime()-e.getTime():-1}function Uo(t,e){return t.getTime()-e}function Go(t){if(xt(t)){for(var e=[],i=0;i<t.length;i++)e.push(Go(t[i]));return e}if(t)return zo(t).getTime()}function Wo(t,e){return t&&e?Go(t)===Go(e):t===e}function Xo(t,e,i){return Ro(t,e)/Bo[i]}function Yo(t,e,i,o){var t=zo(t),r=zo(e);return(i===Ao?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Xo(t,new Date(t.getFullYear(),t.getMonth()),wo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():i===So?t.getFullYear()-r.getFullYear()+Yo(t,new Date(t.getFullYear(),0),Ao,1)/12:i===wo||i===ko?Xo(t,r,i):Uo(t,e)/Bo[i])/o}function qo(t,e,i){return i===So?e.getFullYear()-t.getFullYear():i===Ao?12*qo(t,e,So)+e.getMonth()-t.getMonth():i===wo?Math.floor(Uo(e,t)/Mo):Math.floor(Uo(e,t)/Bo[i])}function Zo(t,e){return St(e)&&t.parseDate(e)||zo(e)}function Qo(t,e){if(xt(e)){for(var i=[],o=0;o<e.length;o++)i.push(Zo(t,e[o]));return i}return Zo(t,e)}function Ko(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}function r(){Eo.apply(this,arguments)}(Eo=F_)&&(r.__proto__=Eo),((r.prototype=Object.create(Eo&&Eo.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||[],i=w(t.min),o=w(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,o=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,o)),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,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(t-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:t}},r.prototype.arrangeLabels=function(){Eo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},r.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;0<r.length&&(e=o[(t=this.options.vertical?v:y)+1],o=o[t+2],i=r[0],r=pe(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),r.box[t+1]>o||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(),i=e.min,e=e.max,o=Math.ceil(e),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},r.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,e=e.reverse,o=this.scaleOptions(),r=o.scale,n=o.box,s=o.min,a=n[(i?v:y)+(e?2:1)],h=this.tickIndices(t),l=[],p=0;p<h.length;p++)l.push(a+L(r*(h[p]-s),K));return l},r.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},r.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?v:y,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},r.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,i=this.lineBox(),o=e?i.height():i.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:i,lineSize:o,lineStart:i[r]}},r.prototype.lineDir=function(){return this.options.reverse?-1:1},r.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,o=o.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,h=this.lineInfo(),l=h.axis,h=h.lineStart,p=a.clone(),c=!w(e),t=_(t,0),e=_(e,t),e=Math.max(e-1,t),u=h+(t-n)*s,h=h+(Math.max(t,e)+1-n)*s;return c&&o&&(h=u),i&&(u=x(u,a[l+1],a[l+2]),h=x(h,a[l+1],a[l+2])),p[l+1]=r?h:u,p[l+2]=r?u:h,p},r.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,i=this.lineBox(),o=t.clone();return o[e+1]=x(t[e+1],i[e+1],i[e+2]),o[e+2]=x(t[e+2],i[e+1],i[e+2]),o},r.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=o),Eo.prototype.slot.call(this,t,e,i)},r.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,h=s[e+1],s=s[e+2],t=t[e];return t<h||s<t?null:(s=(e=(i?r:a)+(t-h)/n)%1,o?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 i=this.options;return(e?i.srcCategories:i.categories)[t]},r.prototype.categoriesCount=function(){return(this.options.categories||[]).length},r.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,t=L(t/(i/e),et);return{min:t,max:e+t}},r.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),o=i.max-i.min,t=this.scaleToDelta(t,o),o=i.min+e*t,i=i.max-(1-e)*t;return{min:o,max:i=i-o<.1?o+.1:i}},r.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,i=i.max,t=this.scaleRange(t,e);return{min:x(t.min,o,i),max:x(t.max,o,i)}},r.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},r.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,o=o.max,n=Math.floor(r),o=e?(r=Math.ceil(r),Math.floor(o)):(r=Math.floor(r),Math.ceil(o));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-n,max:(t.categories.length?o+(e?1:0):0)-n}},r.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,o=_(o.categories[t],""),i=(i.dataItem=r,this.axisLabelText(o,e,i));return new E_(o,i,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(){Eo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},r.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?v:y,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},r.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,t=L(t/i,et),i=this.totalRange(),o=e.min+t,e=e.max+t;return this.limitRange(o,e,0,i.max,t)},r.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,i=i.vertical?v:y,r=this.limitedRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[i+(o?2:1)],o=t[i]-n,t=e[i]-n,e=r.min+o/s,i=r.min+t/s,n=Math.min(e,i),o=Math.max(e,i);if(.01<=o-n)return{min:n,max:o}},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 i=t,o=e.srcCategories;if(i instanceof Date){for(var r=o.length,n=0;n<r;n++)if(Wo(o[n],i))return n;return-1}return o.indexOf(i)},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,i=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=x(i,0,t.max),e=x(e,0,t.max)),{min:i,max:e}},r.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},r.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new f_,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},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:Z},labels:{zIndex:1},justified:!1,_deferLabels:!0});const H_=t;var i={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"},$o=[mo,xo,_o,bo,wo,ko,Ao,So],Jo="fit",tr,t;function er(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=ke(t)).min=zo(e.min),e.max=zo(e.max)),e}function ir(t){this.options=t}function or(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o,r=i.roundToBaseUnit,n=i.justified,s=(this.start=Do(t,0,i.baseUnit,i.weekStartDay),this.roundToTotalStep(e)),a=!n&&Wo(e,s)&&!i.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),i.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=i.max)?(o=!n&&Wo(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,o),this.displayEnd=r?this.roundToTotalStep(t,!n):i.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 rr(t,e,i){for(var o,r,n,s=er(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,l=t.maxDateGroups,p=t.baseUnit===Jo,c=e?$o.indexOf(e):0,u=p?$o[c++]:t.baseUnit,d=a/Bo[u],f=d;!r||l<=d;){for(o=o||h[u].slice(0);(n=o.shift())&&e===u&&n<i;);if(n)d=f/(r=n);else{if(u===pe($o)){r=Math.ceil(f/l);break}if(!p){l<d&&(r=Math.ceil(f/l));break}u=$o[c++]||pe($o),f=a/Bo[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function n(){tr.apply(this,arguments)}ir.prototype.displayIndices=function(){return{min:0,max:1}},ir.prototype.displayRange=function(){return{}},ir.prototype.total=function(){return{}},ir.prototype.valueRange=function(){return{}},ir.prototype.valueIndex=function(){return-1},ir.prototype.values=function(){return[]},ir.prototype.totalIndex=function(){return-1},ir.prototype.valuesCount=function(){return 0},ir.prototype.totalCount=function(){return 0},ir.prototype.dateAt=function(){return null},or.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},or.prototype.displayIndices=function(){var t,e,i;return this._indices||(i=(t=this.options).baseUnit,t=t.baseUnitStep,e=Yo(this.displayStart,this.valueStart,i,t),i=Yo(this.displayEnd,this.valueStart,i,t),this._indices={min:e,max:i}),this._indices},or.prototype.total=function(){return{min:this.start,max:this.end}},or.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},or.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},or.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Yo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},or.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Yo(t,this.start,e.baseUnit,e.baseUnitStep))},or.prototype.dateIndex=function(t){var e=this.options;return Yo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},or.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},or.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=Do(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},or.prototype.dateAt=function(t,e){var i=this.options;return Do(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},or.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,o=o.weekStartDay,s=this.start,t=Yo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return i&&(e+=i),Do(s,e*n,r,o)},(tr=H_)&&(n.__proto__=tr),((n.prototype=Object.create(tr&&tr.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(){tr.prototype.initFields.call(this);var t,e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];r._parsed||((r=Qo(i,r))._parsed=!0),o=O({roundToBaseUnit:!0},o,{categories:r,min:Zo(i,o.min),max:Zo(i,o.max),weekStartDay:Ko(o,i)}),e.panning&&e.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=r).length?(i=er(r,!0),e=o.maxDivisions,r=function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==Jo&&!u(e,$o)){for(var i=t,o,r,n=i.categories,s=w(n)?n.length:0,a=at,h=0;h<s;h++){var l,p=n[h];p&&o&&0!==(l=Math.abs(Ro(p,o)))&&(r=(a=Math.min(a,l))>=Io?So:Lo-3*Mo<=a?Ao:Oo<=a?ko:Mo<=a?wo:To<=a?bo:Po<=a?_o:xo),o=p}i.baseUnit=r||wo}return e!==Jo&&"auto"!==t.baseUnitStep||rr(t),t}(o),(t=o._forecast)&&(0<t.before&&(i.min=Do(i.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(i.max=Do(i.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new or(i.min,i.max,r),e?(t=this.dataRange.displayRange(),rr(r=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:t.min,max:t.max,maxDateGroups:e}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new or(i.min,i.max,r)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||wo,this.dataRange=this.divisionRange=new ir(o)),this.rangeLabels=[]},n.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return tr.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,h=0;h<n.length;h++)r.push(e.dateIndex(n[h])+s),1!==t&&1<=h&&r.splice(h,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},n.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=No(t,e.min)&&No(t,e.max)<=0&&i.length},n.prototype.parseNoteValue=function(t){return Zo(this.chartService.intl,t)},n.prototype.noteSlot=function(t){return this.getSlot(t)},n.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=L(t/r,et);return n.min&&n.max&&(r=Vo(e.min||n.min,t),e=Vo(e.max||n.max,t),n={min:Do(r,0,i,o),max:Do(e,0,i,o)}),n},n.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},n.prototype.pan=function(t){var e,i,o,r,n;return this.isEmpty()?null:(e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,i=this.dataRange.total(),o=Vo(r,t=L(t/(o/(n-r)),et)*(e.reverse?-1:1)),r=Vo(n,t),(n=this.limitRange(Go(o),Go(r),Go(i.min),Go(i.max),t))?(n.min=zo(n.min),n.max=zo(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 i,o;return this.isEmpty()?null:(t=tr.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),i=Uo(e.max,e.min)/(i.max-i.min),o=this.options,{min:Vo(e.min,t.min*i),max:Vo(e.min,t.max*i),baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep})},n.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===Jo,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),h=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(o){var l,p,c=i.autoBaseUnitSteps,e=i.maxDateGroups,o=pe(c[h])*e*Bo[h],u=Uo(n,s),d=Uo(a,t),f=$o.indexOf(h);if(d<Bo[h]&&h!==mo)h=$o[f-1],t=Vo(s,p=(u-(e-1)*(l=pe(c[h]))*Bo[h])/2),a=Vo(n,-p);else if(o<d&&h!==So){var g=0;do{for(h=$o[++f],g=0,p=2*Bo[h];l=c[h][g],++g<c[h].length&&p*l<u;);}while(h!==So&&p*l<u);0<(p=(p*l-u)/2)&&(t=Vo(s,-p),a=Vo(n,p),t=Vo(t,x(a,r.min,r.max)-a),a=Vo(a,x(t,r.min,r.max)-t))}}return t&&a&&0<Uo(a,t)?{min:t,max:a,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},n.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<i.min&&(t.min=i.min),t.max>i.max)&&(t.max=i.max),t},n.prototype.range=function(){return this.dataRange.displayRange()},n.prototype.createLabels=function(){tr.prototype.createLabels.call(this),this.createRangeLabels()},n.prototype.clearLabels=function(){tr.prototype.clearLabels.call(this),this.rangeLabels=[]},n.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),tr.prototype.arrangeLabels.call(this)},n.prototype.arrangeRangeLabels=function(){var t,e,i,o,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(i=n[0])&&(o=e?t.y1-i.box.height()/2:t.x1,this.positionLabel(i,r,o)),i=n[1])&&(o=e?t.y2-i.box.height()/2:t.x2,this.positionLabel(i,r,o))},n.prototype.autoRotateLabels=function(){tr.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){tr.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},n.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);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=tr.prototype.contentBox.call(this),e=this.rangeLabels,i=0;i<e.length;i++){var o=e[i];o.options.visible&&t.wrap(o.box)}return t},n.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,o=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,i.dataItem=o,this.axisLabelText(r,e,i));if(n)return new E_(r,n,t,o,e)},n.prototype.createRangeLabels=function(){var o=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,i=this.options,r=Object.assign({},i.labels,i.rangeLabels,{align:b,zIndex:i.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,i.autoRotateRangeLabels=!0),i=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||i,(i=function(t,e,i){i&&(e=new E_(e,i,t,null,r),o.append(e),o.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),i(1,t,this.axisLabelText(t,r,{index:1,count:2})))},n.prototype.autoRotateRangeLabels=function(){var t,e,o=this,i=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===i.length&&(t=function(t,e,i){e=2*Math.abs(e[i+1]-e[i]),i=o.autoRotateLabelAngle(t.box,e);0!==i&&(t.options.rotation=i,t.reflow(new R))},e=this.getMajorTickPositions(),t(i[0],e,0),t(i[1],e,e.length-2))},n.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},n.prototype.slot=function(t,e,i){var o=this.dataRange,o=(t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e)),this.getSlot(t,e,i));if(o)return o.toRect()},n.prototype.getSlot=function(t,e,i){return typeof t==pt&&(t=this.categoryIndex(t)),typeof e==pt&&(e=this.categoryIndex(e)),tr.prototype.getSlot.call(this,t,e,i)},n.prototype.valueRange=function(){var t=er(this.options.srcCategories);return{min:zo(t.min),max:zo(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=er((t=this.options).srcCategories),new or(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())},e(t=n,{type:J,labels:{dateFormats:i},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 N_=t;function nr(t,e){return L(Math.floor(t/e)*e,et)}function sr(t,e){return L(Math.ceil(t/e)*e,et)}function ar(t){return Math.max(Math.min(t,3e5),-3e5)}var hr,lr=Math.pow(10,1-et),t,pr,t,cr,i,ur,t,dr,i;function fr(t,e,i,o){hr.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function gr(t,e,i){t=L(Math.abs(t%e),et);return 0===t||e*(1-i)<t}(hr=F_)&&(fr.__proto__=hr),((fr.prototype=Object.create(hr&&hr.prototype)).constructor=fr).prototype.initUserOptions=function(t){a=t.seriesMin,i=t.seriesMax,o=(r=t).narrowRange,e=function(t){if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e}(a),a=function(t,e,i){if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;r=Math.min(0,o-(t-o)/2)}else r=e;return r}(a,i,o),n=Ti(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&gr(e,n,1/3)&&(e-=n),0<a)&&gr(a,n,1/3)&&(a+=n),s.min=nr(e,n),s.max=sr(a,n);var i,o,e,r=s,n=(this.totalOptions=(e=r,{min:w((a=t).min)?Math.min(e.min,a.min):e.min,max:w(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var h=s,l=["min","max"],p=0;p<l.length;p++){var c=l[p];null===h[c]&&(h[c]=void 0)}var u=w(s.min),d=w(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=nr(n.min,s.majorUnit),n.max=sr(n.max,s.majorUnit)):f&&(a=O(n,s),n.majorUnit=Ti(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=O(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},fr.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},fr.prototype.clone=function(){return new fr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},fr.prototype.startValue=function(){return 0},fr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},fr.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(L(e/t,K))+1)},fr.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),h=this.getDivisions(t),l=[],p=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&l.push(L(p,K)),p+=a*r;return l},fr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},fr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},fr.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,h=r.lineSize,r=r.lineStart,h=s*(h/(o.max-o.min)),l=_(t,e||0),e=_(e,t||0),t=(i&&(l=x(l,o.min,o.max),e=x(e,o.min,o.max)),Math.min(l,e)-o.min),i=Math.max(l,e)-o.min,l=new R(a.x1,a.y1,a.x1,a.y1);return l[n+1]=ar(r+h*(0<s?t:i)),l[n+2]=ar(r+h*(0<s?i:t)),l},fr.prototype.getValue=function(t){var e=this.options,i=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:L(e+t*(i-e),et)},fr.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=L(t/(n/(r-e)),et);return{min:e+(t=!i&&!o||i&&o?t:-t),max:r+t,offset:t}},fr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},fr.prototype.createAxisLabel=function(t,e,i){var o=this.options,o=L(o.min+t*o.majorUnit,et),i=this.axisLabelText(o,e,i);return new E_(o,i,t,null,e)},fr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},fr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},fr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(i,t))return{min:i,max:t}},fr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=(1-e)*t,e=L(this.options.min+e*t,et),t=L(this.options.max-i,et);return{min:e,max:t=t-e<lr?e+lr:t}},fr.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,t=this.scaleRange(t,e);return{min:x(t.min,i,o),max:x(t.max,i,o),narrowRange:!1}},fr.prototype.isValidRange=function(t,e){return lr<e-t},e(t=fr,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Z},labels:{format:"#.####################"},zIndex:1});const U_=t;function yr(t,e,i,o){var r,n,s,a,h,l,p,t=zo(t),e=zo(e),c=o.intl,i=i||{},u=(u=t,r=e,n=i=O(i||{},{min:Zo(c,i.min),max:Zo(c,i.max),axisCrossingValue:Qo(c,i.axisCrossingValues||i.axisCrossingValue),weekStartDay:Ko(i,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Ro(r,u),a=bo,Io<=s?a=So:Lo<=s?a=Ao:Oo<=s?a=ko:Mo<=s&&(a=wo),a):bo),a=Bo[s],h=n.weekStartDay||0,u=Fo(Go(u)-1,s,h)||zo(r),r=Ho(Go(r)+1,s,h),a=n.majorUnit||sr(Ti(u.getTime(),r.getTime()),a)/a,l=sr(l=qo(u,r,s),a)-l,p=Math.floor(l/2),l-=p,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Do(u,-p,s,h),n.max=n.max||Do(r,l,s,h),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,i=n,pr.call(this,i,o),this.intlService=c,this.seriesMin=t,this.seriesMax=e,i.weekStartDay||0);this.totalMin=Go(Fo(Go(t)-1,i.baseUnit,u)),this.totalMax=Go(Ho(Go(e)+1,i.baseUnit,u))}(pr=F_)&&(yr.__proto__=pr),((yr.prototype=Object.create(pr&&pr.prototype)).constructor=yr).prototype.clone=function(){return new yr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},yr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},yr.prototype.getDivisions=function(t){var e=this.options;return Math.floor(qo(e.min,e.max,e.baseUnit)/t+1)},yr.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/Uo(e.max,e.min),h=e.weekStartDay||0,l=[n],p=1;p<s;p++){var c=n+Uo(Do(e.min,p*t,e.baseUnit,h),e.min)*a*o;l.push(L(c,K))}return l},yr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},yr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},yr.prototype.getSlot=function(t,e,i){return U_.prototype.getSlot.call(this,Zo(this.intlService,t),Zo(this.intlService,e),i)},yr.prototype.getValue=function(t){t=U_.prototype.getValue.call(this,t);return null!==t?zo(t):null},yr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},yr.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.weekStartDay||0,s=o.min,r=(0<r&&(s=Do(s,r,o.baseUnit,n)),e.dateFormats[o.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,i));return new E_(s,n,t,null,e)},yr.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,i=o?i.height():i.width(),n=this.range(),i=i/Uo(n.max,n.min),n=L(t/i,et);return{min:Vo(e.min,n=!o&&!r||o&&r?n:-n),max:Vo(e.max,n),offset:n}},yr.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=No(t,e.min)&&No(t,e.max)<=0},yr.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Go(t.min),Go(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:zo(t.min),max:zo(t.max)}},yr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);return{min:zo(i),max:zo(t)}},yr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=e*t,e=(1-e)*t,t=zo(Go(this.options.min)+i),i=zo(Go(this.options.max)-e);return{min:t,max:i=i-t<1e3?zo(Go(t)+1e3):i}},yr.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:zo(x(Go(t.min),this.totalMin,this.totalMax)),max:zo(x(Go(t.max),this.totalMin,this.totalMax))}},e(t=yr,{type:J,majorGridLines:{visible:!0,width:1,color:Z},labels:{dateFormats:i}});const G_=t;function vr(t,e,i,o){var r,n,s,a,h,l=O({majorUnit:10,min:t,max:e},i),p=l.majorUnit,c=(c=L(xr(h=e,u=p),et)%1,h<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,xr(h,u)+.2):Math.pow(u,Math.ceil(xr(h,u)))),u=(h=t,s=(u=l).majorUnit,(a=h)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(xr(h,s)))),a),d=(h=u,s=c,a=i,r=(d=l).min,n=d.max,w(d.axisCrossingValue)&&d.axisCrossingValue<=0&&mr(),w(a.max)?a.max<=0&&mr():n=s,w(a.min)?a.min<=0&&mr():r=h,{min:r,max:n});l.max=d.max,l.min=d.min,l.minorUnit=i.minorUnit||L(p-1,et),cr.call(this,l,o),this.totalMin=w(i.min)?Math.min(u,i.min):u,this.totalMax=w(i.max)?Math.max(c,i.max):c,this.logMin=L(xr(d.min,p),et),this.logMax=L(xr(d.max,p),et),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function mr(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function xr(t,e){return Math.log(t)/Math.log(e)}(cr=F_)&&(vr.__proto__=cr),((vr.prototype=Object.create(cr&&cr.prototype)).constructor=vr).prototype.clone=function(){return new vr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},vr.prototype.startValue=function(){return this.options.min},vr.prototype.getSlot=function(t,e,i){var o=this.options,r=this.logMin,n=this.logMax,s=o.majorUnit,a=o.min,o=o.max,h=this.lineInfo(),l=h.axis,p=h.axisDir,c=h.lineBox,u=h.lineSize,h=h.lineStart,u=p*(u/(n-r)),n=_(t,e||1),e=_(e,t||1);if(n<=0||e<=0)return null;i&&(n=x(n,a,o),e=x(e,a,o));n=xr(n,s),e=xr(e,s),t=Math.min(n,e)-r,i=Math.max(n,e)-r,a=new R(c.x1,c.y1,c.x1,c.y1);return a[l+1]=ar(h+u*(0<p?t:i)),a[l+2]=ar(h+u*(0<p?i:t)),a},vr.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=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:L(Math.pow(e,i+s*((o-i)/r)),et)},vr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},vr.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=L(t/(s/(o-i)),et);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,i+t),max:Math.pow(e,o+t),offset:t}},vr.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},vr.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},vr.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function h(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(yo(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),o.visible&&this.traverseMinorTicksPositions(h,o),[]},vr.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=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(vo(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},vr.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(L(o+r*(a-n),et),e)},vr.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this.lineInfo(),a=i.lineStart,h=i.step,l=this.logMin,p=this.logMax,c=Math.floor(l);c<p;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;o<=f&&t(L(a+h*(xr(f,s)-l),et),e)}},vr.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,o),i=this.axisLabelText(o,e,i);return new E_(o,i,t,null,e)},vr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},vr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},vr.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},vr.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=xr(this.options.min,i),r=xr(this.options.max,i),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-o),o=Math.pow(i,o+e*t),i=Math.pow(i,r-(1-e)*t);return{min:o,max:i=i-o<1e-6?o+1e-6:i}},vr.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,i=this.totalMax;return{min:x(t.min,e,i),max:x(t.max,e,i)}},vr.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,e=e.majorUnit,o=Math.pow(e,t);return{value:o,minorStep:(Math.pow(e,t+1)-o)/i}},vr.prototype.lineInfo=function(){var t=cr.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},e(i=vr,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Z},zIndex:1,_deferLabels:!0});const W_=i,X_={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),ie(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){o=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,o)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new M.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new M.drawing.Path(r);o&&(n.radius=o(t[a])),h.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(h)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,e=this.intervals(e,i,o,r),i=t.options,s=i.visible&&!1!==(i.line||{}).visible;return $t(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};function _r(){ur.apply(this,arguments)}(ur=H_)&&(_r.__proto__=ur),((_r.prototype=Object.create(ur&&ur.prototype)).constructor=_r).prototype.range=function(){return{min:0,max:this.options.categories.length}},_r.prototype.reflow=function(t){this.box=t,this.reflowLabels()},_r.prototype.lineBox=function(){return this.box},_r.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new R,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},_r.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=i||1,l=[],p=e||0;p<s;p+=h)r=n.reverse?360-p*a:p*a,r=L(r,K)%360,o&&u(r,o)||l.push(r);return l},_r.prototype.majorIntervals=function(){return this.intervals(1)},_r.prototype.minorIntervals=function(){return this.intervals(.5)},_r.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},_r.prototype.majorAngles=function(){var e=this;return $t(this.majorIntervals(),function(t){return e.intervalAngle(t)})},_r.prototype.createLine=function(){return[]},_r.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},_r.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,e=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,e)},_r.prototype.radiusCallback=function(e,t,i){var o,r;if(t.options.type!==U)return t=ue(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles(),function(t){return!i&&u(t,r)?e:o}},_r.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from),a=(r.startAngle+=s*n.angle,Math.ceil(o.to)-o.to),a=(r.angle-=(a+s)*n.angle,A_.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}}));e.append(a)}this.appendVisual(e)},_r.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},_r.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,i=(i.reverse&&!o&&(t=(t+1)%s),n[t=x(Math.floor(t),0,s-1)]),n=(o&&(i-=a/2)<0&&(i+=360),a*(x(Math.ceil(e||t),t,s-1)-t+1));return new w_(r.center(),0,r.height()/2,i,n)},_r.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,i=e+t.angle;return new M.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:i,radiusX:t.radius,radiusY:t.radius})},_r.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},e(t=_r,{startAngle:90,labels:{margin:zt(10)},majorGridLines:{visible:!0},justified:!0}),O(t.prototype,X_);const Y_=t;function br(t,e){dr.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}(dr=F_)&&(br.__proto__=dr),((br.prototype=Object.create(dr&&dr.prototype)).constructor=br).prototype.getDivisions=function(t){return U_.prototype.getDivisions.call(this,t)-1},br.prototype.reflow=function(t){this.box=t,this.reflowLabels()},br.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new R,n=this.intervals(t.majorUnit,o,i),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()))}},br.prototype.lineBox=function(){return this.box},br.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,h=e||0;h<n;h+=a){var l=(360+r+h*t)%360;o&&u(l,o)||s.push(l)}return s},br.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},br.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},br.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},br.prototype.createLine=function(){return[]},br.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},br.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,e=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,e)},br.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},br.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=x(t,i.min,i.max),e=x(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(i=t,t=e,e=i),new w_(o.center(),0,o.height()/2,t,e-t)},br.prototype.slot=function(t,e){var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=i.reverse?(s=n,t):(s=360-t,360-n),s=(s+o)%360;return new M.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+o)%360,radiusX:r.radius,radiusY:r.radius})},br.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,t=t.y-i.y,i=Math.round(re(Math.atan2(t,o))),t=e.startAngle;return e.reverse||(i*=-1,t*=-1),(i+t+360)%360},br.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},e(i=br,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:zt(10)},majorGridLines:{color:Z,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),O(i.prototype,X_,{createPlotBands:Y_.prototype.createPlotBands,majorAngles:Y_.prototype.majorAngles,range:U_.prototype.range,labelsCount:U_.prototype.labelsCount,createAxisLabel:U_.prototype.createAxisLabel});const q_=i;function wr(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var kr,t={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],h={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new w_(r,r.y-a.y2,r.y-a.y1,0,360),a=e===U?A_.current.createRing(a,h):M.drawing.Path.fromPoints(this.plotBandPoints(a,o),h).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new M.geometry.Circle(r,t.innerRadius),s=new M.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),ie(r,this.renderGridLines(t,i,o,e.minorGridLines))),r},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip,s=(void 0===n&&(n=0),o.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),h=n;h<e.length;h+=s){var l=t.y-e[h];if(0<l){var p=new M.geometry.Circle([t.x,t.y],l);if(o.type===U)a.append(new M.drawing.Circle(p,r));else{for(var c=new M.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(p.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,i,o=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==U&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,i=(re(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return wr(t,i)-wr(e,i)}),r=90-wr(n[0],n[1])/2,t=180-wr(i,n[0])-r,a=s*(Math.sin(ue(t))/Math.sin(ue(r)))),this.axisType().prototype.getValue.call(this,new E(o.x1,o.y2-a))}},i,Ar,Sr,Cr,i;function Pr(){kr.apply(this,arguments)}(kr=U_)&&(Pr.__proto__=kr),((Pr.prototype=Object.create(kr&&kr.prototype)).constructor=Pr).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Pr.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Pr.prototype.axisType=function(){return kr},O((i=Pr).prototype,t);const Z_=i;function Tr(){Ar.apply(this,arguments)}(Ar=W_)&&(Tr.__proto__=Ar),((Tr.prototype=Object.create(Ar&&Ar.prototype)).constructor=Tr).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Tr.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Tr.prototype.axisType=function(){return Ar},O((i=Tr).prototype,t);const Q_=i;function Mr(t){return t<=0?-1:1}(Sr=M.Class)&&(Or.__proto__=Sr),((Or.prototype=Object.create(Sr&&Sr.prototype)).constructor=Or).prototype.process=function(t){var e=t.slice(0),i=[],o=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],h=e[2];for(i.push(new M.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),pe(i).controlOut(this.firstControlPoint(t,s,a,y,v)),i.push(new M.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{o?(s=e[r-1],a=e[0],h=e[1],p=(t=this.controlPoints(s,a,h))[1],n=t[0]):(t=this.tangent(s,a,y,v),p=this.firstControlPoint(t,s,a,y,v));for(var l,p,c=p,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],h=e[u+2],l=this.controlPoints(s,a,h),pe(i).controlOut(c),c=l[1],l=l[0],i.push(new M.geometry.Segment(a,l)));o?(s=e[r-2],a=e[r-1],h=e[0],t=this.controlPoints(s,a,h),pe(i).controlOut(c),i.push(new M.geometry.Segment(a,t[0])),pe(i).controlOut(t[1]),i.push(new M.geometry.Segment(h,n))):(p=this.tangent(a,h,y,v),pe(i).controlOut(c),i.push(new M.geometry.Segment(h,this.secondControlPoint(p,a,h,y,v))))}}return i},Or.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)},Or.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},Or.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||L(o,1)===L(i.y,1)},Or.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Or.prototype.controlPoints=function(t,e,i){var o,r=y,n=v,s=!1,a=!1,h=(this.isLine(t,e,i)?o=this.tangent(t,e,y,v):(h={x:this.isMonotonicByField(t,e,i,y),y:this.isMonotonicByField(t,e,i,v)}).x&&h.y?(o=this.tangent(t,i,y,v),s=!0):(this.invertAxis(t,e,i)&&(r=v,n=y),h[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?Mr((i[n]-t[n])*(e[r]-t[r])):-Mr((i[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(o,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(o,e,i,r,n));return s&&(this.restrictControlPoint(t,e,h,o),this.restrictControlPoint(e,i,a,o)),[h,a]},Or.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},Or.prototype.tangent=function(t,e,i,o){i=e[i]-t[i],e=e[o]-t[o];return 0==i?0:e/i},Or.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},Or.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},Or.prototype.secondControlPoint=function(t,e,i,o,r){var e=e[o],n=i[o],e=.333*(n-e);return this.point(n-e,i[r]-e*t,o,r)},Or.prototype.point=function(t,e,i,o){var r=new M.geometry.Point;return r[i]=t,r[o]=e,r},Or.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};const K_=Or;function Or(t){Sr.call(this),this.closed=t}function Lr(t){Cr.call(this),this._axis=t,this.options=t.options}(Cr=M.Class)&&(Lr.__proto__=Cr),((Lr.prototype=Object.create(Cr&&Cr.prototype)).constructor=Lr).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Lr.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},Lr.prototype.range=function(){return this._axis.range()},Lr.prototype.valueRange=function(){return this._axis.valueRange()};const $_=Lr;function Ir(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new $_(e[i])}function Br(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Br.prototype.findAxisByName=function(t){return Ir(t,this._pane.axes)};const J_=Br,tb=((F=M.Class)&&(Er.__proto__=F),(Er.prototype=Object.create(F&&F.prototype)).constructor=Er);function Er(t){F.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Rr(t){for(var e=t.length,i=0,o=0;o<e;o++)m(t[o])&&i++;return i}var Vr={min:function(t){for(var e=t.length,i=at,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.min(i,r))}return i===at?t[0]:i},max:function(t){for(var e=t.length,i=ht,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.max(i,r))}return i===ht?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];m(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return e=Rr(t)?Vr.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&w(r)&&i++}return i},avg:function(t){var e=Rr(t),i=t[0];return i=0<e?Vr.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&w(o))return o}return t[0]}},zr,t;const eb=Vr;function jr(t,e){return null===e?e:Gt(t)(e)}function Dr(){zr.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}(zr=M.Class)&&(Dr.__proto__=zr),((Dr.prototype=Object.create(zr&&zr.prototype)).constructor=Dr).prototype.register=function(t,e,i){void 0===e&&(e=[gt]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Dr.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Dr.prototype.valueFields=function(t){return this._valueFields[t.type]||[gt]},Dr.prototype.otherFields=function(t){return this._otherFields[t.type]||[gt]},Dr.prototype.bindPoint=function(t,e,i){var o,r,n,s,a=t.data,i=w(i)?i:a[e],a={valueFields:{value:i}},e=this.valueFields(t),h=this._otherFields[t.type];return null===i?o=this._nullValue[t.type]:w(i)?Array.isArray(i)?(r=i.slice(e.length),o=this._bindFromArray(i,e),r=this._bindFromArray(r,h)):"object"==typeof i&&(n=this.sourceFields(t,e),s=this.sourceFields(t,h),o=this._bindFromObject(i,e,n),r=this._bindFromObject(i,h,s)):o=this._undefinedValue[t.type],w(o)&&(1===e.length?a.valueFields.value=o[e[0]]:a.valueFields=o),a.fields=r||{},a},Dr.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},Dr.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},Dr.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=jr(a,t))}return o},Dr.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===gt?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},(t=Dr).current=new t;const ib=t;var Fr,Hr=/percent(?:\w*)\((\d+)\)/,Nr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");function Ur(t,e,i){Fr.call(this),this.initGlobalRanges(t,e,i)}(Fr=M.Class)&&(Ur.__proto__=Fr),((Ur.prototype=Object.create(Fr&&Fr.prototype)).constructor=Ur).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,h=Nr.exec(t);h?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),h=h[1]?parseFloat(h[1]):1,n={low:o.value-r*h,high:o.value+r*h},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Ur.prototype.createValueGetter=function(t,e){var i,o=t.data,r=ib.current,n=r.valueFields(t),o=w(o[0])?o[0]:{};return xt(o)?i=Gt("["+(e?n.indexOf(e):0)+"]"):m(o)?i=Gt():typeof o==pt&&(i=Gt(r.sourceFields(t,n)[n.indexOf(e)])),i},Ur.prototype.getErrorRange=function(t,e){var i;if(!w(e))return null;if(this.globalRange)return this.globalRange(t);if(xt(e))o=t-e[0],r=t+e[1];else if(m(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Hr.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(i[1])/100),o=t-Math.abs(e),r=t+Math.abs(e)}return{low:o,high:r}},Ur.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Ur.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},Ur.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(i+=n,o++)}return{value:i/o,count:o}};const ob=Ur;var Gr,Wr,i=M.support.browser||{},Xr=600,Yr="fadeIn",qr=i.msie?.001:0,Zr="errorLow",Qr="errorHigh",Kr="zero",$r="interpolate",Jr="above",tn="below",en="smooth",on="step",rn="area",nn="bar",sn="boxPlot",an="bubble",hn="bullet",ln="candlestick",pn="column",cn="donut",un="funnel",dn="pyramid",fn="heatmap",gn="horizontalWaterfall",yn="line",vn="ohlc",mn="pie",xn="polarArea",_n="polarLine",bn="polarScatter",wn="radarArea",kn="radarColumn",An="radarLine",Sn="rangeArea",Cn="rangeBar",Pn="rangeColumn",Tn="scatter",Mn="scatterLine",On="verticalArea",Ln="verticalBoxPlot",In="verticalBullet",Bn="verticalLine",En="verticalRangeArea",Rn="waterfall",Vn=[nn,pn,vn,ln,sn,Ln,hn,Pn,Cn,Rn,gn],t,i,s,zn,jn,Dn,Fn=[t="exponentialTrendline",i="linearTrendline",s="logarithmicTrendline",zn="movingAverageTrendline",jn="polynomialTrendline",Dn="powerTrendline"],Hn="legendItemClick",Nn="seriesClick",Un="seriesHover",Gn="seriesOver",Wn="seriesLeave",Xn="plotAreaHover",Yn="plotAreaLeave",qn="drag",Zn="dragEnd",Qn="dragStart",Kn="zoomStart",$n="zoom",Jn="zoomEnd",ts="selectStart",es="select",is="selectEnd",os="showTooltip",rs="hideTooltip",t="graphics-symbol",i="k-chart-point",s="Point",ns="log",zn="category",ss="insideEnd",as="outsideEnd",hs="wheel",jn="drilldown",Dn="pattern",h;function ls(t,e,i,o,r,n){Gr.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}(Gr=S_)&&(ls.__proto__=Gr),((ls.prototype=Object.create(Gr&&Gr.prototype)).constructor=ls).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,o),s=o?n.x:n.y,a=s-t,s=s+t;o?(e=[new E(n.x,r.y1),new E(n.x,r.y2)],i&&e.push(new E(a,r.y1),new E(s,r.y1),new E(a,r.y2),new E(s,r.y2)),this.box=new R(a,r.y1,s,r.y2)):(e=[new E(r.x1,n.y),new E(r.x2,n.y)],i&&e.push(new E(r.x1,a),new E(r.x1,s),new E(r.x2,a),new E(r.x2,s)),this.box=new R(r.x1,a,r.x2,s)),this.linePoints=e},ls.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},ls.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({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()},ls.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Gr.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new M.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);kt(r),this.visual.append(r)}},e(h=ls,{animation:{type:Yr,delay:Xr},endCaps:!0,line:{width:2},zIndex:1});const rb=h;function ps(){Wr.apply(this,arguments)}(Wr=rb)&&(ps.__proto__=Wr),((ps.prototype=Object.create(Wr&&Wr.prototype)).constructor=ps).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const nb=ps;function cs(t){for(var e=0;e<t.length;e++)if(w(t[e].zIndex))return!0}function us(t,e){null!==e&&t.push(e)}function ds(t){return Rr(t)===t.length}function fs(t,e,i){var e=e.visible;return w(e)?e:(e=t.pointVisibility)?e[i]:void 0}function gs(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=ib.current.bindPoint(t,n),a=s.valueFields.value;m(a=St(a)?parseFloat(a):a)?(s.visible=!1!==fs(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function ys(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function vs(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var ms=5;function xs(t,e,i,o){void 0===o&&(o=!1);var r,n,s=(i=void 0===i?{}:i).defaults=i.defaults||{},a=i.depth=i.depth||0,h=!1;if(i.excluded=i.excluded||[],ms<a)return null;for(r in t)!u(r,i.excluded)&&Re(t,r)&&(Ot(n=t[r])?(h=!0,o||(t[r]=_(n(e),s[r]))):Bt(n)&&(o||(i.defaults=s[r]),i.depth++,h=xs(n,e,i,o)||h,i.depth--));return h}function _s(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,o)&&i.push(n)}return i}var bs=new WeakMap;function ws(t,e,i){var o;return null===e||"object"!=typeof e?Zo(i,t):((o=bs.get(e))||(o=Zo(i,t),bs.set(e,o)),o)}function ks(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function As(t){return w(t)&&null!==t}function Ss(t,e){t=t.type,e=e instanceof Date;return!t&&e||vs(t,J)}function Cs(t){return 1===t.length?t[0]:t}var Ps=/area/i,Ts,h,Ms,h,Os,h;function Ls(t,e){var i,o=ib.current.bindPoint(t,null,e).valueFields;for(i in o)if(Ct(o[i]))return!0}function Is(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,l=t.series,p=o;h(p+=r)&&(e=Ls(l,(i=a(p)).item)),n<=p&&p<=s&&!e;);if(e)return i}function Bs(t,e,i,o,r){var n,s,a,h,l=e.min,e=e.max,p=0<l&&l<i,c=e+1<i;(p||c)&&(((h=t).missingValues||(Ps.test(h.type)||h.stack?Kr:$r))!==$r?(p&&(n=o(l-1)),c&&(s=o(e+1))):(p&&(n=Ls(t,(a=o(l-1)).item)?a:Is({start:l,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Ls(t,(a=o(e+1)).item)?a:Is({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function Es(t,e){Ts.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()}(Ts=S_)&&(Es.__proto__=Ts),((Es.prototype=Object.create(Ts&&Ts.prototype)).constructor=Es).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Es.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{vertical:!this.options.invertAxes},t)),o},Es.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,h=i[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||m(h.value)&&(r+=Math.abs(h.value),o.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},Es.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=w(t.series.stack)?t.series.stack:this.options.defaultStack,h=function(t){return!0===t||typeof t==pt&&!t.group};if(a)for(var l=0;l<i.length;l++){var p=i[l];if(t===p)break;var c=w(p.series.stack)?p.series.stack:this.options.defaultStack;!c||typeof a===ft&&a!==c||h(a)&&!h(c)||a.group&&a.group!==c.group||!(0<=(c=this.plotValue(p))&&r||c<0&&!r)||0!==e&&0===c||(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=t.series,u=this.seriesValueAxis(u),u=this.categoryAxisCrossingValue(u);return[u,Ct(t.value)?t.value:u]},Es.prototype.stackLimits=function(t,e){for(var i=at,o=ht,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],w(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},Es.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,h=o[a];h||(h=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(h.min=Math.min(h.min,ke(n.negative).min)),n.positive.length)&&(h.max=Math.max(h.max,ke(n.positive).max)),h.min!==at||h.max!==ht?o[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},Es.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,h=e.fields[Zr],e=e.fields[Qr];m(h)&&m(e)?o={low:h,high:e}:a&&w(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new ob(a.value,n,gt),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},Es.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(this.updateRange({value:s},i={categoryIx:e,series:n}),this.updateRange({value:a},i)),new nb(s,a,o,this,n,r));t.errorBars=[e],t.append(e)},Es.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,t=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:o,high:t}},Es.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i],s=(n||(this.categoryPoints[i]=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,w(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},Es.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,i=i.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},a=this._evalSeries[i],i=(w(a)||(this._evalSeries[i]=a=xs(t,{},s,!0)),t);return a&&xs(i=O({},i),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},s),i},Es.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,i=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((i=this.valueAxisRanges[e]=i||{min:at,max:ht}).min=Math.min(i.min,t),i.max=Math.max(i.max,t))},Es.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)},Es.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],h=this.points,l=this.categoryAxis,p=0;this.traverseDataPoints(function(t,e){var i,o=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=h[p++],n=a[o];n||(a[o]=n=s.categorySlot(l,o,e)),r&&(o=s.plotRange(r,e.startValue()),(i=s.valueSlot(e,o))?(n=s.pointSlot(n,i),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=o[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},Es.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Es.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(pe(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},Es.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Es.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},Es.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Es.prototype.reflowPoint=function(t,e){t.reflow(e)},Es.prototype.reflowCategories=function(){},Es.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new R(o.x1,i.y1,o.x2,i.y2)},Es.prototype.categorySlot=function(t,e){return t.getSlot(e)},Es.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=ys(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],h=this.categoryAxis.categoryAt(n);t(this.plotArea.bindPoint(a,n),{category:h,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var l=0;l<o;l++)this._outOfRangeCallback(e[l],"_outOfRangeMaxPoint",l,t)},Es.prototype._outOfRangeCallback=function(t,e,i,o){var r,e=t[e];e&&(r=e.categoryIx,o(this.plotArea.bindPoint(t,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:i,dataItem:e.item}))},Es.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Es.prototype.pointValue=function(t){return t.valueFields.value},e(h=Es,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const sb=h,ab={click:function(t,e){return t.trigger(Nn,this.eventArgs(e))},hover:function(t,e){return t.trigger(Un,this.eventArgs(e))},over:function(t,e){return t.trigger(Gn,this.eventArgs(e))},out:function(t,e){return t.trigger(Wn,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:he(t),originalEvent:t,point:this}}},hb={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&w(e)&&null!==e&&(this.note=new R_({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 Rs(t,e){Ms.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Fe()}(Ms=S_)&&(Rs.__proto__=Ms),((Rs.prototype=Object.create(Ms&&Ms.prototype)).constructor=Rs).prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Rs.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Rs.prototype.createLabelElement=function(t){return new I_(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t),this.pointData())},Rs.prototype.getLabelText=function(t){var e=Ft(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Rs.prototype.getAriaLabelText=function(){var t=this.options.labels,e=Ht(t);return e?e(this.pointData()):this.getLabelText(t)},Rs.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=O({color:this.color},t.border);return w(t.color)||(t.color=new M.Color(e).brightness(.8).toHex()),t},Rs.prototype.createVisual=function(){},Rs.prototype.createMarker=function(){var t=this.options.markers;return new P_({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:_(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:O({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Rs.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Rs.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical,r=(this.render(),(this.box=t).clone());if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(o=t.center(),t=new R(o.x,o.y,o.x,o.y)),this.note.reflow(t))},Rs.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===Jr?T:e)===tn?S:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},Rs.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),o=new P_({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:_(t.border.opacity,1)},opacity:_(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},Rs.prototype.highlightVisual=function(){return(this.marker||{}).visual},Rs.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,i=this.box.center(),o=new M.geometry.Rect([i.x-e,i.y-e],[r,r])),{options:this.options,rect:o,visual:t}},Rs.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=t.size+(t.border.width||0),i=new P_({type:t.type,width:i,height:i,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this._childBox),i.getElement()},Rs.prototype.tooltipAnchor=function(){var t,e,i=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(i))return o=i.x2+5,e=C,i=this.aboveAxis?(t=i.y1,S):(t=i.y2,T),{point:new E(o,t),align:{horizontal:e,vertical:i}}},Rs.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Rs.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Rs.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Rs.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Rs.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},Rs.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},Rs.prototype.getIndex=function(){return w(this.categoryIx)?this.categoryIx:this.pointIx},(h=Rs).prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:Q,border:{width:2},opacity:1},labels:{visible:!1,position:Jr,margin:zt(3),padding:zt(4),animation:{type:Yr,delay:Xr}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:t,className:i,ariaRoleDescription:s}},O(h.prototype,ab),O(h.prototype,hb);const lb=h;function Vs(t,e,i){Os.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}(Os=S_)&&(Vs.__proto__=Os),((Vs.prototype=Object.create(Os&&Os.prototype)).constructor=Vs).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Vs.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},Vs.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&&!w(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Vs.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Ot(i)&&o&&(i=o.color),M.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&o.close(),this.visual=o},Vs.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},e(h=Vs,{closed:!1});const pb=h;function zs(t,e,i,o,r){var t=t.box,n=new M.geometry.Point;return n[e]=t[e+i],n[o]=t[o+r],n}var js,Ds,h={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?y:v,n=o?v:y,s=e?2:1,a=s,h=zs(t[0],r,s,n,a),l=[h],p=1;p<t.length;p++){var c,u=zs(t[p],r,s,n,a);h[r]!==u[r]&&((c=new M.geometry.Point)[r]=h[r],c[n]=u[n],l.push(c,u)),h=u}return i?h!==pe(l)&&l.push(h):l.push(zs(pe(t),r,s,n,e?1:2)),l}},l;function Fs(){js.apply(this,arguments)}(js=pb)&&(Fs.__proto__=js),((Fs.prototype=Object.create(js&&js.prototype)).constructor=Fs).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},O((l=Fs).prototype,h);const cb=l;function Hs(){Ds.apply(this,arguments)}(Ds=pb)&&(Hs.__proto__=Ds),((Hs.prototype=Object.create(Ds&&Ds.prototype)).constructor=Hs).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Ot(i)&&e&&(i=e.color),new K_(this.options.closed).process(this.points())),i=new M.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,e),this.visual=i};const ub=Hs;var Ns,l={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),h=a.length,l=[],p=0;p<h;p++){var c=a[p];c?l.push(c):this.seriesMissingValues(s)!==$r&&(1<l.length&&(t=this.createSegment(l,s,n,t),this._addSegment(t)),l=[])}1<l.length&&(t=this.createSegment(l,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?Kr:t||$r},getNearestPoint:function(t,e,i){for(var o,r=new E(t,e),n=this.seriesPoints[i],s=at,a=0;a<n.length;a++){var h,l=n[a];l&&w(l.value)&&null!==l.value&&!1!==l.visible&&(h=l.box.center().distanceTo(r))<s&&(o=l,s=h)}return o}},p,Us,Gs,p,Ws,Xs,Ys,qs,p,Zs,p,Qs,p,Ks,p,$s,p,Js,p,ta,p,ea,p,ia,oa,ra,na,p,sa,p,aa,p,ha,p,la,p,pa,p,ca,p,ua,p,da,c,fa,c,ga,c;function ya(){Ns.apply(this,arguments)}(Ns=M.drawing.Animation)&&(ya.__proto__=Ns),((ya.prototype=Object.create(Ns&&Ns.prototype)).constructor=ya).prototype.setup=function(){this._setEnd(this.options.box.x1)},ya.prototype.step=function(t){var e=this.options.box;this._setEnd(qt(e.x1,e.x2,t))},ya.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},e(p=ya,{duration:Xr}),M.drawing.AnimationFactory.current.register("clip",p);const db=p,fb={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=M.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new db(t,{box:e}),cs(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&w(o.visual.options.zIndex)&&o.visual.clip(t)}}};function va(){Us.apply(this,arguments)}(Us=sb)&&(va.__proto__=Us),((va.prototype=Object.create(Us&&Us.prototype)).constructor=va).prototype.render=function(){Us.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},va.prototype.pointType=function(){return lb},va.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(!w(n)||null===n){if(r!==Kr)return null;n=0}r=this.pointOptions(i,o),r=this.evalPointOptions(r,n,e),o=t.fields.color||i.color,Ot(i.color)&&(o=r.color),e=new lb(n,r);return e.color=o,this.append(e),e},va.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},va.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===on?cb:o===en?ub:pb)(t,e,i)},va.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},va.prototype.supportsPointInactiveOpacity=function(){return!1},O((p=va).prototype,l,fb);const gb=p;function ma(t,e,i,o,r){Gs.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}(Gs=pb)&&(ma.__proto__=Gs),((ma.prototype=Object.create(Gs&&Gs.prototype)).constructor=ma).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Ot(o)&&e&&(o=e.color),this.visual=new M.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Ni(t.pattern,{color:o,opacity:t.opacity}),stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:O({color:o,opacity:t.opacity,lineCap:"butt"},i)})},ma.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},ma.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},ma.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},ma.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},ma.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new M.geometry.Segment(t)})},ma.prototype.createStroke=function(t){t=new M.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},ma.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},ma.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment(),r=(o&&(r=this.stackSegments(),ie(i,r)),new M.drawing.Path(t));r.segments.push.apply(r.segments,i),!o&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},ma.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(o),o=o.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=pe(e).anchor(),o=i?o.x1:o.y1;i?t.lineTo(o,e.y).lineTo(o,r.y):t.lineTo(e.x,o).lineTo(r.x,o)};const yb=ma;function xa(){Ws.apply(this,arguments)}(Ws=yb)&&(xa.__proto__=Ws),((xa.prototype=Object.create(Ws&&Ws.prototype)).constructor=xa).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},xa.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},O((p=xa).prototype,h);const vb=p;function _a(){Xs.apply(this,arguments)}(Xs=yb)&&(_a.__proto__=Xs),((_a.prototype=Object.create(Xs&&Xs.prototype)).constructor=_a).prototype.createStrokeSegments=function(){var t=new K_(this.options.closed),e=this.points();return t.process(e)},_a.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new M.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e};const mb=_a;function ba(){Ys.apply(this,arguments)}(Ys=gb)&&(ba.__proto__=Ys),((ba.prototype=Object.create(Ys&&Ys.prototype)).constructor=ba).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===on?vb:a===en?mb:yb)(t,e,i,r,n)},ba.prototype.reflow=function(t){Ys.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},ba.prototype._gapStackPoints=function(t,e,i){var o=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 h=r;h<n;h++){for(var l,p=h+s,c=e,u=void 0;u=o[--c][p],0<c&&!u;);u?(i!==on&&r<h&&!o[c][p-1]&&a.push(this._previousSegmentPoint(h,p,p-1,c)),a.push(u),i!==on&&h+1<n&&!o[c][p+1]&&a.push(this._previousSegmentPoint(h,p,p+1,c))):(l=this._createGapStackPoint(h),this._stackPoints.push(l),a.push(l))}return a},ba.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},ba.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new lb(0,e);return e.categoryIx=t,e.series={},e},ba.prototype.seriesMissingValues=function(t){return t.missingValues||Kr},ba.prototype.supportsPointInactiveOpacity=function(){return!1};const xb=ba;function wa(){qs.call(this),this.axisRanges={}}(qs=M.Class)&&(wa.__proto__=qs),((wa.prototype=Object.create(qs&&qs.prototype)).constructor=wa).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:at,max:ht},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},wa.prototype.reset=function(t){this.axisRanges[t]=void 0},wa.prototype.query=function(t){return this.axisRanges[t]};const _b=wa;function ka(t,e,i){Zs.call(this,e),this.textBox=new I_(t,this.options,i),this.append(this.textBox)}(Zs=S_)&&(ka.__proto__=Zs),((ka.prototype=Object.create(Zs&&Zs.prototype)).constructor=ka).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},ka.prototype.reflow=function(t){var e,i=this.options,o=i.vertical,r=i.aboveAxis,n=this.children[0],s=n.options,a=n.box,h=n.options.padding,l=t;s.align=o?b:C,s.vAlign=o?T:b,i.position===ss?o?(s.vAlign=T,!r&&a.height()<t.height()&&(s.vAlign=S)):s.align=r?P:C:i.position===b?(s.vAlign=b,s.align=b):"insideBase"===i.position?o?s.vAlign=r?S:T:s.align=r?C:P:i.position===as&&(l=o?r?(e=(a.width()-t.width()-h.left-h.right)/2,new R(t.x1-e,t.y1-a.height(),t.x2+e,t.y1)):new R(t.x1,t.y2,t.x2,t.y2+a.height()):(s.align=b,r?new R(t.x2,t.y1,t.x2+a.width(),t.y2):new R(t.x1-a.width(),t.y1,t.x1,t.y2))),i.rotation||(o?h.left=h.right=(l.width()-n.contentBox.width())/2:h.top=h.bottom=(l.height()-n.contentBox.height())/2),n.reflow(l)},ka.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,i=e+"1",e=e+"2",o=this.children[0],r=this.parent.box;(r[i]<t[i]||t[e]<r[e])&&((o=o.paddingBox.clone())[i]=Math.max(r[i],t[i]),o[e]=Math.min(r[e],t[e]),this.reflow(o))},e(p=ka,{position:as,margin:zt(3),padding:zt(4),color:Z,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:Yr,delay:Xr},zIndex:2});const bb=p,wb={addAccessibilityAttributesToVisual:function(){this._id=this._id||Fe();var t=O({ariaLabel:this.getAriaLabelText()},this.options.accessibility);Gi(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=Ht(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}};function Aa(t,e){Qs.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=_(this.options.aboveAxis,!0),this.value=t}(Qs=S_)&&(Aa.__proto__=Qs),((Aa.prototype=Object.create(Qs&&Qs.prototype)).constructor=Aa).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Aa.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Aa.prototype.createLabelElement=function(t){return new bb(this.getLabelText(t),O({vertical:this.options.vertical},t),this.pointData())},Aa.prototype.getLabelText=function(t){var e=Ft(t);return e?e(this.pointData()):this.formatValue(t.format)},Aa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Aa.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},Aa.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(Qs.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),o?(o=this.rectVisual=o({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 M.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},Aa.prototype.createRect=function(t){var e=this.options,i=e.border,o=(w(i.opacity)?i:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=M.drawing.Path.fromRect(r,{fill:Ni(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}})),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(kt(r),o<1||i<1)&&(r.options.stroke.lineJoin="round"),t.append(r),ks(e)&&(o=this.createGradientOverlay(r,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(o))},Aa.prototype.createHighlight=function(t){return kt(M.drawing.Path.fromRect(this.box.toRect(),t))},Aa.prototype.highlightVisual=function(){return this.rectVisual},Aa.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Aa.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return kt(M.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},Aa.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return e=w(e)?e:new M.Color(t).brightness(i).toHex()},Aa.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=C,l=T;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),l=S)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(l=S,t=s?(h=P,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,h=P),Math.max(n.y1,a.y1))),{point:new E(t,o),align:{horizontal:h,vertical:l}}},Aa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Aa.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}},Aa.prototype.getIndex=function(){return this.categoryIx},O((p=Aa).prototype,ab),O(p.prototype,hb),O(p.prototype,wb),p.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}};const kb=p;function Sa(t,e){t.forEach(e)}function Ca(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}function Pa(t){Ks.call(this,t),this.forEach=t.rtl?Ca:Sa}(Ks=S_)&&(Pa.__proto__=Ks),((Pa.prototype=Object.create(Ks&&Ks.prototype)).constructor=Pa).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+i+r*(n-1),h=(e?o.height():o.width())/a,l=o[s+1]+i/2*h;this.forEach(t,function(t,e){var i=(t.box||o).clone();i[s+1]=l,i[s+2]=l+h,t.reflow(i),e<n-1&&(l+=h*r),l+=h})},e(p=Pa,{vertical:!1,gap:0,spacing:0});const Ab=p;function Ta(){$s.apply(this,arguments)}($s=S_)&&(Ta.__proto__=$s),((Ta.prototype=Object.create($s&&$s.prototype)).constructor=Ta).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new R,n=0;n<o;n++){var s,a=i[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(p=Ta,{vertical:!0});const Sb=p;function Ma(){Js.apply(this,arguments)}(Js=sb)&&(Ma.__proto__=Js),((Ma.prototype=Object.create(Js&&Js.prototype)).constructor=Ma).prototype.render=function(){Js.prototype.render.call(this),this.updateStackRange()},Ma.prototype.pointType=function(){return kb},Ma.prototype.clusterType=function(){return Ab},Ma.prototype.stackType=function(){return Sb},Ma.prototype.stackLimits=function(t,e){return Js.prototype.stackLimits.call(this,t,e)},Ma.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=w(o.stack)?o.stack:n.defaultStack,h=this.pointValue(t),r=this.pointOptions(o,r),l=r.labels,l=(a&&l.position===as&&(l.position=ss),r.isStacked=a,t.fields.color||o.color),t=(h<0&&r.negativeColor&&(l=r.negativeColor),r=this.evalPointOptions(r,h,e),Ot(o.color)&&(l=r.color),new(this.pointType())(h,r)),e=(t.color=l,s[i]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(n.isStacked?this.getStackWrap(a,e):e).append(t),t},Ma.prototype.getStackWrap=function(t,e){var i,o=typeof t==pt?t.group||!0:t,r=e.children;if(typeof o===ft||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},Ma.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(i=i.getSlot(e,e,!0),t[(e=o.invertAxes?y:v)+1]=t[e+2]=i[e+1]),t},Ma.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Ma.prototype.createAnimation=function(){this._setAnimationOptions(),Js.prototype.createAnimation.call(this),cs(this.options.series)&&this._setChildrenAnimation()},Ma.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&w(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},Ma.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new M.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},e(p=Ma,{animation:{type:nn}});const Cb=p;function Oa(t,e){ta.call(this,e),this.value=t}(ta=S_)&&(Oa.__proto__=ta),((Oa.prototype=Object.create(ta&&ta.prototype)).constructor=Oa).prototype.getLabelText=function(t){return this.formatValue(t.format)},Oa.prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=e.getSlot(i.open,i.close),e=e.getSlot(i.low,i.high),i=(o.x1=e.x1=t.x1,o.x2=e.x2=t.x2,this.realBody=o,e.center().x),t=[];t.push([[i,e.y1],[i,o.y1]]),t.push([[i,o.y2],[i,e.y2]]),this.lines=t,this.box=e.clone().wrap(o),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},Oa.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Oa.prototype.createVisual=function(){ta.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Oa.prototype.mainVisual=function(t){var e=new M.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Oa.prototype.createBody=function(t,e){var i=M.drawing.Path.fromRect(this.realBody.toRect(),{fill:Ni(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:_(e.border.opacity,e.opacity)}),kt(i),t.append(i),ks(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)))},Oa.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Oa.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:_(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=M.drawing.Path.fromPoints(i[n],r);kt(s),t.append(s)}},Oa.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=w(e)?e:new M.Color(this.color).brightness(t._brightness).toHex()},Oa.prototype.createOverlay=function(){var t=M.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Oa.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(O({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},Oa.prototype.highlightVisual=function(){return this._mainVisual},Oa.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Oa.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new E(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:T}}},Oa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Oa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Oa.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},Oa.prototype.getIndex=function(){return this.categoryIx},(p=Oa).prototype.createFocusHighlight=kb.prototype.createFocusHighlight,e(p,{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>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(p.prototype,ab),O(p.prototype,hb),O(p.prototype,wb);const Pb=p;function La(){ea.apply(this,arguments)}(ea=sb)&&(La.__proto__=ea),((La.prototype=Object.create(ea&&ea.prototype)).constructor=La).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},La.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,l=t.valueFields,p=ds(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new Ab({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(l,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},La.prototype.pointType=function(){return Pb},La.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=O({},i),s=t.fields.color||i.color,n=this.evalPointOptions(n,r,e),e=(i.type!==ln&&i.type!==vn||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),Ot(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},La.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},La.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),i=this.valueAxisRanges[e]||{min:at,max:ht};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([i.min])),max:Math.max.apply(Math,t.concat([i.max]))}},La.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},La.prototype.animationPoints=function(){return this.points},O((p=La).prototype,fb);const Tb=p;function Ia(t,e){ia.call(this,t,e),this.createNote()}(ia=Pb)&&(Ia.__proto__=ia),((Ia.prototype=Object.create(ia&&ia.prototype)).constructor=Ia).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,o=this.owner.seriesValueAxis(o),n=(this.boxSlot=i=o.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=o.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),o.getSlot(r.median));r.mean&&(o=o.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,o)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},Ia.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Ia.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Ia.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Ia.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},Ia.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Ia.prototype.renderOutliers=function(t){for(var e,i=this.value,o=i.outliers||[],r=3*Math.abs(i.q3-i.q1),n=[],s=(t.markers,0);s<o.length;s++){var a=o[s],h=O({},(e=a<i.q3+r&&a>i.q1-r?t.outliers:t.extremes).border),h=(w(h.color)||(w(this.color)?h.color=this.color:h.color=new M.Color(e.background).brightness(.8).toHex()),new P_({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:h,opacity:e.opacity}));h.value=a,n.push(h)}return this.reflowOutliers(n),n},Ia.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},Ia.prototype.mainVisual=function(t){for(var e=ia.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},Ia.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)},Ia.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||ia.prototype.getBorderColor.call(this)},e(p=Ia,{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:$,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:Q,background:a,border:{width:2,opacity:1},opacity:0}}),O(p.prototype,ab);const Mb=p;function Ba(){oa.apply(this,arguments)}(oa=Mb)&&(Ba.__proto__=oa),((Ba.prototype=Object.create(oa&&oa.prototype)).constructor=Ba).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Ba.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Ba.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ba.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},Ba.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const Ob=Ba;function Ea(){ra.apply(this,arguments)}(ra=Tb)&&(Ea.__proto__=ra),((Ea.prototype=Object.create(ra&&ra.prototype)).constructor=Ea).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,l=t.valueFields,p=ds(this.splitValue(l)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new Ab({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(l,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Ea.prototype.pointType=function(){return this.options.invertAxes?Ob:Mb},Ea.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Ea.prototype.updateRange=function(t,e){var e=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers)),t=(w(t.mean)&&(i=i.concat(t.mean)),this.valueAxisRanges[e]||{min:at,max:ht});this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([t.min])),max:Math.max.apply(Math,i.concat([t.max]))}},Ea.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Ea.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];w(r)&&null!==r&&i.push(r)}return i},Ea.prototype.supportsPointInactiveOpacity=function(){return!1};const Lb=Ea;function Ra(){na.apply(this,arguments)}(na=rb)&&(Ra.__proto__=na),((Ra.prototype=Object.create(na&&na.prototype)).constructor=Ra).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const Ib=Ra;function Va(t,e){sa.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(sa=S_)&&(Va.__proto__=sa),((Va.prototype=Object.create(sa&&sa.prototype)).constructor=Va).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Va.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Va.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=i.seriesIx,a=i.series,h=t.options.errorBars,l=i[e+"ErrorLow"],i=i[e+"ErrorHigh"];m(r)&&(m(l)&&m(i)&&(o={low:l,high:i}),h&&w(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new ob(h[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),o)&&this.addPointErrorBar(o,t,e)},Va.prototype.addPointErrorBar=function(t,e,i){var o=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=i===v,a={},s=(e[i+"Low"]=o,e[i+"High"]=t,e.errorBars=e.errorBars||[],new Ib(o,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[i]=o,this.updateRange(a,r),a[i]=t,this.updateRange(a,r)},Va.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=As(o)&&As(r)?t:this.createMissingValue(t,s))&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,y,e),this.addErrorBar(i,v,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Va.prototype.seriesMissingValues=function(t){return t.missingValues},Va.prototype.createMissingValue=function(){},Va.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[o],s=this.yAxisRanges[e];As(r)&&(n=this.xAxisRanges[o]=n||{min:at,max:ht},St(r)&&(r=Zo(i,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),As(t)&&(s=this.yAxisRanges[e]=s||{min:at,max:ht},St(t)&&(t=Zo(i,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Va.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(w(s)||(this._evalSeries[r]=s=xs(t,{},n,!0)),t);return s&&xs(r=O({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Va.prototype.pointType=function(){return lb},Va.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Va.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e),e=(Ot(i.color)&&(r=o.color),new lb(t,o));return e.color=r,this.append(e),e},Va.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{x:o,y:i};throw new Error("Unable to locate Y axis with name "+t)},Va.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],e=r.seriesAxes(e.series),o=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);i&&(o&&e?(t=r.pointSlot(o,e),i.reflow(t)):i.visible=!1)}),this.box=t},Va.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},Va.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n),a=s.valueFields,s=s.fields;t(a,O({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s))}}},Va.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Va.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e(p=Va,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),O(p.prototype,fb);const Bb=p;function za(t,e){aa.call(this,t,e),this.category=t.category}(aa=lb)&&(za.__proto__=aa),((za.prototype=Object.create(aa&&aa.prototype)).constructor=za).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new M.drawing.Group,s=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),o=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new M.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:Ni(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,o),n},za.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,i=this.options.markers,o=this.box.center(),i=(i.size+i.border.width)/2+e.border.width/2;return new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],i),t)},(p=za).prototype.defaults=O({},p.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),p.prototype.defaults.highlight.zIndex=void 0;const Eb=p;function ja(){ha.apply(this,arguments)}(ha=Bb)&&(ja.__proto__=ha),((ja.prototype=Object.create(ha&&ha.prototype)).constructor=ja).prototype._initFields=function(){this._maxSize=ht,ha.prototype._initFields.call(this)},ja.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)),ha.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},ja.prototype.reflow=function(t){this.updateBubblesSize(t),ha.prototype.reflow.call(this,t)},ja.prototype.pointType=function(){return Eb},ja.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,o=e.pointIx*(Xr/o),r={delay:o,duration:Xr-o,type:an},n=e.color||i.color,o=(t.size<0&&i.negativeValues.visible&&(n=_(i.negativeValues.color,n)),O({labels:{animation:{delay:o,duration:Xr-o}}},this.pointOptions(i,e.seriesIx),{markers:{type:Q,border:i.border,opacity:i.opacity,animation:r}})),o=this.evalPointOptions(o,t,e),r=(Ot(i.color)&&(n=o.color),o.markers.background=n,new Eb(t,o));return r.color=n,this.append(r),r},ja.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,h=Math.PI*s*s,l=(Math.PI*a*a-h)/this._maxSize,p=0;p<n.length;p++){var c,u,d=n[p];d&&(c=Math.abs(d.value.size)*l,c=Math.sqrt((h+c)/Math.PI),u=_(d.options.zIndex,0)+(1-c/a),O(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},ja.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},ja.prototype.createAnimation=function(){},ja.prototype.createVisual=function(){},e(p=ja,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const Rb=p;function Da(){la.apply(this,arguments)}(la=P_)&&(Da.__proto__=la),O((p=(Da.prototype=Object.create(la&&la.prototype)).constructor=Da).prototype,ab);const Vb=p;function Fa(t,e){pa.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}(pa=S_)&&(Fa.__proto__=pa),((Fa.prototype=Object.create(pa&&pa.prototype)).constructor=Fa).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,w(this.value.target)&&(this.target=new Vb({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:T,align:P}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},Fa.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Fa.prototype.createLabelElement=function(t){return new bb(this.getLabelText(t),t,this.pointData())},Fa.prototype.getLabelText=function(t){var e=Ft(t);return e?e(this.pointData()):this.formatValue(t.format)},Fa.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),o=o.categorySlot(o.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:o,o=r?o:n,s=(i&&(n=new R(s.x1,o.y1,s.x2,o.y2),i.options.height=r?n.height():e.target.line.width,i.options.width=r?e.target.line.width:n.width(),i.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},Fa.prototype.createVisual=function(){pa.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var t=this.options,e=M.drawing.Path.fromRect(this.box.toRect(),{fill:Ni(t.pattern,{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:_(t.border.opacity,t.opacity)}),kt(this.bodyVisual=e),this.visual.append(e)},Fa.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=M.drawing.Animation.create(this.bodyVisual,this.options.animation))},Fa.prototype.createHighlight=function(t){return M.drawing.Path.fromRect(this.box.toRect(),t)},Fa.prototype.highlightVisual=function(){return this.bodyVisual},Fa.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Fa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Fa.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},Fa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Fa.prototype.getIndex=function(){return this.categoryIx},(p=Fa).prototype.tooltipAnchor=kb.prototype.tooltipAnchor,p.prototype.createFocusHighlight=kb.prototype.createFocusHighlight,e(p,{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:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(p.prototype,ab),O(p.prototype,hb),O(p.prototype,wb);const zb=p;function Ha(t,e){for(var i=e.series,o=0;o<i.length;o++){var r=i[o],n=r.data;!n||xt(n[0])||Bt(n[0])||(r.data=[n])}ca.call(this,t,e)}(ca=sb)&&(Ha.__proto__=ca),((Ha.prototype=Object.create(ca&&ca.prototype)).constructor=Ha).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Ha.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Ha.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=O({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),t=t.fields.color||o.color,a=this.evalPointOptions(a,s,e),e=(Ot(o.color)&&(t=a.color),new zb(s,a)),o=(e.color=t,n[i]);return o||(o=new Ab({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},Ha.prototype.updateRange=function(t,e){var i=t.current,t=t.target,e=e.series.axis,o=this.valueAxisRanges[e];w(i)&&!isNaN(i)&&w(t&&!isNaN(t))&&((o=this.valueAxisRanges[e]=o||{min:at,max:ht}).min=Math.min(o.min,i,t),o.max=Math.max(o.max,i,t))},Ha.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Ha.prototype.pointValue=function(t){return t.valueFields.current},Ha.prototype.aboveAxis=function(t){return 0<t.value.current},Ha.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},(p=Ha).prototype._setAnimationOptions=Cb.prototype._setAnimationOptions,e(p,{animation:{type:nn}});const jb=p;function Na(t,e){ua.call(this),this.chartService=t,this.options=O({},this.options,e)}function Ua(t,e,i){da.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}(ua=M.Class)&&(Na.__proto__=ua),((Na.prototype=Object.create(ua&&ua.prototype)).constructor=Na).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color,e=(e&&(e=e.color||e.options.color,i=_(i,e),o=_(o,e)),void 0!==t.padding?zt(t.padding):{});return"object"==typeof t.padding&&(e.top=void 0!==t.padding.top?e.top:void 0,e.right=void 0!==t.padding.right?e.right:void 0,e.bottom=void 0!==t.padding.bottom?e.bottom:void 0,e.left=void 0!==t.padding.left?e.left:void 0),{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:Et(t.border.width),paddingTop:Et(e.top),paddingBottom:Et(e.bottom),paddingLeft:Et(e.left),paddingRight:Et(e.right)}},Na.prototype.show=function(t,e,i){this.chartService&&(t.format=e.format,i=this.getStyle(e,i),t.style=i,i=new M.Color(i.backgroundColor),w(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(os,t),this.visible=!0)},Na.prototype.hide=function(){this.chartService&&this.chartService.notify(rs),this.visible=!1},Na.prototype.destroy=function(){delete this.chartService},e(p=Na,{border:{width:1},opacity:1}),(da=p)&&(Ua.__proto__=da),((Ua.prototype=Object.create(da&&da.prototype)).constructor=Ua).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},Ua.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===J&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},Ua.prototype.hide=function(){this.chartService.notify(rs,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},Ua.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,o=o.padding,n=!i.axis.options.vertical,i=i.line.bbox(),n=n?(t=b,r===S?(e=T,i.bottomLeft().translate(0,o)):(e=S,i.topLeft().translate(0,-o))):(e=b,r===C?(t=P,i.topLeft().translate(-o,0)):(t=C,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},e(c=Ua,{padding:10});const Db=c;function Ga(t,e,i){fa.call(this,i),this.axis=e,this.stickyMode=e instanceof H_;i=this.options.tooltip;i.visible&&(this.tooltip=new Db(t,this,O({},i,{stickyMode:this.stickyMode})))}(fa=S_)&&(Ga.__proto__=fa),((Ga.prototype=Object.create(fa&&fa.prototype)).constructor=Ga).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},Ga.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},Ga.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?v:y,n=new M.geometry.Point(o.x1,o.y1),i=i?new M.geometry.Point(o.x2,o.y1):new M.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},Ga.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<o;s++){var a=i[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},Ga.prototype.createVisual=function(){fa.prototype.createVisual.call(this);var t=this.options;this.line=new M.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},Ga.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),fa.prototype.destroy.call(this)},e(c=Ga,{color:Z,width:2,zIndex:-1,tooltip:{visible:!1}});const Fb=c;function Wa(t,e){ga.call(this,t),this.pane=e}(ga=S_)&&(Wa.__proto__=ga),((Wa.prototype=Object.create(ga&&ga.prototype)).constructor=Wa).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},Wa.prototype._clipBox=function(){return this.pane.chartsBox()},Wa.prototype.createVisual=function(){var t;this.visual=new M.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),kt(t=M.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Wa.prototype.stackRoot=function(){return this},Wa.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[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)))}},Wa.prototype.destroy=function(){ga.prototype.destroy.call(this),delete this.parent},(c=Wa).prototype.isStackRoot=!0;const Hb=c;(Xa=C_)&&(Za.__proto__=Xa),((Za.prototype=Object.create(Xa&&Xa.prototype)).constructor=Za).prototype.createTitle=function(){var t=this.options.title;Bt(t)&&(t=O({},t,{align:t.position,position:T})),this.title=B_.buildTitle(t,Za.prototype.options.title),this.title&&this.append(this.title)},Za.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Za.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Za.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},Za.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},Za.prototype.reflow=function(t){var e;pe(this.children)===this.content&&(e=this.children.pop()),Xa.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Za.prototype.visualStyle=function(){var t=Xa.prototype.visualStyle.call(this);return t.zIndex=-10,t},Za.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Za.prototype.stackRoot=function(){return this},Za.prototype.clipRoot=function(){return this},Za.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,h=a?o:r,l=0;l<i.length;l++)0===h.length&&a!==(t=i[l]).options.vertical&&ie(h,s.createGridLines(t))},Za.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()},Za.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new R,o=0;o<e;o++){var r=t[o],n=r.options.vertical?v:y,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,h=0;h<a;h++){var l=s[h];l.options.vertical||(l=l.lineBox(),i.x1=l.x1,i.x2=l.x2)}return i},Za.prototype.clipBox=function(){return this.chartContainer.clipBox},Za.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new J_(this),index:this.paneIndex,name:this.options.name})};var Xa,c,Ya=1,qa,c;function Za(t){Xa.call(this,t),this.id="pane"+Ya++,this.createTitle(),this.content=new S_,this.chartContainer=new Hb({},this),this.append(this.content),this.axes=[],this.charts=[]}(c=Za).prototype.isStackRoot=!0,e(c,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const Nb=c;function Qa(t){return!1!==t.options.visible}function d(t,e,i){qa.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.originalSeries=t,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}function Ka(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],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 R}function $a(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}(qa=S_)&&(d.__proto__=qa),((d.prototype=Object.create(qa&&qa.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.bindPoint=function(t,e,i){var o=this._bindCache.get(t);return o||this._bindCache.set(t,o=[]),o[e]||(o[e]=ib.current.bindPoint(t,e,i))},d.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=O({title:{color:t.color}},e),s=0;s<o;s++){var a=O({},n,i[s]),a=(St(a.title)&&(a.title=O({text:a.title},n.title)),new Nb(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 i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);n&&n.visible&&(r=new Fb(this.chartService,r,n),this.crosshairs.push(r),i.content.append(r))}},d.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,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,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},d.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},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=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.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=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},d.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,l,p,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(p=!d&&Ft(n)||Ft(o))&&(h=p({text:As(h)?h:"",series:u})),p=u._defaults,p=void(Ot(l=u.color)&&p&&(l=p.color)),c=void 0,c=d?(p={},l):(p={color:n.color,font:n.font},r.markers.color),As(h))&&""!==h&&s.push({text:h,labels:p,markerColor:c,series:u,active:d})}ie(i.data,s)},d.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},d.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},d.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},d.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=zt(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},d.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var o=0;o<e.length;o++)e[o].refresh()},d.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},d.prototype.alignAxisTo=function(t,e,i,o){var i=t.getSlot(i,i,!0),r=t.options.reverse?2:1,o=e.getSlot(o,o,!0),n=e.options.reverse?2:1,o=t.box.translate(o[y+n]-i[y+r],o[v+n]-i[v+r]);t.pane!==e.pane&&o.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(o)},d.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},h={},l={},p=0;p<e.length;p++){var c=e[p],u=c.pane,d=u.id,f=!1!==c.options.visible,g=$a(t,u)||i,y=r;g!==i&&(y=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[p],y[p]),c.options._overlap||(L(c.lineBox().x1)===L(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),L(c.lineBox().x2)===L(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[p],y[p]),a[d]&&c.reflow(c.box.alignTo(a[d].box,P).translate(c.options.margin,0)),f)&&(a[d]=c),(g=$a(e,u)||o)!==c&&(c.alignTo(g),c.reflow(c.box)))}for(var v=0;v<t.length;v++){var m=t[v],x=m.pane,_=x.id,b=!1!==m.options.visible,x=$a(e,x)||o,w=n;x!==o&&(w=this.axisCrossingValues(x,t)),this.alignAxisTo(m,x,r[v],w[v]),m.options._overlap||(L(m.lineBox().y1)===L(x.lineBox().y1)&&(m._mirrored||(m.options.labels.mirror=!m.options.labels.mirror,m._mirrored=!0),this.alignAxisTo(m,x,r[v],w[v]),h[_]&&m.reflow(m.box.alignTo(h[_].box,T).translate(0,-m.options.margin)),b)&&(h[_]=m),L(m.lineBox().y2,K)===L(x.lineBox().y2,K)&&(l[_]&&m.reflow(m.box.alignTo(l[_].box,S).translate(0,m.options.margin)),b)&&(l[_]=m),0!==v&&(m.alignTo(i),m.reflow(m.box)))}},d.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Ka(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},d.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,Ka(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},d.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=Ka(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),i=Math.max(i,r.x1-s.x1),h=0;h<n.length;h++){var l=n[h];l.reflow(l.box.translate(0,a))}}for(var p=0;p<e.length;p++){var c=e[p];c.reflow(c.box.translate(i,0))}},d.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);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,i=this.panes,o=th(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},d.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},d.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(o)}},d.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var l=0;l<i;l++){var p=e[l];p.options.height||(p.options.height=o/r)}for(var c=0;c<i;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,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.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=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},d.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(M.drawing.Path.fromRect(e[i].toRect()))},d.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},d.prototype.createVisual=function(){qa.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border,i=(void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&w(i)||(i=a,e=0),this._bgVisual=new M.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(i),this.appendVisual(i)},d.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&w(s.value)&&null!==s.value&&i.push(s)}}return i},d.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},d.prototype.pointsByPointIndex=function(e){return this.filterPoints(function(t){return t.getIndex()===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,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},d.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},d.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},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 i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=$a(e,n)||e[0],s=this.createLabelAxis(r,o+i,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},d.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,o=o.visible;if(r!==it&&r!==dt||!1===o)return null;var o=this.groupAxes(this.panes),o=i.options.vertical?o.x:o.y,o=this.axisCrossingValues(i,o),r=r===it,n=i.range(),r=r?n.max:n.min;if(x(o[e],n.min,n.max)-r==0)return null;o.splice(e+1,0,r),i.options.axisCrossingValues=o;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},d.prototype.isTrendline=function(t){return t&&u(t.type,Fn)},d.prototype.trendlineFactory=function(){},d.prototype.createTrendlineSeries=function(){var o=this,r=[];return this.series=this.series.map(function(t){if(!o.isTrendline(t))return t;var e,i=o.seriesByName(t.for);if(i)return e=ib.current.valueFields(i),e=pe(e),(e=o.trendlineFactory(Object.assign({},{field:e},t),i))&&(!1===i.visible&&(e.visible=!1),e.color===st&&(e.color=i.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},d.prototype.seriesByName=function(e){return this.series.find(function(t){return t.name===e})},d.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(Qa);if(e)return e}},d.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},d.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},d.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},d.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},d.prototype._getNextPoint=function(o,r,t){function e(t){for(var e,i=0;0===(e=r.call(n,o,i+=t).filter(Qa)).length;);return e}var n=this,i=r.call(this,o).filter(Qa),t=i.indexOf(o)+t;return t<0?(i=e(-1)).at(-1):t>=i.length?(i=e(1)).at(0):i[t]},d.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},d.prototype._pointsByHorizontal=function(t,e){t=Mt(t.series.index+(e=void 0===e?0:e),this.series.length);return this.pointsBySeriesIndex(t)};var Ja,th=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},eh,c,ih,c,oh,rh,c,nh,sh,ah,c,hh,c,lh,ph,ch,h,uh,dh,c;e(c=d,{series:[],plotArea:{margin:{}},background:"",border:{color:Z,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Ub=c,Gb={hover:function(t,e){this._dispatchEvent(t,e,Xn)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};function fh(t,e,i){Ja.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var h=0;h<o.length;h++){var l=o[h],p=void 0;if(Bt(a))p=a[l];else{if(0!==h&&!u(l,r))break;p=a}p&&s.push({canonicalName:l,name:n[h],transform:Ot(p)?p:eb[p]})}}(Ja=M.Class)&&(fh.__proto__=Ja),((fh.prototype=Object.create(Ja&&Ja.prototype)).constructor=fh).prototype.aggregatePoints=function(t,e){var i,o=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||xt(t)||((i=function(){}).prototype=t,s=new i);for(var a=0;a<r.length;a++){var h=r[a],l=this._bindField(n.values,h.canonicalName),l=h.transform(l,o,n.dataItems,e);if(!(null===l||!Bt(l)||w(l.length)||l instanceof Date)){s=l;break}if(w(l)){p=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var p=h.name;var c=s;var u=l;var d=c,f=p;if(-1<p.indexOf(".")){for(var g=p.split(".");1<g.length;)f=g.shift(),w(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},fh.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},fh.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,s=(w(s[e])?s:n.fields)[e];i.push(s)}return i};const Wb=fh;function gh(){eh.call(this),this._defaults={}}(eh=M.Class)&&(gh.__proto__=eh),((gh.prototype=Object.create(eh&&eh.prototype)).constructor=gh).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},gh.prototype.query=function(t){return this._defaults[t]},(c=gh).current=new c;const Xb=c;function yh(){ih.apply(this,arguments)}(ih=kb)&&(yh.__proto__=ih),((yh.prototype=Object.create(ih&&ih.prototype)).constructor=yh).prototype.createLabel=function(){var t=this.options.labels,e=O({},t,t.from),t=O({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this.createLabelElement(t),this.append(this.labelTo))},yh.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},(c=yh).prototype.defaults=O({},c.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const Yb=c;function vh(){oh.apply(this,arguments)}(oh=Cb)&&(vh.__proto__=oh),((vh.prototype=Object.create(oh&&oh.prototype)).constructor=vh).prototype.pointType=function(){return Yb},vh.prototype.pointValue=function(t){return t.valueFields},vh.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)},vh.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},vh.prototype.updateRange=function(t,e){var e=e.series.axis,i=t.from,o=t.to,r=this.valueAxisRanges[e];null!==t&&m(i)&&m(o)&&((r=this.valueAxisRanges[e]=r||{min:at,max:ht}).min=Math.min(r.min,i),r.max=Math.max(r.max,i),r.min=Math.min(r.min,o),r.max=Math.max(r.max,o))},vh.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},(c=vh).prototype.plotLimits=sb.prototype.plotLimits;const qb=c;function mh(){rh.apply(this,arguments)}(rh=lb)&&(mh.__proto__=rh),((mh.prototype=Object.create(rh&&rh.prototype)).constructor=mh).prototype.aliasFor=function(){return this.parent};const Zb=mh;function xh(t,e){nh.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Fe(),this.initLabelsFormat()}(nh=S_)&&(xh.__proto__=nh),((xh.prototype=Object.create(nh&&nh.prototype)).constructor=xh).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,o=this.value,i=this.fromPoint=new Zb(o,O({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new Zb(o,O({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},xh.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())},xh.prototype.createHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},xh.prototype.highlightVisual=function(){return this.visual},xh.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},xh.prototype.createFocusHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},xh.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return i=(r=this.box).center(),o=C,r=this.options.vertical?(t=i.x,e=r.y1-5,S):(t=r.x2+5,e=i.y,b),{point:new E(t,e),align:{horizontal:o,vertical:r}}},xh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},xh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},xh.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},xh.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}"}))},xh.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels,o=o.vertical;"auto"===r.position&&(o=o?e.y1<=t.y1?(i=Jr,tn):(i=tn,Jr):e.x1<=t.x1?(i=C,P):(i=P,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},xh.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},xh.prototype.focusVisual=function(){this.fromPoint.focusVisual()},xh.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},xh.prototype.getIndex=function(){return this.categoryIx},O((c=xh).prototype,ab),O(c.prototype,hb),c.prototype.defaults={markers:{visible:!1,background:a,size:8,type:Q,border:{width:2},opacity:1},labels:{visible:!1,margin:zt(3),padding:zt(4),animation:{type:Yr,delay:Xr},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:t,className:i,ariaRoleDescription:s}};const Qb=c;function _h(){sh.apply(this,arguments)}(sh=yb)&&(_h.__proto__=sh),((_h.prototype=Object.create(sh&&sh.prototype)).constructor=_h).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},_h.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},_h.prototype.createStroke=function(t){var e=new M.drawing.Path(t),t=new M.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)},_h.prototype.hasStackSegment=function(){return!0},_h.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},_h.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const Kb=_h;function bh(){ah.apply(this,arguments)}(ah=Kb)&&(bh.__proto__=ah),((bh.prototype=Object.create(ah&&ah.prototype)).constructor=bh).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},bh.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},bh.prototype.createCurveSegments=function(t){return(new K_).process(this.toGeometryPoints(t))};const $b=bh;function wh(){hh.apply(this,arguments)}(hh=Kb)&&(wh.__proto__=hh),((wh.prototype=Object.create(hh&&hh.prototype)).constructor=wh).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},wh.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},O((c=wh).prototype,h);const Jb=c;function kh(){lh.apply(this,arguments)}(lh=sb)&&(kh.__proto__=lh),((kh.prototype=Object.create(lh&&lh.prototype)).constructor=kh).prototype.render=function(){lh.prototype.render.call(this),this.renderSegments()},kh.prototype.pointType=function(){return Qb},kh.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!As(r.from)&&!As(r.to)){if(this.seriesMissingValues(i)!==Kr)return null;r={from:0,to:0}}o=this.pointOptions(i,o),o=this.evalPointOptions(o,r,e),e=t.fields.color||i.color,Ot(i.color)&&(e=o.color),t=new Qb(r,o);return t.color=e,this.append(t),t},kh.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?$b:"step"===o?Jb:Kb)(t,e,i)},kh.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},kh.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(i&&t)return{from:i,to:t}},kh.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new R(o.x1,t.y1,o.x2,t.y2),new R(e.x1,t.y1,e.x2,t.y2)):(i=new R(t.x1,o.y1,t.x2,o.y2),new R(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},kh.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),lh.prototype.addValue.call(this,t,e)},kh.prototype.updateRange=function(t,e){var i;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:at,max:ht},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},kh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},kh.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},O((h=kh).prototype,l,fb);const t1=h;function Ah(){ph.apply(this,arguments)}(ph=Pb)&&(Ah.__proto__=ph),((Ah.prototype=Object.create(ph&&ph.prototype)).constructor=Ah).prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=[],r=[],n=[],s=e.getSlot(i.low,i.high),a=e.getSlot(i.open,i.open),e=e.getSlot(i.close,i.close),i=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);o.push([a.x1,a.y1]),o.push([i,a.y1]),r.push([i,e.y1]),r.push([e.x2,e.y1]),n.push([i,s.y1]),n.push([i,s.y2]),this.lines=[o,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},Ah.prototype.createBody=function(){};const e1=Ah;function Sh(){ch.apply(this,arguments)}(ch=Tb)&&(Sh.__proto__=ch),((Sh.prototype=Object.create(ch&&ch.prototype)).constructor=Sh).prototype.pointType=function(){return e1};const i1=Sh;function Ch(t,e,i){uh.call(this),this.from=t,this.to=e,this.series=i}(uh=S_)&&(Ch.__proto__=uh),((Ch.prototype=Object.create(uh&&uh.prototype)).constructor=Ch).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(t=e.aboveAxis?i.x2:i.x1,r.push([t,i.y1],[t,o.y2])),r},Ch.prototype.createVisual=function(){uh.prototype.createVisual.call(this);var t=this.series.line||{},t=M.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});kt(t),this.visual.append(t)},e(c=Ch,{animation:{type:Yr,delay:Xr}});const o1=c;function Ph(){dh.apply(this,arguments)}function Th(t,e,i){return(t=t[String(e)])?t(i):null}function Mh(t,e){for(var i,o,r=0,n=0,s=0,a=0,h=0,l=Number.MAX_VALUE,p=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&&(l=Math.min(d,l),p=Math.max(d,p),h++,r+=d,n+=u,s+=Math.pow(d,2),a+=d*u)}return 0<h&&(o=(n-(i=(h*a-r*n)/(h*s-Math.pow(r,2)))*r)/h),{slope:i,intercept:o,count:h,xMin:l,xMax:p}}function Oh(t,e){return t.every(function(t){t=t.valueFields;return!As(t[e])||0<t[e]})}function Lh(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i}function Ih(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,h=0;h<t.length;h++){var l=e(t[h]),p=l.xValue,l=l.yValue;if(isFinite(l)&&null!==l?(r.push(l),a+=l,s=Math.max(h,s)):r.push(null),n<=h){var l=r.filter(function(t){return null!==t}).length,c=r.shift()||0;if(0<l){o.push([p,a/l]),a-=c;continue}}o.push([p,null])}return o.slice(0,s+1)}function Bh(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new x_,n=new x_,s=0,a=Number.MAX_VALUE,h=Number.MIN_VALUE,i=function(t){return t},l=[],p=0;p<t.length;p++){var c=e(t[p]),u=c.xValue,c=c.yValue;if(isFinite(u)&&null!==u&&isFinite(c)&&null!==c){a=Math.min(u,a),h=Math.max(u,h),s++,n.set(p,0,c),r.set(p,0,1),r.set(p,1,u);for(var d=2;d<=o;d++)r.set(p,d,Math.pow(r.get(p,1),d))}else r.set(p,0,0)}return r.width=Math.min(o,s),0<s&&(l=function(t,e){for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r}(r,n),i=function(o){return l.reduce(function(t,e,i){return t+e*Math.pow(o,i)},0)}),{coefficients:l,count:s,valueMapper:i,xMin:a,xMax:h}}(dh=Cb)&&(Ph.__proto__=dh),((Ph.prototype=Object.create(dh&&dh.prototype)).constructor=Ph).prototype.render=function(){dh.prototype.render.call(this),this.createSegments()},Ph.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=ys(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<i;h++){var l=ib.current.bindPoint(n,h),p=l.valueFields.value,c=l.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=l.valueFields.value=s):(d=u-(l.valueFields.value=a),a=0):m(p)&&(a+=p,d=s+=p),t(l,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},Ph.prototype.updateRange=function(t,e){dh.prototype.updateRange.call(this,{value:e.to},e)},Ph.prototype.aboveAxis=function(t){return 0<=t.value},Ph.prototype.plotRange=function(t){return[t.from,t.to]},Ph.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var h,l=n[a];l&&s&&(h=new o1(s,l,r),i.push(h),this.append(h)),s=l}}};const r1=Ph,n1=h={exponentialTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Oh(t,n.field)&&(n=(t=Mh(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:e+1,yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Lh(function(t){return o*Math.exp(r*t)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},linearTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.categoryAxis,s=t.options,t=Mh((0,t.seriesValues)(),(e=s.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),i=t.slope,o=t.intercept,0<t.count?Lh(function(t){return i*t+o},n):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},logarithmicTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,r=t.options,t=Mh((0,t.seriesValues)(),(i=r.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:t[i]}})),r=t.slope,n=t.intercept,0<t.count?(e=r,o=n,Lh(function(t){return e*Math.log(t)+o},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},movingAverageTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,t=(n=(t=t).categoryAxis,i=t.options,o=t.categoryAxis,t=t.seriesValues,r=(i.trendline||{}).period||2,s=o.totalRangeIndices(),o=o.currentRangeIndices(),o={min:Math.floor(Math.max(o.min-r,s.min)),max:Math.ceil(Math.min(o.max+r+2,s.max))},s=Ih(t(o),(e=i.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),r),a=[],s.forEach(function(t){var e=t[0],t=t[1];a[e]={category:n.categoryAt(e,!0),value:t}}),0<a.length?a:null);return t?Object.assign({},h,{type:"line",data:t,categoryField:"category",field:"value"}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=t.categoryAxis,s=(t={seriesValues:t.seriesValues,categoryAxis:n,options:r},n=t.seriesValues,i=t.categoryAxis,s=((t=t.options).trendline||{}).order,n=Bh(n(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=n.count,o=n.valueMapper,0<t?Lh(function(t){return o(t)},i):null);return s?Object.assign({},r,{type:"line",data:s,categoryField:"category",field:"value"}):null},powerTrendline:function(t){var i,e,o,r,n,s=t.options,a=t.categoryAxis,t=(t={seriesValues:t.seriesValues,categoryAxis:a,options:s},a=t.categoryAxis,n=t.options,t=(0,t.seriesValues)(),Oh(t,n.field)&&(n=(t=Mh(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(t[i])}}))).slope,e=t.intercept,0<t.count)?(o=Math.exp(e),r=n,Lh(function(t){return o*Math.pow(t,r)},a)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}};var Eh,Rh,Vh=[rn,On,Sn,En],zh=[yn,Bn].concat(Vh),c,jh,h,Dh,Fh,Hh,c,Nh,h,Uh,c,Gh,h,Wh,c,Xh,h;function f(){Eh.apply(this,arguments)}function Yh(t,e,i){O([].concat(e instanceof H_?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}(Eh=Ub)&&(f.__proto__=Eh),((f.prototype=Object.create(Eh&&Eh.prototype)).constructor=f).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new _b,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[nn,hn,Bn,On,En,Cn,gn,Ln]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.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;Eh.prototype.removeAxis.call(this,t),t instanceof H_?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 i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),t=Th(n1,t.type,{options:t,categoryAxis:i,seriesValues:o});return t&&(t.categoryAxis=e.categoryAxis,t.valueAxis=e.valueAxis,this.filterSeries(t,i))},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 i=[],o=this.srcSeries[t],t=this.seriesCategoryAxis(o);vs(t.options.type,J)&&(this._seriesPointsCache={},this._currentPointsCache={},t.options.dataItems=[],o=this.aggregateSeries(o,t,t.totalRangeIndices()));for(var t=e?e.min:0,r=e?e.max:o.data.length,n=t;n<r;n++){var s=this.bindPoint(o,n);i.push({categoryIx:n,category:s.fields.category,valueFields:s.valueFields})}return i},f.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],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],o)}},f.prototype.createChartGroup=function(t,e){this.createAreaChart(_s(t,[rn,On]),e),this.createRangeAreaChart(_s(t,[Sn,En]),e),this.createBarChart(_s(t,[pn,nn]),e),this.createRangeBarChart(_s(t,[Pn,Cn]),e),this.createBulletChart(_s(t,[hn,In]),e),this.createCandlestickChart(_s(t,ln),e),this.createBoxPlotChart(_s(t,[sn,Ln]),e),this.createOHLCChart(_s(t,vn),e),this.createWaterfallChart(_s(t,[Rn,gn]),e),this.createLineChart(_s(t,[yn,Bn]),e)},f.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r,n,s=e[o];this.isTrendline(s)||(r=this.seriesCategoryAxis(s),n=this.findPane(r.options.pane),s=(vs(r.options.type,J)||s.categoryField)&&u(n,t)?this.aggregateSeries(s,r,r.currentRangeIndices()):this.filterSeries(s,r)),i.push(s)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},f.prototype.filterSeries=function(e,i){var o,t,r,n=(e.data||{}).length;return i._seriesMax=Math.max(i._seriesMax||0,n),w(i.options.min)||w(i.options.max)?(o=i.currentRangeIndices(),t=u(e.type,zh),(r=O({},e)).data=(r.data||[]).slice(o.min,o.max+1),t&&Bs(r,o,n,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return w(e.data[t])}),r):e},f.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},f.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=vs(o.type,J),s=t.data,a=[];n||e.indexCategories();for(var h=0;h<s.length;h++){var l,p=ib.current.bindPoint(t,h).fields.category;n&&(p=ws(p,s[h],this.chartService.intl)),w(p)||(p=r[h]),w(p)&&null!==p&&(a[l=e.totalIndex(p)]=a[l]||{items:[],category:p},a[l].items.push(h))}return this._currentPointsCache[i]=a},f.prototype.aggregateSeries=function(t,o,r){if(!t.data.length)return t;for(var n=this.seriesSourcePoints(t,o),e=O({},t),s=new Wb(O({},t),ib.current,Xb.current),i=e.data=[],a=o.options.dataItems||[],h=function(t){var e=t-r.min,i=n[t];return(i=i||(n[t]={})).categoryIx=e,i.item||(e=o.categoryAt(t,!0),i.category=e,i.item=s.aggregatePoints(i.items,e)),i},l=r.min;l<=r.max;l++){var p=h(l);i[p.categoryIx]=p.item,p.items&&p.items.length&&(a[p.categoryIx]=p.item)}return u(e.type,zh)&&Bs(e,r,o.totalCount(),h,function(t){return n[t]}),o.options.dataItems=a,e},f.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,ys(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Eh.prototype.appendChart.call(this,t,e)},f.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=Wt([].concat(e.valueAxis),function(t){return t.name===i})[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){var i=t.some(function(t){return t.stack}),o=t.some(function(t){return t.stack&&"100%"===t.stack.type}),e=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:e}},f.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";Re(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,i){return Wt(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},f.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Cb(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e))),this.appendChart(i,e))},f.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new qb(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new jb(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createLineChart=function(t,e){0!==t.length&&(t=new gb(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new xb(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},f.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new t1(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new i1(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Tb(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Lb(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},f.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new r1(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},f.prototype.axisRequiresRounding=function(t,e){for(var i=_s(this.series,Vn),o=0;o<this.series.length;o++){var r,n=this.series[o];u(n.type,Vh)&&(r=n.line)&&r.style===on&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},f.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},f.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof H_&&t[e].createLabels()},f.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,h=(void 0===a&&(a=[]),n=O({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?at:0},n),w(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Ss(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),N_):H_)(n,this.chartService);if(i[r].categories=h.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=h}h.axisIndex=r,o.push(h),this.appendAxis(h)}}var l=this.categoryAxis||o[0];this.categoryAxis=l,e?this.axisY=l:this.axisX=l},f.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Vh))return!1;return!0},f.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var h=o[a];if(u(this.findPane(h.pane),t)){var l=h.name,p=vs(h.type,ns)?{min:.1,max:1}:{min:0,max:1},p=e.query(l)||i||p,p=(0===a&&p&&i&&(p.min=Math.min(p.min,i.min),p.max=Math.max(p.max,i.max)),new(vs(h.type,ns)?W_:U_)(p.min,p.max,O({},n,h),this.chartService));if(l){if(this.namedValueAxes[l])throw new Error("Value axis with name "+l+" is already defined");this.namedValueAxes[l]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},f.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new E(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,h=0;h<a.length;h++){var l=a[h];l.getValue?us(s,l.getValue(r)):us(n,l.getCategory(r))}0===n.length&&us(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:he(e),originalEvent:e,category:Cs(n),value:Cs(s)})}},f.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},f.prototype.updateAxisOptions=function(t,e){Yh(this.options,t,e),Yh(this.originalOptions,t,e)},f.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},f.prototype._pointsByHorizontal=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsByPointIndex(t.getIndex()):(t=this._siblingsBySeriesIndex(t.series.index,e),this.chartService.rtl?t.reverse():t)},f.prototype._siblingsByPointIndex=function(e){for(var t=this.charts,i=[],o=0;o<t.length;o++){var r=t[o];r.pane&&"_navigator"===r.pane.options.name||(r=r.points.filter(function(t){return t&&!1!==t.visible&&t.getIndex()===e}),i.push.apply(i,r.sort(this._getSeriesCompareFn(r[0]))))}return i},f.prototype._siblingsBySeriesIndex=function(t,e){t=Mt(t+e,this.series.length);return this.pointsBySeriesIndex(t)},f.prototype._getSeriesCompareFn=function(t){t=this._isInStackedSeries(t);return t&&this.invertAxes||!t&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},f.prototype._isInStackedSeries=function(t){var e=u(t.series.type,[rn,On,Sn,En,yn,Bn,An,wn]),i=u(t.series.type,[pn,nn]);return e||i&&t.options.isStacked},e(c=f,{categoryAxis:{},valueAxis:{}}),O(c.prototype,Gb);const s1=c;function qh(){Rh.call(this),this._points=[]}function Zh(){this._defaultPrevented=!0}(Rh=M.Class)&&(qh.__proto__=Rh),((qh.prototype=Object.create(Rh&&Rh.prototype)).constructor=qh).prototype.destroy=function(){this._points=[]},qh.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},qh.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o&&(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Zh,visual:t.highlightVisual(),show:e}),o._defaultPrevented)||t.toggleHighlight(e,i)},qh.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},qh.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1};const a1=qh;function Qh(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Kh(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}function $h(t,e){jh.call(this),this.plotArea=t,this.options=O({},this.options,e)}(jh=M.Class)&&($h.__proto__=jh),(($h.prototype=Object.create(jh&&jh.prototype)).constructor=$h).prototype.start=function(t){return this._active=Qh(t,this.options.key),this._active},$h.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Kh(this.axisRanges=t)}},$h.prototype.end=function(){var t=this._active;return this._active=!1,t},$h.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},$h.prototype.destroy=function(){delete this.plotArea},$h.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,h=n[s];(e===y&&!h.options.vertical||e===v&&h.options.vertical)&&(a=h.pan(o))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r},(h=$h).prototype.options={key:"none",lock:"none"};const h1=h;function Jh(t,e){Dh.call(this),this.chart=t,this.options=O({},this.options,e),this.createElement()}(Dh=M.Class)&&(Jh.__proto__=Dh),((Jh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Jh).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)},Jh.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Jh.prototype.setStyles=function(t){Vt(this._marquee,t)},Jh.prototype.start=function(t){if(Qh(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i)return e=this._elementOffset(),i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},Jh.prototype._elementOffset=function(){var t=this.chart.element,e=Vt(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=ne(t);return{left:i+t.left,top:e+t.top}},Jh.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Jh.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,Kh(this.axisRanges)},Jh.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Jh.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Jh.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===y&&!a||i===v&&a||!w(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},Jh.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(i.x,o),s=Math.min(i.y,t),a=Math.abs(i.x-o),h=Math.abs(i.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,h=e.height()),o>e.x2&&(a=e.x2-i.x),o<e.x1&&(a=i.x-e.x1),t>e.y2&&(h=e.y2-i.y),t<e.y1&&(h=i.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:h}},(c=Jh).prototype.options={key:"shift",lock:"none"};const l1=c;function tl(t,e){Fh.call(this),this.chart=t,this.options=O({rate:.3},this.options,e)}(Fh=M.Class)&&(tl.__proto__=Fh),((tl.prototype=Object.create(Fh&&Fh.prototype)).constructor=tl).prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(i===y&&!a||i===v&&a)&&s.zoomRange&&(a=x(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&o.push({axis:s,range:a})}return Kh(this.axisRanges=o)},tl.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},tl.prototype.destroy=function(){delete this.chart};const p1=tl;function el(t,e){Hh.call(this,t),this.chartService=e}(Hh=S_)&&(el.__proto__=Hh),((el.prototype=Object.create(Hh&&Hh.prototype)).constructor=el).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new M.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":mt,reverse:e.rtl,alignItems:i?e.rtl?it:dt:b});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new R),r.renderVisual()}},el.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ki(t):new R},el.prototype.renderVisual=function(){this.addVisual()},el.prototype.createVisual=function(){};const c1=el;function il(){Nh.apply(this,arguments)}(Nh=P_)&&(il.__proto__=Nh),((il.prototype=Object.create(Nh&&Nh.prototype)).constructor=il).prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},il.prototype.markerOptions=function(){return this.options},il.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return O({},t,{background:t.border.color},t.highlight,t.type===$?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},il.prototype.createHighlight=function(){var t=new Nh(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},e(h=il,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:T,align:C,highlight:{width:10,height:10,border:{color:a,width:2}}});const u1=h;function ol(){Uh.apply(this,arguments)}(Uh=P_)&&(ol.__proto__=Uh),((ol.prototype=Object.create(Uh&&Uh.prototype)).constructor=ol).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},e(c=ol,{width:15,height:15,align:P,vAlign:S,margin:{right:-2,bottom:2}});const d1=c;function rl(){Gh.apply(this,arguments)}(Gh=P_)&&(rl.__proto__=Gh),((rl.prototype=Object.create(Gh&&Gh.prototype)).constructor=rl).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},rl.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},rl.prototype.createHighlightLine=function(){var t=O({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),t=new d1(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},rl.prototype.createHighlightMarker=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),e=new Gh(t),i=this.parent.paddingBox,t=t.border.width,o=this.parent.box.clone();return o.pad({left:t-i.x1,top:t-i.y1}),e.reflow(o),this.highlightMarker=e.getElement(),this.highlightMarker},e(h=rl,{border:{width:0},type:"rect",align:C,vAlign:b,highlight:{border:{width:2},markers:{type:Q,width:10,height:10,border:{width:2,color:a},align:C,vAlign:T}}});const f1=h;function nl(){Wh.apply(this,arguments)}(Wh=P_)&&(nl.__proto__=Wh),((nl.prototype=Object.create(Wh&&Wh.prototype)).constructor=nl).prototype.createHighlight=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),t=new Wh(t),e=this.paddingBox.clone(),i=this.parent.box.clone();return e.align(i,y,C),e.align(i,v,T),t.reflow(e),this.highlight=[t.getElement()],this.highlight},e(c=nl,{highlight:{markers:{type:Q,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});const g1=c;function sl(t){Xh.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Fe(),this.options.accessibility.ariaChecked=t.active}(Xh=C_)&&(sl.__proto__=Xh),((sl.prototype=Object.create(Xh&&Xh.prototype)).constructor=sl).prototype.createContainer=function(){this.container=new O_({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},sl.prototype.createMarker=function(){this.markerWrap=new Xh({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},sl.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,t=t.line,e={border:{color:(t=void 0===t?{}:t).color||e,opacity:t.opacity,dashType:t.dashType}};return this._createLine(e)||this._createMarkerLine(e,t)||this._createSquare()},sl.prototype.markerOptions=function(){var t=this.options,e=t.markers,i=t.markerColor,o=(e=void 0===e?{}:e).border;return void 0===o&&(o={}),e.zIndex=void 0,O({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},sl.prototype._highlightOptions=function(){var t=this.options;return O({markers:{type:t.markers.type}},t.highlight)},sl.prototype._createLine=function(t){var e=this.options;return e.type!==yn||e.markers.visible||(this._line=new f1(O({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},sl.prototype._createMarkerLine=function(t,e){return this.options.type===yn&&(this._markerLineArea=new d1(O({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},sl.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},sl.prototype._createSquare=function(){var t,e=this.options;return e.type===rn&&((t=e.pattern||(e.series||{}).pattern)&&("function"==typeof t&&(t=t(e.series)),t=structuredClone(t),this._reduceSize(t,"gap"),this._reduceSize(t,"width"),this._reduceSize(t,"radius")),this._square=new g1(Object.assign({},{border:e.border,vAlign:e.markers.visible?S:b,highlight:this._highlightOptions()},e.area,{pattern:t,background:e.area.background||e.markerColor})),this.markerWrap.append(this._square)),this._square},sl.prototype._createMarker=function(){return new u1(this.markerOptions())},sl.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},sl.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},sl.prototype._toggleHighlight=function(e){var t,i,o=this;this.options.highlight.visible&&((t=this._marker||this._square||this._line)&&t===this._line&&this._line.visual.visible(!e),t)&&((i=t.highlight)||(i=t.createHighlight()).forEach(function(t){return t&&o.markerWrap.appendVisual(t)}),i.forEach(function(t){return t&&t.visible(e)}))},sl.prototype.createLabel=function(){var t=this.options,e=O({},t.labels);this.container.append(new I_(t.text,e))},sl.prototype.getAriaLabelText=function(){return this.options.text},sl.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},sl.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},sl.prototype.renderComplete=function(){Xh.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=M.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},sl.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(Hn,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},sl.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},sl.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},sl.prototype.eventArgs=function(t){var e=this.options;return{element:he(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},sl.prototype.createVisual=function(){Xh.prototype.createVisual.call(this);var t=this.options;this.options.visible&&(t=O({ariaLabel:void 0!==t.accessibility.ariaLabel?t.accessibility.ariaLabel:t.text},t.accessibility),Gi(this.visual,t))},sl.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{type:t.type,markers:O({background:this.options.markerColor},this.markerOptions()),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):Xh.prototype.renderVisual.call(this)},sl.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return M.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},e(h=sl,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});const y1=h;var al,hl="custom",c,ll,h,pl,cl,c,ul,h,dl,c,fl,p,gl,h,yl,c,vl,p,ml,c;function xl(t,e){void 0===e&&(e={}),al.call(this,t),this.chartService=e,u(this.options.position,[T,P,S,C,hl])||(this.options.position=P),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}(al=S_)&&(xl.__proto__=al),((xl.prototype=Object.create(al&&al.prototype)).constructor=xl).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=b;e===hl?o=C:u(e,[T,S])?(o=i===dt?C:i===it?P:b,r=e):i&&(i===dt?r=T:i===it&&(r=S)),this.container=new C_({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new C_({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},xl.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new c1({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s],h=a.series||{},l=h.markers,p=(void 0===l&&(l={}),h.dashType),c=h.legendItem,h=h.opacity,l=O({visible:!1!==l.visible,type:Q},l),l=(delete l.size,O({},{markers:l,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:p},e.line),area:Object.assign({},{opacity:h},e.area),opacity:h,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers}));o.append(new y1(l))}o.render(),this.itemsContainer.append(o)},xl.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===hl&&e!==mt||(w(e)?e!==mt:u(t,[C,P]))},xl.prototype.hasItems=function(){return 0<this.container.children[0].children.length},xl.prototype.getItems=function(){return this.itemsContainer.children[0].children},xl.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===hl?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new R(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},xl.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===T||o===S?y:v,a=this.isVertical(),h=t.clone(),l=t.clone(),o=(o!==C&&o!==P||(l.y1=h.y1=0),a&&n?(l.y2=l.y1+n,l.align(h,v,i.options.vAlign)):!a&&r&&(l.x2=l.x1+r,l.align(h,y,i.options.align)),i.reflow(l),(l=i.box).clone());(e.offsetX||e.offsetY)&&(l.translate(e.offsetX,e.offsetY),i.reflow(l)),o[s+1]=t[s+1],o[s+2]=t[s+2],this.box=o},xl.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=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),i.reflow(t),t=i.box,i.reflow(new R(o,r,o+t.width(),r+t.height()))},xl.prototype.renderVisual=function(){this.hasItems()&&al.prototype.renderVisual.call(this)},xl.prototype.createLegendTitle=function(t){var e=O({},{color:Z,position:T,align:b},t),i=e.text;t&&!1!==t.visible&&t.text&&(w(e)&&e.visible&&((t=Ft(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new I_(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},xl.prototype.createTitleLayout=function(){this.layout=new O_({vertical:!0,wrap:!1}),this.container.append(this.layout)},xl.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},xl.prototype.appendTitleLayoutContent=function(){this.options.title.position===S?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},e(c=xl,{position:P,data:[],offsetX:0,offsetY:0,margin:zt(2),padding:zt(5),border:{color:Z,width:0},item:{cursor:vt,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:vt,opacity:1},area:{type:"square",align:P,width:15,height:15}});const v1=c;function _l(){ll.call(this),this._registry=[]}(ll=M.Class)&&(_l.__proto__=ll),((_l.prototype=Object.create(ll&&ll.prototype)).constructor=_l).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},_l.prototype.create=function(t,e,i){for(var o=this._registry,r=o[0],n=0;n<o.length;n++){var s=o[n],a=_s(t,s.seriesTypes),h=_s(t,Fn);if(0<a.length-h.length){r=s;break}}return new r.type(a,e,i)},(h=_l).current=new h;const m1=h;function bl(t){var e=document.createElement("div");return t&&(e.className=t),e}function wl(t){for(var e=t;e&&!Xt(e,"k-handle");)e=e.parentNode;return e}function kl(t,e,i,o){pl.call(this);var r=t.element;this.options=O({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof N_,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())}(pl=M.Class)&&(kl.__proto__=pl),((kl.prototype=Object.create(pl&&pl.prototype)).constructor=kl).prototype.onPane=function(t){return this.categoryAxis.pane===t},kl.prototype.createElements=function(){var t=this.options,e=this.wrapper=bl("k-selector k-pointer-events-none"),i=(Vt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=bl("k-selection k-pointer-events-none")),o=(this.leftMask=bl("k-mask k-pointer-events-none"),this.rightMask=bl("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=bl("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=bl("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=bl("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(bl()),r.appendChild(bl()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),Vt(i,["borderLeftWidth","borderRightWidth","height"])),n=Vt(o,"height").height,s=Vt(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},Vt(o,{top:(i.height-n)/2}),Vt(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},kl.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),oe(this.chartElement,((t={})[hs]=this._mousewheelHandler,t))),this._domEvents=D_.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)})},kl.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl,i=(this._dateAxis&&O(t,{min:Zo(i,t.min),max:Zo(i,t.max),from:Zo(i,t.from),to:Zo(i,t.to)}),Vt(this.chartElement,["paddingLeft","paddingTop"])),o=i.paddingLeft,i=i.paddingTop;this.options=O({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},kl.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(de(this.chartElement,((t={})[hs]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},kl.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},kl.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},kl.prototype._start=function(t){var e,i,o=this.options,r=he(t);!this._state&&r&&(e=ae(t),this._pointInPane(e.x,e.y))&&(r=wl(r),i=this.body.getBoundingClientRect(),e=!r&&e.x>=i.x&&e.x<=i.x+i.width&&e.y>=i.y&&e.y<=i.y+i.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(o.from),to:this._index(o.to)}},i=this._rangeEventArgs({from:this._index(o.from),to:this._index(o.to)}),this.trigger(ts,i))&&(this._state=null)},kl.prototype._press=function(t){(t=this._state?this._state.moveTarget:wl(he(t)))&&_t(t,"k-handle-active")},kl.prototype._move=function(t){var e,i,o,r,n,s,a,h,l,p,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,i=e.range,u=e.moveTarget,o=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,h=i.from,l=i.to,p=i.to-i.from,c=Vt(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(o?-1:1),u||e.inBody)&&(c=u&&Xt(u,"k-left-handle"),u=u&&Xt(u,"k-right-handle"),e.inBody?(i.from=Math.min(Math.max(s,r-t),a-p),i.to=Math.min(i.from+p,a)):c&&!o||u&&o?(i.from=Math.min(Math.max(s,r-t),a-1),i.to=Math.max(i.from+1,i.to)):(c&&o||u&&!o)&&(i.to=Math.min(Math.max(s+1,n-t),a),i.from=Math.min(i.to-1,i.from)),i.from===h&&i.to===l||(this.move(i.from,i.to),this.trigger(es,this._rangeEventArgs(i))))},kl.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&wt(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(is,this._rangeEventArgs(t)),delete this._state)},kl.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),o=i.pointCategoryIndex(new E(o.x,i.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={},h=3===t.event.which,o=Math.round(r+n/2-o);this._state||h||(this.chart._unsetActivePoint(),i.options.justified||o--,a.from=Math.min(Math.max(s,r-o),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(es,this._rangeEventArgs(a)),this._end()))},kl.prototype._mousewheel=function(t){var e,i=this,o=te(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(es,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},kl.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];this._pointInPane(i.pageX,i.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},i=this._rangeEventArgs(this._state.range),this.trigger(ts,i)?this._state=null:t.preventDefault())},kl.prototype._gestureend=function(){this._state&&(this.trigger(is,this._rangeEventArgs(this._state.range)),delete this._state)},kl.prototype._gesturechange=function(t){var e,i,o,r,n,s;this._state&&(r=this.chart,o=this._state,e=this.options,i=this.categoryAxis,o=o.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(),o.from=i.pointCategoryIndex(new E(n))||e.min,o.to=i.pointCategoryIndex(new E(s))||e.max,this.move(o.from,o.to),this.trigger(es,this._rangeEventArgs(o)))},kl.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},kl.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},kl.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},kl.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?t:e,h="x"+(o?2:1),o=this._slot(o?e:t),e=L(o[h]-r.left+n.left),t=(Vt(this.leftMask,{width:e}),Vt(this.selection,{left:e}),o=this._slot(a),L(i.width-(o[h]-r.left+n.left))),a=(Vt(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),Vt(this.rightMask,{left:a}),Vt(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},kl.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),t=x(this._index(t),o,r),o=x(this._index(e),t+1,r);i.visible&&this.move(t,o),i.from=this._value(t),i.to=this._value(o)},kl.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=O({},s);if(this._state&&(s=this._state.range),r!==P&&(s.from=x(x(n-t,0,e-1),i,o)),r!==C&&(s.to=x(x(e+t,s.from+1,o),i,o)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},kl.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),i=this._index(i.to),s={from:n,to:i},a=O({},s),h=this.categoryAxis.options.reverse,h=y+(h?"2":"1"),l=this.categoryAxis.lineBox(),h=Math.abs(l[h]-e.x),e=l.width(),l=L(h/e,2),h=L(l*t),e=L((1-l)*t);if((s=this._state?this._state.range:s).from=x(x(n-h,0,i-1),o,r),s.to=x(x(i+e,s.from+1,r),o,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},kl.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e(c=kl,{visible:!0,mousewheel:{zoom:"both"},min:ht,max:at});const x1=c;function Al(){cl.apply(this,arguments)}(cl=p)&&(Al.__proto__=cl),((Al.prototype=Object.create(cl&&cl.prototype)).constructor=Al).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=O({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,cl.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},Al.prototype.hide=function(){delete this._current,cl.prototype.hide.call(this)};const _1=Al;function Sl(t,e){ul.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}(ul=p)&&(Sl.__proto__=ul),((Sl.prototype=Object.create(ul&&ul.prototype)).constructor=Sl).prototype.showAt=function(t,e){var i,o=Wt(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(o=o[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),e=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:e,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Sl.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Sl.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:i?new E(t.x,e.y):new E(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},e(h=Sl,{categoryFormat:"{0:d}"});const b1=h;function Cl(){dl.apply(this,arguments)}function Pl(){fl.apply(this,arguments)}function Tl(){gl.apply(this,arguments)}function Ml(){yl.apply(this,arguments)}(dl=M.drawing.Animation)&&(Cl.__proto__=dl),((Cl.prototype=Object.create(dl&&dl.prototype)).constructor=Cl).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,i=i.vertical?v:y,(t=this.fromScale=new M.geometry.Point(1,1))[i]=qr,e.transform(M.geometry.transform().scale(t.x,t.y))):this.abort()},Cl.prototype.step=function(t){var e=qt(this.fromScale.x,1,t),t=qt(this.fromScale.y,1,t);this.element.transform(M.geometry.transform().scale(e,t,this.origin))},Cl.prototype.abort=function(){dl.prototype.abort.call(this),this.element.transform(null)},e(c=Cl,{duration:Xr}),M.drawing.AnimationFactory.current.register(nn,c),(fl=M.drawing.Animation)&&(Pl.__proto__=fl),((Pl.prototype=Object.create(fl&&fl.prototype)).constructor=Pl).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(M.geometry.transform().scale(qr,qr,t))},Pl.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.center))},e(p=Pl,{easing:"easeOutElastic"}),M.drawing.AnimationFactory.current.register(an,p),(gl=M.drawing.Animation)&&(Tl.__proto__=gl),((Tl.prototype=Object.create(gl&&gl.prototype)).constructor=Tl).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Tl.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},e(h=Tl,{duration:200,easing:"linear"}),M.drawing.AnimationFactory.current.register(Yr,h),(yl=M.drawing.Animation)&&(Ml.__proto__=yl),((Ml.prototype=Object.create(yl&&yl.prototype)).constructor=Ml).prototype.setup=function(){this.element.transform(M.geometry.transform().scale(qr,qr,this.options.center))},Ml.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.options.center))},e(c=Ml,{easing:"easeOutElastic",duration:Xr}),M.drawing.AnimationFactory.current.register(mn,c);const w1=c;function Ol(){vl.apply(this,arguments)}function Ll(t,e,i){var o=[],r=e.xMin,n=e.xMax,e=((e=(i||{}).forecast)&&(0<e.before&&(r-=e.before),0<e.after)&&(n+=e.after),(i||{}).samplingInterval),s=_(e,Ti(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function Il(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function Bl(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,n=n.yValue;isFinite(s)&&null!==s&&isFinite(n)&&null!==n&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}}(vl=Bb)&&(Ol.__proto__=vl),((Ol.prototype=Object.create(vl&&vl.prototype)).constructor=Ol).prototype.render=function(){vl.prototype.render.call(this),this.renderSegments()},Ol.prototype.createSegment=function(t,e,i){return new(e.style===en?ub:pb)(t,e,i)},Ol.prototype.animationPoints=function(){return vl.prototype.animationPoints.call(this).concat(this._segments)},Ol.prototype.createMissingValue=function(t,e){if(e===Kr)return As((e={x:t.x,y:t.y}).x)||(e.x=0),As(e.y)||(e.y=0),e},O((p=Ol).prototype,l);const k1=p,A1=h={exponentialTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Oh(t,s.field)&&(i=(t=Mh(t,(e=s.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:Math.log(t[e])}}))).slope,o=t.intercept,h=t.count,t={xMin:t.xMin,xMax:t.xMax},0<h)?(r=Math.exp(o),n=i,Ll(function(t){return r*Math.exp(n*t)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null},linearTrendline:function(t){var e,i,o,r,n=t.options,s=(t={seriesValues:t.seriesValues,options:n},e=t.options,t=Mh((0,t.seriesValues)(),Il(e.field)),i=t.slope,o=t.intercept,s=t.count,r=t.xMin,t=t.xMax,0<s?Ll(function(t){return i*t+o},{xMin:r,xMax:t},e.trendline):null);return s?Object.assign({},n,{type:"scatterLine",data:s}):null},logarithmicTrendline:function(t){var e,i,o,r,n,s,a,h=t.options,l=(t={seriesValues:t.seriesValues,options:h},a=t.options,t=(0,t.seriesValues)(),Oh(t,"x")&&(i=(l=Mh(t,(e=a.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:t[e]}}))).slope,o=l.intercept,l=l.count,t=Bl(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<l)?(n=i,s=o,Ll(function(t){return n*Math.log(t)+s},t,a.trendline)):null);return l?Object.assign({},h,{type:"scatterLine",data:l}):null},movingAverageTrendline:function(t){var e,i=t.options,o=(o=t.options,t=t.seriesValues,e=(o.trendline||{}).period||2,0<(t=Ih(t({before:e,after:e}),Il(o.field),e)).length?t:null);return o?Object.assign({},i,{type:"scatterLine",data:o}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=(t={seriesValues:t.seriesValues,options:r},e=t.seriesValues,i=((t=t.options).trendline||{}).order,n=Il(t.field),e=Bh(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?Ll(i,{xMin:o,xMax:e},t.trendline):null);return n?Object.assign({},r,{type:"scatterLine",data:n}):null},powerTrendline:function(t){var e,i,o,r,n,s,a=t.options,h=(t={seriesValues:t.seriesValues,options:a},s=t.options,t=(0,t.seriesValues)(),Oh(t,"x")&&(i=(h=Mh(t,(e=s.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:Math.log(t[e])}}))).slope,o=h.intercept,h=h.count,t=Bl(t,Il(s.field)),0<h)?(r=Math.exp(o),n=i,Ll(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return h?Object.assign({},a,{type:"scatterLine",data:h}):null}};function El(){ml.apply(this,arguments)}function Rl(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}(ml=Ub)&&(El.__proto__=ml),((El.prototype=Object.create(ml&&ml.prototype)).constructor=El).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new _b,this.yAxisRangeTracker=new _b},El.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(_s(r,Tn),o),this.createScatterLineChart(_s(r,Mn),o),this.createBubbleChart(_s(r,an),o))}this.createAxes(t)},El.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),ml.prototype.appendChart.call(this,t,e)},El.prototype.removeAxis=function(t){var e=t.options.name;ml.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},El.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Wt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Wt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},El.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Bb(this,{series:t,clip:e.options.clip}),e)},El.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new k1(this,{series:t,clip:e.options.clip}),e)},El.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Rb(this,{series:t,clip:e.options.clip}),e)},El.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=O({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=vs(a.type,ns),h=s.query(),l=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||h||l,p=[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===i&&!f){f=ib.current.bindPoint(d,0).valueFields;p.push(f[e?"y":"x"]);break}}0===i&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max));for(var g=0;g<p.length;g++)if(p[g]instanceof Date){o=!0;break}l=new(vs(a.type,J)||!a.type&&o?G_:t?W_:U_)(s.min,s.max,a,this.chartService);if(l.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=l}return this.appendAxis(l),l},El.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[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||o[0],this.axisY=this.axisY||n[0]},El.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new E(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],l=0;l<s;l++){var p=n[l],c=p.options.vertical?h:a,p=p.getValue(r);null!==p&&c.push(p)}0<a.length&&0<h.length&&t.trigger(i,{element:he(e),originalEvent:e,x:Cs(a),y:Cs(h)})},El.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Rl(this.options,o,i,e),Rl(this.originalOptions,o,i,e)},El.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=Th(A1,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},El.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},e(c=El,{xAxis:{},yAxis:{}}),O(c.prototype,Gb);const S1=c;(Vl=S_)&&(Wl.__proto__=Vl),((Wl.prototype=Object.create(Vl&&Vl.prototype)).constructor=Wl).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},Wl.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);t.visible&&(i||0===i)&&(t.position===b||t.position===ss?(t.color||(t.color=v_(this.options.color)),t.background||(t.background=this.options.color)):(e=e.theme.seriesDefaults.labels,t.color=t.color||e.color,t.background=t.background||e.background),this.label=new I_(i,O({},t,{align:b,vAlign:"",animation:{type:Yr,delay:this.animationDelay}}),this.pointData()),this.append(this.label))},Wl.prototype.getLabelText=function(t){var e=Ft(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},Wl.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Wl.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,h=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new R(t.x,t.y-e/2,t.x,t.y))):r.position===ss?(s.radius=s.radius-e/2,t=s.point(h),n.reflow(new R(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(h)).x>=s.center.x?(o=t.x+i,n.orientation=P):(o=t.x-i,n.orientation=C),n.reflow(new R(o,t.y-e,t.x,t.y))))},Wl.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;Vl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value&&(o.visual?(t=(i.startAngle+180)%360,(t=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new M.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new M.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Wl.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},o=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},r=i.color,n=Ni(i.pattern,{color:r,opacity:i.opacity}),o=this.createSegment(e,O({fill:n,stroke:{opacity:i.opacity},zIndex:i.zIndex},o));t.append(o),ks(i)&&t.append(this.createGradientOverlay(o,{baseColor:r,fallbackFill:n},O({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Wl.prototype.createSegment=function(t,e){return e.singleSegment?new M.drawing.Circle(new M.geometry.Circle(new M.geometry.Point(t.center.x,t.center.y),t.radius),e):A_.current.createRing(t,e)},Wl.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;O(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Vl.prototype.createAnimation.call(this)},Wl.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,O({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Wl.prototype.highlightVisual=function(){return this.visual.children[0]},Wl.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new M.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Wl.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=this.createSegment(this.sector,O({},t,{stroke:{width:2*e}})),e=new M.drawing.MultiPath;return e.paths.push(M.drawing.Path.fromRect(t.bbox())),e.paths.push(this.createSegment(this.sector,{})),t.clip(e),t},Wl.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=ue(e+180),e=L(Math.sin(t),et),t=L(Math.cos(t),et),{horizontal:Math.abs(e)>jl?b:t<0?P:C,vertical:Math.abs(e)<zl?b:e<0?S:T})}},Wl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Wl.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Wl.prototype.getIndex=function(){return this.index};var Vl,l=Wl,zl=L(ue(30),et),jl=L(ue(60),et),Dl,Fl,p,Hl,h,Nl,Ul,Gl,c;function Wl(t,e,i){Vl.call(this,i),this.value=t,this.sector=e}e(l,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:tt,margin:zt(.5),align:Q,zIndex:1,position:as},animation:{type:mn},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(l.prototype,ab),O(l.prototype,wb);const C1=l,P1={createLegendItem:function(t,e,i){var o,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},h=s.labels||{};i&&!1!==i.visibleInLegend&&(a=!(r=!1!==i.visible)&&Ft(h)||Ft(a),n=i.category,a&&(n=a({text:n,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=(r?(o={},e):(o={color:h.color,font:h.font},s.markers||{})).color,As(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,pattern:e.pattern,labels:o})}};function Xl(t,e){Dl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Yl(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),o=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=o&&(i=n/o,r=new E(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))),r}(Dl=S_)&&(Xl.__proto__=Dl),((Xl.prototype=Object.create(Dl&&Dl.prototype)).constructor=Xl).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Xl.prototype.traverseDataPoints=function(t){for(var e=this.options,i=this.plotArea.options.seriesColors,o=(i=void 0===i?[]:i).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,l=gs(a),p=l.total,c=l.points,l=l.count,u=360/p,d=void 0,f=(isFinite(u)||(d=360/l),void 0),f=(w(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===as&&(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!==h.length&&Boolean(y.explode),Ot(a.color)||(a.color=y.color||i[g%o]),t(v,new w_(null,0,0,f,m),{owner:this,category:w(y.category)?y.category:"",pattern:(w(y.pattern)?y:a).pattern,index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==p?v/p:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},Xl.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;xs(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},Xl.prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new C1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Xl.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs,r=(void 0===o&&(o=[]),i.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,h=s-.85*s,l=new R(n.x1,n.y1,n.x1+s,n.y1+s),s=l.center(),n=n.center(),p=e.series.length,c=[],u=[],e=_(e.padding,h);this.targetBox=t,e=a-5<e?a-5:e,l.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new E(d+l.x1+e,d+l.y1+e),g=0;g<r;g++){var y=i[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,o.length&&(x=o[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===p-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(l),y.label);x&&x.options.position===as&&m===p-1&&(x.orientation===P?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=l},Xl.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Xl.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Xl.prototype.distanceBetweenLabels=function(t){var e=pe(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=L(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var h=t[a+1].box,n=t[a].box,s=L(h.y1-n.y2);r.push(s)}return s=L(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Xl.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Xl.prototype._takeDistance=function(t,e,i,o){var r;return 0<t[i]&&(o-=r=Math.min(t[i],o),t[i]-=r,t[e]+=r),o},Xl.prototype.reflowLabels=function(t,e){var i,o=pe(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var l=0;l<s;l++){var p=e[l],c=p.box;h+=t[l],i=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),p.orientation===P),p.orientation===P?(n.align!==Q&&(i=r.radius+r.center.x+a),p.reflow(new R(i+c.width(),h,i,h))):(n.align!==Q&&(i=r.center.x-r.radius-a),p.reflow(new R(i-c.width(),h,i,h))),h+=c.height()}},Xl.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;Dl.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,h,l,p,c=e[o],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new M.drawing.Path({stroke:{color:g,width:t.width},animation:{type:Yr,delay:c.animationDelay}}),d.options.position===as)&&(r=d.box,n=u.center,p=u.point(f),s=new E(r.x1,r.center().y),l=h=a=void 0,p=u.clone().expand(t.padding).point(f),g.moveTo(p.x,p.y),d.orientation===P?(l=Yl(n,p,s,h=new E(r.x1-t.padding,r.center().y)),s=new E(h.x-4,h.y),(l=l||s).x=Math.min(l.x,s.x),this.pointInCircle(l,u.center,u.radius+4)||l.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===pn||a<s.x?g.lineTo(a,p.y):g.lineTo(p.x+8,p.y),g.lineTo(s.x,h.y)):(l.y=h.y,g.lineTo(l.x,l.y))):(l=Yl(n,p,s,h=new E(r.x2+t.padding,r.center().y)),s=new E(h.x+4,h.y),(l=l||s).x=Math.max(l.x,s.x),this.pointInCircle(l,u.center,u.radius+4)||l.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===pn||a>s.x?g.lineTo(a,p.y):g.lineTo(p.x-8,p.y),g.lineTo(s.x,h.y)):(l.y=h.y,g.lineTo(l.x,l.y))),g.lineTo(h.x,h.y),this._connectorLines.push(g),this.visual.append(g))}},Xl.prototype.renderVisual=function(){var t,e,i,o;Dl.prototype.renderVisual.call(this),Ae(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),o=this.visual.bbox())&&(i=o.bottomRight(),(o=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1)&&this.visual.transform(M.geometry.transform().scale(o,o,[e.x,e.y]))},Xl.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Xl.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,e=e.center,s=e.x,e=e.y,i=Math.min(Math.abs(e-i),Math.abs(e-o));return n<i?t:s+Math.sqrt(n*n-i*i)*(r?1:-1)},Xl.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},Xl.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Xl.prototype.animationDelay=function(t){return 70*t},Xl.prototype.stackRoot=function(){return this},e(p=Xl,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),O(p.prototype,P1),p.prototype.isStackRoot=!0;const T1=p;function ql(){Fl.apply(this,arguments)}(Fl=Ub)&&(ql.__proto__=Fl),((ql.prototype=Object.create(Fl&&Fl.prototype)).constructor=ql).prototype.render=function(){this.createPieChart(this.series)},ql.prototype.createPieChart=function(t){var e=t[0],t=new T1(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},ql.prototype.appendChart=function(t,e){Fl.prototype.appendChart.call(this,t,e),ie(this.options.legend.data,t.legendItems)},ql.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},ql.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)};const M1=ql;function Zl(){Hl.apply(this,arguments)}(Hl=C1)&&(Zl.__proto__=Hl),((Zl.prototype=Object.create(Hl&&Hl.prototype)).constructor=Zl).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===b?(o.radius-=(o.radius-o.innerRadius)/2,e=o.point(r),i.reflow(new R(e.x,e.y-t/2,e.x,e.y))):Hl.prototype.reflowLabel.call(this))},Zl.prototype.createSegment=function(t,e){return A_.current.createRing(t,e)},e(h=Zl,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:mn}}),O(h.prototype,ab);const O1=h;function Ql(){Nl.apply(this,arguments)}(Nl=T1)&&(Ql.__proto__=Nl),((Ql.prototype=Object.create(Nl&&Nl.prototype)).constructor=Ql).prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new O1(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Ql.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),o=Math.min(o.width(),o.height()),r=o/2,n=i.series,s=n.length,i=_(i.padding,o-.85*o),a=r-(i=r-5<i?r-5:i),h=0,l=0;l<s;l++){var p=n[l];0===l&&w(p.holeSize)&&(e=p.holeSize,a-=p.holeSize),w(p.size)?a-=p.size:h++,w(p.margin)&&l!==s-1&&(a-=p.margin)}w(e)||(a-=e=(r-i)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+_(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Nl.prototype.reflow.call(this,t)},Ql.prototype.animationDelay=function(t,e,i){return 50*t+Xr*(e+1)/(i+1)},e(c=Ql,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const L1=c;function Kl(){Ul.apply(this,arguments)}(Ul=M1)&&(Kl.__proto__=Ul),((Kl.prototype=Object.create(Ul&&Ul.prototype)).constructor=Kl).prototype.render=function(){this.createDonutChart(this.series)},Kl.prototype.createDonutChart=function(t){var e=t[0],t=new L1(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Kl.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},Kl.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)};const I1=Kl;function $l(){Gl.apply(this,arguments)}(Gl=Ub)&&($l.__proto__=Gl),(($l.prototype=Object.create(Gl&&Gl.prototype)).constructor=$l).prototype.initFields=function(){this.valueAxisRangeTracker=new _b},$l.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},$l.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),i=this.polarAxis.getSlot(0).center,i=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(i)},$l.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,i=e.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=o.type===ns?(t=Q_,{min:.1,max:1}):(t=Z_,{min:0,max:1}),e=e.query(name)||i||r,r=(e&&i&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max)),new t(e.min,e.max,o,this.chartService));this.valueAxis=r,this.appendAxis(r)},$l.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),t=zt(t.padding||{},r),r=o.clone().unpad(t),o=r.clone(),t=(o.y2=o.y1+Math.min(o.width(),o.height()),o.align(r,v,b),o.clone().shrink(0,o.height()/2)),r=(i.reflow(o),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=o,this.alignAxes(o)},$l.prototype.backgroundBox=function(){return this.box},$l.prototype.detachLabels=function(){};var Jl,tt=$l,l,tp,ep,ip,op,p,rp,h;function np(){Jl.apply(this,arguments)}(Jl=Bb)&&(np.__proto__=Jl),((np.prototype=Object.create(Jl&&Jl.prototype)).constructor=np).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=E.onCircle(t.center,t.startAngle,e);return new R(t.x,t.y,t.x,t.y)},e(l=np,{clip:!1});const B1=l;function sp(){tp.apply(this,arguments)}(tp=k1)&&(sp.__proto__=tp),(p=(sp.prototype=Object.create(tp&&tp.prototype)).constructor=sp).prototype.pointSlot=B1.prototype.pointSlot,e(p,{clip:!1});const E1=p;function ap(){ep.apply(this,arguments)}(ep=mb)&&(ap.__proto__=ep),((ap.prototype=Object.create(ep&&ep.prototype)).constructor=ap).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},ap.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},ap.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new K_(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o};const R1=ap;function hp(){ip.apply(this,arguments)}(ip=yb)&&(hp.__proto__=ip),((hp.prototype=Object.create(ip&&ip.prototype)).constructor=hp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new M.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const V1=hp;function lp(){op.apply(this,arguments)}function pp(t,e){return t.value.x-e.value.x}(op=E1)&&(lp.__proto__=op),((lp.prototype=Object.create(op&&op.prototype)).constructor=lp).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===en?R1:V1)(t,e,i)},lp.prototype.createMissingValue=function(t,e){var i;return As(t.x)&&e!==$r&&(i={x:t.x,y:t.y},e===Kr)&&(i.y=0),i},lp.prototype.seriesMissingValues=function(t){return t.missingValues||Kr},lp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},lp.prototype.sortPoints=function(t){if(t.sort(pp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||As(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t};const z1=lp;function cp(){rp.apply(this,arguments)}(rp=tt)&&(cp.__proto__=rp),((cp.prototype=Object.create(rp&&rp.prototype)).constructor=cp).prototype.createPolarAxis=function(){var t=new q_(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},cp.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),rp.prototype.render.call(this)},cp.prototype.valueAxisOptions=function(t){return O(t,{majorGridLines:{type:U},minorGridLines:{type:U}},this.options.yAxis)},cp.prototype.createValueAxis=function(){rp.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},cp.prototype.trendlineFactory=function(t,e){t=S1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=_n),t},cp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Ub.prototype.appendChart.call(this,t,e)},cp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(_s(t,[_n]),e),this.createScatterChart(_s(t,[bn]),e),this.createAreaChart(_s(t,[xn]),e)},cp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new E1(this,{series:t}),this.appendChart(t,e))},cp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new B1(this,{series:t}),this.appendChart(t,e))},cp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new z1(this,{series:t}),this.appendChart(t,e))},cp.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new E(o.x,o.y),r=this.axisX.getValue(o),o=this.axisY.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:he(e),x:r,y:o})},cp.prototype.createCrosshairs=function(){},e(h=cp,{xAxis:{},yAxis:{}}),O(h.prototype,Gb,{seriesValues:S1.prototype.seriesValues});var up,dp,fp,gp,c=h,l,yp,p,vp,mp,h,xp,l,_p,p;function bp(){up.apply(this,arguments)}(up=gb)&&(bp.__proto__=up),((bp.prototype=Object.create(up&&up.prototype)).constructor=bp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=E.onCircle(t.center,t.middle(),e);return new R(t.x,t.y,t.x,t.y)},bp.prototype.renderSegments=function(){if(up.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],r=pe(n),r=pe(r.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o)&&r&&pe(n).linePoints.push(i)}},bp.prototype.createSegment=function(t,e,i){var i=new(e.style===en?ub:pb)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==$r||(i.options.closed=!0),i},e(l=bp,{clip:!1,limitPoints:!1});const j1=l;function wp(){dp.apply(this,arguments)}(dp=mb)&&(wp.__proto__=dp),((wp.prototype=Object.create(dp&&dp.prototype)).constructor=wp).prototype.fillToAxes=function(){};const D1=wp;function kp(){fp.apply(this,arguments)}(fp=yb)&&(kp.__proto__=fp),((kp.prototype=Object.create(fp&&fp.prototype)).constructor=kp).prototype.fillToAxes=function(){};const F1=kp;function Ap(){gp.apply(this,arguments)}(gp=j1)&&(Ap.__proto__=gp),((Ap.prototype=Object.create(gp&&gp.prototype)).constructor=Ap).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,h=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),h===en?(s=new D1(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new F1(t,e,i,r,n)),s},Ap.prototype.seriesMissingValues=function(t){return t.missingValues||Kr};const H1=Ap;function Sp(t,e){yp.call(this,t,null,e)}(yp=O1)&&(Sp.__proto__=yp),((Sp.prototype=Object.create(yp&&yp.prototype)).constructor=Sp).prototype.getIndex=function(){return this.categoryIx},e(p=Sp,{overlay:{gradient:"none"},labels:{distance:10}});const N1=p;function Cp(t){vp.call(this,t),this.forEach=t.rtl?Ca:Sa}(vp=S_)&&(Cp.__proto__=vp),((Cp.prototype=Object.create(vp&&vp.prototype)).constructor=Cp).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,n=i.angle/(t+o+r*(t-1)),s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.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(h=Cp,{gap:1,spacing:0});const U1=h;function Pp(){mp.apply(this,arguments)}(mp=S_)&&(Pp.__proto__=mp),((Pp.prototype=Object.create(mp&&mp.prototype)).constructor=Pp).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new R;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const G1=Pp;function Tp(){xp.apply(this,arguments)}(xp=Cb)&&(Tp.__proto__=xp),((Tp.prototype=Object.create(xp&&xp.prototype)).constructor=Tp).prototype.pointType=function(){return N1},Tp.prototype.clusterType=function(){return U1},Tp.prototype.stackType=function(){return G1},Tp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Tp.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Tp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Tp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),xp.prototype.createAnimation.call(this)},(l=Tp).prototype.reflow=sb.prototype.reflow,e(l,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const W1=l;function Mp(){_p.apply(this,arguments)}(_p=tt)&&(Mp.__proto__=_p),((Mp.prototype=Object.create(_p&&_p.prototype)).constructor=Mp).prototype.createPolarAxis=function(){var t=new Y_(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},Mp.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&O(t,{majorGridLines:{type:U},minorGridLines:{type:U}}),this._isStacked100&&O(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),O(t,this.options.valueAxis)},Mp.prototype.aggregateCategories=function(){s1.prototype.aggregateCategories.call(this,this.panes)},Mp.prototype.createCategoryAxesLabels=function(){s1.prototype.createCategoryAxesLabels.call(this,this.panes)},Mp.prototype.filterSeries=function(t){return t},Mp.prototype.trendlineFactory=function(t,e){t=s1.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=An),t},Mp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(_s(t,[wn]),e),this.createLineChart(_s(t,[An]),e),this.createBarChart(_s(t,[kn]),e)},Mp.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},Mp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new H1(this,this.chartOptions(t)),this.appendChart(t,e))},Mp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new j1(this,this.chartOptions(t)),this.appendChart(t,e))},Mp.prototype.createBarChart=function(t,e){var i,o,r,n;0!==t.length&&(n=t[0],i=this.chartOptions(t),o=(t=this.filterVisibleSeries(t)).some(function(t){return t.stack}),r=t.some(function(t){return t.stack&&"100%"===t.stack.type}),i.gap=n.gap,i.spacing=n.spacing,i.defaultStack=n.stack&&1<t.length,i.isStacked=o&&1<t.length,i.isStacked100=r&&1<t.length,n=new W1(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},Mp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Mp.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new E(o.x,o.y),r=this.categoryAxis.getCategory(o),o=this.valueAxis.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:he(e),category:r,value:o})},Mp.prototype.createCrosshairs=function(){},Mp.prototype._pointsByVertical=function(t){return _p.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},Mp.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},O((p=Mp).prototype,Gb,{appendChart:s1.prototype.appendChart,aggregateSeries:s1.prototype.aggregateSeries,seriesSourcePoints:s1.prototype.seriesSourcePoints,seriesValues:s1.prototype.seriesValues}),e(p,{categoryAxis:{categories:[]},valueAxis:{}});var Op,h=p,l,Lp,Ip,Bp,tt;function Ep(t,e,i){Op.call(this,e),this.value=t,this.options.index=i.index}(Op=S_)&&(Ep.__proto__=Op),((Ep.prototype=Object.create(Op&&Op.prototype)).constructor=Ep).prototype.getLabelText=function(t){var e=Ft(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Ep.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new R(o,e[0].y,r,e[2].y),i&&i.reflow(new R(t.x1,e[0].y,t.x2,e[2].y))},Ep.prototype.createVisual=function(){var t=this,e=this.options;Op.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(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)},Ep.prototype.createPath=function(){var t=this.options,e=t.border;return M.drawing.Path.fromPoints(this.points,{fill:Ni(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Ep.prototype.createHighlight=function(t){return M.drawing.Path.fromPoints(this.points,t)},Ep.prototype.highlightVisual=function(){return this.visual.children[0]},Ep.prototype.highlightVisualArgs=function(){var t=M.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Ep.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=M.drawing.Path.fromPoints(this.points,O({},t,{stroke:{width:2*e}})).close(),i=new M.drawing.MultiPath;return i.paths.push(M.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(M.drawing.Path.fromPoints(this.points)),t.clip(i),t},Ep.prototype.tooltipAnchor=function(){var t=this.box;return{point:new E(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Ep.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ep.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Ep.prototype.getIndex=function(){return this.index},e(l=Ep,{color:a,border:{width:1},labels:{format:""},accessibility:{role:t,className:i,ariaRoleDescription:s}}),O(l.prototype,ab),O(l.prototype,wb);const X1=l;function Rp(t,e){Lp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}(Lp=S_)&&(Rp.__proto__=Lp),((Rp.prototype=Object.create(Lp&&Lp.prototype)).constructor=Rp).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},Rp.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,i=(void 0===e&&(e=[]),t.series[0]),o=i.data;if(o)for(var t=gs(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,l=n[s];l&&(a=l.fields,Ot(i.color)||(i.color=a.color||e[s%e.length]),a=O({index:s,owner:this,series:i,seriesIx:0,dataItem:o[s],percentage:l.value/r},a,{visible:l.visible}),l=l.valueFields.value,h=this.createSegment(l,a),l=this.createLabel(l,a),h)&&l&&h.append(l)}},Rp.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;xs(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},Rp.prototype.createSegment=function(t,e){var i=O({},e.series);if(i.pattern=e.pattern||i.pattern,this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible)return t=new X1(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},Rp.prototype.createLabel=function(t,e){var i,o=e.series,r=e.dataItem,n=O({},this.options.labels,o.labels),s=t;if(n.visible)return i=Ft(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o},i?s=i(r):n.format&&(s=this.chartService.format.auto(n.format,s)),n.color||(n.color=v_(o.color),n.background)||(n.background=o.color),this.evalSegmentOptions(n,t,e),i=new I_(s,O({vAlign:n.position},n),r),this.labels.push(i),i},Rp.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==b&&(o=t[i].box.width(),r===C?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Rp.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var l=s.percentage/a.percentage*e,p=(e-l)/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=o.dynamicHeight?i*d:i/n,d=x(d?(e-l*(f/d))/2:f?0:e/2,0,e);g.push(new M.geometry.Point(t.x1+p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new M.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+o.segmentSpacing,l=x(e-2*(p=d),0,e)}},Rp.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,h=s?0:(e-e/o.neckRatio)/2,l=((s?e:e-2*h)-a)/2,p=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?l*d:l/n,d=o.dynamicHeight?i*d:i/n;u.push(new M.geometry.Point(t.x1+h,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-h,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-h-f,t.y1+d+p)),u.push(new M.geometry.Point(t.x1+h+f,t.y1+d+p)),h+=f,p+=d+o.segmentSpacing}},Rp.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},e(tt=Rp,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),O(tt.prototype,P1);const Y1=tt;function Vp(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,Ip.call(this,t,e)}(Ip=Y1)&&(Vp.__proto__=Ip);const q1=(Vp.prototype=Object.create(Ip&&Ip.prototype)).constructor=Vp;function zp(){Bp.apply(this,arguments)}(Bp=Ub)&&(zp.__proto__=Bp),((zp.prototype=Object.create(Bp&&Bp.prototype)).constructor=zp).prototype.render=function(){this.createChart(Y1,_s(this.series,[un])),this.createChart(q1,_s(this.series,[dn]))},zp.prototype.createChart=function(t,e){var i=e[0];i&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight}),this.appendChart(t))},zp.prototype.appendChart=function(t,e){Bp.prototype.appendChart.call(this,t,e),ie(this.options.legend.data,t.legendItems)},zp.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},zp.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},zp.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)};var jp,p=zp,l,Dp,tt,Fp,t;function Hp(t,e){jp.call(this),this.options=e,this.color=e.color||a,this.value=t}(jp=S_)&&(Hp.__proto__=jp),((Hp.prototype=Object.create(jp&&jp.prototype)).constructor=Hp).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},Hp.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Hp.prototype.createLabelElement=function(t){var e=(e=t.color)||v_(this.color);return new I_(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},Hp.prototype.getLabelText=function(t){var e=Ft(t);return e?e(this.pointData()):this.formatValue(t.format)},Hp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Hp.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())},Hp.prototype.createVisual=function(){jp.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},Hp.prototype.markerBox=function(){var t,e=this.options.markers,i=e.border,o=this.box.toRect(),r=_(e.type,"rect")===ut,i=_(i.width,r?1:0),r=Math.round(i/2);return e.size&&(t=o.center(),o.size.width=o.size.height=e.size,o.origin.x=Math.round(t.x-o.size.width/2),o.origin.y=Math.round(t.y-o.size.height/2)),o.size.width-=i,o.size.height-=i,o.origin.y+=r+.5,o.origin.x+=r+.5,Ki(o)},Hp.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=_(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},Hp.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new P_({type:_(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:_(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)},Hp.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,i=new P_({type:_(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:_(e.zIndex,this.series.zIndex)}),e=(i.reflow(this.markerBox()),i.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},Hp.prototype.highlightVisual=function(){return this.rectVisual},Hp.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Hp.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,t=new P_({type:_(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return t.reflow(this.markerBox()),t.getElement()},Hp.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new E(t,e),align:{horizontal:b,vertical:S}}},Hp.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Hp.prototype.unclipElements=function(){},Hp.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},O((l=Hp).prototype,ab),O(l.prototype,hb),O(l.prototype,wb),l.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:s}};const Z1=l;function Np(t,e){Dp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}(Dp=S_)&&(Np.__proto__=Dp),((Np.prototype=Object.create(Dp&&Dp.prototype)).constructor=Np).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:at,max:ht},this._evalSeries=[]},Np.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},Np.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;w(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))}},Np.prototype.addValue=function(t,e){var i;t&&w(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},Np.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(w(s)||(this._evalSeries[r]=s=xs(t,{},n,!0)),t);return s&&xs(r=O({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},Np.prototype.pointType=function(){return Z1},Np.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),Object.assign({},o)},Np.prototype.createPoint=function(t,e){var i,o,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,n=(s.pattern=e.pattern||s.pattern,s=this.evalPointOptions(s,t,e),Ot(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===i&&(i=.05),o=(0,M.parseColor)(e),r=1-i,a=function(t){var e=o.toHSL(),i=100-e.l;return e.l+=Math.min((r-t)*i,i),e.toCss()}(t.value/this.valueRange.max)),new Z1(t,s));return n.color=a,this.append(n),n},Np.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{xAxis:o,yAxis:i};throw new Error("Unable to locate Y axis with name "+t)},Np.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,h=0;this.traverseDataPoints(function(t,e){var i=s[h++],e=n.seriesAxes(e.series),o=e.xAxis,e=e.yAxis,r=o.categoryIndex(t.x),t=e.categoryIndex(t.y),o=o.getSlot(r,r,a),r=e.getSlot(t,t,a);i&&(o&&r?(e=n.pointSlot(o,r),i.reflow(e)):i.visible=!1)}),this.box=t},Np.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},Np.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),l=0;l<o.data.length;l++){var p=this.plotArea.bindPoint(o,l),c=p.valueFields,p=p.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=h.min<=d&&d<=h.max;u&&d&&t(c,O({pointIx:l,series:o,seriesIx:i,dataItem:o.data[l],owner:this},p))}},Np.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},Np.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},e(tt=Np,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});const Q1=tt;function Up(){Fp.apply(this,arguments)}function Gp(t,e){return t instanceof Date&&e instanceof Date?Wo(t,e):t===e}function Wp(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}(Fp=Ub)&&(Up.__proto__=Fp),((Up.prototype=Object.create(Fp&&Fp.prototype)).constructor=Up).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},Up.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},Up.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,r=r.yAxis,s=Be(n.categories||[]),a=Be(r.categories||[]),h=0;h<o.length;h++){var l=ib.current.bindPoint(i,h).valueFields,p=l.x,l=l.y;s.has(p)||s.add(p),a.has(l)||a.add(l)}n.categories=s.values(),r.categories=a.values()}},Up.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(_s(r,[fn]),o)}},Up.prototype.createHeatmapChart=function(t,e){t=new Q1(this,{series:t});this.appendChart(t,e)},Up.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Wt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Wt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Up.prototype.seriesAxes=function(t){var e=this.options,i=[].concat(e.xAxis),o=t.xAxis,i=o?i.find(function(t){return t.name===o}):i[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!i)throw new Error("Unable to locate X axis with name "+o);if(t)return{xAxis:i,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},Up.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},Up.prototype.createXYAxis=function(t,e,i){for(var o,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],h=this.series,l=0;l<h.length;l++){var p=h[l],c=p[e?"yAxis":"xAxis"];if(c===s.name||0===i&&!c){c=ib.current.bindPoint(p,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){o=!0;break}t=new(vs(s.type,J)||!s.type&&o?N_:H_)(s,this.chartService);if(t.axisIndex=i,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.indexCategories(),t},Up.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[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||o[0],this.axisY=this.axisY||n[0]},Up.prototype.removeAxis=function(t){var e=t.options.name;Fp.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},Up.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new E(o.x,o.y),n=this.axes,s=n.length,a=[],h=[],l=0;l<s;l++){var p=n[l];us(p.options.vertical?h:a,p.getCategory(r))}0<a.length&&0<h.length&&t.trigger(i,{element:he(e),originalEvent:e,x:Cs(a),y:Cs(h)})},Up.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Wp(this.options,o,i,e),Wp(this.originalOptions,o,i,e)},Up.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},Up.prototype._pointsByVertical=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisX.options.reverse?-1*e:e),o=this.axisX.children,r=o[Mt(this._getPointAxisXIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return Gp(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},Up.prototype._pointsByHorizontal=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisY.options.reverse?-1*e:e),o=this.axisY.children,r=o[Mt(this._getPointAxisYIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return Gp(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},Up.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},Up.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},Up.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return Gp(e,t.value)})},e(t=Up,{xAxis:{},yAxis:{}}),O(t.prototype,Gb);var Xp,i=t,s="color",l="first",tt="max",t="noteText",Yp=(m1.current.register(s1,[nn,pn,yn,Bn,rn,On,ln,vn,hn,In,sn,Ln,Pn,Cn,Rn,gn,Sn,En].concat(Fn)),m1.current.register(S1,[Tn,Mn,an].concat(Fn)),m1.current.register(M1,[mn]),m1.current.register(I1,[cn]),m1.current.register(p,[un,dn]),m1.current.register(c,[xn,_n,bn].concat(Fn)),m1.current.register(h,[wn,kn,An].concat(Fn)),m1.current.register(i,[fn]),ib.current.register([nn,pn,yn,Bn,rn,On],[gt],[zn,s,t,Zr,Qr,jn,Dn]),ib.current.register([Pn,Cn,Sn,En],["from","to"],[zn,s,t,jn,Dn]),ib.current.register([Rn,gn],[gt],[zn,s,t,"summary",jn,Dn]),ib.current.register([xn,_n,bn],[y,v],[s,jn,Dn]),ib.current.register([wn,kn,An],[gt],[zn,s,jn,Dn]),ib.current.register([un,dn],[gt],[zn,s,"visibleInLegend","visible",jn,Dn]),Xb.current.register([nn,pn,yn,Bn,rn,On,Rn,gn],{value:tt,color:l,noteText:l,errorLow:"min",errorHigh:tt}),Xb.current.register([Pn,Cn,Sn,En],{from:"min",to:tt,color:l,noteText:l}),Xb.current.register([wn,kn,An],{value:tt,color:l}),ib.current.register([Tn,Mn,an],[y,v],[s,t,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),ib.current.register([an],[y,v,"size"],[s,zn,t,Dn]),ib.current.register([fn],[y,v,gt],[s,t,Dn]),ib.current.register([ln,vn],["open","high","low","close"],[zn,s,"downColor",t,Dn]),Xb.current.register([ln,vn],{open:tt,high:tt,low:"min",close:tt,color:l,downColor:l,noteText:l}),ib.current.register([sn,Ln],["lower","q1","median","q3","upper","mean","outliers"],[zn,s,t,jn,Dn]),Xb.current.register([sn,Ln],{lower:tt,q1:tt,median:tt,q3:tt,upper:tt,mean:tt,outliers:l,color:l,noteText:l}),ib.current.register([hn,In],["current","target"],[zn,s,"visibleInLegend",t,jn,Dn]),Xb.current.register([hn,In],{current:tt,target:tt,color:l,noteText:l}),ib.current.register([mn,cn],[gt],[zn,s,"explode","visibleInLegend","visible",jn,Dn]),[zn,gt,y,v]),qp="mousemove",Zp="contextmenu",Qp="mouseleave",Kp="keydown",$p="k-chart-overlay-top",p;function g(t,e,i,o){var r=this,o=(void 0===o&&(o={}),Xp.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new j_(this,o),this.chartService.theme=i,this._initElement(t),O({},this.options,e));this._originalOptions=O({},o),this._theme=i,this._initTheme(o,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),y_.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents(),r._restoreOverlayElement())})}function Jp(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function tc(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 ec(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}(Xp=M.Class)&&(g.__proto__=Xp),((g.prototype=Object.create(Xp&&Xp.prototype)).constructor=g).prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;0<=e;e--){var i=t.childNodes[e];Xt(i,"k-chart-overlay")?this.overlayElement=i:t.removeChild(i)}this.element=t},g.prototype._setElementClass=function(t){_t(t,"k-chart")},g.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":((!this.options.title||this.options.title&&this.options.title.position!==S?_t:wt)(this.overlayElement,$p),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element)&&this.element.appendChild(this.overlayElement)},g.prototype._hasSeriesData=function(){var t=this.options.series||[];return 0<t.length&&t.some(function(t){return t.data&&0<t.data.length})},g.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i;for(var n=t,s=Yp,a=0;a<s.length;a++){var h=s[a]+"Axes";n[h]&&(n[s[a]+"Axis"]=n[h],delete n[h])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,St(t.title)&&(t.title={text:t.title}),this.options=O({},e,t),this.applySeriesColors()},g.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)}},g.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Ae(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},g.prototype._resize=function(){this._noTransitionsRedraw()},g.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()},g.prototype.getAxis=function(t){return Ir(t,this._plotArea.axes)},g.prototype.findAxisByName=function(t){return this.getAxis(t)},g.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new J_(e[i])},g.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new J_(e[t])},g.prototype.plotArea=function(){return new tb(this._plotArea)},g.prototype.toggleHighlight=function(t,e){var i,o,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=Ot(e)?r.filterPoints(e):(Bt(e)?(i=e.series,o=e.category):i=o=e,n.type===cn?Jp(r.pointsBySeriesName(i),o):u(n.type,[mn,un,dn])?Jp((r.charts[0]||{}).points,o):r.pointsBySeriesName(i));e&&this.togglePointsHighlight(t,e)},g.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},g.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;Ot(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&w(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(n=this._plotArea.pointsByCategoryIndex(i),r.showAt(n)):e&&r.show(e)},g.prototype.hideTooltip=function(){this._tooltip.hide()},g.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&se(e,{width:i.width}),i.height&&se(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=M.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},g.prototype._surfaceWrap=function(){return this.element},g.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,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 a1,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),nc(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},g.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},g.prototype._redrawFocusHighlight=function(){var t,e;this._destroyed||(t=(e=this._focusState).legendInFocus,e=e.preserveHighlight,t&&e&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1))},g.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,t=St(t)?t:t.description||t.text;t&&this.element.setAttribute("aria-roledescription",t)},g.prototype._kendoExportVisual=function(t){var e;return t&&t.width&&t.height?(e={width:(e=this._originalOptions.chartArea||{}).width||t.width,height:e.height||t.height},this.exportVisual(e)):this.exportVisual()},g.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(i=this.options,t=O({},t.options,{chartArea:{width:t.width,height:t.height}}),rc(this._originalOptions,t),this.options=O({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),nc(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},g.prototype._sharedTooltip=function(){return this._plotArea instanceof s1&&this.options.tooltip&&this.options.tooltip.shared},g.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new h1(this._plotArea,t.pannable))},g.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new l1(this,e))},g.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new p1(this,e))},g.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==i||this.requiresHandlers([Qn,qn,Zn])),i=(!1===e||!1===o)&&!this.requiresHandlers([Kn,$n,Jn]),e=this.element;this._dragZoomEnabled&&t&&i?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&i||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!i)},g.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom)&&i.toggleZoom(e)},g.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new _1(this.chartService,t)},g.prototype._createSharedTooltip=function(t){return new b1(this._plotArea,t)},g.prototype.applyDefaults=function(t,e){var i,o,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||o.color,e=O({},s,s[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[i],e}for(var h=0;h<Yp.length;h++)o=n.axisDefaults||{},r=(r=[].concat(n[i=Yp[h]+"Axis"])).map(a),n[i]=1<r.length?r:r[0];var l=t,t=e,p=l.series,c=p.length,u=l.seriesDefaults,d=O({},l.seriesDefaults),f=t?O({},t.seriesDefaults):{},g=O({},f);tc(d),tc(g);for(var y=0;y<c;y++){var v=p[y].type||l.seriesDefaults.type,v=O({data:[]},g,f[v],{tooltip:l.tooltip},d,u[v]);p[y]._defaults=v,p[y]=O({},v,p[y]),p[y].data=p[y].data||[]}},g.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},g.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new M_(this._modelOptions()),o=(i.chart=this,i._plotArea=e,B_.buildTitle(t.title)),r=B_.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return i.append.apply(i,B_.orderTitles([o,r])),t.legend&&t.legend.visible&&(t=new v1(e.options.legend,this.chartService),i.append(t),i._legend=t),i.append(e),i.reflow(),this._setTitleBox(o,r),i},g.prototype._setTitleBox=function(t,e){var i,o,r;(t||e)&&(this._titleBox=(t||e).box.clone(),i=t?t.options.position:"",r=(o=e?e.options.position:"")!==S,i===o&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone()))},g.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return O({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},g.prototype._createPlotArea=function(t){var e=this.options;return m1.current.create(t?[]:e.series,e,this.chartService)},g.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof H_&&n.select&&!n.vertical&&(o=r.range(),r=new x1(this,r,O({min:o.min,max:o.max},n.select)),e.push(r))}},g.prototype._selectStart=function(t){return this.trigger(ts,t)},g.prototype._select=function(t){return this.trigger(es,t)},g.prototype._selectEnd=function(t){return this.trigger(is,t)},g.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.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,M.throttle)(this._mousemove.bind(this),20)},g.prototype.addObserver=function(t){t&&this.observers.push(t)},g.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},g.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},g.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===os?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Gn?this._updateDrilldownPoint(e.point):t===Wn?this._resetDrilldownPoint():t===Nn?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===Hn&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},g.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},g.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,oe(e,((t={})[Zp]=this._clickHandler,t[hs]=this._mousewheelHandler,t[Qp]=this._mouseleaveHandler,t[Kp]=this._keydownHandler,t.mousedown=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&oe(e,((t={})[qp]=this._mousemove,t)),this.domEvents=D_.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()},g.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(Yn)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},g.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},g.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},g.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(Jn,{}))},g.prototype._gesturechange=function(t){var e,i,o=this._mousewheelZoom;o&&!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,i={delta:e,axisRanges:ec(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger(Kn,i)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(i.axisRanges=o.updateRanges(e,t))&&!this.trigger($n,i)&&o.zoom()))},g.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},g.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Qn,qn,Zn])&&this._startNavigation(t,e,Qn),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection)&&this._zoomSelection.start(t)&&this.trigger(Kn,{axisRanges:ec(this._plotArea.axes),originalEvent:t})},g.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(qn,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,h=n[s];h.options.name&&0!=(a=(a=h.options.vertical?t.y:t.x).startLocation-a.location)&&(r[h.options.name]=h.translateRange(a))}e.axisRanges=r,this.trigger(qn,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},g.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(Zn,{axisRanges:ec(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,Zn),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger($n,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(Jn,{axisRanges:e,originalEvent:t})))},g.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},g.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return _(t.rate,.3)},g.prototype._mousewheel=function(t){var e=this,i=te(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:ec(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(Kn,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger($n,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(Jn,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=o||this._startNavigation(t,r,Kn)?o:this._navState){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,h={},l=0;l<a.length;l++){var p=a[l],c=p.options.name;c&&(h[c]=p.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger($n,{delta:i,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,Jn)},150)}}},g.prototype._startNavigation=function(t,e,i){var o,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(o=ec(r),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:o,pane:e,axes:r}))},g.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},g.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},g.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),o=i&&(o=o.closest(i))&&o.aliasFor?o.aliasFor():o},g.prototype._eventCoordinates=function(t){t=ae(t);return this._toModelCoordinates(t.x,t.y)},g.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=Vt(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},g.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=ne(this.element);return{left:L(t.x+e.left+i.left),top:L(t.y+e.top+i.top)}},g.prototype._toModelCoordinates=function(t,e){var i=this.element,o=ne(i),r=this._elementPadding(),i=Te(i).invert(),t=new M.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new E(t.x,t.y)},g.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},g.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},g.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},g.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===T||t===C)},g.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},g.prototype._keydown=function(t){var e,i=this._focusState,o=i.legendInFocus,i=i.focusedElement,r=this._legend;"Tab"===t.key?(this._clearFocusedElement(),e=this._isLegendBeforeChart(),o&&e!==t.shiftKey?this._navigatePoints(t):!o&&e===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)):"Escape"===t.key?(i&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?i&&(this._focusState.preserveHighlight=!0,this._propagateClick(i,t),this._focusElement(i)):o?this._navigateLegend(t):this._navigatePoints(t)},g.prototype._navigatePoints=function(e){var i=this,o=this._focusState,t=this._plotArea;if(o.legendInFocus=!1,o.focusedElement){var r=function(t){o.focusedPoint=t,i._focusElement(o.focusedPoint),i._displayTooltip(t),e.preventDefault()};switch(e.key){case Y:r(t.getPointToTheRight(o.focusedPoint));break;case X:r(t.getPointToTheLeft(o.focusedPoint));break;case W:r(t.getPointBelow(o.focusedPoint));break;case G:r(t.getPointAbove(o.focusedPoint))}}else this._focusFirstPoint(),e.preventDefault()},g.prototype._navigateLegend=function(e){var i=this,o=this._focusState,t=this._legend,r=this.chartService.rtl;if(o.legendInFocus=!0,o.focusedElement){var n=t.getItems().length,s=function(t){o.focusedLegendItemIndex=t(o.focusedLegendItemIndex,n),i._focusElement(i._getFocusedLegendItem()),e.preventDefault()};switch(e.key){case G:case X:s(r?Pt:Tt);break;case W:case Y:s(r?Tt:Pt)}}else this._focusFirstLegendItem(),e.preventDefault()},g.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},g.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},g.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},g.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},g.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},g.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},g.prototype._focusLegendItem=function(e){var t=this._focusState;t.focusedLegendItemIndex=this._legend.getItems().findIndex(function(t){return t.options.series.index===e.seriesIndex&&t.options.pointIndex===e.pointIndex}),t.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},g.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},g.prototype._focusElement=function(t,e){var i=this._focusState;this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e)&&(t.focusVisual(),i.legendInFocus?(e=t.options,this._showSeriesInactiveOpacity(e.series.index,e.pointIndex)):this._showInactiveOpacity(t))},g.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},g.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(q,t._id)},g.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(q)},g.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility,t=(e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription),i.ariaChecked);return w(t)&&e.setAttribute("aria-checked",t),e},g.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},g.prototype._startHover=function(t,e){var i;return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Ub)}),i=this._activePoint,this._updateHoveredPoint(t,e),t&&i!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),this._showInactiveOpacity(t))),t)},g.prototype._displayTooltip=function(t){O({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},g.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},g.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);o&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,o))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},g.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},g.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},g.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},g.prototype._updateDrilldownPoint=function(t){t&&t.series&&ib.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},g.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},g.prototype._startDrilldown=function(t){var e,i;t&&t.series&&(e=t.series,i=ib.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:i,sender:this})},g.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},g.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&(a.highlight||{}).visible&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},g.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},g.prototype._showInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},g.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)},g.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},g.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},g.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},g.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),oe(document,((t={})[qp]=this._mouseMoveTrackHandler,t)))},g.prototype._mouseMoveTracking=function(t){var e=this.options,i=this._tooltip,o=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)||(O({},e.tooltip,n.options.tooltip).visible&&i.show(n),o.show(n))):(de(document,((t={})[qp]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},g.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(e),i.hover&&((i=i.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger(Yn))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},g.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},g.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,h,l;this._suppressHover||(o=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&&i?((l=(h=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=h,0<a.length&&!this.trigger(Un,l)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},g.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},g.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},g.prototype._deferRedraw=function(){this._redraw()},g.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},g.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},g.prototype.bindCategoryAxisFromSeries=function(i,e){var o=this,r=new Set,t=this.options.series.filter(function(t){return t.categoryAxis===i.name||!t.categoryAxis&&0===e}),n=t.some(function(t){return Boolean(t.categoryField)}),t=t.filter(function(t){return t.data&&0<t.data.length}),s=t.map(function(t){return ib.current.bindPoint(t,0).fields.category}),a=s.reduce(function(t,e){return t||Ss(i,e)},!1);t.filter(function(t,e){return t.categoryField||w(s[e])}).forEach(function(i){return i.data.forEach(function(t,e){e=ib.current.bindPoint(i,e).fields.category;a&&(e=(t=ws(e,t,o.chartService.intl))?t.getTime():void 0),r.add(e)})}),0<r.size?(t=Array.from(r.values()),a&&(t=t.sort().map(function(t){return t&&new Date(t)})),i.categories=t):n&&(i.categories=[])},g.prototype._isBindable=function(t){for(var e=ib.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===gt?r="field":r+="Field",!w(t[r])){i=!1;break}}return i},g.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},g.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},g.prototype._showSeriesInactiveOpacity=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[mn,cn,un,dn])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},g.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Xn,Yn])},g.prototype.updateMouseMoveHandler=function(){var t;de(this.element,((t={})[qp]=this._mousemove,t)),this._shouldAttachMouseMove()&&oe(this.element,((t={})[qp]=this._mousemove,t))},g.prototype.applyOptions=function(t,e){rc(this._originalOptions,t),this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},g.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement()},g.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},g.prototype.setIntlService=function(t){this.chartService.intl=t},g.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},g.prototype.destroy=function(){var t;this._destroyed=!0,de(this.element,((t={})[Zp]=this._clickHandler,t[hs]=this._mousewheelHandler,t[qp]=this._mousemove,t[Qp]=this._mouseleaveHandler,t[Kp]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&de(document,((t={})[qp]=this._mouseMoveTrackHandler,t)),this._focusState=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},g.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},g.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},g.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),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 ic,oc=["data","categories"];function rc(t,e){for(var i in e){var o,r,n;!u(i,oc)&&Re(e,i)&&(o=e[i],r=t[i],w(r))&&((n=null===o)||!w(o)?(delete t[i],n&&delete e[i]):r&&Bt(o)&&Bt(r)&&rc(r,o))}}function nc(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e(p=g,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:Z,width:2}}},categoryAxis:{},seriesDefaults:{type:pn,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});const K1=p;function sc(){ic.apply(this,arguments)}(ic=b1)&&(sc.__proto__=ic),((sc.prototype=Object.create(ic&&ic.prototype)).constructor=sc).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new E(this.plotArea.box.x2,e.center().y):new E(e.center().x,-2),align:o}},sc.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const $1=sc;var ac=[nn,hn],hc,lc,c,pc,h;function cc(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function uc(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function dc(t){return m(t)?[t]:t}function fc(){hc.apply(this,arguments)}(hc=K1)&&(fc.__proto__=hc),((fc.prototype=Object.create(hc&&hc.prototype)).constructor=fc).prototype._setElementClass=function(t){_t(t,"k-sparkline")},fc.prototype._initElement=function(t){hc.prototype._initElement.call(this,t),this._initialWidth=Math.floor(se(t).width)},fc.prototype._resize=function(){var t=this.element,e=cc(t.childNodes);this._initialWidth=Math.floor(se(t).width),uc(t.childNodes,e),hc.prototype._resize.call(this)},fc.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=cc(e.childNodes),o=document.createElement("span"),t=(o.innerHTML="&nbsp;",e.appendChild(o),O({width:this._autoWidth,height:se(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return se(e,{width:t.width,height:t.height}),e.removeChild(o),uc(e.childNodes,i),this.surface&&this.surface.resize(),t},fc.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},fc.prototype._createPlotArea=function(t){t=hc.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},fc.prototype._calculateWidth=function(t){for(var e=this.options,i=zt(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],h=(a.options.series||[])[0];if(h){if(h.type===nn)return 150;if(h.type===hn)return 150;if(h.type===mn)return se(r).height;var l=a.categoryAxis;l&&(l=l.categoriesCount()*(!a.options.isStacked&&u(h.type,[pn,In])?a.seriesOptions.length:1),n=Math.max(n,l))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},fc.prototype._createSharedTooltip=function(t){return new $1(this._plotArea,t)},fc.normalizeOptions=function(t){t=dc(t);return(t=xt(t)?{seriesDefaults:{data:t}}:O({},t)).series||(t.series=[{data:dc(t.data)}]),O(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,ac)||u(t.seriesDefaults.type,ac)?O({},{categoryAxis:{crosshair:{visible:!1}}},t):t},e(c=fc,{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 J1=c;function gc(){lc.apply(this,arguments)}(lc=M.drawing.Animation)&&(gc.__proto__=lc),((gc.prototype=Object.create(lc&&lc.prototype)).constructor=gc).prototype.setup=function(){this._initialOpacity=parseFloat(Vt(this.element,"opacity").opacity)},gc.prototype.step=function(t){Vt(this.element,{opacity:String(qt(this._initialOpacity,0,t))})},gc.prototype.abort=function(){lc.prototype.abort.call(this),Vt(this.element,{display:"none",opacity:String(this._initialOpacity)})},gc.prototype.cancel=function(){lc.prototype.abort.call(this),Vt(this.element,{opacity:String(this._initialOpacity)})};const t0=gc;function yc(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}function vc(t,e,i){pc.call(this),this.options=O({},this.options,i),this.container=t,this.chartService=e;i=Vt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),t.appendChild(this.element)}(pc=M.Class)&&(vc.__proto__=pc),((vc.prototype=Object.create(pc&&pc.prototype)).constructor=vc).prototype.createElements=function(){var t=this.element=yc("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=yc("k-tooltip k-chart-tooltip"),i=this.scroll=yc("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},vc.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=zo(Go(t)+Go(e-t)/2),h=.4*i.width(),l=i.center().x-h,p=(i.center().x-l)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=Ft(r),r=(this.clearHideTimeout(),this._visible||(Vt(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,Vt(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),Vt(s,["marginTop","borderTopWidth","height"]));Vt(n,{width:h,left:l+a*p,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),Vt(o,{visibility:"visible"})},vc.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},vc.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new t0(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},vc.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(h=vc,{format:"{0:d} - {1:d}",hideDelay:500});const e0=h;var mc,xc="_navigator",_c=xc,bc="_default",wc,i;function kc(t){mc.call(this),this.chart=t;var e=this.options=O({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),w(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new g_(this,((i={})[qn]="_drag",i[Zn]="_dragEnd",i[$n]="_zoom",i[Jn]="_zoomEnd",i)),t.addObserver(this.chartObserver)}function Ac(){}(mc=M.Class)&&(kc.__proto__=mc),((kc.prototype=Object.create(mc&&mc.prototype)).constructor=kc).prototype.parseDate=function(t){return Zo(this.chart.chartService.intl,t)},kc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},kc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},kc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},kc.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,o=o.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,h=(Ac.prototype=i,new Ac);0!==i.categoriesCount()&&(this.clean(),h.box=i.box,this.selection=new x1(t,h,{min:r,max:o,from:s||r,to:a||o,mousewheel:_(n,{zoom:"left"}),visible:e.visible},new g_(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new e0(t.element,t.chartService,{min:r,max:o,template:Ft(e.hint),format:e.hint.format}))},kc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[_c].roundedRange(),e=t.min,t=t.max,i=this.options.select||{},o=i.from||e,r=i.to||t;this.options.select=O({},i,{from:o=o<e?e:o,to:r=t<r?t:r}),this.filterAxes()},kc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(pe(e.panes),t)},kc.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==xc});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},kc.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(o),o=e._plotArea.categoryAxis,e=t.axisRanges[o.options.name],t=this.options.select;e&&!r&&i&&(o=t.from&&t.to?Go(t.to)-Go(t.from):Go(i.options.to)-Go(i.options.from),r=zo(x(Go(e.min),n.min,Go(n.max)-o)),t=zo(x(Go(r)+o,Go(n.min)+o,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(r,t),this.showHint(r,t))},kc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},kc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},kc.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,i=(t=void 0===t?{}:t).from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==xc&&(n.min=i,n.max=o)}},kc.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:o.from,to:o.to},"category"!==e.options.type&&(e=new N_(O({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,t.from=Do(e.min,-e.baseUnitStep,e.baseUnit),t.to=Do(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},kc.prototype._zoom=function(t){var e,i,o=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),h=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),i=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<a-e?(r.zoom(h,i),this.readSelection()):(o.options.min=s.from,s.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),i).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},kc.prototype._zoomEnd=function(t){this._dragEnd(t)},kc.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},kc.prototype._selectStart=function(t){return this.chart._selectStart(t)},kc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},kc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},kc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[_c]},kc.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},kc.setup=function(t,e){var i,o,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,i=O({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=O({},i.pane,{name:xc}),i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach(function(t){t.name=t.name||bc}),kc.attachAxes(t,i),kc.attachSeries(t,i,e))},kc.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),i=(o.concat(t).forEach(function(t){t.pane=t.pane||bc}),0===_s(i,Vn).length),i=O({type:"date",pane:xc,roundToBaseUnit:!i,justified:i,_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;o.push(O({},i,{maxDateGroups:200},r,{name:_c,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),O({},i,r,{name:_c+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),O({},i,r,{name:_c+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(O({name:_c,pane:xc,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},kc.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(O({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:_c,categoryAxis:_c,autoBind:e.autoBindElements}))};const i0=kc;function Sc(){wc.apply(this,arguments)}(wc=K1)&&(Sc.__proto__=wc),((Sc.prototype=Object.create(wc&&wc.prototype)).constructor=Sc).prototype.applyDefaults=function(t,e){var i=se(this.element).width||600,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&O({},e,i);i0.setup(t,e),wc.prototype.applyDefaults.call(this,t,e)},Sc.prototype._setElementClass=function(t){_t(t,"k-chart k-stockchart")},Sc.prototype.setOptions=function(t){this.destroyNavigator(),wc.prototype.setOptions.call(this,t)},Sc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Sc.prototype._resize=function(){this.noTransitionsRedraw()},Sc.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Sc.prototype._dirty=function(){var t=this.options,t=Wt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Sc.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new i0(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),wc.prototype._redraw.call(this),t.initSelection()},Sc.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===xc?this._unsetActivePoint():wc.prototype._trackSharedTooltip.call(this,t)},Sc.prototype.bindCategories=function(){wc.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Sc.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===_c?t=o.categories:t&&o.pane===xc&&(o.categories=t)}},Sc.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Sc.prototype.destroy=function(){this.destroyNavigator(),wc.prototype.destroy.call(this)},Sc.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return wc.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===xc},Sc.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},e(i=Sc,{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 o0=i;var Cc="arrowPointer",Pc="barPointer",Tc=Math.PI/180,Mc="inside",t="linear",Oc="outside",tt="radialPointer",l="radialRangePointer";function Lc(t,e){var i=t.getOrigin(),o=t.getSize(),e=zt(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var Ic=M.drawing.Group,Bc=M.drawing.Path,Ec=M.drawing.Text;function Rc(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=Bc.fromRect(new M.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new Ec(t.text,new M.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=Lc(t.bbox().clone(),e.padding),e=Bc.fromRect(o,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),o=new Ic;return o.append(i),o.append(e),o.append(t),o}function Vc(t,e,i){var o=w(t.from)?t.from:ht,r=w(t.to)?t.to:at;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function zc(t,e){e=zt(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Lc(t,e)}var jc,Dc=M.drawing.Path,Fc=M.drawing.Surface,s;function Hc(t,e,i,o){void 0===o&&(o={}),jc.call(this),this.element=t,this.theme=i,this.contextService=new j_(this,o),this._originalOptions=O({},this.options,e),this.options=O({},this._originalOptions),this._initTheme(i),this.redraw()}(jc=M.Class)&&(Hc.__proto__=jc),((Hc.prototype=Object.create(jc&&jc.prototype)).constructor=Hc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},Hc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},Hc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},Hc.prototype.exportVisual=function(){return this._visuals},Hc.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(xt(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},Hc.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},Hc.prototype.resize=function(){this.noTransitionsRedraw()},Hc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},Hc.prototype.redraw=function(){var t=this._surfaceSize(),t=new M.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),zc(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},Hc.prototype.setOptions=function(t,e){this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),this._initTheme(e),this.redraw()},Hc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},Hc.prototype.setIntlService=function(t){this.contextService.intl=t},Hc.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=O({},e,this.options),this.options),i=t.pointer;if(xt(i)){for(var o=[],r=0;r<i.length;r++)o.push(O({},e.pointer,i[r]));t.pointer=o}},Hc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new M.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=zc(e,i.width)),Dc.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},Hc.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();se(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Fc.create(i,{type:t.renderAs}))},Hc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&O(e,t.gaugeArea),e},Hc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},Hc.prototype.getSize=function(){return this._getSize()},Hc.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},Hc.prototype._defaultSize=function(){return{width:200,height:200}},Hc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e(s=Hc,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const r0=s;var Nc=M.drawing.Path,Uc=M.drawing.Group,Gc=M.geometry.Point,Wc,jn,Xc,Dn,Yc,zn,p,qc,c;function Zc(t,e,i,o){var r,n,s,a,h,l,p=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<p;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,l=h=a=s=void 0,a=(r=i).position,h=i.tickX,l=i.tickY,r=i.vertical?(s=new Gc(h,a),new Gc(h+n.size,a)):(s=new Gc(a,l),new Gc(a,l+n.size)),new Nc({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}function Qc(t,e){t=t||{};!w(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Wc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}(Wc=U_)&&(Qc.__proto__=Wc),((Qc.prototype=Object.create(Wc&&Wc.prototype)).constructor=Qc).prototype.initUserOptions=function(t){t=O({},this.options,t);return(t=O({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ti(t.min,t.max),t},Qc.prototype.initFields=function(){},Qc.prototype.render=function(){var t=this.elements=new Uc,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},Qc.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Uc,a=n.length,h=t.rangeSize||t.minorTicks.size/2,l=0;l<a;l++){var p=Vc(n[l],e,i),c=this.getSlot(p.from,p.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(Nc.fromRect(new M.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:p.color,opacity:p.opacity},stroke:{}}))}return s},Qc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Uc,o=0;o<t.length;o++)i.append(Rc(t[o],e.labels));return i},Qc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Uc;return 0<t.width&&t.visible&&((t=new Nc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},Qc.prototype.renderTicks=function(){var t=new Uc,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Zc(t,this.getMajorTickPositions(),o,e.majorTicks),Zc(t,this.getMinorTickPositions(),o,O({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},e(jn=Qc,{min:0,max:50,majorTicks:{size:15,align:Mc,color:Z,width:.5,visible:!0},minorTicks:{size:10,align:Mc,color:Z,width:.5,visible:!0},line:{width:.5},labels:{position:Mc,padding:2},mirror:!1,_alignLines:!1});const n0=jn;function Kc(t,e){Xc.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=O({},this.options,e);e.fill=e.color,this.scale=t,w(e.value)?e.value=x(e.value,o,i):e.value=o}function $c(t,e){Yc.call(this,t,e),this.options=O({track:{visible:w(e.track)}},this.options)}(Xc=M.Class)&&(Kc.__proto__=Xc),((Kc.prototype=Object.create(Xc&&Xc.prototype)).constructor=Kc).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=w(e._oldValue)?e.value:o,e.value=x(t,o,i),this.elements&&this.repaint()},e(Dn=Kc,{color:Z}),(Yc=zn=Dn)&&($c.__proto__=Yc),(($c.prototype=Object.create(Yc&&Yc.prototype)).constructor=$c).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=o.track.size||o.size,h=o.size/2,l=zt(o.margin),l=n?l[s?"left":"right"]:l[s?"bottom":"top"],l=s?-l:l;n?(i=new R(r.x1+l,r.y1,r.x1+l,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==Pc&&(t=e=new R(r.x2+l,r.y1-h,r.x2+l,r.y2+h))):(i=new R(r.x1,r.y1-l,r.x2,r.y1-l),s?i.y2+=a:i.y1-=a,o.shape!==Pc&&(t=e=new R(r.x1-h,r.y1-l,r.x2+h,r.y1-l))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},$c.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:w(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},$c.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,i=t.mirror,t=t.vertical,e=zt(e.margin);return t?e[i?"left":"right"]:e[i?"bottom":"top"]},e(p=$c,{shape:Pc,track:{border:{width:1}},color:Z,border:{width:1},opacity:1,margin:zt(3),animation:{type:Pc},visible:!0});const s0=p;function Jc(){qc.apply(this,arguments)}(qc=M.drawing.Animation)&&(Jc.__proto__=qc),((Jc.prototype=Object.create(qc&&qc.prototype)).constructor=Jc).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e),this.fromScale=new M.geometry.Point(i.x1,i.y1)),n=this.toScale=new M.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Jc.prototype.step=function(t){var e=qt(this.fromScale.x,this.toScale.x,t),t=qt(this.fromScale.y,this.toScale.y,t);this.element.transform(M.geometry.transform().translate(e,t))},e(c=Jc,{easing:t,duration:250}),M.drawing.AnimationFactory.current.register(Cc,c);const a0=c;var tu,eu=M.geometry.Point,iu=M.drawing.Path,ou,h;function ru(t,e){tu.call(this,t,e),w(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(tu=s0)&&(ru.__proto__=tu),((ru.prototype=Object.create(tu&&tu.prototype)).constructor=ru).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new eu(0,0-i),new eu(0-o*e,0),new eu(0,0+i)]:[new eu(0-i,0),new eu(0,0+o*e),new eu(0+i,0)]},ru.prototype.repaint=function(){var t=this.scale,e=this.options,t=new a0(this.elements,O(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()},ru.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=Cc,new iu({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close()),o=t.getSlot(e.value);return i.transform(M.geometry.transform().translate(o.x1,o.y1)),this.elements=i};const h0=ru;function nu(){ou.apply(this,arguments)}(ou=M.drawing.Animation)&&(nu.__proto__=ou),((nu.prototype=Object.create(ou&&ou.prototype)).constructor=nu).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},nu.prototype.step=function(t){t=qt(this.from,this.to,t);this._set(t)},nu.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},e(h=nu,{easing:t,speed:250}),M.drawing.AnimationFactory.current.register(Pc,h);const l0=h;var su,au=M.drawing.Group,hu=M.drawing.Path;function lu(t,e){su.call(this,t,e),w(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(su=s0)&&(lu.__proto__=su),((lu.prototype=Object.create(su&&su.prototype)).constructor=lu).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,o=o.vertical,r=r===o?-1:1,i=i.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=o?v:y,s=o?y:v,r=this._margin()*r,a=new M.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new M.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],o?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return o?(t.translate(i,0),e.translate(i,0)):(t.translate(0,i),e.translate(0,i)),[a,n,t,e]},lu.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue),o=(o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close(),new l0(o,O(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]})));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},lu.prototype.render=function(){var t=new au,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new hu({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},lu.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new hu.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const p0=lu;var pu,cu=M.drawing.Group,i;function uu(){pu.apply(this,arguments)}(pu=r0)&&(uu.__proto__=pu),((uu.prototype=Object.create(pu&&pu.prototype)).constructor=uu).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new R(i,o,i+t.width(),o+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},uu.prototype._buildVisual=function(){var t=new cu,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},uu.prototype._createModel=function(){var t=this.options,e=this.scale=new n0(t.scale,this.contextService);this.pointers=[];for(var i=xt(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=O({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?h0:p0;this.pointers.push(new n(e,r))}},uu.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},uu.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new R(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new R(t.x1,r.y-e,t.x2,r.y+e))},uu.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new R(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new R(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},uu.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},uu.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},e(i=uu,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const c0=i;var du=M.drawing.Arc,fu=M.drawing.Path,gu=M.drawing.Group,yu,s,vu,jn;function mu(t,e,i,o){var r=new gu,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),l=new M.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new fu({stroke:{color:o.color,width:o.width}}).moveTo(h).lineTo(l))}return r}function xu(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}function _u(t,e){yu.call(this,0,1,t,e)}(yu=U_)&&(_u.__proto__=yu),((_u.prototype=Object.create(yu&&yu.prototype)).constructor=_u).prototype.initUserOptions=function(t){t=O({},this.options,t);return t.majorUnit=t.majorUnit||Ti(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},_u.prototype.initFields=function(){},_u.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()},_u.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!w(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},_u.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-i)/(o-i)*s:(t-i)/(o-i)*s+n)+180},_u.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},_u.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,i=0;return e.visible&&(i=e.size),i=t.visible?Math.max(t.size,i):i},_u.prototype.labelsCount=function(){var t=yu.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},_u.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new gu,s=.05*i,a=(w(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),h=a.position===Mc,l=w(this.labelElements);h&&(i-=this.ticksSize(),this.hasRanges()&&!l&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var p=this.labels,c=p.length,r=zt(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=p[f],y=g.box.width()/2,v=g.box.height()/2,m=o[f],x=(m-180)*Tc,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(h?1:-1),m=m.y+Math.sin(x)*(v+d)*(h?1:-1),x=(g.reflow(new R(_-y,m-v,_+y,m+v)),new M.geometry.Point(g.box.x1,g.box.y1)),_=void 0;l?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||M.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=Rc(g,t.labels),n.append(_)),this.bbox=M.geometry.Rect.union(this.bbox,_.bbox())}return n},_u.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,e=e.rangeSize,o=this.getRangeRadius();this.options.labels.position===Mc&&(o+=e+i);for(var r=o+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=M.geometry.Rect.union(this.bbox,this.ranges.bbox())}},_u.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new gu;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var h=t[a],l=this.slotAngle(h[n?"to":"from"]),p=this.slotAngle(h[n?"from":"to"]);p-l!=0&&i.append(this.createRange(l,p,s,h))}}return i},_u.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,i=new M.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new du(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},_u.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(xu(r,n,s));for(var a=0;a<i;a++)for(var h=Vc(e[a],r,n),l=o.length,p=0;p<l;p++){var c=o[p];if(c.from<=h.from&&h.from<=c.to){o.push(xu(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&o.push(xu(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return o},_u.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Oc?t.getRadiusX()-r-o-i:t.getRadiusX()-i},_u.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new M.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},_u.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=mu(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new gu),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===Oc&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=mu(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},_u.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},_u.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;o&&(a+=n,h=-h),360<=n&&i.max%e==0&&--s;for(var l=[],p=0;p<s;p++)l.push(L(a,K)),a+=h;return L(a)<=t.endAngle&&l.push(a),l},_u.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)},_u.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===Oc&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,l=a.x-h[0].anchor().x,a=a.y-h[0].anchor().y;t[s].transform((new M.geometry.transform).translate(l,a))}},e(s=_u,{min:0,max:100,majorTicks:{size:15,align:Mc,color:Z,width:.5,visible:!0},minorTicks:{size:10,align:Mc,color:Z,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Mc,padding:2}});const u0=s;function bu(t,e){vu.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}(vu=M.drawing.Animation)&&(bu.__proto__=vu),((bu.prototype=Object.create(vu&&vu.prototype)).constructor=bu).prototype.step=function(t){var e=this.options,t=qt(e.oldAngle,e.newAngle,t);this.element.transform(M.geometry.transform().rotate(t,e.center))},e(jn=bu,{easing:t,duration:150}),M.drawing.AnimationFactory.current.register(tt,jn);const d0=jn;var wu,ku=M.drawing.Circle,Au=M.drawing.Group,Su=M.drawing.Path,Dn;function Cu(){wu.apply(this,arguments)}(wu=zn)&&(Cu.__proto__=wu),((Cu.prototype=Object.create(wu&&wu.prototype)).constructor=Cu).prototype.setAngle=function(t){this.elements.transform(M.geometry.transform().rotate(t,this.center))},Cu.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new d0(this.elements,O(e.animation,{oldAngle:i,newAngle:t})).play()},Cu.prototype.render=function(){var t=this.scale,e=this.options,i=new Au;return!1!==e.animation&&O(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Tc),i},Cu.prototype.reflow=function(t){var e=this.center=t.center,i=x(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(t*this.options.cap.size);this.bbox=M.geometry.Rect.fromPoints(new M.geometry.Point(e.x-i,e.y-i),new M.geometry.Point(e.x+i,e.y+i))},Cu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Su({fill:{color:i},stroke:{color:i,width:.5}});return i.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(),i},Cu.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new M.geometry.Circle(this.center,this.capSize);return new ku(e,{fill:{color:t},stroke:{color:t}})},e(Dn=Cu,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:tt,duration:150}});const f0=Dn;var Pu,Tu=M.drawing.Group,p,Mu,c,Ou,h,Lu,Iu,Bu,i,Eu,s;function Ru(){Pu.apply(this,arguments)}(Pu=r0)&&(Ru.__proto__=Pu),((Ru.prototype=Object.create(Pu&&Pu.prototype)).constructor=Ru).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=M.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},Ru.prototype._buildVisual=function(t,e,i){var o=this._visuals=new Tu;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Ru.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},Ru.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),h=L(a,K),l=L(-a,K),p=0,c=0;!(!(c++<100)||5<(p=n===o?p+1:0)||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||l!==r&&0<=(o=this.getPlotBox(l,t,s))&&o<=2||(r=0<e&&0<o?2*h:e<0&&o<0?2*l:L((h+l)/2||1,K),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(l=r,o=i):(h=r,e=i)},Ru.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=M.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},Ru.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Ru.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,e=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=M.geometry.Rect.union(r.bbox,n[s].bbox)},Ru.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new u0(t.scale,this.contextService);this.pointers=[];for(var o=xt(e)?e:[e],r=0;r<o.length;r++){var n=new f0(i,O({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},e(p=Ru,{transitions:!0,gaugeArea:{background:""}});const g0=p;function Vu(){Mu.apply(this,arguments)}(Mu=u0)&&(Vu.__proto__=Mu),((Vu.prototype=Object.create(Mu&&Mu.prototype)).constructor=Vu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},Vu.prototype.hasRanges=function(){return!0},Vu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},Vu.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),o=this.slotAngle(o?t:e),t=this.createRange(r,o,this.getRangeRadius(),i);return this.ranges.append(t),t},e(c=Vu,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const y0=c;function zu(t,e){Ou.call(this,t,e);var e=this.options,i=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=x(i,150,800),t.elements.options.get("stroke.color")),i=t.currentColor();e!==i&&(this.startColor=new M.Color(e),this.color=new M.Color(i))}(Ou=M.drawing.Animation)&&(zu.__proto__=Ou),((zu.prototype=Object.create(Ou&&Ou.prototype)).constructor=zu).prototype.step=function(t){var e,i=this.options,o=this.startColor,r=this.color,i=qt(i.oldAngle,i.newAngle,t);this.element.angle(i),r&&(i=L(qt(o.r,r.r,t)),e=L(qt(o.g,r.g,t)),o=L(qt(o.b,r.b,t)),this.element.stroke(new M.Color(i,e,o).toHex()))},e(h=zu,{easing:t,duration:150}),M.drawing.AnimationFactory.current.register(l,h);const v0=h;function ju(){Lu.apply(this,arguments)}(Lu=zn)&&(ju.__proto__=Lu),((ju.prototype=Object.create(Lu&&Lu.prototype)).constructor=ju).prototype.repaint=function(){var t=this.scale,e=this.options,i=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 v0(this,O(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},ju.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},ju.prototype.stroke=function(t){this.elements.stroke(t)},ju.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&O(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}))},ju.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,t=this.options,o=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(o)for(var s=0;s<o.length;s++){var a=o[s],h=a.color,l=a.from,a=(void 0===l&&(l=e),a.to);if(void 0===a&&(a=i),l<=n&&n<=a)return h}return r},ju.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},e(i=ju,{animation:{type:l,duration:150}});const m0=i;function Du(){Iu.apply(this,arguments)}(Iu=g0)&&(Du.__proto__=Iu),((Du.prototype=Object.create(Iu&&Iu.prototype)).constructor=Du).prototype._initTheme=function(t){Iu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Du.prototype._createModel=function(){var t=this.options,e=this.scale=new y0(t.scale,this.contextService),e=new m0(e,O({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Du.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},Du.prototype._setValueOptions=function(t){this.options.value=t},Du.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Du.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,o=o.y-e/2;return t<i.width&&(t=r+t,r=Math.max(r,0),t>i.width)&&(r-=t-i.width),e<i.height&&(i=(t=this.scale.bbox).bottomRight().y,e=o+e,o=Math.max(o,t.origin.y),i<e)&&(o-=e-i),{left:r,top:o}};const x0=Du;function Fu(){Bu.apply(this,arguments)}(Bu=x0)&&(Fu.__proto__=Bu),((Fu.prototype=Object.create(Bu&&Bu.prototype)).constructor=Fu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Bu.prototype._createModel.call(this)};const _0=Fu;function Hu(t){Eu.call(this),this.setOptions(t),this.initProperties()}(Eu=M.Class)&&(Hu.__proto__=Eu),((Hu.prototype=Object.create(Eu&&Eu.prototype)).constructor=Hu).prototype.initProperties=function(){},Hu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},Hu.prototype.encode=function(t,e,i){t=w(t)?String(t):t;return this.initValue(t,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},Hu.prototype.initValue=function(){},Hu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},Hu.prototype.addData=function(){},Hu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e(s=Hu,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Nu,Uu=Object.assign,jn;function Gu(){Nu.apply(this,arguments)}(Nu=s)&&(Gu.__proto__=Nu),((Gu.prototype=Object.create(Nu&&Nu.prototype)).constructor=Gu).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),Uu(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"})},Gu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Gu.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()},Gu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Gu.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength&&(i=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=i,this.addPattern(this.characterMap[i]))},Gu.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},Gu.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},Gu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Gu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Gu.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},e(jn=Gu,{addCheckSum:!0});var Wu,Xu,Yu=Object.assign,tt,Dn;function qu(){Wu.apply(this,arguments)}function Zu(){Xu.apply(this,arguments)}(Xu=s)&&(Zu.__proto__=Xu),((Zu.prototype=Object.create(Xu&&Xu.prototype)).constructor=Zu).prototype.initProperties=function(){Xu.prototype.initProperties.call(this),Yu(this,{minBaseUnitLength:.7})},Zu.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()},Zu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Zu.prototype.addBase=function(){},(Wu=tt=Zu)&&(qu.__proto__=Wu),((qu.prototype=Object.create(Wu&&Wu.prototype)).constructor=qu).prototype.initProperties=function(){Wu.prototype.initProperties.call(this),Yu(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"}}})},qu.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},qu.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&i<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw o=Math.ceil(this.getBaseWidth(i)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+o+"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))},qu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},qu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},qu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},qu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},qu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},qu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},qu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},e(Dn=qu,{addCheckSum:!1});var Qu,Ku,$u,Ju,td,ed,id,od,rd,nd,sd,ad={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,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];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 i=[],o=0;o<this.specialAsciiCodes[t].length;o++)i.push(this.characterMap[this.shiftCharacters[3]]),i.push(this.characterMap[this.specialAsciiCodes[t][o]]);else e=6*Math.floor(t/32)+(t-27)%32+64,i=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return i}],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"]},p=((ed=Dn)&&(_d.__proto__=ed),((_d.prototype=Object.create(ed&&ed.prototype)).constructor=_d).prototype.initProperties=function(){ed.prototype.initProperties.call(this),O(this,ad,{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}}})},_d),hd=Object.assign;(td=tt)&&(xd.__proto__=td),((xd.prototype=Object.create(td&&td.prototype)).constructor=xd).prototype.initProperties=function(){td.prototype.initProperties.call(this),hd(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"}})},xd.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},xd.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.")},xd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},xd.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},xd.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},xd.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},xd.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},xd.prototype._getCheckValues=function(){for(var t,e=this.values,i=e.length,o=0,r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r,this.cCheckSumTotal);for(t=o%this.checkSumMod,o=this.weightedValue(t,1,this.kCheckSumTotal),r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r+1,this.kCheckSumTotal);return[t,o%this.checkSumMod]},xd.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},xd.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},xd.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)};var c,t=((Ju=c=xd)&&(md.__proto__=Ju),((md.prototype=Object.create(Ju&&Ju.prototype)).constructor=md).prototype.initProperties=function(){Ju.prototype.initProperties.call(this),O(this,ad,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,i=0;i<t.length;i++)e=t[i],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},md),ld=/^\d+$/,pd=Object.assign,h=(($u=s)&&(vd.__proto__=$u),((vd.prototype=Object.create($u&&$u.prototype)).constructor=vd).prototype.initProperties=function(){$u.prototype.initProperties.call(this),pd(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},vd.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},vd.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()},vd.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},vd.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},vd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},vd.prototype.validate=function(t){if(ld.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(",")+".")},vd.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},vd),cd=/^\d+$/,ud=/^[a-z0-9]+$/i,dd=Object.assign;(Ku=M.Class)&&(yd.__proto__=Ku),((yd.prototype=Object.create(Ku&&Ku.prototype)).constructor=yd).prototype.initProperties=function(){},yd.prototype.addStart=function(){},yd.prototype.is=function(){},yd.prototype.isCode=function(){return!1},yd.prototype.move=function(){},yd.prototype.pushState=function(){};var zn,l=((Qu=zn=yd)&&(gd.__proto__=Qu),((gd.prototype=Object.create(Qu&&Qu.prototype)).constructor=gd).prototype.initProperties=function(){Qu.prototype.initProperties.call(this),O(this,{FNC4:"FNC4",SHIFT:98})},gd.prototype.addStart=function(){this.encoding.addPattern(this.START)},gd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},gd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},gd.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;for(u("C",i)&&(i=o.substr(t.index).match(/\d{4,}/g))&&(r=o.indexOf(i[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},gd.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)},gd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},gd.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},gd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},gd),fd={};function gd(t,e){Qu.call(this,t),this.states=e,this._initMoves(e)}function yd(t){Ku.call(this),this.encoding=t,this.initProperties()}function vd(){$u.apply(this,arguments)}function md(){Ju.apply(this,arguments)}function xd(){td.apply(this,arguments)}function _d(){ed.apply(this,arguments)}function bd(t,e){id.call(this,t),this.states=e}function wd(t,e){od.call(this,t),this._initSubStates(e)}function kd(){rd.apply(this,arguments)}function Ad(){nd.apply(this,arguments)}function Sd(){sd.apply(this,arguments)}fd.A=((sd=l)&&(Sd.__proto__=sd),((Sd.prototype=Object.create(sd&&sd.prototype)).constructor=Sd).prototype.initProperties=function(){sd.prototype.initProperties.call(this),dd(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Sd.prototype.isCode=function(t){return 0<=t&&t<96},Sd.prototype.getValue=function(t){return t<32?t+64:t-32},Sd),fd.B=((nd=l)&&(Ad.__proto__=nd),((Ad.prototype=Object.create(nd&&nd.prototype)).constructor=Ad).prototype.initProperties=function(){nd.prototype.initProperties.call(this),dd(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Ad.prototype.isCode=function(t){return 32<=t&&t<128},Ad.prototype.getValue=function(t){return t-32},Ad),fd.C=((rd=zn)&&(kd.__proto__=rd),((kd.prototype=Object.create(rd&&rd.prototype)).constructor=kd).prototype.initProperties=function(){rd.prototype.initProperties.call(this),dd(this,{key:"C",MOVE:99,START:105})},kd.prototype.addStart=function(){this.encoding.addPattern(this.START)},kd.prototype.is=function(t,e){var i=Dd(t,e,4);return(e+4<=t.length||2===t.length)&&cd.test(i)},kd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},kd.prototype.pushState=function(t){for(var e;(e=Dd(t.value,t.index,2))&&cd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},kd.prototype.getValue=function(t){return t},kd),fd.FNC4=((od=zn)&&(wd.__proto__=od),((wd.prototype=Object.create(od&&od.prototype)).constructor=wd).prototype.initProperties=function(){od.prototype.initProperties.call(this),dd(this,{key:"FNC4",dependentStates:["A","B"]})},wd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},wd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},wd.prototype.isCode=function(t){return 128<=t&&t<256},wd.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},wd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},wd.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},wd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},wd.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]},wd.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},wd),fd.FNC1=((id=zn)&&(bd.__proto__=id),((bd.prototype=Object.create(id&&id.prototype)).constructor=bd).prototype.initProperties=function(){id.prototype.initProperties.call(this),dd(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})},bd.prototype.addStart=function(){this.encoding[this.startState].addStart()},bd.prototype.is=function(){return u(this.key,this.states)},bd.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,h={state:this.startState};for(r.addPattern(this.START);;){if((e=(h.index=0)<(o=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(h.value=n.substring(a,i).replace(s,""),this.validate(e,h.value),r.pushData(h,this.dependentStates),i>=n.length)break;a=i,h.state!==this.startState&&(r[this.startState].move(h),h.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},bd.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!cd.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!ud.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},bd.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=Dd(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},bd.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},bd.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,e),t=t.substring(e+1,i),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},bd.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&u(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},bd),(Ld=s)&&(jd.__proto__=Ld),((jd.prototype=Object.create(Ld&&Ld.prototype)).constructor=jd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),dd(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})},jd.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new fd[this.states[t]](this,this.states)},jd.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},jd.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())},jd.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var i;t.shifted?(i=t.state,t.state=t.previousState,t.previousState=i,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},jd.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},jd.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},jd.prototype.addStop=function(){this.addPattern(this.STOP)},jd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},jd.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},jd.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))};var Cd,Pd,Td,Md,Od,Ld,i,tt=((Od=i=jd)&&(zd.__proto__=Od),((zd.prototype=Object.create(Od&&Od.prototype)).constructor=zd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),dd(this,{name:"Code 128 A",states:["A"]})},zd),l=((Md=i)&&(Vd.__proto__=Md),((Vd.prototype=Object.create(Md&&Md.prototype)).constructor=Vd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),dd(this,{name:"Code 128 B",states:["B"]})},Vd),zn=((Td=i)&&(Rd.__proto__=Td),((Rd.prototype=Object.create(Td&&Td.prototype)).constructor=Rd).prototype.initProperties=function(){Td.prototype.initProperties.call(this),dd(this,{name:"Code 128 C",states:["C"]})},Rd),Id=((Pd=i)&&(Ed.__proto__=Pd),((Ed.prototype=Object.create(Pd&&Pd.prototype)).constructor=Ed).prototype.initProperties=function(){Pd.prototype.initProperties.call(this),dd(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Ed),i=((Cd=i)&&(Bd.__proto__=Cd),((Bd.prototype=Object.create(Cd&&Cd.prototype)).constructor=Bd).prototype.initProperties=function(){Cd.prototype.initProperties.call(this),dd(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},Bd);function Bd(){Cd.apply(this,arguments)}function Ed(){Pd.apply(this,arguments)}function Rd(){Td.apply(this,arguments)}function Vd(){Md.apply(this,arguments)}function zd(){Od.apply(this,arguments)}function jd(t){Ld.call(this,t),this._initStates()}function Dd(t,e,i){return t.substring(e,e+i)}var Fd,Hd,Nd,Ud,Gd,Wd,Xd,Yd=Object.assign;(Xd=s)&&(cf.__proto__=Xd),((cf.prototype=Object.create(Xd&&Xd.prototype)).constructor=cf).prototype.initProperties=function(){Xd.prototype.initProperties.call(this),Yd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:$d})},cf.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},cf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},cf.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()},cf.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},cf.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},cf.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 qd,Zd=((Wd=qd=cf)&&(pf.__proto__=Wd),((pf.prototype=Object.create(Wd&&Wd.prototype)).constructor=pf).prototype.initProperties=function(){Wd.prototype.initProperties.call(this),Yd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},pf),Qd=((Gd=qd)&&(lf.__proto__=Gd),((lf.prototype=Object.create(Gd&&Gd.prototype)).constructor=lf).prototype.initProperties=function(){Gd.prototype.initProperties.call(this),Yd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},lf),Kd=((Ud=qd)&&(hf.__proto__=Ud),((hf.prototype=Object.create(Ud&&Ud.prototype)).constructor=hf).prototype.initProperties=function(){Ud.prototype.initProperties.call(this),Yd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},hf),qd=((Nd=qd)&&(af.__proto__=Nd),((af.prototype=Object.create(Nd&&Nd.prototype)).constructor=af).prototype.initProperties=function(){Nd.prototype.initProperties.call(this),Yd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},af),$d={Modulo10:function(t){for(var e,i,o=[0,""],r=t.length%2,n=0;n<t.length;n++)o[(n+r)%2]+=parseInt(t.charAt(n),10);for(i=o[0],e=(2*o[1]).toString(),n=0;n<e.length;n++)i+=parseInt(e.charAt(n),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%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))}},Jd=Object.assign,s=((Hd=s)&&(sf.__proto__=Hd),((sf.prototype=Object.create(Hd&&Hd.prototype)).constructor=sf).prototype.initProperties=function(){Hd.prototype.initProperties.call(this),Jd(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]}})},sf.prototype.initValue=function(t,e,i){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=i,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},sf.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)},sf.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},sf.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},sf.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},sf),tf=Object.assign,ef=((Fd=s)&&(nf.__proto__=Fd),((nf.prototype=Object.create(Fd&&Fd.prototype)).constructor=nf).prototype.initProperties=function(){Fd.prototype.initProperties.call(this),tf(this,{name:"EAN 8"})},nf.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,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)},nf),of={code11:jn,code39:Dn,code39extended:p,code93:c,code93extended:t,code128:Id,code128a:tt,code128b:l,code128c:zn},rf,jn;function nf(){Fd.apply(this,arguments)}function sf(){Hd.apply(this,arguments)}function af(){Nd.apply(this,arguments)}function hf(){Ud.apply(this,arguments)}function lf(){Gd.apply(this,arguments)}function pf(){Wd.apply(this,arguments)}function cf(){Xd.apply(this,arguments)}function uf(t,e){var i=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=i,e}function df(t,e,i){void 0===i&&(i=Ee),rf.call(this),this.options=O({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&w(e.value)&&this.redraw()}of["gs1-128"]=i,of.msimod10=Zd,of.msimod11=Qd,of.msimod1010=Kd,of.msimod1110=qd,of.postnet=h,of.ean8=ef,of.ean13=s,(rf=M.Class)&&(df.__proto__=rf),((df.prototype=Object.create(rf&&rf.prototype)).constructor=df).prototype.destroy=function(){this._destroySurface()},df.prototype._initElement=function(){_t(this.element,"k-barcode")},df.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},df.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},df.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},df.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},df.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},df.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},df.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)},df.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},df.prototype._resize=function(){this.redraw()},df.prototype.createVisual=function(){this.visual=this._render()},df.prototype._render=function(){var t,e=this.options,i=e.value,o=e.text,r=zt(o.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new R(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),l=new M.drawing.Group;this.contentBox=s,l.append(this._getBackground(n)),o.visible&&(h-=M.drawing.util.measureText(i,{font:o.font}).height+r.top+r.bottom);try{t=a.encode(i,s.width(),h)}catch(t){return this.onError(t),l}return o.visible&&(n=i,e.checksum&&w(a.checksum)&&(n+=" "+a.checksum),l.append(this._getText(n))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),l.append(this._bandsGroup),l},df.prototype.exportVisual=function(){return this._render()},df.prototype._getSize=function(){var t=uf(this.element,this.options.renderAs),e=new M.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},df.prototype.value=function(t){if(!w(t))return this.options.value;this.options.value=String(t),this.redraw()},df.prototype._getBands=function(t,e){for(var i=this.contentBox,o=i.x1,r=new M.drawing.Group,n=0;n<t.length;n++){var s,a=(s=Bt(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=M.geometry.Rect.fromPoints(new M.geometry.Point(o,s.y1+i.y1),new M.geometry.Point(o+a,s.y2+i.y1)),s=M.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),o+=a}return r},df.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new R(0,0,t.width,t.height).unpad(i.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},df.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new I_(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},df.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),!of[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new of[this.type],this.options=O({},this.options,t)},e(jn=df,{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 b0=jn;var ff={width:500,height:100};const w0=function(t,e){if(void 0===e&&(e=ff),!t)throw new Error("Please specify barcode type to validate.");var i,o,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),of[n])return i=new of[n],o=e,r=s,function(t){try{i.encode(r+t,o.width,o.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var gf=Object.assign;function yf(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function vf(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function mf(t){return parseInt(t,2)}(Sf=M.Class)&&(Vf.__proto__=Sf),((Vf.prototype=Object.create(Sf&&Sf.prototype)).constructor=Vf).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Vf.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}},Vf.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var xf,_f,bf,wf,kf,Af,Sf,Cf=Vf,Pf=((Af=M.Class)&&(Rf.__proto__=Af),(Rf.prototype=Object.create(Af&&Af.prototype)).constructor=Rf),Tf=((kf=M.Class)&&(Ef.__proto__=kf),((Ef.prototype=Object.create(kf&&kf.prototype)).constructor=Ef).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],i=0,o=n;for(e.push(dg(o,ig,og,rg,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=dg(o,ng,sg,ag,t);r.mode!==t?(t=r.mode,e.push(r),i++):e[i].modeString+=r.modeString,o=o.substr(r.modeString.length)}return e}(),t=fg(function(t){for(var e=0,i=0;i<t.length;i++)e+=Mf[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var i="",o=0;o<t.length;o++)i+=Mf[t[o].mode].encode(t[o].modeString,e);return i}(e,t);return new Pf(e,t)},Ef);(wf=M.Class)&&(Bf.__proto__=wf),((Bf.prototype=Object.create(wf&&wf.prototype)).constructor=Bf).prototype.initProperties=function(){gf(this,{modeIndicator:"",bitsInCharacterCount:[]})},Bf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},Bf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},Bf.prototype.getModeCountString=function(t,e){return this.modeIndicator+vf(t,this.getBitsCharacterCount(e))},Bf.prototype.encode=function(){},Bf.prototype.getStringBitsLength=function(){},Bf.prototype.getValue=function(){};var Dn,p=((bf=Dn=Bf)&&(If.__proto__=bf),((If.prototype=Object.create(bf&&bf.prototype)).constructor=If).prototype.initProperties=function(){bf.prototype.initProperties.call(this),gf(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},If.prototype.getValue=function(t){return parseInt(t,10)},If.prototype.encode=function(t,e){for(var i=yf(t,3),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=vf(i[r],10);return o+vf(i[r],1+3*i[r].length)},If.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0==i?0:1)},If),c=((_f=Dn)&&(Lf.__proto__=_f),((Lf.prototype=Object.create(_f&&_f.prototype)).constructor=Lf).prototype.initProperties=function(){_f.prototype.initProperties.call(this),gf(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"})},Lf.prototype.getValue=function(t){return this.characters[t]},Lf.prototype.encode=function(t,e){for(var i=yf(t,2),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=vf(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+vf(2===i[r].length?45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)):this.getValue(i[r].charAt(0)),1+5*i[r].length)},Lf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},Lf),t=((xf=Dn)&&(Of.__proto__=xf),((Of.prototype=Object.create(xf&&xf.prototype)).constructor=Of).prototype.initProperties=function(){xf.prototype.initProperties.call(this),gf(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},Of.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+'".')},Of.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=vf(this.getValue(t.charAt(o)),8);return i},Of.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},Of),Mf={};function Of(){xf.apply(this,arguments)}function Lf(){_f.apply(this,arguments)}function If(){bf.apply(this,arguments)}function Bf(){wf.call(this),this.initProperties()}function Ef(){kf.apply(this,arguments)}function Rf(t,e){Af.call(this),this.dataString=t,this.version=e}function Vf(t){Sf.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}Mf.numeric=new p,Mf.alphanumeric=new c,Mf.byte=new t,(zf=M.Class)&&(lg.__proto__=zf),((lg.prototype=Object.create(zf&&zf.prototype)).constructor=lg).prototype.initProperties=function(){gf(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},lg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=fg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new Pf(t,e)},lg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},lg.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},lg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=vf(t,8);else{for(var e=8-e,r=0;r<i;r++)o=vf(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},lg.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1};var zf,jf=lg,Df=[{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}}],Ff="numeric",Hf="alphanumeric",Nf="byte",Uf={1:0},Gf={0:1},Wf={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},Xf=[1,0,1,1,1],Yf=[1,0,1],qf={L:"01",M:"00",Q:"11",H:"10"},Zf=["11101100","00010001"],Qf=93,Kf=[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}],$f=/^\d+/,Id="A-Z0-9 $%*+./:-",Jf=new RegExp("^[A-Z $%*+./:-]+"),tg=new RegExp("^["+Id+"]+"),eg=new RegExp("^[^"+Id+"]+"),ig=8,og=5,rg=8,ng=17,sg=9,ag=16,hg=[[1,0],[1,25,0]];function lg(){zf.call(this),this.initProperties(),this.mode=Mf[this.encodingMode]}function pg(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function cg(t,e,i,o){for(var r=0;r<Kf.length;r++)t[r][i][o]=Kf[r](i,o)?1^e:parseInt(e,10)}function ug(t,e){for(var i,o=hg[e-1],r=new Array(e).concat(t),n=new Array(r.length-o.length).concat(o),s=t.length,a=[],h=0;h<s;h++)i=function(t,e){for(var i=[],o=t.length-1;i[o]=Gf[(t[o]+e)%255],void 0!==t[--o];);return i}(n,Uf[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var i=[],o=t.length-2;0<=o;o--)i[o]=t[o]^e[o];return i}(i,r);for(h=r.length-1;0<=h;h--)a[e-1-h]=vf(r[h],8);return a}function dg(t,e,i,o,r){var n,s=$f.exec(t),s=s?s[0]:"",a=Jf.exec(t),a=a?a[0]:"",h=tg.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!tg.test(t.charAt(s.length)))?(n=Ff,s):h&&(t.length===h.length||h.length>=o||r===Hf)?(n=Hf,s||a):(n=Nf,h?h+eg.exec(t.substring(h.length))[0]:eg.exec(t)[0]);return{mode:n,modeString:e}}function fg(t,e){for(var i=0,o=Df.length-1,r=Math.floor(Df.length/2);t<Df[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=Df[i][e].totalDataCodewords?r+1:o+1}function gg(t,e,i){var o=mf(e),e=e.length-1,r=t<<e;return vf(t,i-e)+vf(function(t,e){for(var i=e.toString(2).length,o=t.toString(2).length,r=t;i<=(o=(r^=e<<o-i).toString(2).length););return r}(r,o),e)}function yg(t,e){return parseInt(t.charAt(e),10)}function vg(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&pg(t,yg(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&pg(t,yg(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)pg(t,yg(e,r-1-o++),n,s);for(pg(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)pg(t,yg(e,r-1-o++),n,s)}function mg(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,h=0;h<e.length;h++)i=Math.floor(h/3),o=h%3,pg(t,r=yg(e,e.length-h-1),0+i,s+o),pg(t,r,a+o,0+i)}function xg(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var h=a;h<n-a;h++)pg(t,r=e[a],i+h,o+a),pg(t,r,i+a,o+h),pg(t,r,i+s-h,o+s-a),pg(t,r,i+s-a,o+s-h)}function _g(t,e,i,o){for(var r=i,n=o,s=t[0];pg(t,0,r,o),pg(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function bg(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,e[t][o]===Qf&&(i[t]+=40)}function wg(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function kg(t,e,i){var i=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?jf:Tf)).getEncodingResult(t,e),r=i.version,n=Df[r-1][e],t=function(t,e){for(var i,o=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var h=s[a][0],l=0;l<h;l++){for(var p=s[a][1],c=[],u=[],d=1;d<=p;d++)i=t.substring(o,o+8),c.push(i),u[p-d]=mf(i),o+=8;r.push(c),n.push(ug(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,i=0,o=0,r=t;r.length<e&&i<4;)r+="0000".charAt(i++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=Zf[o],o^=1;return r}(i.dataString),n),i=function(){for(var t=[],e=17+4*r,i=0;i<Kf.length;i++){t[i]=new Array(e);for(var o=0;o<e;o++)t[i][o]=new Array(e)}return t}(),o=(p=(s=i)[0].length,xg(s,Xf,0,0),_g(s,[-1,-1],7,7),xg(s,Xf,p-7,0),_g(s,[1,-1],p-8,7),xg(s,Xf,0,p-7),_g(s,[-1,1],7,p-8),i),s=r;if(!(s<2)){var a,h=o[0],l=h.length,p=Math.floor(s/7),c=[6],u=0;for((s=Wf[s])?a=(l-13-s)/p:s=a=(l-13)/(p+1),c.push(c[u++]+s);c[u]+a<l;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===h[c[d]][c[f]]&&xg(o,Yf,c[d]-2,c[f]-2)}for(var g=i,y=1,v=g[0].length,m=8;m<v-8;m++)pg(g,y,6,m),pg(g,y,m,6),y^=1;7<=r&&mg(i,vf(0,18)),vg(i,vf(0,15));for(var x,_,b,w=i,k=t,A=new Cf(w[0]),S=0;S<k.length;S++)for(x=k[S],_=0;0<x.length;){for(var C=0;C<x.length;C++)for(var P=0;P<8;P++)b=A.getNextCell(),cg(w,x[C][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=A.getNextRemainderCell();)cg(w,0,b.row,b.column);p=function(t){for(var e,i=[],o=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)s[h]=[r[h]=i[h]=0,0],n[h]=[0,0],o[h]=[];for(var l=0;l<a;l++)for(var p=0;p<a;p++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[l][p],10),o[c][0]===e[l][p]&&l+1<a&&0<=p-1&&e[l+1][p]===o[c][0]&&e[l+1][p-1]===o[c][0]&&(i[c]+=3),bg(c,n,i,0,e[l][p]),bg(c,n,i,1,e[p][l]),wg(c,i,o,e[l][p],s,0),wg(c,i,o,e[p][l],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<i.length;h++)i[h]+=(d=r[h],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)),i[h]<v&&(v=i[h],u=h);return u}(i),s=i[p];return 7<=r&&mg([s],gg(r,"1111100100101",18)),vg([s],function(t){var e="";if(0===mf(t))return"101010000010010";for(var i=gg(mf(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e}(qf[e]+vf(p,3))),s}for(var Ag,Sg=1;Sg<255;Sg++)255<(Ag=2*Gf[Sg-1])&&(Ag^=285),Gf[Sg]=Ag,Uf[Ag]=Sg;Ag=2*Gf[Sg-1]^285,Gf[Sg]=Ag,Gf[-1]=0;for(var Cg=2;Cg<=68;Cg++){var Pg=hg[Cg-1];hg[Cg]=function(t,e){for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)i[o+r]=void 0===i[o+r]?(t[o]+(0<=e[r]?e[r]:0))%255:Uf[Gf[i[o+r]]^Gf[(t[o]+e[r])%255]];return i}(Pg,[Cg,0])}var Tg,Mg=Math.round,Og=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Lg=[[0,1],[1,1],[1,0]],tt;function Ig(t,e,i){void 0===i&&(i=Ee),Tg.call(this),this.options=O({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)}(Tg=M.Class)&&(Ig.__proto__=Tg),((Ig.prototype=Object.create(Tg&&Tg.prototype)).constructor=Ig).prototype.destroy=function(){this._destroySurface()},Ig.prototype._initElement=function(){_t(this.element,"k-qrcode")},Ig.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Ig.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Ig.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Ig.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Ig.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Ig.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},Ig.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,i={width:0,height:0};return 0<e&&(i.width=e),t&&(i.height=t),i},Ig.prototype._resize=function(){this.redraw()},Ig.prototype.createVisual=function(){this.visual=this._render()},Ig.prototype.exportVisual=function(){return this._render()},Ig.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,h=s.width||0,l=(s.width=h,new M.drawing.Group);try{n&&(i=kg(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(h+a),t=this._calculateBaseUnit(r,i.length),e=h+a+(r-i.length*t)/2,l.append(this._renderBackground(o,s)),l.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?l.append(this._renderLogo(o,t)):this._isSwiss()&&l.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return l},Ig.prototype._renderLogo=function(t,e){var t=Mg(t/2),e=this._getLogoSize(7*e),i=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new M.geometry.Rect(new M.geometry.Point(t.x,t.y),new M.geometry.Size(e.width,e.height));return new M.drawing.Image(i,t)},Ig.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,t=t/2,n={},s=new M.drawing.Group;return n.x=n.y=Math.ceil(t-e-i/2),s.append(this._renderShape(n,Math.ceil(i+2*e),Lg,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,Lg,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,Og,"#fff")),s},Ig.prototype._renderShape=function(t,e,i,o){var r=new M.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},Ig.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=uf(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},Ig.prototype._calculateBaseUnit=function(t,e){var i,o=Math.floor(t/e);return o<1?(i=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))):t<=o*e&&1<=o-1&&o--,o},Ig.prototype._renderMatrix=function(t,e,i){for(var o=new M.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+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=Mg(i+a*e),h=Mg(n),l=Mg(i+s*e),p=Mg(n+e);o.moveTo(a,h).lineTo(a,p).lineTo(l,p).lineTo(l,h).close()}}return o},Ig.prototype._renderBackground=function(t,e){t=new R(0,0,t,t).unpad(e.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},Ig.prototype.setOptions=function(t){this.options=gf(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},Ig.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},Ig.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},Ig.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},Ig.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},e(tt=Ig,{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 k0=tt,A0=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{kg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var Bg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Eg(t){return t*t}var Rg,Vg,zg=Math,jg=zg.abs,Dg=zg.atan,Fg=zg.atan2,Hg=zg.cos,Ng=zg.sin,Ug=zg.tan,Gg=((Vg=M.Class)&&(ry.__proto__=Vg),((ry.prototype=Object.create(Vg&&Vg.prototype)).constructor=ry).prototype.initProperties=function(){O(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},ry.prototype.toArray=function(){return[this.lat,this.lng]},ry.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},ry.prototype.clone=function(){return new ry(this.lat,this.lng)},ry.prototype.round=function(t){return this.lng=L(this.lng,t),this.lat=L(this.lat,t),this},ry.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},ry.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},ry.prototype.destination=function(t,e,i){var e=ue(e),i=i||Bg.WGS84,o=ue(this.lat),r=ue(this.lng),t=t/i.a,i=zg.asin(Ng(o)*Hg(t)+Hg(o)*Ng(t)*Hg(e)),r=r+Fg(Ng(e)*Ng(t)*Hg(o),Hg(t)-Ng(o)*Ng(i));return new ry(re(i),re(r))},ry.prototype.greatCircleTo=function(t,e){var i=ry.create(void 0),e=e||Bg.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,r,n=e.a,s=e.b,a=e.f,h=ue(i.lng-this.lng),e=Dg((1-a)*Ug(ue(this.lat))),l=Ng(e),p=Hg(e),e=Dg((1-a)*Ug(ue(i.lat))),c=Ng(e),u=Hg(e),d=h,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Ng(d),v=Hg(d),m=zg.sqrt(Eg(u*y)+Eg(p*c-l*u*v)),x=Fg(m,r=l*c+p*u*v),_=p*u*y/m,b=0,w=(0!=(o=1-Eg(_))&&(b=r-2*l*c/o),d),k=a/16*o*(4+a*(4-3*o)),d=h+(1-k)*a*_*(x+k*m*(b+k*r*(2*Eg(b)-1))),g=jg(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(Eg(n)-Eg(s))/Eg(s),e=1+i/16384*(4096+i*(i*(320-175*i)-768)),n=i/1024*(256+i*(i*(74-47*i)-128)),i=n*m*(b+n/4*(r*(2*Eg(b)-1)-n/6*b*(4*Eg(m)-3)*(4*Eg(b)-3))),n=Fg(u*y,p*c-l*u*v),A=Fg(p*y,-l*u+p*c*v);return{distance:L(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:re(n),azimuthTo:re(A)}},ry.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},ry.fromLngLat=function(t){return new ry(t[1],t[0])},ry.fromLatLng=function(t){return new ry(t[0],t[1])},ry.create=function(t,e){if(w(t))return t instanceof ry?t.clone():1===arguments.length&&2===t.length?ry.fromLatLng(t):new ry(t,e)},ry),Wg=Math,Xg=Wg.atan,Yg=Wg.exp,qg=Wg.pow,Zg=Wg.sin,Qg=Wg.log,Kg=Wg.tan,$g=M.geometry.Point,Jg=Wg.PI,ty=Jg/2,ey=Jg/4,iy=Jg/180,l=Bg.WGS84,zn;function oy(t){Rg.call(this),this.initProperties(),this._initOptions(t)}function ry(t,e){Vg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}function ny(t,e){return t.bind(e)}function sy(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ay(t,e){e.insertBefore(t,e.firstChild)}function hy(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function ly(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}function py(t,e){var i=t.prototype;i.events?e.forEach(function(t){i.events.indexOf(t)<0&&i.events.push(t)}):i.events=e}function cy(t){var e=[];if(t)for(var i=hy(t).split("-"),o=0;o<i.length;o++)e.push("k-pos-"+i[o]);return e.join(" ")}(Rg=M.Class)&&(oy.__proto__=Rg),((oy.prototype=Object.create(Rg&&Rg.prototype)).constructor=oy).prototype._initOptions=function(t){this.options=O({},this.options,t)},oy.prototype.initProperties=function(){O(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},oy.prototype.forward=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,r=x(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?x(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=ue(e-i)*o,e=this._projectLat(r);return new $g(t,e)},oy.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=ue(t),o=Kg(ey+t/2),t=i*Zg(t),t=qg((1-t)/(1+t),i/2);return e*Qg(o*t)},oy.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,o=t.x/(iy*o)+i,i=x(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=x(o,-this.MAX_LNG,this.MAX_LNG)),new Gg(i,o)},oy.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=Yg(-t/i),s=ty-2*Xg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=o*Zg(s),h=qg((1-h)/(1+h),r),h=ty-2*Xg(n*h)-s;if(s+=h,Wg.abs(h)<=this.INVERSE_CONVERGENCE)break}return re(s)},e(zn=oy,{centralMeridian:0,datum:l}),(fy=zn)&&(by.__proto__=fy),((by.prototype=Object.create(fy&&fy.prototype)).constructor=by).prototype.initProperties=function(){fy.prototype.initProperties.call(this),O(this,{MAX_LAT:85.0511287798})},by.prototype._projectLat=function(t){var e=this.options.datum.a,t=ue(t),t=Kg(ey+t/2);return e*Qg(t)},by.prototype._inverseY=function(t){var e=this.options.datum.a,t=Yg(-t/e);return re(ty-2*Xg(t))};var uy,dy,fy,gy=by,yy=((dy=M.Class)&&(_y.__proto__=dy),((_y.prototype=Object.create(dy&&dy.prototype)).constructor=_y).prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},_y.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},_y),vy=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),my=((uy=__)&&(xy.__proto__=uy),((xy.prototype=Object.create(uy&&uy.prototype)).constructor=xy).prototype._initOptions=function(t){this.options=O({},this.options,t)},xy.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},xy.prototype.add=function(t){var e=t;w(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},xy.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},xy.prototype.clear=function(){this.items=[],sy(this.element)},xy.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],i=this._itemText(i);""!==i&&t.push(i)}if(0<t.length){sy(this.element);var o=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=o;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},xy.prototype.hideElement=function(){this.element.style.display="none"},xy.prototype.showElement=function(){this.element.style.display=""},xy.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},xy.prototype._inZoomLevel=function(t,e){t=_(t,-Number.MAX_VALUE),e=_(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},xy.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},xy);function xy(t,e){uy.call(this),this.element=t,this._initOptions(e),this.items=[],_t(this.element,"k-widget k-attribution")}function _y(){dy.call(this);var t=this._proj=new gy,t=this.c=2*Jg*t.options.datum.a;this._tm=M.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=M.geometry.transform().scale(t,-t).translate(-.5,-.5)}function by(){fy.apply(this,arguments)}e(my,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var wy={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 ky(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+wy[t].className+'" aria-label="move '+t+'">'+we({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return vy(t)}(Ay=__)&&(Cy.__proto__=Ay),((Cy.prototype=Object.create(Ay&&Ay.prototype)).constructor=Cy).prototype.destroy=function(){this.dispose()},Cy.prototype.dispose=function(){Ge(this._keyroot,"keydown",this._keydownHandler)},Cy.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Cy.prototype._initOptions=function(t){this.options=O({},this.options,t)},Cy.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},Cy.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},Cy.prototype._keydown=function(t){switch(t.which){case m_.UP:this._pan(0,1),t.preventDefault();break;case m_.DOWN:this._pan(0,-1),t.preventDefault();break;case m_.RIGHT:this._pan(1,0),t.preventDefault();break;case m_.LEFT:this._pan(-1,0),t.preventDefault()}};var Ay,Sy=Cy;function Cy(t,e){Ay.call(this),this.element=t,this._initOptions(e);var t=ky("up",e.icons),i=ky("right",e.icons),o=ky("down",e.icons),e=ky("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(i),this.element.appendChild(o),this.element.appendChild(e),_t(this.element,"k-widget k-navigator"),Ue(this.element,"click",".k-button",ny(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=ny(this._keydown,this),Ue(this._keyroot,"keydown",this._keydownHandler)}function Py(t,e,i){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+'">'+we({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return vy(t)}e(Sy,{name:"Navigator",panStep:1}),py(Sy,["pan"]),(Ty=__)&&(Oy.__proto__=Ty),((Oy.prototype=Object.create(Ty&&Ty.prototype)).constructor=Oy).prototype.destroy=function(){this.element&&Ge(this.element,"click",this._clickHandler),this._keyroot&&Ge(this._keyroot,"keydown",this._keydownHandler)},Oy.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Oy.prototype._initOptions=function(t){this.options=O({},this.options,t)},Oy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Oy.prototype._click=function(t){var e=1;Xt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Oy.prototype._keydown=function(t){switch(t.which){case m_.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case m_.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var Ty,My=Oy;function Oy(t,e,i){Ty.call(this),this.element=t,this._initOptions(e);t=Py("in","plus",i),e=Py("out","minus",i),this.element.appendChild(t),this.element.appendChild(e),this.element.setAttribute("role","group"),_t(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Ue(this.element,"click",".k-button",this._clickHandler),i=this.element.parentNode.closest("[data-role]");this._keyroot=i||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Ue(this._keyroot,"keydown",this._keydownHandler)}e(My,{name:"ZoomControl",zoomStep:1}),py(My,["change"]);var Ly,Iy,i,By=(i=Math).max,Ey=i.min,Ry=((Iy=M.Class)&&(Dy.__proto__=Iy),Zd={World:{configurable:!0}},((Dy.prototype=Object.create(Iy&&Iy.prototype)).constructor=Dy).prototype.contains=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),r=_(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},Dy.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new Gg(e,i)},Dy.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},Dy.prototype.include=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),t=_(t.lat,t[0]);e.lng=Ey(e.lng,o),e.lat=By(e.lat,t),i.lng=By(i.lng,o),i.lat=Ey(i.lat,t)},Dy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Dy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Gg(t.lat,e.lng),se:this.se,sw:new Gg(e.lat,t.lng)}},Dy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Gg(t.lat,e.lng),e,new Gg(e.lat,t.lng)]},Dy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Dy.create=function(t,e){return t instanceof Dy?t:t&&e?new Dy(t,e):t&&4===t.length&&!e?new Dy([t[0],t[1]],[t[2],t[3]]):void 0},Zd.World.get=function(){return new Dy([90,-180],[-90,180])},Object.defineProperties(Dy,Zd),Dy),Vy="centerChange",zy=((Ly=M.Class)&&(jy.__proto__=Ly),Qd={anchor:{configurable:!0}},((jy.prototype=Object.create(Ly&&Ly.prototype)).constructor=jy).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)},jy.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},Qd.anchor.get=function(){return this._anchor},Qd.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}},jy.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(jy.prototype,Qd),jy);function jy(t,e){Ly.call(this),this.widgetService=t,this.options=O({},this.options,e),this.offset={x:0,y:0}}function Dy(t,e){Iy.call(this);t=Gg.create(t),e=Gg.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(zy,{border:{width:1},opacity:1}),(Fy=M.Class)&&(Gy.__proto__=Fy),((Gy.prototype=Object.create(Fy&&Fy.prototype)).constructor=Gy).prototype.destroy=function(){this._deactivate()},Gy.prototype._initOptions=function(t){this.options=O({},this.options,t)},Gy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Gy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Gy.prototype.reset=function(){this._beforeReset(),this._reset()},Gy.prototype._reset=function(){this._applyExtent()},Gy.prototype._beforeReset=function(){},Gy.prototype._resize=function(){},Gy.prototype._panEnd=function(){this._applyExtent()},Gy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!w(t.minZoom)||e>=t.minZoom,e=!w(t.maxZoom)||e<=t.maxZoom,t=Ry.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},Gy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Gy.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)},Gy.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)},Gy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Gy.prototype._readData=function(){return this.options.data||[]},Gy.prototype._hasData=function(){return this._data&&0<this._data.length},Gy.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Fy,Kd=Gy,Hy=Math,Ny=M.geometry.Point,Uy,qd;function Gy(t,e){Fy.call(this),this.support=We(),this._initOptions(e),this.map=t;e=document.createElement("div");_t(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 Wy(t){return Ot(t)?t:d_.compile(t)}function Xy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}function Yy(t,e){Uy.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)}(Uy=Kd)&&(Yy.__proto__=Uy),((Yy.prototype=Object.create(Uy&&Uy.prototype)).constructor=Yy).prototype.destroy=function(){Uy.prototype.destroy.call(this),this._view.destroy(),this._view=null},Yy.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Yy.prototype._reset=function(){Uy.prototype._reset.call(this),this._updateView(),this._view.reset()},Yy.prototype._viewType=function(){return Qy},Yy.prototype._activate=function(){Uy.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,M.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Yy.prototype._deactivate=function(){Uy.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Yy.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),i={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},Yy.prototype._resize=function(){this._render()},Yy.prototype._panEnd=function(t){Uy.prototype._panEnd.call(this,t),this._render()},Yy.prototype._render=function(){this._updateView(),this._view.render()},e(qd=Yy,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1}),(Zy=M.Class)&&(Jy.__proto__=Zy),((Jy.prototype=Object.create(Zy&&Zy.prototype)).constructor=Jy).prototype._initOptions=function(t){this.options=O({},this.options,t)},Jy.prototype.center=function(t){this._center=t},Jy.prototype.extent=function(t){this._extent=t},Jy.prototype.viewOrigin=function(t){this._viewOrigin=t},Jy.prototype.zoom=function(t){this._zoom=t},Jy.prototype.pointToTileIndex=function(t){return new Ny(Hy.floor(t.x/this.options.tileSize),Hy.floor(t.y/this.options.tileSize))},Jy.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,e=this.indexToPoint(e).translate(-i.x,-i.y);return{x:Hy.ceil((Hy.abs(e.x)+t.width)/this.options.tileSize),y:Hy.ceil((Hy.abs(e.y)+t.height)/this.options.tileSize)}},Jy.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}},Jy.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Ny(e*this.options.tileSize,t*this.options.tileSize)},Jy.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},Jy.prototype.destroy=function(){sy(this.element),this.pool.empty()},Jy.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},Jy.prototype.render=function(){for(var t,e,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw),r=0;r<i.x;r++)for(e=0;e<i.y;e++)(t=this.createTile({x:o.x+r,y:o.y+e})).visible||t.show()},Jy.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},Jy.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,o=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:new Ny(L((e=o).x),L(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},Jy.prototype.wrapIndex=function(t){var e=Hy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:x(t.y,0,e-1)}},Jy.prototype.wrapValue=function(t,e){var i=Hy.abs(t)%e;return 0<=t?i:e-(0==i?e:i)};var qy,Zy,Qy=Jy,Ky=((qy=M.Class)&&($y.__proto__=qy),(($y.prototype=Object.create(qy&&qy.prototype)).constructor=$y).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},$y.prototype._initOptions=function(t){this.options=O({},this.options,t)},$y.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),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},$y.prototype.show=function(){var t=this.element,e=(t.style.top=Xy(this.options.offset.y),t.style.left=Xy(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},$y.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},$y.prototype.url=function(){return Wy(this.options.urlTemplate)(this.urlOptions())},$y.prototype.errorUrl=function(){return Wy(this.options.errorUrlTemplate)(this.urlOptions())},$y.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}},$y);function $y(t,e){qy.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function Jy(t,e){Zy.call(this),this.element=t,this._initOptions(e),this.pool=new ev}e(Ky,{urlTemplate:"",errorUrlTemplate:""}),(tv=M.Class)&&(iv.__proto__=tv),((iv.prototype=Object.create(tv&&tv.prototype)).constructor=iv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},iv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},iv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},iv.prototype._create=function(t){for(var e,i=this._items,o=le(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new Ky(o,t),this._items.push(e)),e},iv.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);i<n&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))};var tv,ev=iv;function iv(){tv.call(this),this._items=[]}function ov(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}e(ev,{maxSize:100});var rv,nv,sv,av,hv,lv,pv,cv=Object.assign,uv="change",dv=((pv=__)&&(Cv.__proto__=pv),((Cv.prototype=Object.create(pv&&pv.prototype)).constructor=Cv).prototype.captureNext=function(){this.capture=!0},Cv.prototype.cancelCapture=function(){this.capture=!1},Cv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Cv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Cv),fv=((lv=__)&&(Sv.__proto__=lv),((Sv.prototype=Object.create(lv&&lv.prototype)).constructor=Sv).prototype.makeVirtual=function(){cv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Sv.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Sv.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Sv.prototype.forceEnabled=function(){this.forcedEnabled=!0},Sv.prototype.getSize=function(){return this.container[this.measure]},Sv.prototype.getTotal=function(){return this.element[this.scrollSize]},Sv.prototype.rescale=function(t){this.scale=t},Sv.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();0===i&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||r<o,t)||e.trigger(uv,e)},Sv),gv=((hv=__)&&(Av.__proto__=hv),((Av.prototype=Object.create(hv&&hv.prototype)).constructor=Av).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},Av.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},Av.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(uv)},Av),yv=((av=__)&&(kv.__proto__=av),((kv.prototype=Object.create(av&&av.prototype)).constructor=kv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},kv.prototype.dragMove=function(t){var e,i=this.dimension,o=this.axis,r=this.movable,n=r[o]+t;i.enabled&&(e=t,(n<i.min&&t<0||n>i.max&&0<t)&&(e*=this.resistance),r.translateAxis(o,e),this.trigger(uv,this))},kv),vv=((sv=M.Class)&&(wv.__proto__=sv),(wv.prototype=Object.create(sv&&sv.prototype)).constructor=wv),mv=((nv=__)&&(bv.__proto__=nv),((bv.prototype=Object.create(nv&&nv.prototype)).constructor=bv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},bv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},bv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},bv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},bv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},bv.prototype.moveTo=function(t){cv(this,t),this.refresh()},bv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=ov(t,e,this.scale))!==this.coordinates&&(this.element.style.transform=t,this._saveCoordinates(t),this.trigger(uv))},bv.prototype._saveCoordinates=function(t){this.coordinates=t},bv),xv=M.drawing.Group,h;function _v(t,e){rv.call(this,t,e),this._pan=ny(this._pan,this),this.surface=M.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new mv(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 bv(t){nv.call(this);var e=this,t=(e.element=t,e.element.style.transformOrigin="left top",e.x=0,e.y=0,e.scale=1,ov(e.x,e.y,e.scale));e.element.style.transform=t,e._saveCoordinates(t)}function wv(t){sv.call(this);var s,a,h,l=this;cv(l,{elastic:!0},t),t=l.elastic?.5:0,h=l.movable,l.x=s=new yv({axis:"x",dimension:l.dimensions.x,resistance:t,movable:h}),l.y=a=new yv({axis:"y",dimension:l.dimensions.y,resistance:t,movable:h}),l.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){l.gesture=t,l.offset=ne(l.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=l.gesture,i=e.center,o=t.center,e=t.distance/e.distance,r=l.dimensions.minScale,n=l.dimensions.maxScale,r=(h.scale<=r&&e<1&&(e+=.8*(1-e)),h.scale*e>=n&&(e=n/h.scale),h.x+l.offset.left),n=h.y+l.offset.top,r={x:(r-i.x)*e+o.x-r,y:(n-i.y)*e+o.y-n};h.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),l.dimensions.rescale(h.scale),(l.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 kv(t){av.call(this),cv(this,t)}function Av(t){hv.call(this);this.x=new fv(cv({horizontal:!0},t)),this.y=new fv(cv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(uv,t)}function Sv(t){lv.call(this);var e=this;e.forcedEnabled=!1,cv(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 Cv(t,e){pv.call(this);var i=this,o=t[0]||t;i.capture=!1,o.addEventListener?(ze.down.split(" ").forEach(function(t){o.addEventListener(t,ny(i._press,i),!0)}),ze.up.split(" ").forEach(function(t){o.addEventListener(t,ny(i._release,i),!0)})):(ze.down.split(" ").forEach(function(t){o.attachEvent(t,ny(i._press,i))}),ze.up.split(" ").forEach(function(t){o.attachEvent(t,ny(i._release,i))})),i.bind(["press","release"],e||{})}(rv=Kd)&&(_v.__proto__=rv),((_v.prototype=Object.create(rv&&rv.prototype)).constructor=_v).prototype.destroy=function(){rv.prototype.destroy.call(this),this.surface.destroy()},_v.prototype._reset=function(){rv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},_v.prototype._initRoot=function(){this._root=new xv,this.surface.draw(this._root)},_v.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},_v.prototype._resize=function(){this.surface.size(this.map.size())},_v.prototype._readData=function(){var t=rv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},_v.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Mv(this.map,this.options.style,this));for(var e=new xv,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},_v.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof M.drawing.Circle&&this.map.options.renderPointsAsMarkers?w(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},_v.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},_v.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},_v.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},_v.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},_v.prototype._panEnd=function(t){rv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},_v.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}))},_v.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},_v.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},_v.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)))},_v.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},_v.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},_v.prototype._activate=function(){rv.prototype._activate.call(this),this._panHandler=ny(this._pan,this),this.map.bind("pan",this.panHandler)},_v.prototype._deactivate=function(){rv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},e(h=_v,{autoBind:!0,zIndex:100}),(Tv=M.Class)&&(Lv.__proto__=Tv),((Lv.prototype=Object.create(Tv&&Tv.prototype)).constructor=Lv).prototype.parse=function(t){var e=new xv,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=i&&e.children.length<2?e.children[0]:e},Lv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Lv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Lv.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},Lv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(pe(e).anchor()))&&(t.options.fill=null)},Lv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Lv.prototype._loadPolygon=function(t,e,i){e=this._buildPolygon(e);return e.dataItem=i,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},Lv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?M.drawing.MultiPath:M.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(Gg.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Lv.prototype._loadPoint=function(t,e,i){var e=Gg.fromLngLat(e),o=this.locator.locationToView(e),o=new M.geometry.Circle(o,10),o=new M.drawing.Circle(o,this.style);return o.dataItem=i,o.location=e,this._loadShape(t,o)};var Pv,Tv,Mv=Lv,ef;function Ov(){Pv.apply(this,arguments)}function Lv(t,e,i){Tv.call(this),this.observer=i,this.locator=t,this.style=e}(Pv=h)&&(Ov.__proto__=Pv),((Ov.prototype=Object.create(Pv&&Pv.prototype)).constructor=Ov).prototype._readData=function(){return this.options.data||[]},Ov.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=Gt(e.valueField),o=t.slice(0);o.sort(function(t,e){return i(e)-i(t)});for(var r=this._scaleType(),n=Gt(this.options.locationField),s=0;s<o.length;s++){var a,h,l,p=o[s],c=n(p),u=i(p);w(c)&&w(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=Gg.create(c),l=this.map.locationToView(c),h=a.map(u),(l=this._createSymbol({center:l,size:h,style:e.style,dataItem:p,location:c})).dataItem=p,l.location=c,l.value=u,this._drawSymbol(l))}}},Ov.prototype._scaleType=function(){var t=this.options.scale;return Ot(t)?t:Ev[t]},Ov.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Ot(e)?e:Rv[e])(t)},Ov.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Ov.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},Ov.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},e(ef=Ov,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200}),(Bv=M.Class)&&(Uv.__proto__=Bv),((Uv.prototype=Object.create(Bv&&Bv.prototype)).constructor=Uv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var Iv,Bv,Ev={sqrt:Uv},Rv={circle:function(t){var e=new M.geometry.Circle(t.center,t.size/2);return new M.drawing.Circle(e,t.style)},square:function(t){var e=new M.drawing.Path(t.style),i=t.size/2,t=t.center;return e.moveTo(t.x-i,t.y-i).lineTo(t.x+i,t.y-i).lineTo(t.x+i,t.y+i).lineTo(t.x-i,t.y+i).close(),e}},Vv="mouseenter",zv="mouseleave",jv=Object.assign,Dv="k-marker",Fv="."+Dv,Hv=((Iv=Kd)&&(Nv.__proto__=Iv),((Nv.prototype=Object.create(Iv&&Iv.prototype)).constructor=Nv).prototype.destroy=function(){Iv.prototype.destroy.call(this),Ge(this.element,"click",this._markerClickHandler),this.clear()},Nv.prototype.add=function(t){if(!xt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Nv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Nv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Nv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Nv.prototype._reset=function(){Iv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Nv.prototype.bind=function(t,e){t=Wv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Nv.prototype._addOne=function(t){t=Wv.create(t,this.options);return t.addTo(this),t},Nv.prototype._readData=function(){return this.options.data||[]},Nv.prototype._load=function(t){this._data=t,this.clear();for(var e=Gt(this.options.locationField),i=Gt(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},Nv.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)},Nv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Nv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Nv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return jv({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Nv);function Nv(t,e){Iv.call(this,t,e),this._markerClickHandler=ny(this._markerClick,this),Ue(this.element,"click",Fv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Uv(t,e){Bv.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(Hv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""}),(Gv=M.Class)&&(Yv.__proto__=Gv),((Yv.prototype=Object.create(Gv&&Gv.prototype)).constructor=Yv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Yv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Yv.prototype.location=function(t){return t?(this.options.location=Gg.create(t).toArray(),this.layer&&this.layer.update(this),this):Gg.create(this.options.location)},Yv.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=ly(this._anchor.left),this.element.style.top=ly(this._anchor.top)},Yv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},Yv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=ny(this._mouseEnter,this),Ue(this.element,Vv,Fv,this._mouseEnterHandler),this._mouseLeaveHandler=ny(this._mouseLeave,this),Ue(this.element,zv,Fv,this._mouseLeaveHandler))},Yv.prototype.unbindEvents=function(){this.element&&(Ge(this.element,Vv,this._mouseEnterHandler),Ge(this.element,zv,this._mouseLeaveHandler))},Yv.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,_t(i=document.createElement("span"),Dv),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=vy(o),i.appendChild(o)):t.svgIcon?we(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(o={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(o.icon="map-marker-target",we(i,o)):"pin"===t.shape?we(i,o):_t(i,"k-icon k-icon-xxl k-i-marker-"+hy(t.shape||"pin")):we(i,o)),t.title&&i.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){i.setAttribute(t,r[t])}),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents())},Yv.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())},Yv.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()}},Yv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Yv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Yv.prototype._compileTemplate=function(t){return d_.compile(t,{paramName:"dataItem",useWithBlock:!1})},Yv.create=function(t,e){return t instanceof Yv?t:new Yv(O({},e,t))};var Gv,Wv=Yv,Xv=Object.assign;function Yv(t){Gv.call(this),this.options=t||{}}function qv(t){window.requestAnimationFrame(t)}(em=M.Class)&&(vm.__proto__=em),((vm.prototype=Object.create(em&&em.prototype)).constructor=vm).prototype.tick=function(){},vm.prototype.done=function(){},vm.prototype.onEnd=function(){},vm.prototype.onCancel=function(){},vm.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,qv(this._tickProxy)))},vm.prototype.enabled=function(){return!0},vm.prototype.cancel=function(){this._started=!1,this.onCancel()},vm.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):qv(this._tickProxy))};var Zv,Qv,Kv,$v,Jv,tm,em,s,im=((tm=s=vm)&&(ym.__proto__=tm),((ym.prototype=Object.create(tm&&tm.prototype)).constructor=ym).prototype.done=function(){return this.timePassed()>=this.duration},ym.prototype.timePassed=function(){return Math.min(this.duration,Ye()-this.startDate)},ym.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[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=Ye(),e.start()},ym.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},ym.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},ym),om=Object.assign,rm=Math.abs,nm="change",sm=((Jv=s)&&(gm.__proto__=Jv),((gm.prototype=Object.create(Jv&&Jv.prototype)).constructor=gm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},gm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},gm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},gm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},gm),am=(($v=s)&&(fm.__proto__=$v),((fm.prototype=Object.create($v&&$v.prototype)).constructor=fm).prototype.onCancel=function(){this.transition.cancel()},fm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},fm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},fm.prototype.done=function(){return rm(this.velocity)<1},fm.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),$v.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(),$v.prototype.start.call(this)))},fm.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=i,i=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(i)&&(i=Math.max(Math.min(i,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,i)},fm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},fm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},fm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:im.easeOutExpo})},fm),hm=((Kv=s)&&(dm.__proto__=Kv),((dm.prototype=Object.create(Kv&&Kv.prototype)).constructor=dm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},dm.prototype.done=function(){return rm(this.offset.y)<5&&rm(this.offset.x)<5},dm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},dm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},dm.prototype.setCallback=function(t){t&&Ot(t)&&(this.callback=t)},dm.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}},dm),lm=((Qv=M.Class)&&(um.__proto__=Qv),((um.prototype=Object.create(Qv&&Qv.prototype)).constructor=um).prototype.refresh=function(){var t=this.axis,e=this.dimension,i=e.size,o=this.scrollMovable,e=i/e.total,o=Math.round(-o[t]*e),r=Math.round(i*e);this.element.style.display=1<=e?"none":"",i<o+r?r=i-o:o<0&&(r+=o,o=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,o)},um.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},um.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},um),pm=((Zv=__)&&(cm.__proto__=Zv),((cm.prototype=Object.create(Zv&&Zv.prototype)).constructor=cm).prototype._initOptions=function(t){this.options=O({},this.options,t)},cm.prototype._wheelScroll=function(t){var e,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),i=t.wheelDeltaY,t.wheelDelta?void 0!==i&&!i||(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},cm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},cm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},cm.prototype.height=function(){return this.dimensions.y.size},cm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},cm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},cm.prototype._resize=function(){this._native||this.contentResized()},cm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},cm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},cm.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)},cm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},cm.prototype.enable=function(){this.enabled=!0},cm.prototype.disable=function(){this.enabled=!1},cm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(rm(t)),this.scrollElement.scrollTop(rm(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},cm.prototype.animatedScrollTo=function(t,e,i){var o;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(o,{x:t,y:e}),this.animatedScroller.setCallback(i),this.animatedScroller.start())},cm.prototype.pullHandled=function(){},cm.prototype.destroy=function(){Ge(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},cm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},cm.prototype._initPullToRefresh=function(){},cm.prototype._dragEnd=function(){},cm.prototype._paneChange=function(){},cm.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new lm({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(nm,function(){s.refresh()}),n.bind(nm,function(){s.show()}),e[t+"inertia"]=new am({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,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})}})},cm);function cm(t,e){Zv.call(this);var r=this;this.element=t,this._initOptions(e);navigator.userAgent;e=(e=We().mobileOS).ios||e.android,r._native=r.options.useNative&&e,e=vy('<div class="km-scroll-header"/>');if(r._native)_t(t,"km-native-scroller"),ay(e,t),om(r,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",_t(t,"km-scroll-wrapper");var i=t,o=vy('<div class="km-scroll-container"/>');for(i.appendChild(o);i.firstChild!==o;)o.appendChild(i.firstChild);ay(e,t);var e=t.children[1],n=new dv(t),s=new mv(e),a=new gv({element:e,container:t,forcedEnabled:r.options.zoom}),h=this.options.avoidScrolling,l=new b_(t,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:r.options.zoom,supportDoubleTap:r.options.supportDoubleTap,start:function(t){a.refresh();var e=rm(t.x.velocity),i=rm(t.y.velocity),o=i<=2*e,e=e<=2*i;!r.fixedContainer.contains(t.event.target)&&!h(t)&&r.enabled&&(a.x.enabled&&o||a.y.enabled&&e)?l.capture():l.cancel()}}),p=new vv({movable:s,dimensions:a,userEvents:l,elastic:r.options.elastic}),c=new sm({movable:s,dimensions:a,userEvents:l,tapCapture:n}),u=new hm({moveTo:function(t){r.scrollTo(t.x,t.y)}});s.bind(nm,function(){r.scrollTop=-s.y,r.scrollLeft=-s.x,r.trigger("scroll",{scrollTop:r.scrollTop,scrollLeft:r.scrollLeft})}),r.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Ue(t,"wheel",this._wheelScrollHandler)),om(r,{movable:s,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:l,pane:p,tapCapture:n,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),r._initAxis("x"),r._initAxis("y"),r._wheelEnd=function(){r._wheel=!1,r.userEvents.end(0,r._wheelY)},a.refresh(),r.options.pullToRefresh&&r._initPullToRefresh()}}function um(t){Qv.call(this);var e="x"===t.axis,i=vy('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');om(this,t,{element:i,elementSize:0,movable:new mv(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(nm,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}function dm(t){Kv.call(this,t),om(this,t,{origin:{},destination:{},offset:{}})}function fm(t){$v.call(this);var e=this;om(e,t,{transition:new im({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",ny(e.start,e)),e.userEvents.bind("gestureend",ny(e.start,e)),e.userEvents.bind("tap",ny(e.onEnd,e))}function gm(t){Jv.call(this,t);om(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function ym(t){tm.call(this),Xv(this,t)}function vm(){em.call(this);this._tickProxy=ny(this._tick,this),this._started=!1}function mm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}e(pm,{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"}}),py(pm,["pull","scroll","resize"]),mm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const S0=mm;var xm,_m=Math,bm=_m.min,wm=_m.pow,km=M.geometry.Point,Am="marker",Sm="location",Cm={bubble:ef,shape:h,tile:qd},jn;function k(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),xm.call(this),this._init(t,e,i,o)}Cm[Am]=Hv,(xm=__)&&(k.__proto__=xm),((k.prototype=Object.create(xm&&xm.prototype)).constructor=k).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(),xt(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();Ge(this.element,"wheel",this._mousewheelHandler),xm.prototype.destroy.call(this)},k.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=We(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new yy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,M.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Ue(this.element,"wheel",this._mousewheelHandler)},k.prototype._initOptions=function(t){this.options=O({},this.options,t)},k.prototype._initElement=function(t){_t(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),sy(t);t=vy("<div />");this.element.appendChild(t)},k.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new S0(this,t)},k.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},k.prototype.addObserver=function(t){t&&this.observers.push(t)},k.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},k.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},k.prototype.trigger=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o||xm.prototype.trigger.call(this,t,e),o},k.prototype._notifyObserver=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},k.prototype.zoom=function(t){var e=this.options,t=w(t)?(t=_m.round(x(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},k.prototype.center=function(t){var e=t?(t=Gg.create(t),e=Gg.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Vy,{center:this.options.center}),this._reset()),this):Gg.create(this.options.center);return e},k.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},k.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),sy(e),this._init(e,t,{},this.context),this._reset()},k.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=Gg.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},k.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=km.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},k.prototype.locationToView=function(t){var t=Gg.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},k.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=km.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},k.prototype.eventOffset=function(t){var e,i=ne(this.element);return t=t.x&&t.x[Sm]||t.y&&t.y[Sm]?(e=t.x[Sm]-i.left,t.y[Sm]-i.top):(t=t.originalEvent||t,e=_(t.pageX,t.clientX)-i.left,_(t.pageY,t.clientY)-i.top),new M.geometry.Point(e,t)},k.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},k.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},k.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},k.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:bm(e,i),height:bm(e,t.clientHeight)}},k.prototype.exportVisual=function(){return this._reset(),!1},k.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},k.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=Gg.create(t);return(t=this.locationToLayer(t,e)).x+=i.width/2,t.y+=i.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(Vy,{center:this.options.center}),this},k.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},k.prototype._setExtent=function(t){var e=Ry.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new Ry(e.nw,i));this.center(o.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(o.nw,s),h=this.locationToLayer(o.se,s),l=_m.abs(h.x-a.x),h=_m.abs(h.y-a.y);if(l<=r&&h<=n)break}this.zoom(s)},k.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize(),i=(e.x+=i.width,e.y+=i.height,this.layerToLocation(e));return new Ry(t,i)},k.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},k.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))},k.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+cy(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(_t(i=document.createElement("div"),"k-map-controls "+cy(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},k.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new my(e,t)},k.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Sy(e,O({},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)},k.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,o=this.element.clientWidth,r=this.element.clientHeight,i=x(i,t.x.min,t.x.max-o),e=x(e,t.y.min,t.y.max-r);this.scroller.one("scroll",ny(this._scrollEnd,this)),this.scroller.scrollTo(-i,-e)},k.prototype._navigatorCenter=function(){this.center(this.options.center)},k.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new My(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},k.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},k.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new pm(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",ny(this._scroll,this)),t.bind("scrollEnd",ny(this._scrollEnd,this)),t.userEvents.bind("gesturestart",ny(this._scaleStart,this)),t.userEvents.bind("gestureend",ny(this._scale,this)),t.userEvents.bind("doubleTap",ny(this._doubleTap,this)),t.userEvents.bind("tap",ny(this._tap,this)),this.scrollElement=t.scrollElement},k.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],o=this._createLayer(o);e.push(o)}},k.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===Am?O({},this.options.markerDefaults,t,{icons:this.options.icons}):O({},i,t),t=new Cm[e](this,i);return e===Am&&(this.markers=t),t},k.prototype._createTooltip=function(){return new zy(this.widgetService,this.options.tooltip)},k.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===Am}).length||(this.markers=new Hv(this,O({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},k.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,i=new M.geometry.Point(i.x,i.y).scale(-1).scale(1/i.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,this._tooltip.offset=i,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},k.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Ye(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},k.prototype._panComplete=function(){return 50<Ye()-(this._panEndTimestamp||0)},k.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},k.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),i=new M.geometry.Point(t.center.x,t.center.y),o=this.viewToLocation(i,e),o=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t})},k.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=_m.log(t)/_m.log(2);return _m.round(t)},k.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")},k.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=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=wm(2,this.options.minZoom-n),t.dimensions.maxScale=wm(2,this.options.maxZoom-n),{min:-r.x,max:o-r.x}),n={min:-r.y,max:o-r.y};this.options.wraparound&&(t.max=20*o,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(),i.makeVirtual(),e.virtualSize(t.min,t.max),i.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},k.prototype._renderLayers=function(){},k.prototype._layerSize=function(t){t=_(t,this.options.zoom);return this.options.minSize*wm(2,t)},k.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},k.prototype._doubleTap=function(t){var e,i,o;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},k.prototype._mousewheel=function(t){var e=0<te(t)?-1:1,i=this.options,o=this.zoom(),e=x(o+e,i.minZoom,i.maxZoom);!1===i.zoomable||e===o||this.trigger("zoomStart",{originalEvent:t})||(i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},k.prototype._toDocumentCoordinates=function(t){var e=ne(this.element);return{left:L(t.x+e.left),top:L(t.y+e.top)}},e(jn=k,{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}),py(jn,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const C0=jn;function Pm(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function Tm(t,e){return Lm(t.source,e.source)}function Mm(t,e){return Lm(t.target,e.target)}function Om(t){return t.value}var Lm=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function Im(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(Mm)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(Tm)})})}function Bm(t){var e=t.nodesOptions,i=e.offset,o=(void 0===i&&(i={}),e.align);this.data={nodes:t.nodes.map(function(t){return O({},{offset:i,align:o},t)}),links:t.links.map(function(t){return O({},t)})},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout}function Em(t){return new Bm(t).calculate()}function Rm(t,e,i,o,r,n){n=(n-e)*(i-t),i=(o-e)*(r-t);return i<n?1:n==i?0:-1}function Vm(t,e,i,o){return e=O({},e,e.node),O({},{color:(i=i,o=o,t.color||i[o%i.length])},e,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})}function zm(t,e,i,o,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*i*a*n+o*a*r}Bm.prototype.calculate=function(){var t=this.data,e=t.nodes,t=t.links,t=(this.connectLinksToNodes(e,t),this.calculateNodeValues(e),this.calculateNodeHeights(e));if(t)return{nodes:[],links:[],columns:[],circularLinks:t};this.calculateNodeDepths(e);t=this.calculateNodeColumns(e);return this.calculateNodeBreadths(t),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:t})},Bm.prototype.connectLinksToNodes=function(t,e){var i=new Map;t.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,i.set(t.id,t)}),e.forEach(function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)})},Bm.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(Pm(t.sourceLinks,Om),Pm(t.targetLinks,Om))})},Bm.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var h=s.sourceLinks[a];i.add(h.target)}}o++,e=i,i=new Set}},Bm.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach(function(t){o.add(t.source)})};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},Bm.prototype.calculateNodeColumns=function(t){for(var e,i=Math.max.apply(null,t.map(function(t){return t.depth})),o=(this.width-this.offsetX-this.nodeWidth)/i,r=new Array(i+1),n=0;n<t.length;n++){var s=t[n],a=Math.max(0,Math.min(i,(e=i,"left"===(a=s).align?a.depth:"right"===a.align?e-a.height:a.sourceLinks.length?a.depth:e)));s.x0=this.offsetX+a*o,s.x1=s.x0+this.nodeWidth,r[s.layer=a]=r[a]||[],r[a].push(s)}return r},Bm.prototype.calculateNodeBreadths=function(t){var e=this,o=Math.min.apply(null,t.map(function(t){return(e.height-e.offsetY-(t.length-1)*e.nodePadding)/Pm(t,Om)}));if(t.forEach(function(t){var i=e.offsetY;t.forEach(function(t){t.y0=i,t.y1=i+t.value*o,i=t.y1+e.nodePadding,t.sourceLinks.forEach(function(t){t.width=t.value*o})}),i=(e.height-i+e.nodePadding)/(t.length+1),t.forEach(function(t,e){t.y0+=i*(e+1),t.y1+=i*(e+1)})}),!1!==this.autoLayout)for(var i=void 0!==this.loops?this.loops:t.length-1,r=this.targetColumnIndex||1,n=0;n<i;n++)this.reverse?(this.uncurlLinksToRight(t,r),this.uncurlLinksToLeft(t,r)):(this.uncurlLinksToLeft(t,r),this.uncurlLinksToRight(t,r));t.forEach(Im)},Bm.prototype.applyNodesOffset=function(t){t.forEach(function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i})},Bm.prototype.calculateLinkBreadths=function(t){t.forEach(function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach(function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width}),i.forEach(function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width})})},Bm.prototype.uncurlLinksToRight=function(t,e){for(var n=this,i=t.length,o=e;o<i;o++){var r=t[o];r.forEach(function(i){var o=0,r=0,t=(i.targetLinks.forEach(function(t){var e=t.value*(i.layer-t.source.layer);o+=n.targetTopPos(t.source,i)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Im([i])}),r.sort(Lm),this.arrangeNodesVertically(r)}},Bm.prototype.uncurlLinksToLeft=function(t,e){for(var n=this,i=t.length-1-e;0<=i;i--){for(var s=t[i],o=0;o<s.length;o++)!function(t){var i=s[t],o=0,r=0,t=(i.sourceLinks.forEach(function(t){var e=t.value*(t.target.layer-i.layer);o+=n.sourceTopPos(i,t.target)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,Im([i])}(o);s.sort(Lm),this.arrangeNodesVertically(s)}},Bm.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},Bm.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},Bm.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;0<=r;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},Bm.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},Bm.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i},(Hm=M.Class)&&(Km.__proto__=Hm),((Km.prototype=Object.create(Hm&&Hm.prototype)).constructor=Km).prototype.createVisual=function(){this.visual=this.createElement()},Km.prototype.exportVisual=function(){return this.visual},Km.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},Km.prototype.getSender=function(){return this};var jm,Dm,Fm,Hm,Dn,Nm=((Fm=Dn=Km)&&(Qm.__proto__=Fm),((Qm.prototype=Object.create(Fm&&Fm.prototype)).constructor=Qm).prototype.getElement=function(){return M.drawing.Path.fromRect(this.getRect(),this.visualOptions())},Qm.prototype.getRect=function(){var t=this.options.node;return new M.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},Qm.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},Qm.prototype.visualOptions=function(){var t=O({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},Qm.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=M.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},Qm.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.node.id,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(q,t)},Qm.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(q)},Qm),Um=((Dm=Dn)&&(Zm.__proto__=Dm),((Zm.prototype=Object.create(Dm&&Dm.prototype)).constructor=Zm).prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,t=t.y1,r=(e+i)/2;return new M.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([r,o],[r,t],[i,t])},Zm.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},Zm.prototype.visualOptions=function(){var t=this.options,e=this.options.link,i=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:(w(e.opacity)?e:t).opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:i}},Zm.prototype.createFocusHighlight=function(){var t,e,i,o,r,n,s,a,h,l,p,c,u,d,f,g,y,v,m,x;this.options.navigatable&&(t=(m=this.options.link).x0,e=m.x1,i=m.y0,o=m.y1,r=(t+e)/2,n=m.width/2,s=this.options.rtl,l=m.width/2,p=s?m.x1:m.x0,c=s?m.x0:m.x1,u=s?m.y1:m.y0,s=s?m.y0:m.y1,f=[d=(p+c)/2,zm(u,u,s,s,.5)],g=[zm(p,d,d,c,.4999),zm(u,u,s,s,.4999)],v=f[0],f=f[1],y=g[0],g=g[1],m=m.width,x=(v+y)/2,h=(f+g)/2,f=f===g?(a=0,m/2):v===y?(a=m/2,0):(g=-1/((g-f)/(y-v)))*(a=m/2/Math.sqrt(1+g*g)),v=[d,zm(u+l,u+l,s+l,s+l,.5)],m=(y={P1:{x:x-a,y:h-f},P2:{x:x+a,y:h+f}}).P1.y>y.P2.y?y.P1:y.P2,g=p,x=c,l=d-(a=m,h={x:v[0],y:v[1]},f=l,y={x:v[0],y:v[1]},p={x:Math.max(1,v[0]+(s<u?1:-1)*l),y:v[1]},c=(a.x+h.x)/2,d=(a.y+h.y)/2,s=h.x-a.x,h=-(h.y-a.y),a=s,s=Math.sqrt(h*h+a*a),u=c+(h=h/s*f),s=d+(a=a/s*f),f=c-h,c=d-a,a=(d=p.y-y.y)*(u-f)-(h=p.x-y.x)*(s-c),(((!(Math.abs(a)<1e-10)&&(p=((u-f)*(c-y.y)-(s-c)*(f-y.x))/a,0<=(s=(h*(c-y.y)-d*(f-y.x))/a))&&s<=1&&0<=p&&p<=1?{x:f+s*(u-f)}:null)||{x:(v[0]+m.x)/2}).x-.125*g-.125*x)/.75),this._highlight=new M.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(t,i+n).lineTo(t,i-n).curveTo([r+l,i-n],[r+l,o-n],[e,o-n]).lineTo(e,o+n).curveTo([r-l,o+n],[r-l,i+n],[t,i+n]))},Zm.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.link.sourceId+"->"+this.options.link.targetId,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(q,t)},Zm.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(q)},Zm),Gm="inside",Wm="before",Xm="after",Ym=((jm=Dn)&&(qm.__proto__=jm),((qm.prototype=Object.create(jm&&jm.prototype)).constructor=qm).prototype.getElement=function(){var t,e=O({},this.options,this.options.node.label),i=e.node,o=e.diagramMinX,r=e.diagramMaxX,n=e.text,s=e.offset,a=e.rtl,h=e.position;return a&&h!==Gm&&(h=h===Wm?Xm:Wm),e.visible&&n?(e=new R(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),a&&!t.align&&(t.align="right"),(n=new I_(n,t)).reflow(new R),t=n.box,e=e.center().y-t.height()/2,r=i.x1+t.width()>r,o=i.x0-t.width()<o,r=h===Wm||h===Gm&&r?Wm:Xm,a=[(r=a?h===Xm||h===Gm&&o?Xm:Wm:r)===Wm?i.x0-t.width():i.x1,e],(h=new R(a[0],a[1],a[0]+t.width(),a[1]+t.height())).translate(s.left||0,s.top||0),n.reflow(h),n.renderVisual(),n.visual):null},qm.prototype.visualOptions=function(){var t=O({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},qm);function qm(){jm.apply(this,arguments)}function Zm(){Dm.apply(this,arguments)}function Qm(){Fm.apply(this,arguments)}function Km(t){Hm.call(this),this.options=O({},this.options,t),this.createVisual()}function $m(t,e,i,o,r){return O({},e,{node:t,diagramMinX:o,diagramMaxX:r,rtl:i,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})}e(Ym,{position:Gm}),(Jm=Dn)&&(ex.__proto__=Jm),((ex.prototype=Object.create(Jm&&Jm.prototype)).constructor=ex).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;return!1!==t.visible&&i?((i=B_.buildTitle(i,t)).reflow(e),i.renderVisual(),i.visual):null},ex.prototype.createElement=function(){return this.getElement()};var Jm,tx=ex;function ex(){Jm.apply(this,arguments)}function ix(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}function ox(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0}e(tx,{align:b,border:{width:0},margin:zt(5),padding:zt(5)}),(rx=Dn)&&(sx.__proto__=rx),((sx.prototype=Object.create(rx&&rx.prototype)).constructor=sx).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.rtl,o=t.nodes,r=(void 0===o&&(o=[]),t.item),n=t.position;return!1!==t.visible&&o.length?((o=o.map(function(t){return{text:t.label&&t.label.text||"",area:{background:void 0!==r.areaBackground?r.areaBackground:t.color,opacity:void 0!==r.areaOpacity?r.areaOpacity:t.opacity},node:t}})).sort(i?ox:ix),n=i&&n!==C&&n!==P,(t=new v1(Object.assign({},t,{data:o,reverse:n}),{rtl:i})).reflow(e),t.renderVisual(),t.visual):null},sx.prototype.createElement=function(){return this.getElement()};var rx,nx=sx;function sx(){rx.apply(this,arguments)}e(nx,{markers:{visible:!1},item:{type:rn,cursor:vt,opacity:1},position:S,align:b,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var ax,hx="link",lx="node",px=((ax=__)&&(A.__proto__=ax),((A.prototype=Object.create(ax&&ax.prototype)).constructor=A).prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},A.prototype._initElement=function(t){_t(this.element=t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},A.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},A.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},A.prototype.firstFocusableNode=function(){return this.columns[0][0]},A.prototype._initResizeObserver=function(){var o=this,t=new ResizeObserver(function(t){t.forEach(function(t){var e=t.contentRect,i=e.width,e=e.height;t.target!==o.element||o.size&&o.size.width===i&&o.size.height===e||(o.size={width:i,height:e},o.surface.setSize(o.size),o.resize=!0,o._redraw())})});(this._resizeObserver=t).observe(this.element)},A.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},A.prototype._initTheme=function(t){t=t||this.theme||{};this.theme=t,this.options=O({},t,this.options)},A.prototype.setLinksOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.opacity)})},A.prototype.setLinksInactivityOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.highlight.inactiveOpacity)})},A.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:w(i)?i:e}))},A.prototype.trigger=function(t,e){var i=e.element.dataItem,o=e.element.type,e=Object.assign({},e,{type:t,targetType:o,dataItem:i});return ax.prototype.trigger.call(this,t,e)},A.prototype._mouseenter=function(t){var e=t.element,i=e.type===hx,o=e.type===lx,r=Boolean(e.chartElement&&e.chartElement.options.node);i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t)||(t=this.options.links.highlight,i?(this.setLinksInactivityOpacity(t.inactiveOpacity),this.setOpacity(e,t.opacity,e.linkOptions.highlight.opacity)):o?this.highlightLinks(e,t):r&&(i=this.nodesVisuals.get(e.chartElement.options.node.id),this.highlightLinks(i,t)))},A.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===hx,r=i.type===lx,i=Boolean(i.chartElement&&i.chartElement.options.node),n=t.originalEvent.relatedTarget;o&&n&&"text"===n.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t))||r&&this.trigger("nodeLeave",t)||(o||r||i)&&this.linksVisuals.forEach(function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})},A.prototype._mousemove=function(t){var e,i,o,r=this,n=this.options.tooltip,s=n.followPointer,n=n.delay,a=t.element,h=a.type;h!==hx&&h!==lx||this.tooltipShown&&!s||(e=t.originalEvent,o=this.element.getBoundingClientRect(),i=e.clientX-o.left<o.width/2,o=e.clientY-o.top<o.height/2,t.tooltipData={popupOffset:{left:e.pageX,top:e.pageY},popupAlign:{horizontal:i?"left":"right",vertical:o?"top":"bottom"}},h===lx&&(i=(e=a.dataItem).sourceLinks,h=(o=e.targetLinks).length?o:i,t.nodeValue=h.reduce(function(t,e){return t+e.value},0)),this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),a=s&&this.tooltipShown?0:n,this.tooltipTimeOut=setTimeout(function(){r.trigger("tooltipShow",t),r.tooltipShown=!0,r.tooltipTimeOut=null},a))},A.prototype._click=function(t){var e=t.element,i=e.dataItem,o=e.type===hx,e=e.type===lx,r=this._focusState||{};e?(!r.link&&this.sameNode(r.node,i)||(this._focusState={node:i,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t)):o&&(e={sourceId:i.source.id,targetId:i.target.id,value:i.value},this.sameLink(r.link,e)||(this._focusState={node:i.source,link:e},this._focusLink({highlight:!1})),this.trigger("linkClick",t))},A.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},A.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},A.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},A.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},A.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this.columns.findIndex(function(t){return t.find(function(t){return t.id===e.id})}),i=this.columns[i],o=i.findIndex(function(t){return t.id===e.id}),i=i[o+t];i&&(this._focusState.node=i,this._focusNode())},A.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this._focusState.link,o=e.sourceLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId}),r=e.targetLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId});-1!==o?(o=e.sourceLinks[o+t])&&(this._focusState.link=o,this._focusLink()):-1!==r&&(o=e.targetLinks[r+t])&&(this._focusState.link=o,this._focusLink())},A.prototype._focusSourceNode=function(){var t=this._focusState.link,t=this.models.map.get(t.sourceId);this._focusState={node:t.options.node,link:null},this._focusNode()},A.prototype._focusTargetNode=function(){var t=this._focusState.link,t=this.models.map.get(t.targetId);this._focusState={node:t.options.node,link:null},this._focusNode()},A.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},A.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},A.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},A.prototype._blur=function(){this._cleanFocusHighlight()},A.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},A.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},A.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach(function(t){return t.blur()}),this.models.links.forEach(function(t){return t.blur()})},A.prototype._keydown=function(t){var e=this["on"+t.key],i=this.options.rtl;i&&"ArrowLeft"===t.key?e=this.onArrowRight:i&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},A.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},A.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},A.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},A.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},A.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},A.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach(function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)}))},A.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},A.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},A.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},A.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},A.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},A.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width,t=t.height;this.size={width:e,height:t},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},A.prototype._getSize=function(){return this.element.getBoundingClientRect()},A.prototype.createVisual=function(){this.visual=this._render()},A.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new tx(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},A.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new nx(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},A.prototype.calculateSankey=function(o,t){var e=t.title,i=t.legend,r=t.data,n=t.nodes,s=t.labels,a=t.nodeColors,h=t.disableAutoLayout,l=t.disableKeyboardNavigation,p=t.rtl,t=!h,h=((n.focusHighlight||{}).border||{}).width||0,l=l?0:h/2,h=new R(0,0,o.width,o.height),l=(h.unpad(l),this.titleBox(e,h)),c=h.clone(),e=(l&&(u=l.height(),c=e.position===T?(h.unpad({top:u}),new R(0,u,o.width,o.height)):(h.shrink(0,u),new R(0,0,o.width,o.height-u))),this.legendBox(i,r.nodes,c)),u=i&&i.position||nx.prototype.options.position,r=(e&&(u===C&&h.unpad({left:e.width()}),u===P&&h.shrink(e.width(),0),u===T&&h.unpad({top:e.height()}),u===S)&&h.shrink(0,e.height()),Em(Object.assign({},o,{offsetX:0,offsetY:0,width:h.width(),height:h.height()}))),c=r.nodes,i=r.circularLinks;if(i)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:i},legendBox:e,titleBox:l};var d=new R,f=c.reduce(function(t,e){return Math.min(t,e.x0)},1/0),g=c.reduce(function(t,e){return Math.max(t,e.x1)},0),y=(c.forEach(function(t,e){p&&(o=t.x0,i=t.x1,t.x0=g-i,t.x1=g-o);var i=Vm(t,n,a,e),o=new Nm(i),e=(d.wrap(Ki(o.exportVisual().rawBBox())),new Ym($m(t,s,p,f,g)).exportVisual());e&&d.wrap(Ki(e.rawBBox()))}),h.x1),v=h.y1,m=h.width()+y,x=h.height()+v;if(m-=d.x2>h.width()?d.x2-h.width():0,x-=d.y2>h.height()?d.y2-h.height():0,y+=d.x1<0?-d.x1:0,v+=d.y1<0?-d.y1:0,!1==t)return{sankey:Em(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})),legendBox:e,titleBox:l};if(this.resize&&t&&this.permutation)this.resize=!1;else{for(var _=Em(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})).columns.length,b=[],w=function(t,e){var i=function(t){for(var e=0,i=t.length,o=0;o<i;o++)for(var r=t[o],n=o+1;n<i;n++){var s=t[n],a=Rm((p=r).x0,p.y0,p.x1,p.y1,s.x1,s.y1),h=Rm(p.x0,p.y0,p.x1,p.y1,s.x0,s.y0),l=Rm(p.x0,p.y0,s.x0,s.y0,s.x1,s.y1),p=Rm(p.x1,p.y1,s.x0,s.y0,s.x1,s.y1);a!==h&&l!==p&&(e+=Math.min(r.value,s.value))}return e}(Em(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,loops:2,targetColumnIndex:t,reverse:e})).links);return b.push({crosses:i,reverse:e,targetColumnIndex:t}),0===i},k=1;k<=_-1&&!w(k,!1)&&!w(k,!0);k++);var A=Math.min.apply(null,b.map(function(t){return t.crosses})),u=b.find(function(t){return t.crosses===A});this.permutation={targetColumnIndex:u.targetColumnIndex,reverse:u.reverse}}return{sankey:Em(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x},this.permutation)),legendBox:e,titleBox:l}},A.prototype._render=function(t,e){var o,r,h,l,p,c,i,n,t=t||this.options,u=e||this,s=t.labels,a=t.nodes,d=t.links,f=t.nodeColors,e=t.title,g=t.legend,y=t.rtl,v=t.disableKeyboardNavigation,m=t.data,x=u.size,_=x.width,x=x.height,b=Object.assign({},m,{width:_,height:x,nodesOptions:a,title:e,legend:g}),b=this.calculateSankey(b,t),t=b.sankey,w=b.titleBox,b=b.legendBox,k=(y&&(k=t.nodes,A=t.links,o=Math.min.apply(Math,k.map(function(t){return t.x0})),r=Math.max.apply(Math,k.map(function(t){return t.x1}))-o,k.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x0=e,t.x1=i}),A.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x1=e,t.x0=i})),t.nodes),A=t.links,S=t.columns,C=(u.columns=S.map(function(t){t=t.slice();return t.sort(function(t,e){return t.y0-e.y0}),t}),new M.drawing.Group({clip:M.drawing.Path.fromRect(new M.geometry.Rect([0,0],[_,x]))}));return w&&(S=new tx(Object.assign({},e,{drawingRect:w})).exportVisual(),C.append(S)),t.circularLinks||(h=new Map,u.nodesVisuals=h,l={nodes:[],links:[],map:new Map},u.models=l,p=[],k.forEach(function(t,e){var i=Vm(t,a,f,e),o=(i.root=function(){return u.element},i.navigatable=!0!==v,new Nm(i)),r=o.exportVisual();r.links=[],r.type=lx,t.color=i.color,t.opacity=i.opacity,r.dataItem=Object.assign({},m.nodes[e],{color:i.color,opacity:i.opacity,sourceLinks:t.sourceLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}),targetLinks:t.targetLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})}),h.set(t.id,r),l.nodes.push(o),l.map.set(t.id,o),C.append(r),o.createFocusHighlight(),o._highlight&&p.push(o._highlight)}),_=A.slice().sort(function(t,e){return e.value-t.value}),c=[],u.linksVisuals=c,_.forEach(function(t){var e=t.source,i=t.target,o=h.get(e.id),r=h.get(i.id),n=(n=o,s=r,"source"===(a=O({},d,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight})).colorType?a.color=n.options.fill.color:"target"===a.colorType&&(a.color=s.options.fill.color),a),s=(n.root=function(){return u.element},n.navigatable=!0!==v,n.rtl=y,new Um(n)),a=s.exportVisual();a.type=hx,a.dataItem={source:Object.assign({},o.dataItem),target:Object.assign({},r.dataItem),value:t.value},a.linkOptions=n,c.push(a),o.links.push(a),r.links.push(a),l.links.push(s),l.map.set(e.id+"-"+i.id,s),s.createFocusHighlight(),s._highlight&&p.push(s._highlight),C.append(a)}),i=k.reduce(function(t,e){return Math.min(t,e.x0)},1/0),n=k.reduce(function(t,e){return Math.max(t,e.x1)},0),k.forEach(function(t){t=$m(t,s,y,i,n),t=new Ym(t).exportVisual();t&&C.append(t)}),b&&(x=new nx(Object.assign({},g,{rtl:y,drawingRect:b,nodes:k})).exportVisual(),C.append(x)),0!==p.length&&((e=new M.drawing.Group).append.apply(e,p),C.append(e))),C},A.prototype.exportVisual=function(t){var e=t&&t.options?O({},this.options,t.options):this.options,t={size:{width:(w(t&&t.width)?t:this.size).width,height:(w(t&&t.height)?t:this.size).height}};return this._render(e,t)},A.prototype._setOptions=function(t){this.options=O({},this.options,t)},A),p={opacity:1,width:2,color:Z};function A(t,e,i){ax.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(t))}e(px,{title:{position:T},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},p)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},p)},labels:{ariaTemplate:function(t){t=t.link;return t.source.label.text+" to "+t.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var cx=function(t,a,h){var l=new Set,p=new Map,c=new Map,o=(t.forEach(function(e){a.forEach(function(t){l.add(t.value(e))});for(var t=0;t<a.length-1;t++){var i=a[t].value(e),o=a[t+1].value(e),r=i+"_"+o,n=h.value(e),s=p.get(r);void 0!==s?p.set(r,s+n):(p.set(r,n),c.set(r,{source:i,target:o}))}}),new Map);return{nodes:Array.from(l).map(function(t,e){return o.set(t,e),{id:e,label:{text:String(t)}}}),links:Array.from(p).map(function(t){var e=t[0],t=t[1],e=c.get(e),i=e.source,e=e.target;return{sourceId:o.get(i),targetId:o.get(e),value:t}})}},I=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),ux="12px",c,dx=(c=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}])[0].value,fx="scatter",gx=["column","bar","line",fx],yx={type:"line",width:0};function vx(t){return t&&gx.includes(t)}var t,Id,mx={bar:[{axisType:"category",types:t=["string","date","number"]},{axisType:"value",types:Id=["number"]}],column:[{axisType:"category",types:t},{axisType:"value",types:Id}],line:[{axisType:"category",types:t},{axisType:"value",types:Id}],pie:[{axisType:"category",types:t},{axisType:"value",types:Id,count:1}],scatter:[{axisType:"category",types:t},{axisType:"value",types:Id}]};function xx(t,e){return((e||"")+" "+(t||"")).trim()}function _x(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}function bx(t,e,i){return i=_x(i).size,t?xx(t,i||e):""}function wx(t,e,i){return i=_x(i).name,t?xx(i||e,t):""}function kx(r){var t=structuredClone(r[0]);return t.forEach(function(t,e){if(!Cx(t.value))for(var i=0;i<r.length;i++){var o=r[i][e].value;if(Cx(o)){t.value=o;break}}}),t}function Ax(o,r,t){var n,e,i,s,a=Mx(),h=(a.seriesType=r,a.data=o||[],a.legend={visible:!0,position:"bottom"},mx[r]);return h&&o.length&&(n=o[0].slice(),a.columns=o[0].map(function(t){return String(t.field)}),i=h.find(function(t){return"category"===t.axisType}),e=-1,i&&(e=t&&t.categoryAxis?a.columns.indexOf(t.categoryAxis):Px(o,i)),t=h.filter(function(t){return"value"===t.axisType}),(i=Tx(o,t)).includes(e)&&(1<i.length?i=i.filter(function(t){return t!==e}):e=-1),s=[],i.forEach(function(e){var t=n[e],i=[];o.forEach(function(t){i.push(t[e].value)}),s.push(Object.assign({},{name:t.field,type:r,data:i,stack:!1,labels:{visible:!1}},r===fx?yx:{}))}),h=-1<e?o.map(function(t){return String(Cx(t[e].value)?t[e].value:" ")}):[],s.length&&(a.series=s.map(function(t,e){return Object.assign({},t,{id:e})}),a.initialSeries=structuredClone(a.series)),a.categoryAxis=[{categories:h,labels:{visible:!0,rotation:"auto"}}],a.categoryField=a.columns[e]),a}function Sx(t,e,i){var o,r,n,s,a,h=Mx(),l=(h.seriesType=e,h.data=t||[],mx[e]);return l&&t.length&&(o=t[0].map(function(t){return t.field}),n=l.find(function(t){return"category"===t.axisType}),r=-1,n&&(r=i&&i.categoryAxis?o.indexOf(i.categoryAxis):Px(t,n)),n=l.filter(function(t){return"value"===t.axisType}),s=[],(s=i&&i.valueAxis?[o.indexOf(i.valueAxis)]:Tx(t,n)).includes(r)&&1<s.length&&(s=s.filter(function(t){return t!==r})),"number"==typeof n[0].count&&(s=s.slice(0,n[0].count)),l=-1<r?t.map(function(t){return String(t[r].value)}):[],a=[],t.forEach(function(e){var i={};s.forEach(function(t){t=e[t];i[t.field]=t.value||0,i[e[r].field]=e[r].value||" "}),a.push(i)}),h.columns=o,h.categoryAxis=[{categories:l,title:{text:""}}],h.series=[{id:0,data:a,type:e,name:o[r],labels:{visible:!0},categoryField:o[r],field:o[s[0]]}],h.categoryField=o[r],h.valueField=o[s[0]],h.initialSeries=structuredClone(h.series)),h}var Cx=function(t){return null!=t},Px=function(i,t){var o=[],e=kx(i),t=(t.types.forEach(function(i){e.forEach(function(t,e){typeof t.value===i&&o.push(e)})}),o.findIndex(function(e){var t=i.map(function(t){return t[e].value});return new Set(t).size===t.length}));return Math.max(t,0)},Tx=function(t,e){var o=[],r=kx(t);return e.forEach(function(t){t.types.forEach(function(i){r.forEach(function(t,e){typeof t.value===i&&o.push(e)})})}),o},Mx=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})};function Ox(t,e){return(vx(e)?Ax:Sx)(t,e)}function Lx(t,e){var i=structuredClone(e);if(i.legend=t.legend,i.area=t.area,i.title=t.title,i.subtitle=t.subtitle,i.series.length===t.series.length)for(var o=0;o<i.series.length;o++)i.series[o].color=t.series[o].color,i.series[o].labels=t.series[o].labels;return t.series.every(function(t){return t.labels&&t.labels.visible})&&vx(i.seriesType)&&vx(t.seriesType)&&i.series.forEach(function(t){t.labels=t.labels||{},t.labels.visible=!0}),i}function Ix(t,e,i){var o=Object.assign({},t);switch(e){case I.seriesType:return Ox(o.data,i);case I.stacked:return o.series=o.series.map(function(t){return Object.assign({},t,{stack:i})}),o.stack=i,o;case I.categoryAxisX:return o.seriesType&&vx(o.seriesType)?Lx(o,Ax(o.data,o.seriesType,{categoryAxis:i})):"pie"===o.seriesType?Lx(o,Sx(o.data,o.seriesType,{categoryAxis:i})):o;case I.valueAxisY:return"pie"===o.seriesType?Lx(o,Sx(o.data,o.seriesType,{categoryAxis:o.categoryField,valueAxis:i})):o;case I.seriesChange:return o.series=i,o;case I.areaMarginLeft:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{left:i})}),o;case I.areaMarginRight:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{right:i})}),o;case I.areaMarginTop:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{top:i})}),o;case I.areaMarginBottom:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{bottom:i})}),o;case I.areaBackground:return o.area=Object.assign({},o.area,{background:i}),o;case I.titleText:return o.title=Object.assign({},o.title,{text:i}),o;case I.titleFontName:return o.title=Object.assign({},o.title,{font:bx(i,"20px",o.title&&o.title.font)}),o;case I.titleFontSize:return o.title=Object.assign({},o.title,{font:wx(i,dx,o.title&&o.title.font)}),o;case I.titleColor:return o.title=Object.assign({},o.title,{color:i}),o;case I.subtitleText:return o.subtitle=Object.assign({},o.subtitle,{text:i}),o;case I.subtitleFontName:return o.subtitle=Object.assign({},o.subtitle,{font:bx(i,"16px",o.subtitle&&o.subtitle.font)}),o;case I.subtitleFontSize:return o.subtitle=Object.assign({},o.subtitle,{font:wx(i,dx,o.subtitle&&o.subtitle.font)}),o;case I.subtitleColor:return o.subtitle=Object.assign({},o.subtitle,{color:i}),o;case I.seriesColor:return o.series=o.series.map(function(t){return Object.assign({},t,{color:(i.seriesName===t.name?i:t).color})}),o;case I.seriesLabel:return o.series=o.series.map(function(t){return i.all||i.seriesName===t.name?Object.assign({},t,{labels:{visible:i.visible}}):t}),o;case I.legendVisible:return o.legend=Object.assign({},o.legend,{visible:i}),o;case I.legendFontName:var r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:bx(i,ux,r.labels&&r.labels.font)})}),o;case I.legendFontSize:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:wx(i,dx,r.labels&&r.labels.font)})}),o;case I.legendColor:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{color:i})}),o;case I.legendPosition:return o.legend=Object.assign({},o.legend,{position:i}),o;case I.categoryAxisTitleText:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}),o;case I.categoryAxisTitleFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:bx(i,"16px",t.title&&t.title.font)})})}),o;case I.categoryAxisTitleFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:wx(i,dx,t.title&&t.title.font)})})}),o;case I.categoryAxisTitleColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case I.categoryAxisLabelsFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:bx(i,ux,t.labels&&t.labels.font)})})}),o;case I.categoryAxisLabelsFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:wx(i,dx,t.labels&&t.labels.font)})})}),o;case I.categoryAxisLabelsColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case I.categoryAxisLabelsRotation:var n=Cx(i)?i:"auto";return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:n})})}),o;case I.categoryAxisReverseOrder:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{reverse:i})}),o;case I.valueAxisTitleText:return o.valueAxis&&0!==o.valueAxis.length?o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}):o.valueAxis=[{title:{text:i}}],o;case I.valueAxisTitleFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:bx(i,"16px",t.title&&t.title.font)})})}),o;case I.valueAxisTitleFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:wx(i,dx,t.title&&t.title.font)})})}),o;case I.valueAxisTitleColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case I.valueAxisLabelsFormat:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:i})})}),o;case I.valueAxisLabelsFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:bx(i,ux,t.labels&&t.labels.font)})})}),o;case I.valueAxisLabelsFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:wx(i,dx,t.labels&&t.labels.font)})})}),o;case I.valueAxisLabelsColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case I.valueAxisLabelsRotation:var s=Cx(i)?i:"auto";return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:s})})}),o;default:return o}}function B(t,e){var i,o,r,e=h_(t).getPropertyValue(e);return/^color-mix/i.test(e)&&(t=t,e=l_[i=e]||(o=t.style.color,t.style.color=i,r=h_(t).color,t.style.color=o,l_[i]=r)),e}function Bx(t,e){return parseFloat(h_(t).getPropertyValue(e))}function Ex(t,e,i,o){return[(t=h_(t)).getPropertyValue(e),t.getPropertyValue(i),t.getPropertyValue(o)||t.fontFamily].join(" ")}function Rx(t){for(var e=h_(t),i=[],o=1,r=e.getPropertyValue(""+a_+o++);r||o<=30;)i.push(r),r=e.getPropertyValue(""+a_+o++);return i}var tt=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),Vx=Object.freeze({getWizardDataFromDataRows:function(t){var o=[];return t.forEach(function(t){var e=t.dataItem,t=t.dataColumns,i=[];t.forEach(function(t){i.push({field:t.title||t.field,value:Gt(t.field)(e)})}),o.push(i)}),o},ActionTypes:I,createInitialState:function(t,e,i){t=Ox(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?Ix(t,I.stacked,i.stack):t},createState:Ox,fontNames:c,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:vx,mergeStates:Lx,parseFont:_x,updateState:Ix,messages:tt}),zx=1.5,jx=.4,Dx="#000",l,Fx="11px "+(l="Arial, Helvetica, sans-serif"),Hx="12px "+l,Nx="16px "+l,Ux="transparent",Gx="#fff",Wx={type:yn},Xx={type:rn},Yx=Object.assign({},Xx,{markers:{visible:!1},highlight:{visible:!1}}),qx=function(){return{icon:{border:{width:1}},label:{font:Hx,padding:3},line:{length:10,width:2},legendItem:Yx,visible:!0}},Zx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Xx,opacity:.4}},Qx=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Xx,opacity:.4}},Kx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Gx,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},legendItem:Yx}},$x=function(){return{gap:zx,spacing:jx,target:{color:"#ff0000"},legendItem:Yx}},Jx=function(){return{width:2,legendItem:Wx}},t_=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:Xx,opacity:.5}},e_=function(){return{markers:{visible:!1},legendItem:Wx,width:2}},i_=function(){return{gap:.5,line:{color:Dx,width:1},legendItem:Yx,spacing:jx}},o_=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Yx}},r_=o_,n_=function(t){return Object.assign({color:st,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:Wx},t)},s_=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Hx},notes:qx(),title:{font:Nx,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:Fx},overlay:t.gradients?{}:{gradient:"none"},area:Zx(),rangeArea:Qx(),verticalRangeArea:Qx(),bar:{gap:zx,spacing:jx,legendItem:Yx},boxPlot:Kx(),bubble:{border:{width:0},labels:{background:Ux},legendItem:Yx,opacity:.6},bullet:$x(),candlestick:{border:{_brightness:.8,width:1},downColor:Gx,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Dx,width:1},legendItem:Yx,spacing:.3},column:{gap:zx,spacing:jx,legendItem:Yx},heatmap:{labels:{color:"",background:Ux,visible:!0},highlight:{border:{width:0}},legendItem:Yx},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:Yx},donut:{margin:1,legendItem:Yx},funnel:o_(),pyramid:r_(),horizontalWaterfall:i_(),line:Jx(),notes:qx(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:Yx,spacing:.3},radarArea:t_(),radarLine:e_(),radarColumn:{legendItem:Yx},polarArea:t_(),polarLine:e_(),polarScatter:{legendItem:Wx},rangeBar:{gap:zx,spacing:jx,legendItem:Yx},rangeColumn:{gap:zx,spacing:jx,legendItem:Yx},scatter:{legendItem:Wx},scatterLine:{width:1,legendItem:Wx},verticalArea:Zx(),verticalBoxPlot:Kx(),verticalBullet:$x(),verticalLine:Jx(),waterfall:i_(),linearTrendline:n_(),exponentialTrendline:n_({style:"smooth"}),logarithmicTrendline:n_({style:"smooth"}),polynomialTrendline:n_({style:"smooth"}),powerTrendline:n_({style:"smooth"}),movingAverageTrendline:n_()},title:{font:Nx},subtitle:{font:Hx},legend:{labels:{font:Hx}}}},a_="--kendo-chart-series-",h_=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},l_={},p_=function(t){return{pointer:{color:B(t,"--kendo-chart-gauge-pointer")},scale:{labels:{color:B(t,"--kendo-chart-text")},rangePlaceholderColor:B(t,"--kendo-chart-gauge-track"),minorTicks:{color:B(t,"--kendo-chart-text")},majorTicks:{color:B(t,"--kendo-chart-text")},line:{color:B(t,"--kendo-chart-text")}}}},c_=function(t){return{labels:{color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family"),stroke:{color:B(t,"--kendo-chart-bg")}},links:{color:B(t,"--kendo-color-subtle")},nodeColors:Rx(t)}},u_=function(t){return{axisDefaults:{crosshair:{color:B(t,"--kendo-chart-crosshair-bg")},labels:{color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family")},line:{color:B(t,"--kendo-chart-major-lines")},majorGridLines:{color:B(t,"--kendo-chart-major-lines")},minorGridLines:{color:B(t,"--kendo-chart-minor-lines")},notes:{icon:{background:B(t,"--kendo-chart-notes-bg"),border:{color:B(t,"--kendo-chart-notes-border")}},line:{color:B(t,"--kendo-chart-notes-lines")},label:{font:Ex(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family")}},title:{color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family")}},chartArea:{background:B(t,"--kendo-chart-bg")},legend:{inactiveItems:{labels:{color:B(t,"--kendo-chart-inactive")},markers:{color:B(t,"--kendo-chart-inactive")}},labels:{color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family")},title:{color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-font-weight","--kendo-chart-title-font-size","--kendo-font-family")}},seriesColors:Rx(t),seriesDefaults:{area:{opacity:Bx(t,"--kendo-chart-area-opacity"),highlight:{inactiveOpacity:Bx(t,"--kendo-chart-area-inactive-opacity")}},boxPlot:{downColor:B(t,"--kendo-chart-major-lines"),mean:{color:B(t,"--kendo-color-surface")},median:{color:B(t,"--kendo-color-surface")},whiskers:{color:B(t,"--kendo-color-primary")}},bullet:{target:{color:B(t,"--kendo-chart-text")}},candlestick:{downColor:B(t,"--kendo-chart-text"),line:{color:B(t,"--kendo-chart-text")}},errorBars:{color:B(t,"--kendo-chart-error-bars-bg")},horizontalWaterfall:{line:{color:B(t,"--kendo-chart-major-lines")}},icon:{border:{color:B(t,"--kendo-chart-major-lines")}},labels:{background:B(t,"--kendo-chart-bg"),color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family"),opacity:Bx(t,"--kendo-chart-area-opacity")},line:{highlight:{inactiveOpacity:Bx(t,"--kendo-chart-area-inactive-opacity")}},notes:{icon:{background:B(t,"--kendo-chart-notes-bg"),border:{color:B(t,"--kendo-chart-notes-border")}},line:{color:B(t,"--kendo-chart-notes-lines")},label:{font:Ex(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family")}},radarArea:{opacity:Bx(t,"--kendo-chart-area-opacity"),highlight:{inactiveOpacity:Bx(t,"--kendo-chart-area-inactive-opacity")}},verticalArea:{opacity:Bx(t,"--kendo-chart-area-opacity"),highlight:{inactiveOpacity:Bx(t,"--kendo-chart-area-inactive-opacity")}},verticalBoxPlot:{downColor:B(t,"--kendo-chart-major-lines"),mean:{color:B(t,"--kendo-color-surface")},median:{color:B(t,"--kendo-color-surface")},whiskers:{color:B(t,"--kendo-chart-primary-bg")}},verticalBullet:{target:{color:B(t,"--kendo-chart-text")}},verticalLine:{highlight:{inactiveOpacity:Bx(t,"--kendo-chart-area-inactive-opacity")}},verticalWaterfall:{line:{color:B(t,"--kendo-chart-major-lines")}},waterfall:{line:{color:B(t,"--kendo-chart-major-lines")}}},subtitle:{color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")},title:{color:B(t,"--kendo-chart-text"),font:Ex(t,"--kendo-font-weight","--kendo-chart-title-font-size","--kendo-font-family")},paneDefaults:{title:{font:Ex(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")}}}}}return H})())}}});