PageSourceSearch

https://assets.geeksforgeeks.org/gfg-assets/_next/static/chunks/3fff1979-17830d04b200cf91.js

js geeksforgeeks.org collected 2026-09-24 07:58:08 UTC 162,694 bytes, 6 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2757],{66775:function(a,b,c){c.d(b,{kL:function(){return a8},zX:function(){return cF}});var d=c(2454),e=new /*!
2 * Chart.js v3.9.1
3 * https://www.chartjs.org
4 * (c) 2022 Chart.js Contributors
5 * Released under the MIT License
6 */ class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(a,b,c,d){let e=b.listeners[d],f=b.duration;e.forEach(d=>d({chart:a,initial:b.initial,numSteps:f,currentStep:Math.min(c-b.start,f)}))}_refresh(){!this._request&&(this._running=!0,this._request=d.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(a=Date.now()){let b=0;this._charts.forEach((c,d)=>{if(!c.running||!c.items.length)return;let e=c.items,f=e.length-1,g=!1,h;for(;f>=0;--f)(h=e[f])._active?(h._total>c.duration&&(c.duration=h._total),h.tick(a),g=!0):(e[f]=e[e.length-1],e.pop());g&&(d.draw(),this._notify(d,c,a,"progress")),e.length||(c.running=!1,this._notify(d,c,a,"complete"),c.initial=!1),b+=e.length}),this._lastDate=a,0===b&&(this._running=!1)}_getAnims(a){let b=this._charts,c=b.get(a);return c||(c={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},b.set(a,c)),c}listen(a,b,c){this._getAnims(a).listeners[b].push(c)}add(a,b){b&&b.length&&this._getAnims(a).items.push(...b)}has(a){return this._getAnims(a).items.length>0}start(a){let b=this._charts.get(a);b&&(b.running=!0,b.start=Date.now(),b.duration=b.items.reduce((a,b)=>Math.max(a,b._duration),0),this._refresh())}running(a){if(!this._running)return!1;let b=this._charts.get(a);return!!b&&!!b.running&&!!b.items.length}stop(a){let b=this._charts.get(a);if(!b||!b.items.length)return;let c=b.items,d=c.length-1;for(;d>=0;--d)c[d].cancel();b.items=[],this._notify(a,b,Date.now(),"complete")}remove(a){return this._charts.delete(a)}};let f="transparent",g={boolean(a,b,c){return c>.5?b:a},color(a,b,c){let e=(0,d.c)(a||f),g=e.valid&&(0,d.c)(b||f);return g&&g.valid?g.mix(e,c).hexString():b},number(a,b,c){return a+(b-a)*c}};class h{constructor(a,b,c,e){let f=b[c];e=(0,d.a)([a.to,e,f,a.from]);let h=(0,d.a)([a.from,f,e]);this._active=!0,this._fn=a.fn||g[a.type||typeof h],this._easing=d.e[a.easing]||d.e.linear,this._start=Math.floor(Date.now()+(a.delay||0)),this._duration=this._total=Math.floor(a.duration),this._loop=!!a.loop,this._target=b,this._prop=c,this._from=h,this._to=e,this._promises=void 0}active(){return this._active}update(a,b,c){if(this._active){this._notify(!1);let e=this._target[this._prop],f=c-this._start,g=this._duration-f;this._start=c,this._duration=Math.floor(Math.max(g,a.duration)),this._total+=f,this._loop=!!a.loop,this._to=(0,d.a)([a.to,b,e,a.from]),this._from=(0,d.a)([a.from,e,b])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(a){let b=a-this._start,c=this._duration,d=this._prop,e=this._from,f=this._loop,g=this._to,h;if(this._active=e!==g&&(f||b<c),!this._active){this._target[d]=g,this._notify(!0);return}if(b<0){this._target[d]=e;return}h=b/c%2,h=f&&h>1?2-h:h,h=this._easing(Math.min(1,Math.max(0,h))),this._target[d]=this._fn(e,g,h)}wait(){let a=this._promises||(this._promises=[]);return new Promise((b,c)=>{a.push({res:b,rej:c})})}_notify(a){let b=a?"res":"rej",c=this._promises||[];for(let d=0;d<c.length;d++)c[d][b]()}}d.d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});let i=Object.keys(d.d.animation);d.d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:a=>"onProgress"!==a&&"onComplete"!==a&&"fn"!==a}),d.d.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),d.d.describe("animations",{_fallback:"animation"}),d.d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:a=>0|a}}}});
6class j{constructor(a,b){this._chart=a,this._properties=new Map,this.configure(b)}configure(a){if(!(0,d.i)(a))return;let b=this._properties;Object.getOwnPropertyNames(a).forEach(c=>{let e=a[c];if(!(0,d.i)(e))return;let f={};for(let g of i)f[g]=e[g];((0,d.b)(e.properties)&&e.properties||[c]).forEach(a=>{a!==c&&b.has(a)||b.set(a,f)})})}_animateOptions(a,b){let c=b.options,d=l(a,c);if(!d)return[];let e=this._createAnimations(d,c);return c.$shared&&k(a.options.$animations,c).then(()=>{a.options=c},()=>{}),e}_createAnimations(a,b){let c=this._properties,d=[],e=a.$animations||(a.$animations={}),f=Object.keys(b),g=Date.now(),i;for(i=f.length-1;i>=0;--i){let j=f[i];if("$"===j.charAt(0))continue;if("options"===j){d.push(...this._animateOptions(a,b));continue}let k=b[j],l=e[j],m=c.get(j);if(l){if(m&&l.active()){l.update(m,k,g);continue}l.cancel()}if(!m||!m.duration){a[j]=k;continue}e[j]=l=new h(m,a,j,k),d.push(l)}return d}update(a,b){if(0===this._properties.size){Object.assign(a,b);return}let c=this._createAnimations(a,b);if(c.length)return e.add(this._chart,c),!0}}function k(a,b){let c=[],d=Object.keys(b);for(let e=0;e<d.length;e++){let f=a[d[e]];f&&f.active()&&c.push(f.wait())}return Promise.all(c)}function l(a,b){if(!b)return;let c=a.options;if(!c){a.options=b;return}return c.$shared&&(a.options=c=Object.assign({},c,{$shared:!1,$animations:{}})),c}function m(a,b){let c=a&&a.options||{},d=c.reverse,e=void 0===c.min?b:0,f=void 0===c.max?b:0;return{start:d?f:e,end:d?e:f}}function n(a,b){let c=[],d=a._getSortedDatasetMetas(b),e,f;for(e=0,f=d.length;e<f;++e)c.push(d[e].index);return c}function o(a,b,c,e={}){let f=a.keys,g="single"===e.mode,h,i,j,k;if(null!==b){for(h=0,i=f.length;h<i;++h){if((j=+f[h])===c){if(e.all)continue;break}k=a.values[j],(0,d.g)(k)&&(g||0===b||(0,d.s)(b)===(0,d.s)(k))&&(b+=k)}return b}}function p(a,b){let c=a&&a.options.stacked;return c|| void 0===c&& void 0!==b.stack}function q(a,b,c){let d=a[b]||(a[b]={});return d[c]||(d[c]={})}function r(a,b,c,d){for(let e of b.getMatchingVisibleMetas(d).reverse()){let f=a[e.index];if(c&&f>0|| !c&&f<0)return e.index}return null}function s(a,b){var c,d,e;let{chart:f,_cachedMeta:g}=a,h=f._stacks||(f._stacks={}),{iScale:i,vScale:j,index:k}=g,l=i.axis,m=j.axis,n=(c=i,d=j,e=g,`${c.id}.${d.id}.${e.stack||e.type}`),o=b.length,p;for(let s=0;s<o;++s){let t=b[s],{[l]:u,[m]:v}=t,w=t._stacks||(t._stacks={});(p=w[m]=q(h,n,u))[k]=v,p._top=r(p,j,!0,g.type),p._bottom=r(p,j,!1,g.type)}}function t(a,b){let c=a.scales;return Object.keys(c).filter(a=>c[a].axis===b).shift()}function u(a,b){let c=a.controller.index,d=a.vScale&&a.vScale.axis;if(d)for(let e of b=b||a._parsed){let f=e._stacks;if(!f|| void 0===f[d]|| void 0===f[d][c])return;delete f[d][c]}}let v=a=>"reset"===a||"none"===a,w=(a,b)=>b?a:Object.assign({},a),x=(a,b,c)=>a&&!b.hidden&&b._stacked&&{keys:n(c,!0),values:null};class y{constructor(a,b){this.chart=a,this._ctx=a.ctx,this.index=b,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){let a=this._cachedMeta;this.configure(),this.linkScales(),a._stacked=p(a.vScale,a),this.addElements()}updateIndex(a){this.index!==a&&u(this._cachedMeta),this.index=a}linkScales(){let a=this.chart,b=this._cachedMeta,c=this.getDataset(),e=(a,b,c,d)=>"x"===a?b:"r"===a?d:c,f=b.xAxisID=(0,d.v)(c.xAxisID,t(a,"x")),g=b.yAxisID=(0,d.v)(c.yAxisID,t(a,"y")),h=b.rAxisID=(0,d.v)(c.rAxisID,t(a,"r")),i=b.indexAxis,j=b.iAxisID=e(i,f,g,h),k=b.vAxisID=e(i,g,f,h);b.xScale=this.getScaleForId(f),b.yScale=this.getScaleForId(g),b.rScale=this.getScaleForId(h),b.iScale=this.getScaleForId(j),b.vScale=this.getScaleForId(k)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(a){return this.chart.scales[a]}_getOtherScale(a){let b=this._cachedMeta;return a===b.iScale?b.vScale:b.iScale}reset(){this._update("reset")}_destroy(){let a=this._cachedMeta;this._data&&(0,d.u)(this._data,this),a._stacked&&u(a)}_dataCheck(){let a=this.getDataset(),b=a.data||(a.data=[]),c=this._data;if((0,d.i)(b))this._data=function(a){let b=Object.keys(a),c=Array(b.length),d,e,f;for(d=0,e=b.length;d<e;++d)f=b[d],c[d]={x:f,y:a[f]};return c}(b);else if(c!==b){if(c){(0,d.u)(c,this);let e=this._cachedMeta;u(e),e._parsed=[]}b&&Object.isExtensible(b)&&(0,d.l)(b,this),this._syncList=[],this._data=b}}addElements(){let a=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(a.dataset=new this.datasetElementType)}buildOrUpdateElements(a){let b=this._cachedMeta,c=this.getDataset(),d=!1;this._dataCheck();let e=b._stacked;
6b._stacked=p(b.vScale,b),b.stack!==c.stack&&(d=!0,u(b),b.stack=c.stack),this._resyncElements(a),(d||e!==b._stacked)&&s(this,b._parsed)}configure(){let a=this.chart.config,b=a.datasetScopeKeys(this._type),c=a.getOptionScopes(this.getDataset(),b,!0);this.options=a.createResolver(c,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(a,b){let{_cachedMeta:c,_data:e}=this,{iScale:f,_stacked:g}=c,h=f.axis,i=0===a&&b===e.length||c._sorted,j=a>0&&c._parsed[a-1],k,l,m;if(!1===this._parsing)c._parsed=e,c._sorted=!0,m=e;else{m=(0,d.b)(e[a])?this.parseArrayData(c,e,a,b):(0,d.i)(e[a])?this.parseObjectData(c,e,a,b):this.parsePrimitiveData(c,e,a,b);let n=()=>null===l[h]||j&&l[h]<j[h];for(k=0;k<b;++k)c._parsed[k+a]=l=m[k],i&&(n()&&(i=!1),j=l);c._sorted=i}g&&s(this,m)}parsePrimitiveData(a,b,c,d){let{iScale:e,vScale:f}=a,g=e.axis,h=f.axis,i=e.getLabels(),j=e===f,k=Array(d),l,m,n;for(l=0,m=d;l<m;++l)n=l+c,k[l]={[g]:j||e.parse(i[n],n),[h]:f.parse(b[n],n)};return k}parseArrayData(a,b,c,d){let{xScale:e,yScale:f}=a,g=Array(d),h,i,j,k;for(h=0,i=d;h<i;++h)k=b[j=h+c],g[h]={x:e.parse(k[0],j),y:f.parse(k[1],j)};return g}parseObjectData(a,b,c,e){let{xScale:f,yScale:g}=a,{xAxisKey:h="x",yAxisKey:i="y"}=this._parsing,j=Array(e),k,l,m,n;for(k=0,l=e;k<l;++k)n=b[m=k+c],j[k]={x:f.parse((0,d.f)(n,h),m),y:g.parse((0,d.f)(n,i),m)};return j}getParsed(a){return this._cachedMeta._parsed[a]}getDataElement(a){return this._cachedMeta.data[a]}applyStack(a,b,c){let d=this.chart,e=this._cachedMeta,f=b[a.axis],g={keys:n(d,!0),values:b._stacks[a.axis]};return o(g,f,e.index,{mode:c})}updateRangeFromParsed(a,b,c,d){let e=c[b.axis],f=null===e?NaN:e,g=d&&c._stacks[b.axis];d&&g&&(d.values=g,f=o(d,e,this._cachedMeta.index)),a.min=Math.min(a.min,f),a.max=Math.max(a.max,f)}getMinMax(a,b){let c=this._cachedMeta,e=c._parsed,f=c._sorted&&a===c.iScale,g=e.length,h=this._getOtherScale(a),i=x(b,c,this.chart),j={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:k,max:l}=function(a){let{min:b,max:c,minDefined:d,maxDefined:e}=a.getUserBounds();return{min:d?b:Number.NEGATIVE_INFINITY,max:e?c:Number.POSITIVE_INFINITY}}(h),m,n;function o(){n=e[m];let b=n[h.axis];return!(0,d.g)(n[a.axis])||k>b||l<b}for(m=0;m<g&&(o()||(this.updateRangeFromParsed(j,a,n,i),!f));++m);if(f){for(m=g-1;m>=0;--m)if(!o()){this.updateRangeFromParsed(j,a,n,i);break}}return j}getAllParsedValues(a){let b=this._cachedMeta._parsed,c=[],e,f,g;for(e=0,f=b.length;e<f;++e)g=b[e][a.axis],(0,d.g)(g)&&c.push(g);return c}getMaxOverflow(){return!1}getLabelAndValue(a){let b=this._cachedMeta,c=b.iScale,d=b.vScale,e=this.getParsed(a);return{label:c?""+c.getLabelForValue(e[c.axis]):"",value:d?""+d.getLabelForValue(e[d.axis]):""}}_update(a){var b;let c=this._cachedMeta;this.update(a||"default");let e,f,g,h;c._clip=(b=(0,d.v)(this.options.clip,function(a,b,c){if(!1===c)return!1;let d=m(a,c),e=m(b,c);return{top:e.end,right:d.end,bottom:e.start,left:d.start}}(c.xScale,c.yScale,this.getMaxOverflow())),(0,d.i)(b)?(e=b.top,f=b.right,g=b.bottom,h=b.left):e=f=g=h=b,{top:e,right:f,bottom:g,left:h,disabled:!1===b})}update(a){}draw(){let a=this._ctx,b=this.chart,c=this._cachedMeta,d=c.data||[],e=b.chartArea,f=[],g=this._drawStart||0,h=this._drawCount||d.length-g,i=this.options.drawActiveElementsOnTop,j;for(c.dataset&&c.dataset.draw(a,e,g,h),j=g;j<g+h;++j){let k=d[j];!k.hidden&&(k.active&&i?f.push(k):k.draw(a,e))}for(j=0;j<f.length;++j)f[j].draw(a,e)}getStyle(a,b){let c=b?"active":"default";return void 0===a&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(c):this.resolveDataElementOptions(a||0,c)}getContext(a,b,c){var e,f,g,h,i;let j=this.getDataset(),k;if(a>=0&&a<this._cachedMeta.data.length){let l=this._cachedMeta.data[a];(k=l.$context||(l.$context=(e=this.getContext(),f=a,g=l,(0,d.h)(e,{active:!1,dataIndex:f,parsed:void 0,raw:void 0,element:g,index:f,mode:"default",type:"data"})))).parsed=this.getParsed(a),k.raw=j.data[a],k.index=k.dataIndex=a}else(k=this.$context||(this.$context=(h=this.chart.getContext(),i=this.index,(0,d.h)(h,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})))).dataset=j,k.index=k.datasetIndex=this.index;return k.active=!!b,k.mode=c,k}resolveDatasetElementOptions(a){return this._resolveElementOptions(this.datasetElementType.id,a)}resolveDataElementOptions(a,b){return this._resolveElementOptions(this.dataElementType.id,b,a)}_resolveElementOptions(a,b="default",c){let e="active"===b,f=this._cachedDataOpts,g=a+"-"+b,h=f[g],i=this.enableOptionSharing&&(0,d.j)(c);if(h)return w(h,i);let j=this.chart.config,k=j.datasetElementScopeKeys(this._type,a),l=e?[`${a}Hover`,"hover",a,""]:[a,""],m=j.getOptionScopes(this.getDataset(),k),n=Object.keys(d.d.elements[a]),o=()=>this.getContext(c,e),p=j.resolveNamedOptions(m,n,o,l);return p.$shared&&(p.$shared=i,f[g]=Object.freeze(w(p,i))),p}_resolveAnimations(a,b,c){let d=this.chart,e=this._cachedDataOpts,f=`animation-${b}`,g=e[f];if(g)return g;let h;if(!1!==d.options.animation){let i=this.chart.config,k=i.datasetAnimationScopeKeys(this._type,b),l=i.getOptionScopes(this.getDataset(),k);h=i.createResolver(l,this.getContext(a,c,b))}let m=new j(d,h&&h.animations);return h&&h._cacheable&&(e[f]=Object.freeze(m)),m}getSharedOptions(a){if(a.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},a))}includeOptions(a,b){return!b||v(a)||this.chart._animationsDisabled}_getSharedOptions(a,b){let c=this.resolveDataElementOptions(a,b),d=this._sharedOptions,e=this.getSharedOptions(c),f=this.includeOptions(b,e)||e!==d;return this.updateSharedOptions(e,b,c),{sharedOptions:e,includeOptions:f}}updateElement(a,b,c,d){v(d)?Object.assign(a,c):this._resolveAnimations(b,d).update(a,c)}updateSharedOptions(a,b,c){a&&!v(b)&&this._resolveAnimations(void 0,b).update(a,c)}_setStyle(a,b,c,d){a.active=d;let e=this.getStyle(b,d);
6this._resolveAnimations(b,c,d).update(a,{options:!d&&this.getSharedOptions(e)||e})}removeHoverStyle(a,b,c){this._setStyle(a,c,"active",!1)}setHoverStyle(a,b,c){this._setStyle(a,c,"active",!0)}_removeDatasetHoverStyle(){let a=this._cachedMeta.dataset;a&&this._setStyle(a,void 0,"active",!1)}_setDatasetHoverStyle(){let a=this._cachedMeta.dataset;a&&this._setStyle(a,void 0,"active",!0)}_resyncElements(a){let b=this._data,c=this._cachedMeta.data;for(let[d,e,f]of this._syncList)this[d](e,f);this._syncList=[];let g=c.length,h=b.length,i=Math.min(h,g);i&&this.parse(0,i),h>g?this._insertElements(g,h-g,a):h<g&&this._removeElements(h,g-h)}_insertElements(a,b,c=!0){let d=this._cachedMeta,e=d.data,f=a+b,g,h=a=>{for(a.length+=b,g=a.length-1;g>=f;g--)a[g]=a[g-b]};for(h(e),g=a;g<f;++g)e[g]=new this.dataElementType;this._parsing&&h(d._parsed),this.parse(a,b),c&&this.updateElements(e,a,b,"reset")}updateElements(a,b,c,d){}_removeElements(a,b){let c=this._cachedMeta;if(this._parsing){let d=c._parsed.splice(a,b);c._stacked&&u(c,d)}c.data.splice(a,b)}_sync(a){if(this._parsing)this._syncList.push(a);else{let[b,c,d]=a;this[b](c,d)}this.chart._dataChanges.push([this.index,...a])}_onDataPush(){let a=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-a,a])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(a,b){b&&this._sync(["_removeElements",a,b]);let c=arguments.length-2;c&&this._sync(["_insertElements",a,c])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function z(a,b,c,e){return(0,d.b)(a)?function(a,b,c,d){let e=c.parse(a[0],d),f=c.parse(a[1],d),g=Math.min(e,f),h=Math.max(e,f),i=g,j=h;Math.abs(g)>Math.abs(h)&&(i=h,j=g),b[c.axis]=j,b._custom={barStart:i,barEnd:j,start:e,end:f,min:g,max:h}}(a,b,c,e):b[c.axis]=c.parse(a,e),b}function A(a,b,c,d){let e=a.iScale,f=a.vScale,g=e.getLabels(),h=e===f,i=[],j,k,l,m;for(j=c,k=c+d;j<k;++j)m=b[j],(l={})[e.axis]=h||e.parse(g[j],j),i.push(z(m,l,f,j));return i}function B(a){return a&& void 0!==a.barStart&& void 0!==a.barEnd}function C(a,b,c,d){var e;let f=b.borderSkipped,g={};if(!f){a.borderSkipped=g;return}if(!0===f){a.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let h,i,j,k,l,{start:m,end:n,reverse:o,top:p,bottom:q}=((e=a).horizontal?(h=e.base>e.x,i="left",j="right"):(h=e.base<e.y,i="bottom",j="top"),h?(k="end",l="start"):(k="start",l="end"),{start:i,end:j,reverse:h,top:k,bottom:l});"middle"===f&&c&&(a.enableBorderRadius=!0,(c._top||0)===d?f=p:(c._bottom||0)===d?f=q:(g[D(q,m,n,o)]=!0,f=p)),g[D(f,m,n,o)]=!0,a.borderSkipped=g}function D(a,b,c,d){return a=d?F(a=E(a,b,c),c,b):F(a,b,c)}function E(a,b,c){return a===b?c:a===c?b:a}function F(a,b,c){return"start"===a?b:"end"===a?c:a}function G(a,{inflateAmount:b},c){a.inflateAmount="auto"===b?1===c?.33:0:b}y.defaults={},y.prototype.datasetElementType=null,y.prototype.dataElementType=null;class H extends y{parsePrimitiveData(a,b,c,d){return A(a,b,c,d)}parseArrayData(a,b,c,d){return A(a,b,c,d)}parseObjectData(a,b,c,e){let{iScale:f,vScale:g}=a,{xAxisKey:h="x",yAxisKey:i="y"}=this._parsing,j="x"===f.axis?h:i,k="x"===g.axis?h:i,l=[],m,n,o,p;for(m=c,n=c+e;m<n;++m)p=b[m],(o={})[f.axis]=f.parse((0,d.f)(p,j),m),l.push(z((0,d.f)(p,k),o,g,m));return l}updateRangeFromParsed(a,b,c,d){super.updateRangeFromParsed(a,b,c,d);let e=c._custom;e&&b===this._cachedMeta.vScale&&(a.min=Math.min(a.min,e.min),a.max=Math.max(a.max,e.max))}getMaxOverflow(){return 0}getLabelAndValue(a){let b=this._cachedMeta,{iScale:c,vScale:d}=b,e=this.getParsed(a),f=e._custom,g=B(f)?"["+f.start+", "+f.end+"]":""+d.getLabelForValue(e[d.axis]);return{label:""+c.getLabelForValue(e[c.axis]),value:g}}initialize(){this.enableOptionSharing=!0,super.initialize();let a=this._cachedMeta;a.stack=this.getDataset().stack}update(a){let b=this._cachedMeta;this.updateElements(b.data,0,b.data.length,a)}updateElements(a,b,c,e){let f="reset"===e,{index:g,_cachedMeta:{vScale:h}}=this,i=h.getBasePixel(),j=h.isHorizontal(),k=this._getRuler(),{sharedOptions:l,includeOptions:m}=this._getSharedOptions(b,e);for(let n=b;n<b+c;n++){let o=this.getParsed(n),p=f||(0,d.k)(o[h.axis])?{base:i,head:i}:this._calculateBarValuePixels(n),q=this._calculateBarIndexPixels(n,k),r=(o._stacks||{})[h.axis],s={horizontal:j,base:p.base,enableBorderRadius:!r||B(o._custom)||g===r._top||g===r._bottom,x:j?p.head:q.center,y:j?q.center:p.head,height:j?q.size:Math.abs(p.size),width:j?Math.abs(p.size):q.size};m&&(s.options=l||this.resolveDataElementOptions(n,a[n].active?"active":e));let t=s.options||a[n].options;C(s,t,r,g),G(s,t,k.ratio),this.updateElement(a[n],n,s,e)}}_getStacks(a,b){let{iScale:c}=this._cachedMeta,e=c.getMatchingVisibleMetas(this._type).filter(a=>a.controller.options.grouped),f=c.options.stacked,g=[],h=a=>
6{let c=a.controller.getParsed(b),e=c&&c[a.vScale.axis];if((0,d.k)(e)||isNaN(e))return!0};for(let i of e)if(!(void 0!==b&&h(i))&&((!1===f|| -1===g.indexOf(i.stack)|| void 0===f&& void 0===i.stack)&&g.push(i.stack),i.index===a))break;return g.length||g.push(void 0),g}_getStackCount(a){return this._getStacks(void 0,a).length}_getStackIndex(a,b,c){let d=this._getStacks(a,c),e=void 0!==b?d.indexOf(b):-1;return -1===e?d.length-1:e}_getRuler(){let a=this.options,b=this._cachedMeta,c=b.iScale,e=[],f,g;for(f=0,g=b.data.length;f<g;++f)e.push(c.getPixelForValue(this.getParsed(f)[c.axis],f));let h=a.barThickness,i=h||function(a){let b=a.iScale,c=function(a,b){if(!a._cache.$bar){let c=a.getMatchingVisibleMetas(b),e=[];for(let f=0,g=c.length;f<g;f++)e=e.concat(c[f].controller.getAllParsedValues(a));a._cache.$bar=(0,d._)(e.sort((a,b)=>a-b))}return a._cache.$bar}(b,a.type),e=b._length,f,g,h,i,j=()=>{32767!==h&& -32768!==h&&((0,d.j)(i)&&(e=Math.min(e,Math.abs(h-i)||e)),i=h)};for(f=0,g=c.length;f<g;++f)h=b.getPixelForValue(c[f]),j();for(f=0,i=void 0,g=b.ticks.length;f<g;++f)h=b.getPixelForTick(f),j();return e}(b);return{min:i,pixels:e,start:c._startPixel,end:c._endPixel,stackCount:this._getStackCount(),scale:c,grouped:a.grouped,ratio:h?1:a.categoryPercentage*a.barPercentage}}_calculateBarValuePixels(a){let{_cachedMeta:{vScale:b,_stacked:c},options:{base:e,minBarLength:f}}=this,g=e||0,h=this.getParsed(a),i=h._custom,j=B(i),k=h[b.axis],l=0,m=c?this.applyStack(b,h,c):k,n,o;m!==k&&(l=m-k,m=k),j&&(k=i.barStart,m=i.barEnd-i.barStart,0!==k&&(0,d.s)(k)!==(0,d.s)(i.barEnd)&&(l=0),l+=k);let p=(0,d.k)(e)||j?l:e,q=b.getPixelForValue(p);if(Math.abs(o=(n=this.chart.getDataVisibility(a)?b.getPixelForValue(l+m):q)-q)<f){var r,s,t;o=(r=o,s=b,t=g,(0!==r?(0,d.s)(r):(s.isHorizontal()?1:-1)*(s.min>=t?1:-1))*f),k===g&&(q-=o/2);let u=b.getPixelForDecimal(0),v=b.getPixelForDecimal(1),w=Math.min(u,v),x=Math.max(u,v);n=(q=Math.max(Math.min(q,x),w))+o}if(q===b.getPixelForValue(g)){let y=(0,d.s)(o)*b.getLineWidthForValue(g)/2;q+=y,o-=y}return{size:o,base:q,head:n,center:n+o/2}}_calculateBarIndexPixels(a,b){let c=b.scale,e=this.options,f=e.skipNull,g=(0,d.v)(e.maxBarThickness,1/0),h,i;if(b.grouped){let j=f?this._getStackCount(a):b.stackCount,k="flex"===e.barThickness?function(a,b,c,d){let e=b.pixels,f=e[a],g=a>0?e[a-1]:null,h=a<e.length-1?e[a+1]:null,i=c.categoryPercentage;null===g&&(g=f-(null===h?b.end-b.start:h-f)),null===h&&(h=f+f-g);let j=f-(f-Math.min(g,h))/2*i,k=Math.abs(h-g)/2*i;return{chunk:k/d,ratio:c.barPercentage,start:j}}(a,b,e,j):function(a,b,c,e){let f=c.barThickness,g,h;return(0,d.k)(f)?(g=b.min*c.categoryPercentage,h=c.barPercentage):(g=f*e,h=1),{chunk:g/e,ratio:h,start:b.pixels[a]-g/2}}(a,b,e,j),l=this._getStackIndex(this.index,this._cachedMeta.stack,f?a:void 0);h=k.start+k.chunk*l+k.chunk/2,i=Math.min(g,k.chunk*k.ratio)}else h=c.getPixelForValue(this.getParsed(a)[c.axis],a),i=Math.min(g,b.min*b.ratio);return{base:h-i/2,head:h+i/2,center:h,size:i}}draw(){let a=this._cachedMeta,b=a.vScale,c=a.data,d=c.length,e=0;for(;e<d;++e)null!==this.getParsed(e)[b.axis]&&c[e].draw(this._ctx)}}H.id="bar",H.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},H.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class I extends y{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(a,b,c,d){let e=super.parsePrimitiveData(a,b,c,d);for(let f=0;f<e.length;f++)e[f]._custom=this.resolveDataElementOptions(f+c).radius;return e}parseArrayData(a,b,c,e){let f=super.parseArrayData(a,b,c,e);for(let g=0;g<f.length;g++){let h=b[c+g];f[g]._custom=(0,d.v)(h[2],this.resolveDataElementOptions(g+c).radius)}return f}parseObjectData(a,b,c,e){let f=super.parseObjectData(a,b,c,e);for(let g=0;g<f.length;g++){let h=b[c+g];f[g]._custom=(0,d.v)(h&&h.r&&+h.r,this.resolveDataElementOptions(g+c).radius)}return f}getMaxOverflow(){let a=this._cachedMeta.data,b=0;for(let c=a.length-1;c>=0;--c)b=Math.max(b,a[c].size(this.resolveDataElementOptions(c))/2);return b>0&&b}getLabelAndValue(a){let b=this._cachedMeta,{xScale:c,yScale:d}=b,e=this.getParsed(a),f=c.getLabelForValue(e.x),g=d.getLabelForValue(e.y),h=e._custom;return{label:b.label,value:"("+f+", "+g+(h?", "+h:"")+")"}}update(a){let b=this._cachedMeta.data;this.updateElements(b,0,b.length,a)}updateElements(a,b,c,d){let e="reset"===d,{iScale:f,vScale:g}=this._cachedMeta,{sharedOptions:h,includeOptions:i}=this._getSharedOptions(b,d),j=f.axis,k=g.axis;for(let l=b;l<b+c;l++){let m=a[l],n=!e&&this.getParsed(l),o={},p=o[j]=e?f.getPixelForDecimal(.5):f.getPixelForValue(n[j]),q=o[k]=e?g.getBasePixel():g.getPixelForValue(n[k]);o.skip=isNaN(p)||isNaN(q),i&&(o.options=h||this.resolveDataElementOptions(l,m.active?"active":d),e&&(o.options.radius=0)),this.updateElement(m,l,o,d)}}resolveDataElementOptions(a,b){let c=this.getParsed(a),e=super.resolveDataElementOptions(a,b);e.$shared&&(e=Object.assign({},e,{$shared:!1}));
6let f=e.radius;return"active"!==b&&(e.radius=0),e.radius+=(0,d.v)(c&&c._custom,f),e}}I.id="bubble",I.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},I.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};class J extends y{constructor(a,b){super(a,b),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(a,b){let c=this.getDataset().data,e=this._cachedMeta;if(!1===this._parsing)e._parsed=c;else{let f=a=>+c[a];if((0,d.i)(c[a])){let{key:g="value"}=this._parsing;f=a=>+(0,d.f)(c[a],g)}let h,i;for(h=a,i=a+b;h<i;++h)e._parsed[h]=f(h)}}_getRotation(){return(0,d.t)(this.options.rotation-90)}_getCircumference(){return(0,d.t)(this.options.circumference)}_getRotationExtents(){let a=d.T,b=-d.T;for(let c=0;c<this.chart.data.datasets.length;++c)if(this.chart.isDatasetVisible(c)){let e=this.chart.getDatasetMeta(c).controller,f=e._getRotation(),g=e._getCircumference();a=Math.min(a,f),b=Math.max(b,f+g)}return{rotation:a,circumference:b-a}}update(a){let b=this.chart,{chartArea:c}=b,e=this._cachedMeta,f=e.data,g=this.getMaxBorderWidth()+this.getMaxOffset(f)+this.options.spacing,h=Math.max((Math.min(c.width,c.height)-g)/2,0),i=Math.min((0,d.m)(this.options.cutout,h),1),j=this._getRingWeight(this.index),{circumference:k,rotation:l}=this._getRotationExtents(),{ratioX:m,ratioY:n,offsetX:o,offsetY:p}=function(a,b,c){let e=1,f=1,g=0,h=0;if(b<d.T){let i=a,j=i+b,k=Math.cos(i),l=Math.sin(i),m=Math.cos(j),n=Math.sin(j),o=(a,b,e)=>(0,d.p)(a,i,j,!0)?1:Math.max(b,b*c,e,e*c),p=(a,b,e)=>(0,d.p)(a,i,j,!0)?-1:Math.min(b,b*c,e,e*c),q=o(0,k,m),r=o(d.H,l,n),s=p(d.P,k,m),t=p(d.P+d.H,l,n);e=(q-s)/2,f=(r-t)/2,g=-(q+s)/2,h=-(r+t)/2}return{ratioX:e,ratioY:f,offsetX:g,offsetY:h}}(l,k,i),q=(c.width-g)/m,r=(c.height-g)/n,s=(0,d.n)(this.options.radius,Math.max(Math.min(q,r)/2,0)),t=(s-Math.max(s*i,0))/this._getVisibleDatasetWeightTotal();this.offsetX=o*s,this.offsetY=p*s,e.total=this.calculateTotal(),this.outerRadius=s-t*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-t*j,0),this.updateElements(f,0,f.length,a)}_circumference(a,b){let c=this.options,e=this._cachedMeta,f=this._getCircumference();return b&&c.animation.animateRotate||!this.chart.getDataVisibility(a)||null===e._parsed[a]||e.data[a].hidden?0:this.calculateCircumference(e._parsed[a]*f/d.T)}updateElements(a,b,c,d){let e="reset"===d,f=this.chart,g=f.chartArea,h=f.options,i=h.animation,j=(g.left+g.right)/2,k=(g.top+g.bottom)/2,l=e&&i.animateScale,m=l?0:this.innerRadius,n=l?0:this.outerRadius,{sharedOptions:o,includeOptions:p}=this._getSharedOptions(b,d),q=this._getRotation(),r;for(r=0;r<b;++r)q+=this._circumference(r,e);for(r=b;r<b+c;++r){let s=this._circumference(r,e),t=a[r],u={x:j+this.offsetX,y:k+this.offsetY,startAngle:q,endAngle:q+s,circumference:s,outerRadius:n,innerRadius:m};p&&(u.options=o||this.resolveDataElementOptions(r,t.active?"active":d)),q+=s,this.updateElement(t,r,u,d)}}calculateTotal(){let a=this._cachedMeta,b=a.data,c=0,d;for(d=0;d<b.length;d++){let e=a._parsed[d];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(d)&&!b[d].hidden&&(c+=Math.abs(e))}return c}calculateCircumference(a){let b=this._cachedMeta.total;return b>0&&!isNaN(a)?d.T*(Math.abs(a)/b):0}
6getLabelAndValue(a){let b=this._cachedMeta,c=this.chart,e=c.data.labels||[],f=(0,d.o)(b._parsed[a],c.options.locale);return{label:e[a]||"",value:f}}getMaxBorderWidth(a){let b=0,c=this.chart,d,e,f,g,h;if(!a){for(d=0,e=c.data.datasets.length;d<e;++d)if(c.isDatasetVisible(d)){a=(f=c.getDatasetMeta(d)).data,g=f.controller;break}}if(!a)return 0;for(d=0,e=a.length;d<e;++d)"inner"!==(h=g.resolveDataElementOptions(d)).borderAlign&&(b=Math.max(b,h.borderWidth||0,h.hoverBorderWidth||0));return b}getMaxOffset(a){let b=0;for(let c=0,d=a.length;c<d;++c){let e=this.resolveDataElementOptions(c);b=Math.max(b,e.offset||0,e.hoverOffset||0)}return b}_getRingWeightOffset(a){let b=0;for(let c=0;c<a;++c)this.chart.isDatasetVisible(c)&&(b+=this._getRingWeight(c));return b}_getRingWeight(a){return Math.max((0,d.v)(this.chart.data.datasets[a].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}J.id="doughnut",J.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},J.descriptors={_scriptable:a=>"spacing"!==a,_indexable:a=>"spacing"!==a},J.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){let b=a.data;if(b.labels.length&&b.datasets.length){let{labels:{pointStyle:c}}=a.legend.options;return b.labels.map((b,d)=>{let e=a.getDatasetMeta(0),f=e.controller.getStyle(d);return{text:b,fillStyle:f.backgroundColor,strokeStyle:f.borderColor,lineWidth:f.borderWidth,pointStyle:c,hidden:!a.getDataVisibility(d),index:d}})}return[]}},onClick(a,b,c){c.chart.toggleDataVisibility(b.index),c.chart.update()}},tooltip:{callbacks:{title(){return""},label(a){let b=a.label,c=": "+a.formattedValue;return(0,d.b)(b)?(b=b.slice(),b[0]+=c):b+=c,b}}}}};class K extends y{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(a){let b=this._cachedMeta,{dataset:c,data:e=[],_dataset:f}=b,g=this.chart._animationsDisabled,{start:h,count:i}=(0,d.q)(b,e,g);this._drawStart=h,this._drawCount=i,(0,d.w)(b)&&(h=0,i=e.length),c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!f._decimated,c.points=e;let j=this.resolveDatasetElementOptions(a);this.options.showLine||(j.borderWidth=0),j.segment=this.options.segment,this.updateElement(c,void 0,{animated:!g,options:j},a),this.updateElements(e,h,i,a)}updateElements(a,b,c,e){let f="reset"===e,{iScale:g,vScale:h,_stacked:i,_dataset:j}=this._cachedMeta,{sharedOptions:k,includeOptions:l}=this._getSharedOptions(b,e),m=g.axis,n=h.axis,{spanGaps:o,segment:p}=this.options,q=(0,d.x)(o)?o:Number.POSITIVE_INFINITY,r=this.chart._animationsDisabled||f||"none"===e,s=b>0&&this.getParsed(b-1);for(let t=b;t<b+c;++t){let u=a[t],v=this.getParsed(t),w=r?u:{},x=(0,d.k)(v[n]),y=w[m]=g.getPixelForValue(v[m],t),z=w[n]=f||x?h.getBasePixel():h.getPixelForValue(i?this.applyStack(h,v,i):v[n],t);w.skip=isNaN(y)||isNaN(z)||x,w.stop=t>0&&Math.abs(v[m]-s[m])>q,p&&(w.parsed=v,w.raw=j.data[t]),l&&(w.options=k||this.resolveDataElementOptions(t,u.active?"active":e)),r||this.updateElement(u,t,w,e),s=v}}getMaxOverflow(){let a=this._cachedMeta,b=a.dataset,c=b.options&&b.options.borderWidth||0,d=a.data||[];if(!d.length)return c;let e=d[0].size(this.resolveDataElementOptions(0)),f=d[d.length-1].size(this.resolveDataElementOptions(d.length-1));return Math.max(c,e,f)/2}draw(){let a=this._cachedMeta;a.dataset.updateControlPoints(this.chart.chartArea,a.iScale.axis),super.draw()}}K.id="line",K.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},K.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class L extends y{constructor(a,b){super(a,b),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(a){let b=this._cachedMeta,c=this.chart,e=c.data.labels||[],f=(0,d.o)(b._parsed[a].r,c.options.locale);return{label:e[a]||"",value:f}}parseObjectData(a,b,c,e){return d.y.bind(this)(a,b,c,e)}update(a){let b=this._cachedMeta.data;this._updateRadius(),this.updateElements(b,0,b.length,a)}getMinMax(){let a=this._cachedMeta,b={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return a.data.forEach((a,c)=>{let d=this.getParsed(c).r;!isNaN(d)&&this.chart.getDataVisibility(c)&&(d<b.min&&(b.min=d),d>b.max&&(b.max=d))}),b}_updateRadius(){let a=this.chart,b=a.chartArea,c=a.options,d=Math.min(b.right-b.left,b.bottom-b.top),e=Math.max(d/2,0),f=Math.max(c.cutoutPercentage?e/100*c.cutoutPercentage:1,0),g=(e-f)/a.getVisibleDatasetCount();this.outerRadius=e-g*this.index,this.innerRadius=this.outerRadius-g}updateElements(a,b,c,e){let f="reset"===e,g=this.chart,h=g.options,i=h.animation,j=this._cachedMeta.rScale,k=j.xCenter,l=j.yCenter,m=j.getIndexAngle(0)-.5*d.P,n=m,o,p=360/this.countVisibleElements();for(o=0;o<b;++o)n+=this._computeAngle(o,e,p);for(o=b;o<b+c;
6o++){let q=a[o],r=n,s=n+this._computeAngle(o,e,p),t=g.getDataVisibility(o)?j.getDistanceFromCenterForValue(this.getParsed(o).r):0;n=s,f&&(i.animateScale&&(t=0),i.animateRotate&&(r=s=m));let u={x:k,y:l,innerRadius:0,outerRadius:t,startAngle:r,endAngle:s,options:this.resolveDataElementOptions(o,q.active?"active":e)};this.updateElement(q,o,u,e)}}countVisibleElements(){let a=this._cachedMeta,b=0;return a.data.forEach((a,c)=>{!isNaN(this.getParsed(c).r)&&this.chart.getDataVisibility(c)&&b++}),b}_computeAngle(a,b,c){return this.chart.getDataVisibility(a)?(0,d.t)(this.resolveDataElementOptions(a,b).angle||c):0}}L.id="polarArea",L.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},L.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){let b=a.data;if(b.labels.length&&b.datasets.length){let{labels:{pointStyle:c}}=a.legend.options;return b.labels.map((b,d)=>{let e=a.getDatasetMeta(0),f=e.controller.getStyle(d);return{text:b,fillStyle:f.backgroundColor,strokeStyle:f.borderColor,lineWidth:f.borderWidth,pointStyle:c,hidden:!a.getDataVisibility(d),index:d}})}return[]}},onClick(a,b,c){c.chart.toggleDataVisibility(b.index),c.chart.update()}},tooltip:{callbacks:{title(){return""},label(a){return a.chart.data.labels[a.dataIndex]+": "+a.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class M extends J{}M.id="pie",M.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class N extends y{getLabelAndValue(a){let b=this._cachedMeta.vScale,c=this.getParsed(a);return{label:b.getLabels()[a],value:""+b.getLabelForValue(c[b.axis])}}parseObjectData(a,b,c,e){return d.y.bind(this)(a,b,c,e)}update(a){let b=this._cachedMeta,c=b.dataset,d=b.data||[],e=b.iScale.getLabels();if(c.points=d,"resize"!==a){let f=this.resolveDatasetElementOptions(a);this.options.showLine||(f.borderWidth=0);let g={_loop:!0,_fullLoop:e.length===d.length,options:f};this.updateElement(c,void 0,g,a)}this.updateElements(d,0,d.length,a)}updateElements(a,b,c,d){let e=this._cachedMeta.rScale,f="reset"===d;for(let g=b;g<b+c;g++){let h=a[g],i=this.resolveDataElementOptions(g,h.active?"active":d),j=e.getPointPositionForValue(g,this.getParsed(g).r),k=f?e.xCenter:j.x,l=f?e.yCenter:j.y,m={x:k,y:l,angle:j.angle,skip:isNaN(k)||isNaN(l),options:i};this.updateElement(h,g,m,d)}}}N.id="radar",N.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},N.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class O{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(a){let{x:b,y:c}=this.getProps(["x","y"],a);return{x:b,y:c}}hasValue(){return(0,d.x)(this.x)&&(0,d.x)(this.y)}getProps(a,b){let c=this.$animations;if(!b||!c)return this;let d={};return a.forEach(a=>{d[a]=c[a]&&c[a].active()?c[a]._to:this[a]}),d}}O.defaults={},O.defaultRoutes=void 0;let P={values(a){return(0,d.b)(a)?a:""+a},numeric(a,b,c){if(0===a)return"0";let e=this.chart.options.locale,f,g=a;if(c.length>1){let h=Math.max(Math.abs(c[0].value),Math.abs(c[c.length-1].value));(h<1e-4||h>1e15)&&(f="scientific"),g=Q(a,c)}let i=(0,d.z)(Math.abs(g)),j=Math.max(Math.min(-1*Math.floor(i),20),0),k={notation:f,minimumFractionDigits:j,maximumFractionDigits:j};return Object.assign(k,this.options.ticks.format),(0,d.o)(a,e,k)},logarithmic(a,b,c){if(0===a)return"0";let e=a/Math.pow(10,Math.floor((0,d.z)(a)));return 1===e||2===e||5===e?P.numeric.call(this,a,b,c):""}};function Q(a,b){let c=b.length>3?b[2].value-b[1].value:b[1].value-b[0].value;return Math.abs(c)>=1&&a!==Math.floor(a)&&(c=a-Math.floor(a)),c}var R={formatters:P};d.d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(a,b)=>b.lineWidth,tickColor:(a,b)=>b.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:R.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),d.d.route("scale.ticks","color","","color"),d.d.route("scale.grid","color","","borderColor"),d.d.route("scale.grid","borderColor","","borderColor"),d.d.route("scale.title","color","","color"),d.d.describe("scale",{_fallback:!1,_scriptable:a=>!a.startsWith("before")&&!a.startsWith("after")&&"callback"!==a&&"parser"!==a,_indexable:a=>"borderDash"!==a&&"tickBorderDash"!==a}),d.d.describe("scales",{_fallback:"scale"}),d.d.describe("scale.ticks",{_scriptable:a=>"backdropPadding"!==a&&"callback"!==a,_indexable:a=>"backdropPadding"!==a});function S(a,b,c,e,f){let g=(0,d.v)(e,0),h=Math.min((0,d.v)(f,a.length),a.length),i=0,j,k,l;
6for(c=Math.ceil(c),f&&(c=(j=f-e)/Math.floor(j/c)),l=g;l<0;)l=Math.round(g+ ++i*c);for(k=Math.max(g,0);k<h;k++)k===l&&(b.push(a[k]),l=Math.round(g+ ++i*c))}function T(a){let b=a.length,c,d;if(b<2)return!1;for(d=a[0],c=1;c<b;++c)if(a[c]-a[c-1]!==d)return!1;return d}let U=a=>"left"===a?"right":"right"===a?"left":a,V=(a,b,c)=>"top"===b||"left"===b?a[b]+c:a[b]-c;function W(a,b){let c=[],d=a.length/b,e=a.length,f=0;for(;f<e;f+=d)c.push(a[Math.floor(f)]);return c}function X(a,b,c){let d=a.ticks.length,e=Math.min(b,d-1),f=a._startPixel,g=a._endPixel,h=a.getPixelForTick(e),i;if(!c||(i=1===d?Math.max(h-f,g-h):0===b?(a.getPixelForTick(1)-h)/2:(h-a.getPixelForTick(e-1))/2,!((h+=e<b?i:-i)<f-1e-6)&&!(h>g+1e-6)))return h}function Y(a){return a.drawTicks?a.tickLength:0}function Z(a,b){if(!a.display)return 0;let c=(0,d.O)(a.font,b),e=(0,d.K)(a.padding),f=(0,d.b)(a.text)?a.text.length:1;return f*c.lineHeight+e.height}class $ extends O{constructor(a){super(),this.id=a.id,this.type=a.type,this.options=void 0,this.ctx=a.ctx,this.chart=a.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(a){this.options=a.setContext(this.getContext()),this.axis=a.axis,this._userMin=this.parse(a.min),this._userMax=this.parse(a.max),this._suggestedMin=this.parse(a.suggestedMin),this._suggestedMax=this.parse(a.suggestedMax)}parse(a,b){return a}getUserBounds(){let{_userMin:a,_userMax:b,_suggestedMin:c,_suggestedMax:e}=this;return a=(0,d.B)(a,Number.POSITIVE_INFINITY),b=(0,d.B)(b,Number.NEGATIVE_INFINITY),c=(0,d.B)(c,Number.POSITIVE_INFINITY),e=(0,d.B)(e,Number.NEGATIVE_INFINITY),{min:(0,d.B)(a,c),max:(0,d.B)(b,e),minDefined:(0,d.g)(a),maxDefined:(0,d.g)(b)}}getMinMax(a){let{min:b,max:c,minDefined:e,maxDefined:f}=this.getUserBounds(),g;if(e&&f)return{min:b,max:c};let h=this.getMatchingVisibleMetas();for(let i=0,j=h.length;i<j;++i)g=h[i].controller.getMinMax(this,a),e||(b=Math.min(b,g.min)),f||(c=Math.max(c,g.max));return b=f&&b>c?c:b,c=e&&b>c?b:c,{min:(0,d.B)(b,(0,d.B)(c,b)),max:(0,d.B)(c,(0,d.B)(b,c))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let a=this.chart.data;return this.options.labels||(this.isHorizontal()?a.xLabels:a.yLabels)||a.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,d.C)(this.options.beforeUpdate,[this])}update(a,b,c){let{beginAtZero:e,grace:f,ticks:g}=this.options,h=g.sampleSize;this.beforeUpdate(),this.maxWidth=a,this.maxHeight=b,this._margins=c=Object.assign({left:0,right:0,top:0,bottom:0},c),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+c.left+c.right:this.height+c.top+c.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,d.D)(this,f,e),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let i=h<this.ticks.length;this._convertTicksToLabels(i?W(this.ticks,h):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),g.display&&(g.autoSkip||"auto"===g.source)&&(this.ticks=function(a,b){let c=a.options.ticks,e=c.maxTicksLimit||function a(b){let c=b.options.offset,d=b._tickSize(),e=b._length/d+(c?0:1),f=b._maxLength/d;return Math.floor(Math.min(e,f))}(a),f=c.major.enabled?function a(b){let c=[],d,e;for(d=0,e=b.length;d<e;d++)b[d].major&&c.push(d);return c}(b):[],g=f.length,h=f[0],i=f[g-1],j=[];if(g>e)return function a(b,c,d,e){let f=0,g=d[0],h;for(h=0,e=Math.ceil(e);h<b.length;h++)h===g&&(c.push(b[h]),g=d[++f*e])}(b,j,f,g/e),j;let k=function a(b,c,e){let f=T(b),g=c.length/e;if(!f)return Math.max(g,1);let h=(0,d.A)(f);for(let i=0,j=h.length-1;i<j;i++){let k=h[i];if(k>g)return k}return Math.max(g,1)}(f,b,e);if(g>0){let l,m,n=g>1?Math.round((i-h)/(g-1)):null;for(S(b,j,k,(0,d.k)(n)?0:h-n,h),l=0,m=g-1;l<m;l++)S(b,j,k,f[l],f[l+1]);return S(b,j,k,i,(0,d.k)(n)?b.length:i+n),j}return S(b,j,k),j}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),i&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let a=this.options.reverse,b,c;this.isHorizontal()?(b=this.left,c=this.right):(b=this.top,c=this.bottom,a=!a),this._startPixel=b,this._endPixel=c,this._reversePixels=a,this._length=c-b,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,d.C)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,d.C)(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){(0,d.C)(this.options.afterSetDimensions,[this])}_callHooks(a){this.chart.notifyPlugins(a,this.getContext()),(0,d.C)(this.options[a],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,d.C)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(a){let b=this.options.ticks,c,e,f;for(c=0,e=a.length;c<e;c++)(f=a[c]).label=(0,d.C)(b.callback,[f.value,c,a],this)}afterTickToLabelConversion(){(0,d.C)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,d.C)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let a=this.options,b=a.ticks,c=this.ticks.length,e=b.minRotation||0,f=b.maxRotation,g=e,h,i,j;if(!this._isVisible()||!b.display||e>=f||c<=1||!this.isHorizontal()){this.labelRotation=e;return}let k=this._getLabelSizes(),l=k.widest.width,m=k.highest.height,n=(0,d.E)(this.chart.width-l,0,this.maxWidth);l+6>(h=a.offset?this.maxWidth/c:n/(c-1))&&(h=n/(c-(a.offset?.5:1)),i=this.maxHeight-Y(a.grid)-b.padding-Z(a.title,this.chart.options.font),j=Math.sqrt(l*l+m*m),g=(0,d.F)(Math.min(Math.asin((0,d.E)((k.highest.height+6)/h,-1,1)),Math.asin((0,d.E)(i/j,-1,1))-Math.asin((0,d.E)(m/j,-1,1)))),g=Math.max(e,Math.min(f,g))),this.labelRotation=g}afterCalculateLabelRotation(){(0,d.C)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,d.C)(this.options.beforeFit,[this])}fit(){let a={width:0,height:0},{chart:b,options:{ticks:c,title:e,grid:f}}=this,g=this._isVisible(),h=this.isHorizontal();if(g){let i=Z(e,b.options.font);if(h?(a.width=this.maxWidth,a.height=Y(f)+i):(a.height=this.maxHeight,a.width=Y(f)+i),c.display&&this.ticks.length){let{first:j,last:k,widest:l,highest:m}=this._getLabelSizes(),n=2*c.padding,o=(0,d.t)(this.labelRotation),p=Math.cos(o),q=Math.sin(o);if(h){let r=c.mirror?0:q*l.width+p*m.height;a.height=Math.min(this.maxHeight,a.height+r+n)}
6else{let s=c.mirror?0:p*l.width+q*m.height;a.width=Math.min(this.maxWidth,a.width+s+n)}this._calculatePadding(j,k,q,p)}}this._handleMargins(),h?(this.width=this._length=b.width-this._margins.left-this._margins.right,this.height=a.height):(this.width=a.width,this.height=this._length=b.height-this._margins.top-this._margins.bottom)}_calculatePadding(a,b,c,d){let{ticks:{align:e,padding:f},position:g}=this.options,h=0!==this.labelRotation,i="top"!==g&&"x"===this.axis;if(this.isHorizontal()){let j=this.getPixelForTick(0)-this.left,k=this.right-this.getPixelForTick(this.ticks.length-1),l=0,m=0;h?i?(l=d*a.width,m=c*b.height):(l=c*a.height,m=d*b.width):"start"===e?m=b.width:"end"===e?l=a.width:"inner"!==e&&(l=a.width/2,m=b.width/2),this.paddingLeft=Math.max((l-j+f)*this.width/(this.width-j),0),this.paddingRight=Math.max((m-k+f)*this.width/(this.width-k),0)}else{let n=b.height/2,o=a.height/2;"start"===e?(n=0,o=a.height):"end"===e&&(n=b.height,o=0),this.paddingTop=n+f,this.paddingBottom=o+f}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,d.C)(this.options.afterFit,[this])}isHorizontal(){let{axis:a,position:b}=this.options;return"top"===b||"bottom"===b||"x"===a}isFullSize(){return this.options.fullSize}_convertTicksToLabels(a){this.beforeTickToLabelConversion(),this.generateTickLabels(a);let b,c;for(b=0,c=a.length;b<c;b++)(0,d.k)(a[b].label)&&(a.splice(b,1),c--,b--);this.afterTickToLabelConversion()}_getLabelSizes(){let a=this._labelSizes;if(!a){let b=this.options.ticks.sampleSize,c=this.ticks;b<c.length&&(c=W(c,b)),this._labelSizes=a=this._computeLabelSizes(c,c.length)}return a}_computeLabelSizes(a,b){var c,e;let{ctx:f,_longestTextCache:g}=this,h=[],i=[],j=0,k=0,l,m,n,o,p,q,r,s,t,u,v;for(l=0;l<b;++l){if(o=a[l].label,p=this._resolveTickFontOptions(l),f.font=q=p.string,r=g[q]=g[q]||{data:{},gc:[]},s=p.lineHeight,t=u=0,(0,d.k)(o)||(0,d.b)(o)){if((0,d.b)(o))for(m=0,n=o.length;m<n;++m)v=o[m],(0,d.k)(v)||(0,d.b)(v)||(t=(0,d.G)(f,r.data,r.gc,t,v),u+=s)}else t=(0,d.G)(f,r.data,r.gc,t,o),u=s;h.push(t),i.push(u),j=Math.max(t,j),k=Math.max(u,k)}c=g,e=b,(0,d.Q)(c,a=>{let b=a.gc,c=b.length/2,d;if(c>e){for(d=0;d<c;++d)delete a.data[b[d]];b.splice(0,c)}});let w=h.indexOf(j),x=i.indexOf(k),y=a=>({width:h[a]||0,height:i[a]||0});return{first:y(0),last:y(b-1),widest:y(w),highest:y(x),widths:h,heights:i}}getLabelForValue(a){return a}getPixelForValue(a,b){return NaN}getValueForPixel(a){}getPixelForTick(a){let b=this.ticks;return a<0||a>b.length-1?null:this.getPixelForValue(b[a].value)}getPixelForDecimal(a){this._reversePixels&&(a=1-a);let b=this._startPixel+a*this._length;return(0,d.I)(this._alignToPixels?(0,d.J)(this.chart,b,0):b)}getDecimalForPixel(a){let b=(a-this._startPixel)/this._length;return this._reversePixels?1-b:b}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:a,max:b}=this;return a<0&&b<0?b:a>0&&b>0?a:0}getContext(a){var b,c,e,f,g;let h=this.ticks||[];if(a>=0&&a<h.length){let i=h[a];return i.$context||(i.$context=(b=this.getContext(),c=a,e=i,(0,d.h)(b,{tick:e,index:c,type:"tick"})))}return this.$context||(this.$context=(f=this.chart.getContext(),g=this,(0,d.h)(f,{scale:g,type:"scale"})))}_tickSize(){let a=this.options.ticks,b=(0,d.t)(this.labelRotation),c=Math.abs(Math.cos(b)),e=Math.abs(Math.sin(b)),f=this._getLabelSizes(),g=a.autoSkipPadding||0,h=f?f.widest.width+g:0,i=f?f.highest.height+g:0;return this.isHorizontal()?i*c>h*e?h/c:i/e:i*e<h*c?i/c:h/e}_isVisible(){let a=this.options.display;return"auto"!==a?!!a:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(a){let b=this.axis,c=this.chart,e=this.options,{grid:f,position:g}=e,h=f.offset,i=this.isHorizontal(),j=this.ticks,k=j.length+(h?1:0),l=Y(f),m=[],n=f.setContext(this.getContext()),o=n.drawBorder?n.borderWidth:0,p=o/2,q=function(a){return(0,d.J)(c,a,o)},r,s,t,u,v,w,x,y,z,A,B,C;if("top"===g)r=q(this.bottom),w=this.bottom-l,y=r-p,A=q(a.top)+p,C=a.bottom;else if("bottom"===g)r=q(this.top),A=a.top,C=q(a.bottom)-p,w=r+p,y=this.top+l;else if("left"===g)r=q(this.right),v=this.right-l,x=r-p,z=q(a.left)+p,B=a.right;else if("right"===g)r=q(this.left),z=a.left,B=q(a.right)-p,v=r+p,x=this.left+l;else if("x"===b){if("center"===g)r=q((a.top+a.bottom)/2+.5);else if((0,d.i)(g)){let D=Object.keys(g)[0],E=g[D];r=q(this.chart.scales[D].getPixelForValue(E))}A=a.top,C=a.bottom,w=r+p,y=w+l}else if("y"===b){if("center"===g)r=q((a.left+a.right)/2);else if((0,d.i)(g)){let F=Object.keys(g)[0],G=g[F];r=q(this.chart.scales[F].getPixelForValue(G))}x=(v=r-p)-l,z=a.left,B=a.right}let H=(0,d.v)(e.ticks.maxTicksLimit,k),I=Math.max(1,Math.ceil(k/H));for(s=0;s<k;s+=I){let J=f.setContext(this.getContext(s)),K=J.lineWidth,L=J.color,M=J.borderDash||[],N=J.borderDashOffset,O=J.tickWidth,P=J.tickColor,Q=J.tickBorderDash||[],R=J.tickBorderDashOffset;void 0!==(t=X(this,s,h))&&(u=(0,d.J)(c,t,K),i?v=x=z=B=u:w=y=A=C=u,m.push({tx1:v,ty1:w,tx2:x,ty2:y,x1:z,y1:A,x2:B,y2:C,width:K,color:L,borderDash:M,borderDashOffset:N,tickWidth:O,tickColor:P,tickBorderDash:Q,tickBorderDashOffset:R}))}return this._ticksLength=k,this._borderValue=r,m}_computeLabelItems(a){let b=this.axis,c=this.options,{position:e,ticks:f}=c,g=this.isHorizontal(),h=this.ticks,{align:i,crossAlign:j,padding:k,mirror:l}=f,m=Y(c.grid),n=m+k,o=l?-k:n,p=-(0,d.t)(this.labelRotation),q=[],r,s,t,u,v,w,x,y,z,A,B,C,D="middle";if("top"===e)w=this.bottom-o,x=this._getXAxisLabelAlignment();else if("bottom"===e)w=this.top+o,x=this._getXAxisLabelAlignment();else if("left"===e){let E=this._getYAxisLabelAlignment(m);x=E.textAlign,v=E.x}else if("right"===e){let F=this._getYAxisLabelAlignment(m);x=F.textAlign,v=F.x}else if("x"===b){if("center"===e)w=(a.top+a.bottom)/2+n;else if((0,d.i)(e)){let G=Object.keys(e)[0],H=e[G];w=this.chart.scales[G].getPixelForValue(H)+n}x=this._getXAxisLabelAlignment()}else if("y"===b){if("center"===e)v=(a.left+a.right)/2-n;else if((0,d.i)(e)){let I=Object.keys(e)[0],J=e[I];v=this.chart.scales[I].getPixelForValue(J)}x=this._getYAxisLabelAlignment(m).textAlign}"y"===b&&("start"===i?D="top":"end"===i&&(D="bottom"));let K=this._getLabelSizes();for(r=0,s=h.length;r<s;++r){u=h[r].label;let L=f.setContext(this.getContext(r));y=this.getPixelForTick(r)+f.labelOffset,A=(z=this._resolveTickFontOptions(r)).lineHeight,B=(0,d.b)(u)?u.length:1;let M=B/2,N=L.color,O=L.textStrokeColor,P=L.textStrokeWidth,Q=x;
6g?(v=y,"inner"===x&&(Q=r===s-1?this.options.reverse?"left":"right":0===r?this.options.reverse?"right":"left":"center"),C="top"===e?"near"===j||0!==p?-B*A+A/2:"center"===j?-K.highest.height/2-M*A+A:-K.highest.height+A/2:"near"===j||0!==p?A/2:"center"===j?K.highest.height/2-M*A:K.highest.height-B*A,l&&(C*=-1)):(w=y,C=(1-B)*A/2);let R;if(L.showLabelBackdrop){let S=(0,d.K)(L.backdropPadding),T=K.heights[r],U=K.widths[r],V=w+C-S.top,W=v-S.left;switch(D){case"middle":V-=T/2;break;case"bottom":V-=T}switch(x){case"center":W-=U/2;break;case"right":W-=U}R={left:W,top:V,width:U+S.width,height:T+S.height,color:L.backdropColor}}q.push({rotation:p,label:u,font:z,color:N,strokeColor:O,strokeWidth:P,textOffset:C,textAlign:Q,textBaseline:D,translation:[v,w],backdrop:R})}return q}_getXAxisLabelAlignment(){let{position:a,ticks:b}=this.options,c=-(0,d.t)(this.labelRotation);if(c)return"top"===a?"left":"right";let e="center";return"start"===b.align?e="left":"end"===b.align?e="right":"inner"===b.align&&(e="inner"),e}_getYAxisLabelAlignment(a){let{position:b,ticks:{crossAlign:c,mirror:d,padding:e}}=this.options,f=this._getLabelSizes(),g=a+e,h=f.widest.width,i,j;return"left"===b?d?(j=this.right+e,"near"===c?i="left":"center"===c?(i="center",j+=h/2):(i="right",j+=h)):(j=this.right-g,"near"===c?i="right":"center"===c?(i="center",j-=h/2):(i="left",j=this.left)):"right"===b?d?(j=this.left+e,"near"===c?i="right":"center"===c?(i="center",j-=h/2):(i="left",j-=h)):(j=this.left+g,"near"===c?i="left":"center"===c?(i="center",j+=h/2):(i="right",j=this.right)):i="right",{textAlign:i,x:j}}_computeLabelArea(){if(this.options.ticks.mirror)return;let a=this.chart,b=this.options.position;return"left"===b||"right"===b?{top:0,left:this.left,bottom:a.height,right:this.right}
6:"top"===b||"bottom"===b?{top:this.top,left:0,bottom:this.bottom,right:a.width}:void 0}drawBackground(){let{ctx:a,options:{backgroundColor:b},left:c,top:d,width:e,height:f}=this;b&&(a.save(),a.fillStyle=b,a.fillRect(c,d,e,f),a.restore())}getLineWidthForValue(a){let b=this.options.grid;if(!this._isVisible()||!b.display)return 0;let c=this.ticks,d=c.findIndex(b=>b.value===a);if(d>=0){let e=b.setContext(this.getContext(d));return e.lineWidth}return 0}drawGrid(a){let b=this.options.grid,c=this.ctx,d=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(a)),e,f,g=(a,b,d)=>{d.width&&d.color&&(c.save(),c.lineWidth=d.width,c.strokeStyle=d.color,c.setLineDash(d.borderDash||[]),c.lineDashOffset=d.borderDashOffset,c.beginPath(),c.moveTo(a.x,a.y),c.lineTo(b.x,b.y),c.stroke(),c.restore())};if(b.display)for(e=0,f=d.length;e<f;++e){let h=d[e];b.drawOnChartArea&&g({x:h.x1,y:h.y1},{x:h.x2,y:h.y2},h),b.drawTicks&&g({x:h.tx1,y:h.ty1},{x:h.tx2,y:h.ty2},{color:h.tickColor,width:h.tickWidth,borderDash:h.tickBorderDash,borderDashOffset:h.tickBorderDashOffset})}}drawBorder(){let{chart:a,ctx:b,options:{grid:c}}=this,e=c.setContext(this.getContext()),f=c.drawBorder?e.borderWidth:0;if(!f)return;let g=c.setContext(this.getContext(0)).lineWidth,h=this._borderValue,i,j,k,l;this.isHorizontal()?(i=(0,d.J)(a,this.left,f)-f/2,j=(0,d.J)(a,this.right,g)+g/2,k=l=h):(k=(0,d.J)(a,this.top,f)-f/2,l=(0,d.J)(a,this.bottom,g)+g/2,i=j=h),b.save(),b.lineWidth=e.borderWidth,b.strokeStyle=e.borderColor,b.beginPath(),b.moveTo(i,k),b.lineTo(j,l),b.stroke(),b.restore()}drawLabels(a){let b=this.options.ticks;if(!b.display)return;let c=this.ctx,e=this._computeLabelArea();e&&(0,d.L)(c,e);let f=this._labelItems||(this._labelItems=this._computeLabelItems(a)),g,h;for(g=0,h=f.length;g<h;++g){let i=f[g],j=i.font,k=i.label;i.backdrop&&(c.fillStyle=i.backdrop.color,c.fillRect(i.backdrop.left,i.backdrop.top,i.backdrop.width,i.backdrop.height));let l=i.textOffset;(0,d.M)(c,k,0,l,j,i)}e&&(0,d.N)(c)}drawTitle(){var a,b,c;let{ctx:e,options:{position:f,title:g,reverse:h}}=this;if(!g.display)return;let i=(0,d.O)(g.font),j=(0,d.K)(g.padding),k=g.align,l=i.lineHeight/2;"bottom"===f||"center"===f||(0,d.i)(f)?(l+=j.bottom,(0,d.b)(g.text)&&(l+=i.lineHeight*(g.text.length-1))):l+=j.top;let{titleX:m,titleY:n,maxWidth:o,rotation:p}=function(a,b,c,e){let{top:f,left:g,bottom:h,right:i,chart:j}=a,{chartArea:k,scales:l}=j,m=0,n,o,p,q=h-f,r=i-g;if(a.isHorizontal()){if(o=(0,d.S)(e,g,i),(0,d.i)(c)){let s=Object.keys(c)[0],t=c[s];p=l[s].getPixelForValue(t)+q-b}else p="center"===c?(k.bottom+k.top)/2+q-b:V(a,c,b);n=i-g}else{if((0,d.i)(c)){let u=Object.keys(c)[0],v=c[u];o=l[u].getPixelForValue(v)-r+b}else o="center"===c?(k.left+k.right)/2-r+b:V(a,c,b);
6p=(0,d.S)(e,h,f),m="left"===c?-d.H:d.H}return{titleX:o,titleY:p,maxWidth:n,rotation:m}}(this,l,f,k),q;(0,d.M)(e,g.text,0,0,i,{color:g.color,maxWidth:o,rotation:p,textAlign:(a=k,b=f,c=h,q=(0,d.R)(a),(c&&"right"!==b|| !c&&"right"===b)&&(q=U(q)),q),textBaseline:"middle",translation:[m,n]})}draw(a){this._isVisible()&&(this.drawBackground(),this.drawGrid(a),this.drawBorder(),this.drawTitle(),this.drawLabels(a))}_layers(){let a=this.options,b=a.ticks&&a.ticks.z||0,c=(0,d.v)(a.grid&&a.grid.z,-1);return this._isVisible()&&this.draw===$.prototype.draw?[{z:c,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:c+1,draw:()=>{this.drawBorder()}},{z:b,draw:a=>{this.drawLabels(a)}}]:[{z:b,draw:a=>{this.draw(a)}}]}getMatchingVisibleMetas(a){let b=this.chart.getSortedVisibleDatasetMetas(),c=this.axis+"AxisID",d=[],e,f;for(e=0,f=b.length;e<f;++e){let g=b[e];g[c]!==this.id||a&&g.type!==a||d.push(g)}return d}_resolveTickFontOptions(a){let b=this.options.ticks.setContext(this.getContext(a));return(0,d.O)(b.font)}_maxDigits(){let a=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/a}}class _{constructor(a,b,c){this.type=a,this.scope=b,this.override=c,this.items=Object.create(null)}isForType(a){return Object.prototype.isPrototypeOf.call(this.type.prototype,a.prototype)}register(a){let b=Object.getPrototypeOf(a),c;ac(b)&&(c=this.register(b));let e=this.items,f=a.id,g=this.scope+"."+f;if(!f)throw Error("class does not have id: "+a);return f in e||(e[f]=a,aa(a,g,c),this.override&&d.d.override(a.id,a.overrides)),g}get(a){return this.items[a]}unregister(a){let b=this.items,c=a.id,e=this.scope;c in b&&delete b[c],e&&c in d.d[e]&&(delete d.d[e][c],this.override&&delete d.U[c])}}function aa(a,b,c){let e=(0,d.V)(Object.create(null),[c?d.d.get(c):{},d.d.get(b),a.defaults]);d.d.set(b,e),a.defaultRoutes&&ab(b,a.defaultRoutes),a.descriptors&&d.d.describe(b,a.descriptors)}function ab(a,b){Object.keys(b).forEach(c=>{let e=c.split("."),f=e.pop(),g=[a].concat(e).join("."),h=b[c].split("."),i=h.pop(),j=h.join(".");d.d.route(g,f,j,i)})}function ac(a){return"id"in a&&"defaults"in a}var ad=new class{constructor(){this.controllers=new _(y,"datasets",!0),this.elements=new _(O,"elements"),this.plugins=new _(Object,"plugins"),this.scales=new _($,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...a){this._each("register",a)}remove(...a){this._each("unregister",a)}addControllers(...a){this._each("register",a,this.controllers)}addElements(...a){this._each("register",a,this.elements)}addPlugins(...a){this._each("register",a,this.plugins)}addScales(...a){this._each("register",a,this.scales)}getController(a){return this._get(a,this.controllers,"controller")}getElement(a){return this._get(a,this.elements,"element")}getPlugin(a){return this._get(a,this.plugins,"plugin")}getScale(a){return this._get(a,this.scales,"scale")}removeControllers(...a){this._each("unregister",a,this.controllers)}removeElements(...a){this._each("unregister",a,this.elements)}removePlugins(...a){this._each("unregister",a,this.plugins)}removeScales(...a){this._each("unregister",a,this.scales)}_each(a,b,c){[...b].forEach(b=>{let e=c||this._getRegistryForType(b);c||e.isForType(b)||e===this.plugins&&b.id?this._exec(a,e,b):(0,d.Q)(b,b=>{let d=c||this._getRegistryForType(b);this._exec(a,d,b)})})}_exec(a,b,c){let e=(0,d.W)(a);(0,d.C)(c["before"+e],[],c),b[a](c),(0,d.C)(c["after"+e],[],c)}_getRegistryForType(a){for(let b=0;b<this._typedRegistries.length;b++){let c=this._typedRegistries[b];if(c.isForType(a))return c}return this.plugins}_get(a,b,c){let d=b.get(a);if(void 0===d)throw Error('"'+a+'" is not a registered '+c+".");return d}};class ae extends y{update(a){let b=this._cachedMeta,{data:c=[]}=b,e=this.chart._animationsDisabled,{start:f,count:g}=(0,d.q)(b,c,e);if(this._drawStart=f,this._drawCount=g,(0,d.w)(b)&&(f=0,g=c.length),this.options.showLine){let{dataset:h,_dataset:i}=b;h._chart=this.chart,h._datasetIndex=this.index,h._decimated=!!i._decimated,h.points=c;let j=this.resolveDatasetElementOptions(a);j.segment=this.options.segment,this.updateElement(h,void 0,{animated:!e,options:j},a)}this.updateElements(c,f,g,a)}addElements(){let{showLine:a}=this.options;!this.datasetElementType&&a&&(this.datasetElementType=ad.getElement("line")),super.addElements()}updateElements(a,b,c,e){let f="reset"===e,{iScale:g,vScale:h,_stacked:i,_dataset:j}=this._cachedMeta,k=this.resolveDataElementOptions(b,e),l=this.getSharedOptions(k),m=this.includeOptions(e,l),n=g.axis,o=h.axis,{spanGaps:p,segment:q}=this.options,r=(0,d.x)(p)?p:Number.POSITIVE_INFINITY,s=this.chart._animationsDisabled||f||"none"===e,t=b>0&&this.getParsed(b-1);for(let u=b;u<b+c;++u){let v=a[u],w=this.getParsed(u),x=s?v:{}
6,y=(0,d.k)(w[o]),z=x[n]=g.getPixelForValue(w[n],u),A=x[o]=f||y?h.getBasePixel():h.getPixelForValue(i?this.applyStack(h,w,i):w[o],u);x.skip=isNaN(z)||isNaN(A)||y,x.stop=u>0&&Math.abs(w[n]-t[n])>r,q&&(x.parsed=w,x.raw=j.data[u]),m&&(x.options=l||this.resolveDataElementOptions(u,v.active?"active":e)),s||this.updateElement(v,u,x,e),t=w}this.updateSharedOptions(l,e,k)}getMaxOverflow(){let a=this._cachedMeta,b=a.data||[];if(!this.options.showLine){let c=0;for(let d=b.length-1;d>=0;--d)c=Math.max(c,b[d].size(this.resolveDataElementOptions(d))/2);return c>0&&c}let e=a.dataset,f=e.options&&e.options.borderWidth||0;if(!b.length)return f;let g=b[0].size(this.resolveDataElementOptions(0)),h=b[b.length-1].size(this.resolveDataElementOptions(b.length-1));return Math.max(f,g,h)/2}}ae.id="scatter",ae.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},ae.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(a){return"("+a.label+", "+a.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var af=Object.freeze({__proto__:null,BarController:H,BubbleController:I,DoughnutController:J,LineController:K,PolarAreaController:L,PieController:M,RadarController:N,ScatterController:ae});function ag(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}class ah{constructor(a){this.options=a||{}}init(a){}formats(){return ag()}parse(a,b){return ag()}format(a,b){return ag()}add(a,b,c){return ag()}diff(a,b,c){return ag()}startOf(a,b,c){return ag()}endOf(a,b){return ag()}}ah.override=function(a){Object.assign(ah.prototype,a)};var ai={_date:ah};function aj(a,b,c,e){let{controller:f,data:g,_sorted:h}=a,i=f._cachedMeta.iScale;if(i&&b===i.axis&&"r"!==b&&h&&g.length){let j=i._reversePixels?d.Y:d.Z;if(!e)return j(g,b,c);if(f._sharedOptions){let k=g[0],l="function"==typeof k.getRange&&k.getRange(b);if(l){let m=j(g,b,c-l),n=j(g,b,c+l);return{lo:m.lo,hi:n.hi}}}}return{lo:0,hi:g.length-1}}function ak(a,b,c,d,e){let f=a.getSortedVisibleDatasetMetas(),g=c[b];for(let h=0,i=f.length;h<i;++h){let{index:j,data:k}=f[h],{lo:l,hi:m}=aj(f[h],b,g,e);for(let n=l;n<=m;++n){let o=k[n];o.skip||d(o,j,n)}}}function al(a,b,c,e,f){let g=[];if(!f&&!a.isPointInArea(b))return g;let h=function(c,h,i){(f||(0,d.$)(c,a.chartArea,0))&&c.inRange(b.x,b.y,e)&&g.push({element:c,datasetIndex:h,index:i})};return ak(a,c,b,h,!0),g}function am(a,b,c,e,f,g){var h,i,j,k;if(!g&&!a.isPointInArea(b))return[];let l;return"r"!==c||e?function(a,b,c,d,e,f){let g=[],h=function(a){let b=-1!==a.indexOf("x"),
6c=-1!==a.indexOf("y");return function(a,d){let e=b?Math.abs(a.x-d.x):0,f=c?Math.abs(a.y-d.y):0;return Math.sqrt(Math.pow(e,2)+Math.pow(f,2))}}(c),i=Number.POSITIVE_INFINITY;return ak(a,c,b,function(c,j,k){let l=c.inRange(b.x,b.y,e);if(d&&!l)return;let m=c.getCenterPoint(e),n=!!f||a.isPointInArea(m);if(!n&&!l)return;let o=h(b,m);o<i?(g=[{element:c,datasetIndex:j,index:k}],i=o):o===i&&g.push({element:c,datasetIndex:j,index:k})}),g}(a,b,c,e,f,g):(h=a,i=b,j=c,k=f,l=[],ak(h,j,i,function(a,b,c){let{startAngle:e,endAngle:f}=a.getProps(["startAngle","endAngle"],k),{angle:g}=(0,d.a0)(a,{x:i.x,y:i.y});(0,d.p)(g,e,f)&&l.push({element:a,datasetIndex:b,index:c})}),l)}function an(a,b,c,d,e){let f=[],g="x"===c?"inXRange":"inYRange",h=!1;return(ak(a,c,b,(a,d,i)=>{a[g](b[c],e)&&(f.push({element:a,datasetIndex:d,index:i}),h=h||a.inRange(b.x,b.y,e))}),d&&!h)?[]:f}var ao={evaluateInteractionItems:ak,modes:{index(a,b,c,e){let f=(0,d.X)(b,a),g=c.axis||"x",h=c.includeInvisible||!1,i=c.intersect?al(a,f,g,e,h):am(a,f,g,!1,e,h),j=[];return i.length?(a.getSortedVisibleDatasetMetas().forEach(a=>{let b=i[0].index,c=a.data[b];c&&!c.skip&&j.push({element:c,datasetIndex:a.index,index:b})}),j):[]},dataset(a,b,c,e){let f=(0,d.X)(b,a),g=c.axis||"xy",h=c.includeInvisible||!1,i=c.intersect?al(a,f,g,e,h):am(a,f,g,!1,e,h);if(i.length>0){let j=i[0].datasetIndex,k=a.getDatasetMeta(j).data;i=[];for(let l=0;l<k.length;++l)i.push({element:k[l],datasetIndex:j,index:l})}return i},point(a,b,c,e){let f=(0,d.X)(b,a),g=c.axis||"xy",h=c.includeInvisible||!1;return al(a,f,g,e,h)},nearest(a,b,c,e){let f=(0,d.X)(b,a),g=c.axis||"xy",h=c.includeInvisible||!1;return am(a,f,g,c.intersect,e,h)},x(a,b,c,e){let f=(0,d.X)(b,a);return an(a,f,"x",c.intersect,e)},y(a,b,c,e){let f=(0,d.X)(b,a);return an(a,f,"y",c.intersect,e)}}};let ap=["left","top","right","bottom"];function aq(a,b){return a.filter(a=>a.pos===b)}function ar(a,b){return a.filter(a=>-1===ap.indexOf(a.pos)&&a.box.axis===b)}function as(a,b){return a.sort((a,c)=>{let d=b?c:a,e=b?a:c;return d.weight===e.weight?d.index-e.index:d.weight-e.weight})}function at(a,b,c,d){return Math.max(a[c],b[c])+Math.max(a[d],b[d])}function au(a,b){a.top=Math.max(a.top,b.top),a.left=Math.max(a.left,b.left),a.bottom=Math.max(a.bottom,b.bottom),a.right=Math.max(a.right,b.right)}function av(a,b,c,e){let{pos:f,box:g}=c,h=a.maxPadding;if(!(0,d.i)(f)){c.size&&(a[f]-=c.size);let i=e[c.stack]||{size:0,count:1};i.size=Math.max(i.size,c.horizontal?g.height:g.width),c.size=i.size/i.count,a[f]+=c.size}g.getPadding&&au(h,g.getPadding());let j=Math.max(0,b.outerWidth-at(h,a,"left","right")),k=Math.max(0,b.outerHeight-at(h,a,"top","bottom")),l=j!==a.w,m=k!==a.h;return a.w=j,a.h=k,c.horizontal?{same:l,other:m}:{same:m,other:l}}function aw(a,b){let c=b.maxPadding;return function a(d){let e={left:0,top:0,right:0,bottom:0};return d.forEach(a=>{e[a]=Math.max(b[a],c[a])}),e}(a?["left","right"]:["top","bottom"])}function ax(a,b,c,d){let e=[],f,g,h,i,j,k;for(f=0,g=a.length,j=0;f<g;++f){(i=(h=a[f]).box).update(h.width||b.w,h.height||b.h,aw(h.horizontal,b));let{same:l,other:m}=av(b,c,h,d);j|=l&&e.length,k=k||m,i.fullSize||e.push(h)}return j&&ax(e,b,c,d)||k}function ay(a,b,c,d,e){a.top=c,a.left=b,a.right=b+d,a.bottom=c+e,a.width=d,a.height=e}function az(a,b,c,e){let f=c.padding,{x:g,y:h}=b;for(let i of a){let j=i.box,k=e[i.stack]||{count:1,placed:0,weight:1},l=i.stackWeight/k.weight||1;if(i.horizontal){let m=b.w*l,n=k.size||j.height;(0,d.j)(k.start)&&(h=k.start),j.fullSize?ay(j,f.left,h,c.outerWidth-f.right-f.left,n):ay(j,b.left+k.placed,h,m,n),k.start=h,k.placed+=m,h=j.bottom}else{let o=b.h*l,p=k.size||j.width;(0,d.j)(k.start)&&(g=k.start),j.fullSize?ay(j,g,f.top,p,c.outerHeight-f.bottom-f.top):ay(j,g,b.top+k.placed,p,o),k.start=g,k.placed+=o,g=j.right}}b.x=g,b.y=h}d.d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var aA={addBox(a,b){a.boxes||(a.boxes=[]),b.fullSize=b.fullSize||!1,b.position=b.position||"top",b.weight=b.weight||0,b._layers=b._layers||function(){return[{z:0,draw(a){b.draw(a)}}]},a.boxes.push(b)},removeBox(a,b){let c=a.boxes?a.boxes.indexOf(b):-1;-1!==c&&a.boxes.splice(c,1)},configure(a,b,c){b.fullSize=c.fullSize,b.position=c.position,b.weight=c.weight},update(a,b,c,e){if(!a)return;let f=(0,d.K)(a.options.layout.padding),g=Math.max(b-f.width,0),h=Math.max(c-f.height,0),i=function(a){let b=function(a){let b=[],c,d,e,f,g,h;for(c=0,d=(a||[]).length;c<d;++c)e=a[c],({position:f,options:{stack:g,stackWeight:h=1}}=e),b.push({index:c,box:e,pos:f,horizontal:e.isHorizontal(),weight:e.weight,stack:g&&f+g,stackWeight:h});return b}(a),c=as(b.filter(a=>a.box.fullSize),!0),d=as(aq(b,"left"),!0),e=as(aq(b,"right")),f=as(aq(b,"top"),!0),g=as(aq(b,"bottom")),h=ar(b,"x"),i=ar(b,"y");return{fullSize:c,leftAndTop:d.concat(f),rightAndBottom:e.concat(i).c
6oncat(g).concat(h),chartArea:aq(b,"chartArea"),vertical:d.concat(e).concat(i),horizontal:f.concat(g).concat(h)}}(a.boxes),j=i.vertical,k=i.horizontal;(0,d.Q)(a.boxes,a=>{"function"==typeof a.beforeLayout&&a.beforeLayout()});let l=j.reduce((a,b)=>b.box.options&& !1===b.box.options.display?a:a+1,0)||1,m=Object.freeze({outerWidth:b,outerHeight:c,padding:f,availableWidth:g,availableHeight:h,vBoxMaxWidth:g/2/l,hBoxMaxHeight:h/2}),n=Object.assign({},f);au(n,(0,d.K)(e));let o=Object.assign({maxPadding:n,w:g,h:h,x:f.left,y:f.top},f),p=function(a,b){let c=function(a){let b={};for(let c of a){let{stack:d,pos:e,stackWeight:f}=c;if(!d||!ap.includes(e))continue;let g=b[d]||(b[d]={count:0,placed:0,weight:0,size:0});g.count++,g.weight+=f}return b}(a),{vBoxMaxWidth:d,hBoxMaxHeight:e}=b,f,g,h;for(f=0,g=a.length;f<g;++f){h=a[f];let{fullSize:i}=h.box,j=c[h.stack],k=j&&h.stackWeight/j.weight;h.horizontal?(h.width=k?k*d:i&&b.availableWidth,h.height=e):(h.width=d,h.height=k?k*e:i&&b.availableHeight)}return c}(j.concat(k),m);ax(i.fullSize,o,m,p),ax(j,o,m,p),ax(k,o,m,p)&&ax(j,o,m,p),function(a){let b=a.maxPadding;function c(c){let d=Math.max(b[c]-a[c],0);return a[c]+=d,d}a.y+=c("top"),a.x+=c("left"),c("right"),c("bottom")}(o),az(i.leftAndTop,o,m,p),o.x+=o.w,o.y+=o.h,az(i.rightAndBottom,o,m,p),a.chartArea={left:o.left,top:o.top,right:o.left+o.w,bottom:o.top+o.h,height:o.h,width:o.w},(0,d.Q)(i.chartArea,b=>{let c=b.box;Object.assign(c,a.chartArea),c.update(o.w,o.h,{left:0,top:0,right:0,bottom:0})})}};class aB{acquireContext(a,b){}releaseContext(a){return!1}addEventListener(a,b,c){}removeEventListener(a,b,c){}getDevicePixelRatio(){return 1}getMaximumSize(a,b,c,d){return b=Math.max(0,b||a.width),c=c||a.height,{width:b,height:Math.max(0,d?Math.floor(b/d):c)}}isAttached(a){return!0}updateConfig(a){}}let aC="$chartjs",aD={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},aE=a=>null===a||""===a,aF=!!d.a5&&{passive:!0};function aG(a,b,c){a.canvas.removeEventListener(b,c,aF)}function aH(a,b){for(let c of a)if(c===b||c.contains(b))return!0}function aI(a,b,c){let d=a.canvas,e=new MutationObserver(a=>{let b=!1;for(let e of a)b=(b=b||aH(e.addedNodes,d))&&!aH(e.removedNodes,d);b&&c()});return e.observe(document,{childList:!0,subtree:!0}),e}function aJ(a,b,c){let d=a.canvas,e=new MutationObserver(a=>{let b=!1;for(let e of a)b=(b=b||aH(e.removedNodes,d))&&!aH(e.addedNodes,d);b&&c()});return e.observe(document,{childList:!0,subtree:!0}),e}let aK=new Map,aL=0;function aM(){let a=window.devicePixelRatio;a!==aL&&(aL=a,aK.forEach((b,c)=>{c.currentDevicePixelRatio!==a&&b()}))}function aN(a,b,c){var e,f;let g=a.canvas,h=g&&(0,d.a2)(g);if(!h)return;let i=(0,d.a4)((a,b)=>{let d=h.clientWidth;c(a,b),d<h.clientWidth&&c()},window),j=new ResizeObserver(a=>{let b=a[0],c=b.contentRect.width,d=b.contentRect.height;(0!==c||0!==d)&&i(c,d)});return j.observe(h),e=a,f=i,aK.size||window.addEventListener("resize",aM),aK.set(e,f),j}function aO(a,b,c){if(c&&c.disconnect(),"resize"===b){var d;d=a,aK.delete(d),aK.size||window.removeEventListener("resize",aM)}}function aP(a,b,c){let e=a.canvas,f=(0,d.a4)(b=>{null!==a.ctx&&c(function(a,b){let c=aD[a.type]||a.type,{x:e,y:f}=(0,d.X)(a,b);return{type:c,chart:b,native:a,x:void 0!==e?e:null,y:void 0!==f?f:null}}(b,a))},a,a=>{let b=a[0];return[b,b.offsetX,b.offsetY]});return!function(a,b,c){a.addEventListener(b,c,aF)}(e,b,f),f}function aQ(a,b){return b|| !1!==a?!0===a?{}:a:null}function aR(a,{plugin:b,local:c},d,e){let f=a.pluginScopeKeys(b),g=a.getOptionScopes(d,f);return c&&b.defaults&&g.push(b.defaults),a.createResolver(g,e,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function aS(a,b){let c=d.d.datasets[a]||{},e=(b.datasets||{})[a]||{};return e.indexAxis||b.indexAxis||c.indexAxis||"x"}function aT(a,b){var c;return"x"===a||"y"===a?a:b.axis||("top"===(c=b.position)||"bottom"===c?"x":"left"===c||"right"===c?"y":void 0)||a.charAt(0).toLowerCase()}function aU(a){let b=a.options||(a.options={});b.plugins=(0,d.v)(b.plugins,{}),b.scales=function(a,b){let c=d.U[a.type]||{scales:{}},e=b.scales||{},f=aS(a.type,b),g=Object.create(null),h=Object.create(null);return Object.keys(e).forEach(a=>{var b,i;let j=e[a];if(!(0,d.i)(j))return console.error(`Invalid scale configuration for scale: ${a}`);if(j._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let k=aT(a,j),l=(b=k,b===(i=f)?"_index_":"_value_"),m=c.scales||{};g[k]=g[k]||a,h[a]=(0,d.ac)(Object.create(null),[{axis:k},j,m[k],m[l]])}
6),a.data.datasets.forEach(c=>{let f=c.type||a.type,i=c.indexAxis||aS(f,b),j=d.U[f]||{},k=j.scales||{};Object.keys(k).forEach(a=>{var b,f;let j,l=(b=a,f=i,j=b,"_index_"===b?j=f:"_value_"===b&&(j="x"===f?"y":"x"),j),m=c[l+"AxisID"]||g[l]||l;h[m]=h[m]||Object.create(null),(0,d.ac)(h[m],[{axis:l},e[m],k[a]])})}),Object.keys(h).forEach(a=>{let b=h[a];(0,d.ac)(b,[d.d.scales[b.type],d.d.scale])}),h}(a,b)}function aV(a){return(a=a||{}).datasets=a.datasets||[],a.labels=a.labels||[],a}let aW=new Map,aX=new Set;function aY(a,b){let c=aW.get(a);return c||(c=b(),aW.set(a,c),aX.add(c)),c}let aZ=(a,b,c)=>{let e=(0,d.f)(b,c);void 0!==e&&a.add(e)};function a$(a,b,c){let e=a.get(b);e||(e=new Map,a.set(b,e));let f=c.join(),g=e.get(f);if(!g){let h=(0,d.aa)(b,c);g={resolver:h,subPrefixes:c.filter(a=>!a.toLowerCase().includes("hover"))},e.set(f,g)}return g}let a_=a=>(0,d.i)(a)&&Object.getOwnPropertyNames(a).reduce((b,c)=>b||(0,d.a8)(a[c]),!1),a0=["top","bottom","left","right","chartArea"];function a1(a,b){return"top"===a||"bottom"===a|| -1===a0.indexOf(a)&&"x"===b}function a2(a,b){return function(c,d){return c[a]===d[a]?c[b]-d[b]:c[a]-d[a]}}function a3(a){let b=a.chart,c=b.options.animation;b.notifyPlugins("afterRender"),(0,d.C)(c&&c.onComplete,[a],b)}function a4(a){return(0,d.a6)()&&"string"==typeof a?a=document.getElementById(a):a&&a.length&&(a=a[0]),a&&a.canvas&&(a=a.canvas),a}let a5={},a6=a=>{let b=a4(a);return Object.values(a5).filter(a=>a.canvas===b).pop()};function a7(a,b,c){let d=Object.keys(a);for(let e of d){let f=+e;if(f>=b){let g=a[e];delete a[e],(c>0||f>b)&&(a[f+c]=g)}}}class a8{constructor(a,b){var c;let f=this.config=new class{constructor(a){var b;this._config=((b=(b=a)||{}).data=aV(b.data),aU(b),b),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(a){this._config.type=a}get data(){return this._config.data}set data(a){this._config.data=aV(a)}get options(){return this._config.options}set options(a){this._config.options=a}get plugins(){return this._config.plugins}update(){let a=this._config;this.clearCache(),aU(a)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(a){return aY(a,()=>[[`datasets.${a}`,""]])}datasetAnimationScopeKeys(a,b){return aY(`${a}.transition.${b}`,()=>[[`datasets.${a}.transitions.${b}`,`transitions.${b}`,],[`datasets.${a}`,""]])}datasetElementScopeKeys(a,b){return aY(`${a}-${b}`,()=>[[`datasets.${a}.elements.${b}`,`datasets.${a}`,`elements.${b}`,""]])}pluginScopeKeys(a){let b=a.id,c=this.type;return aY(`${c}-plugin-${b}`,()=>[[`plugins.${b}`,...a.additionalOptionScopes||[],]])}_cachedScopes(a,b){let c=this._scopeCache,d=c.get(a);return(!d||b)&&(d=new Map,c.set(a,d)),d}getOptionScopes(a,b,c){let{options:e,type:f}=this,g=this._cachedScopes(a,c),h=g.get(b);if(h)return h;let i=new Set;b.forEach(b=>{a&&(i.add(a),b.forEach(b=>aZ(i,a,b))),b.forEach(a=>aZ(i,e,a)),b.forEach(a=>aZ(i,d.U[f]||{},a)),b.forEach(a=>aZ(i,d.d,a)),b.forEach(a=>aZ(i,d.a7,a))});let j=Array.from(i);return 0===j.length&&j.push(Object.create(null)),aX.has(b)&&g.set(b,j),j}chartOptionScopes(){let{options:a,type:b}=this;return[a,d.U[b]||{},d.d.datasets[b]||{},{type:b},d.d,d.a7]}resolveNamedOptions(a,b,c,e=[""]){let f={$shared:!0},{resolver:g,subPrefixes:h}=a$(this._resolverCache,a,e),i=g;if(function a(b,c){let{isScriptable:e,isIndexable:f}=(0,d.ab)(b);for(let g of c){let h=e(g),i=f(g),j=(i||h)&&b[g];if(h&&((0,d.a8)(j)||a_(j))||i&&(0,d.b)(j))return!0}return!1}(g,b)){f.$shared=!1,c=(0,d.a8)(c)?c():c;let j=this.createResolver(a,c,h);i=(0,d.a9)(g,c,j)}for(let k of b)f[k]=i[k];return f}createResolver(a,b,c=[""],e){let{resolver:f}=a$(this._resolverCache,a,c);return(0,d.i)(b)?(0,d.a9)(f,b,void 0,e):f}}(b),g=a4(a),h=a6(g);if(h)throw Error("Canvas is already in use. Chart with ID '"+h.id+"' must be destroyed before the canvas with ID '"+h.canvas.id+"' can be reused.");let i=f.createResolver(f.chartOptionScopes(),this.getContext());this.platform=new(f.platform||(c=g,!(0,d.a6)()||"undefined"!=typeof OffscreenCanvas&&c instanceof OffscreenCanvas?class a extends aB{acquireContext(a){return a&&a.getContext&&a.getContext("2d")||null}updateConfig(a){a.options.animation=!1}}:class a extends aB{acquireContext(a,b){let c=a&&a.getContext&&a.getContext("2d");return c&&c.canvas===a?(!function(a,b){let c=a.style,e=a.getAttribute("height"),f=a.getAttribute("width");
6if(a[aC]={initial:{height:e,width:f,style:{display:c.display,height:c.height,width:c.width}}},c.display=c.display||"block",c.boxSizing=c.boxSizing||"border-box",aE(f)){let g=(0,d.a3)(a,"width");void 0!==g&&(a.width=g)}if(aE(e)){if(""===a.style.height)a.height=a.width/(b||2);else{let h=(0,d.a3)(a,"height");void 0!==h&&(a.height=h)}}return a}(a,b),c):null}releaseContext(a){let b=a.canvas;if(!b[aC])return!1;let c=b[aC].initial;["height","width"].forEach(a=>{let e=c[a];(0,d.k)(e)?b.removeAttribute(a):b.setAttribute(a,e)});let e=c.style||{};return Object.keys(e).forEach(a=>{b.style[a]=e[a]}),b.width=b.width,delete b[aC],!0}addEventListener(a,b,c){this.removeEventListener(a,b);let d=a.$proxies||(a.$proxies={}),e={attach:aI,detach:aJ,resize:aN}[b]||aP;d[b]=e(a,b,c)}removeEventListener(a,b){let c=a.$proxies||(a.$proxies={}),d=c[b];if(!d)return;let e={attach:aO,detach:aO,resize:aO}[b]||aG;e(a,b,d),c[b]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(a,b,c,e){return(0,d.a1)(a,b,c,e)}isAttached(a){let b=(0,d.a2)(a);return!!(b&&b.isConnected)}})),this.platform.updateConfig(f);let j=this.platform.acquireContext(g,i.aspectRatio),k=j&&j.canvas,l=k&&k.height,m=k&&k.width;if(this.id=(0,d.ad)(),this.ctx=j,this.canvas=k,this.width=m,this.height=l,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new class{constructor(){this._init=[]}notify(a,b,c,d){"beforeInit"===b&&(this._init=this._createDescriptors(a,!0),this._notify(this._init,a,"install"));let e=d?this._descriptors(a).filter(d):this._descriptors(a),f=this._notify(e,a,b,c);return"afterDestroy"===b&&(this._notify(e,a,"stop"),this._notify(this._init,a,"uninstall")),f}_notify(a,b,c,e){for(let f of(e=e||{},a)){let g=f.plugin,h=g[c],i=[b,e,f.options];if(!1===(0,d.C)(h,i,g)&&e.cancelable)return!1}return!0}invalidate(){(0,d.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(a){if(this._cache)return this._cache;let b=this._cache=this._createDescriptors(a);return this._notifyStateChanges(a),b}_createDescriptors(a,b){let c=a&&a.config,e=(0,d.v)(c.options&&c.options.plugins,{}),f=function a(b){let c={},d=[],e=Object.keys(ad.plugins.items);for(let f=0;f<e.length;f++)d.push(ad.getPlugin(e[f]));let g=b.plugins||[];for(let h=0;h<g.length;h++){let i=g[h];-1===d.indexOf(i)&&(d.push(i),c[i.id]=!0)}return{plugins:d,localIds:c}}(c);return!1!==e||b?function a(b,{plugins:c,localIds:d},e,f){let g=[],h=b.getContext();for(let i of c){let j=i.id,k=aQ(e[j],f);null!==k&&g.push({plugin:i,options:aR(b.config,{plugin:i,local:d[j]},k,h)})}return g}(a,f,e,b):[]}_notifyStateChanges(a){let b=this._oldCache||[],c=this._cache,d=(a,b)=>a.filter(a=>!b.some(b=>a.plugin.id===b.plugin.id));this._notify(d(b,c),a,"stop"),this._notify(d(c,b),a,"start")}},this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,d.ae)(a=>this.update(a),i.resizeDelay||0),this._dataChanges=[],a5[this.id]=this,!j||!k){console.error("Failed to create chart: can't acquire context from the given item");return}e.listen(this,"complete",a3),e.listen(this,"progress",function(a){let b=a.chart,c=b.options.animation;(0,d.C)(c&&c.onProgress,[a],b)}),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:a,maintainAspectRatio:b},width:c,height:e,_aspectRatio:f}=this;return(0,d.k)(a)?b&&f?f:e?c/e:null:a}get data(){return this.config.data}set data(a){this.config.data=a}get options(){return this._options}set options(a){this.config.options=a}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,d.af)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,d.ag)(this.canvas,this.ctx),this}stop(){return e.stop(this),this}resize(a,b){e.running(this)?this._resizeBeforeDraw={width:a,height:b}:this._resize(a,b)}_resize(a,b){let c=this.options,e=this.canvas,f=c.maintainAspectRatio&&this.aspectRatio,g=this.platform.getMaximumSize(e,a,b,f),h=c.devicePixelRatio||this.platform.getDevicePixelRatio(),i=this.width?"resize":"attach";this.width=g.width,this.height=g.height,this._aspectRatio=this.aspectRatio,(0,d.af)(this,h,!0)&&(this.notifyPlugins("resize",{size:g}),(0,d.C)(c.onResize,[this,g],this),this.attached&&this._doResize(i)&&this.render())}ensureScalesHaveIDs(){let a=this.options,b=a.scales||{};(0,d.Q)(b,(a,b)=>{a.id=b})}buildOrUpdateScales(){let a=this.options,b=a.scales,c=this.scales,e=Object.keys(c).reduce((a,b)=>(a[b]=!1,a),{}),f=[];b&&(f=f.concat(Object.keys(b).map(a=>
6{let c=b[a],d=aT(a,c),e="r"===d,f="x"===d;return{options:c,dposition:e?"chartArea":f?"bottom":"left",dtype:e?"radialLinear":f?"category":"linear"}}))),(0,d.Q)(f,b=>{let f=b.options,g=f.id,h=aT(g,f),i=(0,d.v)(f.type,b.dtype);(void 0===f.position||a1(f.position,h)!==a1(b.dposition))&&(f.position=b.dposition),e[g]=!0;let j=null;if(g in c&&c[g].type===i)j=c[g];else{let k=ad.getScale(i);c[(j=new k({id:g,type:i,ctx:this.ctx,chart:this})).id]=j}j.init(f,a)}),(0,d.Q)(e,(a,b)=>{a||delete c[b]}),(0,d.Q)(c,a=>{aA.configure(this,a,a.options),aA.addBox(this,a)})}_updateMetasets(){let a=this._metasets,b=this.data.datasets.length,c=a.length;if(a.sort((a,b)=>a.index-b.index),c>b){for(let d=b;d<c;++d)this._destroyDatasetMeta(d);a.splice(b,c-b)}this._sortedMetasets=a.slice(0).sort(a2("order","index"))}_removeUnreferencedMetasets(){let{_metasets:a,data:{datasets:b}}=this;a.length>b.length&&delete this._stacks,a.forEach((a,c)=>{0===b.filter(b=>b===a._dataset).length&&this._destroyDatasetMeta(c)})}buildOrUpdateControllers(){let a=[],b=this.data.datasets,c,e;for(this._removeUnreferencedMetasets(),c=0,e=b.length;c<e;c++){let f=b[c],g=this.getDatasetMeta(c),h=f.type||this.config.type;if(g.type&&g.type!==h&&(this._destroyDatasetMeta(c),g=this.getDatasetMeta(c)),g.type=h,g.indexAxis=f.indexAxis||aS(h,this.options),g.order=f.order||0,g.index=c,g.label=""+f.label,g.visible=this.isDatasetVisible(c),g.controller)g.controller.updateIndex(c),g.controller.linkScales();else{let i=ad.getController(h),{datasetElementType:j,dataElementType:k}=d.d.datasets[h];Object.assign(i.prototype,{dataElementType:ad.getElement(k),datasetElementType:j&&ad.getElement(j)}),g.controller=new i(this,c),a.push(g.controller)}}return this._updateMetasets(),a}_resetElements(){(0,d.Q)(this.data.datasets,(a,b)=>{this.getDatasetMeta(b).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(a){let b=this.config;b.update();let c=this._options=b.createResolver(b.chartOptionScopes(),this.getContext()),e=this._animationsDisabled=!c.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:a,cancelable:!0}))return;let f=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let g=0;for(let h=0,i=this.data.datasets.length;h<i;h++){let{controller:j}=this.getDatasetMeta(h),k=!e&& -1===f.indexOf(j);j.buildOrUpdateElements(k),g=Math.max(+j.getMaxOverflow(),g)}g=this._minPadding=c.layout.autoPadding?g:0,this._updateLayout(g),e||(0,d.Q)(f,a=>{a.reset()}),this._updateDatasets(a),this.notifyPlugins("afterUpdate",{mode:a}),this._layers.sort(a2("z","_idx"));let{_active:l,_lastEvent:m}=this;m?this._eventHandler(m,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){(0,d.Q)(this.scales,a=>{aA.removeBox(this,a)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let a=this.options,b=new Set(Object.keys(this._listeners)),c=new Set(a.events);(0,d.ah)(b,c)&& !!this._responsiveListeners===a.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:a}=this,b=this._getUniformDataChanges()||[];for(let{method:c,start:d,count:e}of b){let f="_removeElements"===c?-e:e;a7(a,d,f)}}_getUniformDataChanges(){let a=this._dataChanges;if(!a||!a.length)return;this._dataChanges=[];let b=this.data.datasets.length,c=b=>new Set(a.filter(a=>a[0]===b).map((a,b)=>b+","+a.splice(1).join(","))),e=c(0);for(let f=1;f<b;f++)if(!(0,d.ah)(e,c(f)))return;return Array.from(e).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(a){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;aA.update(this,this.width,this.height,a);let b=this.chartArea,c=b.width<=0||b.height<=0;this._layers=[],(0,d.Q)(this.boxes,a=>{(!c||"chartArea"!==a.position)&&(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,b)=>{a._idx=b}),this.notifyPlugins("afterLayout")}_updateDatasets(a){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:a,cancelable:!0})){for(let b=0,c=this.data.datasets.length;b<c;++b)this.getDatasetMeta(b).controller.configure();for(let e=0,f=this.data.datasets.length;e<f;++e)this._updateDataset(e,(0,d.a8)(a)?a({datasetIndex:e}):a);this.notifyPlugins("afterDatasetsUpdate",{mode:a})}}_updateDataset(a,b){let c=this.getDatasetMeta(a),d={meta:c,index:a,mode:b,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",d)&&(c.controller._update(b),d.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",d))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(e.has(this)?this.attached&&!e.running(this)&&e.start(this):(this.draw(),a3({chart:this})))}draw(){let a;if(this._resizeBeforeDraw){let{width:b,height:c}=this._resizeBeforeDraw;this._resize(b,c),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0|| !1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;let d=this._layers;for(a=0;a<d.length&&d[a].z<=0;++a)d[a].draw(this.chartArea);for(this._drawDatasets();a<d.length;++a)d[a].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(a){let b=this._sortedMetasets,c=[],d,e;for(d=0,e=b.length;d<e;++d){let f=b[d];(!a||f.visible)&&c.push(f)}return c}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;let a=this.getSortedVisibleDatasetMetas();for(let b=a.length-1;b>=0;--b)this._drawDataset(a[b]);this.notifyPlugins("afterDatasetsDraw")}
6_drawDataset(a){let b=this.ctx,c=a._clip,e=!c.disabled,f=this.chartArea,g={meta:a,index:a.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",g)&&(e&&(0,d.L)(b,{left:!1===c.left?0:f.left-c.left,right:!1===c.right?this.width:f.right+c.right,top:!1===c.top?0:f.top-c.top,bottom:!1===c.bottom?this.height:f.bottom+c.bottom}),a.controller.draw(),e&&(0,d.N)(b),g.cancelable=!1,this.notifyPlugins("afterDatasetDraw",g))}isPointInArea(a){return(0,d.$)(a,this.chartArea,this._minPadding)}getElementsAtEventForMode(a,b,c,d){let e=ao.modes[b];return"function"==typeof e?e(this,a,c,d):[]}getDatasetMeta(a){let b=this.data.datasets[a],c=this._metasets,d=c.filter(a=>a&&a._dataset===b).pop();return d||(d={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:b&&b.order||0,index:a,_dataset:b,_parsed:[],_sorted:!1},c.push(d)),d}getContext(){return this.$context||(this.$context=(0,d.h)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(a){let b=this.data.datasets[a];if(!b)return!1;let c=this.getDatasetMeta(a);return"boolean"==typeof c.hidden?!c.hidden:!b.hidden}setDatasetVisibility(a,b){let c=this.getDatasetMeta(a);c.hidden=!b}toggleDataVisibility(a){this._hiddenIndices[a]=!this._hiddenIndices[a]}getDataVisibility(a){return!this._hiddenIndices[a]}_updateVisibility(a,b,c){let e=c?"show":"hide",f=this.getDatasetMeta(a),g=f.controller._resolveAnimations(void 0,e);(0,d.j)(b)?(f.data[b].hidden=!c,this.update()):(this.setDatasetVisibility(a,c),g.update(f,{visible:c}),this.update(b=>b.datasetIndex===a?e:void 0))}hide(a,b){this._updateVisibility(a,b,!1)}show(a,b){this._updateVisibility(a,b,!0)}_destroyDatasetMeta(a){let b=this._metasets[a];b&&b.controller&&b.controller._destroy(),delete this._metasets[a]}_stop(){let a,b;for(this.stop(),e.remove(this),a=0,b=this.data.datasets.length;a<b;++a)this._destroyDatasetMeta(a)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:a,ctx:b}=this;this._stop(),this.config.clearCache(),a&&(this.unbindEvents(),(0,d.ag)(a,b),this.platform.releaseContext(b),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete a5[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...a){return this.canvas.toDataURL(...a)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let a=this._listeners,b=this.platform,c=(c,d)=>{b.addEventListener(this,c,d),a[c]=d},e=(a,b,c)=>{a.offsetX=b,a.offsetY=c,this._eventHandler(a)};(0,d.Q)(this.options.events,a=>c(a,e))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let a=this._responsiveListeners,b=this.platform,c=(c,d)=>{b.addEventListener(this,c,d),a[c]=d},d=(c,d)=>{a[c]&&(b.removeEventListener(this,c,d),delete a[c])},e=(a,b)=>{this.canvas&&this.resize(a,b)},f,g=()=>{d("attach",g),this.attached=!0,this.resize(),c("resize",e),c("detach",f)};f=()=>{this.attached=!1,d("resize",e),this._stop(),this._resize(0,0),c("attach",g)},b.isAttached(this.canvas)?g():f()}unbindEvents(){(0,d.Q)(this._listeners,(a,b)=>{this.platform.removeEventListener(this,b,a)}),this._listeners={},(0,d.Q)(this._responsiveListeners,(a,b)=>{this.platform.removeEventListener(this,b,a)}),this._responsiveListeners=void 0}updateHoverStyle(a,b,c){let d=c?"set":"remove",e,f,g,h;for("dataset"===b&&this.getDatasetMeta(a[0].datasetIndex).controller["_"+d+"DatasetHoverStyle"](),g=0,h=a.length;g<h;++g){f=a[g];let i=f&&this.getDatasetMeta(f.datasetIndex).controller;i&&i[d+"HoverStyle"](f.element,f.datasetIndex,f.index)}}getActiveElements(){return this._active||[]}setActiveElements(a){let b=this._active||[],c=a.map(({datasetIndex:a,index:b})=>{let c=this.getDatasetMeta(a);if(!c)throw Error("No dataset found at index "+a);return{datasetIndex:a,element:c.data[b],index:b}}),e=!(0,d.ai)(c,b);e&&(this._active=c,this._lastEvent=null,this._updateHoverStyles(c,b))}notifyPlugins(a,b,c){return this._plugins.notify(this,a,b,c)}_updateHoverStyles(a,b,c){let d=this.options.hover,e=(a,b)=>a.filter(a=>!b.some(b=>a.datasetIndex===b.datasetIndex&&a.index===b.index)),f=e(b,a),g=c?a:e(a,b);f.length&&this.updateHoverStyle(f,d.mode,!1),g.length&&d.mode&&this.updateHoverStyle(g,d.mode,!0)}_eventHandler(a,b){let c={event:a,replay:b,cancelable:!0,inChartArea:this.isPointInArea(a)},d=b=>(b.options.events||this.options.events).includes(a.native.type);if(!1===this.notifyPlugins("beforeEvent",c,d))return;let e=this._handleEvent(a,b,c.inChartArea);return c.cancelable=!1,this.notifyPlugins("afterEvent",c,d),(e||c.changed)&&this.render(),this}_handleEvent(a,b,c){var e,f,g,h;let{_active:i=[],options:j}=this,k=this._getActiveElements(a,i,c,b),l=(0,d.aj)(a),m=(e=a,f=this._lastEvent,g=c,h=l,g&&"mouseout"!==e.type?h?f
6:e:null);c&&(this._lastEvent=null,(0,d.C)(j.onHover,[a,k,this],this),l&&(0,d.C)(j.onClick,[a,k,this],this));let n=!(0,d.ai)(k,i);return(n||b)&&(this._active=k,this._updateHoverStyles(k,i,b)),this._lastEvent=m,n}_getActiveElements(a,b,c,d){if("mouseout"===a.type)return[];if(!c)return b;let e=this.options.hover;return this.getElementsAtEventForMode(a,e.mode,e,d)}}let a9=()=>(0,d.Q)(a8.instances,a=>a._plugins.invalidate());function ba(a,b,c){let{startAngle:e,pixelMargin:f,x:g,y:h,outerRadius:i,innerRadius:j}=b,k=f/i;a.beginPath(),a.arc(g,h,i,e-k,c+k),j>f?(k=f/j,a.arc(g,h,j,c+k,e-k,!0)):a.arc(g,h,f,c+d.H,e-d.H),a.closePath(),a.clip()}function bb(a,b,c,d){return{x:c+a*Math.cos(b),y:d+a*Math.sin(b)}}function bc(a,b,c,e,f,g){let{x:h,y:i,startAngle:j,pixelMargin:k,innerRadius:l}=b,m=Math.max(b.outerRadius+e+c-k,0),n=l>0?l+e+c+k:0,o=0,p=f-j;if(e){let q=l>0?l-e:0,r=m>0?m-e:0,s=(q+r)/2,t=0!==s?p*s/(s+e):p;o=(p-t)/2}let u=Math.max(.001,p*m-c/d.P)/m,v=(p-u)/2,w=j+v+o,x=f-v-o,{outerStart:y,outerEnd:z,innerStart:A,innerEnd:B}=function(a,b,c,e){var f;let g=(f=a.options.borderRadius,(0,d.al)(f,["outerStart","outerEnd","innerStart","innerEnd"])),h=(c-b)/2,i=Math.min(h,e*b/2),j=a=>(0,d.E)(a,0,Math.min(h,(c-Math.min(h,a))*e/2));return{outerStart:j(g.outerStart),outerEnd:j(g.outerEnd),innerStart:(0,d.E)(g.innerStart,0,i),innerEnd:(0,d.E)(g.innerEnd,0,i)}}(b,n,m,x-w),C=m-y,D=m-z,E=w+y/C,F=x-z/D,G=n+A,H=n+B,I=w+A/G,J=x-B/H;if(a.beginPath(),g){if(a.arc(h,i,m,E,F),z>0){let K=bb(D,F,h,i);a.arc(K.x,K.y,z,F,x+d.H)}let L=bb(H,x,h,i);if(a.lineTo(L.x,L.y),B>0){let M=bb(H,J,h,i);a.arc(M.x,M.y,B,x+d.H,J+Math.PI)}if(a.arc(h,i,n,x-B/n,w+A/n,!0),A>0){let N=bb(G,I,h,i);a.arc(N.x,N.y,A,I+Math.PI,w-d.H)}let O=bb(C,w,h,i);if(a.lineTo(O.x,O.y),y>0){let P=bb(C,E,h,i);a.arc(P.x,P.y,y,w-d.H,E)}}else{a.moveTo(h,i);let Q=Math.cos(E)*m+h,R=Math.sin(E)*m+i;a.lineTo(Q,R);let S=Math.cos(F)*m+h,T=Math.sin(F)*m+i;a.lineTo(S,T)}a.closePath()}Object.defineProperties(a8,{defaults:{enumerable:!0,value:d.d},instances:{enumerable:!0,value:a5},overrides:{enumerable:!0,value:d.U},registry:{enumerable:!0,value:ad},version:{enumerable:!0,value:"3.9.1"},getChart:{enumerable:!0,value:a6},register:{enumerable:!0,value:(...a)=>{ad.add(...a),a9()}},unregister:{enumerable:!0,value:(...a)=>{ad.remove(...a),a9()}}});class bd extends O{constructor(a){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,a&&Object.assign(this,a)}inRange(a,b,c){let e=this.getProps(["x","y"],c),{angle:f,distance:g}=(0,d.a0)(e,{x:a,y:b}),{startAngle:h,endAngle:i,innerRadius:j,outerRadius:k,circumference:l}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],c),m=this.options.spacing/2,n=(0,d.v)(l,i-h),o=n>=d.T||(0,d.p)(f,h,i),p=(0,d.ak)(g,j+m,k+m);return o&&p}getCenterPoint(a){let{x:b,y:c,startAngle:d,endAngle:e,innerRadius:f,outerRadius:g}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference",],a),{offset:h,spacing:i}=this.options,j=(d+e)/2,k=(f+g+i+h)/2;return{x:b+Math.cos(j)*k,y:c+Math.sin(j)*k}}tooltipPosition(a){return this.getCenterPoint(a)}draw(a){let{options:b,circumference:c}=this,e=(b.offset||0)/2,f=(b.spacing||0)/2,g=b.circular;if(this.pixelMargin="inner"===b.borderAlign?.33:0,this.fullCircles=c>d.T?Math.floor(c/d.T):0,0===c||this.innerRadius<0||this.outerRadius<0)return;a.save();let h=0;if(e){h=e/2;let i=(this.startAngle+this.endAngle)/2;a.translate(Math.cos(i)*h,Math.sin(i)*h),this.circumference>=d.P&&(h=e)}a.fillStyle=b.backgroundColor,a.strokeStyle=b.borderColor;let j=function(a,b,c,e,f){let{fullCircles:g,startAngle:h,circumference:i}=b,j=b.endAngle;if(g){bc(a,b,c,e,h+d.T,f);for(let k=0;k<g;++k)a.fill();isNaN(i)||(j=h+i%d.T,i%d.T!=0||(j+=d.T))}return bc(a,b,c,e,j,f),a.fill(),j}(a,this,h,f,g);!function(a,b,c,e,f,g){let{options:h}=b,{borderWidth:i,borderJoinStyle:j}=h,k="inner"===h.borderAlign;i&&(k?(a.lineWidth=2*i,a.lineJoin=j||"round"):(a.lineWidth=i,a.lineJoin=j||"bevel"),b.fullCircles&&function(a,b,c){let{x:e,y:f,startAngle:g,pixelMargin:h,fullCircles:i}=b,j=Math.max(b.outerRadius-h,0),k=b.innerRadius+h,l;
6for(c&&ba(a,b,g+d.T),a.beginPath(),a.arc(e,f,k,g+d.T,g,!0),l=0;l<i;++l)a.stroke();for(a.beginPath(),a.arc(e,f,j,g,g+d.T),l=0;l<i;++l)a.stroke()}(a,b,k),k&&ba(a,b,f),bc(a,b,c,e,f,g),a.stroke())}(a,this,h,f,j,g),a.restore()}}function be(a,b,c=b){a.lineCap=(0,d.v)(c.borderCapStyle,b.borderCapStyle),a.setLineDash((0,d.v)(c.borderDash,b.borderDash)),a.lineDashOffset=(0,d.v)(c.borderDashOffset,b.borderDashOffset),a.lineJoin=(0,d.v)(c.borderJoinStyle,b.borderJoinStyle),a.lineWidth=(0,d.v)(c.borderWidth,b.borderWidth),a.strokeStyle=(0,d.v)(c.borderColor,b.borderColor)}function bf(a,b,c){a.lineTo(c.x,c.y)}function bg(a,b,c={}){let d=a.length,{start:e=0,end:f=d-1}=c,{start:g,end:h}=b,i=Math.max(e,g),j=Math.min(f,h);return{count:d,start:i,loop:b.loop,ilen:j<i&&!(e<g&&f<g||e>h&&f>h)?d+j-i:j-i}}function bh(a,b,c,e){var f;let{points:g,options:h}=b,{count:i,start:j,loop:k,ilen:l}=bg(g,c,e),m=(f=h).stepped?d.as:f.tension||"monotone"===f.cubicInterpolationMode?d.at:bf,{move:n=!0,reverse:o}=e||{},p,q,r;for(p=0;p<=l;++p)!(q=g[(j+(o?l-p:p))%i]).skip&&(n?(a.moveTo(q.x,q.y),n=!1):m(a,r,q,o,h.stepped),r=q);return k&&m(a,r,q=g[(j+(o?l:0))%i],o,h.stepped),!!k}function bi(a,b,c,d){let e=b.points,{count:f,start:g,ilen:h}=bg(e,c,d),{move:i=!0,reverse:j}=d||{},k=0,l=0,m,n,o,p,q,r,s=a=>(g+(j?h-a:a))%f,t=()=>{p!==q&&(a.lineTo(k,q),a.lineTo(k,p),a.lineTo(k,r))};for(i&&(n=e[s(0)],a.moveTo(n.x,n.y)),m=0;m<=h;++m){if((n=e[s(m)]).skip)continue;let u=n.x,v=n.y,w=0|u;w===o?(v<p?p=v:v>q&&(q=v),k=(l*k+u)/ ++l):(t(),a.lineTo(u,v),o=w,l=0,p=q=v),r=v}t()}function bj(a){let b=a.options,c=b.borderDash&&b.borderDash.length,d=!a._decimated&&!a._loop&&!b.tension&&"monotone"!==b.cubicInterpolationMode&&!b.stepped&&!c;return d?bi:bh}bd.id="arc",bd.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},bd.defaultRoutes={backgroundColor:"backgroundColor"};let bk="function"==typeof Path2D;class bl extends O{constructor(a){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,a&&Object.assign(this,a)}updateControlPoints(a,b){let c=this.options;
6if((c.tension||"monotone"===c.cubicInterpolationMode)&&!c.stepped&&!this._pointsUpdated){let e=c.spanGaps?this._loop:this._fullLoop;(0,d.am)(this._points,c,a,e,b),this._pointsUpdated=!0}}set points(a){this._points=a,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,d.an)(this,this.options.segment))}first(){let a=this.segments,b=this.points;return a.length&&b[a[0].start]}last(){let a=this.segments,b=this.points,c=a.length;return c&&b[a[c-1].end]}interpolate(a,b){var c;let e=this.options,f=a[b],g=this.points,h=(0,d.ao)(this,{property:b,start:f,end:f});if(!h.length)return;let i=[],j=(c=e).stepped?d.ap:c.tension||"monotone"===c.cubicInterpolationMode?d.aq:d.ar,k,l;for(k=0,l=h.length;k<l;++k){let{start:m,end:n}=h[k],o=g[m],p=g[n];if(o===p){i.push(o);continue}let q=Math.abs((f-o[b])/(p[b]-o[b])),r=j(o,p,q,e.stepped);r[b]=a[b],i.push(r)}return 1===i.length?i[0]:i}pathSegment(a,b,c){let d=bj(this);return d(a,this,b,c)}path(a,b,c){let d=this.segments,e=bj(this),f=this._loop;for(let g of(b=b||0,c=c||this.points.length-b,d))f&=e(a,this,g,{start:b,end:b+c-1});return!!f}draw(a,b,c,d){let e=this.options||{},f=this.points||[];f.length&&e.borderWidth&&(a.save(),function(a,b,c,d){if(bk&&!b.options.segment){var e,f,g,h;let i;e=a,f=b,g=c,h=d,(i=f._path)||(i=f._path=new Path2D,f.path(i,g,h)&&i.closePath()),be(e,f.options),e.stroke(i)}else!function(a,b,c,d){let{segments:e,options:f}=b,g=bj(b);for(let h of e)be(a,f,h.style),a.beginPath(),g(a,b,h,{start:c,end:c+d-1})&&a.closePath(),a.stroke()}(a,b,c,d)}(a,this,c,d),a.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function bm(a,b,c,d){let e=a.options,{[c]:f}=a.getProps([c],d);return Math.abs(b-f)<e.radius+e.hitRadius}bl.id="line",bl.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},bl.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},bl.descriptors={_scriptable:!0,_indexable:a=>"borderDash"!==a&&"fill"!==a};class bn extends O{constructor(a){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,a&&Object.assign(this,a)}inRange(a,b,c){let d=this.options,{x:e,y:f}=this.getProps(["x","y"],c);return Math.pow(a-e,2)+Math.pow(b-f,2)<Math.pow(d.hitRadius+d.radius,2)}inXRange(a,b){return bm(this,a,"x",b)}inYRange(a,b){return bm(this,a,"y",b)}getCenterPoint(a){let{x:b,y:c}=this.getProps(["x","y"],a);return{x:b,y:c}}size(a){let b=(a=a||this.options||{}).radius||0;b=Math.max(b,b&&a.hoverRadius||0);let c=b&&a.borderWidth||0;return(b+c)*2}draw(a,b){let c=this.options;!this.skip&&!(c.radius<.1)&&(0,d.$)(this,b,this.size(c)/2)&&(a.strokeStyle=c.borderColor,a.lineWidth=c.borderWidth,a.fillStyle=c.backgroundColor,(0,d.au)(a,c,this.x,this.y))}getRange(){let a=this.options||{};return a.radius+a.hitRadius}}function bo(a,b){let{x:c,y:d,base:e,width:f,height:g}=a.getProps(["x","y","base","width","height"],b),h,i,j,k,l;return a.horizontal?(l=g/2,h=Math.min(c,e),i=Math.max(c,e),j=d-l,k=d+l):(h=c-(l=f/2),i=c+l,j=Math.min(d,e),k=Math.max(d,e)),{left:h,top:j,right:i,bottom:k}}function bp(a,b,c,e){return a?0:(0,d.E)(b,c,e)}function bq(a,b,c,e){let f=null===b,g=null===c,h=a&&!(f&&g)&&bo(a,e);return h&&(f||(0,d.ak)(b,h.left,h.right))&&(g||(0,d.ak)(c,h.top,h.bottom))}function br(a,b){a.rect(b.x,b.y,b.w,b.h)}function bs(a,b,c={}){let d=a.x!==c.x?-b:0,e=a.y!==c.y?-b:0,f=(a.x+a.w!==c.x+c.w?b:0)-d,g=(a.y+a.h!==c.y+c.h?b:0)-e;return{x:a.x+d,y:a.y+e,w:a.w+f,h:a.h+g,radius:a.radius}}bn.id="point",bn.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},bn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class bt extends O{constructor(a){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,a&&Object.assign(this,a)}draw(a){var b;let{inflateAmount:c,options:{borderColor:e,backgroundColor:f}}=this,{inner:g,outer:h}=function(a){let b=bo(a),c=b.right-b.left,e=b.bottom-b.top,f=function(a,b,c){let e=a.options.borderWidth,f=a.borderSkipped,g=(0,d.aw)(e);return{t:bp(f.top,g.top,0,c),r:bp(f.right,g.right,0,b),b:bp(f.bottom,g.bottom,0,c),l:bp(f.left,g.left,0,b)}}(a,c/2,e/2),g=function(a,b,c){let{enableBorderRadius:e}=a.getProps(["enableBorderRadius"]),f=a.options.borderRadius,g=(0,d.ax)(f),h=Math.min(b,c),i=a.borderSkipped,j=e||(0,d.i)(f);return{topLeft:bp(!j||i.top||i.left,g.topLeft,0,h),topRight:bp(!j||i.top||i.right,g.topRight,0,h),bottomLeft:bp(!j||i.bottom||i.left,g.bottomLeft,0,h),bottomRight:bp(!j||i.bottom||i.right,g.bottomRight,0,h)}}(a,c/2,e/2);
6return{outer:{x:b.left,y:b.top,w:c,h:e,radius:g},inner:{x:b.left+f.l,y:b.top+f.t,w:c-f.l-f.r,h:e-f.t-f.b,radius:{topLeft:Math.max(0,g.topLeft-Math.max(f.t,f.l)),topRight:Math.max(0,g.topRight-Math.max(f.t,f.r)),bottomLeft:Math.max(0,g.bottomLeft-Math.max(f.b,f.l)),bottomRight:Math.max(0,g.bottomRight-Math.max(f.b,f.r))}}}}(this),i=(b=h.radius).topLeft||b.topRight||b.bottomLeft||b.bottomRight?d.av:br;a.save(),(h.w!==g.w||h.h!==g.h)&&(a.beginPath(),i(a,bs(h,c,g)),a.clip(),i(a,bs(g,-c,h)),a.fillStyle=e,a.fill("evenodd")),a.beginPath(),i(a,bs(g,c)),a.fillStyle=f,a.fill(),a.restore()}inRange(a,b,c){return bq(this,a,b,c)}inXRange(a,b){return bq(this,a,null,b)}inYRange(a,b){return bq(this,null,a,b)}getCenterPoint(a){let{x:b,y:c,base:d,horizontal:e}=this.getProps(["x","y","base","horizontal"],a);return{x:e?(b+d)/2:b,y:e?c:(c+d)/2}}getRange(a){return"x"===a?this.width/2:this.height/2}}bt.id="bar",bt.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},bt.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var bu=Object.freeze({__proto__:null,ArcElement:bd,LineElement:bl,PointElement:bn,BarElement:bt});function bv(a){if(a._decimated){let b=a._data;delete a._decimated,delete a._data,Object.defineProperty(a,"data",{value:b})}}function bw(a){a.data.datasets.forEach(a=>{bv(a)})}var bx={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(a,b,c)=>{if(!c.enabled){bw(a);return}let e=a.width;a.data.datasets.forEach((b,f)=>{let{_data:g,indexAxis:h}=b,i=a.getDatasetMeta(f),j=g||b.data;if("y"===(0,d.a)([h,a.options.indexAxis])||!i.controller.supportsDecimation)return;let k=a.scales[i.xAxisID];if("linear"!==k.type&&"time"!==k.type||a.options.parsing)return;let{start:l,count:m}=function(a,b){let c=b.length,e=0,f,{iScale:g}=a,{min:h,max:i,minDefined:j,maxDefined:k}=g.getUserBounds();return j&&(e=(0,d.E)((0,d.Z)(b,g.axis,h).lo,0,c-1)),f=k?(0,d.E)((0,d.Z)(b,g.axis,i).hi+1,e,c)-e:c-e,{start:e,count:f}}(i,j),n=c.threshold||4*e;if(m<=n){bv(b);return}(0,d.k)(g)&&(b._data=j,delete b.data,Object.defineProperty(b,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(a){this._data=a}}));let o;switch(c.algorithm){case"lttb":o=function(a,b,c,d,e){let f=e.samples||d;if(f>=c)return a.slice(b,b+c);let g=[],h=(c-2)/(f-2),i=0,j=b,k,l,m,n,o;for(k=0,g[i++]=a[j];k<f-2;k++){let p=0,q=0,r,s=Math.floor((k+1)*h)+1+b,t=Math.min(Math.floor((k+2)*h)+1,c)+b,u=t-s;for(r=s;r<t;r++)p+=a[r].x,q+=a[r].y;p/=u,q/=u;let v=Math.floor(k*h)+1+b,w=Math.min(Math.floor((k+1)*h)+1,c)+b,{x:x,y:y}=a[j];for(m=n=-1,r=v;r<w;r++)(n=.5*Math.abs((x-p)*(a[r].y-y)-(x-a[r].x)*(q-y)))>m&&(m=n,l=a[r],o=r);g[i++]=l,j=o}return g[i++]=a[b+c-1],g}(j,l,m,e,c);break;case"min-max":o=function(a,b,c,e){let f=0,g=0,h,i,j,k,l,m,n,o,p,q,r=[],s=a[b].x,t=a[b+c-1].x,u=t-s;for(h=b;h<b+c;++h){j=((i=a[h]).x-s)/u*e,k=i.y;let v=0|j;if(v===l)k<p?(p=k,m=h):k>q&&(q=k,n=h),f=(g*f+i.x)/ ++g;else{let w=h-1;if(!(0,d.k)(m)&&!(0,d.k)(n)){let x=Math.min(m,n),y=Math.max(m,n);x!==o&&x!==w&&r.push({...a[x],x:f}),y!==o&&y!==w&&r.push({...a[y],x:f})}h>0&&w!==o&&r.push(a[w]),r.push(i),l=v,g=0,p=q=k,m=n=o=h}}return r}(j,l,m,e);break;default:throw Error(`Unsupported decimation algorithm '${c.algorithm}'`)}b._decimated=o})},destroy(a){bw(a)}};function by(a,b,c,e){if(e)return;let f=b[a],g=c[a];return"angle"===a&&(f=(0,d.az)(f),g=(0,d.az)(g)),{property:a,start:f,end:g}}function bz(a,b,c){for(;b>a;b--){let d=c[b];if(!isNaN(d.x)&&!isNaN(d.y))break}return b}function bA(a,b,c,d){return a&&b?d(a[c],b[c]):a?a[c]:b?b[c]:0}function bB(a,b){let c=[],e=!1;return(0,d.b)(a)?(e=!0,c=a):c=function(a,b){let{x:c=null,y:d=null}=a||{},e=b.points,f=[];return b.segments.forEach(({start:a,end:b})=>{b=bz(a,b,e);let g=e[a],h=e[b];null!==d?(f.push({x:g.x,y:d}),f.push({x:h.x,y:d})):null!==c&&(f.push({x:c,y:g.y}),f.push({x:c,y:h.y}))}),f}(a,b),c.length?new bl({points:c,options:{tension:0},_loop:e,_fullLoop:e}):null}function bC(a){return a&& !1!==a.fill}function bD(a,b,c){let e=a[b],f=e.fill,g=[b],h;if(!c)return f;for(;!1!==f&& -1===g.indexOf(f);){if(!(0,d.g)(f))return f;if(!(h=a[f]))break;if(h.visible)return f;g.push(f),f=h.fill}return!1}function bE(a,b,c){let e=bG(a);if((0,d.i)(e))return!isNaN(e.value)&&e;let f=parseFloat(e);return(0,d.g)(f)&&Math.floor(f)===f?bF(e[0],b,f,c):["origin","start","end","stack","shape"].indexOf(e)>=0&&e}function bF(a,b,c,d){return("-"===a||"+"===a)&&(c=b+c),c!==b&&!(c<0)&&!(c>=d)&&c}function bG(a){let b=a.options,c=b.fill,e=(0,d.v)(c&&c.target,c);return void 0===e&&(e=!!b.backgroundColor),!1!==e&&null!==e&&(!0===e?"origin":e)}function bH(a,b,c){let d=[];for(let e=0;e<c.length;e++){let f=c[e],{first:g,last:h,point:i}=bI(f,b,"x");if(i&&(!g||!h)){if(g)d.unshift(i);else if(a.push(i),!h)break}}a.push(...d)}function bI(a,b,c){let e=a.interpolate(b,c);if(!e)return{};let f=e[c],g=a.segments,h=a.points,i=!1,j=!1;for(let k=0;k<g.length;k++){let l=g[k],m=h[l.start][c],n=h[l.end][c];if((0,d.ak)(f,m,n)){i=f===m,j=f===n;break}}return{first:i,last:j,point:e}}class bJ{constructor(a){this.x=a.x,this.y=a.y,this.radius=a.radius}pathSegment(a,b,c){let{x:e,y:f,radius:g}=this;return b=b||{start:0,end:d.T},a.arc(e,f,g,b.end,b.start,!0),!c.bounds}interpolate(a){let{x:b,y:c,radius:d}=this,e=a.angle;return{x:b+Math.cos(e)*d,y:c+Math.sin(e)*d,angle:e}}}function bK(a){var b,c;let{scale:e={},fill:f}=a,g,h=(b=f,c=e,g=null,"start"===b?g=c.bottom:"end"===b?g=c.top:(0,d.i)(b)?g=c.getPixelForValue(b.value):c.getBasePixel&&(g=c.getBasePixel()),g);if((0,d.g)(h)){let i=e.isHorizontal();return{x:i?h:null,y:i?null:h}}return null}function bL(a){var b,c,e;let{scale:f,fill:g}=a,h=f.options,i=f.getLabels().length,j=h.reverse?f.max:f.min,k,l=(b=g,c=f,e=j,"start"===b?e:"end"===b?c.options.reverse?c.min:c.max:(0,d.i)(b)?b.value:c.getBaseValue()),m=[];
6if(h.grid.circular){let n=f.getPointPositionForValue(0,j);return new bJ({x:n.x,y:n.y,radius:f.getDistanceFromCenterForValue(l)})}for(let o=0;o<i;++o)m.push(f.getPointPositionForValue(o,l));return m}function bM(a,b,c){let e=function(a){let{chart:b,fill:c,line:e}=a;if((0,d.g)(c))return function a(b,c){let d=b.getDatasetMeta(c),e=d&&b.isDatasetVisible(c);return e?d.dataset:null}(b,c);if("stack"===c)return function(a){let{scale:b,index:c,line:d}=a,e=[],f=d.segments,g=d.points,h=function a(b,c){let d=[],e=b.getMatchingVisibleMetas("line");for(let f=0;f<e.length;f++){let g=e[f];if(g.index===c)break;g.hidden||d.unshift(g.dataset)}return d}(b,c);h.push(bB({x:null,y:b.bottom},d));for(let i=0;i<f.length;i++){let j=f[i];for(let k=j.start;k<=j.end;k++)bH(e,g[k],h)}return new bl({points:e,options:{}})}(a);if("shape"===c)return!0;let f=function a(b){let c=b.scale||{};return c.getPointPositionForValue?bL(b):bK(b)}(a);return f instanceof bJ?f:bB(f,e)}(b),{line:f,scale:g,axis:h}=b,i=f.options,j=i.fill,k=i.backgroundColor,{above:l=k,below:m=k}=j||{};e&&f.points.length&&((0,d.L)(a,c),bN(a,{line:f,target:e,above:l,below:m,area:c,scale:g,axis:h}),(0,d.N)(a))}function bN(a,b){let{line:c,target:d,above:e,below:f,area:g,scale:h}=b,i=c._loop?"angle":b.axis;a.save(),"x"===i&&f!==e&&(bO(a,d,g.top),bP(a,{line:c,target:d,color:e,scale:h,property:i}),a.restore(),a.save(),bO(a,d,g.bottom)),bP(a,{line:c,target:d,color:f,scale:h,property:i}),a.restore()}function bO(a,b,c){let{segments:d,points:e}=b,f=!0,g=!1;for(let h of(a.beginPath(),d)){let{start:i,end:j}=h,k=e[i],l=e[bz(i,j,e)];f?(a.moveTo(k.x,k.y),f=!1):(a.lineTo(k.x,c),a.lineTo(k.x,k.y)),(g=!!b.pathSegment(a,h,{move:g}))?a.closePath():a.lineTo(l.x,c)}a.lineTo(b.first().x,c),a.closePath(),a.clip()}function bP(a,b){let{line:c,target:e,property:f,color:g,scale:h}=b,i=function(a,b,c){let e=a.segments,f=a.points,g=b.points,h=[];for(let i of e){let{start:j,end:k}=i;k=bz(j,k,f);let l=by(c,f[j],f[k],i.loop);if(!b.segments){h.push({source:i,target:l,start:f[j],end:f[k]});continue}let m=(0,d.ao)(b,l);for(let n of m){let o=by(c,g[n.start],g[n.end],n.loop),p=(0,d.ay)(i,f,o);for(let q of p)h.push({source:q,target:n,start:{[c]:bA(l,o,"start",Math.max)},end:{[c]:bA(l,o,"end",Math.min)}})}}return h}(c,e,f);for(let{source:j,target:k,start:l,end:m}of i){let{style:{backgroundColor:n=g}={}}=j,o=!0!==e;a.save(),a.fillStyle=n,bQ(a,h,o&&by(f,l,m)),a.beginPath();let p=!!c.pathSegment(a,j),q;if(o){p?a.closePath():bR(a,e,m,f);let r=!!e.pathSegment(a,k,{move:p,reverse:!0});(q=p&&r)||bR(a,e,l,f)}a.closePath(),a.fill(q?"evenodd":"nonzero"),a.restore()}}function bQ(a,b,c){let{top:d,bottom:e}=b.chart.chartArea,{property:f,start:g,end:h}=c||{};"x"===f&&(a.beginPath(),a.rect(g,d,h-g,e-d),a.clip())}function bR(a,b,c,d){let e=b.interpolate(c,d);e&&a.lineTo(e.x,e.y)}var bS={id:"filler",afterDatasetsUpdate(a,b,c){let d=(a.data.datasets||[]).length,e=[],f,g,h,i;for(g=0;g<d;++g)h=(f=a.getDatasetMeta(g)).dataset,i=null,h&&h.options&&h instanceof bl&&(i={visible:a.isDatasetVisible(g),index:g,fill:bE(h,g,d),chart:a,axis:f.controller.options.indexAxis,scale:f.vScale,line:h}),f.$filler=i,e.push(i);for(g=0;g<d;++g)(i=e[g])&& !1!==i.fill&&(i.fill=bD(e,g,c.propagate))},beforeDraw(a,b,c){let d="beforeDraw"===c.drawTime,e=a.getSortedVisibleDatasetMetas(),f=a.chartArea;for(let g=e.length-1;g>=0;--g){let h=e[g].$filler;h&&(h.line.updateControlPoints(f,h.axis),d&&h.fill&&bM(a.ctx,h,f))}},beforeDatasetsDraw(a,b,c){if("beforeDatasetsDraw"!==c.drawTime)return;let d=a.getSortedVisibleDatasetMetas();for(let e=d.length-1;e>=0;--e){let f=d[e].$filler;bC(f)&&bM(a.ctx,f,a.chartArea)}},beforeDatasetDraw(a,b,c){let d=b.meta.$filler;bC(d)&&"beforeDatasetDraw"===c.drawTime&&bM(a.ctx,d,a.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};let bT=(a,b)=>{let{boxHeight:c=b,boxWidth:d=b}=a;return a.usePointStyle&&(c=Math.min(c,b),d=a.pointStyleWidth||Math.min(d,b)),{boxWidth:d,boxHeight:c,itemHeight:Math.max(b,c)}},bU=(a,b)=>null!==a&&null!==b&&a.datasetIndex===b.datasetIndex&&a.index===b.index;class bV extends O{constructor(a){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=a.chart,this.options=a.options,this.ctx=a.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(a,b,c){this.maxWidth=a,this.maxHeight=b,this._margins=c,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let a=this.options.labels||{},b=(0,d.C)(a.generateLabels,[this.chart],this)||[];a.filter&&(b=b.filter(b=>a.filter(b,this.chart.data))),a.sort&&(b=b.sort((b,c)=>a.sort(b,c,this.chart.data))),this.options.reverse&&b.reverse(),this.legendItems=b}fit(){let{options:a,ctx:b}=this;if(!a.display){this.width=this.height=0;return}let c=a.labels,e=(0,d.O)(c.font),f=e.size,g=this._computeTitleHeight(),{boxWidth:h,itemHeight:i}=bT(c,f),j,k;b.font=e.string,this.isHorizontal()?(j=this.maxWidth,k=this._fitRows(g,f,h,i)+10):(k=this.maxHeight,j=this._fitCols(g,f,h,i)+10),this.width=Math.min(j,a.maxWidth||this.maxWidth),this.height=Math.min(k,a.maxHeight||this.maxHeight)}_fitRows(a,b,c,d){let{ctx:e,maxWidth:f,options:{labels:{padding:g}}}=this,h=this.legendHitBoxes=[],i=this.lineWidths=[0],j=d+g,k=a;e.textAlign="left",e.textBaseline="middle";let l=-1,m=-j;
6return this.legendItems.forEach((a,n)=>{let o=c+b/2+e.measureText(a.text).width;(0===n||i[i.length-1]+o+2*g>f)&&(k+=j,i[i.length-(n>0?0:1)]=0,m+=j,l++),h[n]={left:0,top:m,row:l,width:o,height:d},i[i.length-1]+=o+g}),k}_fitCols(a,b,c,d){let{ctx:e,maxHeight:f,options:{labels:{padding:g}}}=this,h=this.legendHitBoxes=[],i=this.columnSizes=[],j=f-a,k=g,l=0,m=0,n=0,o=0;return this.legendItems.forEach((a,f)=>{let p=c+b/2+e.measureText(a.text).width;f>0&&m+d+2*g>j&&(k+=l+g,i.push({width:l,height:m}),n+=l+g,o++,l=m=0),h[f]={left:n,top:m,col:o,width:p,height:d},l=Math.max(l,p),m+=d+g}),k+=l,i.push({width:l,height:m}),k}adjustHitBoxes(){if(!this.options.display)return;let a=this._computeTitleHeight(),{legendHitBoxes:b,options:{align:c,labels:{padding:e},rtl:f}}=this,g=(0,d.aA)(f,this.left,this.width);if(this.isHorizontal()){let h=0,i=(0,d.S)(c,this.left+e,this.right-this.lineWidths[h]);for(let j of b)h!==j.row&&(h=j.row,i=(0,d.S)(c,this.left+e,this.right-this.lineWidths[h])),j.top+=this.top+a+e,j.left=g.leftForLtr(g.x(i),j.width),i+=j.width+e}else{let k=0,l=(0,d.S)(c,this.top+a+e,this.bottom-this.columnSizes[k].height);for(let m of b)m.col!==k&&(k=m.col,l=(0,d.S)(c,this.top+a+e,this.bottom-this.columnSizes[k].height)),m.top=l,m.left+=this.left+e,m.left=g.leftForLtr(g.x(m.left),m.width),l+=m.height+e}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let a=this.ctx;(0,d.L)(a,this),this._draw(),(0,d.N)(a)}}_draw(){let{options:a,columnSizes:b,lineWidths:c,ctx:e}=this,{align:f,labels:g}=a,h=d.d.color,i=(0,d.aA)(a.rtl,this.left,this.width),j=(0,d.O)(g.font),{color:k,padding:l}=g,m=j.size,n=m/2,o;this.drawTitle(),e.textAlign=i.textAlign("left"),e.textBaseline="middle",e.lineWidth=.5,e.font=j.string;let{boxWidth:p,boxHeight:q,itemHeight:r}=bT(g,m),s=function(a,b,c){if(isNaN(p)||p<=0||isNaN(q)||q<0)return;e.save();let f=(0,d.v)(c.lineWidth,1);if(e.fillStyle=(0,d.v)(c.fillStyle,h),e.lineCap=(0,d.v)(c.lineCap,"butt"),e.lineDashOffset=(0,d.v)(c.lineDashOffset,0),e.lineJoin=(0,d.v)(c.lineJoin,"miter"),e.lineWidth=f,e.strokeStyle=(0,d.v)(c.strokeStyle,h),e.setLineDash((0,d.v)(c.lineDash,[])),g.usePointStyle){let j={radius:q*Math.SQRT2/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:f},k=i.xPlus(a,p/2),l=b+n;(0,d.aE)(e,j,k,l,g.pointStyleWidth&&p)}else{let o=b+Math.max((m-q)/2,0),r=i.leftForLtr(a,p),s=(0,d.ax)(c.borderRadius);e.beginPath(),Object.values(s).some(a=>0!==a)?(0,d.av)(e,{x:r,y:o,w:p,h:q,radius:s}):e.rect(r,o,p,q),e.fill(),0!==f&&e.stroke()}e.restore()},t=function(a,b,c){(0,d.M)(e,c.text,a,b+r/2,j,{strikethrough:c.hidden,textAlign:i.textAlign(c.textAlign)})},u=this.isHorizontal(),v=this._computeTitleHeight();o=u?{x:(0,d.S)(f,this.left+l,this.right-c[0]),y:this.top+l+v,line:0}:{x:this.left+l,y:(0,d.S)(f,this.top+v+l,this.bottom-b[0].height),line:0},(0,d.aB)(this.ctx,a.textDirection);let w=r+l;this.legendItems.forEach((h,j)=>{e.strokeStyle=h.fontColor||k,e.fillStyle=h.fontColor||k;let m=e.measureText(h.text).width,q=i.textAlign(h.textAlign||(h.textAlign=g.textAlign)),r=p+n+m,x=o.x,y=o.y;i.setWidth(this.width),u?j>0&&x+r+l>this.right&&(y=o.y+=w,o.line++,x=o.x=(0,d.S)(f,this.left+l,this.right-c[o.line])):j>0&&y+w>this.bottom&&(x=o.x=x+b[o.line].width+l,o.line++,y=o.y=(0,d.S)(f,this.top+v+l,this.bottom-b[o.line].height));let z=i.x(x);s(z,y,h),x=(0,d.aC)(q,x+p+n,u?x+r:this.right,a.rtl),t(i.x(x),y,h),u?o.x+=r+l:o.y+=w}),(0,d.aD)(this.ctx,a.textDirection)}drawTitle(){let a=this.options,b=a.title,c=(0,d.O)(b.font),e=(0,d.K)(b.padding);if(!b.display)return;let f=(0,d.aA)(a.rtl,this.left,this.width),g=this.ctx,h=b.position,i=c.size/2,j=e.top+i,k,l=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),k=this.top+j,l=(0,d.S)(a.align,l,this.right-m);else{let n=this.columnSizes.reduce((a,b)=>Math.max(a,b.height),0);k=j+(0,d.S)(a.align,this.top,this.bottom-n-a.labels.padding-this._computeTitleHeight())}let o=(0,d.S)(h,l,l+m);g.textAlign=f.textAlign((0,d.R)(h)),g.textBaseline="middle",g.strokeStyle=b.color,g.fillStyle=b.color,g.font=c.string,(0,d.M)(g,b.text,o,k,c)}_computeTitleHeight(){let a=this.options.title,b=(0,d.O)(a.font),c=(0,d.K)(a.padding);return a.display?b.lineHeight+c.height:0}_getLegendItemAt(a,b){let c,e,f;if((0,d.ak)(a,this.left,this.right)&&(0,d.ak)(b,this.top,this.bottom)){for(c=0,f=this.legendHitBoxes;c<f.length;++c)if(e=f[c],(0,d.ak)(a,e.left,e.left+e.width)&&(0,d.ak)(b,e.top,e.top+e.height))return this.legendItems[c]}return null}handleEvent(a){let b=this.options;if(!bW(a.type,b))return;let c=this._getLegendItemAt(a.x,a.y);if("mousemove"===a.type||"mouseout"===a.type){let e=this._hoveredItem,f=bU(e,c);e&&!f&&(0,d.C)(b.onLeave,[a,e,this],this),this._hoveredItem=c,c&&!f&&(0,d.C)(b.onHover,[a,c,this],this)}else c&&(0,d.C)(b.onClick,[a,c,this],this)}}function bW(a,b){return("mousemove"===a||"mouseout"===a)&&(!!b.onHover||!!b.onLeave)|| !!b.onClick&&("click"===a||"mouseup"===a)}var bX={id:"legend",_element:bV,start(a,b,c){let d=a.legend=new bV({ctx:a.ctx,options:c,chart:
6a});aA.configure(a,d,c),aA.addBox(a,d)},stop(a){aA.removeBox(a,a.legend),delete a.legend},beforeUpdate(a,b,c){let d=a.legend;aA.configure(a,d,c),d.options=c},afterUpdate(a){let b=a.legend;b.buildLabels(),b.adjustHitBoxes()},afterEvent(a,b){b.replay||a.legend.handleEvent(b.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(a,b,c){let d=b.datasetIndex,e=c.chart;e.isDatasetVisible(d)?(e.hide(d),b.hidden=!0):(e.show(d),b.hidden=!1)},onHover:null,onLeave:null,labels:{color:a=>a.chart.options.color,boxWidth:40,padding:10,generateLabels(a){let b=a.data.datasets,{labels:{usePointStyle:c,pointStyle:e,textAlign:f,color:g}}=a.legend.options;return a._getSortedDatasetMetas().map(a=>{let h=a.controller.getStyle(c?0:void 0),i=(0,d.K)(h.borderWidth);return{text:b[a.index].label,fillStyle:h.backgroundColor,fontColor:g,hidden:!a.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(i.width+i.height)/4,strokeStyle:h.borderColor,pointStyle:e||h.pointStyle,rotation:h.rotation,textAlign:f||h.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:a=>a.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:a=>!a.startsWith("on"),labels:{_scriptable:a=>!["generateLabels","filter","sort"].includes(a)}}};class bY extends O{constructor(a){super(),this.chart=a.chart,this.options=a.options,this.ctx=a.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(a,b){let c=this.options;if(this.left=0,this.top=0,!c.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=a,this.height=this.bottom=b;let e=(0,d.b)(c.text)?c.text.length:1;this._padding=(0,d.K)(c.padding);let f=e*(0,d.O)(c.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=f:this.width=f}isHorizontal(){let a=this.options.position;return"top"===a||"bottom"===a}_drawArgs(a){let{top:b,left:c,bottom:e,right:f,options:g}=this,h=g.align,i=0,j,k,l;return this.isHorizontal()?(k=(0,d.S)(h,c,f),l=b+a,j=f-c):("left"===g.position?(k=c+a,l=(0,d.S)(h,e,b),i=-.5*d.P):(k=f-a,l=(0,d.S)(h,b,e),i=.5*d.P),j=e-b),{titleX:k,titleY:l,maxWidth:j,rotation:i}}draw(){let a=this.ctx,b=this.options;if(!b.display)return;let c=(0,d.O)(b.font),e=c.lineHeight,f=e/2+this._padding.top,{titleX:g,titleY:h,maxWidth:i,rotation:j}=this._drawArgs(f);(0,d.M)(a,b.text,0,0,c,{color:b.color,maxWidth:i,rotation:j,textAlign:(0,d.R)(b.align),textBaseline:"middle",translation:[g,h]})}}var bZ={id:"title",_element:bY,start(a,b,c){!function(a,b){let c=new bY({ctx:a.ctx,options:b,chart:a});aA.configure(a,c,b),aA.addBox(a,c),a.titleBlock=c}(a,c)},stop(a){let b=a.titleBlock;aA.removeBox(a,b),delete a.titleBlock},beforeUpdate(a,b,c){let d=a.titleBlock;aA.configure(a,d,c),d.options=c},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};let b$=new WeakMap;var b_={id:"subtitle",start(a,b,c){let d=new bY({ctx:a.ctx,options:c,chart:
6a});aA.configure(a,d,c),aA.addBox(a,d),b$.set(a,d)},stop(a){aA.removeBox(a,b$.get(a)),b$.delete(a)},beforeUpdate(a,b,c){let d=b$.get(a);aA.configure(a,d,c),d.options=c},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};let b0={average(a){if(!a.length)return!1;let b,c,d=0,e=0,f=0;for(b=0,c=a.length;b<c;++b){let g=a[b].element;if(g&&g.hasValue()){let h=g.tooltipPosition();d+=h.x,e+=h.y,++f}}return{x:d/f,y:e/f}},nearest(a,b){if(!a.length)return!1;let c=b.x,e=b.y,f=Number.POSITIVE_INFINITY,g,h,i;for(g=0,h=a.length;g<h;++g){let j=a[g].element;if(j&&j.hasValue()){let k=j.getCenterPoint(),l=(0,d.aG)(b,k);l<f&&(f=l,i=j)}}if(i){let m=i.tooltipPosition();c=m.x,e=m.y}return{x:c,y:e}}};function b1(a,b){return b&&((0,d.b)(b)?Array.prototype.push.apply(a,b):a.push(b)),a}function b2(a){return("string"==typeof a||a instanceof String)&&a.indexOf("\n")> -1?a.split("\n"):a}function b3(a,b){let{element:c,datasetIndex:d,index:e}=b,f=a.getDatasetMeta(d).controller,{label:g,value:h}=f.getLabelAndValue(e);return{chart:a,label:g,parsed:f.getParsed(e),raw:a.data.datasets[d].data[e],formattedValue:h,dataset:f.getDataset(),dataIndex:e,datasetIndex:d,element:c}}function b4(a,b){let c=a.chart.ctx,{body:e,footer:f,title:g}=a,{boxWidth:h,boxHeight:i}=b,j=(0,d.O)(b.bodyFont),k=(0,d.O)(b.titleFont),l=(0,d.O)(b.footerFont),m=g.length,n=f.length,o=e.length,p=(0,d.K)(b.padding),q=p.height,r=0,s=e.reduce((a,b)=>a+b.before.length+b.lines.length+b.after.length,0);if(s+=a.beforeBody.length+a.afterBody.length,m&&(q+=m*k.lineHeight+(m-1)*b.titleSpacing+b.titleMarginBottom),s){let t=b.displayColors?Math.max(i,j.lineHeight):j.lineHeight;q+=o*t+(s-o)*j.lineHeight+(s-1)*b.bodySpacing}n&&(q+=b.footerMarginTop+n*l.lineHeight+(n-1)*b.footerSpacing);let u=0,v=function(a){r=Math.max(r,c.measureText(a).width+u)};return c.save(),c.font=k.string,(0,d.Q)(a.title,v),c.font=j.string,(0,d.Q)(a.beforeBody.concat(a.afterBody),v),u=b.displayColors?h+2+b.boxPadding:0,(0,d.Q)(e,a=>{(0,d.Q)(a.before,v),(0,d.Q)(a.lines,v),(0,d.Q)(a.after,v)}),u=0,c.font=l.string,(0,d.Q)(a.footer,v),c.restore(),r+=p.width,{width:r,height:q}}function b5(a,b,c){let d=c.yAlign||b.yAlign||function(a,b){let{y:c,height:d}=b;return c<d/2?"top":c>a.height-d/2?"bottom":"center"}(a,c);return{xAlign:c.xAlign||b.xAlign||function(a,b,c,d){let{x:e,width:f}=c,{width:g,chartArea:{left:h,right:i}}=a,j="center";return"center"===d?j=e<=(h+i)/2?"left":"right":e<=f/2?j="left":e>=g-f/2&&(j="right"),function(a,b,c,d){let{x:e,width:f}=d,g=c.caretSize+c.caretPadding;if("left"===a&&e+f+g>b.width||"right"===a&&e-f-g<0)return!0}(j,a,b,c)&&(j="center"),j}(a,b,c,d),yAlign:d}}function b6(a,b,c,e){let{caretSize:f,caretPadding:g,cornerRadius:h}=a,{xAlign:i,yAlign:j}=c,k=f+g,{topLeft:l,topRight:m,bottomLeft:n,bottomRight:o}=(0,d.ax)(h),p=function a(b,c){let{x:d,width:e}=b;return"right"===c?d-=e:"center"===c&&(d-=e/2),d}(b,i),q=function a(b,c,d){let{y:e,height:f}=b;return"top"===c?e+=d:"bottom"===c?e-=f+d:e-=f/2,e}(b,j,k);return"center"===j?"left"===i?p+=k:"right"===i&&(p-=k):"left"===i?p-=Math.max(l,n)+f:"right"===i&&(p+=Math.max(m,o)+f),{x:(0,d.E)(p,0,e.width-b.width),y:(0,d.E)(q,0,e.height-b.height)}}function b7(a,b,c){let e=(0,d.K)(c.padding);return"center"===b?a.x+a.width/2:"right"===b?a.x+a.width-e.right:a.x+e.left}function b8(a){return b1([],b2(a))}function b9(a,b){let c=b&&b.dataset&&b.dataset.tooltip&&b.dataset.tooltip.callbacks;return c?a.override(c):a}class ca extends O{constructor(a){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=a.chart||a._chart,this._chart=this.chart,this.options=a.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(a){this.options=a,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let a=this._cachedAnimations;if(a)return a;let b=this.chart,c=this.options.setContext(this.getContext()),d=c.enabled&&b.options.animation&&c.animations,e=new j(this.chart,d);return d._cacheable&&(this._cachedAnimations=Object.freeze(e)),e}getContext(){var a,b,c;return this.$context||(this.$context=(a=this.chart.getContext(),b=this,c=this._tooltipItems,(0,d.h)(a,{tooltip:b,tooltipItems:c,type:"tooltip"})))}getTitle(a,b){let{callbacks:c}=b,d=c.beforeTitle.apply(this,[a]),e=c.title.apply(this,[a]),f=c.afterTitle.apply(this,[a]),g=[];return g=b1(g,b2(d)),g=b1(g,b2(e)),g=b1(g,b2(f))}getBeforeBody(a,b){return b8(b.callbacks.beforeBody.apply(this,[a]))}getBody(a,b){let{callbacks:c}=b,e=[];return(0,d.Q)(a,a=>{let b={before:[],lines:[],after:[]},d=b9(c,a);b1(b.before,b2(d.beforeLabel.call(this,a))),b1(b.lines,d.label.call(this,a)),b1(b.after,b2(d.afterLabel.call(this,a))),e.push(b)}),e}getAfterBody(a,b){return b8(b.callbacks.afterBody.apply(this,[a]))}getFooter(a,b){let{callbacks:c}=b,d=c.beforeFooter.apply(this,[a]),e=c.footer.apply(this,[a]),f=c.afterFooter.apply(this,[a]),g=[];return g=b1(g,b2(d)),g=b1(g,b2(e)),g=b1(g,b2(f))}_createItems(a){let b=this._active,c=this.chart.data,e=[],f=[],g=[],h=[],i,j;for(i=0,j=b.length;i<j;++i)h.push(b3(this.chart,b[i]));return a.filter&&(h=h.filter((b,d,e)=>a.filter(b,d,e,c))),a.itemSort&&(h=h.sort((b,d)=>a.itemSort(b,d,c))),(0,d.Q)(h,b=>{let c=b9(a.callbacks,b);e.push(c.labelColor.call(this,b)),f.push(c.labelPointStyle.call(this,b)),g.push(c.labelTextColor.call(this,b))}),this.labelColors=e,this.labelPointStyles=f,this.labelTextColors=g,this.dataPoints=h,h}update(a,b){let c=this.options.setContext(this.getContext()),d=this._active,e,f=[];if(d.length){let g=b0[c.position].call(this,d,this._eventPosition);f=this._createItems(c),this.title=this.getTitle(f,c),this.beforeBody=this.getBeforeBody(f,c),this.body=this.getBody(f,c),this.afterBody=this.getAfterBody(f,c),this.footer=this.getFooter(f,c);let h=this._size=b4(this,c),i=Object.assign({},g,h),j=b5(this.chart,c,i),k=b6(c,i,j,this.chart);this.xAlign=j.xAlign,this.yAlign=j.yAlign,e={opacity:1,x:k.x,y:k.y,width:h.width,height:h.height,caretX:g.x,caretY:g.y}}else 0!==this.opacity&&(e={opacity:0}
6);this._tooltipItems=f,this.$context=void 0,e&&this._resolveAnimations().update(this,e),a&&c.external&&c.external.call(this,{chart:this.chart,tooltip:this,replay:b})}drawCaret(a,b,c,d){let e=this.getCaretPosition(a,c,d);b.lineTo(e.x1,e.y1),b.lineTo(e.x2,e.y2),b.lineTo(e.x3,e.y3)}getCaretPosition(a,b,c){let{xAlign:e,yAlign:f}=this,{caretSize:g,cornerRadius:h}=c,{topLeft:i,topRight:j,bottomLeft:k,bottomRight:l}=(0,d.ax)(h),{x:m,y:n}=a,{width:o,height:p}=b,q,r,s,t,u,v;return"center"===f?(u=n+p/2,"left"===e?(r=(q=m)-g,t=u+g,v=u-g):(r=(q=m+o)+g,t=u-g,v=u+g),s=q):(r="left"===e?m+Math.max(i,k)+g:"right"===e?m+o-Math.max(j,l)-g:this.caretX,"top"===f?(u=(t=n)-g,q=r-g,s=r+g):(u=(t=n+p)+g,q=r+g,s=r-g),v=t),{x1:q,x2:r,x3:s,y1:t,y2:u,y3:v}}drawTitle(a,b,c){let e=this.title,f=e.length,g,h,i;if(f){let j=(0,d.aA)(c.rtl,this.x,this.width);for(i=0,a.x=b7(this,c.titleAlign,c),b.textAlign=j.textAlign(c.titleAlign),b.textBaseline="middle",g=(0,d.O)(c.titleFont),h=c.titleSpacing,b.fillStyle=c.titleColor,b.font=g.string;i<f;++i)b.fillText(e[i],j.x(a.x),a.y+g.lineHeight/2),a.y+=g.lineHeight+h,i+1===f&&(a.y+=c.titleMarginBottom-h)}}_drawColorBox(a,b,c,e,f){let g=this.labelColors[c],h=this.labelPointStyles[c],{boxHeight:i,boxWidth:j,boxPadding:k}=f,l=(0,d.O)(f.bodyFont),m=b7(this,"left",f),n=e.x(m),o=i<l.lineHeight?(l.lineHeight-i)/2:0,p=b.y+o;if(f.usePointStyle){let q={radius:Math.min(j,i)/2,pointStyle:h.pointStyle,rotation:h.rotation,borderWidth:1},r=e.leftForLtr(n,j)+j/2,s=p+i/2;a.strokeStyle=f.multiKeyBackground,a.fillStyle=f.multiKeyBackground,(0,d.au)(a,q,r,s),a.strokeStyle=g.borderColor,a.fillStyle=g.backgroundColor,(0,d.au)(a,q,r,s)}else{a.lineWidth=(0,d.i)(g.borderWidth)?Math.max(...Object.values(g.borderWidth)):g.borderWidth||1,a.strokeStyle=g.borderColor,a.setLineDash(g.borderDash||[]),a.lineDashOffset=g.borderDashOffset||0;let t=e.leftForLtr(n,j-k),u=e.leftForLtr(e.xPlus(n,1),j-k-2),v=(0,d.ax)(g.borderRadius);Object.values(v).some(a=>0!==a)?(a.beginPath(),a.fillStyle=f.multiKeyBackground,(0,d.av)(a,{x:t,y:p,w:j,h:i,radius:v}),a.fill(),a.stroke(),a.fillStyle=g.backgroundColor,a.beginPath(),(0,d.av)(a,{x:u,y:p+1,w:j-2,h:i-2,radius:v}),a.fill()):(a.fillStyle=f.multiKeyBackground,a.fillRect(t,p,j,i),a.strokeRect(t,p,j,i),a.fillStyle=g.backgroundColor,a.fillRect(u,p+1,j-2,i-2))}a.fillStyle=this.labelTextColors[c]}drawBody(a,b,c){let{body:e}=this,{bodySpacing:f,bodyAlign:g,displayColors:h,boxHeight:i,boxWidth:j,boxPadding:k}=c,l=(0,d.O)(c.bodyFont),m=l.lineHeight,n=0,o=(0,d.aA)(c.rtl,this.x,this.width),p=function(c){b.fillText(c,o.x(a.x+n),a.y+m/2),a.y+=m+f},q=o.textAlign(g),r,s,t,u,v,w,x;for(b.textAlign=g,b.textBaseline="middle",b.font=l.string,a.x=b7(this,q,c),b.fillStyle=c.bodyColor,(0,d.Q)(this.beforeBody,p),n=h&&"right"!==q?"center"===g?j/2+k:j+2+k:0,u=0,w=e.length;u<w;++u){for(r=e[u],s=this.labelTextColors[u],b.fillStyle=s,(0,d.Q)(r.before,p),t=r.lines,h&&t.length&&(this._drawColorBox(b,a,u,o,c),m=Math.max(l.lineHeight,i)),v=0,x=t.length;v<x;++v)p(t[v]),m=l.lineHeight;(0,d.Q)(r.after,p)}n=0,m=l.lineHeight,(0,d.Q)(this.afterBody,p),a.y-=f}drawFooter(a,b,c){let e=this.footer,f=e.length,g,h;if(f){let i=(0,d.aA)(c.rtl,this.x,this.width);for(a.x=b7(this,c.footerAlign,c),a.y+=c.footerMarginTop,b.textAlign=i.textAlign(c.footerAlign),b.textBaseline="middle",g=(0,d.O)(c.footerFont),b.fillStyle=c.footerColor,b.font=g.string,h=0;h<f;++h)b.fillText(e[h],i.x(a.x),a.y+g.lineHeight/2),a.y+=g.lineHeight+c.footerSpacing}}drawBackground(a,b,c,e){let{xAlign:f,yAlign:g}=this,{x:h,y:i}=a,{width:j,height:k}=c,{topLeft:l,topRight:m,bottomLeft:n,bottomRight:o}=(0,d.ax)(e.cornerRadius);b.fillStyle=e.backgroundColor,b.strokeStyle=e.borderColor,b.lineWidth=e.borderWidth,b.beginPath(),b.moveTo(h+l,i),"top"===g&&this.drawCaret(a,b,c,e),b.lineTo(h+j-m,i),b.quadraticCurveTo(h+j,i,h+j,i+m),"center"===g&&"right"===f&&this.drawCaret(a,b,c,e),b.lineTo(h+j,i+k-o),b.quadraticCurveTo(h+j,i+k,h+j-o,i+k),"bottom"===g&&this.drawCaret(a,b,c,e),b.lineTo(h+n,i+k),b.quadraticCurveTo(h,i+k,h,i+k-n),"center"===g&&"left"===f&&this.drawCaret(a,b,c,e),b.lineTo(h,i+l),b.quadraticCurveTo(h,i,h+l,i),b.closePath(),b.fill(),e.borderWidth>0&&b.stroke()}_updateAnimationTarget(a){let b=this.chart,c=this.$animations,d=c&&c.x,e=c&&c.y;if(d||e){let f=b0[a.position].call(this,this._active,this._eventPosition);if(!f)return;let g=this._size=b4(this,a),h=Object.assign({},f,this._size),i=b5(b,a,h),j=b6(a,h,i,b);(d._to!==j.x||e._to!==j.y)&&(this.xAlign=i.xAlign,this.yAlign=i.yAlign,this.width=g.width,this.height=g.height,this.caretX=f.x,this.caretY=f.y,this._resolveAnimations().update(this,j))}}_willRender(){return!!this.opacity}draw(a){let b=this.options.setContext(this.getContext()),c=this.opacity;if(!c)return;this._updateAnimationTarget(b);let e={width:this.width,height:this.height},f={x:this.x,y:this.y};c=.001>Math.abs(c)?0:c;let g=(0,d.K)(b.padding),h=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;
6b.enabled&&h&&(a.save(),a.globalAlpha=c,this.drawBackground(f,a,e,b),(0,d.aB)(a,b.textDirection),f.y+=g.top,this.drawTitle(f,a,b),this.drawBody(f,a,b),this.drawFooter(f,a,b),(0,d.aD)(a,b.textDirection),a.restore())}getActiveElements(){return this._active||[]}setActiveElements(a,b){let c=this._active,e=a.map(({datasetIndex:a,index:b})=>{let c=this.chart.getDatasetMeta(a);if(!c)throw Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[b],index:b}}),f=!(0,d.ai)(c,e),g=this._positionChanged(e,b);(f||g)&&(this._active=e,this._eventPosition=b,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(a,b,c=!0){if(b&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let e=this.options,f=this._active||[],g=this._getActiveElements(a,f,b,c),h=this._positionChanged(g,a),i=b||!(0,d.ai)(g,f)||h;return i&&(this._active=g,(e.enabled||e.external)&&(this._eventPosition={x:a.x,y:a.y},this.update(!0,b))),i}_getActiveElements(a,b,c,d){let e=this.options;if("mouseout"===a.type)return[];if(!d)return b;let f=this.chart.getElementsAtEventForMode(a,e.mode,e,c);return e.reverse&&f.reverse(),f}_positionChanged(a,b){let{caretX:c,caretY:d,options:e}=this,f=b0[e.position].call(this,a,b);return!1!==f&&(c!==f.x||d!==f.y)}}ca.positioners=b0;var cb={id:"tooltip",_element:ca,positioners:b0,afterInit(a,b,c){c&&(a.tooltip=new ca({chart:a,options:c}))},beforeUpdate(a,b,c){a.tooltip&&a.tooltip.initialize(c)},reset(a,b,c){a.tooltip&&a.tooltip.initialize(c)},afterDraw(a){let b=a.tooltip;if(b&&b._willRender()){let c={tooltip:b};if(!1===a.notifyPlugins("beforeTooltipDraw",c))return;b.draw(a.ctx),a.notifyPlugins("afterTooltipDraw",c)}},afterEvent(a,b){if(a.tooltip){let c=b.replay;a.tooltip.handleEvent(b.event,c,b.inChartArea)&&(b.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(a,b)=>b.bodyFont.size,boxWidth:(a,b)=>b.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:d.aF,title(a){if(a.length>0){let b=a[0],c=b.chart.data.labels,d=c?c.length:0;if(this&&this.options&&"dataset"===this.options.mode)return b.dataset.label||"";if(b.label)return b.label;if(d>0&&b.dataIndex<d)return c[b.dataIndex]}return""},afterTitle:d.aF,beforeBody:d.aF,beforeLabel:d.aF,label(a){if(this&&this.options&&"dataset"===this.options.mode)return a.label+": "+a.formattedValue||a.formattedValue;let b=a.dataset.label||"";b&&(b+=": ");let c=a.formattedValue;return(0,d.k)(c)||(b+=c),b},labelColor(a){let b=a.chart.getDatasetMeta(a.datasetIndex),c=b.controller.getStyle(a.dataIndex);return{borderColor:c.borderColor,backgroundColor:c.backgroundColor,borderWidth:c.borderWidth,borderDash:c.borderDash,borderDashOffset:c.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(a){let b=a.chart.getDatasetMeta(a.datasetIndex),c=b.controller.getStyle(a.dataIndex);return{pointStyle:c.pointStyle,rotation:c.rotation}},afterLabel:d.aF,afterBody:d.aF,beforeFooter:d.aF,footer:d.aF,afterFooter:d.aF}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:a=>"filter"!==a&&"itemSort"!==a&&"external"!==a,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},cc=Object.freeze({__proto__:null,Decimation:bx,Filler:bS,Legend:bX,SubTitle:b_,Title:bZ,Tooltip:cb});let cd=(a,b,c,d)=>("string"==typeof b?(c=a.push(b)-1,d.unshift({index:c,label:b})):isNaN(b)&&(c=null),c),ce=(a,b)=>null===a?null:(0,d.E)(Math.round(a),0,b);
6class cf extends ${constructor(a){super(a),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(a){let b=this._addedLabels;if(b.length){let c=this.getLabels();for(let{index:d,label:e}of b)c[d]===e&&c.splice(d,1);this._addedLabels=[]}super.init(a)}parse(a,b){if((0,d.k)(a))return null;let c=this.getLabels();return b=isFinite(b)&&c[b]===a?b:function(a,b,c,d){let e=a.indexOf(b);if(-1===e)return cd(a,b,c,d);let f=a.lastIndexOf(b);return e!==f?c:e}(c,a,(0,d.v)(b,a),this._addedLabels),ce(b,c.length-1)}determineDataLimits(){let{minDefined:a,maxDefined:b}=this.getUserBounds(),{min:c,max:d}=this.getMinMax(!0);"ticks"!==this.options.bounds||(a||(c=0),b||(d=this.getLabels().length-1)),this.min=c,this.max=d}buildTicks(){let a=this.min,b=this.max,c=this.options.offset,d=[],e=this.getLabels();e=0===a&&b===e.length-1?e:e.slice(a,b+1),this._valueRange=Math.max(e.length-(c?0:1),1),this._startValue=this.min-(c?.5:0);for(let f=a;f<=b;f++)d.push({value:f});return d}getLabelForValue(a){let b=this.getLabels();return a>=0&&a<b.length?b[a]:a}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(a){return"number"!=typeof a&&(a=this.parse(a)),null===a?NaN:this.getPixelForDecimal((a-this._startValue)/this._valueRange)}getPixelForTick(a){let b=this.ticks;return a<0||a>b.length-1?null:this.getPixelForValue(b[a].value)}getValueForPixel(a){return Math.round(this._startValue+this.getDecimalForPixel(a)*this._valueRange)}getBasePixel(){return this.bottom}}function cg(a,b,{horizontal:c,minRotation:e}){let f=(0,d.t)(e),g=.75*b*(""+a).length;return Math.min(b/((c?Math.sin(f):Math.cos(f))||.001),g)}cf.id="category",cf.defaults={ticks:{callback:cf.prototype.getLabelForValue}};class ch extends ${constructor(a){super(a),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(a,b){return(0,d.k)(a)||("number"==typeof a||a instanceof Number)&&!isFinite(+a)?null:+a}handleTickRangeOptions(){let{beginAtZero:a}=this.options,{minDefined:b,maxDefined:c}=this.getUserBounds(),{min:e,max:f}=this,g=a=>e=b?e:a,h=a=>f=c?f:a;if(a){let i=(0,d.s)(e),j=(0,d.s)(f);i<0&&j<0?h(0):i>0&&j>0&&g(0)}if(e===f){let k=1;(f>=Number.MAX_SAFE_INTEGER||e<=Number.MIN_SAFE_INTEGER)&&(k=Math.abs(.05*f)),h(f+k),a||g(e-k)}this.min=e,this.max=f}getTickLimit(){let a=this.options.ticks,{maxTicksLimit:b,stepSize:c}=a,d;return c?(d=Math.ceil(this.max/c)-Math.floor(this.min/c)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${c} would result generating up to ${d} ticks. Limiting to 1000.`),d=1e3):(d=this.computeTickLimit(),b=b||11),b&&(d=Math.min(b,d)),d}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let a=this.options,b=a.ticks,c=this.getTickLimit();c=Math.max(2,c);let e={maxTicks:c,bounds:a.bounds,min:a.min,max:a.max,precision:b.precision,step:b.stepSize,count:b.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:b.minRotation||0,includeBounds:!1!==b.includeBounds},f=this._range||this,g=function(a,b){let c=[],{bounds:e,step:f,min:g,max:h,precision:i,count:j,maxTicks:k,maxDigits:l,includeBounds:m}=a,n=f||1,o=k-1,{min:p,max:q}=b,r=!(0,d.k)(g),s=!(0,d.k)(h),t=!(0,d.k)(j),u=(q-p)/(l+1),v=(0,d.aI)((q-p)/o/n)*n,w,x,y,z;if(v<1e-14&&!r&&!s)return[{value:p},{value:q}];(z=Math.ceil(q/v)-Math.floor(p/v))>o&&(v=(0,d.aI)(z*v/o/n)*n),(0,d.k)(i)||(w=Math.pow(10,i),v=Math.ceil(v*w)/w),"ticks"===e?(x=Math.floor(p/v)*v,y=Math.ceil(q/v)*v):(x=p,y=q),r&&s&&f&&(0,d.aJ)((h-g)/f,v/1e3)?(z=Math.round(Math.min((h-g)/v,k)),v=(h-g)/z,x=g,y=h):t?(x=r?g:x,v=((y=s?h:y)-x)/(z=j-1)):(z=(y-x)/v,z=(0,d.aK)(z,Math.round(z),v/1e3)?Math.round(z):Math.ceil(z));let A=Math.max((0,d.aL)(v),(0,d.aL)(x));w=Math.pow(10,(0,d.k)(i)?A:i),x=Math.round(x*w)/w,y=Math.round(y*w)/w;let B=0;for(r&&(m&&x!==g?(c.push({value:g}),x<g&&B++,(0,d.aK)(Math.round((x+B*v)*w)/w,g,cg(g,u,a))&&B++):x<g&&B++);B<z;++B)c.push({value:Math.round((x+B*v)*w)/w});return s&&m&&y!==h?c.length&&(0,d.aK)(c[c.length-1].value,h,cg(h,u,a))?c[c.length-1].value=h:c.push({value:h}):s&&y!==h||c.push({value:y}),c}(e,f);return"ticks"===a.bounds&&(0,d.aH)(g,this,"value"),a.reverse?(g.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),g}
6configure(){let a=this.ticks,b=this.min,c=this.max;if(super.configure(),this.options.offset&&a.length){let d=(c-b)/Math.max(a.length-1,1)/2;b-=d,c+=d}this._startValue=b,this._endValue=c,this._valueRange=c-b}getLabelForValue(a){return(0,d.o)(a,this.chart.options.locale,this.options.ticks.format)}}class ci extends ch{determineDataLimits(){let{min:a,max:b}=this.getMinMax(!0);this.min=(0,d.g)(a)?a:0,this.max=(0,d.g)(b)?b:1,this.handleTickRangeOptions()}computeTickLimit(){let a=this.isHorizontal(),b=a?this.width:this.height,c=(0,d.t)(this.options.ticks.minRotation),e=this._resolveTickFontOptions(0);return Math.ceil(b/Math.min(40,e.lineHeight/((a?Math.sin(c):Math.cos(c))||.001)))}getPixelForValue(a){return null===a?NaN:this.getPixelForDecimal((a-this._startValue)/this._valueRange)}getValueForPixel(a){return this._startValue+this.getDecimalForPixel(a)*this._valueRange}}function cj(a){let b=a/Math.pow(10,Math.floor((0,d.z)(a)));return 1===b}ci.id="linear",ci.defaults={ticks:{callback:R.formatters.numeric}};class ck extends ${constructor(a){super(a),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(a,b){let c=ch.prototype.parse.apply(this,[a,b]);if(0===c){this._zero=!0;return}return(0,d.g)(c)&&c>0?c:null}determineDataLimits(){let{min:a,max:b}=this.getMinMax(!0);this.min=(0,d.g)(a)?Math.max(0,a):null,this.max=(0,d.g)(b)?Math.max(0,b):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:a,maxDefined:b}=this.getUserBounds(),c=this.min,e=this.max,f=b=>c=a?c:b,g=a=>e=b?e:a,h=(a,b)=>Math.pow(10,Math.floor((0,d.z)(a))+b);c===e&&(c<=0?(f(1),g(10)):(f(h(c,-1)),g(h(e,1)))),c<=0&&f(h(e,-1)),e<=0&&g(h(c,1)),this._zero&&this.min!==this._suggestedMin&&c===h(this.min,0)&&f(h(c,-1)),this.min=c,this.max=e}buildTicks(){let a=this.options,b={min:this._userMin,max:this._userMax},c=function(a,b){let c=Math.floor((0,d.z)(b.max)),e=Math.ceil(b.max/Math.pow(10,c)),f=[],g=(0,d.B)(a.min,Math.pow(10,Math.floor((0,d.z)(b.min)))),h=Math.floor((0,d.z)(g)),i=Math.floor(g/Math.pow(10,h)),j=h<0?Math.pow(10,Math.abs(h)):1;do f.push({value:g,major:cj(g)}),10== ++i&&(i=1,j=++h>=0?1:j),g=Math.round(i*Math.pow(10,h)*j)/j;while(h<c||h===c&&i<e);let k=(0,d.B)(a.max,g);return f.push({value:k,major:cj(g)}),f}(b,this);return"ticks"===a.bounds&&(0,d.aH)(c,this,"value"),a.reverse?(c.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),c}getLabelForValue(a){return void 0===a?"0":(0,d.o)(a,this.chart.options.locale,this.options.ticks.format)}configure(){let a=this.min;super.configure(),this._startValue=(0,d.z)(a),this._valueRange=(0,d.z)(this.max)-(0,d.z)(a)}getPixelForValue(a){return((void 0===a||0===a)&&(a=this.min),null===a||isNaN(a))?NaN:this.getPixelForDecimal(a===this.min?0:((0,d.z)(a)-this._startValue)/this._valueRange)}getValueForPixel(a){let b=this.getDecimalForPixel(a);return Math.pow(10,this._startValue+b*this._valueRange)}}function cl(a){let b=a.ticks;if(b.display&&a.display){let c=(0,d.K)(b.backdropPadding);return(0,d.v)(b.font&&b.font.size,d.d.font.size)+c.height}return 0}function cm(a,b,c){return c=(0,d.b)(c)?c:[c],{w:(0,d.aM)(a,b.string,c),h:c.length*b.lineHeight}}function cn(a,b,c,d,e){return a===d||a===e?{start:b-c/2,end:b+c/2}:a<d||a>e?{start:b-c,end:b}:{start:b,end:b+c}}function co(a,b,c,d,e){let f=Math.abs(Math.sin(c)),g=Math.abs(Math.cos(c)),h=0,i=0;d.start<b.l?(h=(b.l-d.start)/f,a.l=Math.min(a.l,b.l-h)):d.end>b.r&&(h=(d.end-b.r)/f,a.r=Math.max(a.r,b.r+h)),e.start<b.t?(i=(b.t-e.start)/g,a.t=Math.min(a.t,b.t-i)):e.end>b.b&&(i=(e.end-b.b)/g,a.b=Math.max(a.b,b.b+i))}ck.id="logarithmic",ck.defaults={ticks:{callback:R.formatters.logarithmic,major:{enabled:!0}}};function cp(a){return 0===a||180===a?"center":a<180?"left":"right"}function cq(a,b,c){return"right"===c?a-=b:"center"===c&&(a-=b/2),a}function cr(a,b,c){return 90===c||270===c?a-=b/2:(c>270||c<90)&&(a-=b),a}function cs(a,b,c,e){let{ctx:f}=a;if(c)f.arc(a.xCenter,a.yCenter,b,0,d.T);
6else{let g=a.getPointPosition(0,b);f.moveTo(g.x,g.y);for(let h=1;h<e;h++)g=a.getPointPosition(h,b),f.lineTo(g.x,g.y)}}class ct extends ch{constructor(a){super(a),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let a=this._padding=(0,d.K)(cl(this.options)/2),b=this.width=this.maxWidth-a.width,c=this.height=this.maxHeight-a.height;this.xCenter=Math.floor(this.left+b/2+a.left),this.yCenter=Math.floor(this.top+c/2+a.top),this.drawingArea=Math.floor(Math.min(b,c)/2)}determineDataLimits(){let{min:a,max:b}=this.getMinMax(!1);this.min=(0,d.g)(a)&&!isNaN(a)?a:0,this.max=(0,d.g)(b)&&!isNaN(b)?b:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/cl(this.options))}generateTickLabels(a){ch.prototype.generateTickLabels.call(this,a),this._pointLabels=this.getLabels().map((a,b)=>{let c=(0,d.C)(this.options.pointLabels.callback,[a,b],this);return c||0===c?c:""}).filter((a,b)=>this.chart.getDataVisibility(b))}fit(){let a=this.options;a.display&&a.pointLabels.display?function(a){let b={l:a.left+a._padding.left,r:a.right-a._padding.right,t:a.top+a._padding.top,b:a.bottom-a._padding.bottom},c=Object.assign({},b),e=[],f=[],g=a._pointLabels.length,h=a.options.pointLabels,i=h.centerPointLabels?d.P/g:0;for(let j=0;j<g;j++){let k=h.setContext(a.getPointLabelContext(j));f[j]=k.padding;let l=a.getPointPosition(j,a.drawingArea+f[j],i),m=(0,d.O)(k.font),n=cm(a.ctx,m,a._pointLabels[j]);e[j]=n;let o=(0,d.az)(a.getIndexAngle(j)+i),p=Math.round((0,d.F)(o)),q=cn(p,l.x,n.w,0,180),r=cn(p,l.y,n.h,90,270);co(c,b,o,q,r)}a.setCenterPoint(b.l-c.l,c.r-b.r,b.t-c.t,c.b-b.b),a._pointLabelItems=function a(b,c,e){let f=[],g=b._pointLabels.length,h=b.options,i=cl(h)/2,j=b.drawingArea,k=h.pointLabels.centerPointLabels?d.P/g:0;for(let l=0;l<g;l++){let m=b.getPointPosition(l,j+i+e[l],k),n=Math.round((0,d.F)((0,d.az)(m.angle+d.H))),o=c[l],p=cr(m.y,o.h,n),q=cp(n),r=cq(m.x,o.w,q);f.push({x:m.x,y:p,textAlign:q,left:r,top:p,right:r+o.w,bottom:p+o.h})}return f}(a,e,f)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(a,b,c,d){this.xCenter+=Math.floor((a-b)/2),this.yCenter+=Math.floor((c-d)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(a,b,c,d))}getIndexAngle(a){let b=d.T/(this._pointLabels.length||1),c=this.options.startAngle||0;return(0,d.az)(a*b+(0,d.t)(c))}getDistanceFromCenterForValue(a){if((0,d.k)(a))return NaN;let b=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-a)*b:(a-this.min)*b}getValueForDistanceFromCenter(a){if((0,d.k)(a))return NaN;let b=a/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-b:this.min+b}getPointLabelContext(a){let b=this._pointLabels||[];if(a>=0&&a<b.length){var c,e,f;let g=b[a];return c=this.getContext(),e=a,f=g,(0,d.h)(c,{label:f,index:e,type:"pointLabel"})}}getPointPosition(a,b,c=0){let e=this.getIndexAngle(a)-d.H+c;return{x:Math.cos(e)*b+this.xCenter,y:Math.sin(e)*b+this.yCenter,angle:e}}getPointPositionForValue(a,b){return this.getPointPosition(a,this.getDistanceFromCenterForValue(b))}getBasePosition(a){return this.getPointPositionForValue(a||0,this.getBaseValue())}getPointLabelPosition(a){let{left:b,top:c,right:d,bottom:e}=this._pointLabelItems[a];return{left:b,top:c,right:d,bottom:e}}drawBackground(){let{backgroundColor:a,grid:{circular:b}}=this.options;if(a){let c=this.ctx;c.save(),c.beginPath(),cs(this,this.getDistanceFromCenterForValue(this._endValue),b,this._pointLabels.length),c.closePath(),c.fillStyle=a,c.fill(),c.restore()}}drawGrid(){let a=this.ctx,b=this.options,{angleLines:c,grid:e}=b,f=this._pointLabels.length,g,h,i;if(b.pointLabels.display&&function(a,b){let{ctx:c,options:{pointLabels:e}}=a;for(let f=b-1;f>=0;f--){let g=e.setContext(a.getPointLabelContext(f)),h=(0,d.O)(g.font),{x:i,y:j,textAlign:k,left:l,top:m,right:n,bottom:o}=a._pointLabelItems[f],{backdropColor:p}=g;if(!(0,d.k)(p)){let q=(0,d.ax)(g.borderRadius),r=(0,d.K)(g.backdropPadding);c.fillStyle=p;let s=l-r.left,t=m-r.top,u=n-l+r.width,v=o-m+r.height;Object.values(q).some(a=>
60!==a)?(c.beginPath(),(0,d.av)(c,{x:s,y:t,w:u,h:v,radius:q}),c.fill()):c.fillRect(s,t,u,v)}(0,d.M)(c,a._pointLabels[f],i,j+h.lineHeight/2,h,{color:g.color,textAlign:k,textBaseline:"middle"})}}(this,f),e.display&&this.ticks.forEach((a,b)=>{if(0!==b){h=this.getDistanceFromCenterForValue(a.value);let c=e.setContext(this.getContext(b-1));!function(a,b,c,d){let e=a.ctx,f=b.circular,{color:g,lineWidth:h}=b;(f||d)&&g&&h&&!(c<0)&&(e.save(),e.strokeStyle=g,e.lineWidth=h,e.setLineDash(b.borderDash),e.lineDashOffset=b.borderDashOffset,e.beginPath(),cs(a,c,f,d),e.closePath(),e.stroke(),e.restore())}(this,c,h,f)}}),c.display){for(a.save(),g=f-1;g>=0;g--){let j=c.setContext(this.getPointLabelContext(g)),{color:k,lineWidth:l}=j;l&&k&&(a.lineWidth=l,a.strokeStyle=k,a.setLineDash(j.borderDash),a.lineDashOffset=j.borderDashOffset,h=this.getDistanceFromCenterForValue(b.ticks.reverse?this.min:this.max),i=this.getPointPosition(g,h),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(i.x,i.y),a.stroke())}a.restore()}}drawBorder(){}drawLabels(){let a=this.ctx,b=this.options,c=b.ticks;if(!c.display)return;let e=this.getIndexAngle(0),f,g;a.save(),a.translate(this.xCenter,this.yCenter),a.rotate(e),a.textAlign="center",a.textBaseline="middle",this.ticks.forEach((e,h)=>{if(0===h&&!b.reverse)return;let i=c.setContext(this.getContext(h)),j=(0,d.O)(i.font);if(f=this.getDistanceFromCenterForValue(this.ticks[h].value),i.showLabelBackdrop){a.font=j.string,g=a.measureText(e.label).width,a.fillStyle=i.backdropColor;let k=(0,d.K)(i.backdropPadding);a.fillRect(-g/2-k.left,-f-j.size/2-k.top,g+k.width,j.size+k.height)}(0,d.M)(a,e.label,0,-f,j,{color:i.color})}),a.restore()}drawTitle(){}}ct.id="radialLinear",ct.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:R.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(a){return a},padding:5,centerPointLabels:!1}},ct.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ct.descriptors={angleLines:{_fallback:"grid"}};let cu={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},cv=Object.keys(cu);function cw(a,b){return a-b}function cx(a,b){if((0,d.k)(b))return null;let c=a._adapter,{parser:e,round:f,isoWeekday:g}=a._parseOpts,h=b;return("function"==typeof e&&(h=e(h)),(0,d.g)(h)||(h="string"==typeof e?c.parse(h,e):c.parse(h)),null===h)?null:(f&&(h="week"===f&&((0,d.x)(g)|| !0===g)?c.startOf(h,"isoWeek",g):c.startOf(h,f)),+h)}function cy(a,b,c,d){let e=cv.length;for(let f=cv.indexOf(a);f<e-1;++f){let g=cu[cv[f]],h=g.steps?g.steps:Number.MAX_SAFE_INTEGER;if(g.common&&Math.ceil((c-b)/(h*g.size))<=d)return cv[f]}return cv[e-1]}function cz(a,b,c){if(c){if(c.length){let{lo:e,hi:f}=(0,d.aO)(c,b),g=c[e]>=b?c[e]:c[f];a[g]=!0}}else a[b]=!0}function cA(a,b,c){let d=[],e={},f=b.length,g,h;for(g=0;g<f;++g)e[h=b[g]]=g,d.push({value:h,major:!1});return 0!==f&&c?function(a,b,c,d){let e=a._adapter,f=+e.startOf(b[0].value,d),g=b[b.length-1].value,h,i;for(h=f;h<=g;h=+e.add(h,1,d))(i=c[h])>=0&&(b[i].major=!0);return b}(a,d,e,c):d}class cB extends ${constructor(a){super(a),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(a,b){let c=a.time||(a.time={}),e=this._adapter=new ai._date(a.adapters.date);e.init(b),(0,d.ac)(c.displayFormats,e.formats()),this._parseOpts={parser:c.parser,round:c.round,isoWeekday:c.isoWeekday},super.init(a),this._normalized=b.normalized}parse(a,b){return void 0===a?null:cx(this,a)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let a=this.options,b=this._adapter,c=a.time.unit||"day",{min:e,max:f,minDefined:g,maxDefined:h}=this.getUserBounds();function i(a){g||isNaN(a.min)||(e=Math.min(e,a.min)),h||isNaN(a.max)||(f=Math.max(f,a.max))}g&&h||(i(this._getLabelBounds()),("ticks"!==a.bounds||"labels"!==a.ticks.source)&&i(this.getMinMax(!1))),e=(0,d.g)(e)&&!isNaN(e)?e:+b.startOf(Date.now(),c),f=(0,d.g)(f)&&!isNaN(f)?f:+b.endOf(Date.now(),c)+1,this.min=Math.min(e,f-1),this.max=Math.max(e+1,f)}_getLabelBounds(){let a=this.getLabelTimestamps(),b=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;return a.length&&(b=a[0],c=a[a.length-1]),{min:b,max:c}}buildTicks(){let a=this.options,b=a.time,c=a.ticks,e="labels"===c.source?this.getLabelTimestamps():this._generate();"ticks"===a.bounds&&e.length&&(this.min=this._userMin||e[0],this.max=this._userMax||e[e.length-1]);let f=this.min,g=this.max,h=(0,d.aN)(e,f,g);return this._unit=b.unit||(c.autoSkip?cy(b.minUnit,this.min,this.max,this._getLabelCapacity(f)):function(a,b,c,d,e){for(let f=cv.length-1;f>=cv.indexOf(c);f--){let g=cv[f];if(cu[g].common&&a._adapter.diff(e,d,g)>=b-1)return g}return cv[c?cv.indexOf(c):0]}(this,h.length,b.minUnit,this.min,this.max)),this._majorUnit=c.major.enabled&&"year"!==this._unit?function(a){for(let b=cv.indexOf(a)+1,c=cv.length;b<c;++b)if(cu[cv[b]].common)return cv[b]}(this._unit):void 0,this.initOffsets(e),a.reverse&&h.reverse(),cA(this,h,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(a=>+a.value))}initOffsets(a){let b=0,c=0,e,f;this.options.offset&&a.length&&(e=this.getDecimalForValue(a[0]),b=1===a.length?1-e:(this.getDecimalForValue(a[1])-e)/2,f=this.getDecimalForValue(a[a.length-1]),c=1===a.length?f:(f-this.getDecimalForValue(a[a.length-2]))/2);let g=a.length<3?.5:.25;b=(0,d.E)(b,0,g),c=(0,d.E)(c,0,g),this._offsets={start:b,end:c,factor:1/(b+1+c)}}
6_generate(){let a=this._adapter,b=this.min,c=this.max,e=this.options,f=e.time,g=f.unit||cy(f.minUnit,b,c,this._getLabelCapacity(b)),h=(0,d.v)(f.stepSize,1),i="week"===g&&f.isoWeekday,j=(0,d.x)(i)|| !0===i,k={},l=b,m,n;if(j&&(l=+a.startOf(l,"isoWeek",i)),l=+a.startOf(l,j?"day":g),a.diff(c,b,g)>1e5*h)throw Error(b+" and "+c+" are too far apart with stepSize of "+h+" "+g);let o="data"===e.ticks.source&&this.getDataTimestamps();for(m=l,n=0;m<c;m=+a.add(m,h,g),n++)cz(k,m,o);return(m===c||"ticks"===e.bounds||1===n)&&cz(k,m,o),Object.keys(k).sort((a,b)=>a-b).map(a=>+a)}getLabelForValue(a){let b=this._adapter,c=this.options.time;return c.tooltipFormat?b.format(a,c.tooltipFormat):b.format(a,c.displayFormats.datetime)}_tickFormatFunction(a,b,c,e){let f=this.options,g=f.time.displayFormats,h=this._unit,i=this._majorUnit,j=h&&g[h],k=i&&g[i],l=c[b],m=i&&k&&l&&l.major,n=this._adapter.format(a,e||(m?k:j)),o=f.ticks.callback;return o?(0,d.C)(o,[n,b,c],this):n}generateTickLabels(a){let b,c,d;for(b=0,c=a.length;b<c;++b)(d=a[b]).label=this._tickFormatFunction(d.value,b,a)}getDecimalForValue(a){return null===a?NaN:(a-this.min)/(this.max-this.min)}getPixelForValue(a){let b=this._offsets,c=this.getDecimalForValue(a);return this.getPixelForDecimal((b.start+c)*b.factor)}getValueForPixel(a){let b=this._offsets,c=this.getDecimalForPixel(a)/b.factor-b.end;return this.min+c*(this.max-this.min)}_getLabelSize(a){let b=this.options.ticks,c=this.ctx.measureText(a).width,e=(0,d.t)(this.isHorizontal()?b.maxRotation:b.minRotation),f=Math.cos(e),g=Math.sin(e),h=this._resolveTickFontOptions(0).size;return{w:c*f+h*g,h:c*g+h*f}}_getLabelCapacity(a){let b=this.options.time,c=b.displayFormats,d=c[b.unit]||c.millisecond,e=this._tickFormatFunction(a,0,cA(this,[a],this._majorUnit),d),f=this._getLabelSize(e),g=Math.floor(this.isHorizontal()?this.width/f.w:this.height/f.h)-1;return g>0?g:1}getDataTimestamps(){let a=this._cache.data||[],b,c;if(a.length)return a;let d=this.getMatchingVisibleMetas();if(this._normalized&&d.length)return this._cache.data=d[0].controller.getAllParsedValues(this);for(b=0,c=d.length;b<c;++b)a=a.concat(d[b].controller.getAllParsedValues(this));return this._cache.data=this.normalize(a)}getLabelTimestamps(){let a=this._cache.labels||[],b,c;if(a.length)return a;let d=this.getLabels();for(b=0,c=d.length;b<c;++b)a.push(cx(this,d[b]));return this._cache.labels=this._normalized?a:this.normalize(a)}normalize(a){return(0,d._)(a.sort(cw))}}function cC(a,b,c){let e=0,f=a.length-1,g,h,i,j;c?(b>=a[e].pos&&b<=a[f].pos&&({lo:e,hi:f}=(0,d.Z)(a,"pos",b)),{pos:g,time:i}=a[e],{pos:h,time:j}=a[f]):(b>=a[e].time&&b<=a[f].time&&({lo:e,hi:f}=(0,d.Z)(a,"time",b)),{time:g,pos:i}=a[e],{time:h,pos:j}=a[f]);let k=h-g;return k?i+(j-i)*(b-g)/k:i}cB.id="time",cB.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class cD extends cB{constructor(a){super(a),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let a=this._getTimestampsForTable(),b=this._table=this.buildLookupTable(a);this._minPos=cC(b,this.min),this._tableRange=cC(b,this.max)-this._minPos,super.initOffsets(a)}buildLookupTable(a){let{min:b,max:c}=this,d=[],e=[],f,g,h,i,j;for(f=0,g=a.length;f<g;++f)(i=a[f])>=b&&i<=c&&d.push(i);if(d.length<2)return[{time:b,pos:0},{time:c,pos:1}];for(f=0,g=d.length;f<g;++f)j=d[f+1],h=d[f-1],i=d[f],Math.round((j+h)/2)!==i&&e.push({time:i,pos:f/(g-1)});return e}_getTimestampsForTable(){let a=this._cache.all||[];if(a.length)return a;let b=this.getDataTimestamps(),c=this.getLabelTimestamps();return a=b.length&&c.length?this.normalize(b.concat(c)):b.length?b:c,a=this._cache.all=a}getDecimalForValue(a){return(cC(this._table,a)-this._minPos)/this._tableRange}getValueForPixel(a){let b=this._offsets,c=this.getDecimalForPixel(a)/b.factor-b.end;return cC(this._table,c*this._tableRange+this._minPos,!0)}}cD.id="timeseries",cD.defaults=cB.defaults;var cE=Object.freeze({__proto__:null,CategoryScale:cf,LinearScale:ci,LogarithmicScale:ck,RadialLinearScale:ct,TimeScale:cB,TimeSeriesScale:cD});let cF=[af,bu,cc,cE,]}}])

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.