@sysvale/cuida 3.56.1 → 3.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@sysvale/cuida.es.js +235 -220
- package/dist/@sysvale/cuida.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* Released under the MIT License
|
|
36
36
|
*/class Z9{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,s){const a=n.listeners[s],o=n.duration;a.forEach(c=>c({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Tm.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const a=i.items;let o=a.length-1,c=!1,d;for(;o>=0;--o)d=a[o],d._active?(d._total>i.duration&&(i.duration=d._total),d.tick(e),c=!0):(a[o]=a[a.length-1],a.pop());c&&(s.draw(),this._notify(s,i,e,"progress")),a.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),n+=a.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var bs=new Z9;const lg="transparent",X9={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Pm(t||lg),s=i.valid&&Pm(e||lg);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class J9{constructor(e,n,i,s){const a=n[i];s=fl([e.to,s,a,e.from]);const o=fl([e.from,a,s]);this._active=!0,this._fn=e.fn||X9[e.type||typeof o],this._easing=cl[e.easing]||cl.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],a=i-this._start,o=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=fl([e.to,n,s,e.from]),this._from=fl([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,s=this._prop,a=this._from,o=this._loop,c=this._to;let d;if(this._active=a!==c&&(o||n<i),!this._active){this._target[s]=c,this._notify(!0);return}if(n<0){this._target[s]=a;return}d=n/i%2,d=o&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[s]=this._fn(a,c,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][n]()}}class cg{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!qe(e))return;const n=Object.keys(Wt.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const a=e[s];if(!qe(a))return;const o={};for(const c of n)o[c]=a[c];(Et(a.properties)&&a.properties||[s]).forEach(c=>{(c===s||!i.has(c))&&i.set(c,o)})})}_animateOptions(e,n){const i=n.options,s=ek(e,i);if(!s)return[];const a=this._createAnimations(s,i);return i.$shared&&Q9(e.options.$animations,i).then(()=>{e.options=i},()=>{}),a}_createAnimations(e,n){const i=this._properties,s=[],a=e.$animations||(e.$animations={}),o=Object.keys(n),c=Date.now();let d;for(d=o.length-1;d>=0;--d){const h=o[d];if(h.charAt(0)==="$")continue;if(h==="options"){s.push(...this._animateOptions(e,n));continue}const f=n[h];let m=a[h];const g=i.get(h);if(m)if(g&&m.active()){m.update(g,f,c);continue}else m.cancel();if(!g||!g.duration){e[h]=f;continue}a[h]=m=new J9(g,e,h,f),s.push(m)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return bs.add(this._chart,i),!0}}function Q9(t,e){const n=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const a=t[i[s]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function ek(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function dg(t,e){const n=t&&t.options||{},i=n.reverse,s=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:i?a:s,end:i?s:a}}function tk(t,e,n){if(n===!1)return!1;const i=dg(t,n),s=dg(e,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function nk(t){let e,n,i,s;return qe(t)?(e=t.top,n=t.right,i=t.bottom,s=t.left):e=n=i=s=t,{top:e,right:n,bottom:i,left:s,disabled:t===!1}}function ug(t,e){const n=[],i=t._getSortedDatasetMetas(e);let s,a;for(s=0,a=i.length;s<a;++s)n.push(i[s].index);return n}function hg(t,e,n,i={}){const s=t.keys,a=i.mode==="single";let o,c,d,h;if(e!==null){for(o=0,c=s.length;o<c;++o){if(d=+s[o],d===n){if(i.all)continue;break}h=t.values[d],Ht(h)&&(a||e===0||Ji(e)===Ji(h))&&(e+=h)}return e}}function ik(t,e){const{iScale:n,vScale:i}=e,s=n.axis==="x"?"x":"y",a=i.axis==="x"?"x":"y",o=Object.keys(t),c=new Array(o.length);let d,h,f;for(d=0,h=o.length;d<h;++d)f=o[d],c[d]={[s]:f,[a]:t[f]};return c}function fg(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function sk(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function rk(t){const{min:e,max:n,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function ak(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function pg(t,e,n,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const a=t[s.index];if(n&&a>0||!n&&a<0)return s.index}return null}function mg(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:c}=i,d=a.axis,h=o.axis,f=sk(a,o,i),m=e.length;let g;for(let _=0;_<m;++_){const b=e[_],{[d]:w,[h]:C}=b,S=b._stacks||(b._stacks={});g=S[h]=ak(s,f,w),g[c]=C,g._top=pg(g,o,!0,i.type),g._bottom=pg(g,o,!1,i.type);const E=g._visualValues||(g._visualValues={});E[c]=C}}function Q1(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function ok(t,e){return Xs(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function lk(t,e,n){return Xs(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function pl(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(!!i){e=e||t._parsed;for(const s of e){const a=s._stacks;if(!a||a[i]===void 0||a[i][n]===void 0)return;delete a[i][n],a[i]._visualValues!==void 0&&a[i]._visualValues[n]!==void 0&&delete a[i]._visualValues[n]}}}const eh=t=>t==="reset"||t==="none",gg=(t,e)=>e?t:Object.assign({},t),ck=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:ug(n,!0),values:null};class Ii{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=fg(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&pl(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(m,g,_,b)=>m==="x"?g:m==="r"?b:_,a=n.xAxisID=$e(i.xAxisID,Q1(e,"x")),o=n.yAxisID=$e(i.yAxisID,Q1(e,"y")),c=n.rAxisID=$e(i.rAxisID,Q1(e,"r")),d=n.indexAxis,h=n.iAxisID=s(d,a,o,c),f=n.vAxisID=s(d,o,a,c);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(h),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Vm(this._data,this),e._stacked&&pl(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(qe(n)){const s=this._cachedMeta;this._data=ik(n,s)}else if(i!==n){if(i){Vm(i,this);const s=this._cachedMeta;pl(s),s._parsed=[]}n&&Object.isExtensible(n)&&Gw(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const a=n._stacked;n._stacked=fg(n.vScale,n),n.stack!==i.stack&&(s=!0,pl(n),n.stack=i.stack),this._resyncElements(e),(s||a!==n._stacked)&&mg(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:s}=this,{iScale:a,_stacked:o}=i,c=a.axis;let d=e===0&&n===s.length?!0:i._sorted,h=e>0&&i._parsed[e-1],f,m,g;if(this._parsing===!1)i._parsed=s,i._sorted=!0,g=s;else{Et(s[e])?g=this.parseArrayData(i,s,e,n):qe(s[e])?g=this.parseObjectData(i,s,e,n):g=this.parsePrimitiveData(i,s,e,n);const _=()=>m[c]===null||h&&m[c]<h[c];for(f=0;f<n;++f)i._parsed[f+e]=m=g[f],d&&(_()&&(d=!1),h=m);i._sorted=d}o&&mg(this,g)}parsePrimitiveData(e,n,i,s){const{iScale:a,vScale:o}=e,c=a.axis,d=o.axis,h=a.getLabels(),f=a===o,m=new Array(s);let g,_,b;for(g=0,_=s;g<_;++g)b=g+i,m[g]={[c]:f||a.parse(h[b],b),[d]:o.parse(n[b],b)};return m}parseArrayData(e,n,i,s){const{xScale:a,yScale:o}=e,c=new Array(s);let d,h,f,m;for(d=0,h=s;d<h;++d)f=d+i,m=n[f],c[d]={x:a.parse(m[0],f),y:o.parse(m[1],f)};return c}parseObjectData(e,n,i,s){const{xScale:a,yScale:o}=e,{xAxisKey:c="x",yAxisKey:d="y"}=this._parsing,h=new Array(s);let f,m,g,_;for(f=0,m=s;f<m;++f)g=f+i,_=n[g],h[f]={x:a.parse(Gs(_,c),g),y:o.parse(Gs(_,d),g)};return h}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,i){const s=this.chart,a=this._cachedMeta,o=n[e.axis],c={keys:ug(s,!0),values:n._stacks[e.axis]._visualValues};return hg(c,o,a.index,{mode:i})}updateRangeFromParsed(e,n,i,s){const a=i[n.axis];let o=a===null?NaN:a;const c=s&&i._stacks[n.axis];s&&c&&(s.values=c,o=hg(s,a,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const i=this._cachedMeta,s=i._parsed,a=i._sorted&&e===i.iScale,o=s.length,c=this._getOtherScale(e),d=ck(n,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:m}=rk(c);let g,_;function b(){_=s[g];const w=_[c.axis];return!Ht(_[e.axis])||f>w||m<w}for(g=0;g<o&&!(!b()&&(this.updateRangeFromParsed(h,e,_,d),a));++g);if(a){for(g=o-1;g>=0;--g)if(!b()){this.updateRangeFromParsed(h,e,_,d);break}}return h}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let s,a,o;for(s=0,a=n.length;s<a;++s)o=n[s][e.axis],Ht(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,i=n.iScale,s=n.vScale,a=this.getParsed(e);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:s?""+s.getLabelForValue(a[s.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=nk($e(this.options.clip,tk(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,i=this._cachedMeta,s=i.data||[],a=n.chartArea,o=[],c=this._drawStart||0,d=this._drawCount||s.length-c,h=this.options.drawActiveElementsOnTop;let f;for(i.dataset&&i.dataset.draw(e,a,c,d),f=c;f<c+d;++f){const m=s[f];m.hidden||(m.active&&h?o.push(m):m.draw(e,a))}for(f=0;f<o.length;++f)o[f].draw(e,a)}getStyle(e,n){const i=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,n,i){const s=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];a=o.$context||(o.$context=lk(this.getContext(),e,o)),a.parsed=this.getParsed(e),a.raw=s.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=ok(this.chart.getContext(),this.index)),a.dataset=s,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=i,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",i){const s=n==="active",a=this._cachedDataOpts,o=e+"-"+n,c=a[o],d=this.enableOptionSharing&&al(i);if(c)return gg(c,d);const h=this.chart.config,f=h.datasetElementScopeKeys(this._type,e),m=s?[`${e}Hover`,"hover",e,""]:[e,""],g=h.getOptionScopes(this.getDataset(),f),_=Object.keys(Wt.elements[e]),b=()=>this.getContext(i,s,n),w=h.resolveNamedOptions(g,_,b,m);return w.$shared&&(w.$shared=d,a[o]=Object.freeze(gg(w,d))),w}_resolveAnimations(e,n,i){const s=this.chart,a=this._cachedDataOpts,o=`animation-${n}`,c=a[o];if(c)return c;let d;if(s.options.animation!==!1){const f=this.chart.config,m=f.datasetAnimationScopeKeys(this._type,n),g=f.getOptionScopes(this.getDataset(),m);d=f.createResolver(g,this.getContext(e,i,n))}const h=new cg(s,d&&d.animations);return d&&d._cacheable&&(a[o]=Object.freeze(h)),h}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||eh(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),s=this._sharedOptions,a=this.getSharedOptions(i),o=this.includeOptions(n,a)||a!==s;return this.updateSharedOptions(a,n,i),{sharedOptions:a,includeOptions:o}}updateElement(e,n,i,s){eh(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!eh(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,s){e.active=s;const a=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(e,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[c,d,h]of this._syncList)this[c](d,h);this._syncList=[];const s=i.length,a=n.length,o=Math.min(a,s);o&&this.parse(0,o),a>s?this._insertElements(s,a-s,e):a<s&&this._removeElements(a,s-a)}_insertElements(e,n,i=!0){const s=this._cachedMeta,a=s.data,o=e+n;let c;const d=h=>{for(h.length+=n,c=h.length-1;c>=o;c--)h[c]=h[c-n]};for(d(a),c=e;c<o;++c)a[c]=new this.dataElementType;this._parsing&&d(s._parsed),this.parse(e,n),i&&this.updateElements(a,e,n,"reset")}updateElements(e,n,i,s){}_removeElements(e,n){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(e,n);i._stacked&&pl(i,s)}i.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,i,s]=e;this[n](i,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ae(Ii,"defaults",{}),ae(Ii,"datasetElementType",null),ae(Ii,"dataElementType",null);function dk(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let s=0,a=n.length;s<a;s++)i=i.concat(n[s].controller.getAllParsedValues(t));t._cache.$bar=Bm(i.sort((s,a)=>s-a))}return t._cache.$bar}function uk(t){const e=t.iScale,n=dk(e,t.type);let i=e._length,s,a,o,c;const d=()=>{o===32767||o===-32768||(al(c)&&(i=Math.min(i,Math.abs(o-c)||i)),c=o)};for(s=0,a=n.length;s<a;++s)o=e.getPixelForValue(n[s]),d();for(c=void 0,s=0,a=e.ticks.length;s<a;++s)o=e.getPixelForTick(s),d();return i}function hk(t,e,n,i){const s=n.barThickness;let a,o;return Je(s)?(a=e.min*n.categoryPercentage,o=n.barPercentage):(a=s*i,o=1),{chunk:a/i,ratio:o,start:e.pixels[t]-a/2}}function fk(t,e,n,i){const s=e.pixels,a=s[t];let o=t>0?s[t-1]:null,c=t<s.length-1?s[t+1]:null;const d=n.categoryPercentage;o===null&&(o=a-(c===null?e.end-e.start:c-a)),c===null&&(c=a+a-o);const h=a-(a-Math.min(o,c))/2*d;return{chunk:Math.abs(c-o)/2*d/i,ratio:n.barPercentage,start:h}}function pk(t,e,n,i){const s=n.parse(t[0],i),a=n.parse(t[1],i),o=Math.min(s,a),c=Math.max(s,a);let d=o,h=c;Math.abs(o)>Math.abs(c)&&(d=c,h=o),e[n.axis]=h,e._custom={barStart:d,barEnd:h,start:s,end:a,min:o,max:c}}function _g(t,e,n,i){return Et(t)?pk(t,e,n,i):e[n.axis]=n.parse(t,i),e}function yg(t,e,n,i){const s=t.iScale,a=t.vScale,o=s.getLabels(),c=s===a,d=[];let h,f,m,g;for(h=n,f=n+i;h<f;++h)g=e[h],m={},m[s.axis]=c||s.parse(o[h],h),d.push(_g(g,m,a,h));return d}function th(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function mk(t,e,n){return t!==0?Ji(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function gk(t){let e,n,i,s,a;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(s="end",a="start"):(s="start",a="end"),{start:n,end:i,reverse:e,top:s,bottom:a}}function _k(t,e,n,i){let s=e.borderSkipped;const a={};if(!s){t.borderSkipped=a;return}if(s===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:c,reverse:d,top:h,bottom:f}=gk(t);s==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?s=h:(n._bottom||0)===i?s=f:(a[vg(f,o,c,d)]=!0,s=h)),a[vg(s,o,c,d)]=!0,t.borderSkipped=a}function vg(t,e,n,i){return i?(t=yk(t,e,n),t=bg(t,n,e)):t=bg(t,e,n),t}function yk(t,e,n){return t===e?n:t===n?e:t}function bg(t,e,n){return t==="start"?e:t==="end"?n:t}function vk(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class ml extends Ii{parsePrimitiveData(e,n,i,s){return yg(e,n,i,s)}parseArrayData(e,n,i,s){return yg(e,n,i,s)}parseObjectData(e,n,i,s){const{iScale:a,vScale:o}=e,{xAxisKey:c="x",yAxisKey:d="y"}=this._parsing,h=a.axis==="x"?c:d,f=o.axis==="x"?c:d,m=[];let g,_,b,w;for(g=i,_=i+s;g<_;++g)w=n[g],b={},b[a.axis]=a.parse(Gs(w,h),g),m.push(_g(Gs(w,f),b,o,g));return m}updateRangeFromParsed(e,n,i,s){super.updateRangeFromParsed(e,n,i,s);const a=i._custom;a&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:i,vScale:s}=n,a=this.getParsed(e),o=a._custom,c=th(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(a[s.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,i,s){const a=s==="reset",{index:o,_cachedMeta:{vScale:c}}=this,d=c.getBasePixel(),h=c.isHorizontal(),f=this._getRuler(),{sharedOptions:m,includeOptions:g}=this._getSharedOptions(n,s);for(let _=n;_<n+i;_++){const b=this.getParsed(_),w=a||Je(b[c.axis])?{base:d,head:d}:this._calculateBarValuePixels(_),C=this._calculateBarIndexPixels(_,f),S=(b._stacks||{})[c.axis],E={horizontal:h,base:w.base,enableBorderRadius:!S||th(b._custom)||o===S._top||o===S._bottom,x:h?w.head:C.center,y:h?C.center:w.head,height:h?C.size:Math.abs(w.size),width:h?Math.abs(w.size):C.size};g&&(E.options=m||this.resolveDataElementOptions(_,e[_].active?"active":s));const A=E.options||e[_].options;_k(E,A,S,o),vk(E,A,f.ratio),this.updateElement(e[_],_,E,s)}}_getStacks(e,n){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=i.options.stacked,o=[],c=d=>{const h=d.controller.getParsed(n),f=h&&h[d.vScale.axis];if(Je(f)||isNaN(f))return!0};for(const d of s)if(!(n!==void 0&&c(d))&&((a===!1||o.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&o.push(d.stack),d.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const s=this._getStacks(e,i),a=n!==void 0?s.indexOf(n):-1;return a===-1?s.length-1:a}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,s=[];let a,o;for(a=0,o=n.data.length;a<o;++a)s.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const c=e.barThickness;return{min:c||uk(n),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:i,index:s},options:{base:a,minBarLength:o}}=this,c=a||0,d=this.getParsed(e),h=d._custom,f=th(h);let m=d[n.axis],g=0,_=i?this.applyStack(n,d,i):m,b,w;_!==m&&(g=_-m,_=m),f&&(m=h.barStart,_=h.barEnd-h.barStart,m!==0&&Ji(m)!==Ji(h.barEnd)&&(g=0),g+=m);const C=!Je(a)&&!f?a:g;let S=n.getPixelForValue(C);if(this.chart.getDataVisibility(e)?b=n.getPixelForValue(g+_):b=S,w=b-S,Math.abs(w)<o){w=mk(w,n,c)*o,m===c&&(S-=w/2);const E=n.getPixelForDecimal(0),A=n.getPixelForDecimal(1),x=Math.min(E,A),T=Math.max(E,A);S=Math.max(Math.min(S,T),x),b=S+w,i&&!f&&(d._stacks[n.axis]._visualValues[s]=n.getValueForPixel(b)-n.getValueForPixel(S))}if(S===n.getPixelForValue(c)){const E=Ji(w)*n.getLineWidthForValue(c)/2;S+=E,w-=E}return{size:w,base:S,head:b,center:b+w/2}}_calculateBarIndexPixels(e,n){const i=n.scale,s=this.options,a=s.skipNull,o=$e(s.maxBarThickness,1/0);let c,d;if(n.grouped){const h=a?this._getStackCount(e):n.stackCount,f=s.barThickness==="flex"?fk(e,n,s,h):hk(e,n,s,h),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);c=f.start+f.chunk*m+f.chunk/2,d=Math.min(o,f.chunk*f.ratio)}else c=i.getPixelForValue(this.getParsed(e)[i.axis],e),d=Math.min(o,n.min*n.ratio);return{base:c-d/2,head:c+d/2,center:c,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,i=e.data,s=i.length;let a=0;for(;a<s;++a)this.getParsed(a)[n.axis]!==null&&!i[a].hidden&&i[a].draw(this._ctx)}}ae(ml,"id","bar"),ae(ml,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ae(ml,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class td extends Ii{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,i,s){const a=super.parsePrimitiveData(e,n,i,s);for(let o=0;o<a.length;o++)a[o]._custom=this.resolveDataElementOptions(o+i).radius;return a}parseArrayData(e,n,i,s){const a=super.parseArrayData(e,n,i,s);for(let o=0;o<a.length;o++){const c=n[i+o];a[o]._custom=$e(c[2],this.resolveDataElementOptions(o+i).radius)}return a}parseObjectData(e,n,i,s){const a=super.parseObjectData(e,n,i,s);for(let o=0;o<a.length;o++){const c=n[i+o];a[o]._custom=$e(c&&c.r&&+c.r,this.resolveDataElementOptions(o+i).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let i=e.length-1;i>=0;--i)n=Math.max(n,e[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=n,o=this.getParsed(e),c=s.getLabelForValue(o.x),d=a.getLabelForValue(o.y),h=o._custom;return{label:i[e]||"",value:"("+c+", "+d+(h?", "+h:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,i,s){const a=s==="reset",{iScale:o,vScale:c}=this._cachedMeta,{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,s),f=o.axis,m=c.axis;for(let g=n;g<n+i;g++){const _=e[g],b=!a&&this.getParsed(g),w={},C=w[f]=a?o.getPixelForDecimal(.5):o.getPixelForValue(b[f]),S=w[m]=a?c.getBasePixel():c.getPixelForValue(b[m]);w.skip=isNaN(C)||isNaN(S),h&&(w.options=d||this.resolveDataElementOptions(g,_.active?"active":s),a&&(w.options.radius=0)),this.updateElement(_,g,w,s)}}resolveDataElementOptions(e,n){const i=this.getParsed(e);let s=super.resolveDataElementOptions(e,n);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const a=s.radius;return n!=="active"&&(s.radius=0),s.radius+=$e(i&&i._custom,a),s}}ae(td,"id","bubble"),ae(td,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),ae(td,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function bk(t,e,n){let i=1,s=1,a=0,o=0;if(e<Bt){const c=t,d=c+e,h=Math.cos(c),f=Math.sin(c),m=Math.cos(d),g=Math.sin(d),_=(A,x,T)=>ll(A,c,d,!0)?1:Math.max(x,x*n,T,T*n),b=(A,x,T)=>ll(A,c,d,!0)?-1:Math.min(x,x*n,T,T*n),w=_(0,h,m),C=_(Ut,f,g),S=b(Vt,h,m),E=b(Vt+Ut,f,g);i=(w-S)/2,s=(C-E)/2,a=-(w+S)/2,o=-(C+E)/2}return{ratioX:i,ratioY:s,offsetX:a,offsetY:o}}class Js extends Ii{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let a=d=>+i[d];if(qe(i[e])){const{key:d="value"}=this._parsing;a=h=>+Gs(i[h],d)}let o,c;for(o=e,c=e+n;o<c;++o)s._parsed[o]=a(o)}}_getRotation(){return Ti(this.options.rotation-90)}_getCircumference(){return Ti(this.options.circumference)}_getRotationExtents(){let e=Bt,n=-Bt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,a=s._getRotation(),o=s._getCircumference();e=Math.min(e,a),n=Math.max(n,a+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:i}=n,s=this._cachedMeta,a=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,c=Math.max((Math.min(i.width,i.height)-o)/2,0),d=Math.min(Aw(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:f,rotation:m}=this._getRotationExtents(),{ratioX:g,ratioY:_,offsetX:b,offsetY:w}=bk(m,f,d),C=(i.width-o)/g,S=(i.height-o)/_,E=Math.max(Math.min(C,S)/2,0),A=bm(this.options.radius,E),x=Math.max(A*d,0),T=(A-x)/this._getVisibleDatasetWeightTotal();this.offsetX=b*A,this.offsetY=w*A,s.total=this.calculateTotal(),this.outerRadius=A-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*h,0),this.updateElements(a,0,a.length,e)}_circumference(e,n){const i=this.options,s=this._cachedMeta,a=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*a/Bt)}updateElements(e,n,i,s){const a=s==="reset",o=this.chart,c=o.chartArea,h=o.options.animation,f=(c.left+c.right)/2,m=(c.top+c.bottom)/2,g=a&&h.animateScale,_=g?0:this.innerRadius,b=g?0:this.outerRadius,{sharedOptions:w,includeOptions:C}=this._getSharedOptions(n,s);let S=this._getRotation(),E;for(E=0;E<n;++E)S+=this._circumference(E,a);for(E=n;E<n+i;++E){const A=this._circumference(E,a),x=e[E],T={x:f+this.offsetX,y:m+this.offsetY,startAngle:S,endAngle:S+A,circumference:A,outerRadius:b,innerRadius:_};C&&(T.options=w||this.resolveDataElementOptions(E,x.active?"active":s)),S+=A,this.updateElement(x,E,T,s)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let i=0,s;for(s=0;s<n.length;s++){const a=e._parsed[s];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?Bt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=dl(n._parsed[e],i.options.locale);return{label:s[e]||"",value:a}}getMaxBorderWidth(e){let n=0;const i=this.chart;let s,a,o,c,d;if(!e){for(s=0,a=i.data.datasets.length;s<a;++s)if(i.isDatasetVisible(s)){o=i.getDatasetMeta(s),e=o.data,c=o.controller;break}}if(!e)return 0;for(s=0,a=e.length;s<a;++s)d=c.resolveDataElementOptions(s),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let i=0,s=e.length;i<s;++i){const a=this.resolveDataElementOptions(i);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(e){return Math.max($e(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ae(Js,"id","doughnut"),ae(Js,"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"}),ae(Js,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),ae(Js,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((a,o)=>{const d=e.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:s,lineWidth:d.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class gl extends Ii{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:a}=n,o=this.chart._animationsDisabled;let{start:c,count:d}=Am(n,s,o);this._drawStart=c,this._drawCount=d,$m(n)&&(c=0,d=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=s;const h=this.resolveDatasetElementOptions(e);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:h},e),this.updateElements(s,c,d,e)}updateElements(e,n,i,s){const a=s==="reset",{iScale:o,vScale:c,_stacked:d,_dataset:h}=this._cachedMeta,{sharedOptions:f,includeOptions:m}=this._getSharedOptions(n,s),g=o.axis,_=c.axis,{spanGaps:b,segment:w}=this.options,C=Oa(b)?b:Number.POSITIVE_INFINITY,S=this.chart._animationsDisabled||a||s==="none",E=n+i,A=e.length;let x=n>0&&this.getParsed(n-1);for(let T=0;T<A;++T){const N=e[T],L=S?N:{};if(T<n||T>=E){L.skip=!0;continue}const F=this.getParsed(T),q=Je(F[_]),ee=L[g]=o.getPixelForValue(F[g],T),ie=L[_]=a||q?c.getBasePixel():c.getPixelForValue(d?this.applyStack(c,F,d):F[_],T);L.skip=isNaN(ee)||isNaN(ie)||q,L.stop=T>0&&Math.abs(F[g]-x[g])>C,w&&(L.parsed=F,L.raw=h.data[T]),m&&(L.options=f||this.resolveDataElementOptions(T,N.active?"active":s)),S||this.updateElement(N,T,L,s),x=F}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const a=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,a,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}ae(gl,"id","line"),ae(gl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ae(gl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ba extends Ii{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=dl(n._parsed[e].r,i.options.locale);return{label:s[e]||"",value:a}}parseObjectData(e,n,i,s){return Zm.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const a=this.getParsed(s).r;!isNaN(a)&&this.chart.getDataVisibility(s)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,i=e.options,s=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),c=(a-o)/e.getVisibleDatasetCount();this.outerRadius=a-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(e,n,i,s){const a=s==="reset",o=this.chart,d=o.options.animation,h=this._cachedMeta.rScale,f=h.xCenter,m=h.yCenter,g=h.getIndexAngle(0)-.5*Vt;let _=g,b;const w=360/this.countVisibleElements();for(b=0;b<n;++b)_+=this._computeAngle(b,s,w);for(b=n;b<n+i;b++){const C=e[b];let S=_,E=_+this._computeAngle(b,s,w),A=o.getDataVisibility(b)?h.getDistanceFromCenterForValue(this.getParsed(b).r):0;_=E,a&&(d.animateScale&&(A=0),d.animateRotate&&(S=E=g));const x={x:f,y:m,innerRadius:0,outerRadius:A,startAngle:S,endAngle:E,options:this.resolveDataElementOptions(b,C.active?"active":s)};this.updateElement(C,b,x,s)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(e,n,i){return this.chart.getDataVisibility(e)?Ti(this.resolveDataElementOptions(e,n).angle||i):0}}ae(Ba,"id","polarArea"),ae(Ba,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ae(Ba,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((a,o)=>{const d=e.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:s,lineWidth:d.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class nd extends Js{}ae(nd,"id","pie"),ae(nd,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class id extends Ii{getLabelAndValue(e){const n=this._cachedMeta.vScale,i=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(e,n,i,s){return Zm.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta,i=n.dataset,s=n.data||[],a=n.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const c={_loop:!0,_fullLoop:a.length===s.length,options:o};this.updateElement(i,void 0,c,e)}this.updateElements(s,0,s.length,e)}updateElements(e,n,i,s){const a=this._cachedMeta.rScale,o=s==="reset";for(let c=n;c<n+i;c++){const d=e[c],h=this.resolveDataElementOptions(c,d.active?"active":s),f=a.getPointPositionForValue(c,this.getParsed(c).r),m=o?a.xCenter:f.x,g=o?a.yCenter:f.y,_={x:m,y:g,angle:f.angle,skip:isNaN(m)||isNaN(g),options:h};this.updateElement(d,c,_,s)}}}ae(id,"id","radar"),ae(id,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ae(id,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class sd extends Ii{getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=n,o=this.getParsed(e),c=s.getLabelForValue(o.x),d=a.getLabelForValue(o.y);return{label:i[e]||"",value:"("+c+", "+d+")"}}update(e){const n=this._cachedMeta,{data:i=[]}=n,s=this.chart._animationsDisabled;let{start:a,count:o}=Am(n,i,s);if(this._drawStart=a,this._drawCount=o,$m(n)&&(a=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:d}=n;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!d._decimated,c.points=i;const h=this.resolveDatasetElementOptions(e);h.segment=this.options.segment,this.updateElement(c,void 0,{animated:!s,options:h},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(i,a,o,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,i,s){const a=s==="reset",{iScale:o,vScale:c,_stacked:d,_dataset:h}=this._cachedMeta,f=this.resolveDataElementOptions(n,s),m=this.getSharedOptions(f),g=this.includeOptions(s,m),_=o.axis,b=c.axis,{spanGaps:w,segment:C}=this.options,S=Oa(w)?w:Number.POSITIVE_INFINITY,E=this.chart._animationsDisabled||a||s==="none";let A=n>0&&this.getParsed(n-1);for(let x=n;x<n+i;++x){const T=e[x],N=this.getParsed(x),L=E?T:{},F=Je(N[b]),q=L[_]=o.getPixelForValue(N[_],x),ee=L[b]=a||F?c.getBasePixel():c.getPixelForValue(d?this.applyStack(c,N,d):N[b],x);L.skip=isNaN(q)||isNaN(ee)||F,L.stop=x>0&&Math.abs(N[_]-A[_])>S,C&&(L.parsed=N,L.raw=h.data[x]),g&&(L.options=m||this.resolveDataElementOptions(x,T.active?"active":s)),E||this.updateElement(T,x,L,s),A=N}this.updateSharedOptions(m,s,f)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let c=0;for(let d=n.length-1;d>=0;--d)c=Math.max(c,n[d].size(this.resolveDataElementOptions(d))/2);return c>0&&c}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,a,o)/2}}ae(sd,"id","scatter"),ae(sd,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),ae(sd,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var wk=Object.freeze({__proto__:null,BarController:ml,BubbleController:td,DoughnutController:Js,LineController:gl,PieController:nd,PolarAreaController:Ba,RadarController:id,ScatterController:sd});function Pr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class nh{constructor(e){ae(this,"options");this.options=e||{}}static override(e){Object.assign(nh.prototype,e)}init(){}formats(){return Pr()}parse(){return Pr()}format(){return Pr()}add(){return Pr()}diff(){return Pr()}startOf(){return Pr()}endOf(){return Pr()}}var wg={_date:nh};function kk(t,e,n,i){const{controller:s,data:a,_sorted:o}=t,c=s._cachedMeta.iScale;if(c&&e===c.axis&&e!=="r"&&o&&a.length){const d=c._reversePixels?Uw:ys;if(i){if(s._sharedOptions){const h=a[0],f=typeof h.getRange=="function"&&h.getRange(e);if(f){const m=d(a,e,n-f),g=d(a,e,n+f);return{lo:m.lo,hi:g.hi}}}}else return d(a,e,n)}return{lo:0,hi:a.length-1}}function _l(t,e,n,i,s){const a=t.getSortedVisibleDatasetMetas(),o=n[e];for(let c=0,d=a.length;c<d;++c){const{index:h,data:f}=a[c],{lo:m,hi:g}=kk(a[c],e,o,s);for(let _=m;_<=g;++_){const b=f[_];b.skip||i(b,h,_)}}}function Ck(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(i,s){const a=e?Math.abs(i.x-s.x):0,o=n?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function ih(t,e,n,i,s){const a=[];return!s&&!t.isPointInArea(e)||_l(t,n,e,function(c,d,h){!s&&!vs(c,t.chartArea,0)||c.inRange(e.x,e.y,i)&&a.push({element:c,datasetIndex:d,index:h})},!0),a}function xk(t,e,n,i){let s=[];function a(o,c,d){const{startAngle:h,endAngle:f}=o.getProps(["startAngle","endAngle"],i),{angle:m}=Dm(o,{x:e.x,y:e.y});ll(m,h,f)&&s.push({element:o,datasetIndex:c,index:d})}return _l(t,n,e,a),s}function Sk(t,e,n,i,s,a){let o=[];const c=Ck(n);let d=Number.POSITIVE_INFINITY;function h(f,m,g){const _=f.inRange(e.x,e.y,s);if(i&&!_)return;const b=f.getCenterPoint(s);if(!(!!a||t.isPointInArea(b))&&!_)return;const C=c(e,b);C<d?(o=[{element:f,datasetIndex:m,index:g}],d=C):C===d&&o.push({element:f,datasetIndex:m,index:g})}return _l(t,n,e,h),o}function sh(t,e,n,i,s,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!i?xk(t,e,n,s):Sk(t,e,n,i,s,a)}function kg(t,e,n,i,s){const a=[],o=n==="x"?"inXRange":"inYRange";let c=!1;return _l(t,n,e,(d,h,f)=>{d[o](e[n],s)&&(a.push({element:d,datasetIndex:h,index:f}),c=c||d.inRange(e.x,e.y,s))}),i&&!c?[]:a}var Mk={evaluateInteractionItems:_l,modes:{index(t,e,n,i){const s=Nr(e,t),a=n.axis||"x",o=n.includeInvisible||!1,c=n.intersect?ih(t,s,a,i,o):sh(t,s,a,!1,i,o),d=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(h=>{const f=c[0].index,m=h.data[f];m&&!m.skip&&d.push({element:m,datasetIndex:h.index,index:f})}),d):[]},dataset(t,e,n,i){const s=Nr(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;let c=n.intersect?ih(t,s,a,i,o):sh(t,s,a,!1,i,o);if(c.length>0){const d=c[0].datasetIndex,h=t.getDatasetMeta(d).data;c=[];for(let f=0;f<h.length;++f)c.push({element:h[f],datasetIndex:d,index:f})}return c},point(t,e,n,i){const s=Nr(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return ih(t,s,a,i,o)},nearest(t,e,n,i){const s=Nr(e,t),a=n.axis||"xy",o=n.includeInvisible||!1;return sh(t,s,a,n.intersect,i,o)},x(t,e,n,i){const s=Nr(e,t);return kg(t,s,"x",n.intersect,i)},y(t,e,n,i){const s=Nr(e,t);return kg(t,s,"y",n.intersect,i)}}};const Cg=["left","top","right","bottom"];function yl(t,e){return t.filter(n=>n.pos===e)}function xg(t,e){return t.filter(n=>Cg.indexOf(n.pos)===-1&&n.box.axis===e)}function vl(t,e){return t.sort((n,i)=>{const s=e?i:n,a=e?n:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function Ok(t){const e=[];let n,i,s,a,o,c;for(n=0,i=(t||[]).length;n<i;++n)s=t[n],{position:a,options:{stack:o,stackWeight:c=1}}=s,e.push({index:n,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&a+o,stackWeight:c});return e}function Dk(t){const e={};for(const n of t){const{stack:i,pos:s,stackWeight:a}=n;if(!i||!Cg.includes(s))continue;const o=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return e}function Ek(t,e){const n=Dk(t),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let a,o,c;for(a=0,o=t.length;a<o;++a){c=t[a];const{fullSize:d}=c.box,h=n[c.stack],f=h&&c.stackWeight/h.weight;c.horizontal?(c.width=f?f*i:d&&e.availableWidth,c.height=s):(c.width=i,c.height=f?f*s:d&&e.availableHeight)}return n}function Vk(t){const e=Ok(t),n=vl(e.filter(h=>h.box.fullSize),!0),i=vl(yl(e,"left"),!0),s=vl(yl(e,"right")),a=vl(yl(e,"top"),!0),o=vl(yl(e,"bottom")),c=xg(e,"x"),d=xg(e,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:s.concat(d).concat(o).concat(c),chartArea:yl(e,"chartArea"),vertical:i.concat(s).concat(d),horizontal:a.concat(o).concat(c)}}function Sg(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Mg(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Bk(t,e,n,i){const{pos:s,box:a}=n,o=t.maxPadding;if(!qe(s)){n.size&&(t[s]-=n.size);const m=i[n.stack]||{size:0,count:1};m.size=Math.max(m.size,n.horizontal?a.height:a.width),n.size=m.size/m.count,t[s]+=n.size}a.getPadding&&Mg(o,a.getPadding());const c=Math.max(0,e.outerWidth-Sg(o,t,"left","right")),d=Math.max(0,e.outerHeight-Sg(o,t,"top","bottom")),h=c!==t.w,f=d!==t.h;return t.w=c,t.h=d,n.horizontal?{same:h,other:f}:{same:f,other:h}}function Tk(t){const e=t.maxPadding;function n(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Ik(t,e){const n=e.maxPadding;function i(s){const a={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{a[o]=Math.max(e[o],n[o])}),a}return i(t?["left","right"]:["top","bottom"])}function bl(t,e,n,i){const s=[];let a,o,c,d,h,f;for(a=0,o=t.length,h=0;a<o;++a){c=t[a],d=c.box,d.update(c.width||e.w,c.height||e.h,Ik(c.horizontal,e));const{same:m,other:g}=Bk(e,n,c,i);h|=m&&s.length,f=f||g,d.fullSize||s.push(c)}return h&&bl(s,e,n,i)||f}function rd(t,e,n,i,s){t.top=n,t.left=e,t.right=e+i,t.bottom=n+s,t.width=i,t.height=s}function Og(t,e,n,i){const s=n.padding;let{x:a,y:o}=e;for(const c of t){const d=c.box,h=i[c.stack]||{count:1,placed:0,weight:1},f=c.stackWeight/h.weight||1;if(c.horizontal){const m=e.w*f,g=h.size||d.height;al(h.start)&&(o=h.start),d.fullSize?rd(d,s.left,o,n.outerWidth-s.right-s.left,g):rd(d,e.left+h.placed,o,m,g),h.start=o,h.placed+=m,o=d.bottom}else{const m=e.h*f,g=h.size||d.width;al(h.start)&&(a=h.start),d.fullSize?rd(d,a,s.top,g,n.outerHeight-s.bottom-s.top):rd(d,a,e.top+h.placed,g,m),h.start=a,h.placed+=m,a=d.right}}e.x=a,e.y=o}var bn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const s=vn(t.options.layout.padding),a=Math.max(e-s.width,0),o=Math.max(n-s.height,0),c=Vk(t.boxes),d=c.vertical,h=c.horizontal;ut(t.boxes,w=>{typeof w.beforeLayout=="function"&&w.beforeLayout()});const f=d.reduce((w,C)=>C.box.options&&C.box.options.display===!1?w:w+1,0)||1,m=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/f,hBoxMaxHeight:o/2}),g=Object.assign({},s);Mg(g,vn(i));const _=Object.assign({maxPadding:g,w:a,h:o,x:s.left,y:s.top},s),b=Ek(d.concat(h),m);bl(c.fullSize,_,m,b),bl(d,_,m,b),bl(h,_,m,b)&&bl(d,_,m,b),Tk(_),Og(c.leftAndTop,_,m,b),_.x+=_.w,_.y+=_.h,Og(c.rightAndBottom,_,m,b),t.chartArea={left:_.left,top:_.top,right:_.left+_.w,bottom:_.top+_.h,height:_.h,width:_.w},ut(c.chartArea,w=>{const C=w.box;Object.assign(C,t.chartArea),C.update(_.w,_.h,{left:0,top:0,right:0,bottom:0})})}};class Dg{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,s){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(e){return!0}updateConfig(e){}}class Ak extends Dg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ad="$chartjs",$k={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Eg=t=>t===null||t==="";function Nk(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[ad]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Eg(s)){const a=Qm(t,"width");a!==void 0&&(t.width=a)}if(Eg(i))if(t.style.height==="")t.height=t.width/(e||2);else{const a=Qm(t,"height");a!==void 0&&(t.height=a)}return t}const Vg=L9?{passive:!0}:!1;function zk(t,e,n){t&&t.addEventListener(e,n,Vg)}function Pk(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Vg)}function Lk(t,e){const n=$k[t.type]||t.type,{x:i,y:s}=Nr(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function od(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Fk(t,e,n){const i=t.canvas,s=new MutationObserver(a=>{let o=!1;for(const c of a)o=o||od(c.addedNodes,i),o=o&&!od(c.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Rk(t,e,n){const i=t.canvas,s=new MutationObserver(a=>{let o=!1;for(const c of a)o=o||od(c.removedNodes,i),o=o&&!od(c.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const wl=new Map;let Bg=0;function Tg(){const t=window.devicePixelRatio;t!==Bg&&(Bg=t,wl.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Hk(t,e){wl.size||window.addEventListener("resize",Tg),wl.set(t,e)}function Wk(t){wl.delete(t),wl.size||window.removeEventListener("resize",Tg)}function Yk(t,e,n){const i=t.canvas,s=i&&J1(i);if(!s)return;const a=Im((c,d)=>{const h=s.clientWidth;n(c,d),h<s.clientWidth&&n()},window),o=new ResizeObserver(c=>{const d=c[0],h=d.contentRect.width,f=d.contentRect.height;h===0&&f===0||a(h,f)});return o.observe(s),Hk(t,a),o}function rh(t,e,n){n&&n.disconnect(),e==="resize"&&Wk(t)}function jk(t,e,n){const i=t.canvas,s=Im(a=>{t.ctx!==null&&n(Lk(a,t))},t);return zk(i,e,s),s}class Uk extends Dg{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(Nk(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[ad])return!1;const i=n[ad].initial;["height","width"].forEach(a=>{const o=i[a];Je(o)?n.removeAttribute(a):n.setAttribute(a,o)});const s=i.style||{};return Object.keys(s).forEach(a=>{n.style[a]=s[a]}),n.width=n.width,delete n[ad],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),o={attach:Fk,detach:Rk,resize:Yk}[n]||jk;s[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:rh,detach:rh,resize:rh}[n]||Pk)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return P9(e,n,i,s)}isAttached(e){const n=e&&J1(e);return!!(n&&n.isConnected)}}function qk(t){return!X1()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Ak:Uk}class Ai{constructor(){ae(this,"x");ae(this,"y");ae(this,"active",!1);ae(this,"options");ae(this,"$animations")}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Oa(this.x)&&Oa(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const s={};return e.forEach(a=>{s[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),s}}ae(Ai,"defaults",{}),ae(Ai,"defaultRoutes");function Gk(t,e){const n=t.options.ticks,i=Kk(t),s=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?Xk(e):[],o=a.length,c=a[0],d=a[o-1],h=[];if(o>s)return Jk(e,h,a,o/s),h;const f=Zk(a,e,s);if(o>0){let m,g;const _=o>1?Math.round((d-c)/(o-1)):null;for(ld(e,h,f,Je(_)?0:c-_,c),m=0,g=o-1;m<g;m++)ld(e,h,f,a[m],a[m+1]);return ld(e,h,f,d,Je(_)?e.length:d+_),h}return ld(e,h,f),h}function Kk(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),s=t._maxLength/n;return Math.floor(Math.min(i,s))}function Zk(t,e,n){const i=Qk(t),s=e.length/n;if(!i)return Math.max(s,1);const a=Hw(i);for(let o=0,c=a.length-1;o<c;o++){const d=a[o];if(d>s)return d}return Math.max(s,1)}function Xk(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function Jk(t,e,n,i){let s=0,a=n[0],o;for(i=Math.ceil(i),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=n[s*i])}function ld(t,e,n,i,s){const a=$e(i,0),o=Math.min($e(s,t.length),t.length);let c=0,d,h,f;for(n=Math.ceil(n),s&&(d=s-i,n=d/Math.floor(d/n)),f=a;f<0;)c++,f=Math.round(a+c*n);for(h=Math.max(a,0);h<o;h++)h===f&&(e.push(t[h]),c++,f=Math.round(a+c*n))}function Qk(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}const eC=t=>t==="left"?"right":t==="right"?"left":t,Ig=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Ag=(t,e)=>Math.min(e||t,t);function $g(t,e){const n=[],i=t.length/e,s=t.length;let a=0;for(;a<s;a+=i)n.push(t[Math.floor(a)]);return n}function tC(t,e,n){const i=t.ticks.length,s=Math.min(e,i-1),a=t._startPixel,o=t._endPixel,c=1e-6;let d=t.getPixelForTick(s),h;if(!(n&&(i===1?h=Math.max(d-a,o-d):e===0?h=(t.getPixelForTick(1)-d)/2:h=(d-t.getPixelForTick(s-1))/2,d+=s<e?h:-h,d<a-c||d>o+c)))return d}function nC(t,e){ut(t,n=>{const i=n.gc,s=i.length/2;let a;if(s>e){for(a=0;a<s;++a)delete n.data[i[a]];i.splice(0,s)}})}function kl(t){return t.drawTicks?t.tickLength:0}function Ng(t,e){if(!t.display)return 0;const n=Qt(t.font,e),i=vn(t.padding);return(Et(t.text)?t.text.length:1)*n.lineHeight+i.height}function iC(t,e){return Xs(t,{scale:e,type:"scale"})}function sC(t,e,n){return Xs(t,{tick:n,index:e,type:"tick"})}function rC(t,e,n){let i=R1(t);return(n&&e!=="right"||!n&&e==="right")&&(i=eC(i)),i}function aC(t,e,n,i){const{top:s,left:a,bottom:o,right:c,chart:d}=t,{chartArea:h,scales:f}=d;let m=0,g,_,b;const w=o-s,C=c-a;if(t.isHorizontal()){if(_=yn(i,a,c),qe(n)){const S=Object.keys(n)[0],E=n[S];b=f[S].getPixelForValue(E)+w-e}else n==="center"?b=(h.bottom+h.top)/2+w-e:b=Ig(t,n,e);g=c-a}else{if(qe(n)){const S=Object.keys(n)[0],E=n[S];_=f[S].getPixelForValue(E)-C+e}else n==="center"?_=(h.left+h.right)/2-C+e:_=Ig(t,n,e);b=yn(i,o,s),m=n==="left"?-Ut:Ut}return{titleX:_,titleY:b,maxWidth:g,rotation:m}}class Lr extends Ai{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:i,_suggestedMax:s}=this;return e=ei(e,Number.POSITIVE_INFINITY),n=ei(n,Number.NEGATIVE_INFINITY),i=ei(i,Number.POSITIVE_INFINITY),s=ei(s,Number.NEGATIVE_INFINITY),{min:ei(e,i),max:ei(n,s),minDefined:Ht(e),maxDefined:Ht(n)}}getMinMax(e){let{min:n,max:i,minDefined:s,maxDefined:a}=this.getUserBounds(),o;if(s&&a)return{min:n,max:i};const c=this.getMatchingVisibleMetas();for(let d=0,h=c.length;d<h;++d)o=c[d].controller.getMinMax(this,e),s||(n=Math.min(n,o.min)),a||(i=Math.max(i,o.max));return n=a&&n>i?i:n,i=s&&n>i?n:i,{min:ei(n,ei(i,n)),max:ei(i,ei(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Mt(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:s,grace:a,ticks:o}=this.options,c=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=g9(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=c<this.ticks.length;this._convertTicksToLabels(d?$g(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Gk(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,e=!e),this._startPixel=n,this._endPixel=i,this._reversePixels=e,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Mt(this.options.afterUpdate,[this])}beforeSetDimensions(){Mt(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(){Mt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Mt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Mt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let i,s,a;for(i=0,s=e.length;i<s;i++)a=e[i],a.label=Mt(n.callback,[a.value,i,e],this)}afterTickToLabelConversion(){Mt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Mt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,i=Ag(this.ticks.length,e.ticks.maxTicksLimit),s=n.minRotation||0,a=n.maxRotation;let o=s,c,d,h;if(!this._isVisible()||!n.display||s>=a||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),m=f.widest.width,g=f.highest.height,_=dn(this.chart.width-m,0,this.maxWidth);c=e.offset?this.maxWidth/i:_/(i-1),m+6>c&&(c=_/(i-(e.offset?.5:1)),d=this.maxHeight-kl(e.grid)-n.padding-Ng(e.title,this.chart.options.font),h=Math.sqrt(m*m+g*g),o=P1(Math.min(Math.asin(dn((f.highest.height+6)/c,-1,1)),Math.asin(dn(d/h,-1,1))-Math.asin(dn(g/h,-1,1)))),o=Math.max(s,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){Mt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Mt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:a}}=this,o=this._isVisible(),c=this.isHorizontal();if(o){const d=Ng(s,n.options.font);if(c?(e.width=this.maxWidth,e.height=kl(a)+d):(e.height=this.maxHeight,e.width=kl(a)+d),i.display&&this.ticks.length){const{first:h,last:f,widest:m,highest:g}=this._getLabelSizes(),_=i.padding*2,b=Ti(this.labelRotation),w=Math.cos(b),C=Math.sin(b);if(c){const S=i.mirror?0:C*m.width+w*g.height;e.height=Math.min(this.maxHeight,e.height+S+_)}else{const S=i.mirror?0:w*m.width+C*g.height;e.width=Math.min(this.maxWidth,e.width+S+_)}this._calculatePadding(h,f,C,w)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,s){const{ticks:{align:a,padding:o},position:c}=this.options,d=this.labelRotation!==0,h=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,_=0;d?h?(g=s*e.width,_=i*n.height):(g=i*e.height,_=s*n.width):a==="start"?_=n.width:a==="end"?g=e.width:a!=="inner"&&(g=e.width/2,_=n.width/2),this.paddingLeft=Math.max((g-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((_-m+o)*this.width/(this.width-m),0)}else{let f=n.height/2,m=e.height/2;a==="start"?(f=0,m=e.height):a==="end"&&(f=n.height,m=0),this.paddingTop=f+o,this.paddingBottom=m+o}}_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(){Mt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n<i;n++)Je(e[n].label)&&(e.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=$g(i,n)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,i){const{ctx:s,_longestTextCache:a}=this,o=[],c=[],d=Math.floor(n/Ag(n,i));let h=0,f=0,m,g,_,b,w,C,S,E,A,x,T;for(m=0;m<n;m+=d){if(b=e[m].label,w=this._resolveTickFontOptions(m),s.font=C=w.string,S=a[C]=a[C]||{data:{},gc:[]},E=w.lineHeight,A=x=0,!Je(b)&&!Et(b))A=Gc(s,S.data,S.gc,A,b),x=E;else if(Et(b))for(g=0,_=b.length;g<_;++g)T=b[g],!Je(T)&&!Et(T)&&(A=Gc(s,S.data,S.gc,A,T),x+=E);o.push(A),c.push(x),h=Math.max(A,h),f=Math.max(x,f)}nC(a,n);const N=o.indexOf(h),L=c.indexOf(f),F=q=>({width:o[q]||0,height:c[q]||0});return{first:F(0),last:F(n-1),widest:F(N),highest:F(L),widths:o,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return jw(this._alignToPixels?Tr(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const i=n[e];return i.$context||(i.$context=sC(this.getContext(),e,i))}return this.$context||(this.$context=iC(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Ti(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=e.autoSkipPadding||0,c=a?a.widest.width+o:0,d=a?a.highest.height+o:0;return this.isHorizontal()?d*i>c*s?c/i:d/s:d*s<c*i?d/i:c/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,i=this.chart,s=this.options,{grid:a,position:o,border:c}=s,d=a.offset,h=this.isHorizontal(),m=this.ticks.length+(d?1:0),g=kl(a),_=[],b=c.setContext(this.getContext()),w=b.display?b.width:0,C=w/2,S=function(he){return Tr(i,he,w)};let E,A,x,T,N,L,F,q,ee,ie,K,se;if(o==="top")E=S(this.bottom),L=this.bottom-g,q=E-C,ie=S(e.top)+C,se=e.bottom;else if(o==="bottom")E=S(this.top),ie=e.top,se=S(e.bottom)-C,L=E+C,q=this.top+g;else if(o==="left")E=S(this.right),N=this.right-g,F=E-C,ee=S(e.left)+C,K=e.right;else if(o==="right")E=S(this.left),ee=e.left,K=S(e.right)-C,N=E+C,F=this.left+g;else if(n==="x"){if(o==="center")E=S((e.top+e.bottom)/2+.5);else if(qe(o)){const he=Object.keys(o)[0],fe=o[he];E=S(this.chart.scales[he].getPixelForValue(fe))}ie=e.top,se=e.bottom,L=E+C,q=L+g}else if(n==="y"){if(o==="center")E=S((e.left+e.right)/2);else if(qe(o)){const he=Object.keys(o)[0],fe=o[he];E=S(this.chart.scales[he].getPixelForValue(fe))}N=E-C,F=N-g,ee=e.left,K=e.right}const me=$e(s.ticks.maxTicksLimit,m),J=Math.max(1,Math.ceil(m/me));for(A=0;A<m;A+=J){const he=this.getContext(A),fe=a.setContext(he),ye=c.setContext(he),we=fe.lineWidth,R=fe.color,pe=ye.dash||[],oe=ye.dashOffset,Ee=fe.tickWidth,Me=fe.tickColor,ge=fe.tickBorderDash||[],Ne=fe.tickBorderDashOffset;x=tC(this,A,d),x!==void 0&&(T=Tr(i,x,we),h?N=F=ee=K=T:L=q=ie=se=T,_.push({tx1:N,ty1:L,tx2:F,ty2:q,x1:ee,y1:ie,x2:K,y2:se,width:we,color:R,borderDash:pe,borderDashOffset:oe,tickWidth:Ee,tickColor:Me,tickBorderDash:ge,tickBorderDashOffset:Ne}))}return this._ticksLength=m,this._borderValue=E,_}_computeLabelItems(e){const n=this.axis,i=this.options,{position:s,ticks:a}=i,o=this.isHorizontal(),c=this.ticks,{align:d,crossAlign:h,padding:f,mirror:m}=a,g=kl(i.grid),_=g+f,b=m?-f:_,w=-Ti(this.labelRotation),C=[];let S,E,A,x,T,N,L,F,q,ee,ie,K,se="middle";if(s==="top")N=this.bottom-b,L=this._getXAxisLabelAlignment();else if(s==="bottom")N=this.top+b,L=this._getXAxisLabelAlignment();else if(s==="left"){const J=this._getYAxisLabelAlignment(g);L=J.textAlign,T=J.x}else if(s==="right"){const J=this._getYAxisLabelAlignment(g);L=J.textAlign,T=J.x}else if(n==="x"){if(s==="center")N=(e.top+e.bottom)/2+_;else if(qe(s)){const J=Object.keys(s)[0],he=s[J];N=this.chart.scales[J].getPixelForValue(he)+_}L=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")T=(e.left+e.right)/2-_;else if(qe(s)){const J=Object.keys(s)[0],he=s[J];T=this.chart.scales[J].getPixelForValue(he)}L=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(d==="start"?se="top":d==="end"&&(se="bottom"));const me=this._getLabelSizes();for(S=0,E=c.length;S<E;++S){A=c[S],x=A.label;const J=a.setContext(this.getContext(S));F=this.getPixelForTick(S)+a.labelOffset,q=this._resolveTickFontOptions(S),ee=q.lineHeight,ie=Et(x)?x.length:1;const he=ie/2,fe=J.color,ye=J.textStrokeColor,we=J.textStrokeWidth;let R=L;o?(T=F,L==="inner"&&(S===E-1?R=this.options.reverse?"left":"right":S===0?R=this.options.reverse?"right":"left":R="center"),s==="top"?h==="near"||w!==0?K=-ie*ee+ee/2:h==="center"?K=-me.highest.height/2-he*ee+ee:K=-me.highest.height+ee/2:h==="near"||w!==0?K=ee/2:h==="center"?K=me.highest.height/2-he*ee:K=me.highest.height-ie*ee,m&&(K*=-1),w!==0&&!J.showLabelBackdrop&&(T+=ee/2*Math.sin(w))):(N=F,K=(1-ie)*ee/2);let pe;if(J.showLabelBackdrop){const oe=vn(J.backdropPadding),Ee=me.heights[S],Me=me.widths[S];let ge=K-oe.top,Ne=0-oe.left;switch(se){case"middle":ge-=Ee/2;break;case"bottom":ge-=Ee;break}switch(L){case"center":Ne-=Me/2;break;case"right":Ne-=Me;break;case"inner":S===E-1?Ne-=Me:S>0&&(Ne-=Me/2);break}pe={left:Ne,top:ge,width:Me+oe.width,height:Ee+oe.height,color:J.backdropColor}}C.push({label:x,font:q,textOffset:K,options:{rotation:w,color:fe,strokeColor:ye,strokeWidth:we,textAlign:R,textBaseline:se,translation:[T,N],backdrop:pe}})}return C}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Ti(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:s,padding:a}}=this.options,o=this._getLabelSizes(),c=e+a,d=o.widest.width;let h,f;return n==="left"?s?(f=this.right+a,i==="near"?h="left":i==="center"?(h="center",f+=d/2):(h="right",f+=d)):(f=this.right-c,i==="near"?h="right":i==="center"?(h="center",f-=d/2):(h="left",f=this.left)):n==="right"?s?(f=this.left+a,i==="near"?h="right":i==="center"?(h="center",f-=d/2):(h="left",f-=d)):(f=this.left+c,i==="near"?h="left":i==="center"?(h="center",f+=d/2):(h="right",f=this.right)):h="right",{textAlign:h,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:s,width:a,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,s,a,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(a=>a.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,o;const c=(d,h,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(d.x,d.y),i.lineTo(h.x,h.y),i.stroke(),i.restore())};if(n.display)for(a=0,o=s.length;a<o;++a){const d=s[a];n.drawOnChartArea&&c({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&c({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:i,grid:s}}=this,a=i.setContext(this.getContext()),o=i.display?a.width:0;if(!o)return;const c=s.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let h,f,m,g;this.isHorizontal()?(h=Tr(e,this.left,o)-o/2,f=Tr(e,this.right,c)+c/2,m=g=d):(m=Tr(e,this.top,o)-o/2,g=Tr(e,this.bottom,c)+c/2,h=f=d),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(h,m),n.lineTo(f,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Kc(i,s);const a=this.getLabelItems(e);for(const o of a){const c=o.options,d=o.font,h=o.label,f=o.textOffset;Ir(i,h,0,f,d,c)}s&&Zc(i)}drawTitle(){const{ctx:e,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const a=Qt(i.font),o=vn(i.padding),c=i.align;let d=a.lineHeight/2;n==="bottom"||n==="center"||qe(n)?(d+=o.bottom,Et(i.text)&&(d+=a.lineHeight*(i.text.length-1))):d+=o.top;const{titleX:h,titleY:f,maxWidth:m,rotation:g}=aC(this,d,n,c);Ir(e,i.text,0,0,a,{color:i.color,maxWidth:m,rotation:g,textAlign:rC(c,n,s),textBaseline:"middle",translation:[h,f]})}draw(e){!this._isVisible()||(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,i=$e(e.grid&&e.grid.z,-1),s=$e(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Lr.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let a,o;for(a=0,o=n.length;a<o;++a){const c=n[a];c[i]===this.id&&(!e||c.type===e)&&s.push(c)}return s}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Qt(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class cd{constructor(e,n,i){this.type=e,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let i;cC(n)&&(i=this.register(n));const s=this.items,a=e.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in s||(s[a]=e,oC(e,o,i),this.override&&Wt.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,i=e.id,s=this.scope;i in n&&delete n[i],s&&i in Wt[s]&&(delete Wt[s][i],this.override&&delete Br[i])}}function oC(t,e,n){const i=sl(Object.create(null),[n?Wt.get(n):{},Wt.get(e),t.defaults]);Wt.set(e,i),t.defaultRoutes&&lC(e,t.defaultRoutes),t.descriptors&&Wt.describe(e,t.descriptors)}function lC(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),s=i.pop(),a=[t].concat(i).join("."),o=e[n].split("."),c=o.pop(),d=o.join(".");Wt.route(a,s,d,c)})}function cC(t){return"id"in t&&"defaults"in t}class dC{constructor(){this.controllers=new cd(Ii,"datasets",!0),this.elements=new cd(Ai,"elements"),this.plugins=new cd(Object,"plugins"),this.scales=new cd(Lr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(s=>{const a=i||this._getRegistryForType(s);i||a.isForType(s)||a===this.plugins&&s.id?this._exec(e,a,s):ut(s,o=>{const c=i||this._getRegistryForType(o);this._exec(e,c,o)})})}_exec(e,n,i){const s=z1(e);Mt(i["before"+s],[],i),n[e](i),Mt(i["after"+s],[],i)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(e))return i}return this.plugins}_get(e,n,i){const s=n.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return s}}var Qi=new dC;class uC{constructor(){this._init=[]}notify(e,n,i,s){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(a,e,n,i);return n==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,i,s){s=s||{};for(const a of e){const o=a.plugin,c=o[i],d=[n,s,a.options];if(Mt(c,d,o)===!1&&s.cancelable)return!1}return!0}invalidate(){Je(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const i=e&&e.config,s=$e(i.options&&i.options.plugins,{}),a=hC(i);return s===!1&&!n?[]:pC(e,a,s,n)}_notifyStateChanges(e){const n=this._oldCache||[],i=this._cache,s=(a,o)=>a.filter(c=>!o.some(d=>c.plugin.id===d.plugin.id));this._notify(s(n,i),e,"stop"),this._notify(s(i,n),e,"start")}}function hC(t){const e={},n=[],i=Object.keys(Qi.plugins.items);for(let a=0;a<i.length;a++)n.push(Qi.getPlugin(i[a]));const s=t.plugins||[];for(let a=0;a<s.length;a++){const o=s[a];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function fC(t,e){return!e&&t===!1?null:t===!0?{}:t}function pC(t,{plugins:e,localIds:n},i,s){const a=[],o=t.getContext();for(const c of e){const d=c.id,h=fC(i[d],s);h!==null&&a.push({plugin:c,options:mC(t.config,{plugin:c,local:n[d]},h,o)})}return a}function mC(t,{plugin:e,local:n},i,s){const a=t.pluginScopeKeys(e),o=t.getOptionScopes(i,a);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ah(t,e){const n=Wt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function gC(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function _C(t,e){return t===e?"_index_":"_value_"}function zg(t){if(t==="x"||t==="y"||t==="r")return t}function yC(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function oh(t,...e){if(zg(t))return t;for(const n of e){const i=n.axis||yC(n.position)||t.length>1&&zg(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Pg(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function vC(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return Pg(t,"x",n[0])||Pg(t,"y",n[0])}return{}}function bC(t,e){const n=Br[t.type]||{scales:{}},i=e.scales||{},s=ah(t.type,e),a=Object.create(null);return Object.keys(i).forEach(o=>{const c=i[o];if(!qe(c))return console.error(`Invalid scale configuration for scale: ${o}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const d=oh(o,c,vC(o,t),Wt.scales[c.type]),h=_C(d,s),f=n.scales||{};a[o]=rl(Object.create(null),[{axis:d},c,f[d],f[h]])}),t.data.datasets.forEach(o=>{const c=o.type||t.type,d=o.indexAxis||ah(c,e),f=(Br[c]||{}).scales||{};Object.keys(f).forEach(m=>{const g=gC(m,d),_=o[g+"AxisID"]||g;a[_]=a[_]||Object.create(null),rl(a[_],[{axis:g},i[_],f[m]])})}),Object.keys(a).forEach(o=>{const c=a[o];rl(c,[Wt.scales[c.type],Wt.scale])}),a}function Lg(t){const e=t.options||(t.options={});e.plugins=$e(e.plugins,{}),e.scales=bC(t,e)}function Fg(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function wC(t){return t=t||{},t.data=Fg(t.data),Lg(t),t}const Rg=new Map,Hg=new Set;function dd(t,e){let n=Rg.get(t);return n||(n=e(),Rg.set(t,n),Hg.add(n)),n}const Cl=(t,e,n)=>{const i=Gs(e,n);i!==void 0&&t.add(i)};class kC{constructor(e){this._config=wC(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Fg(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Lg(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return dd(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return dd(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return dd(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return dd(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let s=i.get(e);return(!s||n)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,n,i){const{options:s,type:a}=this,o=this._cachedScopes(e,i),c=o.get(n);if(c)return c;const d=new Set;n.forEach(f=>{e&&(d.add(e),f.forEach(m=>Cl(d,e,m))),f.forEach(m=>Cl(d,s,m)),f.forEach(m=>Cl(d,Br[a]||{},m)),f.forEach(m=>Cl(d,Wt,m)),f.forEach(m=>Cl(d,Y1,m))});const h=Array.from(d);return h.length===0&&h.push(Object.create(null)),Hg.has(n)&&o.set(n,h),h}chartOptionScopes(){const{options:e,type:n}=this;return[e,Br[n]||{},Wt.datasets[n]||{},{type:n},Wt,Y1]}resolveNamedOptions(e,n,i,s=[""]){const a={$shared:!0},{resolver:o,subPrefixes:c}=Wg(this._resolverCache,e,s);let d=o;if(xC(o,n)){a.$shared=!1,i=Ks(i)?i():i;const h=this.createResolver(e,i,c);d=Da(o,i,h)}for(const h of n)a[h]=d[h];return a}createResolver(e,n,i=[""],s){const{resolver:a}=Wg(this._resolverCache,e,i);return qe(n)?Da(a,n,void 0,s):a}}function Wg(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let a=i.get(s);return a||(a={resolver:G1(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},i.set(s,a)),a}const CC=t=>qe(t)&&Object.getOwnPropertyNames(t).some(e=>Ks(t[e]));function xC(t,e){const{isScriptable:n,isIndexable:i}=Ym(t);for(const s of e){const a=n(s),o=i(s),c=(o||a)&&t[s];if(a&&(Ks(c)||CC(c))||o&&Et(c))return!0}return!1}var SC="4.4.3";const MC=["top","bottom","left","right","chartArea"];function Yg(t,e){return t==="top"||t==="bottom"||MC.indexOf(t)===-1&&e==="x"}function jg(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Ug(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Mt(n&&n.onComplete,[t],e)}function OC(t){const e=t.chart,n=e.options.animation;Mt(n&&n.onProgress,[t],e)}function qg(t){return X1()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ud={},Gg=t=>{const e=qg(t);return Object.values(ud).filter(n=>n.canvas===e).pop()};function DC(t,e,n){const i=Object.keys(t);for(const s of i){const a=+s;if(a>=e){const o=t[s];delete t[s],(n>0||a>e)&&(t[a+n]=o)}}}function EC(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function hd(t,e,n){return t.options.clip?t[n]:e[n]}function VC(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:hd(n,e,"left"),right:hd(n,e,"right"),top:hd(i,e,"top"),bottom:hd(i,e,"bottom")}:e}class mi{static register(...e){Qi.add(...e),Kg()}static unregister(...e){Qi.remove(...e),Kg()}constructor(e,n){const i=this.config=new kC(n),s=qg(e),a=Gg(s);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||qk(s)),this.platform.updateConfig(i);const c=this.platform.acquireContext(s,o.aspectRatio),d=c&&c.canvas,h=d&&d.height,f=d&&d.width;if(this.id=Iw(),this.ctx=c,this.canvas=d,this.width=f,this.height=h,this._options=o,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 uC,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Kw(m=>this.update(m),o.resizeDelay||0),this._dataChanges=[],ud[this.id]=this,!c||!d){console.error("Failed to create chart: can't acquire context from the given item");return}bs.listen(this,"complete",Ug),bs.listen(this,"progress",OC),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:s,_aspectRatio:a}=this;return Je(e)?n&&a?a:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Qi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Jm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rm(this.canvas,this.ctx),this}stop(){return bs.stop(this),this}resize(e,n){bs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,s=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,n,a),c=i.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Jm(this,c,!0)&&(this.notifyPlugins("resize",{size:o}),Mt(i.onResize,[this,o],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ut(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,s=Object.keys(i).reduce((o,c)=>(o[c]=!1,o),{});let a=[];n&&(a=a.concat(Object.keys(n).map(o=>{const c=n[o],d=oh(o,c),h=d==="r",f=d==="x";return{options:c,dposition:h?"chartArea":f?"bottom":"left",dtype:h?"radialLinear":f?"category":"linear"}}))),ut(a,o=>{const c=o.options,d=c.id,h=oh(d,c),f=$e(c.type,o.dtype);(c.position===void 0||Yg(c.position,h)!==Yg(o.dposition))&&(c.position=o.dposition),s[d]=!0;let m=null;if(d in i&&i[d].type===f)m=i[d];else{const g=Qi.getScale(f);m=new g({id:d,type:f,ctx:this.ctx,chart:this}),i[m.id]=m}m.init(c,e)}),ut(s,(o,c)=>{o||delete i[c]}),ut(i,o=>{bn.configure(this,o,o.options),bn.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((s,a)=>s.index-a.index),i>n){for(let s=n;s<i;++s)this._destroyDatasetMeta(s);e.splice(n,i-n)}this._sortedMetasets=e.slice(0).sort(jg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((i,s)=>{n.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i<s;i++){const a=n[i];let o=this.getDatasetMeta(i);const c=a.type||this.config.type;if(o.type&&o.type!==c&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=c,o.indexAxis=a.indexAxis||ah(c,this.options),o.order=a.order||0,o.index=i,o.label=""+a.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const d=Qi.getController(c),{datasetElementType:h,dataElementType:f}=Wt.datasets[c];Object.assign(d,{dataElementType:Qi.getElement(f),datasetElementType:h&&Qi.getElement(h)}),o.controller=new d(this,i),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){ut(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let h=0,f=this.data.datasets.length;h<f;h++){const{controller:m}=this.getDatasetMeta(h),g=!s&&a.indexOf(m)===-1;m.buildOrUpdateElements(g),o=Math.max(+m.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),s||ut(a,h=>{h.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(jg("z","_idx"));const{_active:c,_lastEvent:d}=this;d?this._eventHandler(d,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){ut(this.scales,e=>{bn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Cm(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:a}of n){const o=i==="_removeElements"?-a:a;DC(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=a=>new Set(e.filter(o=>o[0]===a).map((o,c)=>c+","+o.splice(1).join(","))),s=i(0);for(let a=1;a<n;a++)if(!Cm(s,i(a)))return;return Array.from(s).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;bn.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],ut(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,a)=>{s._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,Ks(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const i=this.getDatasetMeta(e),s={meta:i,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(bs.has(this)?this.attached&&!bs.running(this)&&bs.start(this):(this.draw(),Ug({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,i=[];let s,a;for(s=0,a=n.length;s<a;++s){const o=n[s];(!e||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i=e._clip,s=!i.disabled,a=VC(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Kc(n,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),e.controller.draw(),s&&Zc(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return vs(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const a=Mk.modes[n];return typeof a=="function"?a(this,e,i,s):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let s=i.filter(a=>a&&a._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Xs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const s=i?"show":"hide",a=this.getDatasetMeta(e),o=a.controller._resolveAnimations(void 0,s);al(n)?(a.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(a,{visible:i}),this.update(c=>c.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),bs.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Rm(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete ud[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,i=(a,o)=>{n.addEventListener(this,a,o),e[a]=o},s=(a,o,c)=>{a.offsetX=o,a.offsetY=c,this._eventHandler(a)};ut(this.options.events,a=>i(a,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(d,h)=>{n.addEventListener(this,d,h),e[d]=h},s=(d,h)=>{e[d]&&(n.removeEventListener(this,d,h),delete e[d])},a=(d,h)=>{this.canvas&&this.resize(d,h)};let o;const c=()=>{s("attach",c),this.attached=!0,this.resize(),i("resize",a),i("detach",o)};o=()=>{this.attached=!1,s("resize",a),this._stop(),this._resize(0,0),i("attach",c)},n.isAttached(this.canvas)?c():o()}unbindEvents(){ut(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ut(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const s=i?"set":"remove";let a,o,c,d;for(n==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+s+"DatasetHoverStyle"]()),c=0,d=e.length;c<d;++c){o=e[c];const h=o&&this.getDatasetMeta(o.datasetIndex).controller;h&&h[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],i=e.map(({datasetIndex:a,index:o})=>{const c=this.getDatasetMeta(a);if(!c)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:c.data[o],index:o}});!Wc(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const s=this.options.hover,a=(d,h)=>d.filter(f=>!h.some(m=>f.datasetIndex===m.datasetIndex&&f.index===m.index)),o=a(n,e),c=i?e:a(e,n);o.length&&this.updateHoverStyle(o,s.mode,!1),c.length&&s.mode&&this.updateHoverStyle(c,s.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const a=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:s=[],options:a}=this,o=n,c=this._getActiveElements(e,s,i,o),d=Lw(e),h=EC(e,this._lastEvent,i,d);i&&(this._lastEvent=null,Mt(a.onHover,[e,c,this],this),d&&Mt(a.onClick,[e,c,this],this));const f=!Wc(c,s);return(f||n)&&(this._active=c,this._updateHoverStyles(c,s,n)),this._lastEvent=h,f}_getActiveElements(e,n,i,s){if(e.type==="mouseout")return[];if(!i)return n;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,s)}}ae(mi,"defaults",Wt),ae(mi,"instances",ud),ae(mi,"overrides",Br),ae(mi,"registry",Qi),ae(mi,"version",SC),ae(mi,"getChart",Gg);function Kg(){return ut(mi.instances,t=>t._plugins.invalidate())}function BC(t,e,n){const{startAngle:i,pixelMargin:s,x:a,y:o,outerRadius:c,innerRadius:d}=e;let h=s/c;t.beginPath(),t.arc(a,o,c,i-h,n+h),d>s?(h=s/d,t.arc(a,o,d,n+h,i-h,!0)):t.arc(a,o,s,n+Ut,i-Ut),t.closePath(),t.clip()}function TC(t){return q1(t,["outerStart","outerEnd","innerStart","innerEnd"])}function IC(t,e,n,i){const s=TC(t.options.borderRadius),a=(n-e)/2,o=Math.min(a,i*e/2),c=d=>{const h=(n-Math.min(a,d))*i/2;return dn(d,0,Math.min(a,h))};return{outerStart:c(s.outerStart),outerEnd:c(s.outerEnd),innerStart:dn(s.innerStart,0,o),innerEnd:dn(s.innerEnd,0,o)}}function Ta(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function fd(t,e,n,i,s,a){const{x:o,y:c,startAngle:d,pixelMargin:h,innerRadius:f}=e,m=Math.max(e.outerRadius+i+n-h,0),g=f>0?f+i+n+h:0;let _=0;const b=s-d;if(i){const J=f>0?f-i:0,he=m>0?m-i:0,fe=(J+he)/2,ye=fe!==0?b*fe/(fe+i):b;_=(b-ye)/2}const w=Math.max(.001,b*m-n/Vt)/m,C=(b-w)/2,S=d+C+_,E=s-C-_,{outerStart:A,outerEnd:x,innerStart:T,innerEnd:N}=IC(e,g,m,E-S),L=m-A,F=m-x,q=S+A/L,ee=E-x/F,ie=g+T,K=g+N,se=S+T/ie,me=E-N/K;if(t.beginPath(),a){const J=(q+ee)/2;if(t.arc(o,c,m,q,J),t.arc(o,c,m,J,ee),x>0){const we=Ta(F,ee,o,c);t.arc(we.x,we.y,x,ee,E+Ut)}const he=Ta(K,E,o,c);if(t.lineTo(he.x,he.y),N>0){const we=Ta(K,me,o,c);t.arc(we.x,we.y,N,E+Ut,me+Math.PI)}const fe=(E-N/g+(S+T/g))/2;if(t.arc(o,c,g,E-N/g,fe,!0),t.arc(o,c,g,fe,S+T/g,!0),T>0){const we=Ta(ie,se,o,c);t.arc(we.x,we.y,T,se+Math.PI,S-Ut)}const ye=Ta(L,S,o,c);if(t.lineTo(ye.x,ye.y),A>0){const we=Ta(L,q,o,c);t.arc(we.x,we.y,A,S-Ut,q)}}else{t.moveTo(o,c);const J=Math.cos(q)*m+o,he=Math.sin(q)*m+c;t.lineTo(J,he);const fe=Math.cos(ee)*m+o,ye=Math.sin(ee)*m+c;t.lineTo(fe,ye)}t.closePath()}function AC(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:c}=e;let d=e.endAngle;if(a){fd(t,e,n,i,d,s);for(let h=0;h<a;++h)t.fill();isNaN(c)||(d=o+(c%Bt||Bt))}return fd(t,e,n,i,d,s),t.fill(),d}function $C(t,e,n,i,s){const{fullCircles:a,startAngle:o,circumference:c,options:d}=e,{borderWidth:h,borderJoinStyle:f,borderDash:m,borderDashOffset:g}=d,_=d.borderAlign==="inner";if(!h)return;t.setLineDash(m||[]),t.lineDashOffset=g,_?(t.lineWidth=h*2,t.lineJoin=f||"round"):(t.lineWidth=h,t.lineJoin=f||"bevel");let b=e.endAngle;if(a){fd(t,e,n,i,b,s);for(let w=0;w<a;++w)t.stroke();isNaN(c)||(b=o+(c%Bt||Bt))}_&&BC(t,e,b),a||(fd(t,e,n,i,b,s),t.stroke())}class xl extends Ai{constructor(n){super();ae(this,"circumference");ae(this,"endAngle");ae(this,"fullCircles");ae(this,"innerRadius");ae(this,"outerRadius");ae(this,"pixelMargin");ae(this,"startAngle");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,n&&Object.assign(this,n)}inRange(n,i,s){const a=this.getProps(["x","y"],s),{angle:o,distance:c}=Dm(a,{x:n,y:i}),{startAngle:d,endAngle:h,innerRadius:f,outerRadius:m,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),_=(this.options.spacing+this.options.borderWidth)/2,w=$e(g,h-d)>=Bt||ll(o,d,h),C=_s(c,f+_,m+_);return w&&C}getCenterPoint(n){const{x:i,y:s,startAngle:a,endAngle:o,innerRadius:c,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:h,spacing:f}=this.options,m=(a+o)/2,g=(c+d+f+h)/2;return{x:i+Math.cos(m)*g,y:s+Math.sin(m)*g}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:s}=this,a=(i.offset||0)/4,o=(i.spacing||0)/2,c=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>Bt?Math.floor(s/Bt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*a,Math.sin(d)*a);const h=1-Math.sin(Math.min(Vt,s||0)),f=a*h;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,AC(n,this,f,o,c),$C(n,this,f,o,c),n.restore()}}ae(xl,"id","arc"),ae(xl,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),ae(xl,"defaultRoutes",{backgroundColor:"backgroundColor"}),ae(xl,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Zg(t,e,n=e){t.lineCap=$e(n.borderCapStyle,e.borderCapStyle),t.setLineDash($e(n.borderDash,e.borderDash)),t.lineDashOffset=$e(n.borderDashOffset,e.borderDashOffset),t.lineJoin=$e(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=$e(n.borderWidth,e.borderWidth),t.strokeStyle=$e(n.borderColor,e.borderColor)}function NC(t,e,n){t.lineTo(n.x,n.y)}function zC(t){return t.stepped?o9:t.tension||t.cubicInterpolationMode==="monotone"?l9:NC}function Xg(t,e,n={}){const i=t.length,{start:s=0,end:a=i-1}=n,{start:o,end:c}=e,d=Math.max(s,o),h=Math.min(a,c),f=s<o&&a<o||s>c&&a>c;return{count:i,start:d,loop:e.loop,ilen:h<d&&!f?i+h-d:h-d}}function PC(t,e,n,i){const{points:s,options:a}=e,{count:o,start:c,loop:d,ilen:h}=Xg(s,n,i),f=zC(a);let{move:m=!0,reverse:g}=i||{},_,b,w;for(_=0;_<=h;++_)b=s[(c+(g?h-_:_))%o],!b.skip&&(m?(t.moveTo(b.x,b.y),m=!1):f(t,w,b,g,a.stepped),w=b);return d&&(b=s[(c+(g?h:0))%o],f(t,w,b,g,a.stepped)),!!d}function LC(t,e,n,i){const s=e.points,{count:a,start:o,ilen:c}=Xg(s,n,i),{move:d=!0,reverse:h}=i||{};let f=0,m=0,g,_,b,w,C,S;const E=x=>(o+(h?c-x:x))%a,A=()=>{w!==C&&(t.lineTo(f,C),t.lineTo(f,w),t.lineTo(f,S))};for(d&&(_=s[E(0)],t.moveTo(_.x,_.y)),g=0;g<=c;++g){if(_=s[E(g)],_.skip)continue;const x=_.x,T=_.y,N=x|0;N===b?(T<w?w=T:T>C&&(C=T),f=(m*f+x)/++m):(A(),t.lineTo(x,T),b=N,m=0,w=C=T),S=T}A()}function lh(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?LC:PC}function FC(t){return t.stepped?F9:t.tension||t.cubicInterpolationMode==="monotone"?R9:zr}function RC(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),Zg(t,e.options),t.stroke(s)}function HC(t,e,n,i){const{segments:s,options:a}=e,o=lh(e);for(const c of s)Zg(t,a,c.style),t.beginPath(),o(t,e,c,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const WC=typeof Path2D=="function";function YC(t,e,n,i){WC&&!e.options.segment?RC(t,e,n,i):HC(t,e,n,i)}class Qs extends Ai{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;T9(this._points,i,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=q9(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,s=e[n],a=this.points,o=rg(this,{property:n,start:s,end:s});if(!o.length)return;const c=[],d=FC(i);let h,f;for(h=0,f=o.length;h<f;++h){const{start:m,end:g}=o[h],_=a[m],b=a[g];if(_===b){c.push(_);continue}const w=Math.abs((s-_[n])/(b[n]-_[n])),C=d(_,b,w,i.stepped);C[n]=e[n],c.push(C)}return c.length===1?c[0]:c}pathSegment(e,n,i){return lh(this)(e,this,n,i)}path(e,n,i){const s=this.segments,a=lh(this);let o=this._loop;n=n||0,i=i||this.points.length-n;for(const c of s)o&=a(e,this,c,{start:n,end:n+i-1});return!!o}draw(e,n,i,s){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),YC(e,this,i,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ae(Qs,"id","line"),ae(Qs,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ae(Qs,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ae(Qs,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Jg(t,e,n,i){const s=t.options,{[n]:a}=t.getProps([n],i);return Math.abs(e-a)<s.radius+s.hitRadius}class pd extends Ai{constructor(n){super();ae(this,"parsed");ae(this,"skip");ae(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,s){const a=this.options,{x:o,y:c}=this.getProps(["x","y"],s);return Math.pow(n-o,2)+Math.pow(i-c,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,i){return Jg(this,n,"x",i)}inYRange(n,i){return Jg(this,n,"y",i)}getCenterPoint(n){const{x:i,y:s}=this.getProps(["x","y"],n);return{x:i,y:s}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const s=i&&n.borderWidth||0;return(i+s)*2}draw(n,i){const s=this.options;this.skip||s.radius<.1||!vs(this,i,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,U1(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ae(pd,"id","point"),ae(pd,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ae(pd,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Qg(t,e){const{x:n,y:i,base:s,width:a,height:o}=t.getProps(["x","y","base","width","height"],e);let c,d,h,f,m;return t.horizontal?(m=o/2,c=Math.min(n,s),d=Math.max(n,s),h=i-m,f=i+m):(m=a/2,c=n-m,d=n+m,h=Math.min(i,s),f=Math.max(i,s)),{left:c,top:h,right:d,bottom:f}}function er(t,e,n,i){return t?0:dn(e,n,i)}function jC(t,e,n){const i=t.options.borderWidth,s=t.borderSkipped,a=Wm(i);return{t:er(s.top,a.top,0,n),r:er(s.right,a.right,0,e),b:er(s.bottom,a.bottom,0,n),l:er(s.left,a.left,0,e)}}function UC(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,a=Ar(s),o=Math.min(e,n),c=t.borderSkipped,d=i||qe(s);return{topLeft:er(!d||c.top||c.left,a.topLeft,0,o),topRight:er(!d||c.top||c.right,a.topRight,0,o),bottomLeft:er(!d||c.bottom||c.left,a.bottomLeft,0,o),bottomRight:er(!d||c.bottom||c.right,a.bottomRight,0,o)}}function qC(t){const e=Qg(t),n=e.right-e.left,i=e.bottom-e.top,s=jC(t,n/2,i/2),a=UC(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:a},inner:{x:e.left+s.l,y:e.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,a.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(s.b,s.r))}}}}function ch(t,e,n,i){const s=e===null,a=n===null,c=t&&!(s&&a)&&Qg(t,i);return c&&(s||_s(e,c.left,c.right))&&(a||_s(n,c.top,c.bottom))}function GC(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function KC(t,e){t.rect(e.x,e.y,e.w,e.h)}function dh(t,e,n={}){const i=t.x!==n.x?-e:0,s=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+a,h:t.h+o,radius:t.radius}}class md extends Ai{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:i,backgroundColor:s}}=this,{inner:a,outer:o}=qC(this),c=GC(o.radius)?hl:KC;e.save(),(o.w!==a.w||o.h!==a.h)&&(e.beginPath(),c(e,dh(o,n,a)),e.clip(),c(e,dh(a,-n,o)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),c(e,dh(a,n)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,n,i){return ch(this,e,n,i)}inXRange(e,n){return ch(this,e,null,n)}inYRange(e,n){return ch(this,null,e,n)}getCenterPoint(e){const{x:n,y:i,base:s,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(n+s)/2:n,y:a?i:(i+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}ae(md,"id","bar"),ae(md,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ae(md,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var ZC=Object.freeze({__proto__:null,ArcElement:xl,BarElement:md,LineElement:Qs,PointElement:pd});const uh=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],e2=uh.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function t2(t){return uh[t%uh.length]}function n2(t){return e2[t%e2.length]}function XC(t,e){return t.borderColor=t2(e),t.backgroundColor=n2(e),++e}function JC(t,e){return t.backgroundColor=t.data.map(()=>t2(e++)),e}function QC(t,e){return t.backgroundColor=t.data.map(()=>n2(e++)),e}function ex(t){let e=0;return(n,i)=>{const s=t.getDatasetMeta(i).controller;s instanceof Js?e=JC(n,e):s instanceof Ba?e=QC(n,e):s&&(e=XC(n,e))}}function i2(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function tx(t){return t&&(t.borderColor||t.backgroundColor)}var nx={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:s}=t.config,{elements:a}=s;if(!n.forceOverride&&(i2(i)||tx(s)||a&&i2(a)))return;const o=ex(t);i.forEach(o)}};function ix(t,e,n,i,s){const a=s.samples||i;if(a>=n)return t.slice(e,e+n);const o=[],c=(n-2)/(a-2);let d=0;const h=e+n-1;let f=e,m,g,_,b,w;for(o[d++]=t[f],m=0;m<a-2;m++){let C=0,S=0,E;const A=Math.floor((m+1)*c)+1+e,x=Math.min(Math.floor((m+2)*c)+1,n)+e,T=x-A;for(E=A;E<x;E++)C+=t[E].x,S+=t[E].y;C/=T,S/=T;const N=Math.floor(m*c)+1+e,L=Math.min(Math.floor((m+1)*c)+1,n)+e,{x:F,y:q}=t[f];for(_=b=-1,E=N;E<L;E++)b=.5*Math.abs((F-C)*(t[E].y-q)-(F-t[E].x)*(S-q)),b>_&&(_=b,g=t[E],w=E);o[d++]=g,f=w}return o[d++]=t[h],o}function sx(t,e,n,i){let s=0,a=0,o,c,d,h,f,m,g,_,b,w;const C=[],S=e+n-1,E=t[e].x,x=t[S].x-E;for(o=e;o<e+n;++o){c=t[o],d=(c.x-E)/x*i,h=c.y;const T=d|0;if(T===f)h<b?(b=h,m=o):h>w&&(w=h,g=o),s=(a*s+c.x)/++a;else{const N=o-1;if(!Je(m)&&!Je(g)){const L=Math.min(m,g),F=Math.max(m,g);L!==_&&L!==N&&C.push({...t[L],x:s}),F!==_&&F!==N&&C.push({...t[F],x:s})}o>0&&N!==_&&C.push(t[N]),C.push(c),f=T,a=0,b=w=h,m=g=_=o}}return C}function s2(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function r2(t){t.data.datasets.forEach(e=>{s2(e)})}function rx(t,e){const n=e.length;let i=0,s;const{iScale:a}=t,{min:o,max:c,minDefined:d,maxDefined:h}=a.getUserBounds();return d&&(i=dn(ys(e,a.axis,o).lo,0,n-1)),h?s=dn(ys(e,a.axis,c).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var ax={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){r2(t);return}const i=t.width;t.data.datasets.forEach((s,a)=>{const{_data:o,indexAxis:c}=s,d=t.getDatasetMeta(a),h=o||s.data;if(fl([c,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const f=t.scales[d.xAxisID];if(f.type!=="linear"&&f.type!=="time"||t.options.parsing)return;let{start:m,count:g}=rx(d,h);const _=n.threshold||4*i;if(g<=_){s2(s);return}Je(o)&&(s._data=h,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(w){this._data=w}}));let b;switch(n.algorithm){case"lttb":b=ix(h,m,g,i,n);break;case"min-max":b=sx(h,m,g,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=b})},destroy(t){r2(t)}};function ox(t,e,n){const i=t.segments,s=t.points,a=e.points,o=[];for(const c of i){let{start:d,end:h}=c;h=fh(d,h,s);const f=hh(n,s[d],s[h],c.loop);if(!e.segments){o.push({source:c,target:f,start:s[d],end:s[h]});continue}const m=rg(e,f);for(const g of m){const _=hh(n,a[g.start],a[g.end],g.loop),b=sg(c,s,_);for(const w of b)o.push({source:w,target:g,start:{[n]:a2(f,_,"start",Math.max)},end:{[n]:a2(f,_,"end",Math.min)}})}}return o}function hh(t,e,n,i){if(i)return;let s=e[t],a=n[t];return t==="angle"&&(s=ti(s),a=ti(a)),{property:t,start:s,end:a}}function lx(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,a=[];return e.segments.forEach(({start:o,end:c})=>{c=fh(o,c,s);const d=s[o],h=s[c];i!==null?(a.push({x:d.x,y:i}),a.push({x:h.x,y:i})):n!==null&&(a.push({x:n,y:d.y}),a.push({x:n,y:h.y}))}),a}function fh(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function a2(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function o2(t,e){let n=[],i=!1;return Et(t)?(i=!0,n=t):n=lx(t,e),n.length?new Qs({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function l2(t){return t&&t.fill!==!1}function cx(t,e,n){let s=t[e].fill;const a=[e];let o;if(!n)return s;for(;s!==!1&&a.indexOf(s)===-1;){if(!Ht(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;a.push(s),s=o.fill}return!1}function dx(t,e,n){const i=px(t);if(qe(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Ht(s)&&Math.floor(s)===s?ux(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function ux(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function hx(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:qe(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function fx(t,e,n){let i;return t==="start"?i=n:t==="end"?i=e.options.reverse?e.min:e.max:qe(t)?i=t.value:i=e.getBaseValue(),i}function px(t){const e=t.options,n=e.fill;let i=$e(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function mx(t){const{scale:e,index:n,line:i}=t,s=[],a=i.segments,o=i.points,c=gx(e,n);c.push(o2({x:null,y:e.bottom},i));for(let d=0;d<a.length;d++){const h=a[d];for(let f=h.start;f<=h.end;f++)_x(s,o[f],c)}return new Qs({points:s,options:{}})}function gx(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const a=i[s];if(a.index===e)break;a.hidden||n.unshift(a.dataset)}return n}function _x(t,e,n){const i=[];for(let s=0;s<n.length;s++){const a=n[s],{first:o,last:c,point:d}=yx(a,e,"x");if(!(!d||o&&c)){if(o)i.unshift(d);else if(t.push(d),!c)break}}t.push(...i)}function yx(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const s=i[n],a=t.segments,o=t.points;let c=!1,d=!1;for(let h=0;h<a.length;h++){const f=a[h],m=o[f.start][n],g=o[f.end][n];if(_s(s,m,g)){c=s===m,d=s===g;break}}return{first:c,last:d,point:i}}class c2{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,i){const{x:s,y:a,radius:o}=this;return n=n||{start:0,end:Bt},e.arc(s,a,o,n.end,n.start,!0),!i.bounds}interpolate(e){const{x:n,y:i,radius:s}=this,a=e.angle;return{x:n+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}}function vx(t){const{chart:e,fill:n,line:i}=t;if(Ht(n))return bx(e,n);if(n==="stack")return mx(t);if(n==="shape")return!0;const s=wx(t);return s instanceof c2?s:o2(s,i)}function bx(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function wx(t){return(t.scale||{}).getPointPositionForValue?Cx(t):kx(t)}function kx(t){const{scale:e={},fill:n}=t,i=hx(n,e);if(Ht(i)){const s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function Cx(t){const{scale:e,fill:n}=t,i=e.options,s=e.getLabels().length,a=i.reverse?e.max:e.min,o=fx(n,e,a),c=[];if(i.grid.circular){const d=e.getPointPositionForValue(0,a);return new c2({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(o)})}for(let d=0;d<s;++d)c.push(e.getPointPositionForValue(d,o));return c}function ph(t,e,n){const i=vx(e),{line:s,scale:a,axis:o}=e,c=s.options,d=c.fill,h=c.backgroundColor,{above:f=h,below:m=h}=d||{};i&&s.points.length&&(Kc(t,n),xx(t,{line:s,target:i,above:f,below:m,area:n,scale:a,axis:o}),Zc(t))}function xx(t,e){const{line:n,target:i,above:s,below:a,area:o,scale:c}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&a!==s&&(d2(t,i,o.top),u2(t,{line:n,target:i,color:s,scale:c,property:d}),t.restore(),t.save(),d2(t,i,o.bottom)),u2(t,{line:n,target:i,color:a,scale:c,property:d}),t.restore()}function d2(t,e,n){const{segments:i,points:s}=e;let a=!0,o=!1;t.beginPath();for(const c of i){const{start:d,end:h}=c,f=s[d],m=s[fh(d,h,s)];a?(t.moveTo(f.x,f.y),a=!1):(t.lineTo(f.x,n),t.lineTo(f.x,f.y)),o=!!e.pathSegment(t,c,{move:o}),o?t.closePath():t.lineTo(m.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function u2(t,e){const{line:n,target:i,property:s,color:a,scale:o}=e,c=ox(n,i,s);for(const{source:d,target:h,start:f,end:m}of c){const{style:{backgroundColor:g=a}={}}=d,_=i!==!0;t.save(),t.fillStyle=g,Sx(t,o,_&&hh(s,f,m)),t.beginPath();const b=!!n.pathSegment(t,d);let w;if(_){b?t.closePath():h2(t,i,m,s);const C=!!i.pathSegment(t,h,{move:b,reverse:!0});w=b&&C,w||h2(t,i,f,s)}t.closePath(),t.fill(w?"evenodd":"nonzero"),t.restore()}}function Sx(t,e,n){const{top:i,bottom:s}=e.chart.chartArea,{property:a,start:o,end:c}=n||{};a==="x"&&(t.beginPath(),t.rect(o,i,c-o,s-i),t.clip())}function h2(t,e,n,i){const s=e.interpolate(n,i);s&&t.lineTo(s.x,s.y)}var Mx={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,s=[];let a,o,c,d;for(o=0;o<i;++o)a=t.getDatasetMeta(o),c=a.dataset,d=null,c&&c.options&&c instanceof Qs&&(d={visible:t.isDatasetVisible(o),index:o,fill:dx(c,o,i),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:c}),a.$filler=d,s.push(d);for(o=0;o<i;++o)d=s[o],!(!d||d.fill===!1)&&(d.fill=cx(s,o,n.propagate))},beforeDraw(t,e,n){const i=n.drawTime==="beforeDraw",s=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let o=s.length-1;o>=0;--o){const c=s[o].$filler;!c||(c.line.updateControlPoints(a,c.axis),i&&c.fill&&ph(t.ctx,c,a))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=t.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const a=i[s].$filler;l2(a)&&ph(t.ctx,a,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!l2(i)||n.drawTime!=="beforeDatasetDraw"||ph(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const f2=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},Ox=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class p2 extends Ai{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,i){this.maxWidth=e,this.maxHeight=n,this._margins=i,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(){const e=this.options.labels||{};let n=Mt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(i=>e.filter(i,this.chart.data))),e.sort&&(n=n.sort((i,s)=>e.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,s=Qt(i.font),a=s.size,o=this._computeTitleHeight(),{boxWidth:c,itemHeight:d}=f2(i,a);let h,f;n.font=s.string,this.isHorizontal()?(h=this.maxWidth,f=this._fitRows(o,a,c,d)+10):(f=this.maxHeight,h=this._fitCols(o,s,c,d)+10),this.width=Math.min(h,e.maxWidth||this.maxWidth),this.height=Math.min(f,e.maxHeight||this.maxHeight)}_fitRows(e,n,i,s){const{ctx:a,maxWidth:o,options:{labels:{padding:c}}}=this,d=this.legendHitBoxes=[],h=this.lineWidths=[0],f=s+c;let m=e;a.textAlign="left",a.textBaseline="middle";let g=-1,_=-f;return this.legendItems.forEach((b,w)=>{const C=i+n/2+a.measureText(b.text).width;(w===0||h[h.length-1]+C+2*c>o)&&(m+=f,h[h.length-(w>0?0:1)]=0,_+=f,g++),d[w]={left:0,top:_,row:g,width:C,height:s},h[h.length-1]+=C+c}),m}_fitCols(e,n,i,s){const{ctx:a,maxHeight:o,options:{labels:{padding:c}}}=this,d=this.legendHitBoxes=[],h=this.columnSizes=[],f=o-e;let m=c,g=0,_=0,b=0,w=0;return this.legendItems.forEach((C,S)=>{const{itemWidth:E,itemHeight:A}=Dx(i,n,a,C,s);S>0&&_+A+2*c>f&&(m+=g+c,h.push({width:g,height:_}),b+=g+c,w++,g=_=0),d[S]={left:b,top:_,col:w,width:E,height:A},g=Math.max(g,E),_+=A+c}),m+=g,h.push({width:g,height:_}),m}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:a}}=this,o=Va(a,this.left,this.width);if(this.isHorizontal()){let c=0,d=yn(i,this.left+s,this.right-this.lineWidths[c]);for(const h of n)c!==h.row&&(c=h.row,d=yn(i,this.left+s,this.right-this.lineWidths[c])),h.top+=this.top+e+s,h.left=o.leftForLtr(o.x(d),h.width),d+=h.width+s}else{let c=0,d=yn(i,this.top+e+s,this.bottom-this.columnSizes[c].height);for(const h of n)h.col!==c&&(c=h.col,d=yn(i,this.top+e+s,this.bottom-this.columnSizes[c].height)),h.top=d,h.left+=this.left+s,h.left=o.leftForLtr(o.x(h.left),h.width),d+=h.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Kc(e,this),this._draw(),Zc(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:a,labels:o}=e,c=Wt.color,d=Va(e.rtl,this.left,this.width),h=Qt(o.font),{padding:f}=o,m=h.size,g=m/2;let _;this.drawTitle(),s.textAlign=d.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:b,boxHeight:w,itemHeight:C}=f2(o,m),S=function(N,L,F){if(isNaN(b)||b<=0||isNaN(w)||w<0)return;s.save();const q=$e(F.lineWidth,1);if(s.fillStyle=$e(F.fillStyle,c),s.lineCap=$e(F.lineCap,"butt"),s.lineDashOffset=$e(F.lineDashOffset,0),s.lineJoin=$e(F.lineJoin,"miter"),s.lineWidth=q,s.strokeStyle=$e(F.strokeStyle,c),s.setLineDash($e(F.lineDash,[])),o.usePointStyle){const ee={radius:w*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:q},ie=d.xPlus(N,b/2),K=L+g;Hm(s,ee,ie,K,o.pointStyleWidth&&b)}else{const ee=L+Math.max((m-w)/2,0),ie=d.leftForLtr(N,b),K=Ar(F.borderRadius);s.beginPath(),Object.values(K).some(se=>se!==0)?hl(s,{x:ie,y:ee,w:b,h:w,radius:K}):s.rect(ie,ee,b,w),s.fill(),q!==0&&s.stroke()}s.restore()},E=function(N,L,F){Ir(s,F.text,N,L+C/2,h,{strikethrough:F.hidden,textAlign:d.textAlign(F.textAlign)})},A=this.isHorizontal(),x=this._computeTitleHeight();A?_={x:yn(a,this.left+f,this.right-i[0]),y:this.top+f+x,line:0}:_={x:this.left+f,y:yn(a,this.top+x+f,this.bottom-n[0].height),line:0},eg(this.ctx,e.textDirection);const T=C+f;this.legendItems.forEach((N,L)=>{s.strokeStyle=N.fontColor,s.fillStyle=N.fontColor;const F=s.measureText(N.text).width,q=d.textAlign(N.textAlign||(N.textAlign=o.textAlign)),ee=b+g+F;let ie=_.x,K=_.y;d.setWidth(this.width),A?L>0&&ie+ee+f>this.right&&(K=_.y+=T,_.line++,ie=_.x=yn(a,this.left+f,this.right-i[_.line])):L>0&&K+T>this.bottom&&(ie=_.x=ie+n[_.line].width+f,_.line++,K=_.y=yn(a,this.top+x+f,this.bottom-n[_.line].height));const se=d.x(ie);if(S(se,K,N),ie=Zw(q,ie+b+g,A?ie+ee:this.right,e.rtl),E(d.x(ie),K,N),A)_.x+=ee+f;else if(typeof N.text!="string"){const me=h.lineHeight;_.y+=m2(N,me)+f}else _.y+=T}),tg(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=Qt(n.font),s=vn(n.padding);if(!n.display)return;const a=Va(e.rtl,this.left,this.width),o=this.ctx,c=n.position,d=i.size/2,h=s.top+d;let f,m=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),f=this.top+h,m=yn(e.align,m,this.right-g);else{const b=this.columnSizes.reduce((w,C)=>Math.max(w,C.height),0);f=h+yn(e.align,this.top,this.bottom-b-e.labels.padding-this._computeTitleHeight())}const _=yn(c,m,m+g);o.textAlign=a.textAlign(R1(c)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Ir(o,n.text,_,f,i)}_computeTitleHeight(){const e=this.options.title,n=Qt(e.font),i=vn(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,a;if(_s(e,this.left,this.right)&&_s(n,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(s=a[i],_s(e,s.left,s.left+s.width)&&_s(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(e){const n=this.options;if(!Bx(e.type,n))return;const i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,a=Ox(s,i);s&&!a&&Mt(n.onLeave,[e,s,this],this),this._hoveredItem=i,i&&!a&&Mt(n.onHover,[e,i,this],this)}else i&&Mt(n.onClick,[e,i,this],this)}}function Dx(t,e,n,i,s){const a=Ex(i,t,e,n),o=Vx(s,i,e.lineHeight);return{itemWidth:a,itemHeight:o}}function Ex(t,e,n,i){let s=t.text;return s&&typeof s!="string"&&(s=s.reduce((a,o)=>a.length>o.length?a:o)),e+n.size/2+i.measureText(s).width}function Vx(t,e,n){let i=t;return typeof e.text!="string"&&(i=m2(e,n)),i}function m2(t,e){const n=t.text?t.text.length:0;return e*n}function Bx(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Tx={id:"legend",_element:p2,start(t,e,n){const i=t.legend=new p2({ctx:t.ctx,options:n,chart:t});bn.configure(t,i,n),bn.addBox(t,i)},stop(t){bn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;bn.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:a,useBorderRadius:o,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const h=d.controller.getStyle(n?0:void 0),f=vn(h.borderWidth);return{text:e[d.index].label,fillStyle:h.backgroundColor,fontColor:a,hidden:!d.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:h.borderColor,pointStyle:i||h.pointStyle,rotation:h.rotation,textAlign:s||h.textAlign,borderRadius:o&&(c||h.borderRadius),datasetIndex:d.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class mh extends Ai{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const s=Et(i.text)?i.text.length:1;this._padding=vn(i.padding);const a=s*Qt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:s,right:a,options:o}=this,c=o.align;let d=0,h,f,m;return this.isHorizontal()?(f=yn(c,i,a),m=n+e,h=a-i):(o.position==="left"?(f=i+e,m=yn(c,s,n),d=Vt*-.5):(f=a-e,m=yn(c,n,s),d=Vt*.5),h=s-n),{titleX:f,titleY:m,maxWidth:h,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=Qt(n.font),a=i.lineHeight/2+this._padding.top,{titleX:o,titleY:c,maxWidth:d,rotation:h}=this._drawArgs(a);Ir(e,n.text,0,0,i,{color:n.color,maxWidth:d,rotation:h,textAlign:R1(n.align),textBaseline:"middle",translation:[o,c]})}}function Ix(t,e){const n=new mh({ctx:t.ctx,options:e,chart:t});bn.configure(t,n,e),bn.addBox(t,n),t.titleBlock=n}var Ax={id:"title",_element:mh,start(t,e,n){Ix(t,n)},stop(t){const e=t.titleBlock;bn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;bn.configure(t,i,n),i.options=n},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}};const gd=new WeakMap;var $x={id:"subtitle",start(t,e,n){const i=new mh({ctx:t.ctx,options:n,chart:t});bn.configure(t,i,n),bn.addBox(t,i),gd.set(t,i)},stop(t){bn.removeBox(t,gd.get(t)),gd.delete(t)},beforeUpdate(t,e,n){const i=gd.get(t);bn.configure(t,i,n),i.options=n},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}};const Sl={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,a=0;for(e=0,n=t.length;e<n;++e){const c=t[e].element;if(c&&c.hasValue()){const d=c.tooltipPosition();i.add(d.x),s+=d.y,++a}}return{x:[...i].reduce((c,d)=>c+d)/i.size,y:s/a}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,s=Number.POSITIVE_INFINITY,a,o,c;for(a=0,o=t.length;a<o;++a){const d=t[a].element;if(d&&d.hasValue()){const h=d.getCenterPoint(),f=L1(e,h);f<s&&(s=f,c=d)}}if(c){const d=c.tooltipPosition();n=d.x,i=d.y}return{x:n,y:i}}};function es(t,e){return e&&(Et(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ws(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
37
37
|
`)>-1?t.split(`
|
|
38
|
-
`):t}function Nx(t,e){const{element:n,datasetIndex:i,index:s}=e,a=t.getDatasetMeta(i).controller,{label:o,value:c}=a.getLabelAndValue(s);return{chart:t,label:o,parsed:a.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:c,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function g2(t,e){const n=t.chart.ctx,{body:i,footer:s,title:a}=t,{boxWidth:o,boxHeight:c}=e,d=Qt(e.bodyFont),h=Qt(e.titleFont),f=Qt(e.footerFont),m=a.length,g=s.length,_=i.length,b=vn(e.padding);let w=b.height,C=0,S=i.reduce((x,T)=>x+T.before.length+T.lines.length+T.after.length,0);if(S+=t.beforeBody.length+t.afterBody.length,m&&(w+=m*h.lineHeight+(m-1)*e.titleSpacing+e.titleMarginBottom),S){const x=e.displayColors?Math.max(c,d.lineHeight):d.lineHeight;w+=_*x+(S-_)*d.lineHeight+(S-1)*e.bodySpacing}g&&(w+=e.footerMarginTop+g*f.lineHeight+(g-1)*e.footerSpacing);let E=0;const A=function(x){C=Math.max(C,n.measureText(x).width+E)};return n.save(),n.font=h.string,ut(t.title,A),n.font=d.string,ut(t.beforeBody.concat(t.afterBody),A),E=e.displayColors?o+2+e.boxPadding:0,ut(i,x=>{ut(x.before,A),ut(x.lines,A),ut(x.after,A)}),E=0,n.font=f.string,ut(t.footer,A),n.restore(),C+=b.width,{width:C,height:w}}function zx(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function Px(t,e,n,i){const{x:s,width:a}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&s+a+o>e.width||t==="right"&&s-a-o<0)return!0}function Lx(t,e,n,i){const{x:s,width:a}=n,{width:o,chartArea:{left:c,right:d}}=t;let h="center";return i==="center"?h=s<=(c+d)/2?"left":"right":s<=a/2?h="left":s>=o-a/2&&(h="right"),Px(h,t,e,n)&&(h="center"),h}function _2(t,e,n){const i=n.yAlign||e.yAlign||zx(t,n);return{xAlign:n.xAlign||e.xAlign||Lx(t,e,n,i),yAlign:i}}function Fx(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function Rx(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function y2(t,e,n,i){const{caretSize:s,caretPadding:a,cornerRadius:o}=t,{xAlign:c,yAlign:d}=n,h=s+a,{topLeft:f,topRight:m,bottomLeft:g,bottomRight:_}=Ar(o);let b=Fx(e,c);const w=Rx(e,d,h);return d==="center"?c==="left"?b+=h:c==="right"&&(b-=h):c==="left"?b-=Math.max(f,g)+s:c==="right"&&(b+=Math.max(m,_)+s),{x:dn(b,0,i.width-e.width),y:dn(w,0,i.height-e.height)}}function _d(t,e,n){const i=vn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function v2(t){return es([],ws(t))}function Hx(t,e,n){return Xs(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function b2(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const w2={beforeTitle:gs,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:gs,beforeBody:gs,beforeLabel:gs,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Je(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:gs,afterBody:gs,beforeFooter:gs,footer:gs,afterFooter:gs};function Rn(t,e,n,i){const s=t[e].call(n,i);return typeof s>"u"?w2[e].call(n,i):s}class gh extends Ai{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,a=new cg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Hx(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=Rn(i,"beforeTitle",this,e),a=Rn(i,"title",this,e),o=Rn(i,"afterTitle",this,e);let c=[];return c=es(c,ws(s)),c=es(c,ws(a)),c=es(c,ws(o)),c}getBeforeBody(e,n){return v2(Rn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return ut(e,a=>{const o={before:[],lines:[],after:[]},c=b2(i,a);es(o.before,ws(Rn(c,"beforeLabel",this,a))),es(o.lines,Rn(c,"label",this,a)),es(o.after,ws(Rn(c,"afterLabel",this,a))),s.push(o)}),s}getAfterBody(e,n){return v2(Rn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=Rn(i,"beforeFooter",this,e),a=Rn(i,"footer",this,e),o=Rn(i,"afterFooter",this,e);let c=[];return c=es(c,ws(s)),c=es(c,ws(a)),c=es(c,ws(o)),c}_createItems(e){const n=this._active,i=this.chart.data,s=[],a=[],o=[];let c=[],d,h;for(d=0,h=n.length;d<h;++d)c.push(Nx(this.chart,n[d]));return e.filter&&(c=c.filter((f,m,g)=>e.filter(f,m,g,i))),e.itemSort&&(c=c.sort((f,m)=>e.itemSort(f,m,i))),ut(c,f=>{const m=b2(e.callbacks,f);s.push(Rn(m,"labelColor",this,f)),a.push(Rn(m,"labelPointStyle",this,f)),o.push(Rn(m,"labelTextColor",this,f))}),this.labelColors=s,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=c,c}update(e,n){const i=this.options.setContext(this.getContext()),s=this._active;let a,o=[];if(!s.length)this.opacity!==0&&(a={opacity:0});else{const c=Sl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const d=this._size=g2(this,i),h=Object.assign({},c,d),f=_2(this.chart,i,h),m=y2(i,h,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,a={opacity:1,x:m.x,y:m.y,width:d.width,height:d.height,caretX:c.x,caretY:c.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,s){const a=this.getCaretPosition(e,i,s);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,i){const{xAlign:s,yAlign:a}=this,{caretSize:o,cornerRadius:c}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:m}=Ar(c),{x:g,y:_}=e,{width:b,height:w}=n;let C,S,E,A,x,T;return a==="center"?(x=_+w/2,s==="left"?(C=g,S=C-o,A=x+o,T=x-o):(C=g+b,S=C+o,A=x-o,T=x+o),E=C):(s==="left"?S=g+Math.max(d,f)+o:s==="right"?S=g+b-Math.max(h,m)-o:S=this.caretX,a==="top"?(A=_,x=A-o,C=S-o,E=S+o):(A=_+w,x=A+o,C=S+o,E=S-o),T=A),{x1:C,x2:S,x3:E,y1:A,y2:x,y3:T}}drawTitle(e,n,i){const s=this.title,a=s.length;let o,c,d;if(a){const h=Va(i.rtl,this.x,this.width);for(e.x=_d(this,i.titleAlign,i),n.textAlign=h.textAlign(i.titleAlign),n.textBaseline="middle",o=Qt(i.titleFont),c=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,d=0;d<a;++d)n.fillText(s[d],h.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+c,d+1===a&&(e.y+=i.titleMarginBottom-c)}}_drawColorBox(e,n,i,s,a){const o=this.labelColors[i],c=this.labelPointStyles[i],{boxHeight:d,boxWidth:h}=a,f=Qt(a.bodyFont),m=_d(this,"left",a),g=s.x(m),_=d<f.lineHeight?(f.lineHeight-d)/2:0,b=n.y+_;if(a.usePointStyle){const w={radius:Math.min(h,d)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},C=s.leftForLtr(g,h)+h/2,S=b+d/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,U1(e,w,C,S),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,U1(e,w,C,S)}else{e.lineWidth=qe(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const w=s.leftForLtr(g,h),C=s.leftForLtr(s.xPlus(g,1),h-2),S=Ar(o.borderRadius);Object.values(S).some(E=>E!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,hl(e,{x:w,y:b,w:h,h:d,radius:S}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),hl(e,{x:C,y:b+1,w:h-2,h:d-2,radius:S}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(w,b,h,d),e.strokeRect(w,b,h,d),e.fillStyle=o.backgroundColor,e.fillRect(C,b+1,h-2,d-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:s}=this,{bodySpacing:a,bodyAlign:o,displayColors:c,boxHeight:d,boxWidth:h,boxPadding:f}=i,m=Qt(i.bodyFont);let g=m.lineHeight,_=0;const b=Va(i.rtl,this.x,this.width),w=function(F){n.fillText(F,b.x(e.x+_),e.y+g/2),e.y+=g+a},C=b.textAlign(o);let S,E,A,x,T,N,L;for(n.textAlign=o,n.textBaseline="middle",n.font=m.string,e.x=_d(this,C,i),n.fillStyle=i.bodyColor,ut(this.beforeBody,w),_=c&&C!=="right"?o==="center"?h/2+f:h+2+f:0,x=0,N=s.length;x<N;++x){for(S=s[x],E=this.labelTextColors[x],n.fillStyle=E,ut(S.before,w),A=S.lines,c&&A.length&&(this._drawColorBox(n,e,x,b,i),g=Math.max(m.lineHeight,d)),T=0,L=A.length;T<L;++T)w(A[T]),g=m.lineHeight;ut(S.after,w)}_=0,g=m.lineHeight,ut(this.afterBody,w),e.y-=a}drawFooter(e,n,i){const s=this.footer,a=s.length;let o,c;if(a){const d=Va(i.rtl,this.x,this.width);for(e.x=_d(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=d.textAlign(i.footerAlign),n.textBaseline="middle",o=Qt(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,c=0;c<a;++c)n.fillText(s[c],d.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+i.footerSpacing}}drawBackground(e,n,i,s){const{xAlign:a,yAlign:o}=this,{x:c,y:d}=e,{width:h,height:f}=i,{topLeft:m,topRight:g,bottomLeft:_,bottomRight:b}=Ar(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(c+m,d),o==="top"&&this.drawCaret(e,n,i,s),n.lineTo(c+h-g,d),n.quadraticCurveTo(c+h,d,c+h,d+g),o==="center"&&a==="right"&&this.drawCaret(e,n,i,s),n.lineTo(c+h,d+f-b),n.quadraticCurveTo(c+h,d+f,c+h-b,d+f),o==="bottom"&&this.drawCaret(e,n,i,s),n.lineTo(c+_,d+f),n.quadraticCurveTo(c,d+f,c,d+f-_),o==="center"&&a==="left"&&this.drawCaret(e,n,i,s),n.lineTo(c,d+m),n.quadraticCurveTo(c,d,c+m,d),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){const o=Sl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const c=this._size=g2(this,e),d=Object.assign({},o,this._size),h=_2(n,e,d),f=y2(e,d,h,n);(s._to!==f.x||a._to!==f.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=c.width,this.height=c.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=vn(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=i,this.drawBackground(a,e,s,n),eg(e,n.textDirection),a.y+=o.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),tg(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,s=e.map(({datasetIndex:c,index:d})=>{const h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:h.data[d],index:d}}),a=!Wc(i,s),o=this._positionChanged(s,n);(a||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,a=this._active||[],o=this._getActiveElements(e,a,n,i),c=this._positionChanged(o,e),d=n||!Wc(o,a)||c;return d&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,i,s){const a=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:s,options:a}=this,o=Sl[a.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}ae(gh,"positioners",Sl);var Wx={id:"tooltip",_element:gh,positioners:Sl,afterInit(t,e,n){n&&(t.tooltip=new gh({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:w2},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Yx=Object.freeze({__proto__:null,Colors:nx,Decimation:ax,Filler:Mx,Legend:Tx,SubTitle:$x,Title:Ax,Tooltip:Wx});const jx=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function Ux(t,e,n,i){const s=t.indexOf(e);if(s===-1)return jx(t,e,n,i);const a=t.lastIndexOf(e);return s!==a?n:s}const qx=(t,e)=>t===null?null:dn(Math.round(t),0,e);function k2(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class _h extends Lr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:a}of n)i[s]===a&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Je(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:Ux(i,e,$e(n,e),this._addedLabels),qx(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,s=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=n;o++)s.push({value:o});return s}getLabelForValue(e){return k2.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ae(_h,"id","category"),ae(_h,"defaults",{ticks:{callback:k2}});function Gx(t,e){const n=[],{bounds:s,step:a,min:o,max:c,precision:d,count:h,maxTicks:f,maxDigits:m,includeBounds:g}=t,_=a||1,b=f-1,{min:w,max:C}=e,S=!Je(o),E=!Je(c),A=!Je(h),x=(C-w)/(m+1);let T=Sm((C-w)/b/_)*_,N,L,F,q;if(T<1e-14&&!S&&!E)return[{value:w},{value:C}];q=Math.ceil(C/T)-Math.floor(w/T),q>b&&(T=Sm(q*T/b/_)*_),Je(d)||(N=Math.pow(10,d),T=Math.ceil(T*N)/N),s==="ticks"?(L=Math.floor(w/T)*T,F=Math.ceil(C/T)*T):(L=w,F=C),S&&E&&a&&Ww((c-o)/a,T/1e3)?(q=Math.round(Math.min((c-o)/T,f)),T=(c-o)/q,L=o,F=c):A?(L=S?o:L,F=E?c:F,q=h-1,T=(F-L)/q):(q=(F-L)/T,ol(q,Math.round(q),T/1e3)?q=Math.round(q):q=Math.ceil(q));const ee=Math.max(Om(T),Om(L));N=Math.pow(10,Je(d)?ee:d),L=Math.round(L*N)/N,F=Math.round(F*N)/N;let ie=0;for(S&&(g&&L!==o?(n.push({value:o}),L<o&&ie++,ol(Math.round((L+ie*T)*N)/N,o,C2(o,x,t))&&ie++):L<o&&ie++);ie<q;++ie){const K=Math.round((L+ie*T)*N)/N;if(E&&K>c)break;n.push({value:K})}return E&&g&&F!==c?n.length&&ol(n[n.length-1].value,c,C2(c,x,t))?n[n.length-1].value=c:n.push({value:c}):(!E||F===c)&&n.push({value:F}),n}function C2(t,e,{horizontal:n,minRotation:i}){const s=Ti(i),a=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class yd extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Je(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this;const o=d=>s=n?s:d,c=d=>a=i?a:d;if(e){const d=Ji(s),h=Ji(a);d<0&&h<0?c(0):d>0&&h>0&&o(0)}if(s===a){let d=a===0?1:Math.abs(a*.05);c(a+d),e||o(s-d)}this.min=s,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,o=Gx(s,a);return e.bounds==="ticks"&&Mm(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-n)/Math.max(e.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return dl(e,this.chart.options.locale,this.options.ticks.format)}}class yh extends yd{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Ht(e)?e:0,this.max=Ht(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=Ti(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ae(yh,"id","linear"),ae(yh,"defaults",{ticks:{callback:qc.formatters.numeric}});const Ml=t=>Math.floor(Zs(t)),Fr=(t,e)=>Math.pow(10,Ml(t)+e);function x2(t){return t/Math.pow(10,Ml(t))===1}function S2(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function Kx(t,e){const n=e-t;let i=Ml(n);for(;S2(t,e,i)>10;)i++;for(;S2(t,e,i)<10;)i--;return Math.min(i,Ml(t))}function Zx(t,{min:e,max:n}){e=ei(t.min,e);const i=[],s=Ml(e);let a=Kx(e,n),o=a<0?Math.pow(10,Math.abs(a)):1;const c=Math.pow(10,a),d=s>a?Math.pow(10,s):0,h=Math.round((e-d)*o)/o,f=Math.floor((e-d)/c/10)*c*10;let m=Math.floor((h-f)/Math.pow(10,a)),g=ei(t.min,Math.round((d+f+m*Math.pow(10,a))*o)/o);for(;g<n;)i.push({value:g,major:x2(g),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(a++,m=2,o=a>=0?1:o),g=Math.round((d+f+m*Math.pow(10,a))*o)/o;const _=ei(t.max,g);return i.push({value:_,major:x2(_),significand:m}),i}class vh extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=yd.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Ht(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Ht(e)?Math.max(0,e):null,this.max=Ht(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ht(this._userMin)&&(this.min=e===Fr(this.min,0)?Fr(this.min,-1):Fr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const a=c=>i=e?i:c,o=c=>s=n?s:c;i===s&&(i<=0?(a(1),o(10)):(a(Fr(i,-1)),o(Fr(s,1)))),i<=0&&a(Fr(s,-1)),s<=0&&o(Fr(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=Zx(n,this);return e.bounds==="ticks"&&Mm(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":dl(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Zs(e),this._valueRange=Zs(this.max)-Zs(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Zs(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ae(vh,"id","logarithmic"),ae(vh,"defaults",{ticks:{callback:qc.formatters.logarithmic,major:{enabled:!0}}});function bh(t){const e=t.ticks;if(e.display&&t.display){const n=vn(e.backdropPadding);return $e(e.font&&e.font.size,Wt.font.size)+n.height}return 0}function Xx(t,e,n){return n=Et(n)?n:[n],{w:a9(t,e.string,n),h:n.length*e.lineHeight}}function M2(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:t<i||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function Jx(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],a=t._pointLabels.length,o=t.options.pointLabels,c=o.centerPointLabels?Vt/a:0;for(let d=0;d<a;d++){const h=o.setContext(t.getPointLabelContext(d));s[d]=h.padding;const f=t.getPointPosition(d,t.drawingArea+s[d],c),m=Qt(h.font),g=Xx(t.ctx,m,t._pointLabels[d]);i[d]=g;const _=ti(t.getIndexAngle(d)+c),b=Math.round(P1(_)),w=M2(b,f.x,g.w,0,180),C=M2(b,f.y,g.h,90,270);Qx(n,e,_,w,C)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=nS(t,i,s)}function Qx(t,e,n,i,s){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let c=0,d=0;i.start<e.l?(c=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-c)):i.end>e.r&&(c=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+c)),s.start<e.t?(d=(e.t-s.start)/o,t.t=Math.min(t.t,e.t-d)):s.end>e.b&&(d=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+d))}function eS(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:a,padding:o,size:c}=n,d=t.getPointPosition(e,i+s+o,a),h=Math.round(P1(ti(d.angle+Ut))),f=rS(d.y,c.h,h),m=iS(h),g=sS(d.x,c.w,m);return{visible:!0,x:d.x,y:f,textAlign:m,left:g,top:f,right:g+c.w,bottom:f+c.h}}function tS(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:a}=t;return!(vs({x:n,y:i},e)||vs({x:n,y:a},e)||vs({x:s,y:i},e)||vs({x:s,y:a},e))}function nS(t,e,n){const i=[],s=t._pointLabels.length,a=t.options,{centerPointLabels:o,display:c}=a.pointLabels,d={extra:bh(a)/2,additionalAngle:o?Vt/s:0};let h;for(let f=0;f<s;f++){d.padding=n[f],d.size=e[f];const m=eS(t,f,d);i.push(m),c==="auto"&&(m.visible=tS(m,h),m.visible&&(h=m))}return i}function iS(t){return t===0||t===180?"center":t<180?"left":"right"}function sS(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function rS(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function aS(t,e,n){const{left:i,top:s,right:a,bottom:o}=n,{backdropColor:c}=e;if(!Je(c)){const d=Ar(e.borderRadius),h=vn(e.backdropPadding);t.fillStyle=c;const f=i-h.left,m=s-h.top,g=a-i+h.width,_=o-s+h.height;Object.values(d).some(b=>b!==0)?(t.beginPath(),hl(t,{x:f,y:m,w:g,h:_,radius:d}),t.fill()):t.fillRect(f,m,g,_)}}function oS(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const a=t._pointLabelItems[s];if(!a.visible)continue;const o=i.setContext(t.getPointLabelContext(s));aS(n,o,a);const c=Qt(o.font),{x:d,y:h,textAlign:f}=a;Ir(n,t._pointLabels[s],d,h+c.lineHeight/2,c,{color:o.color,textAlign:f,textBaseline:"middle"})}}function O2(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Bt);else{let a=t.getPointPosition(0,e);s.moveTo(a.x,a.y);for(let o=1;o<i;o++)a=t.getPointPosition(o,e),s.lineTo(a.x,a.y)}}function lS(t,e,n,i,s){const a=t.ctx,o=e.circular,{color:c,lineWidth:d}=e;!o&&!i||!c||!d||n<0||(a.save(),a.strokeStyle=c,a.lineWidth=d,a.setLineDash(s.dash),a.lineDashOffset=s.dashOffset,a.beginPath(),O2(t,n,o,i),a.closePath(),a.stroke(),a.restore())}function cS(t,e,n){return Xs(t,{label:n,index:e,type:"pointLabel"})}class Ol extends yd{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=vn(bh(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=Ht(e)&&!isNaN(e)?e:0,this.max=Ht(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/bh(this.options))}generateTickLabels(e){yd.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const s=Mt(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?Jx(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,s))}getIndexAngle(e){const n=Bt/(this._pointLabels.length||1),i=this.options.startAngle||0;return ti(e*n+Ti(i))}getDistanceFromCenterForValue(e){if(Je(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Je(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const i=n[e];return cS(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const s=this.getIndexAngle(e)-Ut+i;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:i,right:s,bottom:a}=this._pointLabelItems[e];return{left:n,top:i,right:s,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),O2(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:s,border:a}=n,o=this._pointLabels.length;let c,d,h;if(n.pointLabels.display&&oS(this,o),s.display&&this.ticks.forEach((f,m)=>{if(m!==0||m===0&&this.min<0){d=this.getDistanceFromCenterForValue(f.value);const g=this.getContext(m),_=s.setContext(g),b=a.setContext(g);lS(this,_,d,o,b)}}),i.display){for(e.save(),c=o-1;c>=0;c--){const f=i.setContext(this.getPointLabelContext(c)),{color:m,lineWidth:g}=f;!g||!m||(e.lineWidth=g,e.strokeStyle=m,e.setLineDash(f.borderDash),e.lineDashOffset=f.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),h=this.getPointPosition(c,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(h.x,h.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let a,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const h=i.setContext(this.getContext(d)),f=Qt(h.font);if(a=this.getDistanceFromCenterForValue(this.ticks[d].value),h.showLabelBackdrop){e.font=f.string,o=e.measureText(c.label).width,e.fillStyle=h.backdropColor;const m=vn(h.backdropPadding);e.fillRect(-o/2-m.left,-a-f.size/2-m.top,o+m.width,f.size+m.height)}Ir(e,c.label,0,-a,f,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),e.restore()}drawTitle(){}}ae(Ol,"id","radialLinear"),ae(Ol,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:qc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),ae(Ol,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ae(Ol,"descriptors",{angleLines:{_fallback:"grid"}});const vd={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}},Hn=Object.keys(vd);function D2(t,e){return t-e}function E2(t,e){if(Je(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:a}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Ht(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Oa(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,s)),+o)}function V2(t,e,n,i){const s=Hn.length;for(let a=Hn.indexOf(t);a<s-1;++a){const o=vd[Hn[a]],c=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(c*o.size))<=i)return Hn[a]}return Hn[s-1]}function dS(t,e,n,i,s){for(let a=Hn.length-1;a>=Hn.indexOf(n);a--){const o=Hn[a];if(vd[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return Hn[n?Hn.indexOf(n):0]}function uS(t){for(let e=Hn.indexOf(t)+1,n=Hn.length;e<n;++e)if(vd[Hn[e]].common)return Hn[e]}function B2(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:s}=F1(n,e),a=n[i]>=e?n[i]:n[s];t[a]=!0}}function hS(t,e,n,i){const s=t._adapter,a=+s.startOf(e[0].value,i),o=e[e.length-1].value;let c,d;for(c=a;c<=o;c=+s.add(c,1,i))d=n[c],d>=0&&(e[d].major=!0);return e}function T2(t,e,n){const i=[],s={},a=e.length;let o,c;for(o=0;o<a;++o)c=e[o],s[c]=o,i.push({value:c,major:!1});return a===0||!n?i:hS(t,i,s,n)}class Dl extends Lr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const i=e.time||(e.time={}),s=this._adapter=new wg._date(e.adapters.date);s.init(n),rl(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:E2(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:s,max:a,minDefined:o,maxDefined:c}=this.getUserBounds();function d(h){!o&&!isNaN(h.min)&&(s=Math.min(s,h.min)),!c&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!o||!c)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),s=Ht(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),a=Ht(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const a=this.min,o=this.max,c=qw(s,a,o);return this._unit=n.unit||(i.autoSkip?V2(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):dS(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:uS(this._unit),this.initOffsets(s),e.reverse&&c.reverse(),T2(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,i=0,s,a;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?i=a:i=(a-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=dn(n,0,o),i=dn(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,s=this.options,a=s.time,o=a.unit||V2(a.minUnit,n,i,this._getLabelCapacity(n)),c=$e(s.ticks.stepSize,1),d=o==="week"?a.isoWeekday:!1,h=Oa(d)||d===!0,f={};let m=n,g,_;if(h&&(m=+e.startOf(m,"isoWeek",d)),m=+e.startOf(m,h?"day":o),e.diff(i,n,o)>1e5*c)throw new Error(n+" and "+i+" are too far apart with stepSize of "+c+" "+o);const b=s.ticks.source==="data"&&this.getDataTimestamps();for(g=m,_=0;g<i;g=+e.add(g,c,o),_++)B2(f,g,b);return(g===i||s.bounds==="ticks"||_===1)&&B2(f,g,b),Object.keys(f).sort(D2).map(w=>+w)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,a=this._unit,o=n||s[a];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,s){const a=this.options,o=a.ticks.callback;if(o)return Mt(o,[e,n,i],this);const c=a.time.displayFormats,d=this._unit,h=this._majorUnit,f=d&&c[d],m=h&&c[h],g=i[n],_=h&&m&&g&&g.major;return this._adapter.format(e,s||(_?m:f))}generateTickLabels(e){let n,i,s;for(n=0,i=e.length;n<i;++n)s=e[n],s.label=this._tickFormatFunction(s.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,s=Ti(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(s),o=Math.sin(s),c=this._resolveTickFontOptions(0).size;return{w:i*a+c*o,h:i*o+c*a}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,a=this._tickFormatFunction(e,0,T2(this,[e],this._majorUnit),s),o=this._getLabelSize(a),c=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)e=e.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)e.push(E2(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Bm(e.sort(D2))}}ae(Dl,"id","time"),ae(Dl,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function bd(t,e,n){let i=0,s=t.length-1,a,o,c,d;n?(e>=t[i].pos&&e<=t[s].pos&&({lo:i,hi:s}=ys(t,"pos",e)),{pos:a,time:c}=t[i],{pos:o,time:d}=t[s]):(e>=t[i].time&&e<=t[s].time&&({lo:i,hi:s}=ys(t,"time",e)),{time:a,pos:c}=t[i],{time:o,pos:d}=t[s]);const h=o-a;return h?c+(d-c)*(e-a)/h:c}class wh extends Dl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=bd(n,this.min),this._tableRange=bd(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,s=[],a=[];let o,c,d,h,f;for(o=0,c=e.length;o<c;++o)h=e[o],h>=n&&h<=i&&s.push(h);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,c=s.length;o<c;++o)f=s[o+1],d=s[o-1],h=s[o],Math.round((f+d)/2)!==h&&a.push({time:h,pos:o/(c-1)});return a}_generate(){const e=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((s,a)=>s-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(bd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return bd(this._table,i*this._tableRange+this._minPos,!0)}}ae(wh,"id","timeseries"),ae(wh,"defaults",Dl.defaults);var fS=Object.freeze({__proto__:null,CategoryScale:_h,LinearScale:yh,LogarithmicScale:vh,RadialLinearScale:Ol,TimeScale:Dl,TimeSeriesScale:wh});const kh=[wk,ZC,Yx,fS],I2={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},pS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...I2,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},mS=r.version[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Ia(t){return r.isProxy(t)?r.toRaw(t):t}function gS(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return r.isProxy(e)?new Proxy(t,{}):t}function _S(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function A2(t,e){t.labels=e}function $2(t,e,n){const i=[];t.datasets=e.map(s=>{const a=t.datasets.find(o=>o[n]===s[n]);return!a||!s.data||i.includes(a)?{...s}:(i.push(a),Object.assign(a,s),a)})}function yS(t,e){const n={labels:[],datasets:[]};return A2(n,t.labels),$2(n,t.datasets,e),n}const vS=r.defineComponent({props:pS,setup(t,e){let{expose:n,slots:i}=e;const s=r.ref(null),a=r.shallowRef(null);n({chart:a});const o=()=>{if(!s.value)return;const{type:h,data:f,options:m,plugins:g,datasetIdKey:_}=t,b=yS(f,_),w=gS(b,f);a.value=new mi(s.value,{type:h,data:w,options:{...m},plugins:g})},c=()=>{const h=r.toRaw(a.value);h&&(t.destroyDelay>0?setTimeout(()=>{h.destroy(),a.value=null},t.destroyDelay):(h.destroy(),a.value=null))},d=h=>{h.update(t.updateMode)};return r.onMounted(o),r.onUnmounted(c),r.watch([()=>t.options,()=>t.data],(h,f)=>{let[m,g]=h,[_,b]=f;const w=r.toRaw(a.value);if(!w)return;let C=!1;if(m){const S=Ia(m),E=Ia(_);S&&S!==E&&(_S(w,S),C=!0)}if(g){const S=Ia(g.labels),E=Ia(b.labels),A=Ia(g.datasets),x=Ia(b.datasets);S!==E&&(A2(w.config.data,S),C=!0),A&&A!==x&&($2(w.config.data,A,t.datasetIdKey),C=!0)}C&&r.nextTick(()=>{d(w)})},{deep:!0}),()=>r.h("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[r.h("p",{},[i.default?i.default():""])])}});function El(t,e){return mi.register(e),r.defineComponent({props:I2,setup(n,i){let{expose:s}=i;const a=r.shallowRef(null),o=c=>{a.value=c==null?void 0:c.chart};return s({chart:a}),()=>r.h(vS,mS({ref:o},{type:t,...n}))}})}const N2=El("bar",ml),z2=El("doughnut",Js),bS=El("line",gl),wS=El("pie",nd),kS=El("polarArea",Ba),Wn={gp50:"#f3fcf8",gp100:"#e2f8ef",gp200:"#abedd3",gp300:"#6ddfb1",gp400:"#2db981",gp500:"#239f6d",gp600:"#1c7d56",gp700:"#136746",ta50:"#eefcfa",ta100:"#dcf9f6",ta200:"#a2f1e5",ta300:"#51e6d0",ta400:"#20c5ad",ta500:"#18aa94",ta600:"#138675",ta700:"#0f6b5d",ts50:"#f5fbff",ts100:"#e6f6fe",ts200:"#C2EDFF",ts300:"#7BD0F4",ts400:"#42AAD7",ts500:"#1F86B2",ts600:"#18698B",ts700:"#155875",bn50:"#f6f9fe",bn100:"#e6effe",bn200:"#b4cdf8",bn300:"#729ee9",bn400:"#467bd8",bn500:"#2f64c1",bn600:"#2051a7",bn700:"#19438a",in50:"#f5f6ff",in100:"#ebefff",in200:"#CED6FD",in300:"#9bacf8",in400:"#6a7cd7",in500:"#4b5caf",in600:"#374486",in700:"#2f396f",vr50:"#faf5ff",vr100:"#f7f0ff",vr200:"#E6D2F9",vr300:"#CEABED",vr400:"#a772d5",vr500:"#8955B9",vr600:"#6B3A98",vr700:"#5c3082",pp50:"#fff5fb",pp100:"#ffebf7",pp200:"#F9C8E2",pp300:"#EF8FC0",pp400:"#DA629F",pp500:"#BE377C",pp600:"#A12663",pp700:"#88255a",rc50:"#fef6f7",rc100:"#ffebed",rc200:"#FABDC5",rc300:"#F98B98",rc400:"#F3596C",rc500:"#E03E52",rc600:"#C92C3F",rc700:"#b22435",og50:"#fef7f6",og100:"#ffefeb",og200:"#FFD6CC",og300:"#FDAF9B",og400:"#FF8567",og500:"#F06442",og600:"#D64B29",og700:"#bc4224",al50:"#fefbf6",al100:"#fdf3e2",al200:"#ffe5b8",al300:"#fdd286",al400:"#f6bd5a",al500:"#eda831",al600:"#d89013",al700:"#c08011",n0:"#FFFFFF",n10:"#FAFCFE",n20:"#F4F8FB",n30:"#E7EDF3",n40:"#DFE5EC",n50:"#D6DCE3",n100:"#C3CCD5",n200:"#ACB8C3",n300:"#99A6B2",n400:"#8794A1",n500:"#647382",n600:"#52616F",n700:"#3B4754",n800:"#28333E",n900:"#1D262F",palete:'["Light Neutrals", "Light", #FFFFFF, #FAFCFE, #F4F8FB, #E7EDF3, #DFE5EC, "$n-0", "$n-10", "$n-20", "$n-30", "$n-40"], ["Mid Neutrals", "Gray", #D6DCE3, #C3CCD5, #ACB8C3, #99A6B2, #8794A1, "$n-50", "$n-100", "$n-200", "$n-300", "$n-400"], ["Dark Neutrals", "Dark", #647382, #52616F, #3B4754, #28333E, #1D262F, "$n-500", "$n-600", "$n-700", "$n-800", "$n-900"], ["Piccolo Green", "Green", #f3fcf8, #e2f8ef, #abedd3, #6ddfb1, #2db981, #239f6d, #1c7d56, #136746, "$gp-50", "$gp-100", "$gp-200", "$gp-300", "$gp-400", "$gp-500", "$gp-600", "$gp-700"], ["Aquaman Teal", "Teal", #eefcfa, #dcf9f6, #a2f1e5, #51e6d0, #20c5ad, #18aa94, #138675, #0f6b5d, "$ta-50", "$ta-100", "$ta-200", "$ta-300", "$ta-400", "$ta-500", "$ta-600", "$ta-700"], ["Sulivan Turquoise", "Turquoise", #f5fbff, #e6f6fe, #C2EDFF, #7BD0F4, #42AAD7, #1F86B2, #18698B, #155875, "$ts-50", "$ts-100", "$ts-200", "$ts-300", "$ts-400", "$ts-500", "$ts-600", "$ts-700"], ["Nocturne Blue", "Blue", #f6f9fe, #e6effe, #b4cdf8, #729ee9, #467bd8, #2f64c1, #2051a7, #19438a, "$bn-50", "$bn-100", "$bn-200", "$bn-300", "$bn-400", "$bn-500", "$bn-600", "$bn-700"], ["Nightwing Indigo", "Indigo", #f5f6ff, #ebefff, #CED6FD, #9bacf8, #6a7cd7, #4b5caf, #374486, #2f396f, "$in-50", "$in-100", "$in-200", "$in-300", "$in-400", "$in-500", "$in-600", "$in-700"], ["Raven Violet", "Violet", #faf5ff, #f7f0ff, #E6D2F9, #CEABED, #a772d5, #8955B9, #6B3A98, #5c3082, "$vr-50", "$vr-100", "$vr-200", "$vr-300", "$vr-400", "$vr-500", "$vr-600", "$vr-700"], ["Peppa Pink", "Pink", #fff5fb, #ffebf7, #F9C8E2, #EF8FC0, #DA629F, #BE377C, #A12663, #88255a, "$pp-50", "$pp-100", "$pp-200", "$pp-300", "$pp-400", "$pp-500", "$pp-600", "$pp-700"], ["Carmen Red", "Red", #fef6f7, #ffebed, #FABDC5, #F98B98, #F3596C, #E03E52, #C92C3F, #b22435, "$rc-50", "$rc-100", "$rc-200", "$rc-300", "$rc-400", "$rc-500", "$rc-600", "$rc-700"], ["Goku Orange", "Orange", #fef7f6, #ffefeb, #FFD6CC, #FDAF9B, #FF8567, #F06442, #D64B29, #bc4224, "$og-50", "$og-100", "$og-200", "$og-300", "$og-400", "$og-500", "$og-600", "$og-700"], ["Lisa Amber", "Amber", #fefbf6, #fdf3e2, #ffe5b8, #fdd286, #f6bd5a, #eda831, #d89013, #c08011, "$al-50", "$al-100", "$al-200", "$al-300", "$al-400", "$al-500", "$al-600", "$al-700"]',chartThemes:'["Blue Theme", "Blue", #467bd8, #42AAD7, #20c5ad, #19438a, #4b5caf, #6ddfb1, #FFD6CC, #ffefeb, #ffe5b8, #fdd286, "$bn-400", "$ts-400", "$ta-400", "$bn-700", "$in-500", "$gp-300", "$og-200", "$og-100", "$al-200", "$al-300"], ["Indigo Theme", "Indigo", #4b5caf, #CEABED, #FDAF9B, #ffebf7, #FFD6CC, #6a7cd7, #E7EDF3, #EF8FC0, #a772d5, #3B4754, "$in-500", "$pp-100", "$og-200", "$vr-300", "$in-400", "$og-300", "$n-30", "$n-700", "$vr-400", "$pp-300"]'},ts=t=>{let e=[],n={};const i=/(\[[^[\]]*\])/g,s=t.match(i);for(let a=0;a<s.length;a++){s[a]=s[a].replace("[",""),s[a]=s[a].replace("]","");let o=s[a].split(",");n.colorName=o[0].trim().replace(/"/g,""),n.variantName=o[1].trim().replace(/"/g,""),n.color400=o[6],n.colorShades=[],n.colorTokens=[],n.colorData=[];let c=!1;for(let d=2,h=2;d<o.length;d++,h++)o[d].includes("#")?(n.colorShades.push(o[d].trim()),n.colorData[h-2]={},n.colorData[h-2].shade=o[d].trim()):o[d].includes("$")&&(n.colorTokens.push(o[d].trim().replace(/"/g,"")),n.colorData[h-2].token=o[d].trim().replace(/"/g,"")),!c&&o[d+1].includes("$")&&(h=1,c=!0);e.push(n),n={}}return e},Hue="";mi.register(...kh);const CS={components:{Bar:N2},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:t=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(t)},labels:{type:Array,required:!0,default:()=>[]},barWidth:{type:Number,default:1}},data(){return{sassColorVariables:Wn,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,maintainAspectRatio:!1,categoryPercentage:null,plugins:{tooltip:{callbacks:{beforeTitle:function(t){return`${t[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},watch:{labels:{handler(t){this.localLabels=t},immediate:!0},variant:{handler(t){t==="gray"||t==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(t){this.mergeChartDataNoSelect(t)},immediate:!0},barWidth:{handler(t){t>=.1&&t<=1?this.chartOptions.categoryPercentage=t:this.chartOptions.categoryPercentage=1},immediate:!0}},methods:{paleteBuilder:ts,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let t=0;t<this.palletColors.length;t++){const e=this.palletColors[t];this.deleteFirstTwoColors===!1&&(e.colorShades.splice(0,2),e.colorTokens.splice(0,2),e.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(t=>{t.datasets.forEach(e=>{e.name=t.name})})},mergeChartDataNoSelect(t){const e={labels:this.localLabels,datasets:[]};this.addDataSetNames(),t.forEach(i=>{i.datasets.forEach(s=>{const a={label:s.label,data:s.data,name:s.name,borderRadius:6};e.datasets.push(a)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(e.datasets,n),this.localChartData=e},generateBackgroundColor(){const t=this.variant.toLowerCase(),e=this.palletColors.find(n=>n.variantName.toLowerCase().includes(t));return e?e.colorShades:[]},setColors(t,e){const n={};this.chartOptions.plugins.legend.display=!0,t.forEach(i=>{const s=i.name;let a;t.length===1&&(a=2,n[s]=e[a],this.chartOptions.plugins.legend.display=!1),n[s]||(a=Object.keys(n).length%e.length,n[s]=e[a]),i.backgroundColor=n[s],i.borderRadius=6})}}},xS={class:"responsive-container"};function SS(t,e,n,i,s,a){const o=r.resolveComponent("Bar");return r.openBlock(),r.createElementBlock("span",null,[r.createElementVNode("div",xS,[r.createVNode(o,{is:"bar",data:s.localChartData,options:s.chartOptions},null,8,["data","options"])])])}const MS=te(CS,[["render",SS],["__scopeId","data-v-1e55dea1"]]);class Rr extends Error{}class OS extends Rr{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class DS extends Rr{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class ES extends Rr{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Aa extends Rr{}class P2 extends Rr{constructor(e){super(`Invalid unit ${e}`)}}class Yn extends Rr{}class tr extends Rr{constructor(){super("Zone is an abstract class")}}const ce="numeric",$i="short",ni="long",wd={year:ce,month:ce,day:ce},L2={year:ce,month:$i,day:ce},VS={year:ce,month:$i,day:ce,weekday:$i},F2={year:ce,month:ni,day:ce},R2={year:ce,month:ni,day:ce,weekday:ni},H2={hour:ce,minute:ce},W2={hour:ce,minute:ce,second:ce},Y2={hour:ce,minute:ce,second:ce,timeZoneName:$i},j2={hour:ce,minute:ce,second:ce,timeZoneName:ni},U2={hour:ce,minute:ce,hourCycle:"h23"},q2={hour:ce,minute:ce,second:ce,hourCycle:"h23"},G2={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:$i},K2={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:ni},Z2={year:ce,month:ce,day:ce,hour:ce,minute:ce},X2={year:ce,month:ce,day:ce,hour:ce,minute:ce,second:ce},J2={year:ce,month:$i,day:ce,hour:ce,minute:ce},Q2={year:ce,month:$i,day:ce,hour:ce,minute:ce,second:ce},BS={year:ce,month:$i,day:ce,weekday:$i,hour:ce,minute:ce},e3={year:ce,month:ni,day:ce,hour:ce,minute:ce,timeZoneName:$i},t3={year:ce,month:ni,day:ce,hour:ce,minute:ce,second:ce,timeZoneName:$i},n3={year:ce,month:ni,day:ce,weekday:ni,hour:ce,minute:ce,timeZoneName:ni},i3={year:ce,month:ni,day:ce,weekday:ni,hour:ce,minute:ce,second:ce,timeZoneName:ni};class Vl{get type(){throw new tr}get name(){throw new tr}get ianaName(){return this.name}get isUniversal(){throw new tr}offsetName(e,n){throw new tr}formatOffset(e,n){throw new tr}offset(e){throw new tr}equals(e){throw new tr}get isValid(){throw new tr}}let Ch=null;class kd extends Vl{static get instance(){return Ch===null&&(Ch=new kd),Ch}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:i}){return O3(e,n,i)}formatOffset(e,n){return Al(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let Cd={};function TS(t){return Cd[t]||(Cd[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Cd[t]}const IS={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function AS(t,e){const n=t.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,o,c,d,h,f]=i;return[o,s,a,c,d,h,f]}function $S(t,e){const n=t.formatToParts(e),i=[];for(let s=0;s<n.length;s++){const{type:a,value:o}=n[s],c=IS[a];a==="era"?i[c]=o:Be(c)||(i[c]=parseInt(o,10))}return i}let xd={};class ks extends Vl{static create(e){return xd[e]||(xd[e]=new ks(e)),xd[e]}static resetCache(){xd={},Cd={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ks.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:i}){return O3(e,n,i,this.name)}formatOffset(e,n){return Al(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const i=TS(this.name);let[s,a,o,c,d,h,f]=i.formatToParts?$S(i,n):AS(i,n);c==="BC"&&(s=-Math.abs(s)+1);const g=Ed({year:s,month:a,day:o,hour:d===24?0:d,minute:h,second:f,millisecond:0});let _=+n;const b=_%1e3;return _-=b>=0?b:1e3+b,(g-_)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let s3={};function NS(t,e={}){const n=JSON.stringify([t,e]);let i=s3[n];return i||(i=new Intl.ListFormat(t,e),s3[n]=i),i}let xh={};function Sh(t,e={}){const n=JSON.stringify([t,e]);let i=xh[n];return i||(i=new Intl.DateTimeFormat(t,e),xh[n]=i),i}let Mh={};function zS(t,e={}){const n=JSON.stringify([t,e]);let i=Mh[n];return i||(i=new Intl.NumberFormat(t,e),Mh[n]=i),i}let Oh={};function PS(t,e={}){const{base:n,...i}=e,s=JSON.stringify([t,i]);let a=Oh[s];return a||(a=new Intl.RelativeTimeFormat(t,e),Oh[s]=a),a}let Bl=null;function LS(){return Bl||(Bl=new Intl.DateTimeFormat().resolvedOptions().locale,Bl)}let r3={};function FS(t){let e=r3[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,r3[t]=e}return e}function RS(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let i,s;try{i=Sh(t).resolvedOptions(),s=t}catch{const d=t.substring(0,n);i=Sh(d).resolvedOptions(),s=d}const{numberingSystem:a,calendar:o}=i;return[s,a,o]}}function HS(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function WS(t){const e=[];for(let n=1;n<=12;n++){const i=ue.utc(2009,n,1);e.push(t(i))}return e}function YS(t){const e=[];for(let n=1;n<=7;n++){const i=ue.utc(2016,11,13+n);e.push(t(i))}return e}function Sd(t,e,n,i){const s=t.listingMode();return s==="error"?null:s==="en"?n(e):i(e)}function jS(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class US{constructor(e,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:a,...o}=i;if(!n||Object.keys(o).length>0){const c={useGrouping:!1,...i};i.padTo>0&&(c.minimumIntegerDigits=i.padTo),this.inf=zS(e,c)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):Ah(e,3);return Xt(n,this.padTo)}}}class qS{constructor(e,n,i){this.opts=i,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),c=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ks.create(c).valid?(s=c,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Sh(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class GS{constructor(e,n,i){this.opts={style:"long",...i},!n&&C3()&&(this.rtf=PS(e,i))}format(e,n){return this.rtf?this.rtf.format(e,n):pM(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const KS={firstDay:1,minimalDays:4,weekend:[6,7]};class yt{static fromOpts(e){return yt.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,i,s,a=!1){const o=e||qt.defaultLocale,c=o||(a?"en-US":LS()),d=n||qt.defaultNumberingSystem,h=i||qt.defaultOutputCalendar,f=Th(s)||qt.defaultWeekSettings;return new yt(c,d,h,f,o)}static resetCache(){Bl=null,xh={},Mh={},Oh={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:i,weekSettings:s}={}){return yt.create(e,n,i,s)}constructor(e,n,i,s,a){const[o,c,d]=RS(e);this.locale=o,this.numberingSystem=n||c||null,this.outputCalendar=i||d||null,this.weekSettings=s,this.intl=HS(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=jS(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:yt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Th(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return Sd(this,e,V3,()=>{const i=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=WS(a=>this.extract(a,i,"month"))),this.monthsCache[s][e]})}weekdays(e,n=!1){return Sd(this,e,I3,()=>{const i=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=n?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=YS(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Sd(this,void 0,()=>A3,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ue.utc(2016,11,13,9),ue.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Sd(this,e,$3,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[ue.utc(-40,1,1),ue.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[e]})}extract(e,n,i){const s=this.dtFormatter(e,n),a=s.formatToParts(),o=a.find(c=>c.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new US(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new qS(e,this.intl,n)}relFormatter(e={}){return new GS(this.intl,this.isEnglish(),e)}listFormatter(e={}){return NS(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:x3()?FS(this.locale):KS}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let Dh=null;class Vn extends Vl{static get utcInstance(){return Dh===null&&(Dh=new Vn(0)),Dh}static instance(e){return e===0?Vn.utcInstance:new Vn(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Vn(Vd(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Al(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Al(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Al(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class ZS extends Vl{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function nr(t,e){if(Be(t)||t===null)return e;if(t instanceof Vl)return t;if(QS(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?kd.instance:n==="utc"||n==="gmt"?Vn.utcInstance:Vn.parseSpecifier(n)||ks.create(t)}else return Hr(t)?Vn.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new ZS(t)}let a3=()=>Date.now(),o3="system",l3=null,c3=null,d3=null,u3=60,h3,f3=null;class qt{static get now(){return a3}static set now(e){a3=e}static set defaultZone(e){o3=e}static get defaultZone(){return nr(o3,kd.instance)}static get defaultLocale(){return l3}static set defaultLocale(e){l3=e}static get defaultNumberingSystem(){return c3}static set defaultNumberingSystem(e){c3=e}static get defaultOutputCalendar(){return d3}static set defaultOutputCalendar(e){d3=e}static get defaultWeekSettings(){return f3}static set defaultWeekSettings(e){f3=Th(e)}static get twoDigitCutoffYear(){return u3}static set twoDigitCutoffYear(e){u3=e%100}static get throwOnInvalid(){return h3}static set throwOnInvalid(e){h3=e}static resetCaches(){yt.resetCache(),ks.resetCache()}}class Ni{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const p3=[0,31,59,90,120,151,181,212,243,273,304,334],m3=[0,31,60,91,121,152,182,213,244,274,305,335];function gi(t,e){return new Ni("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Eh(t,e,n){const i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function g3(t,e,n){return n+(Tl(t)?m3:p3)[e-1]}function _3(t,e){const n=Tl(t)?m3:p3,i=n.findIndex(a=>a<e),s=e-n[i];return{month:i+1,day:s}}function Vh(t,e){return(t-e+7)%7+1}function Md(t,e=4,n=1){const{year:i,month:s,day:a}=t,o=g3(i,s,a),c=Vh(Eh(i,s,a),n);let d=Math.floor((o-c+14-e)/7),h;return d<1?(h=i-1,d=Il(h,e,n)):d>Il(i,e,n)?(h=i+1,d=1):h=i,{weekYear:h,weekNumber:d,weekday:c,...Td(t)}}function y3(t,e=4,n=1){const{weekYear:i,weekNumber:s,weekday:a}=t,o=Vh(Eh(i,1,e),n),c=Na(i);let d=s*7+a-o-7+e,h;d<1?(h=i-1,d+=Na(h)):d>c?(h=i+1,d-=Na(i)):h=i;const{month:f,day:m}=_3(h,d);return{year:h,month:f,day:m,...Td(t)}}function Bh(t){const{year:e,month:n,day:i}=t,s=g3(e,n,i);return{year:e,ordinal:s,...Td(t)}}function v3(t){const{year:e,ordinal:n}=t,{month:i,day:s}=_3(e,n);return{year:e,month:i,day:s,...Td(t)}}function b3(t,e){if(!Be(t.localWeekday)||!Be(t.localWeekNumber)||!Be(t.localWeekYear)){if(!Be(t.weekday)||!Be(t.weekNumber)||!Be(t.weekYear))throw new Aa("Cannot mix locale-based week fields with ISO-based week fields");return Be(t.localWeekday)||(t.weekday=t.localWeekday),Be(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Be(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function XS(t,e=4,n=1){const i=Od(t.weekYear),s=_i(t.weekNumber,1,Il(t.weekYear,e,n)),a=_i(t.weekday,1,7);return i?s?a?!1:gi("weekday",t.weekday):gi("week",t.weekNumber):gi("weekYear",t.weekYear)}function JS(t){const e=Od(t.year),n=_i(t.ordinal,1,Na(t.year));return e?n?!1:gi("ordinal",t.ordinal):gi("year",t.year)}function w3(t){const e=Od(t.year),n=_i(t.month,1,12),i=_i(t.day,1,Dd(t.year,t.month));return e?n?i?!1:gi("day",t.day):gi("month",t.month):gi("year",t.year)}function k3(t){const{hour:e,minute:n,second:i,millisecond:s}=t,a=_i(e,0,23)||e===24&&n===0&&i===0&&s===0,o=_i(n,0,59),c=_i(i,0,59),d=_i(s,0,999);return a?o?c?d?!1:gi("millisecond",s):gi("second",i):gi("minute",n):gi("hour",e)}function Be(t){return typeof t>"u"}function Hr(t){return typeof t=="number"}function Od(t){return typeof t=="number"&&t%1===0}function QS(t){return typeof t=="string"}function eM(t){return Object.prototype.toString.call(t)==="[object Date]"}function C3(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function x3(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function tM(t){return Array.isArray(t)?t:[t]}function S3(t,e,n){if(t.length!==0)return t.reduce((i,s)=>{const a=[e(s),s];return i&&n(i[0],a[0])===i[0]?i:a},null)[1]}function nM(t,e){return e.reduce((n,i)=>(n[i]=t[i],n),{})}function $a(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Th(t){if(t==null)return null;if(typeof t!="object")throw new Yn("Week settings must be an object");if(!_i(t.firstDay,1,7)||!_i(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!_i(e,1,7)))throw new Yn("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function _i(t,e,n){return Od(t)&&t>=e&&t<=n}function iM(t,e){return t-e*Math.floor(t/e)}function Xt(t,e=2){const n=t<0;let i;return n?i="-"+(""+-t).padStart(e,"0"):i=(""+t).padStart(e,"0"),i}function ir(t){if(!(Be(t)||t===null||t===""))return parseInt(t,10)}function Wr(t){if(!(Be(t)||t===null||t===""))return parseFloat(t)}function Ih(t){if(!(Be(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Ah(t,e,n=!1){const i=10**e;return(n?Math.trunc:Math.round)(t*i)/i}function Tl(t){return t%4===0&&(t%100!==0||t%400===0)}function Na(t){return Tl(t)?366:365}function Dd(t,e){const n=iM(e-1,12)+1,i=t+(e-n)/12;return n===2?Tl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ed(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function M3(t,e,n){return-Vh(Eh(t,1,e),n)+e-1}function Il(t,e=4,n=1){const i=M3(t,e,n),s=M3(t+1,e,n);return(Na(t)-i+s)/7}function $h(t){return t>99?t:t>qt.twoDigitCutoffYear?1900+t:2e3+t}function O3(t,e,n,i=null){const s=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(a.timeZone=i);const o={timeZoneName:e,...a},c=new Intl.DateTimeFormat(n,o).formatToParts(s).find(d=>d.type.toLowerCase()==="timezonename");return c?c.value:null}function Vd(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const i=parseInt(e,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function D3(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Yn(`Invalid unit value ${t}`);return e}function Bd(t,e){const n={};for(const i in t)if($a(t,i)){const s=t[i];if(s==null)continue;n[e(i)]=D3(s)}return n}function Al(t,e){const n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${Xt(n,2)}:${Xt(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Xt(n,2)}${Xt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Td(t){return nM(t,["hour","minute","second","millisecond"])}const sM=["January","February","March","April","May","June","July","August","September","October","November","December"],E3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rM=["J","F","M","A","M","J","J","A","S","O","N","D"];function V3(t){switch(t){case"narrow":return[...rM];case"short":return[...E3];case"long":return[...sM];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const B3=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],T3=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],aM=["M","T","W","T","F","S","S"];function I3(t){switch(t){case"narrow":return[...aM];case"short":return[...T3];case"long":return[...B3];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const A3=["AM","PM"],oM=["Before Christ","Anno Domini"],lM=["BC","AD"],cM=["B","A"];function $3(t){switch(t){case"narrow":return[...cM];case"short":return[...lM];case"long":return[...oM];default:return null}}function dM(t){return A3[t.hour<12?0:1]}function uM(t,e){return I3(e)[t.weekday-1]}function hM(t,e){return V3(e)[t.month-1]}function fM(t,e){return $3(e)[t.year<0?0:1]}function pM(t,e,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const m=t==="days";switch(e){case 1:return m?"tomorrow":`next ${s[t][0]}`;case-1:return m?"yesterday":`last ${s[t][0]}`;case 0:return m?"today":`this ${s[t][0]}`}}const o=Object.is(e,-0)||e<0,c=Math.abs(e),d=c===1,h=s[t],f=i?d?h[1]:h[2]||h[1]:d?s[t][0]:t;return o?`${c} ${f} ago`:`in ${c} ${f}`}function N3(t,e){let n="";for(const i of t)i.literal?n+=i.val:n+=e(i.val);return n}const mM={D:wd,DD:L2,DDD:F2,DDDD:R2,t:H2,tt:W2,ttt:Y2,tttt:j2,T:U2,TT:q2,TTT:G2,TTTT:K2,f:Z2,ff:J2,fff:e3,ffff:n3,F:X2,FF:Q2,FFF:t3,FFFF:i3};class wn{static create(e,n={}){return new wn(e,n)}static parseFormat(e){let n=null,i="",s=!1;const a=[];for(let o=0;o<e.length;o++){const c=e.charAt(o);c==="'"?(i.length>0&&a.push({literal:s||/^\s+$/.test(i),val:i}),n=null,i="",s=!s):s||c===n?i+=c:(i.length>0&&a.push({literal:/^\s+$/.test(i),val:i}),i=c,n=c)}return i.length>0&&a.push({literal:s||/^\s+$/.test(i),val:i}),a}static macroTokenToFormatOpts(e){return mM[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Xt(e,n);const i={...this.opts};return n>0&&(i.padTo=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(_,b)=>this.loc.extract(e,_,b),o=_=>e.isOffsetFixed&&e.offset===0&&_.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,_.format):"",c=()=>i?dM(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),d=(_,b)=>i?hM(e,_):a(b?{month:_}:{month:_,day:"numeric"},"month"),h=(_,b)=>i?uM(e,_):a(b?{weekday:_}:{weekday:_,month:"long",day:"numeric"},"weekday"),f=_=>{const b=wn.macroTokenToFormatOpts(_);return b?this.formatWithSystemDefault(e,b):_},m=_=>i?fM(e,_):a({era:_},"era"),g=_=>{switch(_){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return c();case"d":return s?a({day:"numeric"},"day"):this.num(e.day);case"dd":return s?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return h("short",!0);case"cccc":return h("long",!0);case"ccccc":return h("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return h("short",!1);case"EEEE":return h("long",!1);case"EEEEE":return h("narrow",!1);case"L":return s?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return d("short",!0);case"LLLL":return d("long",!0);case"LLLLL":return d("narrow",!0);case"M":return s?a({month:"numeric"},"month"):this.num(e.month);case"MM":return s?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return d("short",!1);case"MMMM":return d("long",!1);case"MMMMM":return d("narrow",!1);case"y":return s?a({year:"numeric"},"year"):this.num(e.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(_)}};return N3(wn.parseFormat(n),g)}formatDurationFromString(e,n){const i=d=>{switch(d[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=d=>h=>{const f=i(h);return f?this.num(d.get(f),h.length):h},a=wn.parseFormat(n),o=a.reduce((d,{literal:h,val:f})=>h?d:d.concat(f),[]),c=e.shiftTo(...o.map(i).filter(d=>d));return N3(a,s(c))}}const z3=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function za(...t){const e=t.reduce((n,i)=>n+i.source,"");return RegExp(`^${e}$`)}function Pa(...t){return e=>t.reduce(([n,i,s],a)=>{const[o,c,d]=a(e,s);return[{...n,...o},c||i,d]},[{},null,1]).slice(0,2)}function La(t,...e){if(t==null)return[null,null];for(const[n,i]of e){const s=n.exec(t);if(s)return i(s)}return[null,null]}function P3(...t){return(e,n)=>{const i={};let s;for(s=0;s<t.length;s++)i[t[s]]=ir(e[n+s]);return[i,null,n+s]}}const L3=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,gM=`(?:${L3.source}?(?:\\[(${z3.source})\\])?)?`,Nh=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,F3=RegExp(`${Nh.source}${gM}`),zh=RegExp(`(?:T${F3.source})?`),_M=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yM=/(\d{4})-?W(\d\d)(?:-?(\d))?/,vM=/(\d{4})-?(\d{3})/,bM=P3("weekYear","weekNumber","weekDay"),wM=P3("year","ordinal"),kM=/(\d{4})-(\d\d)-(\d\d)/,R3=RegExp(`${Nh.source} ?(?:${L3.source}|(${z3.source}))?`),CM=RegExp(`(?: ${R3.source})?`);function Fa(t,e,n){const i=t[e];return Be(i)?n:ir(i)}function xM(t,e){return[{year:Fa(t,e),month:Fa(t,e+1,1),day:Fa(t,e+2,1)},null,e+3]}function Ra(t,e){return[{hours:Fa(t,e,0),minutes:Fa(t,e+1,0),seconds:Fa(t,e+2,0),milliseconds:Ih(t[e+3])},null,e+4]}function $l(t,e){const n=!t[e]&&!t[e+1],i=Vd(t[e+1],t[e+2]),s=n?null:Vn.instance(i);return[{},s,e+3]}function Nl(t,e){const n=t[e]?ks.create(t[e]):null;return[{},n,e+1]}const SM=RegExp(`^T?${Nh.source}$`),MM=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function OM(t){const[e,n,i,s,a,o,c,d,h]=t,f=e[0]==="-",m=d&&d[0]==="-",g=(_,b=!1)=>_!==void 0&&(b||_&&f)?-_:_;return[{years:g(Wr(n)),months:g(Wr(i)),weeks:g(Wr(s)),days:g(Wr(a)),hours:g(Wr(o)),minutes:g(Wr(c)),seconds:g(Wr(d),d==="-0"),milliseconds:g(Ih(h),m)}]}const DM={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ph(t,e,n,i,s,a,o){const c={year:e.length===2?$h(ir(e)):ir(e),month:E3.indexOf(n)+1,day:ir(i),hour:ir(s),minute:ir(a)};return o&&(c.second=ir(o)),t&&(c.weekday=t.length>3?B3.indexOf(t)+1:T3.indexOf(t)+1),c}const EM=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function VM(t){const[,e,n,i,s,a,o,c,d,h,f,m]=t,g=Ph(e,s,i,n,a,o,c);let _;return d?_=DM[d]:h?_=0:_=Vd(f,m),[g,new Vn(_)]}function BM(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const TM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,IM=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,AM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function H3(t){const[,e,n,i,s,a,o,c]=t;return[Ph(e,s,i,n,a,o,c),Vn.utcInstance]}function $M(t){const[,e,n,i,s,a,o,c]=t;return[Ph(e,c,n,i,s,a,o),Vn.utcInstance]}const NM=za(_M,zh),zM=za(yM,zh),PM=za(vM,zh),LM=za(F3),W3=Pa(xM,Ra,$l,Nl),FM=Pa(bM,Ra,$l,Nl),RM=Pa(wM,Ra,$l,Nl),HM=Pa(Ra,$l,Nl);function WM(t){return La(t,[NM,W3],[zM,FM],[PM,RM],[LM,HM])}function YM(t){return La(BM(t),[EM,VM])}function jM(t){return La(t,[TM,H3],[IM,H3],[AM,$M])}function UM(t){return La(t,[MM,OM])}const qM=Pa(Ra);function GM(t){return La(t,[SM,qM])}const KM=za(kM,CM),ZM=za(R3),XM=Pa(Ra,$l,Nl);function JM(t){return La(t,[KM,W3],[ZM,XM])}const Y3="Invalid Duration",j3={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},QM={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...j3},yi=146097/400,Ha=146097/4800,eO={years:{quarters:4,months:12,weeks:yi/7,days:yi,hours:yi*24,minutes:yi*24*60,seconds:yi*24*60*60,milliseconds:yi*24*60*60*1e3},quarters:{months:3,weeks:yi/28,days:yi/4,hours:yi*24/4,minutes:yi*24*60/4,seconds:yi*24*60*60/4,milliseconds:yi*24*60*60*1e3/4},months:{weeks:Ha/7,days:Ha,hours:Ha*24,minutes:Ha*24*60,seconds:Ha*24*60*60,milliseconds:Ha*24*60*60*1e3},...j3},Yr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],tO=Yr.slice(0).reverse();function sr(t,e,n=!1){const i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Qe(i)}function U3(t,e){let n=e.milliseconds??0;for(const i of tO.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function q3(t,e){const n=U3(t,e)<0?-1:1;Yr.reduceRight((i,s)=>{if(Be(e[s]))return i;if(i){const a=e[i]*n,o=t[s][i],c=Math.floor(a/o);e[s]+=c*n,e[i]-=c*o*n}return s},null),Yr.reduce((i,s)=>{if(Be(e[s]))return i;if(i){const a=e[i]%1;e[i]-=a,e[s]+=a*t[i][s]}return s},null)}function nO(t){const e={};for(const[n,i]of Object.entries(t))i!==0&&(e[n]=i);return e}class Qe{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let i=n?eO:QM;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||yt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,n){return Qe.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Yn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Qe({values:Bd(e,Qe.normalizeUnit),loc:yt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Hr(e))return Qe.fromMillis(e);if(Qe.isDuration(e))return e;if(typeof e=="object")return Qe.fromObject(e);throw new Yn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[i]=UM(e);return i?Qe.fromObject(i,n):Qe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[i]=GM(e);return i?Qe.fromObject(i,n):Qe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Yn("need to specify a reason the Duration is invalid");const i=e instanceof Ni?e:new Ni(e,n);if(qt.throwOnInvalid)throw new ES(i);return new Qe({invalid:i})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new P2(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?wn.create(this.loc,i).formatDurationFromString(this,e):Y3}toHuman(e={}){if(!this.isValid)return Y3;const n=Yr.map(i=>{const s=this.values[i];return Be(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Ah(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},ue.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?U3(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e),i={};for(const s of Yr)($a(n.values,s)||$a(this.values,s))&&(i[s]=n.get(s)+this.get(s));return sr(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=D3(e(this.values[i],i));return sr(this,{values:n},!0)}get(e){return this[Qe.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Bd(e,Qe.normalizeUnit)};return sr(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:s,conversionAccuracy:i};return sr(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return q3(this.matrix,e),sr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=nO(this.normalize().shiftToAll().toObject());return sr(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Qe.normalizeUnit(o));const n={},i={},s=this.toObject();let a;for(const o of Yr)if(e.indexOf(o)>=0){a=o;let c=0;for(const h in i)c+=this.matrix[h][o]*i[h],i[h]=0;Hr(s[o])&&(c+=s[o]);const d=Math.trunc(c);n[o]=d,i[o]=(c*1e3-d*1e3)/1e3}else Hr(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(n[a]+=o===a?i[o]:i[o]/this.matrix[a][o]);return q3(this.matrix,n),sr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return sr(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Yr)if(!n(this.values[i],e.values[i]))return!1;return!0}}const Wa="Invalid Interval";function iO(t,e){return!t||!t.isValid?Lt.invalid("missing or invalid start"):!e||!e.isValid?Lt.invalid("missing or invalid end"):e<t?Lt.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class Lt{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Yn("need to specify a reason the Interval is invalid");const i=e instanceof Ni?e:new Ni(e,n);if(qt.throwOnInvalid)throw new DS(i);return new Lt({invalid:i})}static fromDateTimes(e,n){const i=Pl(e),s=Pl(n),a=iO(i,s);return a??new Lt({start:i,end:s})}static after(e,n){const i=Qe.fromDurationLike(n),s=Pl(e);return Lt.fromDateTimes(s,s.plus(i))}static before(e,n){const i=Qe.fromDurationLike(n),s=Pl(e);return Lt.fromDateTimes(s.minus(i),s)}static fromISO(e,n){const[i,s]=(e||"").split("/",2);if(i&&s){let a,o;try{a=ue.fromISO(i,n),o=a.isValid}catch{o=!1}let c,d;try{c=ue.fromISO(s,n),d=c.isValid}catch{d=!1}if(o&&d)return Lt.fromDateTimes(a,c);if(o){const h=Qe.fromISO(s,n);if(h.isValid)return Lt.after(a,h)}else if(d){const h=Qe.fromISO(i,n);if(h.isValid)return Lt.before(c,h)}}return Lt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(e,n);let s;return n!=null&&n.useLocaleWeeks?s=this.end.reconfigure({locale:i.locale}):s=this.end,s=s.startOf(e,n),Math.floor(s.diff(i,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?Lt.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Pl).filter(o=>this.contains(o)).sort((o,c)=>o.toMillis()-c.toMillis()),i=[];let{s}=this,a=0;for(;s<this.e;){const o=n[a]||this.e,c=+o>+this.e?this.e:o;i.push(Lt.fromDateTimes(s,c)),s=c,a+=1}return i}splitBy(e){const n=Qe.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,a;const o=[];for(;i<this.e;){const c=this.start.plus(n.mapUnits(d=>d*s));a=+c>+this.e?this.e:c,o.push(Lt.fromDateTimes(i,a)),i=a,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return n>=i?null:Lt.fromDateTimes(n,i)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return Lt.fromDateTimes(n,i)}static merge(e){const[n,i]=e.sort((s,a)=>s.s-a.s).reduce(([s,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[s,a.union(o)]:[s.concat([a]),o]:[s,o],[[],null]);return i&&n.push(i),n}static xor(e){let n=null,i=0;const s=[],a=e.map(d=>[{time:d.s,type:"s"},{time:d.e,type:"e"}]),o=Array.prototype.concat(...a),c=o.sort((d,h)=>d.time-h.time);for(const d of c)i+=d.type==="s"?1:-1,i===1?n=d.time:(n&&+n!=+d.time&&s.push(Lt.fromDateTimes(n,d.time)),n=null);return Lt.merge(s)}difference(...e){return Lt.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Wa}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=wd,n={}){return this.isValid?wn.create(this.s.loc.clone(n),e).formatInterval(this):Wa}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Wa}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Wa}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Wa}toFormat(e,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Wa}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Qe.invalid(this.invalidReason)}mapEndpoints(e){return Lt.fromDateTimes(e(this.s),e(this.e))}}class Id{static hasDST(e=qt.defaultZone){const n=ue.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return ks.isValidZone(e)}static normalizeZone(e){return nr(e,qt.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||yt.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||yt.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||yt.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||yt.create(n,i,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||yt.create(n,i,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||yt.create(n,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||yt.create(n,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return yt.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return yt.create(n,null,"gregory").eras(e)}static features(){return{relative:C3(),localeWeek:x3()}}}function G3(t,e){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(Qe.fromMillis(i).as("days"))}function sO(t,e,n){const i=[["years",(d,h)=>h.year-d.year],["quarters",(d,h)=>h.quarter-d.quarter+(h.year-d.year)*4],["months",(d,h)=>h.month-d.month+(h.year-d.year)*12],["weeks",(d,h)=>{const f=G3(d,h);return(f-f%7)/7}],["days",G3]],s={},a=t;let o,c;for(const[d,h]of i)n.indexOf(d)>=0&&(o=d,s[d]=h(t,e),c=a.plus(s),c>e?(s[d]--,t=a.plus(s),t>e&&(c=t,s[d]--,t=a.plus(s))):t=c);return[t,s,c,o]}function rO(t,e,n,i){let[s,a,o,c]=sO(t,e,n);const d=e-s,h=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);h.length===0&&(o<e&&(o=s.plus({[c]:1})),o!==s&&(a[c]=(a[c]||0)+d/(o-s)));const f=Qe.fromObject(a,i);return h.length>0?Qe.fromMillis(d,i).shiftTo(...h).plus(f):f}const Lh={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},K3={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},aO=Lh.hanidec.replace(/[\[|\]]/g,"").split("");function oO(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(t[n].search(Lh.hanidec)!==-1)e+=aO.indexOf(t[n]);else for(const s in K3){const[a,o]=K3[s];i>=a&&i<=o&&(e+=i-a)}}return parseInt(e,10)}else return e}function zi({numberingSystem:t},e=""){return new RegExp(`${Lh[t||"latn"]}${e}`)}const lO="missing Intl.DateTimeFormat.formatToParts support";function it(t,e=n=>n){return{regex:t,deser:([n])=>e(oO(n))}}const Z3=`[ ${String.fromCharCode(160)}]`,X3=new RegExp(Z3,"g");function cO(t){return t.replace(/\./g,"\\.?").replace(X3,Z3)}function J3(t){return t.replace(/\./g,"").replace(X3," ").toLowerCase()}function Pi(t,e){return t===null?null:{regex:RegExp(t.map(cO).join("|")),deser:([n])=>t.findIndex(i=>J3(n)===J3(i))+e}}function Q3(t,e){return{regex:t,deser:([,n,i])=>Vd(n,i),groups:e}}function Ad(t){return{regex:t,deser:([e])=>e}}function dO(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function uO(t,e){const n=zi(e),i=zi(e,"{2}"),s=zi(e,"{3}"),a=zi(e,"{4}"),o=zi(e,"{6}"),c=zi(e,"{1,2}"),d=zi(e,"{1,3}"),h=zi(e,"{1,6}"),f=zi(e,"{1,9}"),m=zi(e,"{2,4}"),g=zi(e,"{4,6}"),_=C=>({regex:RegExp(dO(C.val)),deser:([S])=>S,literal:!0}),w=(C=>{if(t.literal)return _(C);switch(C.val){case"G":return Pi(e.eras("short"),0);case"GG":return Pi(e.eras("long"),0);case"y":return it(h);case"yy":return it(m,$h);case"yyyy":return it(a);case"yyyyy":return it(g);case"yyyyyy":return it(o);case"M":return it(c);case"MM":return it(i);case"MMM":return Pi(e.months("short",!0),1);case"MMMM":return Pi(e.months("long",!0),1);case"L":return it(c);case"LL":return it(i);case"LLL":return Pi(e.months("short",!1),1);case"LLLL":return Pi(e.months("long",!1),1);case"d":return it(c);case"dd":return it(i);case"o":return it(d);case"ooo":return it(s);case"HH":return it(i);case"H":return it(c);case"hh":return it(i);case"h":return it(c);case"mm":return it(i);case"m":return it(c);case"q":return it(c);case"qq":return it(i);case"s":return it(c);case"ss":return it(i);case"S":return it(d);case"SSS":return it(s);case"u":return Ad(f);case"uu":return Ad(c);case"uuu":return it(n);case"a":return Pi(e.meridiems(),0);case"kkkk":return it(a);case"kk":return it(m,$h);case"W":return it(c);case"WW":return it(i);case"E":case"c":return it(n);case"EEE":return Pi(e.weekdays("short",!1),1);case"EEEE":return Pi(e.weekdays("long",!1),1);case"ccc":return Pi(e.weekdays("short",!0),1);case"cccc":return Pi(e.weekdays("long",!0),1);case"Z":case"ZZ":return Q3(new RegExp(`([+-]${c.source})(?::(${i.source}))?`),2);case"ZZZ":return Q3(new RegExp(`([+-]${c.source})(${i.source})?`),2);case"z":return Ad(/[a-z_+-/]{1,256}?/i);case" ":return Ad(/[^\S\n\r]/);default:return _(C)}})(t)||{invalidReason:lO};return w.token=t,w}const hO={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function fO(t,e,n){const{type:i,value:s}=t;if(i==="literal"){const d=/^\s+$/.test(s);return{literal:!d,val:d?" ":s}}const a=e[i];let o=i;i==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let c=hO[o];if(typeof c=="object"&&(c=c[a]),c)return{literal:!1,val:c}}function pO(t){return[`^${t.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,t]}function mO(t,e,n){const i=t.match(e);if(i){const s={};let a=1;for(const o in n)if($a(n,o)){const c=n[o],d=c.groups?c.groups+1:1;!c.literal&&c.token&&(s[c.token.val[0]]=c.deser(i.slice(a,a+d))),a+=d}return[i,s]}else return[i,{}]}function gO(t){const e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Be(t.z)||(n=ks.create(t.z)),Be(t.Z)||(n||(n=new Vn(t.Z)),i=t.Z),Be(t.q)||(t.M=(t.q-1)*3+1),Be(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Be(t.u)||(t.S=Ih(t.u)),[Object.keys(t).reduce((a,o)=>{const c=e(o);return c&&(a[c]=t[o]),a},{}),n,i]}let Fh=null;function _O(){return Fh||(Fh=ue.fromMillis(1555555555555)),Fh}function yO(t,e){if(t.literal)return t;const n=wn.macroTokenToFormatOpts(t.val),i=n_(n,e);return i==null||i.includes(void 0)?t:i}function e_(t,e){return Array.prototype.concat(...t.map(n=>yO(n,e)))}function t_(t,e,n){const i=e_(wn.parseFormat(n),t),s=i.map(o=>uO(o,t)),a=s.find(o=>o.invalidReason);if(a)return{input:e,tokens:i,invalidReason:a.invalidReason};{const[o,c]=pO(s),d=RegExp(o,"i"),[h,f]=mO(e,d,c),[m,g,_]=f?gO(f):[null,null,void 0];if($a(f,"a")&&$a(f,"H"))throw new Aa("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:d,rawMatches:h,matches:f,result:m,zone:g,specificOffset:_}}}function vO(t,e,n){const{result:i,zone:s,specificOffset:a,invalidReason:o}=t_(t,e,n);return[i,s,a,o]}function n_(t,e){if(!t)return null;const i=wn.create(e,t).dtFormatter(_O()),s=i.formatToParts(),a=i.resolvedOptions();return s.map(o=>fO(o,t,a))}const Rh="Invalid DateTime",i_=864e13;function $d(t){return new Ni("unsupported zone",`the zone "${t.name}" is not supported`)}function Hh(t){return t.weekData===null&&(t.weekData=Md(t.c)),t.weekData}function Wh(t){return t.localWeekData===null&&(t.localWeekData=Md(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function jr(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new ue({...n,...e,old:n})}function s_(t,e,n){let i=t-e*60*1e3;const s=n.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const a=n.offset(i);return s===a?[i,s]:[t-Math.min(s,a)*60*1e3,Math.max(s,a)]}function Nd(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function zd(t,e,n){return s_(Ed(t),e,n)}function r_(t,e){const n=t.o,i=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:i,month:s,day:Math.min(t.c.day,Dd(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Qe.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),c=Ed(a);let[d,h]=s_(c,n,t.zone);return o!==0&&(d+=o,h=t.zone.offset(d)),{ts:d,o:h}}function zl(t,e,n,i,s,a){const{setZone:o,zone:c}=n;if(t&&Object.keys(t).length!==0||e){const d=e||c,h=ue.fromObject(t,{...n,zone:d,specificOffset:a});return o?h:h.setZone(c)}else return ue.invalid(new Ni("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Pd(t,e,n=!0){return t.isValid?wn.create(yt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Yh(t,e){const n=t.c.year>9999||t.c.year<0;let i="";return n&&t.c.year>=0&&(i+="+"),i+=Xt(t.c.year,n?6:4),e?(i+="-",i+=Xt(t.c.month),i+="-",i+=Xt(t.c.day)):(i+=Xt(t.c.month),i+=Xt(t.c.day)),i}function a_(t,e,n,i,s,a){let o=Xt(t.c.hour);return e?(o+=":",o+=Xt(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=Xt(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=Xt(t.c.second),(t.c.millisecond!==0||!i)&&(o+=".",o+=Xt(t.c.millisecond,3))),s&&(t.isOffsetFixed&&t.offset===0&&!a?o+="Z":t.o<0?(o+="-",o+=Xt(Math.trunc(-t.o/60)),o+=":",o+=Xt(Math.trunc(-t.o%60))):(o+="+",o+=Xt(Math.trunc(t.o/60)),o+=":",o+=Xt(Math.trunc(t.o%60)))),a&&(o+="["+t.zone.ianaName+"]"),o}const o_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},bO={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},wO={ordinal:1,hour:0,minute:0,second:0,millisecond:0},l_=["year","month","day","hour","minute","second","millisecond"],kO=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],CO=["year","ordinal","hour","minute","second","millisecond"];function xO(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new P2(t);return e}function c_(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return xO(t)}}function d_(t,e){const n=nr(e.zone,qt.defaultZone),i=yt.fromObject(e),s=qt.now();let a,o;if(Be(t.year))a=s;else{for(const h of l_)Be(t[h])&&(t[h]=o_[h]);const c=w3(t)||k3(t);if(c)return ue.invalid(c);const d=n.offset(s);[a,o]=zd(t,d,n)}return new ue({ts:a,zone:n,loc:i,o})}function u_(t,e,n){const i=Be(n.round)?!0:n.round,s=(o,c)=>(o=Ah(o,i||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,c)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return s(a(n.unit),n.unit);for(const o of n.units){const c=a(o);if(Math.abs(c)>=1)return s(c,o)}return s(t>e?-0:0,n.units[n.units.length-1])}function h_(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class ue{constructor(e){const n=e.zone||qt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Ni("invalid input"):null)||(n.isValid?null:$d(n));this.ts=Be(e.ts)?qt.now():e.ts;let s=null,a=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[s,a]=[e.old.c,e.old.o];else{const c=n.offset(this.ts);s=Nd(this.ts,c),i=Number.isNaN(s.year)?new Ni("invalid input"):null,s=i?null:s,a=i?null:c}this._zone=n,this.loc=e.loc||yt.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new ue({})}static local(){const[e,n]=h_(arguments),[i,s,a,o,c,d,h]=n;return d_({year:i,month:s,day:a,hour:o,minute:c,second:d,millisecond:h},e)}static utc(){const[e,n]=h_(arguments),[i,s,a,o,c,d,h]=n;return e.zone=Vn.utcInstance,d_({year:i,month:s,day:a,hour:o,minute:c,second:d,millisecond:h},e)}static fromJSDate(e,n={}){const i=eM(e)?e.valueOf():NaN;if(Number.isNaN(i))return ue.invalid("invalid input");const s=nr(n.zone,qt.defaultZone);return s.isValid?new ue({ts:i,zone:s,loc:yt.fromObject(n)}):ue.invalid($d(s))}static fromMillis(e,n={}){if(Hr(e))return e<-i_||e>i_?ue.invalid("Timestamp out of range"):new ue({ts:e,zone:nr(n.zone,qt.defaultZone),loc:yt.fromObject(n)});throw new Yn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Hr(e))return new ue({ts:e*1e3,zone:nr(n.zone,qt.defaultZone),loc:yt.fromObject(n)});throw new Yn("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const i=nr(n.zone,qt.defaultZone);if(!i.isValid)return ue.invalid($d(i));const s=yt.fromObject(n),a=Bd(e,c_),{minDaysInFirstWeek:o,startOfWeek:c}=b3(a,s),d=qt.now(),h=Be(n.specificOffset)?i.offset(d):n.specificOffset,f=!Be(a.ordinal),m=!Be(a.year),g=!Be(a.month)||!Be(a.day),_=m||g,b=a.weekYear||a.weekNumber;if((_||f)&&b)throw new Aa("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&f)throw new Aa("Can't mix ordinal dates with month/day");const w=b||a.weekday&&!_;let C,S,E=Nd(d,h);w?(C=kO,S=bO,E=Md(E,o,c)):f?(C=CO,S=wO,E=Bh(E)):(C=l_,S=o_);let A=!1;for(const ee of C){const ie=a[ee];Be(ie)?A?a[ee]=S[ee]:a[ee]=E[ee]:A=!0}const x=w?XS(a,o,c):f?JS(a):w3(a),T=x||k3(a);if(T)return ue.invalid(T);const N=w?y3(a,o,c):f?v3(a):a,[L,F]=zd(N,h,i),q=new ue({ts:L,zone:i,o:F,loc:s});return a.weekday&&_&&e.weekday!==q.weekday?ue.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${q.toISO()}`):q}static fromISO(e,n={}){const[i,s]=WM(e);return zl(i,s,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[i,s]=YM(e);return zl(i,s,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[i,s]=jM(e);return zl(i,s,n,"HTTP",n)}static fromFormat(e,n,i={}){if(Be(e)||Be(n))throw new Yn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=i,o=yt.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[c,d,h,f]=vO(o,e,n);return f?ue.invalid(f):zl(c,d,i,`format ${n}`,e,h)}static fromString(e,n,i={}){return ue.fromFormat(e,n,i)}static fromSQL(e,n={}){const[i,s]=JM(e);return zl(i,s,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Yn("need to specify a reason the DateTime is invalid");const i=e instanceof Ni?e:new Ni(e,n);if(qt.throwOnInvalid)throw new OS(i);return new ue({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const i=n_(e,yt.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(e,n={}){return e_(wn.parseFormat(e),yt.fromObject(n)).map(s=>s.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Hh(this).weekYear:NaN}get weekNumber(){return this.isValid?Hh(this).weekNumber:NaN}get weekday(){return this.isValid?Hh(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Wh(this).weekday:NaN}get localWeekNumber(){return this.isValid?Wh(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Wh(this).weekYear:NaN}get ordinal(){return this.isValid?Bh(this.c).ordinal:NaN}get monthShort(){return this.isValid?Id.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Id.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Id.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Id.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,i=Ed(this.c),s=this.zone.offset(i-e),a=this.zone.offset(i+e),o=this.zone.offset(i-s*n),c=this.zone.offset(i-a*n);if(o===c)return[this];const d=i-o*n,h=i-c*n,f=Nd(d,o),m=Nd(h,c);return f.hour===m.hour&&f.minute===m.minute&&f.second===m.second&&f.millisecond===m.millisecond?[jr(this,{ts:d}),jr(this,{ts:h})]:[this]}get isInLeapYear(){return Tl(this.year)}get daysInMonth(){return Dd(this.year,this.month)}get daysInYear(){return this.isValid?Na(this.year):NaN}get weeksInWeekYear(){return this.isValid?Il(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Il(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:i,calendar:s}=wn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(e=0,n={}){return this.setZone(Vn.instance(e),n)}toLocal(){return this.setZone(qt.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(e=nr(e,qt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(n||i){const a=e.offset(this.ts),o=this.toObject();[s]=zd(o,a,e)}return jr(this,{ts:s,zone:e})}else return ue.invalid($d(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:i});return jr(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Bd(e,c_),{minDaysInFirstWeek:i,startOfWeek:s}=b3(n,this.loc),a=!Be(n.weekYear)||!Be(n.weekNumber)||!Be(n.weekday),o=!Be(n.ordinal),c=!Be(n.year),d=!Be(n.month)||!Be(n.day),h=c||d,f=n.weekYear||n.weekNumber;if((h||o)&&f)throw new Aa("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&o)throw new Aa("Can't mix ordinal dates with month/day");let m;a?m=y3({...Md(this.c,i,s),...n},i,s):Be(n.ordinal)?(m={...this.toObject(),...n},Be(n.day)&&(m.day=Math.min(Dd(m.year,m.month),m.day))):m=v3({...Bh(this.c),...n});const[g,_]=zd(m,this.o,this.zone);return jr(this,{ts:g,o:_})}plus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e);return jr(this,r_(this,n))}minus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e).negate();return jr(this,r_(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},s=Qe.normalizeUnit(e);switch(s){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(s==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(i.weekNumber=this.weekNumber-1),i.weekday=a}else i.weekday=1;if(s==="quarters"){const a=Math.ceil(this.month/3);i.month=(a-1)*3+1}return this.set(i)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?wn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Rh}toLocaleString(e=wd,n={}){return this.isValid?wn.create(this.loc.clone(n),e).formatDateTime(this):Rh}toLocaleParts(e={}){return this.isValid?wn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let c=Yh(this,o);return c+="T",c+=a_(this,o,n,i,s,a),c}toISODate({format:e="extended"}={}){return this.isValid?Yh(this,e==="extended"):null}toISOWeekDate(){return Pd(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+a_(this,o==="extended",n,e,i,a):null}toRFC2822(){return Pd(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Pd(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Yh(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||e)&&(i&&(s+=" "),n?s+="z":e&&(s+="ZZ")),Pd(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Rh}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",i={}){if(!this.isValid||!e.isValid)return Qe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},a=tM(n).map(Qe.normalizeUnit),o=e.valueOf()>this.valueOf(),c=o?this:e,d=o?e:this,h=rO(c,d,a,s);return o?h.negate():h}diffNow(e="milliseconds",n={}){return this.diff(ue.now(),e,n)}until(e){return this.isValid?Lt.fromDateTimes(this,e):this}hasSame(e,n,i){if(!this.isValid)return!1;const s=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,i)<=s&&s<=a.endOf(n,i)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||ue.fromObject({},{zone:this.zone}),i=e.padding?this<n?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(s=e.unit,a=void 0),u_(n,this.plus(i),{...e,numeric:"always",units:s,unit:a})}toRelativeCalendar(e={}){return this.isValid?u_(e.base||ue.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(ue.isDateTime))throw new Yn("min requires all arguments be DateTimes");return S3(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(ue.isDateTime))throw new Yn("max requires all arguments be DateTimes");return S3(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,i={}){const{locale:s=null,numberingSystem:a=null}=i,o=yt.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return t_(o,e,n)}static fromStringExplain(e,n,i={}){return ue.fromFormatExplain(e,n,i)}static get DATE_SHORT(){return wd}static get DATE_MED(){return L2}static get DATE_MED_WITH_WEEKDAY(){return VS}static get DATE_FULL(){return F2}static get DATE_HUGE(){return R2}static get TIME_SIMPLE(){return H2}static get TIME_WITH_SECONDS(){return W2}static get TIME_WITH_SHORT_OFFSET(){return Y2}static get TIME_WITH_LONG_OFFSET(){return j2}static get TIME_24_SIMPLE(){return U2}static get TIME_24_WITH_SECONDS(){return q2}static get TIME_24_WITH_SHORT_OFFSET(){return G2}static get TIME_24_WITH_LONG_OFFSET(){return K2}static get DATETIME_SHORT(){return Z2}static get DATETIME_SHORT_WITH_SECONDS(){return X2}static get DATETIME_MED(){return J2}static get DATETIME_MED_WITH_SECONDS(){return Q2}static get DATETIME_MED_WITH_WEEKDAY(){return BS}static get DATETIME_FULL(){return e3}static get DATETIME_FULL_WITH_SECONDS(){return t3}static get DATETIME_HUGE(){return n3}static get DATETIME_HUGE_WITH_SECONDS(){return i3}}function Pl(t){if(ue.isDateTime(t))return t;if(t&&t.valueOf&&Hr(t.valueOf()))return ue.fromJSDate(t);if(t&&typeof t=="object")return ue.fromObject(t);throw new Yn(`Unknown datetime argument: ${t}, of type ${typeof t}`)}/*!
|
|
38
|
+
`):t}function Nx(t,e){const{element:n,datasetIndex:i,index:s}=e,a=t.getDatasetMeta(i).controller,{label:o,value:c}=a.getLabelAndValue(s);return{chart:t,label:o,parsed:a.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:c,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function g2(t,e){const n=t.chart.ctx,{body:i,footer:s,title:a}=t,{boxWidth:o,boxHeight:c}=e,d=Qt(e.bodyFont),h=Qt(e.titleFont),f=Qt(e.footerFont),m=a.length,g=s.length,_=i.length,b=vn(e.padding);let w=b.height,C=0,S=i.reduce((x,T)=>x+T.before.length+T.lines.length+T.after.length,0);if(S+=t.beforeBody.length+t.afterBody.length,m&&(w+=m*h.lineHeight+(m-1)*e.titleSpacing+e.titleMarginBottom),S){const x=e.displayColors?Math.max(c,d.lineHeight):d.lineHeight;w+=_*x+(S-_)*d.lineHeight+(S-1)*e.bodySpacing}g&&(w+=e.footerMarginTop+g*f.lineHeight+(g-1)*e.footerSpacing);let E=0;const A=function(x){C=Math.max(C,n.measureText(x).width+E)};return n.save(),n.font=h.string,ut(t.title,A),n.font=d.string,ut(t.beforeBody.concat(t.afterBody),A),E=e.displayColors?o+2+e.boxPadding:0,ut(i,x=>{ut(x.before,A),ut(x.lines,A),ut(x.after,A)}),E=0,n.font=f.string,ut(t.footer,A),n.restore(),C+=b.width,{width:C,height:w}}function zx(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function Px(t,e,n,i){const{x:s,width:a}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&s+a+o>e.width||t==="right"&&s-a-o<0)return!0}function Lx(t,e,n,i){const{x:s,width:a}=n,{width:o,chartArea:{left:c,right:d}}=t;let h="center";return i==="center"?h=s<=(c+d)/2?"left":"right":s<=a/2?h="left":s>=o-a/2&&(h="right"),Px(h,t,e,n)&&(h="center"),h}function _2(t,e,n){const i=n.yAlign||e.yAlign||zx(t,n);return{xAlign:n.xAlign||e.xAlign||Lx(t,e,n,i),yAlign:i}}function Fx(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function Rx(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function y2(t,e,n,i){const{caretSize:s,caretPadding:a,cornerRadius:o}=t,{xAlign:c,yAlign:d}=n,h=s+a,{topLeft:f,topRight:m,bottomLeft:g,bottomRight:_}=Ar(o);let b=Fx(e,c);const w=Rx(e,d,h);return d==="center"?c==="left"?b+=h:c==="right"&&(b-=h):c==="left"?b-=Math.max(f,g)+s:c==="right"&&(b+=Math.max(m,_)+s),{x:dn(b,0,i.width-e.width),y:dn(w,0,i.height-e.height)}}function _d(t,e,n){const i=vn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function v2(t){return es([],ws(t))}function Hx(t,e,n){return Xs(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function b2(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const w2={beforeTitle:gs,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:gs,beforeBody:gs,beforeLabel:gs,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Je(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:gs,afterBody:gs,beforeFooter:gs,footer:gs,afterFooter:gs};function Rn(t,e,n,i){const s=t[e].call(n,i);return typeof s>"u"?w2[e].call(n,i):s}class gh extends Ai{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,a=new cg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Hx(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=Rn(i,"beforeTitle",this,e),a=Rn(i,"title",this,e),o=Rn(i,"afterTitle",this,e);let c=[];return c=es(c,ws(s)),c=es(c,ws(a)),c=es(c,ws(o)),c}getBeforeBody(e,n){return v2(Rn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return ut(e,a=>{const o={before:[],lines:[],after:[]},c=b2(i,a);es(o.before,ws(Rn(c,"beforeLabel",this,a))),es(o.lines,Rn(c,"label",this,a)),es(o.after,ws(Rn(c,"afterLabel",this,a))),s.push(o)}),s}getAfterBody(e,n){return v2(Rn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=Rn(i,"beforeFooter",this,e),a=Rn(i,"footer",this,e),o=Rn(i,"afterFooter",this,e);let c=[];return c=es(c,ws(s)),c=es(c,ws(a)),c=es(c,ws(o)),c}_createItems(e){const n=this._active,i=this.chart.data,s=[],a=[],o=[];let c=[],d,h;for(d=0,h=n.length;d<h;++d)c.push(Nx(this.chart,n[d]));return e.filter&&(c=c.filter((f,m,g)=>e.filter(f,m,g,i))),e.itemSort&&(c=c.sort((f,m)=>e.itemSort(f,m,i))),ut(c,f=>{const m=b2(e.callbacks,f);s.push(Rn(m,"labelColor",this,f)),a.push(Rn(m,"labelPointStyle",this,f)),o.push(Rn(m,"labelTextColor",this,f))}),this.labelColors=s,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=c,c}update(e,n){const i=this.options.setContext(this.getContext()),s=this._active;let a,o=[];if(!s.length)this.opacity!==0&&(a={opacity:0});else{const c=Sl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const d=this._size=g2(this,i),h=Object.assign({},c,d),f=_2(this.chart,i,h),m=y2(i,h,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,a={opacity:1,x:m.x,y:m.y,width:d.width,height:d.height,caretX:c.x,caretY:c.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,s){const a=this.getCaretPosition(e,i,s);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,i){const{xAlign:s,yAlign:a}=this,{caretSize:o,cornerRadius:c}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:m}=Ar(c),{x:g,y:_}=e,{width:b,height:w}=n;let C,S,E,A,x,T;return a==="center"?(x=_+w/2,s==="left"?(C=g,S=C-o,A=x+o,T=x-o):(C=g+b,S=C+o,A=x-o,T=x+o),E=C):(s==="left"?S=g+Math.max(d,f)+o:s==="right"?S=g+b-Math.max(h,m)-o:S=this.caretX,a==="top"?(A=_,x=A-o,C=S-o,E=S+o):(A=_+w,x=A+o,C=S+o,E=S-o),T=A),{x1:C,x2:S,x3:E,y1:A,y2:x,y3:T}}drawTitle(e,n,i){const s=this.title,a=s.length;let o,c,d;if(a){const h=Va(i.rtl,this.x,this.width);for(e.x=_d(this,i.titleAlign,i),n.textAlign=h.textAlign(i.titleAlign),n.textBaseline="middle",o=Qt(i.titleFont),c=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,d=0;d<a;++d)n.fillText(s[d],h.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+c,d+1===a&&(e.y+=i.titleMarginBottom-c)}}_drawColorBox(e,n,i,s,a){const o=this.labelColors[i],c=this.labelPointStyles[i],{boxHeight:d,boxWidth:h}=a,f=Qt(a.bodyFont),m=_d(this,"left",a),g=s.x(m),_=d<f.lineHeight?(f.lineHeight-d)/2:0,b=n.y+_;if(a.usePointStyle){const w={radius:Math.min(h,d)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},C=s.leftForLtr(g,h)+h/2,S=b+d/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,U1(e,w,C,S),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,U1(e,w,C,S)}else{e.lineWidth=qe(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const w=s.leftForLtr(g,h),C=s.leftForLtr(s.xPlus(g,1),h-2),S=Ar(o.borderRadius);Object.values(S).some(E=>E!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,hl(e,{x:w,y:b,w:h,h:d,radius:S}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),hl(e,{x:C,y:b+1,w:h-2,h:d-2,radius:S}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(w,b,h,d),e.strokeRect(w,b,h,d),e.fillStyle=o.backgroundColor,e.fillRect(C,b+1,h-2,d-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:s}=this,{bodySpacing:a,bodyAlign:o,displayColors:c,boxHeight:d,boxWidth:h,boxPadding:f}=i,m=Qt(i.bodyFont);let g=m.lineHeight,_=0;const b=Va(i.rtl,this.x,this.width),w=function(F){n.fillText(F,b.x(e.x+_),e.y+g/2),e.y+=g+a},C=b.textAlign(o);let S,E,A,x,T,N,L;for(n.textAlign=o,n.textBaseline="middle",n.font=m.string,e.x=_d(this,C,i),n.fillStyle=i.bodyColor,ut(this.beforeBody,w),_=c&&C!=="right"?o==="center"?h/2+f:h+2+f:0,x=0,N=s.length;x<N;++x){for(S=s[x],E=this.labelTextColors[x],n.fillStyle=E,ut(S.before,w),A=S.lines,c&&A.length&&(this._drawColorBox(n,e,x,b,i),g=Math.max(m.lineHeight,d)),T=0,L=A.length;T<L;++T)w(A[T]),g=m.lineHeight;ut(S.after,w)}_=0,g=m.lineHeight,ut(this.afterBody,w),e.y-=a}drawFooter(e,n,i){const s=this.footer,a=s.length;let o,c;if(a){const d=Va(i.rtl,this.x,this.width);for(e.x=_d(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=d.textAlign(i.footerAlign),n.textBaseline="middle",o=Qt(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,c=0;c<a;++c)n.fillText(s[c],d.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+i.footerSpacing}}drawBackground(e,n,i,s){const{xAlign:a,yAlign:o}=this,{x:c,y:d}=e,{width:h,height:f}=i,{topLeft:m,topRight:g,bottomLeft:_,bottomRight:b}=Ar(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(c+m,d),o==="top"&&this.drawCaret(e,n,i,s),n.lineTo(c+h-g,d),n.quadraticCurveTo(c+h,d,c+h,d+g),o==="center"&&a==="right"&&this.drawCaret(e,n,i,s),n.lineTo(c+h,d+f-b),n.quadraticCurveTo(c+h,d+f,c+h-b,d+f),o==="bottom"&&this.drawCaret(e,n,i,s),n.lineTo(c+_,d+f),n.quadraticCurveTo(c,d+f,c,d+f-_),o==="center"&&a==="left"&&this.drawCaret(e,n,i,s),n.lineTo(c,d+m),n.quadraticCurveTo(c,d,c+m,d),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){const o=Sl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const c=this._size=g2(this,e),d=Object.assign({},o,this._size),h=_2(n,e,d),f=y2(e,d,h,n);(s._to!==f.x||a._to!==f.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=c.width,this.height=c.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=vn(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=i,this.drawBackground(a,e,s,n),eg(e,n.textDirection),a.y+=o.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),tg(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,s=e.map(({datasetIndex:c,index:d})=>{const h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:h.data[d],index:d}}),a=!Wc(i,s),o=this._positionChanged(s,n);(a||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,a=this._active||[],o=this._getActiveElements(e,a,n,i),c=this._positionChanged(o,e),d=n||!Wc(o,a)||c;return d&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,i,s){const a=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:s,options:a}=this,o=Sl[a.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}ae(gh,"positioners",Sl);var Wx={id:"tooltip",_element:gh,positioners:Sl,afterInit(t,e,n){n&&(t.tooltip=new gh({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:w2},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Yx=Object.freeze({__proto__:null,Colors:nx,Decimation:ax,Filler:Mx,Legend:Tx,SubTitle:$x,Title:Ax,Tooltip:Wx});const jx=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function Ux(t,e,n,i){const s=t.indexOf(e);if(s===-1)return jx(t,e,n,i);const a=t.lastIndexOf(e);return s!==a?n:s}const qx=(t,e)=>t===null?null:dn(Math.round(t),0,e);function k2(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class _h extends Lr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:a}of n)i[s]===a&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Je(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:Ux(i,e,$e(n,e),this._addedLabels),qx(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,s=[];let a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=n;o++)s.push({value:o});return s}getLabelForValue(e){return k2.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ae(_h,"id","category"),ae(_h,"defaults",{ticks:{callback:k2}});function Gx(t,e){const n=[],{bounds:s,step:a,min:o,max:c,precision:d,count:h,maxTicks:f,maxDigits:m,includeBounds:g}=t,_=a||1,b=f-1,{min:w,max:C}=e,S=!Je(o),E=!Je(c),A=!Je(h),x=(C-w)/(m+1);let T=Sm((C-w)/b/_)*_,N,L,F,q;if(T<1e-14&&!S&&!E)return[{value:w},{value:C}];q=Math.ceil(C/T)-Math.floor(w/T),q>b&&(T=Sm(q*T/b/_)*_),Je(d)||(N=Math.pow(10,d),T=Math.ceil(T*N)/N),s==="ticks"?(L=Math.floor(w/T)*T,F=Math.ceil(C/T)*T):(L=w,F=C),S&&E&&a&&Ww((c-o)/a,T/1e3)?(q=Math.round(Math.min((c-o)/T,f)),T=(c-o)/q,L=o,F=c):A?(L=S?o:L,F=E?c:F,q=h-1,T=(F-L)/q):(q=(F-L)/T,ol(q,Math.round(q),T/1e3)?q=Math.round(q):q=Math.ceil(q));const ee=Math.max(Om(T),Om(L));N=Math.pow(10,Je(d)?ee:d),L=Math.round(L*N)/N,F=Math.round(F*N)/N;let ie=0;for(S&&(g&&L!==o?(n.push({value:o}),L<o&&ie++,ol(Math.round((L+ie*T)*N)/N,o,C2(o,x,t))&&ie++):L<o&&ie++);ie<q;++ie){const K=Math.round((L+ie*T)*N)/N;if(E&&K>c)break;n.push({value:K})}return E&&g&&F!==c?n.length&&ol(n[n.length-1].value,c,C2(c,x,t))?n[n.length-1].value=c:n.push({value:c}):(!E||F===c)&&n.push({value:F}),n}function C2(t,e,{horizontal:n,minRotation:i}){const s=Ti(i),a=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}class yd extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Je(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this;const o=d=>s=n?s:d,c=d=>a=i?a:d;if(e){const d=Ji(s),h=Ji(a);d<0&&h<0?c(0):d>0&&h>0&&o(0)}if(s===a){let d=a===0?1:Math.abs(a*.05);c(a+d),e||o(s-d)}this.min=s,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,o=Gx(s,a);return e.bounds==="ticks"&&Mm(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-n)/Math.max(e.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return dl(e,this.chart.options.locale,this.options.ticks.format)}}class yh extends yd{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Ht(e)?e:0,this.max=Ht(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=Ti(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ae(yh,"id","linear"),ae(yh,"defaults",{ticks:{callback:qc.formatters.numeric}});const Ml=t=>Math.floor(Zs(t)),Fr=(t,e)=>Math.pow(10,Ml(t)+e);function x2(t){return t/Math.pow(10,Ml(t))===1}function S2(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function Kx(t,e){const n=e-t;let i=Ml(n);for(;S2(t,e,i)>10;)i++;for(;S2(t,e,i)<10;)i--;return Math.min(i,Ml(t))}function Zx(t,{min:e,max:n}){e=ei(t.min,e);const i=[],s=Ml(e);let a=Kx(e,n),o=a<0?Math.pow(10,Math.abs(a)):1;const c=Math.pow(10,a),d=s>a?Math.pow(10,s):0,h=Math.round((e-d)*o)/o,f=Math.floor((e-d)/c/10)*c*10;let m=Math.floor((h-f)/Math.pow(10,a)),g=ei(t.min,Math.round((d+f+m*Math.pow(10,a))*o)/o);for(;g<n;)i.push({value:g,major:x2(g),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(a++,m=2,o=a>=0?1:o),g=Math.round((d+f+m*Math.pow(10,a))*o)/o;const _=ei(t.max,g);return i.push({value:_,major:x2(_),significand:m}),i}class vh extends Lr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=yd.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Ht(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Ht(e)?Math.max(0,e):null,this.max=Ht(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ht(this._userMin)&&(this.min=e===Fr(this.min,0)?Fr(this.min,-1):Fr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const a=c=>i=e?i:c,o=c=>s=n?s:c;i===s&&(i<=0?(a(1),o(10)):(a(Fr(i,-1)),o(Fr(s,1)))),i<=0&&a(Fr(s,-1)),s<=0&&o(Fr(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=Zx(n,this);return e.bounds==="ticks"&&Mm(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":dl(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Zs(e),this._valueRange=Zs(this.max)-Zs(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Zs(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}ae(vh,"id","logarithmic"),ae(vh,"defaults",{ticks:{callback:qc.formatters.logarithmic,major:{enabled:!0}}});function bh(t){const e=t.ticks;if(e.display&&t.display){const n=vn(e.backdropPadding);return $e(e.font&&e.font.size,Wt.font.size)+n.height}return 0}function Xx(t,e,n){return n=Et(n)?n:[n],{w:a9(t,e.string,n),h:n.length*e.lineHeight}}function M2(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:t<i||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function Jx(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],a=t._pointLabels.length,o=t.options.pointLabels,c=o.centerPointLabels?Vt/a:0;for(let d=0;d<a;d++){const h=o.setContext(t.getPointLabelContext(d));s[d]=h.padding;const f=t.getPointPosition(d,t.drawingArea+s[d],c),m=Qt(h.font),g=Xx(t.ctx,m,t._pointLabels[d]);i[d]=g;const _=ti(t.getIndexAngle(d)+c),b=Math.round(P1(_)),w=M2(b,f.x,g.w,0,180),C=M2(b,f.y,g.h,90,270);Qx(n,e,_,w,C)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=nS(t,i,s)}function Qx(t,e,n,i,s){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let c=0,d=0;i.start<e.l?(c=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-c)):i.end>e.r&&(c=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+c)),s.start<e.t?(d=(e.t-s.start)/o,t.t=Math.min(t.t,e.t-d)):s.end>e.b&&(d=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+d))}function eS(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:a,padding:o,size:c}=n,d=t.getPointPosition(e,i+s+o,a),h=Math.round(P1(ti(d.angle+Ut))),f=rS(d.y,c.h,h),m=iS(h),g=sS(d.x,c.w,m);return{visible:!0,x:d.x,y:f,textAlign:m,left:g,top:f,right:g+c.w,bottom:f+c.h}}function tS(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:a}=t;return!(vs({x:n,y:i},e)||vs({x:n,y:a},e)||vs({x:s,y:i},e)||vs({x:s,y:a},e))}function nS(t,e,n){const i=[],s=t._pointLabels.length,a=t.options,{centerPointLabels:o,display:c}=a.pointLabels,d={extra:bh(a)/2,additionalAngle:o?Vt/s:0};let h;for(let f=0;f<s;f++){d.padding=n[f],d.size=e[f];const m=eS(t,f,d);i.push(m),c==="auto"&&(m.visible=tS(m,h),m.visible&&(h=m))}return i}function iS(t){return t===0||t===180?"center":t<180?"left":"right"}function sS(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function rS(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function aS(t,e,n){const{left:i,top:s,right:a,bottom:o}=n,{backdropColor:c}=e;if(!Je(c)){const d=Ar(e.borderRadius),h=vn(e.backdropPadding);t.fillStyle=c;const f=i-h.left,m=s-h.top,g=a-i+h.width,_=o-s+h.height;Object.values(d).some(b=>b!==0)?(t.beginPath(),hl(t,{x:f,y:m,w:g,h:_,radius:d}),t.fill()):t.fillRect(f,m,g,_)}}function oS(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const a=t._pointLabelItems[s];if(!a.visible)continue;const o=i.setContext(t.getPointLabelContext(s));aS(n,o,a);const c=Qt(o.font),{x:d,y:h,textAlign:f}=a;Ir(n,t._pointLabels[s],d,h+c.lineHeight/2,c,{color:o.color,textAlign:f,textBaseline:"middle"})}}function O2(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Bt);else{let a=t.getPointPosition(0,e);s.moveTo(a.x,a.y);for(let o=1;o<i;o++)a=t.getPointPosition(o,e),s.lineTo(a.x,a.y)}}function lS(t,e,n,i,s){const a=t.ctx,o=e.circular,{color:c,lineWidth:d}=e;!o&&!i||!c||!d||n<0||(a.save(),a.strokeStyle=c,a.lineWidth=d,a.setLineDash(s.dash),a.lineDashOffset=s.dashOffset,a.beginPath(),O2(t,n,o,i),a.closePath(),a.stroke(),a.restore())}function cS(t,e,n){return Xs(t,{label:n,index:e,type:"pointLabel"})}class Ol extends yd{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=vn(bh(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=Ht(e)&&!isNaN(e)?e:0,this.max=Ht(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/bh(this.options))}generateTickLabels(e){yd.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const s=Mt(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?Jx(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,s))}getIndexAngle(e){const n=Bt/(this._pointLabels.length||1),i=this.options.startAngle||0;return ti(e*n+Ti(i))}getDistanceFromCenterForValue(e){if(Je(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Je(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const i=n[e];return cS(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const s=this.getIndexAngle(e)-Ut+i;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:i,right:s,bottom:a}=this._pointLabelItems[e];return{left:n,top:i,right:s,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),O2(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:s,border:a}=n,o=this._pointLabels.length;let c,d,h;if(n.pointLabels.display&&oS(this,o),s.display&&this.ticks.forEach((f,m)=>{if(m!==0||m===0&&this.min<0){d=this.getDistanceFromCenterForValue(f.value);const g=this.getContext(m),_=s.setContext(g),b=a.setContext(g);lS(this,_,d,o,b)}}),i.display){for(e.save(),c=o-1;c>=0;c--){const f=i.setContext(this.getPointLabelContext(c)),{color:m,lineWidth:g}=f;!g||!m||(e.lineWidth=g,e.strokeStyle=m,e.setLineDash(f.borderDash),e.lineDashOffset=f.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),h=this.getPointPosition(c,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(h.x,h.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let a,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const h=i.setContext(this.getContext(d)),f=Qt(h.font);if(a=this.getDistanceFromCenterForValue(this.ticks[d].value),h.showLabelBackdrop){e.font=f.string,o=e.measureText(c.label).width,e.fillStyle=h.backdropColor;const m=vn(h.backdropPadding);e.fillRect(-o/2-m.left,-a-f.size/2-m.top,o+m.width,f.size+m.height)}Ir(e,c.label,0,-a,f,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),e.restore()}drawTitle(){}}ae(Ol,"id","radialLinear"),ae(Ol,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:qc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),ae(Ol,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ae(Ol,"descriptors",{angleLines:{_fallback:"grid"}});const vd={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}},Hn=Object.keys(vd);function D2(t,e){return t-e}function E2(t,e){if(Je(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:a}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Ht(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Oa(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,s)),+o)}function V2(t,e,n,i){const s=Hn.length;for(let a=Hn.indexOf(t);a<s-1;++a){const o=vd[Hn[a]],c=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(c*o.size))<=i)return Hn[a]}return Hn[s-1]}function dS(t,e,n,i,s){for(let a=Hn.length-1;a>=Hn.indexOf(n);a--){const o=Hn[a];if(vd[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return Hn[n?Hn.indexOf(n):0]}function uS(t){for(let e=Hn.indexOf(t)+1,n=Hn.length;e<n;++e)if(vd[Hn[e]].common)return Hn[e]}function B2(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:s}=F1(n,e),a=n[i]>=e?n[i]:n[s];t[a]=!0}}function hS(t,e,n,i){const s=t._adapter,a=+s.startOf(e[0].value,i),o=e[e.length-1].value;let c,d;for(c=a;c<=o;c=+s.add(c,1,i))d=n[c],d>=0&&(e[d].major=!0);return e}function T2(t,e,n){const i=[],s={},a=e.length;let o,c;for(o=0;o<a;++o)c=e[o],s[c]=o,i.push({value:c,major:!1});return a===0||!n?i:hS(t,i,s,n)}class Dl extends Lr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const i=e.time||(e.time={}),s=this._adapter=new wg._date(e.adapters.date);s.init(n),rl(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:E2(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:s,max:a,minDefined:o,maxDefined:c}=this.getUserBounds();function d(h){!o&&!isNaN(h.min)&&(s=Math.min(s,h.min)),!c&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!o||!c)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),s=Ht(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),a=Ht(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const a=this.min,o=this.max,c=qw(s,a,o);return this._unit=n.unit||(i.autoSkip?V2(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):dS(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:uS(this._unit),this.initOffsets(s),e.reverse&&c.reverse(),T2(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,i=0,s,a;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?i=a:i=(a-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=dn(n,0,o),i=dn(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,s=this.options,a=s.time,o=a.unit||V2(a.minUnit,n,i,this._getLabelCapacity(n)),c=$e(s.ticks.stepSize,1),d=o==="week"?a.isoWeekday:!1,h=Oa(d)||d===!0,f={};let m=n,g,_;if(h&&(m=+e.startOf(m,"isoWeek",d)),m=+e.startOf(m,h?"day":o),e.diff(i,n,o)>1e5*c)throw new Error(n+" and "+i+" are too far apart with stepSize of "+c+" "+o);const b=s.ticks.source==="data"&&this.getDataTimestamps();for(g=m,_=0;g<i;g=+e.add(g,c,o),_++)B2(f,g,b);return(g===i||s.bounds==="ticks"||_===1)&&B2(f,g,b),Object.keys(f).sort(D2).map(w=>+w)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,a=this._unit,o=n||s[a];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,s){const a=this.options,o=a.ticks.callback;if(o)return Mt(o,[e,n,i],this);const c=a.time.displayFormats,d=this._unit,h=this._majorUnit,f=d&&c[d],m=h&&c[h],g=i[n],_=h&&m&&g&&g.major;return this._adapter.format(e,s||(_?m:f))}generateTickLabels(e){let n,i,s;for(n=0,i=e.length;n<i;++n)s=e[n],s.label=this._tickFormatFunction(s.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,s=Ti(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(s),o=Math.sin(s),c=this._resolveTickFontOptions(0).size;return{w:i*a+c*o,h:i*o+c*a}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,a=this._tickFormatFunction(e,0,T2(this,[e],this._majorUnit),s),o=this._getLabelSize(a),c=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)e=e.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)e.push(E2(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Bm(e.sort(D2))}}ae(Dl,"id","time"),ae(Dl,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function bd(t,e,n){let i=0,s=t.length-1,a,o,c,d;n?(e>=t[i].pos&&e<=t[s].pos&&({lo:i,hi:s}=ys(t,"pos",e)),{pos:a,time:c}=t[i],{pos:o,time:d}=t[s]):(e>=t[i].time&&e<=t[s].time&&({lo:i,hi:s}=ys(t,"time",e)),{time:a,pos:c}=t[i],{time:o,pos:d}=t[s]);const h=o-a;return h?c+(d-c)*(e-a)/h:c}class wh extends Dl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=bd(n,this.min),this._tableRange=bd(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,s=[],a=[];let o,c,d,h,f;for(o=0,c=e.length;o<c;++o)h=e[o],h>=n&&h<=i&&s.push(h);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,c=s.length;o<c;++o)f=s[o+1],d=s[o-1],h=s[o],Math.round((f+d)/2)!==h&&a.push({time:h,pos:o/(c-1)});return a}_generate(){const e=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((s,a)=>s-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(bd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return bd(this._table,i*this._tableRange+this._minPos,!0)}}ae(wh,"id","timeseries"),ae(wh,"defaults",Dl.defaults);var fS=Object.freeze({__proto__:null,CategoryScale:_h,LinearScale:yh,LogarithmicScale:vh,RadialLinearScale:Ol,TimeScale:Dl,TimeSeriesScale:wh});const kh=[wk,ZC,Yx,fS],I2={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},pS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...I2,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},mS=r.version[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Ia(t){return r.isProxy(t)?r.toRaw(t):t}function gS(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return r.isProxy(e)?new Proxy(t,{}):t}function _S(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function A2(t,e){t.labels=e}function $2(t,e,n){const i=[];t.datasets=e.map(s=>{const a=t.datasets.find(o=>o[n]===s[n]);return!a||!s.data||i.includes(a)?{...s}:(i.push(a),Object.assign(a,s),a)})}function yS(t,e){const n={labels:[],datasets:[]};return A2(n,t.labels),$2(n,t.datasets,e),n}const vS=r.defineComponent({props:pS,setup(t,e){let{expose:n,slots:i}=e;const s=r.ref(null),a=r.shallowRef(null);n({chart:a});const o=()=>{if(!s.value)return;const{type:h,data:f,options:m,plugins:g,datasetIdKey:_}=t,b=yS(f,_),w=gS(b,f);a.value=new mi(s.value,{type:h,data:w,options:{...m},plugins:g})},c=()=>{const h=r.toRaw(a.value);h&&(t.destroyDelay>0?setTimeout(()=>{h.destroy(),a.value=null},t.destroyDelay):(h.destroy(),a.value=null))},d=h=>{h.update(t.updateMode)};return r.onMounted(o),r.onUnmounted(c),r.watch([()=>t.options,()=>t.data],(h,f)=>{let[m,g]=h,[_,b]=f;const w=r.toRaw(a.value);if(!w)return;let C=!1;if(m){const S=Ia(m),E=Ia(_);S&&S!==E&&(_S(w,S),C=!0)}if(g){const S=Ia(g.labels),E=Ia(b.labels),A=Ia(g.datasets),x=Ia(b.datasets);S!==E&&(A2(w.config.data,S),C=!0),A&&A!==x&&($2(w.config.data,A,t.datasetIdKey),C=!0)}C&&r.nextTick(()=>{d(w)})},{deep:!0}),()=>r.h("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[r.h("p",{},[i.default?i.default():""])])}});function El(t,e){return mi.register(e),r.defineComponent({props:I2,setup(n,i){let{expose:s}=i;const a=r.shallowRef(null),o=c=>{a.value=c==null?void 0:c.chart};return s({chart:a}),()=>r.h(vS,mS({ref:o},{type:t,...n}))}})}const N2=El("bar",ml),z2=El("doughnut",Js),bS=El("line",gl),wS=El("pie",nd),kS=El("polarArea",Ba),Wn={gp50:"#f3fcf8",gp100:"#e2f8ef",gp200:"#abedd3",gp300:"#6ddfb1",gp400:"#2db981",gp500:"#239f6d",gp600:"#1c7d56",gp700:"#136746",ta50:"#eefcfa",ta100:"#dcf9f6",ta200:"#a2f1e5",ta300:"#51e6d0",ta400:"#20c5ad",ta500:"#18aa94",ta600:"#138675",ta700:"#0f6b5d",ts50:"#f5fbff",ts100:"#e6f6fe",ts200:"#C2EDFF",ts300:"#7BD0F4",ts400:"#42AAD7",ts500:"#1F86B2",ts600:"#18698B",ts700:"#155875",bn50:"#f6f9fe",bn100:"#e6effe",bn200:"#b4cdf8",bn300:"#729ee9",bn400:"#467bd8",bn500:"#2f64c1",bn600:"#2051a7",bn700:"#19438a",in50:"#f5f6ff",in100:"#ebefff",in200:"#CED6FD",in300:"#9bacf8",in400:"#6a7cd7",in500:"#4b5caf",in600:"#374486",in700:"#2f396f",vr50:"#faf5ff",vr100:"#f7f0ff",vr200:"#E6D2F9",vr300:"#CEABED",vr400:"#a772d5",vr500:"#8955B9",vr600:"#6B3A98",vr700:"#5c3082",pp50:"#fff5fb",pp100:"#ffebf7",pp200:"#F9C8E2",pp300:"#EF8FC0",pp400:"#DA629F",pp500:"#BE377C",pp600:"#A12663",pp700:"#88255a",rc50:"#fef6f7",rc100:"#ffebed",rc200:"#FABDC5",rc300:"#F98B98",rc400:"#F3596C",rc500:"#E03E52",rc600:"#C92C3F",rc700:"#b22435",og50:"#fef7f6",og100:"#ffefeb",og200:"#FFD6CC",og300:"#FDAF9B",og400:"#FF8567",og500:"#F06442",og600:"#D64B29",og700:"#bc4224",al50:"#fefbf6",al100:"#fdf3e2",al200:"#ffe5b8",al300:"#fdd286",al400:"#f6bd5a",al500:"#eda831",al600:"#d89013",al700:"#c08011",n0:"#FFFFFF",n10:"#FAFCFE",n20:"#F4F8FB",n30:"#E7EDF3",n40:"#DFE5EC",n50:"#D6DCE3",n100:"#C3CCD5",n200:"#ACB8C3",n300:"#99A6B2",n400:"#8794A1",n500:"#647382",n600:"#52616F",n700:"#3B4754",n800:"#28333E",n900:"#1D262F",palete:'["Light Neutrals", "Light", #FFFFFF, #FAFCFE, #F4F8FB, #E7EDF3, #DFE5EC, "$n-0", "$n-10", "$n-20", "$n-30", "$n-40"], ["Mid Neutrals", "Gray", #D6DCE3, #C3CCD5, #ACB8C3, #99A6B2, #8794A1, "$n-50", "$n-100", "$n-200", "$n-300", "$n-400"], ["Dark Neutrals", "Dark", #647382, #52616F, #3B4754, #28333E, #1D262F, "$n-500", "$n-600", "$n-700", "$n-800", "$n-900"], ["Piccolo Green", "Green", #f3fcf8, #e2f8ef, #abedd3, #6ddfb1, #2db981, #239f6d, #1c7d56, #136746, "$gp-50", "$gp-100", "$gp-200", "$gp-300", "$gp-400", "$gp-500", "$gp-600", "$gp-700"], ["Aquaman Teal", "Teal", #eefcfa, #dcf9f6, #a2f1e5, #51e6d0, #20c5ad, #18aa94, #138675, #0f6b5d, "$ta-50", "$ta-100", "$ta-200", "$ta-300", "$ta-400", "$ta-500", "$ta-600", "$ta-700"], ["Sulivan Turquoise", "Turquoise", #f5fbff, #e6f6fe, #C2EDFF, #7BD0F4, #42AAD7, #1F86B2, #18698B, #155875, "$ts-50", "$ts-100", "$ts-200", "$ts-300", "$ts-400", "$ts-500", "$ts-600", "$ts-700"], ["Nocturne Blue", "Blue", #f6f9fe, #e6effe, #b4cdf8, #729ee9, #467bd8, #2f64c1, #2051a7, #19438a, "$bn-50", "$bn-100", "$bn-200", "$bn-300", "$bn-400", "$bn-500", "$bn-600", "$bn-700"], ["Nightwing Indigo", "Indigo", #f5f6ff, #ebefff, #CED6FD, #9bacf8, #6a7cd7, #4b5caf, #374486, #2f396f, "$in-50", "$in-100", "$in-200", "$in-300", "$in-400", "$in-500", "$in-600", "$in-700"], ["Raven Violet", "Violet", #faf5ff, #f7f0ff, #E6D2F9, #CEABED, #a772d5, #8955B9, #6B3A98, #5c3082, "$vr-50", "$vr-100", "$vr-200", "$vr-300", "$vr-400", "$vr-500", "$vr-600", "$vr-700"], ["Peppa Pink", "Pink", #fff5fb, #ffebf7, #F9C8E2, #EF8FC0, #DA629F, #BE377C, #A12663, #88255a, "$pp-50", "$pp-100", "$pp-200", "$pp-300", "$pp-400", "$pp-500", "$pp-600", "$pp-700"], ["Carmen Red", "Red", #fef6f7, #ffebed, #FABDC5, #F98B98, #F3596C, #E03E52, #C92C3F, #b22435, "$rc-50", "$rc-100", "$rc-200", "$rc-300", "$rc-400", "$rc-500", "$rc-600", "$rc-700"], ["Goku Orange", "Orange", #fef7f6, #ffefeb, #FFD6CC, #FDAF9B, #FF8567, #F06442, #D64B29, #bc4224, "$og-50", "$og-100", "$og-200", "$og-300", "$og-400", "$og-500", "$og-600", "$og-700"], ["Lisa Amber", "Amber", #fefbf6, #fdf3e2, #ffe5b8, #fdd286, #f6bd5a, #eda831, #d89013, #c08011, "$al-50", "$al-100", "$al-200", "$al-300", "$al-400", "$al-500", "$al-600", "$al-700"]',chartThemes:'["Blue Theme", "Blue", #467bd8, #42AAD7, #20c5ad, #19438a, #4b5caf, #6ddfb1, #FFD6CC, #ffefeb, #ffe5b8, #fdd286, "$bn-400", "$ts-400", "$ta-400", "$bn-700", "$in-500", "$gp-300", "$og-200", "$og-100", "$al-200", "$al-300"], ["Indigo Theme", "Indigo", #4b5caf, #CEABED, #FDAF9B, #ffebf7, #FFD6CC, #6a7cd7, #E7EDF3, #EF8FC0, #a772d5, #3B4754, "$in-500", "$pp-100", "$og-200", "$vr-300", "$in-400", "$og-300", "$n-30", "$n-700", "$vr-400", "$pp-300"]'},ts=t=>{let e=[],n={};const i=/(\[[^[\]]*\])/g,s=t.match(i);for(let a=0;a<s.length;a++){s[a]=s[a].replace("[",""),s[a]=s[a].replace("]","");let o=s[a].split(",");n.colorName=o[0].trim().replace(/"/g,""),n.variantName=o[1].trim().replace(/"/g,""),n.color400=o[6],n.colorShades=[],n.colorTokens=[],n.colorData=[];let c=!1;for(let d=2,h=2;d<o.length;d++,h++)o[d].includes("#")?(n.colorShades.push(o[d].trim()),n.colorData[h-2]={},n.colorData[h-2].shade=o[d].trim()):o[d].includes("$")&&(n.colorTokens.push(o[d].trim().replace(/"/g,"")),n.colorData[h-2].token=o[d].trim().replace(/"/g,"")),!c&&o[d+1].includes("$")&&(h=1,c=!0);e.push(n),n={}}return e},Hue="";mi.register(...kh);const CS={components:{Bar:N2},props:{data:{type:Object,required:!0,default:()=>({datasets:[{label:"",data:[]}]})},variant:{type:String,required:!0,default:"green",validator:t=>["green","turquoise","blue","indigo","violet","pink","red","orange","amber","gray","dark"].includes(t)},labels:{type:Array,required:!0,default:()=>[]},barWidth:{type:Number,default:1},horizontalBar:{type:Boolean,default:!1}},data(){return{sassColorVariables:Wn,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{responsive:!0,maintainAspectRatio:!1,categoryPercentage:null,plugins:{tooltip:{callbacks:{beforeTitle:function(t){return`${t[0].dataset.name}`}}},legend:{display:!0,labels:{usePointStyle:!0,pointStyle:"rectRounded"}}}}}},watch:{labels:{handler(t){this.localLabels=t},immediate:!0},variant:{handler(t){t==="gray"||t==="dark"?this.deleteFirstTwoColors=!0:this.deleteFirstTwoColors=!1},immediate:!0},data:{handler(t){this.mergeChartDataNoSelect(t)},immediate:!0},barWidth:{handler(t){t>=.1&&t<=1?this.chartOptions.categoryPercentage=t:this.chartOptions.categoryPercentage=1},immediate:!0}},mounted(){this.horizontalBar&&(this.chartOptions={...this.chartOptions,indexAxis:"y",scales:{y:{beginAtZero:!0}}})},methods:{paleteBuilder:ts,palete(){this.palletColors=this.paleteBuilder(this.sassColorVariables.palete),this.removeFirstTwoElements()},removeFirstTwoElements(){for(let t=0;t<this.palletColors.length;t++){const e=this.palletColors[t];this.deleteFirstTwoColors===!1&&(e.colorShades.splice(0,2),e.colorTokens.splice(0,2),e.colorData.splice(0,2))}},addDataSetNames(){this.data.forEach(t=>{t.datasets.forEach(e=>{e.name=t.name})})},mergeChartDataNoSelect(t){const e={labels:this.localLabels,datasets:[]};this.addDataSetNames(),t.forEach(i=>{i.datasets.forEach(s=>{const a={label:s.label,data:s.data,name:s.name,borderRadius:6};e.datasets.push(a)})}),this.palete();const n=this.generateBackgroundColor();this.setColors(e.datasets,n),this.localChartData=e},generateBackgroundColor(){const t=this.variant.toLowerCase(),e=this.palletColors.find(n=>n.variantName.toLowerCase().includes(t));return e?e.colorShades:[]},setColors(t,e){const n={};this.chartOptions.plugins.legend.display=!0,t.forEach(i=>{const s=i.name;let a;t.length===1&&(a=2,n[s]=e[a],this.chartOptions.plugins.legend.display=!1),n[s]||(a=Object.keys(n).length%e.length,n[s]=e[a]),i.backgroundColor=n[s],i.borderRadius=6})}}},xS={class:"responsive-container"};function SS(t,e,n,i,s,a){const o=r.resolveComponent("Bar");return r.openBlock(),r.createElementBlock("span",null,[r.createElementVNode("div",xS,[r.createVNode(o,{is:"bar",data:s.localChartData,options:s.chartOptions},null,8,["data","options"])])])}const MS=te(CS,[["render",SS],["__scopeId","data-v-94123a79"]]);class Rr extends Error{}class OS extends Rr{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class DS extends Rr{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class ES extends Rr{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Aa extends Rr{}class P2 extends Rr{constructor(e){super(`Invalid unit ${e}`)}}class Yn extends Rr{}class tr extends Rr{constructor(){super("Zone is an abstract class")}}const ce="numeric",$i="short",ni="long",wd={year:ce,month:ce,day:ce},L2={year:ce,month:$i,day:ce},VS={year:ce,month:$i,day:ce,weekday:$i},F2={year:ce,month:ni,day:ce},R2={year:ce,month:ni,day:ce,weekday:ni},H2={hour:ce,minute:ce},W2={hour:ce,minute:ce,second:ce},Y2={hour:ce,minute:ce,second:ce,timeZoneName:$i},j2={hour:ce,minute:ce,second:ce,timeZoneName:ni},U2={hour:ce,minute:ce,hourCycle:"h23"},q2={hour:ce,minute:ce,second:ce,hourCycle:"h23"},G2={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:$i},K2={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:ni},Z2={year:ce,month:ce,day:ce,hour:ce,minute:ce},X2={year:ce,month:ce,day:ce,hour:ce,minute:ce,second:ce},J2={year:ce,month:$i,day:ce,hour:ce,minute:ce},Q2={year:ce,month:$i,day:ce,hour:ce,minute:ce,second:ce},BS={year:ce,month:$i,day:ce,weekday:$i,hour:ce,minute:ce},e3={year:ce,month:ni,day:ce,hour:ce,minute:ce,timeZoneName:$i},t3={year:ce,month:ni,day:ce,hour:ce,minute:ce,second:ce,timeZoneName:$i},n3={year:ce,month:ni,day:ce,weekday:ni,hour:ce,minute:ce,timeZoneName:ni},i3={year:ce,month:ni,day:ce,weekday:ni,hour:ce,minute:ce,second:ce,timeZoneName:ni};class Vl{get type(){throw new tr}get name(){throw new tr}get ianaName(){return this.name}get isUniversal(){throw new tr}offsetName(e,n){throw new tr}formatOffset(e,n){throw new tr}offset(e){throw new tr}equals(e){throw new tr}get isValid(){throw new tr}}let Ch=null;class kd extends Vl{static get instance(){return Ch===null&&(Ch=new kd),Ch}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:i}){return O3(e,n,i)}formatOffset(e,n){return Al(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let Cd={};function TS(t){return Cd[t]||(Cd[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Cd[t]}const IS={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function AS(t,e){const n=t.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,o,c,d,h,f]=i;return[o,s,a,c,d,h,f]}function $S(t,e){const n=t.formatToParts(e),i=[];for(let s=0;s<n.length;s++){const{type:a,value:o}=n[s],c=IS[a];a==="era"?i[c]=o:Be(c)||(i[c]=parseInt(o,10))}return i}let xd={};class ks extends Vl{static create(e){return xd[e]||(xd[e]=new ks(e)),xd[e]}static resetCache(){xd={},Cd={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ks.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:i}){return O3(e,n,i,this.name)}formatOffset(e,n){return Al(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const i=TS(this.name);let[s,a,o,c,d,h,f]=i.formatToParts?$S(i,n):AS(i,n);c==="BC"&&(s=-Math.abs(s)+1);const g=Ed({year:s,month:a,day:o,hour:d===24?0:d,minute:h,second:f,millisecond:0});let _=+n;const b=_%1e3;return _-=b>=0?b:1e3+b,(g-_)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let s3={};function NS(t,e={}){const n=JSON.stringify([t,e]);let i=s3[n];return i||(i=new Intl.ListFormat(t,e),s3[n]=i),i}let xh={};function Sh(t,e={}){const n=JSON.stringify([t,e]);let i=xh[n];return i||(i=new Intl.DateTimeFormat(t,e),xh[n]=i),i}let Mh={};function zS(t,e={}){const n=JSON.stringify([t,e]);let i=Mh[n];return i||(i=new Intl.NumberFormat(t,e),Mh[n]=i),i}let Oh={};function PS(t,e={}){const{base:n,...i}=e,s=JSON.stringify([t,i]);let a=Oh[s];return a||(a=new Intl.RelativeTimeFormat(t,e),Oh[s]=a),a}let Bl=null;function LS(){return Bl||(Bl=new Intl.DateTimeFormat().resolvedOptions().locale,Bl)}let r3={};function FS(t){let e=r3[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,r3[t]=e}return e}function RS(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let i,s;try{i=Sh(t).resolvedOptions(),s=t}catch{const d=t.substring(0,n);i=Sh(d).resolvedOptions(),s=d}const{numberingSystem:a,calendar:o}=i;return[s,a,o]}}function HS(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function WS(t){const e=[];for(let n=1;n<=12;n++){const i=ue.utc(2009,n,1);e.push(t(i))}return e}function YS(t){const e=[];for(let n=1;n<=7;n++){const i=ue.utc(2016,11,13+n);e.push(t(i))}return e}function Sd(t,e,n,i){const s=t.listingMode();return s==="error"?null:s==="en"?n(e):i(e)}function jS(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class US{constructor(e,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:a,...o}=i;if(!n||Object.keys(o).length>0){const c={useGrouping:!1,...i};i.padTo>0&&(c.minimumIntegerDigits=i.padTo),this.inf=zS(e,c)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):Ah(e,3);return Xt(n,this.padTo)}}}class qS{constructor(e,n,i){this.opts=i,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),c=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ks.create(c).valid?(s=c,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Sh(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class GS{constructor(e,n,i){this.opts={style:"long",...i},!n&&C3()&&(this.rtf=PS(e,i))}format(e,n){return this.rtf?this.rtf.format(e,n):pM(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const KS={firstDay:1,minimalDays:4,weekend:[6,7]};class yt{static fromOpts(e){return yt.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,i,s,a=!1){const o=e||qt.defaultLocale,c=o||(a?"en-US":LS()),d=n||qt.defaultNumberingSystem,h=i||qt.defaultOutputCalendar,f=Th(s)||qt.defaultWeekSettings;return new yt(c,d,h,f,o)}static resetCache(){Bl=null,xh={},Mh={},Oh={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:i,weekSettings:s}={}){return yt.create(e,n,i,s)}constructor(e,n,i,s,a){const[o,c,d]=RS(e);this.locale=o,this.numberingSystem=n||c||null,this.outputCalendar=i||d||null,this.weekSettings=s,this.intl=HS(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=jS(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:yt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Th(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return Sd(this,e,V3,()=>{const i=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=WS(a=>this.extract(a,i,"month"))),this.monthsCache[s][e]})}weekdays(e,n=!1){return Sd(this,e,I3,()=>{const i=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=n?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=YS(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Sd(this,void 0,()=>A3,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ue.utc(2016,11,13,9),ue.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Sd(this,e,$3,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[ue.utc(-40,1,1),ue.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[e]})}extract(e,n,i){const s=this.dtFormatter(e,n),a=s.formatToParts(),o=a.find(c=>c.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new US(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new qS(e,this.intl,n)}relFormatter(e={}){return new GS(this.intl,this.isEnglish(),e)}listFormatter(e={}){return NS(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:x3()?FS(this.locale):KS}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let Dh=null;class Vn extends Vl{static get utcInstance(){return Dh===null&&(Dh=new Vn(0)),Dh}static instance(e){return e===0?Vn.utcInstance:new Vn(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Vn(Vd(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Al(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Al(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Al(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class ZS extends Vl{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function nr(t,e){if(Be(t)||t===null)return e;if(t instanceof Vl)return t;if(QS(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?kd.instance:n==="utc"||n==="gmt"?Vn.utcInstance:Vn.parseSpecifier(n)||ks.create(t)}else return Hr(t)?Vn.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new ZS(t)}let a3=()=>Date.now(),o3="system",l3=null,c3=null,d3=null,u3=60,h3,f3=null;class qt{static get now(){return a3}static set now(e){a3=e}static set defaultZone(e){o3=e}static get defaultZone(){return nr(o3,kd.instance)}static get defaultLocale(){return l3}static set defaultLocale(e){l3=e}static get defaultNumberingSystem(){return c3}static set defaultNumberingSystem(e){c3=e}static get defaultOutputCalendar(){return d3}static set defaultOutputCalendar(e){d3=e}static get defaultWeekSettings(){return f3}static set defaultWeekSettings(e){f3=Th(e)}static get twoDigitCutoffYear(){return u3}static set twoDigitCutoffYear(e){u3=e%100}static get throwOnInvalid(){return h3}static set throwOnInvalid(e){h3=e}static resetCaches(){yt.resetCache(),ks.resetCache()}}class Ni{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const p3=[0,31,59,90,120,151,181,212,243,273,304,334],m3=[0,31,60,91,121,152,182,213,244,274,305,335];function gi(t,e){return new Ni("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Eh(t,e,n){const i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function g3(t,e,n){return n+(Tl(t)?m3:p3)[e-1]}function _3(t,e){const n=Tl(t)?m3:p3,i=n.findIndex(a=>a<e),s=e-n[i];return{month:i+1,day:s}}function Vh(t,e){return(t-e+7)%7+1}function Md(t,e=4,n=1){const{year:i,month:s,day:a}=t,o=g3(i,s,a),c=Vh(Eh(i,s,a),n);let d=Math.floor((o-c+14-e)/7),h;return d<1?(h=i-1,d=Il(h,e,n)):d>Il(i,e,n)?(h=i+1,d=1):h=i,{weekYear:h,weekNumber:d,weekday:c,...Td(t)}}function y3(t,e=4,n=1){const{weekYear:i,weekNumber:s,weekday:a}=t,o=Vh(Eh(i,1,e),n),c=Na(i);let d=s*7+a-o-7+e,h;d<1?(h=i-1,d+=Na(h)):d>c?(h=i+1,d-=Na(i)):h=i;const{month:f,day:m}=_3(h,d);return{year:h,month:f,day:m,...Td(t)}}function Bh(t){const{year:e,month:n,day:i}=t,s=g3(e,n,i);return{year:e,ordinal:s,...Td(t)}}function v3(t){const{year:e,ordinal:n}=t,{month:i,day:s}=_3(e,n);return{year:e,month:i,day:s,...Td(t)}}function b3(t,e){if(!Be(t.localWeekday)||!Be(t.localWeekNumber)||!Be(t.localWeekYear)){if(!Be(t.weekday)||!Be(t.weekNumber)||!Be(t.weekYear))throw new Aa("Cannot mix locale-based week fields with ISO-based week fields");return Be(t.localWeekday)||(t.weekday=t.localWeekday),Be(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Be(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function XS(t,e=4,n=1){const i=Od(t.weekYear),s=_i(t.weekNumber,1,Il(t.weekYear,e,n)),a=_i(t.weekday,1,7);return i?s?a?!1:gi("weekday",t.weekday):gi("week",t.weekNumber):gi("weekYear",t.weekYear)}function JS(t){const e=Od(t.year),n=_i(t.ordinal,1,Na(t.year));return e?n?!1:gi("ordinal",t.ordinal):gi("year",t.year)}function w3(t){const e=Od(t.year),n=_i(t.month,1,12),i=_i(t.day,1,Dd(t.year,t.month));return e?n?i?!1:gi("day",t.day):gi("month",t.month):gi("year",t.year)}function k3(t){const{hour:e,minute:n,second:i,millisecond:s}=t,a=_i(e,0,23)||e===24&&n===0&&i===0&&s===0,o=_i(n,0,59),c=_i(i,0,59),d=_i(s,0,999);return a?o?c?d?!1:gi("millisecond",s):gi("second",i):gi("minute",n):gi("hour",e)}function Be(t){return typeof t>"u"}function Hr(t){return typeof t=="number"}function Od(t){return typeof t=="number"&&t%1===0}function QS(t){return typeof t=="string"}function eM(t){return Object.prototype.toString.call(t)==="[object Date]"}function C3(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function x3(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function tM(t){return Array.isArray(t)?t:[t]}function S3(t,e,n){if(t.length!==0)return t.reduce((i,s)=>{const a=[e(s),s];return i&&n(i[0],a[0])===i[0]?i:a},null)[1]}function nM(t,e){return e.reduce((n,i)=>(n[i]=t[i],n),{})}function $a(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Th(t){if(t==null)return null;if(typeof t!="object")throw new Yn("Week settings must be an object");if(!_i(t.firstDay,1,7)||!_i(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!_i(e,1,7)))throw new Yn("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function _i(t,e,n){return Od(t)&&t>=e&&t<=n}function iM(t,e){return t-e*Math.floor(t/e)}function Xt(t,e=2){const n=t<0;let i;return n?i="-"+(""+-t).padStart(e,"0"):i=(""+t).padStart(e,"0"),i}function ir(t){if(!(Be(t)||t===null||t===""))return parseInt(t,10)}function Wr(t){if(!(Be(t)||t===null||t===""))return parseFloat(t)}function Ih(t){if(!(Be(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Ah(t,e,n=!1){const i=10**e;return(n?Math.trunc:Math.round)(t*i)/i}function Tl(t){return t%4===0&&(t%100!==0||t%400===0)}function Na(t){return Tl(t)?366:365}function Dd(t,e){const n=iM(e-1,12)+1,i=t+(e-n)/12;return n===2?Tl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ed(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function M3(t,e,n){return-Vh(Eh(t,1,e),n)+e-1}function Il(t,e=4,n=1){const i=M3(t,e,n),s=M3(t+1,e,n);return(Na(t)-i+s)/7}function $h(t){return t>99?t:t>qt.twoDigitCutoffYear?1900+t:2e3+t}function O3(t,e,n,i=null){const s=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(a.timeZone=i);const o={timeZoneName:e,...a},c=new Intl.DateTimeFormat(n,o).formatToParts(s).find(d=>d.type.toLowerCase()==="timezonename");return c?c.value:null}function Vd(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const i=parseInt(e,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function D3(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Yn(`Invalid unit value ${t}`);return e}function Bd(t,e){const n={};for(const i in t)if($a(t,i)){const s=t[i];if(s==null)continue;n[e(i)]=D3(s)}return n}function Al(t,e){const n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${Xt(n,2)}:${Xt(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Xt(n,2)}${Xt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Td(t){return nM(t,["hour","minute","second","millisecond"])}const sM=["January","February","March","April","May","June","July","August","September","October","November","December"],E3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rM=["J","F","M","A","M","J","J","A","S","O","N","D"];function V3(t){switch(t){case"narrow":return[...rM];case"short":return[...E3];case"long":return[...sM];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const B3=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],T3=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],aM=["M","T","W","T","F","S","S"];function I3(t){switch(t){case"narrow":return[...aM];case"short":return[...T3];case"long":return[...B3];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const A3=["AM","PM"],oM=["Before Christ","Anno Domini"],lM=["BC","AD"],cM=["B","A"];function $3(t){switch(t){case"narrow":return[...cM];case"short":return[...lM];case"long":return[...oM];default:return null}}function dM(t){return A3[t.hour<12?0:1]}function uM(t,e){return I3(e)[t.weekday-1]}function hM(t,e){return V3(e)[t.month-1]}function fM(t,e){return $3(e)[t.year<0?0:1]}function pM(t,e,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const m=t==="days";switch(e){case 1:return m?"tomorrow":`next ${s[t][0]}`;case-1:return m?"yesterday":`last ${s[t][0]}`;case 0:return m?"today":`this ${s[t][0]}`}}const o=Object.is(e,-0)||e<0,c=Math.abs(e),d=c===1,h=s[t],f=i?d?h[1]:h[2]||h[1]:d?s[t][0]:t;return o?`${c} ${f} ago`:`in ${c} ${f}`}function N3(t,e){let n="";for(const i of t)i.literal?n+=i.val:n+=e(i.val);return n}const mM={D:wd,DD:L2,DDD:F2,DDDD:R2,t:H2,tt:W2,ttt:Y2,tttt:j2,T:U2,TT:q2,TTT:G2,TTTT:K2,f:Z2,ff:J2,fff:e3,ffff:n3,F:X2,FF:Q2,FFF:t3,FFFF:i3};class wn{static create(e,n={}){return new wn(e,n)}static parseFormat(e){let n=null,i="",s=!1;const a=[];for(let o=0;o<e.length;o++){const c=e.charAt(o);c==="'"?(i.length>0&&a.push({literal:s||/^\s+$/.test(i),val:i}),n=null,i="",s=!s):s||c===n?i+=c:(i.length>0&&a.push({literal:/^\s+$/.test(i),val:i}),i=c,n=c)}return i.length>0&&a.push({literal:s||/^\s+$/.test(i),val:i}),a}static macroTokenToFormatOpts(e){return mM[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Xt(e,n);const i={...this.opts};return n>0&&(i.padTo=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(_,b)=>this.loc.extract(e,_,b),o=_=>e.isOffsetFixed&&e.offset===0&&_.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,_.format):"",c=()=>i?dM(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),d=(_,b)=>i?hM(e,_):a(b?{month:_}:{month:_,day:"numeric"},"month"),h=(_,b)=>i?uM(e,_):a(b?{weekday:_}:{weekday:_,month:"long",day:"numeric"},"weekday"),f=_=>{const b=wn.macroTokenToFormatOpts(_);return b?this.formatWithSystemDefault(e,b):_},m=_=>i?fM(e,_):a({era:_},"era"),g=_=>{switch(_){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return c();case"d":return s?a({day:"numeric"},"day"):this.num(e.day);case"dd":return s?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return h("short",!0);case"cccc":return h("long",!0);case"ccccc":return h("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return h("short",!1);case"EEEE":return h("long",!1);case"EEEEE":return h("narrow",!1);case"L":return s?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return d("short",!0);case"LLLL":return d("long",!0);case"LLLLL":return d("narrow",!0);case"M":return s?a({month:"numeric"},"month"):this.num(e.month);case"MM":return s?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return d("short",!1);case"MMMM":return d("long",!1);case"MMMMM":return d("narrow",!1);case"y":return s?a({year:"numeric"},"year"):this.num(e.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(_)}};return N3(wn.parseFormat(n),g)}formatDurationFromString(e,n){const i=d=>{switch(d[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=d=>h=>{const f=i(h);return f?this.num(d.get(f),h.length):h},a=wn.parseFormat(n),o=a.reduce((d,{literal:h,val:f})=>h?d:d.concat(f),[]),c=e.shiftTo(...o.map(i).filter(d=>d));return N3(a,s(c))}}const z3=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function za(...t){const e=t.reduce((n,i)=>n+i.source,"");return RegExp(`^${e}$`)}function Pa(...t){return e=>t.reduce(([n,i,s],a)=>{const[o,c,d]=a(e,s);return[{...n,...o},c||i,d]},[{},null,1]).slice(0,2)}function La(t,...e){if(t==null)return[null,null];for(const[n,i]of e){const s=n.exec(t);if(s)return i(s)}return[null,null]}function P3(...t){return(e,n)=>{const i={};let s;for(s=0;s<t.length;s++)i[t[s]]=ir(e[n+s]);return[i,null,n+s]}}const L3=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,gM=`(?:${L3.source}?(?:\\[(${z3.source})\\])?)?`,Nh=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,F3=RegExp(`${Nh.source}${gM}`),zh=RegExp(`(?:T${F3.source})?`),_M=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yM=/(\d{4})-?W(\d\d)(?:-?(\d))?/,vM=/(\d{4})-?(\d{3})/,bM=P3("weekYear","weekNumber","weekDay"),wM=P3("year","ordinal"),kM=/(\d{4})-(\d\d)-(\d\d)/,R3=RegExp(`${Nh.source} ?(?:${L3.source}|(${z3.source}))?`),CM=RegExp(`(?: ${R3.source})?`);function Fa(t,e,n){const i=t[e];return Be(i)?n:ir(i)}function xM(t,e){return[{year:Fa(t,e),month:Fa(t,e+1,1),day:Fa(t,e+2,1)},null,e+3]}function Ra(t,e){return[{hours:Fa(t,e,0),minutes:Fa(t,e+1,0),seconds:Fa(t,e+2,0),milliseconds:Ih(t[e+3])},null,e+4]}function $l(t,e){const n=!t[e]&&!t[e+1],i=Vd(t[e+1],t[e+2]),s=n?null:Vn.instance(i);return[{},s,e+3]}function Nl(t,e){const n=t[e]?ks.create(t[e]):null;return[{},n,e+1]}const SM=RegExp(`^T?${Nh.source}$`),MM=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function OM(t){const[e,n,i,s,a,o,c,d,h]=t,f=e[0]==="-",m=d&&d[0]==="-",g=(_,b=!1)=>_!==void 0&&(b||_&&f)?-_:_;return[{years:g(Wr(n)),months:g(Wr(i)),weeks:g(Wr(s)),days:g(Wr(a)),hours:g(Wr(o)),minutes:g(Wr(c)),seconds:g(Wr(d),d==="-0"),milliseconds:g(Ih(h),m)}]}const DM={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ph(t,e,n,i,s,a,o){const c={year:e.length===2?$h(ir(e)):ir(e),month:E3.indexOf(n)+1,day:ir(i),hour:ir(s),minute:ir(a)};return o&&(c.second=ir(o)),t&&(c.weekday=t.length>3?B3.indexOf(t)+1:T3.indexOf(t)+1),c}const EM=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function VM(t){const[,e,n,i,s,a,o,c,d,h,f,m]=t,g=Ph(e,s,i,n,a,o,c);let _;return d?_=DM[d]:h?_=0:_=Vd(f,m),[g,new Vn(_)]}function BM(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const TM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,IM=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,AM=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function H3(t){const[,e,n,i,s,a,o,c]=t;return[Ph(e,s,i,n,a,o,c),Vn.utcInstance]}function $M(t){const[,e,n,i,s,a,o,c]=t;return[Ph(e,c,n,i,s,a,o),Vn.utcInstance]}const NM=za(_M,zh),zM=za(yM,zh),PM=za(vM,zh),LM=za(F3),W3=Pa(xM,Ra,$l,Nl),FM=Pa(bM,Ra,$l,Nl),RM=Pa(wM,Ra,$l,Nl),HM=Pa(Ra,$l,Nl);function WM(t){return La(t,[NM,W3],[zM,FM],[PM,RM],[LM,HM])}function YM(t){return La(BM(t),[EM,VM])}function jM(t){return La(t,[TM,H3],[IM,H3],[AM,$M])}function UM(t){return La(t,[MM,OM])}const qM=Pa(Ra);function GM(t){return La(t,[SM,qM])}const KM=za(kM,CM),ZM=za(R3),XM=Pa(Ra,$l,Nl);function JM(t){return La(t,[KM,W3],[ZM,XM])}const Y3="Invalid Duration",j3={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},QM={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...j3},yi=146097/400,Ha=146097/4800,eO={years:{quarters:4,months:12,weeks:yi/7,days:yi,hours:yi*24,minutes:yi*24*60,seconds:yi*24*60*60,milliseconds:yi*24*60*60*1e3},quarters:{months:3,weeks:yi/28,days:yi/4,hours:yi*24/4,minutes:yi*24*60/4,seconds:yi*24*60*60/4,milliseconds:yi*24*60*60*1e3/4},months:{weeks:Ha/7,days:Ha,hours:Ha*24,minutes:Ha*24*60,seconds:Ha*24*60*60,milliseconds:Ha*24*60*60*1e3},...j3},Yr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],tO=Yr.slice(0).reverse();function sr(t,e,n=!1){const i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Qe(i)}function U3(t,e){let n=e.milliseconds??0;for(const i of tO.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function q3(t,e){const n=U3(t,e)<0?-1:1;Yr.reduceRight((i,s)=>{if(Be(e[s]))return i;if(i){const a=e[i]*n,o=t[s][i],c=Math.floor(a/o);e[s]+=c*n,e[i]-=c*o*n}return s},null),Yr.reduce((i,s)=>{if(Be(e[s]))return i;if(i){const a=e[i]%1;e[i]-=a,e[s]+=a*t[i][s]}return s},null)}function nO(t){const e={};for(const[n,i]of Object.entries(t))i!==0&&(e[n]=i);return e}class Qe{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let i=n?eO:QM;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||yt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,n){return Qe.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Yn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Qe({values:Bd(e,Qe.normalizeUnit),loc:yt.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Hr(e))return Qe.fromMillis(e);if(Qe.isDuration(e))return e;if(typeof e=="object")return Qe.fromObject(e);throw new Yn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[i]=UM(e);return i?Qe.fromObject(i,n):Qe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[i]=GM(e);return i?Qe.fromObject(i,n):Qe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Yn("need to specify a reason the Duration is invalid");const i=e instanceof Ni?e:new Ni(e,n);if(qt.throwOnInvalid)throw new ES(i);return new Qe({invalid:i})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new P2(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?wn.create(this.loc,i).formatDurationFromString(this,e):Y3}toHuman(e={}){if(!this.isValid)return Y3;const n=Yr.map(i=>{const s=this.values[i];return Be(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Ah(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},ue.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?U3(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e),i={};for(const s of Yr)($a(n.values,s)||$a(this.values,s))&&(i[s]=n.get(s)+this.get(s));return sr(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=D3(e(this.values[i],i));return sr(this,{values:n},!0)}get(e){return this[Qe.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Bd(e,Qe.normalizeUnit)};return sr(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:s,conversionAccuracy:i};return sr(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return q3(this.matrix,e),sr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=nO(this.normalize().shiftToAll().toObject());return sr(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Qe.normalizeUnit(o));const n={},i={},s=this.toObject();let a;for(const o of Yr)if(e.indexOf(o)>=0){a=o;let c=0;for(const h in i)c+=this.matrix[h][o]*i[h],i[h]=0;Hr(s[o])&&(c+=s[o]);const d=Math.trunc(c);n[o]=d,i[o]=(c*1e3-d*1e3)/1e3}else Hr(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(n[a]+=o===a?i[o]:i[o]/this.matrix[a][o]);return q3(this.matrix,n),sr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return sr(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Yr)if(!n(this.values[i],e.values[i]))return!1;return!0}}const Wa="Invalid Interval";function iO(t,e){return!t||!t.isValid?Lt.invalid("missing or invalid start"):!e||!e.isValid?Lt.invalid("missing or invalid end"):e<t?Lt.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class Lt{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Yn("need to specify a reason the Interval is invalid");const i=e instanceof Ni?e:new Ni(e,n);if(qt.throwOnInvalid)throw new DS(i);return new Lt({invalid:i})}static fromDateTimes(e,n){const i=Pl(e),s=Pl(n),a=iO(i,s);return a??new Lt({start:i,end:s})}static after(e,n){const i=Qe.fromDurationLike(n),s=Pl(e);return Lt.fromDateTimes(s,s.plus(i))}static before(e,n){const i=Qe.fromDurationLike(n),s=Pl(e);return Lt.fromDateTimes(s.minus(i),s)}static fromISO(e,n){const[i,s]=(e||"").split("/",2);if(i&&s){let a,o;try{a=ue.fromISO(i,n),o=a.isValid}catch{o=!1}let c,d;try{c=ue.fromISO(s,n),d=c.isValid}catch{d=!1}if(o&&d)return Lt.fromDateTimes(a,c);if(o){const h=Qe.fromISO(s,n);if(h.isValid)return Lt.after(a,h)}else if(d){const h=Qe.fromISO(i,n);if(h.isValid)return Lt.before(c,h)}}return Lt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(e,n);let s;return n!=null&&n.useLocaleWeeks?s=this.end.reconfigure({locale:i.locale}):s=this.end,s=s.startOf(e,n),Math.floor(s.diff(i,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?Lt.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Pl).filter(o=>this.contains(o)).sort((o,c)=>o.toMillis()-c.toMillis()),i=[];let{s}=this,a=0;for(;s<this.e;){const o=n[a]||this.e,c=+o>+this.e?this.e:o;i.push(Lt.fromDateTimes(s,c)),s=c,a+=1}return i}splitBy(e){const n=Qe.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,a;const o=[];for(;i<this.e;){const c=this.start.plus(n.mapUnits(d=>d*s));a=+c>+this.e?this.e:c,o.push(Lt.fromDateTimes(i,a)),i=a,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return n>=i?null:Lt.fromDateTimes(n,i)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return Lt.fromDateTimes(n,i)}static merge(e){const[n,i]=e.sort((s,a)=>s.s-a.s).reduce(([s,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[s,a.union(o)]:[s.concat([a]),o]:[s,o],[[],null]);return i&&n.push(i),n}static xor(e){let n=null,i=0;const s=[],a=e.map(d=>[{time:d.s,type:"s"},{time:d.e,type:"e"}]),o=Array.prototype.concat(...a),c=o.sort((d,h)=>d.time-h.time);for(const d of c)i+=d.type==="s"?1:-1,i===1?n=d.time:(n&&+n!=+d.time&&s.push(Lt.fromDateTimes(n,d.time)),n=null);return Lt.merge(s)}difference(...e){return Lt.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Wa}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=wd,n={}){return this.isValid?wn.create(this.s.loc.clone(n),e).formatInterval(this):Wa}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Wa}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Wa}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Wa}toFormat(e,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Wa}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Qe.invalid(this.invalidReason)}mapEndpoints(e){return Lt.fromDateTimes(e(this.s),e(this.e))}}class Id{static hasDST(e=qt.defaultZone){const n=ue.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return ks.isValidZone(e)}static normalizeZone(e){return nr(e,qt.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||yt.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||yt.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||yt.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||yt.create(n,i,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||yt.create(n,i,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||yt.create(n,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||yt.create(n,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return yt.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return yt.create(n,null,"gregory").eras(e)}static features(){return{relative:C3(),localeWeek:x3()}}}function G3(t,e){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(Qe.fromMillis(i).as("days"))}function sO(t,e,n){const i=[["years",(d,h)=>h.year-d.year],["quarters",(d,h)=>h.quarter-d.quarter+(h.year-d.year)*4],["months",(d,h)=>h.month-d.month+(h.year-d.year)*12],["weeks",(d,h)=>{const f=G3(d,h);return(f-f%7)/7}],["days",G3]],s={},a=t;let o,c;for(const[d,h]of i)n.indexOf(d)>=0&&(o=d,s[d]=h(t,e),c=a.plus(s),c>e?(s[d]--,t=a.plus(s),t>e&&(c=t,s[d]--,t=a.plus(s))):t=c);return[t,s,c,o]}function rO(t,e,n,i){let[s,a,o,c]=sO(t,e,n);const d=e-s,h=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);h.length===0&&(o<e&&(o=s.plus({[c]:1})),o!==s&&(a[c]=(a[c]||0)+d/(o-s)));const f=Qe.fromObject(a,i);return h.length>0?Qe.fromMillis(d,i).shiftTo(...h).plus(f):f}const Lh={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},K3={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},aO=Lh.hanidec.replace(/[\[|\]]/g,"").split("");function oO(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(t[n].search(Lh.hanidec)!==-1)e+=aO.indexOf(t[n]);else for(const s in K3){const[a,o]=K3[s];i>=a&&i<=o&&(e+=i-a)}}return parseInt(e,10)}else return e}function zi({numberingSystem:t},e=""){return new RegExp(`${Lh[t||"latn"]}${e}`)}const lO="missing Intl.DateTimeFormat.formatToParts support";function it(t,e=n=>n){return{regex:t,deser:([n])=>e(oO(n))}}const Z3=`[ ${String.fromCharCode(160)}]`,X3=new RegExp(Z3,"g");function cO(t){return t.replace(/\./g,"\\.?").replace(X3,Z3)}function J3(t){return t.replace(/\./g,"").replace(X3," ").toLowerCase()}function Pi(t,e){return t===null?null:{regex:RegExp(t.map(cO).join("|")),deser:([n])=>t.findIndex(i=>J3(n)===J3(i))+e}}function Q3(t,e){return{regex:t,deser:([,n,i])=>Vd(n,i),groups:e}}function Ad(t){return{regex:t,deser:([e])=>e}}function dO(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function uO(t,e){const n=zi(e),i=zi(e,"{2}"),s=zi(e,"{3}"),a=zi(e,"{4}"),o=zi(e,"{6}"),c=zi(e,"{1,2}"),d=zi(e,"{1,3}"),h=zi(e,"{1,6}"),f=zi(e,"{1,9}"),m=zi(e,"{2,4}"),g=zi(e,"{4,6}"),_=C=>({regex:RegExp(dO(C.val)),deser:([S])=>S,literal:!0}),w=(C=>{if(t.literal)return _(C);switch(C.val){case"G":return Pi(e.eras("short"),0);case"GG":return Pi(e.eras("long"),0);case"y":return it(h);case"yy":return it(m,$h);case"yyyy":return it(a);case"yyyyy":return it(g);case"yyyyyy":return it(o);case"M":return it(c);case"MM":return it(i);case"MMM":return Pi(e.months("short",!0),1);case"MMMM":return Pi(e.months("long",!0),1);case"L":return it(c);case"LL":return it(i);case"LLL":return Pi(e.months("short",!1),1);case"LLLL":return Pi(e.months("long",!1),1);case"d":return it(c);case"dd":return it(i);case"o":return it(d);case"ooo":return it(s);case"HH":return it(i);case"H":return it(c);case"hh":return it(i);case"h":return it(c);case"mm":return it(i);case"m":return it(c);case"q":return it(c);case"qq":return it(i);case"s":return it(c);case"ss":return it(i);case"S":return it(d);case"SSS":return it(s);case"u":return Ad(f);case"uu":return Ad(c);case"uuu":return it(n);case"a":return Pi(e.meridiems(),0);case"kkkk":return it(a);case"kk":return it(m,$h);case"W":return it(c);case"WW":return it(i);case"E":case"c":return it(n);case"EEE":return Pi(e.weekdays("short",!1),1);case"EEEE":return Pi(e.weekdays("long",!1),1);case"ccc":return Pi(e.weekdays("short",!0),1);case"cccc":return Pi(e.weekdays("long",!0),1);case"Z":case"ZZ":return Q3(new RegExp(`([+-]${c.source})(?::(${i.source}))?`),2);case"ZZZ":return Q3(new RegExp(`([+-]${c.source})(${i.source})?`),2);case"z":return Ad(/[a-z_+-/]{1,256}?/i);case" ":return Ad(/[^\S\n\r]/);default:return _(C)}})(t)||{invalidReason:lO};return w.token=t,w}const hO={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function fO(t,e,n){const{type:i,value:s}=t;if(i==="literal"){const d=/^\s+$/.test(s);return{literal:!d,val:d?" ":s}}const a=e[i];let o=i;i==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let c=hO[o];if(typeof c=="object"&&(c=c[a]),c)return{literal:!1,val:c}}function pO(t){return[`^${t.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,t]}function mO(t,e,n){const i=t.match(e);if(i){const s={};let a=1;for(const o in n)if($a(n,o)){const c=n[o],d=c.groups?c.groups+1:1;!c.literal&&c.token&&(s[c.token.val[0]]=c.deser(i.slice(a,a+d))),a+=d}return[i,s]}else return[i,{}]}function gO(t){const e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Be(t.z)||(n=ks.create(t.z)),Be(t.Z)||(n||(n=new Vn(t.Z)),i=t.Z),Be(t.q)||(t.M=(t.q-1)*3+1),Be(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Be(t.u)||(t.S=Ih(t.u)),[Object.keys(t).reduce((a,o)=>{const c=e(o);return c&&(a[c]=t[o]),a},{}),n,i]}let Fh=null;function _O(){return Fh||(Fh=ue.fromMillis(1555555555555)),Fh}function yO(t,e){if(t.literal)return t;const n=wn.macroTokenToFormatOpts(t.val),i=n_(n,e);return i==null||i.includes(void 0)?t:i}function e_(t,e){return Array.prototype.concat(...t.map(n=>yO(n,e)))}function t_(t,e,n){const i=e_(wn.parseFormat(n),t),s=i.map(o=>uO(o,t)),a=s.find(o=>o.invalidReason);if(a)return{input:e,tokens:i,invalidReason:a.invalidReason};{const[o,c]=pO(s),d=RegExp(o,"i"),[h,f]=mO(e,d,c),[m,g,_]=f?gO(f):[null,null,void 0];if($a(f,"a")&&$a(f,"H"))throw new Aa("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:d,rawMatches:h,matches:f,result:m,zone:g,specificOffset:_}}}function vO(t,e,n){const{result:i,zone:s,specificOffset:a,invalidReason:o}=t_(t,e,n);return[i,s,a,o]}function n_(t,e){if(!t)return null;const i=wn.create(e,t).dtFormatter(_O()),s=i.formatToParts(),a=i.resolvedOptions();return s.map(o=>fO(o,t,a))}const Rh="Invalid DateTime",i_=864e13;function $d(t){return new Ni("unsupported zone",`the zone "${t.name}" is not supported`)}function Hh(t){return t.weekData===null&&(t.weekData=Md(t.c)),t.weekData}function Wh(t){return t.localWeekData===null&&(t.localWeekData=Md(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function jr(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new ue({...n,...e,old:n})}function s_(t,e,n){let i=t-e*60*1e3;const s=n.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const a=n.offset(i);return s===a?[i,s]:[t-Math.min(s,a)*60*1e3,Math.max(s,a)]}function Nd(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function zd(t,e,n){return s_(Ed(t),e,n)}function r_(t,e){const n=t.o,i=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:i,month:s,day:Math.min(t.c.day,Dd(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Qe.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),c=Ed(a);let[d,h]=s_(c,n,t.zone);return o!==0&&(d+=o,h=t.zone.offset(d)),{ts:d,o:h}}function zl(t,e,n,i,s,a){const{setZone:o,zone:c}=n;if(t&&Object.keys(t).length!==0||e){const d=e||c,h=ue.fromObject(t,{...n,zone:d,specificOffset:a});return o?h:h.setZone(c)}else return ue.invalid(new Ni("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Pd(t,e,n=!0){return t.isValid?wn.create(yt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Yh(t,e){const n=t.c.year>9999||t.c.year<0;let i="";return n&&t.c.year>=0&&(i+="+"),i+=Xt(t.c.year,n?6:4),e?(i+="-",i+=Xt(t.c.month),i+="-",i+=Xt(t.c.day)):(i+=Xt(t.c.month),i+=Xt(t.c.day)),i}function a_(t,e,n,i,s,a){let o=Xt(t.c.hour);return e?(o+=":",o+=Xt(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=Xt(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=Xt(t.c.second),(t.c.millisecond!==0||!i)&&(o+=".",o+=Xt(t.c.millisecond,3))),s&&(t.isOffsetFixed&&t.offset===0&&!a?o+="Z":t.o<0?(o+="-",o+=Xt(Math.trunc(-t.o/60)),o+=":",o+=Xt(Math.trunc(-t.o%60))):(o+="+",o+=Xt(Math.trunc(t.o/60)),o+=":",o+=Xt(Math.trunc(t.o%60)))),a&&(o+="["+t.zone.ianaName+"]"),o}const o_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},bO={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},wO={ordinal:1,hour:0,minute:0,second:0,millisecond:0},l_=["year","month","day","hour","minute","second","millisecond"],kO=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],CO=["year","ordinal","hour","minute","second","millisecond"];function xO(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new P2(t);return e}function c_(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return xO(t)}}function d_(t,e){const n=nr(e.zone,qt.defaultZone),i=yt.fromObject(e),s=qt.now();let a,o;if(Be(t.year))a=s;else{for(const h of l_)Be(t[h])&&(t[h]=o_[h]);const c=w3(t)||k3(t);if(c)return ue.invalid(c);const d=n.offset(s);[a,o]=zd(t,d,n)}return new ue({ts:a,zone:n,loc:i,o})}function u_(t,e,n){const i=Be(n.round)?!0:n.round,s=(o,c)=>(o=Ah(o,i||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,c)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return s(a(n.unit),n.unit);for(const o of n.units){const c=a(o);if(Math.abs(c)>=1)return s(c,o)}return s(t>e?-0:0,n.units[n.units.length-1])}function h_(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class ue{constructor(e){const n=e.zone||qt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Ni("invalid input"):null)||(n.isValid?null:$d(n));this.ts=Be(e.ts)?qt.now():e.ts;let s=null,a=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[s,a]=[e.old.c,e.old.o];else{const c=n.offset(this.ts);s=Nd(this.ts,c),i=Number.isNaN(s.year)?new Ni("invalid input"):null,s=i?null:s,a=i?null:c}this._zone=n,this.loc=e.loc||yt.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new ue({})}static local(){const[e,n]=h_(arguments),[i,s,a,o,c,d,h]=n;return d_({year:i,month:s,day:a,hour:o,minute:c,second:d,millisecond:h},e)}static utc(){const[e,n]=h_(arguments),[i,s,a,o,c,d,h]=n;return e.zone=Vn.utcInstance,d_({year:i,month:s,day:a,hour:o,minute:c,second:d,millisecond:h},e)}static fromJSDate(e,n={}){const i=eM(e)?e.valueOf():NaN;if(Number.isNaN(i))return ue.invalid("invalid input");const s=nr(n.zone,qt.defaultZone);return s.isValid?new ue({ts:i,zone:s,loc:yt.fromObject(n)}):ue.invalid($d(s))}static fromMillis(e,n={}){if(Hr(e))return e<-i_||e>i_?ue.invalid("Timestamp out of range"):new ue({ts:e,zone:nr(n.zone,qt.defaultZone),loc:yt.fromObject(n)});throw new Yn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Hr(e))return new ue({ts:e*1e3,zone:nr(n.zone,qt.defaultZone),loc:yt.fromObject(n)});throw new Yn("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const i=nr(n.zone,qt.defaultZone);if(!i.isValid)return ue.invalid($d(i));const s=yt.fromObject(n),a=Bd(e,c_),{minDaysInFirstWeek:o,startOfWeek:c}=b3(a,s),d=qt.now(),h=Be(n.specificOffset)?i.offset(d):n.specificOffset,f=!Be(a.ordinal),m=!Be(a.year),g=!Be(a.month)||!Be(a.day),_=m||g,b=a.weekYear||a.weekNumber;if((_||f)&&b)throw new Aa("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&f)throw new Aa("Can't mix ordinal dates with month/day");const w=b||a.weekday&&!_;let C,S,E=Nd(d,h);w?(C=kO,S=bO,E=Md(E,o,c)):f?(C=CO,S=wO,E=Bh(E)):(C=l_,S=o_);let A=!1;for(const ee of C){const ie=a[ee];Be(ie)?A?a[ee]=S[ee]:a[ee]=E[ee]:A=!0}const x=w?XS(a,o,c):f?JS(a):w3(a),T=x||k3(a);if(T)return ue.invalid(T);const N=w?y3(a,o,c):f?v3(a):a,[L,F]=zd(N,h,i),q=new ue({ts:L,zone:i,o:F,loc:s});return a.weekday&&_&&e.weekday!==q.weekday?ue.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${q.toISO()}`):q}static fromISO(e,n={}){const[i,s]=WM(e);return zl(i,s,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[i,s]=YM(e);return zl(i,s,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[i,s]=jM(e);return zl(i,s,n,"HTTP",n)}static fromFormat(e,n,i={}){if(Be(e)||Be(n))throw new Yn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=i,o=yt.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[c,d,h,f]=vO(o,e,n);return f?ue.invalid(f):zl(c,d,i,`format ${n}`,e,h)}static fromString(e,n,i={}){return ue.fromFormat(e,n,i)}static fromSQL(e,n={}){const[i,s]=JM(e);return zl(i,s,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Yn("need to specify a reason the DateTime is invalid");const i=e instanceof Ni?e:new Ni(e,n);if(qt.throwOnInvalid)throw new OS(i);return new ue({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const i=n_(e,yt.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(e,n={}){return e_(wn.parseFormat(e),yt.fromObject(n)).map(s=>s.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Hh(this).weekYear:NaN}get weekNumber(){return this.isValid?Hh(this).weekNumber:NaN}get weekday(){return this.isValid?Hh(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Wh(this).weekday:NaN}get localWeekNumber(){return this.isValid?Wh(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Wh(this).weekYear:NaN}get ordinal(){return this.isValid?Bh(this.c).ordinal:NaN}get monthShort(){return this.isValid?Id.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Id.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Id.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Id.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,i=Ed(this.c),s=this.zone.offset(i-e),a=this.zone.offset(i+e),o=this.zone.offset(i-s*n),c=this.zone.offset(i-a*n);if(o===c)return[this];const d=i-o*n,h=i-c*n,f=Nd(d,o),m=Nd(h,c);return f.hour===m.hour&&f.minute===m.minute&&f.second===m.second&&f.millisecond===m.millisecond?[jr(this,{ts:d}),jr(this,{ts:h})]:[this]}get isInLeapYear(){return Tl(this.year)}get daysInMonth(){return Dd(this.year,this.month)}get daysInYear(){return this.isValid?Na(this.year):NaN}get weeksInWeekYear(){return this.isValid?Il(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Il(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:i,calendar:s}=wn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(e=0,n={}){return this.setZone(Vn.instance(e),n)}toLocal(){return this.setZone(qt.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(e=nr(e,qt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(n||i){const a=e.offset(this.ts),o=this.toObject();[s]=zd(o,a,e)}return jr(this,{ts:s,zone:e})}else return ue.invalid($d(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:i});return jr(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Bd(e,c_),{minDaysInFirstWeek:i,startOfWeek:s}=b3(n,this.loc),a=!Be(n.weekYear)||!Be(n.weekNumber)||!Be(n.weekday),o=!Be(n.ordinal),c=!Be(n.year),d=!Be(n.month)||!Be(n.day),h=c||d,f=n.weekYear||n.weekNumber;if((h||o)&&f)throw new Aa("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&o)throw new Aa("Can't mix ordinal dates with month/day");let m;a?m=y3({...Md(this.c,i,s),...n},i,s):Be(n.ordinal)?(m={...this.toObject(),...n},Be(n.day)&&(m.day=Math.min(Dd(m.year,m.month),m.day))):m=v3({...Bh(this.c),...n});const[g,_]=zd(m,this.o,this.zone);return jr(this,{ts:g,o:_})}plus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e);return jr(this,r_(this,n))}minus(e){if(!this.isValid)return this;const n=Qe.fromDurationLike(e).negate();return jr(this,r_(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},s=Qe.normalizeUnit(e);switch(s){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(s==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(i.weekNumber=this.weekNumber-1),i.weekday=a}else i.weekday=1;if(s==="quarters"){const a=Math.ceil(this.month/3);i.month=(a-1)*3+1}return this.set(i)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?wn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Rh}toLocaleString(e=wd,n={}){return this.isValid?wn.create(this.loc.clone(n),e).formatDateTime(this):Rh}toLocaleParts(e={}){return this.isValid?wn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let c=Yh(this,o);return c+="T",c+=a_(this,o,n,i,s,a),c}toISODate({format:e="extended"}={}){return this.isValid?Yh(this,e==="extended"):null}toISOWeekDate(){return Pd(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+a_(this,o==="extended",n,e,i,a):null}toRFC2822(){return Pd(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Pd(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Yh(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||e)&&(i&&(s+=" "),n?s+="z":e&&(s+="ZZ")),Pd(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Rh}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",i={}){if(!this.isValid||!e.isValid)return Qe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},a=tM(n).map(Qe.normalizeUnit),o=e.valueOf()>this.valueOf(),c=o?this:e,d=o?e:this,h=rO(c,d,a,s);return o?h.negate():h}diffNow(e="milliseconds",n={}){return this.diff(ue.now(),e,n)}until(e){return this.isValid?Lt.fromDateTimes(this,e):this}hasSame(e,n,i){if(!this.isValid)return!1;const s=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,i)<=s&&s<=a.endOf(n,i)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||ue.fromObject({},{zone:this.zone}),i=e.padding?this<n?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(s=e.unit,a=void 0),u_(n,this.plus(i),{...e,numeric:"always",units:s,unit:a})}toRelativeCalendar(e={}){return this.isValid?u_(e.base||ue.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(ue.isDateTime))throw new Yn("min requires all arguments be DateTimes");return S3(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(ue.isDateTime))throw new Yn("max requires all arguments be DateTimes");return S3(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,i={}){const{locale:s=null,numberingSystem:a=null}=i,o=yt.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return t_(o,e,n)}static fromStringExplain(e,n,i={}){return ue.fromFormatExplain(e,n,i)}static get DATE_SHORT(){return wd}static get DATE_MED(){return L2}static get DATE_MED_WITH_WEEKDAY(){return VS}static get DATE_FULL(){return F2}static get DATE_HUGE(){return R2}static get TIME_SIMPLE(){return H2}static get TIME_WITH_SECONDS(){return W2}static get TIME_WITH_SHORT_OFFSET(){return Y2}static get TIME_WITH_LONG_OFFSET(){return j2}static get TIME_24_SIMPLE(){return U2}static get TIME_24_WITH_SECONDS(){return q2}static get TIME_24_WITH_SHORT_OFFSET(){return G2}static get TIME_24_WITH_LONG_OFFSET(){return K2}static get DATETIME_SHORT(){return Z2}static get DATETIME_SHORT_WITH_SECONDS(){return X2}static get DATETIME_MED(){return J2}static get DATETIME_MED_WITH_SECONDS(){return Q2}static get DATETIME_MED_WITH_WEEKDAY(){return BS}static get DATETIME_FULL(){return e3}static get DATETIME_FULL_WITH_SECONDS(){return t3}static get DATETIME_HUGE(){return n3}static get DATETIME_HUGE_WITH_SECONDS(){return i3}}function Pl(t){if(ue.isDateTime(t))return t;if(t&&t.valueOf&&Hr(t.valueOf()))return ue.fromJSDate(t);if(t&&typeof t=="object")return ue.fromObject(t);throw new Yn(`Unknown datetime argument: ${t}, of type ${typeof t}`)}/*!
|
|
39
39
|
* chartjs-adapter-luxon v1.3.1
|
|
40
40
|
* https://www.chartjs.org
|
|
41
41
|
* (c) 2023 chartjs-adapter-luxon Contributors
|