@mxtommy/kip 4.0.5 → 4.0.6-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import{n as Es}from"./chunk-HIADZ4BV.js";import{q as Rs}from"./chunk-QLTN6G6E.js";import{i as ys,n as Is,p as As}from"./chunk-XDPHEQEO.js";import{b as Ds,e as Ps,f as ua}from"./chunk-SZ2GUIT5.js";import{Ab as ft,Bb as mt,C as as,Dd as da,E as xn,F as os,Fa as Dt,Fb as zi,Fd as si,Ga as Mn,Gb as bs,Hb as Et,Ia as ea,J as ss,Jb as ri,Kb as _s,La as ms,Lb as vs,Nd as li,Oa as Ee,Oc as ks,Pa as Dn,Qa as Le,Sa as Fi,Td as Ni,U as ls,Ua as ia,Ud as In,V as yn,Va as ps,W as cs,Wa as Pt,X as Ei,Xa as ei,Xb as Be,Ya as Pn,a as ti,ab as qt,b as _n,ba as ds,bb as na,ca as kn,cb as ra,da as wn,ea as _e,eb as aa,ee as Ss,f as Ri,fb as oa,fd as ca,fe as Os,g as Re,ga as V,gb as sa,gc as xs,hb as Rt,hc as la,i as is,ib as ht,j as vn,ja as ot,jb as yt,ka as st,kb as ae,la as us,ld as ws,ma as hs,md as Sn,na as ta,nc as ai,o as ns,pc as ct,q as rs,qc as oi,qd as Cs,ra as Li,rb as Fe,sb as gs,tb as Nt,ua as Cn,va as Tn,vb as Gt,wa as ve,wb as ii,wd as On,xa as fs,xb as ni,xd as Ts,yb as Bi,zb as Tt,zd as Ms}from"./chunk-OB3QLUH6.js";var ba=["*"];function au(i,n){i&1&&ni(0)}var ou=["tabListContainer"],su=["tabList"],lu=["tabListInner"],cu=["nextPaginator"],du=["previousPaginator"],uu=["content"];function hu(i,n){}var fu=["tabBodyWrapper"],mu=["tabHeader"];function pu(i,n){}function gu(i,n){if(i&1&&ia(0,pu,0,0,"ng-template",12),i&2){let t=Gt().$implicit;Rt("cdkPortalOutlet",t.templateLabel)}}function bu(i,n){if(i&1&&_s(0),i&2){let t=Gt().$implicit;vs(t.textLabel)}}function _u(i,n){if(i&1){let t=Fe();ht(0,"div",7,2),Nt("click",function(){let r=ot(t),a=r.$implicit,o=r.$index,s=Gt(),l=zi(1);return st(s._handleClick(a,l,o))})("cdkFocusChange",function(r){let a=ot(t).$index,o=Gt();return st(o._tabFocusChanged(r,a))}),ae(2,"span",8)(3,"div",9),ht(4,"span",10)(5,"span",11),na(6,gu,1,1,null,12)(7,bu,1,1),yt()()()}if(i&2){let t=n.$implicit,e=n.$index,r=zi(1),a=Gt();ri(t.labelClass),Et("mdc-tab--active",a.selectedIndex===e),Rt("id",a._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",a.fitInkBarToContent),qt("tabIndex",a._getTabIndex(e))("aria-posinset",e+1)("aria-setsize",a._tabs.length)("aria-controls",a._getTabContentId(e))("aria-selected",a.selectedIndex===e)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),Dt(3),Rt("matRippleTrigger",r)("matRippleDisabled",t.disabled||a.disableRipple),Dt(3),ra(t.templateLabel?6:7)}}function vu(i,n){i&1&&ni(0)}function xu(i,n){if(i&1){let t=Fe();ht(0,"mat-tab-body",13),Nt("_onCentered",function(){ot(t);let r=Gt();return st(r._removeTabBodyWrapperHeight())})("_onCentering",function(r){ot(t);let a=Gt();return st(a._setTabBodyWrapperHeight(r))})("_beforeCentering",function(r){ot(t);let a=Gt();return st(a._bodyCentered(r))}),yt()}if(i&2){let t=n.$implicit,e=n.$index,r=Gt();ri(t.bodyClass),Rt("id",r._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),qt("tabindex",r.contentTabIndex!=null&&r.selectedIndex===e?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(t,e))("aria-hidden",r.selectedIndex!==e)}}var yu=new _e("MatTabContent"),ku=(()=>{class i{template=V(Mn);constructor(){}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Le({type:i,selectors:[["","matTabContent",""]],features:[Be([{provide:yu,useExisting:i}])]})}return i})(),wu=new _e("MatTabLabel"),zs=new _e("MAT_TAB"),Cu=(()=>{class i extends Ps{_closestTab=V(zs,{optional:!0});static \u0275fac=(()=>{let t;return function(r){return(t||(t=Tn(i)))(r||i)}})();static \u0275dir=Le({type:i,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[Be([{provide:wu,useExisting:i}]),Fi]})}return i})(),Ns=new _e("MAT_TAB_GROUP"),Tu=(()=>{class i{_viewContainerRef=V(ms);_closestTabGroup=V(Ns,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;id=null;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new vn;position=null;origin=null;isActive=!1;constructor(){V(Sn).load(In)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Ds(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Ee({type:i,selectors:[["mat-tab"]],contentQueries:function(e,r,a){if(e&1&&(Bi(a,Cu,5),Bi(a,ku,7,Mn)),e&2){let o;ft(o=mt())&&(r.templateLabel=o.first),ft(o=mt())&&(r._explicitContent=o.first)}},viewQuery:function(e,r){if(e&1&&Tt(Mn,7),e&2){let a;ft(a=mt())&&(r._implicitContent=a.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,r){e&2&&qt("id",null)},inputs:{disabled:[2,"disabled","disabled",ct],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[Be([{provide:zs,useExisting:i}]),Cn],ngContentSelectors:ba,decls:1,vars:0,template:function(e,r){e&1&&(ii(),ps(0,au,1,0,"ng-template"))},encapsulation:2})}return i})(),ha="mdc-tab-indicator--active",Ls="mdc-tab-indicator--no-transition",fa=class{_items;_currentItem;constructor(n){this._items=n}hide(){this._items.forEach(n=>n.deactivateInkBar()),this._currentItem=void 0}alignToElement(n){let t=this._items.find(r=>r.elementRef.nativeElement===n),e=this._currentItem;if(t!==e&&(e?.deactivateInkBar(),t)){let r=e?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(r),this._currentItem=t}}},Mu=(()=>{class i{_elementRef=V(ve);_inkBarElement;_inkBarContentElement;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this._elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement){e.classList.add(ha);return}let r=e.getBoundingClientRect(),a=t.width/r.width,o=t.left-r.left;e.classList.add(Ls),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${a})`),e.getBoundingClientRect(),e.classList.remove(Ls),e.classList.add(ha),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(ha)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this._elementRef.nativeElement.ownerDocument||document,e=this._inkBarElement=t.createElement("span"),r=this._inkBarContentElement=t.createElement("span");e.className="mdc-tab-indicator",r.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",e.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let t=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;t.appendChild(this._inkBarElement)}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Le({type:i,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",ct]}})}return i})();var Ws=(()=>{class i extends Mu{elementRef=V(ve);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Tn(i)))(r||i)}})();static \u0275dir=Le({type:i,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,r){e&2&&(qt("aria-disabled",!!r.disabled),Et("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[2,"disabled","disabled",ct]},features:[Fi]})}return i})(),Fs={passive:!0},Du=650,Pu=100,Su=(()=>{class i{_elementRef=V(ve);_changeDetectorRef=V(ai);_viewportRuler=V(Os);_dir=V(da,{optional:!0});_ngZone=V(ei);_platform=V(ca);_sharedResizeObserver=V(Rs);_injector=V(ta);_renderer=V(ea);_animationsDisabled=li();_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new vn;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged;_keyManager;_currentTextContent;_stopScrolling=new vn;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let e=isNaN(t)?0:t;this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}_selectedIndex=0;selectFocusedIndex=new Pt;indexFocused=new Pt;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),Fs),this._renderer.listen(this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Fs))}ngAfterContentInit(){let t=this._dir?this._dir.change:rs("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(ss(32),Ei(this._destroyed)),r=this._viewportRuler.change(150).pipe(Ei(this._destroyed)),a=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Ms(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),Pn(a,{injector:this._injector}),xn(t,r,e,this._items.changes,this._itemsResized()).pipe(Ei(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),a()})}),this._keyManager?.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return typeof ResizeObserver!="function"?ns:this._items.changes.pipe(yn(this._items),cs(t=>new is(e=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(a=>e.next(a));return t.forEach(a=>r.observe(a.elementRef.nativeElement)),()=>{r.disconnect()}}))),ls(1),os(t=>t.some(e=>e.contentRect.width>0&&e.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!Ts(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let e=this._items.get(this.focusIndex);e&&!e.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager?.onKeydown(t)}}_onContentChanges(){let t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return this._items?!!this._items.toArray()[t]:!0}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();let e=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?e.scrollLeft=0:e.scrollLeft=e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let t=this.scrollDistance,e=this._getLayoutDirection()==="ltr"?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){let e=this._tabListContainer.nativeElement.offsetWidth,r=(t=="before"?-1:1)*e/3;return this._scrollTo(this._scrollDistance+r)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;let e=this._items?this._items.toArray()[t]:null;if(!e)return;let r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:a,offsetWidth:o}=e.elementRef.nativeElement,s,l;this._getLayoutDirection()=="ltr"?(s=a,l=s+o):(l=this._tabListInner.nativeElement.offsetWidth-a,s=l-o);let c=this.scrollDistance,d=this.scrollDistance+r;s<c?this.scrollDistance-=c-s:l>d&&(this.scrollDistance+=Math.min(l-d,s-c))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let t=this._tabListInner.nativeElement.scrollWidth,e=this._elementRef.nativeElement.offsetWidth,r=t-e>=5;r||(this.scrollDistance=0),r!==this._showPaginationControls&&(this._showPaginationControls=r,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let t=this._tabListInner.nativeElement.scrollWidth,e=this._tabListContainer.nativeElement.offsetWidth;return t-e||0}_alignInkBarToSelectedTab(){let t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&e.button!=null&&e.button!==0||(this._stopInterval(),as(Du,Pu).pipe(Ei(xn(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:r,distance:a}=this._scrollHeader(t);(a===0||a>=r)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Le({type:i,inputs:{disablePagination:[2,"disablePagination","disablePagination",ct],selectedIndex:[2,"selectedIndex","selectedIndex",oi]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return i})(),Ou=(()=>{class i extends Su{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new fa(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Tn(i)))(r||i)}})();static \u0275cmp=Ee({type:i,selectors:[["mat-tab-header"]],contentQueries:function(e,r,a){if(e&1&&Bi(a,Ws,4),e&2){let o;ft(o=mt())&&(r._items=o)}},viewQuery:function(e,r){if(e&1&&(Tt(ou,7),Tt(su,7),Tt(lu,7),Tt(cu,5),Tt(du,5)),e&2){let a;ft(a=mt())&&(r._tabListContainer=a.first),ft(a=mt())&&(r._tabList=a.first),ft(a=mt())&&(r._tabListInner=a.first),ft(a=mt())&&(r._nextPaginator=a.first),ft(a=mt())&&(r._previousPaginator=a.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,r){e&2&&Et("mat-mdc-tab-header-pagination-controls-enabled",r._showPaginationControls)("mat-mdc-tab-header-rtl",r._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",ct]},features:[Fi],ngContentSelectors:ba,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(e,r){if(e&1){let a=Fe();ii(),ht(0,"div",5,0),Nt("click",function(){return ot(a),st(r._handlePaginatorClick("before"))})("mousedown",function(s){return ot(a),st(r._handlePaginatorPress("before",s))})("touchend",function(){return ot(a),st(r._stopInterval())}),ae(2,"div",6),yt(),ht(3,"div",7,1),Nt("keydown",function(s){return ot(a),st(r._handleKeydown(s))}),ht(5,"div",8,2),Nt("cdkObserveContent",function(){return ot(a),st(r._onContentChanges())}),ht(7,"div",9,3),ni(9),yt()()(),ht(10,"div",10,4),Nt("mousedown",function(s){return ot(a),st(r._handlePaginatorPress("after",s))})("click",function(){return ot(a),st(r._handlePaginatorClick("after"))})("touchend",function(){return ot(a),st(r._stopInterval())}),ae(12,"div",6),yt()}e&2&&(Et("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),Rt("matRippleDisabled",r._disableScrollBefore||r.disableRipple),Dt(3),Et("_mat-animation-noopable",r._animationsDisabled),Dt(2),qt("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby||null),Dt(5),Et("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),Rt("matRippleDisabled",r._disableScrollAfter||r.disableRipple))},dependencies:[Ni,Cs],styles:[`.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}
2
- `],encapsulation:2})}return i})(),Iu=new _e("MAT_TABS_CONFIG"),Bs=(()=>{class i extends ua{_host=V(ma);_centeringSub=Re.EMPTY;_leavingSub=Re.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(yn(this._host._isCenterPosition())).subscribe(t=>{this._host._content&&t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Le({type:i,selectors:[["","matTabBodyHost",""]],features:[Fi]})}return i})(),ma=(()=>{class i{_elementRef=V(ve);_dir=V(da,{optional:!0});_ngZone=V(ei);_injector=V(ta);_renderer=V(ea);_diAnimationsDisabled=li();_eventCleanups;_initialized;_fallbackTimer;_positionIndex;_dirChangeSubscription=Re.EMPTY;_position;_previousPosition;_onCentering=new Pt;_beforeCentering=new Pt;_afterLeavingCenter=new Pt;_onCentered=new Pt(!0);_portalHost;_contentElement;_content;animationDuration="500ms";preserveContent=!1;set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(){if(this._dir){let t=V(ai);this._dirChangeSubscription=this._dir.change.subscribe(e=>{this._computePositionAnimationState(e),t.markForCheck()})}}ngOnInit(){this._bindTransitionEvents(),this._position==="center"&&(this._setActiveClass(!0),Pn(()=>this._onCentering.emit(this._elementRef.nativeElement.clientHeight),{injector:this._injector})),this._initialized=!0}ngOnDestroy(){clearTimeout(this._fallbackTimer),this._eventCleanups?.forEach(t=>t()),this._dirChangeSubscription.unsubscribe()}_bindTransitionEvents(){this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,e=r=>{r.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.remove("mat-tab-body-animating"),r.type==="transitionend"&&this._transitionDone())};this._eventCleanups=[this._renderer.listen(t,"transitionstart",r=>{r.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.add("mat-tab-body-animating"),this._transitionStarted())}),this._renderer.listen(t,"transitionend",e),this._renderer.listen(t,"transitioncancel",e)]})}_transitionStarted(){clearTimeout(this._fallbackTimer);let t=this._position==="center";this._beforeCentering.emit(t),t&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_transitionDone(){this._position==="center"?this._onCentered.emit():this._previousPosition==="center"&&this._afterLeavingCenter.emit()}_setActiveClass(t){this._elementRef.nativeElement.classList.toggle("mat-mdc-tab-body-active",t)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(){return this._positionIndex===0}_computePositionAnimationState(t=this._getLayoutDirection()){this._previousPosition=this._position,this._positionIndex<0?this._position=t=="ltr"?"left":"right":this._positionIndex>0?this._position=t=="ltr"?"right":"left":this._position="center",this._animationsDisabled()?this._simulateTransitionEvents():this._initialized&&(this._position==="center"||this._previousPosition==="center")&&(clearTimeout(this._fallbackTimer),this._fallbackTimer=this._ngZone.runOutsideAngular(()=>setTimeout(()=>this._simulateTransitionEvents(),100)))}_simulateTransitionEvents(){this._transitionStarted(),Pn(()=>this._transitionDone(),{injector:this._injector})}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0ms"||this.animationDuration==="0s"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Ee({type:i,selectors:[["mat-tab-body"]],viewQuery:function(e,r){if(e&1&&(Tt(Bs,5),Tt(uu,5)),e&2){let a;ft(a=mt())&&(r._portalHost=a.first),ft(a=mt())&&(r._contentElement=a.first)}},hostAttrs:[1,"mat-mdc-tab-body"],hostVars:1,hostBindings:function(e,r){e&2&&qt("inert",r._position==="center"?null:"")},inputs:{_content:[0,"content","_content"],animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_onCentered:"_onCentered"},decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(e,r){e&1&&(ht(0,"div",1,0),ia(2,hu,0,0,"ng-template",2),yt()),e&2&&Et("mat-tab-body-content-left",r._position==="left")("mat-tab-body-content-right",r._position==="right")("mat-tab-body-content-can-animate",r._position==="center"||r._previousPosition==="center")},dependencies:[Bs,Ss],styles:[`.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}
3
- `],encapsulation:2})}return i})(),I_=(()=>{class i{_elementRef=V(ve);_changeDetectorRef=V(ai);_ngZone=V(ei);_tabsSubscription=Re.EMPTY;_tabLabelSubscription=Re.EMPTY;_tabBodySubscription=Re.EMPTY;_diAnimationsDisabled=li();_allTabs;_tabBodies;_tabBodyWrapper;_tabHeader;_tabs=new fs;_indexToSelect=0;_lastFocusedTabIndex=null;_tabBodyWrapperHeight=0;color;get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(t){this._fitInkBarToContent=t,this._changeDetectorRef.markForCheck()}_fitInkBarToContent=!1;stretchTabs=!0;alignTabs=null;dynamicHeight=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=isNaN(t)?null:t}_selectedIndex=null;headerPosition="above";get animationDuration(){return this._animationDuration}set animationDuration(t){let e=t+"";this._animationDuration=/^\d+$/.test(e)?t+"ms":e}_animationDuration;get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(t){this._contentTabIndex=isNaN(t)?null:t}_contentTabIndex;disablePagination=!1;disableRipple=!1;preserveContent=!1;get backgroundColor(){return this._backgroundColor}set backgroundColor(t){let e=this._elementRef.nativeElement.classList;e.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&e.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}_backgroundColor;ariaLabel;ariaLabelledby;selectedIndexChange=new Pt;focusChange=new Pt;animationDone=new Pt;selectedTabChange=new Pt(!0);_groupId;_isServer=!V(ca).isBrowser;constructor(){let t=V(Iu,{optional:!0});this._groupId=V(On).getId("mat-tab-group-"),this.animationDuration=t&&t.animationDuration?t.animationDuration:"500ms",this.disablePagination=t&&t.disablePagination!=null?t.disablePagination:!1,this.dynamicHeight=t&&t.dynamicHeight!=null?t.dynamicHeight:!1,t?.contentTabIndex!=null&&(this.contentTabIndex=t.contentTabIndex),this.preserveContent=!!t?.preserveContent,this.fitInkBarToContent=t&&t.fitInkBarToContent!=null?t.fitInkBarToContent:!1,this.stretchTabs=t&&t.stretchTabs!=null?t.stretchTabs:!0,this.alignTabs=t&&t.alignTabs!=null?t.alignTabs:null}ngAfterContentChecked(){let t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){let e=this._selectedIndex==null;if(!e){this.selectedTabChange.emit(this._createChangeEvent(t));let r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,a)=>r.isActive=a===t),e||(this.selectedIndexChange.emit(t),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((e,r)=>{e.position=r-t,this._selectedIndex!=null&&e.position==0&&!e.origin&&(e.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let t=this._clampTabIndex(this._indexToSelect);if(t===this._selectedIndex){let e=this._tabs.toArray(),r;for(let a=0;a<e.length;a++)if(e[a].isActive){this._indexToSelect=this._selectedIndex=a,this._lastFocusedTabIndex=null,r=e[a];break}!r&&e[t]&&Promise.resolve().then(()=>{e[t].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(t))})}this._changeDetectorRef.markForCheck()})}ngAfterViewInit(){this._tabBodySubscription=this._tabBodies.changes.subscribe(()=>this._bodyCentered(!0))}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(yn(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(e=>e._closestTabGroup===this||!e._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe(),this._tabBodySubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(t){let e=this._tabHeader;e&&(e.focusIndex=t)}_focusChanged(t){this._lastFocusedTabIndex=t,this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){let e=new pa;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=xn(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t,e){return t.id||`${this._groupId}-label-${e}`}_getTabContentId(t){return`${this._groupId}-content-${t}`}_setTabBodyWrapperHeight(t){if(!this.dynamicHeight||!this._tabBodyWrapperHeight){this._tabBodyWrapperHeight=t;return}let e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}_removeTabBodyWrapperHeight(){let t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this._ngZone.run(()=>this.animationDone.emit())}_handleClick(t,e,r){e.focusIndex=r,t.disabled||(this.selectedIndex=r)}_getTabIndex(t){let e=this._lastFocusedTabIndex??this.selectedIndex;return t===e?0:-1}_tabFocusChanged(t,e){t&&t!=="mouse"&&t!=="touch"&&(this._tabHeader.focusIndex=e)}_bodyCentered(t){t&&this._tabBodies?.forEach((e,r)=>e._setActiveClass(r===this._selectedIndex))}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0"||this.animationDuration==="0ms"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Ee({type:i,selectors:[["mat-tab-group"]],contentQueries:function(e,r,a){if(e&1&&Bi(a,Tu,5),e&2){let o;ft(o=mt())&&(r._allTabs=o)}},viewQuery:function(e,r){if(e&1&&(Tt(fu,5),Tt(mu,5),Tt(ma,5)),e&2){let a;ft(a=mt())&&(r._tabBodyWrapper=a.first),ft(a=mt())&&(r._tabHeader=a.first),ft(a=mt())&&(r._tabBodies=a)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(e,r){e&2&&(qt("mat-align-tabs",r.alignTabs),ri("mat-"+(r.color||"primary")),bs("--mat-tab-animation-duration",r.animationDuration),Et("mat-mdc-tab-group-dynamic-height",r.dynamicHeight)("mat-mdc-tab-group-inverted-header",r.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",r.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",ct],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",ct],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",ct],selectedIndex:[2,"selectedIndex","selectedIndex",oi],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",oi],disablePagination:[2,"disablePagination","disablePagination",ct],disableRipple:[2,"disableRipple","disableRipple",ct],preserveContent:[2,"preserveContent","preserveContent",ct],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[Be([{provide:Ns,useExisting:i}])],ngContentSelectors:ba,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","class","content","position","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","_beforeCentering","id","content","position","animationDuration","preserveContent"]],template:function(e,r){if(e&1){let a=Fe();ii(),ht(0,"mat-tab-header",3,0),Nt("indexFocused",function(s){return ot(a),st(r._focusChanged(s))})("selectFocusedIndex",function(s){return ot(a),st(r.selectedIndex=s)}),oa(2,_u,8,17,"div",4,aa),yt(),na(4,vu,1,0),ht(5,"div",5,1),oa(7,xu,1,10,"mat-tab-body",6,aa),yt()}e&2&&(Rt("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby),Dt(2),sa(r._tabs),Dt(2),ra(r._isServer?4:-1),Dt(),Et("_mat-animation-noopable",r._animationsDisabled()),Dt(2),sa(r._tabs))},dependencies:[Ou,Ws,ws,Ni,ua,ma],styles:[`.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}
4
- `],encapsulation:2})}return i})(),pa=class{index;tab};var A_=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Dn({type:i});static \u0275inj=wn({imports:[si,si]})}return i})();var Au=["input"],Ru=["label"],Eu=["*"],Lu=new _e("mat-checkbox-default-options",{providedIn:"root",factory:Vs});function Vs(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var kt=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(kt||{}),_a=class{source;checked},Hs=Vs(),Fu=(()=>{class i{_elementRef=V(ve);_changeDetectorRef=V(ai);_ngZone=V(ei);_animationsDisabled=li();_options=V(Lu,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){let e=new _a;return e.source=this,e.checked=t,e}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required;labelPosition="after";name=null;change=new Pt;indeterminateChange=new Pt;value;disableRipple;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=kt.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){V(Sn).load(In);let t=V(new la("tabindex"),{optional:!0});this._options=this._options||Hs,this.color=this._options.color||Hs.color,this.tabIndex=t==null?0:parseInt(t)||0,this.id=this._uniqueId=V(On).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(t){t.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(t){t!==this.disabled&&(this._disabled=t,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(t){let e=t!=this._indeterminate();this._indeterminate.set(t),e&&(t?this._transitionCheckState(kt.Indeterminate):this._transitionCheckState(this.checked?kt.Checked:kt.Unchecked),this.indeterminateChange.emit(t)),this._syncIndeterminate(t)}_indeterminate=Li(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}validate(t){return this.required&&t.value!==!0?{required:!0}:null}registerOnValidatorChange(t){this._validatorChangeFn=t}_transitionCheckState(t){let e=this._currentCheckState,r=this._getAnimationTargetElement();if(!(e===t||!r)&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let t=this._options?.clickAction;!this.disabled&&t!=="noop"?(this.indeterminate&&t!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?kt.Checked:kt.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&t==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(t){t.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(t,e){if(this._animationsDisabled)return"";switch(t){case kt.Init:if(e===kt.Checked)return this._animationClasses.uncheckedToChecked;if(e==kt.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case kt.Unchecked:return e===kt.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case kt.Checked:return e===kt.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case kt.Indeterminate:return e===kt.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(t){let e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(t){t.target&&this._labelElement.nativeElement.contains(t.target)&&t.stopPropagation()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Ee({type:i,selectors:[["mat-checkbox"]],viewQuery:function(e,r){if(e&1&&(Tt(Au,5),Tt(Ru,5)),e&2){let a;ft(a=mt())&&(r._inputElement=a.first),ft(a=mt())&&(r._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(e,r){e&2&&(gs("id",r.id),qt("tabindex",null)("aria-label",null)("aria-labelledby",null),ri(r.color?"mat-"+r.color:"mat-accent"),Et("_mat-animation-noopable",r._animationsDisabled)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked)("mat-mdc-checkbox-disabled-interactive",r.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",ct],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",ct],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",ct],tabIndex:[2,"tabIndex","tabIndex",t=>t==null?void 0:oi(t)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",ct],checked:[2,"checked","checked",ct],disabled:[2,"disabled","disabled",ct],indeterminate:[2,"indeterminate","indeterminate",ct]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[Be([{provide:Is,useExisting:ds(()=>i),multi:!0},{provide:As,useExisting:i,multi:!0}]),Cn],ngContentSelectors:Eu,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(e,r){if(e&1){let a=Fe();ii(),ht(0,"div",3),Nt("click",function(s){return ot(a),st(r._preventBubblingFromLabel(s))}),ht(1,"div",4,0)(3,"div",5),Nt("click",function(){return ot(a),st(r._onTouchTargetClick())}),yt(),ht(4,"input",6,1),Nt("blur",function(){return ot(a),st(r._onBlur())})("click",function(){return ot(a),st(r._onInputClick())})("change",function(s){return ot(a),st(r._onInteractionEvent(s))}),yt(),ae(6,"div",7),ht(7,"div",8),us(),ht(8,"svg",9),ae(9,"path",10),yt(),hs(),ae(10,"div",11),yt(),ae(11,"div",12),yt(),ht(12,"label",13,2),ni(14),yt()()}if(e&2){let a=zi(2);Rt("labelPosition",r.labelPosition),Dt(4),Et("mdc-checkbox--selected",r.checked),Rt("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled&&!r.disabledInteractive)("id",r.inputId)("required",r.required)("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex),qt("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("aria-controls",r.ariaControls)("aria-disabled",r.disabled&&r.disabledInteractive?!0:null)("aria-expanded",r.ariaExpanded)("aria-owns",r.ariaOwns)("name",r.name)("value",r.value),Dt(7),Rt("matRippleTrigger",a)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),Dt(),Rt("for",r.inputId)}},dependencies:[Ni,Es],styles:[`.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover>.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover>.mat-mdc-checkbox-ripple>.mat-ripple-element{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control+.mdc-checkbox__ripple{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;width:var(--mat-checkbox-state-layer-size, 40px);height:var(--mat-checkbox-state-layer-size, 40px);top:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);right:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}@media(forced-colors: active){.mdc-checkbox--disabled{opacity:.5}}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mat-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover>.mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-touch-target,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__native-control,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__ripple,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-ripple::before,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__mixedmark{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox .mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:""}
5
- `],encapsulation:2,changeDetection:0})}return i})(),G_=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Dn({type:i});static \u0275inj=wn({imports:[Fu,si,si]})}return i})();var i0=(()=>{class i{_TRACKED_PLUGINS=[{id:"derived-data",versionRequirement:null},{id:"signalk-autostate",versionRequirement:null},{id:"signalk-polar-performance-plugin",versionRequirement:null},{id:"autopilot",versionRequirement:null}];_connectionSvc=V(ys);_API_URL=Li(null);_connection=ks(this._connectionSvc.getServiceEndpointStatusAsO());_pluginInformation=xs({loader:e=>Ri(this,[e],function*({abortSignal:t}){let r=this._API_URL();if(!r)return console.error("API URL not set yet."),[];try{let a=yield fetch(r,{signal:t});return a.ok?yield a.json():(console.error("[SkPlugin Service] Error fetching plugin information:",a.statusText),[])}catch(a){return console.error("[SkPlugin Service] Error fetching plugin information:",a),[]}})});constructor(){this._API_URL.set(`${this._connectionSvc.signalKURL.url}/signalk/v2/features?enabled=enabled`)}getPluginInformation(){return Ri(this,null,function*(){for(this._pluginInformation.reload();this._pluginInformation.isLoading();)yield new Promise(t=>setTimeout(t,100));return this._pluginInformation.value()?.plugins||[]})}isInstalled(t){return Ri(this,null,function*(){let e=yield this.getPluginInformation();return!e||e.length===0?!1:e.some(r=>r.id===t)})}isEnabled(t){return Ri(this,null,function*(){let e=yield this.getPluginInformation();return!e||e.length===0?!1:e.some(r=>r.id===t&&r.enabled)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=kn({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var a0=(()=>{class i{DEFAULT_FONT="Roboto";EDGE_BUFFER=10;debug=!1;scaleFactor=window.devicePixelRatio||1;fontsReadyPromise;sharedResizeObserver=null;observedCanvases=new Map;dprMediaQuery=null;resizeCallbacks=new WeakMap;constructor(){this.fontsReadyPromise=document.fonts.ready}registerCanvas(t,e={}){if(e=ti({autoRelease:!0},e),!t)return;if(t.style.width="100%",t.style.height="100%",e.onResize){let a=(o,s)=>{o===0||s===0||e.onResize(o,s)};this.resizeCallbacks.set(t,a)}this.sharedResizeObserver||(this.debug&&console.log("[CanvasService] Creating shared ResizeObserver for all canvases"),this.sharedResizeObserver=new ResizeObserver(a=>{this.debug&&console.log("[CanvasService] Shared ResizeObserver callback fired",a.map(o=>{let s=o.target,l=s.parentElement;return{tag:s.tagName,id:s.id,class:s.className,parent:l?{tag:l.tagName,class:l.className,id:l.id}:null,contentRect:o.contentRect,style:{width:s.style.width,height:s.style.height},backingStore:{width:s.width,height:s.height}}}));for(let o of a){let s=o.target;if(this.debug){let c=s.parentElement;console.log("[CanvasService] Shared ResizeObserver entry (detailed)",{tag:s.tagName,id:s.id,class:s.className,parent:c?{tag:c.tagName,class:c.className,id:c.id}:null,contentRect:o.contentRect,style:{width:s.style.width,height:s.style.height},backingStore:{width:s.width,height:s.height}})}this.setHighDPISize(s,o.contentRect);let l=this.resizeCallbacks.get(s);l&&l(Math.round(o.contentRect.width),Math.round(o.contentRect.height))}})),this.sharedResizeObserver.observe(t),this.debug&&console.log("[CanvasService] Started observing canvas (shared observer)",{tag:t.tagName,id:t.id,class:t.className,selector:t.getAttribute("ng-reflect-ng-if")||"",parent:t.parentElement?{tag:t.parentElement.tagName,class:t.parentElement.className,id:t.parentElement.id}:null}),this.observedCanvases.set(t,e||{}),this.setHighDPISize(t,t.getBoundingClientRect());let r=this.resizeCallbacks.get(t);if(r){let a=t.getBoundingClientRect();r(Math.round(a.width),Math.round(a.height))}}unregisterCanvas(t){if(!t||!this.observedCanvases.has(t))return;this.sharedResizeObserver&&(this.sharedResizeObserver.unobserve(t),this.observedCanvases.size<=1&&(this.sharedResizeObserver.disconnect(),this.sharedResizeObserver=null,this.debug&&console.log("[CanvasService] Shared ResizeObserver disconnected (no canvases left)"))),this.resizeCallbacks.delete(t),this.observedCanvases.get(t)?.autoRelease&&this.releaseCanvas(t,{clear:!0,removeFromDom:!0}),this.observedCanvases.delete(t),this.observedCanvases.size===0&&this.cleanupDPRListener()}onDPRChange=()=>{let t=window.devicePixelRatio||1;t!==this.scaleFactor&&(this.scaleFactor=t,this.observedCanvases.forEach((e,r)=>{try{this.setHighDPISize(r,r.getBoundingClientRect())}catch(a){console.warn("[CanvasService] onDPRChange failed for canvas",a)}}),this.cleanupDPRListener(),this.setupDPRListener())};setupDPRListener(){try{this.cleanupDPRListener();let t=`(resolution: ${window.devicePixelRatio||1}dppx)`;this.dprMediaQuery=window.matchMedia(t),this.dprMediaQuery&&((r,a)=>{"addEventListener"in r?r.addEventListener("change",a):"addListener"in r&&r.addListener(a)})(this.dprMediaQuery,this.onDPRChange)}catch(t){console.warn("[CanvasService] setupDPRListener failed",t)}}cleanupDPRListener(){if(this.dprMediaQuery){try{((e,r)=>{"removeEventListener"in e?e.removeEventListener("change",r):"removeListener"in e&&e.removeListener(r)})(this.dprMediaQuery,this.onDPRChange)}catch{}this.dprMediaQuery=null}}setHighDPISize(t,e){let r=Math.round(e.width),a=Math.round(e.height);t.width=Math.round(r*this.scaleFactor),t.height=Math.round(a*this.scaleFactor),t.style.width=`${r}px`,t.style.height=`${a}px`;try{let o=t.getContext("2d");o&&(o.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),o.clearRect(0,0,t.width,t.height))}catch(o){console.warn("[CanvasService] setHighDPISize: failed to set context transform",o)}}drawTitle(t,e,r,a="normal",o,s,l=.1){if(!t)return;let c=()=>{let d=!1;try{let u=t;if(typeof u.getTransform=="function"){let h=u.getTransform(),f=h&&h.a?h.a:1;Math.abs(f-this.scaleFactor)>1e-6&&(t.save(),t.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),d=!0)}else try{t.save(),t.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),d=!0}catch{}this.drawTitleInternal(t,e,r,a,o,s,l),d&&t.restore()}catch(u){console.warn("[CanvasService] drawTitle failed",u);try{this.drawTitleInternal(t,e,r,a,o,s,l)}catch{}}};document.fonts.status==="loaded"?this.fontsReadyPromise.then(()=>requestAnimationFrame(c)).catch(()=>requestAnimationFrame(c)):this.fontsReadyPromise.then(()=>requestAnimationFrame(c)).catch(d=>{console.warn(`[CanvasService] Font readiness failed: ${d}`),requestAnimationFrame(c)})}drawTitleInternal(t,e,r,a="normal",o,s,l){if(!t)return;let c=o-2*this.EDGE_BUFFER,d=Math.round(s*l),u=this.calculateOptimalFontSize(t,e,c,d,a);t.clearRect(0,0,o,s),t.font=`${a} ${u}px ${this.DEFAULT_FONT}`,t.fillStyle=r,t.textAlign="left",t.textBaseline="top",t.fillText(e,this.EDGE_BUFFER,this.EDGE_BUFFER,c)}clearCanvas(t,e,r){t.clearRect(0,0,e,r)}drawText(t,e,r=this.EDGE_BUFFER,a=this.EDGE_BUFFER,o,s,l="normal",c="#000",d="center",u="middle"){if(!t)return;let h=()=>{try{t.save(),t.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTextInternal(t,e,r,a,o,s,l,c,d,u)}finally{try{t.restore()}catch{}}};document.fonts.status==="loaded"?h():this.fontsReadyPromise.then(h).catch(f=>{console.warn(`[Canvas Service] Font readiness failed: ${f}`),h()})}drawTextInternal(t,e,r=this.EDGE_BUFFER,a=this.EDGE_BUFFER,o,s,l="normal",c="#000",d="center",u="middle"){let h=this.calculateOptimalFontSize(t,e,o,s,l);t.font=`${l} ${h}px ${this.DEFAULT_FONT}`,t.fillStyle=c,t.textAlign=d,t.textBaseline=u,t.fillText(e,r,a,o)}calculateOptimalFontSize(t,e,r,a,o="normal"){let s=1,l=a,c=l;for(;s<=l;)c=Math.round((s+l)/2),t.font=`${o} ${c}px ${this.DEFAULT_FONT}`,t.measureText(e).width>r?l=c-1:s=c+1;return l}createTitleBitmap(t,e,r,a,o,s=.1){let l=document.createElement("canvas");l.width=Math.round(a*this.scaleFactor),l.height=Math.round(o*this.scaleFactor),l.style.width=`${a}px`,l.style.height=`${o}px`;let c=l.getContext("2d");return c&&(c.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(c,t,e,r,a,o,s),document.fonts.status!=="loaded"&&document.fonts.ready.then(()=>{try{c.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(c,t,e,r,a,o,s)}catch{}}).catch(()=>{})),l}renderStaticToBitmap(t,e,r,a){let o=document.createElement("canvas");o.width=e*this.scaleFactor,o.height=r*this.scaleFactor;let s=o.getContext("2d");return s&&(s.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),a(s)),o}drawRectangle(t,e,r,a,o,s){t.fillStyle=s,t.fillRect(e,r,a,o)}releaseCanvas(t,e={removeFromDom:!0,clear:!0}){if(!t)return;let{removeFromDom:r=!0,clear:a=!0}=e;try{let o=t.getContext("2d");a&&o&&o.clearRect(0,0,t.width,t.height),t.width=0,t.height=0,r&&t.parentNode&&t.parentNode.removeChild(t)}catch(o){console.warn("[CanvasService] releaseCanvas failed",o)}}releaseCanvases(t,e){t.forEach(r=>this.releaseCanvas(r,e))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=kn({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Vi(i){return i+.5|0}var xe=(i,n,t)=>Math.max(Math.min(i,t),n);function Wi(i){return xe(Vi(i*2.55),0,255)}function ye(i){return xe(Vi(i*255),0,255)}function oe(i){return xe(Vi(i/2.55)/100,0,1)}function Ys(i){return xe(Vi(i*100),0,100)}var Wt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xa=[..."0123456789ABCDEF"],Bu=i=>xa[i&15],zu=i=>xa[(i&240)>>4]+xa[i&15],An=i=>(i&240)>>4===(i&15),Nu=i=>An(i.r)&&An(i.g)&&An(i.b)&&An(i.a);function Wu(i){var n=i.length,t;return i[0]==="#"&&(n===4||n===5?t={r:255&Wt[i[1]]*17,g:255&Wt[i[2]]*17,b:255&Wt[i[3]]*17,a:n===5?Wt[i[4]]*17:255}:(n===7||n===9)&&(t={r:Wt[i[1]]<<4|Wt[i[2]],g:Wt[i[3]]<<4|Wt[i[4]],b:Wt[i[5]]<<4|Wt[i[6]],a:n===9?Wt[i[7]]<<4|Wt[i[8]]:255})),t}var Hu=(i,n)=>i<255?n(i):"";function Vu(i){var n=Nu(i)?Bu:zu;return i?"#"+n(i.r)+n(i.g)+n(i.b)+Hu(i.a,n):void 0}var Yu=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function $s(i,n,t){let e=n*Math.min(t,1-t),r=(a,o=(a+i/30)%12)=>t-e*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function Uu(i,n,t){let e=(r,a=(r+i/60)%6)=>t-t*n*Math.max(Math.min(a,4-a,1),0);return[e(5),e(3),e(1)]}function ju(i,n,t){let e=$s(i,1,.5),r;for(n+t>1&&(r=1/(n+t),n*=r,t*=r),r=0;r<3;r++)e[r]*=1-n-t,e[r]+=n;return e}function qu(i,n,t,e,r){return i===r?(n-t)/e+(n<t?6:0):n===r?(t-i)/e+2:(i-n)/e+4}function ya(i){let t=i.r/255,e=i.g/255,r=i.b/255,a=Math.max(t,e,r),o=Math.min(t,e,r),s=(a+o)/2,l,c,d;return a!==o&&(d=a-o,c=s>.5?d/(2-a-o):d/(a+o),l=qu(t,e,r,d,a),l=l*60+.5),[l|0,c||0,s]}function ka(i,n,t,e){return(Array.isArray(n)?i(n[0],n[1],n[2]):i(n,t,e)).map(ye)}function wa(i,n,t){return ka($s,i,n,t)}function $u(i,n,t){return ka(ju,i,n,t)}function Qu(i,n,t){return ka(Uu,i,n,t)}function Qs(i){return(i%360+360)%360}function Xu(i){let n=Yu.exec(i),t=255,e;if(!n)return;n[5]!==e&&(t=n[6]?Wi(+n[5]):ye(+n[5]));let r=Qs(+n[2]),a=+n[3]/100,o=+n[4]/100;return n[1]==="hwb"?e=$u(r,a,o):n[1]==="hsv"?e=Qu(r,a,o):e=wa(r,a,o),{r:e[0],g:e[1],b:e[2],a:t}}function Gu(i,n){var t=ya(i);t[0]=Qs(t[0]+n),t=wa(t),i.r=t[0],i.g=t[1],i.b=t[2]}function Ku(i){if(!i)return;let n=ya(i),t=n[0],e=Ys(n[1]),r=Ys(n[2]);return i.a<255?`hsla(${t}, ${e}%, ${r}%, ${oe(i.a)})`:`hsl(${t}, ${e}%, ${r}%)`}var Us={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},js={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Zu(){let i={},n=Object.keys(js),t=Object.keys(Us),e,r,a,o,s;for(e=0;e<n.length;e++){for(o=s=n[e],r=0;r<t.length;r++)a=t[r],s=s.replace(a,Us[a]);a=parseInt(js[o],16),i[s]=[a>>16&255,a>>8&255,a&255]}return i}var Rn;function Ju(i){Rn||(Rn=Zu(),Rn.transparent=[0,0,0,0]);let n=Rn[i.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}var th=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function eh(i){let n=th.exec(i),t=255,e,r,a;if(n){if(n[7]!==e){let o=+n[7];t=n[8]?Wi(o):xe(o*255,0,255)}return e=+n[1],r=+n[3],a=+n[5],e=255&(n[2]?Wi(e):xe(e,0,255)),r=255&(n[4]?Wi(r):xe(r,0,255)),a=255&(n[6]?Wi(a):xe(a,0,255)),{r:e,g:r,b:a,a:t}}}function ih(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${oe(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var va=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,ci=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function nh(i,n,t){let e=ci(oe(i.r)),r=ci(oe(i.g)),a=ci(oe(i.b));return{r:ye(va(e+t*(ci(oe(n.r))-e))),g:ye(va(r+t*(ci(oe(n.g))-r))),b:ye(va(a+t*(ci(oe(n.b))-a))),a:i.a+t*(n.a-i.a)}}function En(i,n,t){if(i){let e=ya(i);e[n]=Math.max(0,Math.min(e[n]+e[n]*t,n===0?360:1)),e=wa(e),i.r=e[0],i.g=e[1],i.b=e[2]}}function Xs(i,n){return i&&Object.assign(n||{},i)}function qs(i){var n={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(n={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(n.a=ye(i[3]))):(n=Xs(i,{r:0,g:0,b:0,a:1}),n.a=ye(n.a)),n}function rh(i){return i.charAt(0)==="r"?eh(i):Xu(i)}var Hi=class i{constructor(n){if(n instanceof i)return n;let t=typeof n,e;t==="object"?e=qs(n):t==="string"&&(e=Wu(n)||Ju(n)||rh(n)),this._rgb=e,this._valid=!!e}get valid(){return this._valid}get rgb(){var n=Xs(this._rgb);return n&&(n.a=oe(n.a)),n}set rgb(n){this._rgb=qs(n)}rgbString(){return this._valid?ih(this._rgb):void 0}hexString(){return this._valid?Vu(this._rgb):void 0}hslString(){return this._valid?Ku(this._rgb):void 0}mix(n,t){if(n){let e=this.rgb,r=n.rgb,a,o=t===a?.5:t,s=2*o-1,l=e.a-r.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,e.r=255&c*e.r+a*r.r+.5,e.g=255&c*e.g+a*r.g+.5,e.b=255&c*e.b+a*r.b+.5,e.a=o*e.a+(1-o)*r.a,this.rgb=e}return this}interpolate(n,t){return n&&(this._rgb=nh(this._rgb,n._rgb,t)),this}clone(){return new i(this.rgb)}alpha(n){return this._rgb.a=ye(n),this}clearer(n){let t=this._rgb;return t.a*=1-n,this}greyscale(){let n=this._rgb,t=Vi(n.r*.3+n.g*.59+n.b*.11);return n.r=n.g=n.b=t,this}opaquer(n){let t=this._rgb;return t.a*=1+n,this}negate(){let n=this._rgb;return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,this}lighten(n){return En(this._rgb,2,n),this}darken(n){return En(this._rgb,2,-n),this}saturate(n){return En(this._rgb,1,n),this}desaturate(n){return En(this._rgb,1,-n),this}rotate(n){return Gu(this._rgb,n),this}};function Jt(){}var ol=(()=>{let i=0;return()=>i++})();function U(i){return i==null}function et(i){if(Array.isArray&&Array.isArray(i))return!0;let n=Object.prototype.toString.call(i);return n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"}function j(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function at(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function St(i,n){return at(i)?i:n}function N(i,n){return typeof i>"u"?n:i}var sl=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/n,Da=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*n:+i;function J(i,n,t){if(i&&typeof i.call=="function")return i.apply(t,n)}function G(i,n,t,e){let r,a,o;if(et(i))if(a=i.length,e)for(r=a-1;r>=0;r--)n.call(t,i[r],r);else for(r=0;r<a;r++)n.call(t,i[r],r);else if(j(i))for(o=Object.keys(i),a=o.length,r=0;r<a;r++)n.call(t,i[o[r]],o[r])}function ji(i,n){let t,e,r,a;if(!i||!n||i.length!==n.length)return!1;for(t=0,e=i.length;t<e;++t)if(r=i[t],a=n[t],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function Nn(i){if(et(i))return i.map(Nn);if(j(i)){let n=Object.create(null),t=Object.keys(i),e=t.length,r=0;for(;r<e;++r)n[t[r]]=Nn(i[t[r]]);return n}return i}function ll(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function ah(i,n,t,e){if(!ll(i))return;let r=n[i],a=t[i];j(r)&&j(a)?ui(r,a,e):n[i]=Nn(a)}function ui(i,n,t){let e=et(n)?n:[n],r=e.length;if(!j(i))return i;t=t||{};let a=t.merger||ah,o;for(let s=0;s<r;++s){if(o=e[s],!j(o))continue;let l=Object.keys(o);for(let c=0,d=l.length;c<d;++c)a(l[c],i,o,t)}return i}function fi(i,n){return ui(i,n,{merger:oh})}function oh(i,n,t){if(!ll(i))return;let e=n[i],r=t[i];j(e)&&j(r)?fi(e,r):Object.prototype.hasOwnProperty.call(n,i)||(n[i]=Nn(r))}var Gs={"":i=>i,x:i=>i.x,y:i=>i.y};function sh(i){let n=i.split("."),t=[],e="";for(let r of n)e+=r,e.endsWith("\\")?e=e.slice(0,-1)+".":(t.push(e),e="");return t}function lh(i){let n=sh(i);return t=>{for(let e of n){if(e==="")break;t=t&&t[e]}return t}}function ce(i,n){return(Gs[n]||(Gs[n]=lh(n)))(i)}function Yn(i){return i.charAt(0).toUpperCase()+i.slice(1)}var mi=i=>typeof i<"u",se=i=>typeof i=="function",Pa=(i,n)=>{if(i.size!==n.size)return!1;for(let t of i)if(!n.has(t))return!1;return!0};function cl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var Q=Math.PI,it=2*Q,ch=it+Q,Wn=Number.POSITIVE_INFINITY,dh=Q/180,lt=Q/2,ze=Q/4,Ks=Q*2/3,le=Math.log10,$t=Math.sign;function pi(i,n,t){return Math.abs(i-n)<t}function Sa(i){let n=Math.round(i);i=pi(i,n,i/1e3)?n:i;let t=Math.pow(10,Math.floor(le(i))),e=i/t;return(e<=1?1:e<=2?2:e<=5?5:10)*t}function dl(i){let n=[],t=Math.sqrt(i),e;for(e=1;e<t;e++)i%e===0&&(n.push(e),n.push(i/e));return t===(t|0)&&n.push(t),n.sort((r,a)=>r-a).pop(),n}function uh(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function He(i){return!uh(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function ul(i,n){let t=Math.round(i);return t-n<=i&&t+n>=i}function Oa(i,n,t){let e,r,a;for(e=0,r=i.length;e<r;e++)a=i[e][t],isNaN(a)||(n.min=Math.min(n.min,a),n.max=Math.max(n.max,a))}function Ht(i){return i*(Q/180)}function Un(i){return i*(180/Q)}function Ia(i){if(!at(i))return;let n=1,t=0;for(;Math.round(i*n)/n!==i;)n*=10,t++;return t}function Aa(i,n){let t=n.x-i.x,e=n.y-i.y,r=Math.sqrt(t*t+e*e),a=Math.atan2(e,t);return a<-.5*Q&&(a+=it),{angle:a,distance:r}}function Hn(i,n){return Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))}function hh(i,n){return(i-n+ch)%it-Q}function _t(i){return(i%it+it)%it}function gi(i,n,t,e){let r=_t(i),a=_t(n),o=_t(t),s=_t(a-r),l=_t(o-r),c=_t(r-a),d=_t(r-o);return r===a||r===o||e&&a===o||s>l&&c<d}function pt(i,n,t){return Math.max(n,Math.min(t,i))}function hl(i){return pt(i,-32768,32767)}function te(i,n,t,e=1e-6){return i>=Math.min(n,t)-e&&i<=Math.max(n,t)+e}function jn(i,n,t){t=t||(o=>i[o]<n);let e=i.length-1,r=0,a;for(;e-r>1;)a=r+e>>1,t(a)?r=a:e=a;return{lo:r,hi:e}}var Kt=(i,n,t,e)=>jn(i,t,e?r=>{let a=i[r][n];return a<t||a===t&&i[r+1][n]===t}:r=>i[r][n]<t),fl=(i,n,t)=>jn(i,t,e=>i[e][n]>=t);function ml(i,n,t){let e=0,r=i.length;for(;e<r&&i[e]<n;)e++;for(;r>e&&i[r-1]>t;)r--;return e>0||r<i.length?i.slice(e,r):i}var pl=["push","pop","shift","splice","unshift"];function gl(i,n){if(i._chartjs){i._chartjs.listeners.push(n);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),pl.forEach(t=>{let e="_onData"+Yn(t),r=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...a){let o=r.apply(this,a);return i._chartjs.listeners.forEach(s=>{typeof s[e]=="function"&&s[e](...a)}),o}})})}function Ra(i,n){let t=i._chartjs;if(!t)return;let e=t.listeners,r=e.indexOf(n);r!==-1&&e.splice(r,1),!(e.length>0)&&(pl.forEach(a=>{delete i[a]}),delete i._chartjs)}function Ea(i){let n=new Set(i);return n.size===i.length?i:Array.from(n)}var La=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Fa(i,n){let t=[],e=!1;return function(...r){t=r,e||(e=!0,La.call(window,()=>{e=!1,i.apply(n,t)}))}}function bl(i,n){let t;return function(...e){return n?(clearTimeout(t),t=setTimeout(i,n,e)):i.apply(this,e),n}}var qn=i=>i==="start"?"left":i==="end"?"right":"center",vt=(i,n,t)=>i==="start"?n:i==="end"?t:(n+t)/2,_l=(i,n,t,e)=>i===(e?"left":"right")?t:i==="center"?(n+t)/2:n;function Ba(i,n,t){let e=n.length,r=0,a=e;if(i._sorted){let{iScale:o,vScale:s,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,d=o.axis,{min:u,max:h,minDefined:f,maxDefined:m}=o.getUserBounds();if(f){if(r=Math.min(Kt(l,d,u).lo,t?e:Kt(n,d,o.getPixelForValue(u)).lo),c){let p=l.slice(0,r+1).reverse().findIndex(g=>!U(g[s.axis]));r-=Math.max(0,p)}r=pt(r,0,e-1)}if(m){let p=Math.max(Kt(l,o.axis,h,!0).hi+1,t?0:Kt(n,d,o.getPixelForValue(h),!0).hi+1);if(c){let g=l.slice(p-1).findIndex(b=>!U(b[s.axis]));p+=Math.max(0,g)}a=pt(p,r,e)-r}else a=e-r}return{start:r,count:a}}function za(i){let{xScale:n,yScale:t,_scaleRanges:e}=i,r={xmin:n.min,xmax:n.max,ymin:t.min,ymax:t.max};if(!e)return i._scaleRanges=r,!0;let a=e.xmin!==n.min||e.xmax!==n.max||e.ymin!==t.min||e.ymax!==t.max;return Object.assign(e,r),a}var Ln=i=>i===0||i===1,Zs=(i,n,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-n)*it/t)),Js=(i,n,t)=>Math.pow(2,-10*i)*Math.sin((i-n)*it/t)+1,di={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*lt)+1,easeOutSine:i=>Math.sin(i*lt),easeInOutSine:i=>-.5*(Math.cos(Q*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Ln(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Ln(i)?i:Zs(i,.075,.3),easeOutElastic:i=>Ln(i)?i:Js(i,.075,.3),easeInOutElastic(i){return Ln(i)?i:i<.5?.5*Zs(i*2,.1125,.45):.5+.5*Js(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let n=1.70158;return(i/=.5)<1?.5*(i*i*(((n*=1.525)+1)*i-n)):.5*((i-=2)*i*(((n*=1.525)+1)*i+n)+2)},easeInBounce:i=>1-di.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?di.easeInBounce(i*2)*.5:di.easeOutBounce(i*2-1)*.5+.5};function Na(i){if(i&&typeof i=="object"){let n=i.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return!1}function Wa(i){return Na(i)?i:new Hi(i)}function Ca(i){return Na(i)?i:new Hi(i).saturate(.5).darken(.1).hexString()}var fh=["x","y","borderWidth","radius","tension"],mh=["color","borderColor","backgroundColor"];function ph(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"}),i.set("animations",{colors:{type:"color",properties:mh},numbers:{type:"number",properties:fh}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}})}function gh(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var tl=new Map;function bh(i,n){n=n||{};let t=i+JSON.stringify(n),e=tl.get(t);return e||(e=new Intl.NumberFormat(i,n),tl.set(t,e)),e}function bi(i,n,t){return bh(n,t).format(i)}var vl={values(i){return et(i)?i:""+i},numeric(i,n,t){if(i===0)return"0";let e=this.chart.options.locale,r,a=i;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=_h(i,t)}let o=le(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),bi(i,e,l)},logarithmic(i,n,t){if(i===0)return"0";let e=t[n].significand||i/Math.pow(10,Math.floor(le(i)));return[1,2,3,5,10,15].includes(e)||n>.8*t.length?vl.numeric.call(this,i,n,t):""}};function _h(i,n){let t=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var qi={formatters:vl};function vh(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,t)=>t.lineWidth,tickColor:(n,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:qi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"&&n!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"})}var we=Object.create(null),$n=Object.create(null);function Yi(i,n){if(!n)return i;let t=n.split(".");for(let e=0,r=t.length;e<r;++e){let a=t[e];i=i[a]||(i[a]=Object.create(null))}return i}function Ta(i,n,t){return typeof n=="string"?ui(Yi(i,n),t):ui(Yi(i,""),n)}var Ma=class{constructor(n,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,r)=>Ca(r.backgroundColor),this.hoverBorderColor=(e,r)=>Ca(r.borderColor),this.hoverColor=(e,r)=>Ca(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(n),this.apply(t)}set(n,t){return Ta(this,n,t)}get(n){return Yi(this,n)}describe(n,t){return Ta($n,n,t)}override(n,t){return Ta(we,n,t)}route(n,t,e,r){let a=Yi(this,n),o=Yi(this,e),s="_"+t;Object.defineProperties(a,{[s]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[s],c=o[r];return j(l)?Object.assign({},c,l):N(l,c)},set(l){this[s]=l}}})}apply(n){n.forEach(t=>t(this))}},nt=new Ma({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ph,gh,vh]);function xh(i){return!i||U(i.size)||U(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ui(i,n,t,e,r){let a=n[r];return a||(a=n[r]=i.measureText(r).width,t.push(r)),a>e&&(e=a),e}function xl(i,n,t,e){e=e||{};let r=e.data=e.data||{},a=e.garbageCollect=e.garbageCollect||[];e.font!==n&&(r=e.data={},a=e.garbageCollect=[],e.font=n),i.save(),i.font=n;let o=0,s=t.length,l,c,d,u,h;for(l=0;l<s;l++)if(u=t[l],u!=null&&!et(u))o=Ui(i,r,a,o,u);else if(et(u))for(c=0,d=u.length;c<d;c++)h=u[c],h!=null&&!et(h)&&(o=Ui(i,r,a,o,h));i.restore();let f=a.length/2;if(f>t.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return o}function Ce(i,n,t){let e=i.currentDevicePixelRatio,r=t!==0?Math.max(t/2,.5):0;return Math.round((n-r)*e)/e+r}function Ha(i,n){!n&&!i||(n=n||i.getContext("2d"),n.save(),n.resetTransform(),n.clearRect(0,0,i.width,i.height),n.restore())}function Qn(i,n,t,e){Va(i,n,t,e,null)}function Va(i,n,t,e,r){let a,o,s,l,c,d,u,h,f=n.pointStyle,m=n.rotation,p=n.radius,g=(m||0)*dh;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){i.save(),i.translate(t,e),i.rotate(g),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),f){default:r?i.ellipse(t,e,r/2,p,0,0,it):i.arc(t,e,p,0,it),i.closePath();break;case"triangle":d=r?r/2:p,i.moveTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=Ks,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=Ks,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,o=Math.cos(g+ze)*l,u=Math.cos(g+ze)*(r?r/2-c:l),s=Math.sin(g+ze)*l,h=Math.sin(g+ze)*(r?r/2-c:l),i.arc(t-u,e-s,c,g-Q,g-lt),i.arc(t+h,e-o,c,g-lt,g),i.arc(t+u,e+s,c,g,g+lt),i.arc(t-h,e+o,c,g+lt,g+Q),i.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,d=r?r/2:l,i.rect(t-d,e-l,2*d,2*l);break}g+=ze;case"rectRot":u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+h,e-o),i.lineTo(t+u,e+s),i.lineTo(t-h,e+o),i.closePath();break;case"crossRot":g+=ze;case"cross":u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+u,e+s),i.moveTo(t+h,e-o),i.lineTo(t-h,e+o);break;case"star":u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+u,e+s),i.moveTo(t+h,e-o),i.lineTo(t-h,e+o),g+=ze,u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+u,e+s),i.moveTo(t+h,e-o),i.lineTo(t-h,e+o);break;case"line":o=r?r/2:Math.cos(g)*p,s=Math.sin(g)*p,i.moveTo(t-o,e-s),i.lineTo(t+o,e+s);break;case"dash":i.moveTo(t,e),i.lineTo(t+Math.cos(g)*(r?r/2:p),e+Math.sin(g)*p);break;case!1:i.closePath();break}i.fill(),n.borderWidth>0&&i.stroke()}}function Zt(i,n,t){return t=t||.5,!n||i&&i.x>n.left-t&&i.x<n.right+t&&i.y>n.top-t&&i.y<n.bottom+t}function $i(i,n){i.save(),i.beginPath(),i.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),i.clip()}function Qi(i){i.restore()}function yl(i,n,t,e,r){if(!n)return i.lineTo(t.x,t.y);if(r==="middle"){let a=(n.x+t.x)/2;i.lineTo(a,n.y),i.lineTo(a,t.y)}else r==="after"!=!!e?i.lineTo(n.x,t.y):i.lineTo(t.x,n.y);i.lineTo(t.x,t.y)}function kl(i,n,t,e){if(!n)return i.lineTo(t.x,t.y);i.bezierCurveTo(e?n.cp1x:n.cp2x,e?n.cp1y:n.cp2y,e?t.cp2x:t.cp1x,e?t.cp2y:t.cp1y,t.x,t.y)}function yh(i,n){n.translation&&i.translate(n.translation[0],n.translation[1]),U(n.rotation)||i.rotate(n.rotation),n.color&&(i.fillStyle=n.color),n.textAlign&&(i.textAlign=n.textAlign),n.textBaseline&&(i.textBaseline=n.textBaseline)}function kh(i,n,t,e,r){if(r.strikethrough||r.underline){let a=i.measureText(e),o=n-a.actualBoundingBoxLeft,s=n+a.actualBoundingBoxRight,l=t-a.actualBoundingBoxAscent,c=t+a.actualBoundingBoxDescent,d=r.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=r.decorationWidth||2,i.moveTo(o,d),i.lineTo(s,d),i.stroke()}}function wh(i,n){let t=i.fillStyle;i.fillStyle=n.color,i.fillRect(n.left,n.top,n.width,n.height),i.fillStyle=t}function Te(i,n,t,e,r,a={}){let o=et(n)?n:[n],s=a.strokeWidth>0&&a.strokeColor!=="",l,c;for(i.save(),i.font=r.string,yh(i,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&wh(i,a.backdrop),s&&(a.strokeColor&&(i.strokeStyle=a.strokeColor),U(a.strokeWidth)||(i.lineWidth=a.strokeWidth),i.strokeText(c,t,e,a.maxWidth)),i.fillText(c,t,e,a.maxWidth),kh(i,t,e,c,a),e+=Number(r.lineHeight);i.restore()}function _i(i,n){let{x:t,y:e,w:r,h:a,radius:o}=n;i.arc(t+o.topLeft,e+o.topLeft,o.topLeft,1.5*Q,Q,!0),i.lineTo(t,e+a-o.bottomLeft),i.arc(t+o.bottomLeft,e+a-o.bottomLeft,o.bottomLeft,Q,lt,!0),i.lineTo(t+r-o.bottomRight,e+a),i.arc(t+r-o.bottomRight,e+a-o.bottomRight,o.bottomRight,lt,0,!0),i.lineTo(t+r,e+o.topRight),i.arc(t+r-o.topRight,e+o.topRight,o.topRight,0,-lt,!0),i.lineTo(t+o.topLeft,e)}var Ch=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Th=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Mh(i,n){let t=(""+i).match(Ch);if(!t||t[1]==="normal")return n*1.2;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100;break}return n*i}var Dh=i=>+i||0;function Xn(i,n){let t={},e=j(n),r=e?Object.keys(n):n,a=j(i)?e?o=>N(i[o],i[n[o]]):o=>i[o]:()=>i;for(let o of r)t[o]=Dh(a(o));return t}function Ya(i){return Xn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Me(i){return Xn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function xt(i){let n=Ya(i);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function dt(i,n){i=i||{},n=n||nt.font;let t=N(i.size,n.size);typeof t=="string"&&(t=parseInt(t,10));let e=N(i.style,n.style);e&&!(""+e).match(Th)&&(console.warn('Invalid font style specified: "'+e+'"'),e=void 0);let r={family:N(i.family,n.family),lineHeight:Mh(N(i.lineHeight,n.lineHeight),t),size:t,style:e,weight:N(i.weight,n.weight),string:""};return r.string=xh(r),r}function vi(i,n,t,e){let r=!0,a,o,s;for(a=0,o=i.length;a<o;++a)if(s=i[a],s!==void 0&&(n!==void 0&&typeof s=="function"&&(s=s(n),r=!1),t!==void 0&&et(s)&&(s=s[t%s.length],r=!1),s!==void 0))return e&&!r&&(e.cacheable=!1),s}function wl(i,n,t){let{min:e,max:r}=i,a=Da(n,(r-e)/2),o=(s,l)=>t&&s===0?0:s+l;return{min:o(e,-Math.abs(a)),max:o(r,a)}}function de(i,n){return Object.assign(Object.create(i),n)}function Gn(i,n=[""],t,e,r=()=>i[0]){let a=t||i;typeof e>"u"&&(e=Ml("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:a,_fallback:e,_getTarget:r,override:s=>Gn([s,...i],n,a,e)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete i[0][l],!0},get(s,l){return Cl(s,l,()=>Lh(l,n,i,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(s,l){return il(s).includes(l)},ownKeys(s){return il(s)},set(s,l,c){let d=s._storage||(s._storage=r());return s[l]=d[l]=c,delete s._keys,!0}})}function We(i,n,t,e){let r={_cacheable:!1,_proxy:i,_context:n,_subProxy:t,_stack:new Set,_descriptors:Ua(i,e),setContext:a=>We(i,a,t,e),override:a=>We(i.override(a),n,t,e)};return new Proxy(r,{deleteProperty(a,o){return delete a[o],delete i[o],!0},get(a,o,s){return Cl(a,o,()=>Sh(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(i,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,o)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(a,o){return Reflect.has(i,o)},ownKeys(){return Reflect.ownKeys(i)},set(a,o,s){return i[o]=s,delete a[o],!0}})}function Ua(i,n={scriptable:!0,indexable:!0}){let{_scriptable:t=n.scriptable,_indexable:e=n.indexable,_allKeys:r=n.allKeys}=i;return{allKeys:r,scriptable:t,indexable:e,isScriptable:se(t)?t:()=>t,isIndexable:se(e)?e:()=>e}}var Ph=(i,n)=>i?i+Yn(n):n,ja=(i,n)=>j(n)&&i!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function Cl(i,n,t){if(Object.prototype.hasOwnProperty.call(i,n)||n==="constructor")return i[n];let e=t();return i[n]=e,e}function Sh(i,n,t){let{_proxy:e,_context:r,_subProxy:a,_descriptors:o}=i,s=e[n];return se(s)&&o.isScriptable(n)&&(s=Oh(n,s,i,t)),et(s)&&s.length&&(s=Ih(n,s,i,o.isIndexable)),ja(n,s)&&(s=We(s,r,a&&a[n],o)),s}function Oh(i,n,t,e){let{_proxy:r,_context:a,_subProxy:o,_stack:s}=t;if(s.has(i))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+i);s.add(i);let l=n(a,o||e);return s.delete(i),ja(i,l)&&(l=qa(r._scopes,r,i,l)),l}function Ih(i,n,t,e){let{_proxy:r,_context:a,_subProxy:o,_descriptors:s}=t;if(typeof a.index<"u"&&e(i))return n[a.index%n.length];if(j(n[0])){let l=n,c=r._scopes.filter(d=>d!==l);n=[];for(let d of l){let u=qa(c,r,i,d);n.push(We(u,a,o&&o[i],s))}}return n}function Tl(i,n,t){return se(i)?i(n,t):i}var Ah=(i,n)=>i===!0?n:typeof i=="string"?ce(n,i):void 0;function Rh(i,n,t,e,r){for(let a of n){let o=Ah(t,a);if(o){i.add(o);let s=Tl(o._fallback,t,r);if(typeof s<"u"&&s!==t&&s!==e)return s}else if(o===!1&&typeof e<"u"&&t!==e)return null}return!1}function qa(i,n,t,e){let r=n._rootScopes,a=Tl(n._fallback,t,e),o=[...i,...r],s=new Set;s.add(e);let l=el(s,o,t,a||t,e);return l===null||typeof a<"u"&&a!==t&&(l=el(s,o,a,l,e),l===null)?!1:Gn(Array.from(s),[""],r,a,()=>Eh(n,t,e))}function el(i,n,t,e,r){for(;t;)t=Rh(i,n,t,e,r);return t}function Eh(i,n,t){let e=i._getTarget();n in e||(e[n]={});let r=e[n];return et(r)&&j(t)?t:r||{}}function Lh(i,n,t,e){let r;for(let a of n)if(r=Ml(Ph(a,i),t),typeof r<"u")return ja(i,r)?qa(t,e,i,r):r}function Ml(i,n){for(let t of n){if(!t)continue;let e=t[i];if(typeof e<"u")return e}}function il(i){let n=i._keys;return n||(n=i._keys=Fh(i._scopes)),n}function Fh(i){let n=new Set;for(let t of i)for(let e of Object.keys(t).filter(r=>!r.startsWith("_")))n.add(e);return Array.from(n)}function $a(i,n,t,e){let{iScale:r}=i,{key:a="r"}=this._parsing,o=new Array(e),s,l,c,d;for(s=0,l=e;s<l;++s)c=s+t,d=n[c],o[s]={r:r.parse(ce(d,a),c)};return o}var Bh=Number.EPSILON||1e-14,hi=(i,n)=>n<i.length&&!i[n].skip&&i[n],Dl=i=>i==="x"?"y":"x";function zh(i,n,t,e){let r=i.skip?n:i,a=n,o=t.skip?n:t,s=Hn(a,r),l=Hn(o,a),c=s/(s+l),d=l/(s+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;let u=e*c,h=e*d;return{previous:{x:a.x-u*(o.x-r.x),y:a.y-u*(o.y-r.y)},next:{x:a.x+h*(o.x-r.x),y:a.y+h*(o.y-r.y)}}}function Nh(i,n,t){let e=i.length,r,a,o,s,l,c=hi(i,0);for(let d=0;d<e-1;++d)if(l=c,c=hi(i,d+1),!(!l||!c)){if(pi(n[d],0,Bh)){t[d]=t[d+1]=0;continue}r=t[d]/n[d],a=t[d+1]/n[d],s=Math.pow(r,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),t[d]=r*o*n[d],t[d+1]=a*o*n[d])}}function Wh(i,n,t="x"){let e=Dl(t),r=i.length,a,o,s,l=hi(i,0);for(let c=0;c<r;++c){if(o=s,s=l,l=hi(i,c+1),!s)continue;let d=s[t],u=s[e];o&&(a=(d-o[t])/3,s[`cp1${t}`]=d-a,s[`cp1${e}`]=u-a*n[c]),l&&(a=(l[t]-d)/3,s[`cp2${t}`]=d+a,s[`cp2${e}`]=u+a*n[c])}}function Hh(i,n="x"){let t=Dl(n),e=i.length,r=Array(e).fill(0),a=Array(e),o,s,l,c=hi(i,0);for(o=0;o<e;++o)if(s=l,l=c,c=hi(i,o+1),!!l){if(c){let d=c[n]-l[n];r[o]=d!==0?(c[t]-l[t])/d:0}a[o]=s?c?$t(r[o-1])!==$t(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}Nh(i,r,a),Wh(i,a,n)}function Fn(i,n,t){return Math.max(Math.min(i,t),n)}function Vh(i,n){let t,e,r,a,o,s=Zt(i[0],n);for(t=0,e=i.length;t<e;++t)o=a,a=s,s=t<e-1&&Zt(i[t+1],n),a&&(r=i[t],o&&(r.cp1x=Fn(r.cp1x,n.left,n.right),r.cp1y=Fn(r.cp1y,n.top,n.bottom)),s&&(r.cp2x=Fn(r.cp2x,n.left,n.right),r.cp2y=Fn(r.cp2y,n.top,n.bottom)))}function Pl(i,n,t,e,r){let a,o,s,l;if(n.spanGaps&&(i=i.filter(c=>!c.skip)),n.cubicInterpolationMode==="monotone")Hh(i,r);else{let c=e?i[i.length-1]:i[0];for(a=0,o=i.length;a<o;++a)s=i[a],l=zh(c,s,i[Math.min(a+1,o-(e?0:1))%o],n.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}n.capBezierPoints&&Vh(i,t)}function Kn(){return typeof window<"u"&&typeof document<"u"}function Zn(i){let n=i.parentNode;return n&&n.toString()==="[object ShadowRoot]"&&(n=n.host),n}function Vn(i,n,t){let e;return typeof i=="string"?(e=parseInt(i,10),i.indexOf("%")!==-1&&(e=e/100*n.parentNode[t])):e=i,e}var Jn=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Yh(i,n){return Jn(i).getPropertyValue(n)}var Uh=["top","right","bottom","left"];function Ne(i,n,t){let e={};t=t?"-"+t:"";for(let r=0;r<4;r++){let a=Uh[r];e[a]=parseFloat(i[n+"-"+a+t])||0}return e.width=e.left+e.right,e.height=e.top+e.bottom,e}var jh=(i,n,t)=>(i>0||n>0)&&(!t||!t.shadowRoot);function qh(i,n){let t=i.touches,e=t&&t.length?t[0]:i,{offsetX:r,offsetY:a}=e,o=!1,s,l;if(jh(r,a,i.target))s=r,l=a;else{let c=n.getBoundingClientRect();s=e.clientX-c.left,l=e.clientY-c.top,o=!0}return{x:s,y:l,box:o}}function De(i,n){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:e}=n,r=Jn(t),a=r.boxSizing==="border-box",o=Ne(r,"padding"),s=Ne(r,"border","width"),{x:l,y:c,box:d}=qh(i,t),u=o.left+(d&&s.left),h=o.top+(d&&s.top),{width:f,height:m}=n;return a&&(f-=o.width+s.width,m-=o.height+s.height),{x:Math.round((l-u)/f*t.width/e),y:Math.round((c-h)/m*t.height/e)}}function $h(i,n,t){let e,r;if(n===void 0||t===void 0){let a=i&&Zn(i);if(!a)n=i.clientWidth,t=i.clientHeight;else{let o=a.getBoundingClientRect(),s=Jn(a),l=Ne(s,"border","width"),c=Ne(s,"padding");n=o.width-c.width-l.width,t=o.height-c.height-l.height,e=Vn(s.maxWidth,a,"clientWidth"),r=Vn(s.maxHeight,a,"clientHeight")}}return{width:n,height:t,maxWidth:e||Wn,maxHeight:r||Wn}}var Bn=i=>Math.round(i*10)/10;function Sl(i,n,t,e){let r=Jn(i),a=Ne(r,"margin"),o=Vn(r.maxWidth,i,"clientWidth")||Wn,s=Vn(r.maxHeight,i,"clientHeight")||Wn,l=$h(i,n,t),{width:c,height:d}=l;if(r.boxSizing==="content-box"){let h=Ne(r,"border","width"),f=Ne(r,"padding");c-=f.width+h.width,d-=f.height+h.height}return c=Math.max(0,c-a.width),d=Math.max(0,e?c/e:d-a.height),c=Bn(Math.min(c,o,l.maxWidth)),d=Bn(Math.min(d,s,l.maxHeight)),c&&!d&&(d=Bn(c/2)),(n!==void 0||t!==void 0)&&e&&l.height&&d>l.height&&(d=l.height,c=Bn(Math.floor(d*e))),{width:c,height:d}}function Qa(i,n,t){let e=n||1,r=Math.floor(i.height*e),a=Math.floor(i.width*e);i.height=Math.floor(i.height),i.width=Math.floor(i.width);let o=i.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${i.height}px`,o.style.width=`${i.width}px`),i.currentDevicePixelRatio!==e||o.height!==r||o.width!==a?(i.currentDevicePixelRatio=e,o.height=r,o.width=a,i.ctx.setTransform(e,0,0,e,0,0),!0):!1}var Ol=(function(){let i=!1;try{let n={get passive(){return i=!0,!1}};Kn()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch{}return i})();function Xa(i,n){let t=Yh(i,n),e=t&&t.match(/^(\d+)(\.\d+)?px$/);return e?+e[1]:void 0}function ke(i,n,t,e){return{x:i.x+t*(n.x-i.x),y:i.y+t*(n.y-i.y)}}function Il(i,n,t,e){return{x:i.x+t*(n.x-i.x),y:e==="middle"?t<.5?i.y:n.y:e==="after"?t<1?i.y:n.y:t>0?n.y:i.y}}function Al(i,n,t,e){let r={x:i.cp2x,y:i.cp2y},a={x:n.cp1x,y:n.cp1y},o=ke(i,r,t),s=ke(r,a,t),l=ke(a,n,t),c=ke(o,s,t),d=ke(s,l,t);return ke(c,d,t)}var Qh=function(i,n){return{x(t){return i+i+n-t},setWidth(t){n=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}},Xh=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,n){return i+n},leftForLtr(i,n){return i}}};function Ve(i,n,t){return i?Qh(n,t):Xh()}function Ga(i,n){let t,e;(n==="ltr"||n==="rtl")&&(t=i.canvas.style,e=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",n,"important"),i.prevTextDirection=e)}function Ka(i,n){n!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",n[0],n[1]))}function Rl(i){return i==="angle"?{between:gi,compare:hh,normalize:_t}:{between:te,compare:(n,t)=>n-t,normalize:n=>n}}function nl({start:i,end:n,count:t,loop:e,style:r}){return{start:i%t,end:n%t,loop:e&&(n-i+1)%t===0,style:r}}function Gh(i,n,t){let{property:e,start:r,end:a}=t,{between:o,normalize:s}=Rl(e),l=n.length,{start:c,end:d,loop:u}=i,h,f;if(u){for(c+=l,d+=l,h=0,f=l;h<f&&o(s(n[c%l][e]),r,a);++h)c--,d--;c%=l,d%=l}return d<c&&(d+=l),{start:c,end:d,loop:u,style:i.style}}function Za(i,n,t){if(!t)return[i];let{property:e,start:r,end:a}=t,o=n.length,{compare:s,between:l,normalize:c}=Rl(e),{start:d,end:u,loop:h,style:f}=Gh(i,n,t),m=[],p=!1,g=null,b,_,k,C=()=>l(r,k,b)&&s(r,k)!==0,v=()=>s(a,b)===0||l(a,k,b),y=()=>p||C(),P=()=>!p||v();for(let D=d,S=d;D<=u;++D)_=n[D%o],!_.skip&&(b=c(_[e]),b!==k&&(p=l(b,r,a),g===null&&y()&&(g=s(b,r)===0?D:S),g!==null&&P()&&(m.push(nl({start:g,end:D,loop:h,count:o,style:f})),g=null),S=D,k=b));return g!==null&&m.push(nl({start:g,end:u,loop:h,count:o,style:f})),m}function Ja(i,n){let t=[],e=i.segments;for(let r=0;r<e.length;r++){let a=Za(e[r],i.points,n);a.length&&t.push(...a)}return t}function Kh(i,n,t,e){let r=0,a=n-1;if(t&&!e)for(;r<n&&!i[r].skip;)r++;for(;r<n&&i[r].skip;)r++;for(r%=n,t&&(a+=r);a>r&&i[a%n].skip;)a--;return a%=n,{start:r,end:a}}function Zh(i,n,t,e){let r=i.length,a=[],o=n,s=i[n],l;for(l=n+1;l<=t;++l){let c=i[l%r];c.skip||c.stop?s.skip||(e=!1,a.push({start:n%r,end:(l-1)%r,loop:e}),n=o=c.stop?l:null):(o=l,s.skip&&(n=l)),s=c}return o!==null&&a.push({start:n%r,end:o%r,loop:e}),a}function El(i,n){let t=i.points,e=i.options.spanGaps,r=t.length;if(!r)return[];let a=!!i._loop,{start:o,end:s}=Kh(t,r,a,e);if(e===!0)return rl(i,[{start:o,end:s,loop:a}],t,n);let l=s<o?s+r:s,c=!!i._fullLoop&&o===0&&s===r-1;return rl(i,Zh(t,o,l,c),t,n)}function rl(i,n,t,e){return!e||!e.setContext||!t?n:Jh(i,n,t,e)}function Jh(i,n,t,e){let r=i._chart.getContext(),a=al(i.options),{_datasetIndex:o,options:{spanGaps:s}}=i,l=t.length,c=[],d=a,u=n[0].start,h=u;function f(m,p,g,b){let _=s?-1:1;if(m!==p){for(m+=l;t[m%l].skip;)m-=_;for(;t[p%l].skip;)p+=_;m%l!==p%l&&(c.push({start:m%l,end:p%l,loop:g,style:b}),d=b,u=p%l)}}for(let m of n){u=s?u:m.start;let p=t[u%l],g;for(h=u+1;h<=m.end;h++){let b=t[h%l];g=al(e.setContext(de(r,{type:"segment",p0:p,p1:b,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),tf(g,d)&&f(u,h-1,m.loop,d),p=b,d=g}u<h-1&&f(u,h-1,m.loop,d)}return c}function al(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function tf(i,n){if(!n)return!1;let t=[],e=function(r,a){return Na(a)?(t.includes(a)||t.push(a),t.indexOf(a)):a};return JSON.stringify(i,e)!==JSON.stringify(n,e)}function zn(i,n,t){return i.options.clip?i[t]:n[t]}function ef(i,n){let{xScale:t,yScale:e}=i;return t&&e?{left:zn(t,n,"left"),right:zn(t,n,"right"),top:zn(e,n,"top"),bottom:zn(e,n,"bottom")}:n}function to(i,n){let t=n._clip;if(t.disabled)return!1;let e=ef(n,i.chartArea);return{left:t.left===!1?0:e.left-(t.left===!0?0:t.left),right:t.right===!1?i.width:e.right+(t.right===!0?0:t.right),top:t.top===!1?0:e.top-(t.top===!0?0:t.top),bottom:t.bottom===!1?i.height:e.bottom+(t.bottom===!0?0:t.bottom)}}var fo=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,e,r){let a=t.listeners[r],o=t.duration;a.forEach(s=>s({chart:n,initial:t.initial,numSteps:o,currentStep:Math.min(e-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=La.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let t=0;this._charts.forEach((e,r)=>{if(!e.running||!e.items.length)return;let a=e.items,o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>e.duration&&(e.duration=l._total),l.tick(n),s=!0):(a[o]=a[a.length-1],a.pop());s&&(r.draw(),this._notify(r,e,n,"progress")),a.length||(e.running=!1,this._notify(r,e,n,"complete"),e.initial=!1),t+=a.length}),this._lastDate=n,t===0&&(this._running=!1)}_getAnims(n){let t=this._charts,e=t.get(n);return e||(e={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(n,e)),e}listen(n,t,e){this._getAnims(n).listeners[t].push(e)}add(n,t){!t||!t.length||this._getAnims(n).items.push(...t)}has(n){return this._getAnims(n).items.length>0}start(n){let t=this._charts.get(n);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,r)=>Math.max(e,r._duration),0),this._refresh())}running(n){if(!this._running)return!1;let t=this._charts.get(n);return!(!t||!t.running||!t.items.length)}stop(n){let t=this._charts.get(n);if(!t||!t.items.length)return;let e=t.items,r=e.length-1;for(;r>=0;--r)e[r].cancel();t.items=[],this._notify(n,t,Date.now(),"complete")}remove(n){return this._charts.delete(n)}},ue=new fo,Ll="transparent",nf={boolean(i,n,t){return t>.5?n:i},color(i,n,t){let e=Wa(i||Ll),r=e.valid&&Wa(n||Ll);return r&&r.valid?r.mix(e,t).hexString():n},number(i,n,t){return i+(n-i)*t}},mo=class{constructor(n,t,e,r){let a=t[e];r=vi([n.to,r,a,n.from]);let o=vi([n.from,a,r]);this._active=!0,this._fn=n.fn||nf[n.type||typeof o],this._easing=di[n.easing]||di.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=t,this._prop=e,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(n,t,e){if(this._active){this._notify(!1);let r=this._target[this._prop],a=e-this._start,o=this._duration-a;this._start=e,this._duration=Math.floor(Math.max(o,n.duration)),this._total+=a,this._loop=!!n.loop,this._to=vi([n.to,t,r,n.from]),this._from=vi([n.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){let t=n-this._start,e=this._duration,r=this._prop,a=this._from,o=this._loop,s=this._to,l;if(this._active=a!==s&&(o||t<e),!this._active){this._target[r]=s,this._notify(!0);return}if(t<0){this._target[r]=a;return}l=t/e%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(a,s,l)}wait(){let n=this._promises||(this._promises=[]);return new Promise((t,e)=>{n.push({res:t,rej:e})})}_notify(n){let t=n?"res":"rej",e=this._promises||[];for(let r=0;r<e.length;r++)e[r][t]()}},lr=class{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!j(n))return;let t=Object.keys(nt.animation),e=this._properties;Object.getOwnPropertyNames(n).forEach(r=>{let a=n[r];if(!j(a))return;let o={};for(let s of t)o[s]=a[s];(et(a.properties)&&a.properties||[r]).forEach(s=>{(s===r||!e.has(s))&&e.set(s,o)})})}_animateOptions(n,t){let e=t.options,r=af(n,e);if(!r)return[];let a=this._createAnimations(r,e);return e.$shared&&rf(n.options.$animations,e).then(()=>{n.options=e},()=>{}),a}_createAnimations(n,t){let e=this._properties,r=[],a=n.$animations||(n.$animations={}),o=Object.keys(t),s=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(n,t));continue}let d=t[c],u=a[c],h=e.get(c);if(u)if(h&&u.active()){u.update(h,d,s);continue}else u.cancel();if(!h||!h.duration){n[c]=d;continue}a[c]=u=new mo(h,n,c,d),r.push(u)}return r}update(n,t){if(this._properties.size===0){Object.assign(n,t);return}let e=this._createAnimations(n,t);if(e.length)return ue.add(this._chart,e),!0}};function rf(i,n){let t=[],e=Object.keys(n);for(let r=0;r<e.length;r++){let a=i[e[r]];a&&a.active()&&t.push(a.wait())}return Promise.all(t)}function af(i,n){if(!n)return;let t=i.options;if(!t){i.options=n;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function Fl(i,n){let t=i&&i.options||{},e=t.reverse,r=t.min===void 0?n:0,a=t.max===void 0?n:0;return{start:e?a:r,end:e?r:a}}function of(i,n,t){if(t===!1)return!1;let e=Fl(i,t),r=Fl(n,t);return{top:r.end,right:e.end,bottom:r.start,left:e.start}}function sf(i){let n,t,e,r;return j(i)?(n=i.top,t=i.right,e=i.bottom,r=i.left):n=t=e=r=i,{top:n,right:t,bottom:e,left:r,disabled:i===!1}}function Lc(i,n){let t=[],e=i._getSortedDatasetMetas(n),r,a;for(r=0,a=e.length;r<a;++r)t.push(e[r].index);return t}function Bl(i,n,t,e={}){let r=i.keys,a=e.mode==="single",o,s,l,c;if(n===null)return;let d=!1;for(o=0,s=r.length;o<s;++o){if(l=+r[o],l===t){if(d=!0,e.all)continue;break}c=i.values[l],at(c)&&(a||n===0||$t(n)===$t(c))&&(n+=c)}return!d&&!e.all?0:n}function lf(i,n){let{iScale:t,vScale:e}=n,r=t.axis==="x"?"x":"y",a=e.axis==="x"?"x":"y",o=Object.keys(i),s=new Array(o.length),l,c,d;for(l=0,c=o.length;l<c;++l)d=o[l],s[l]={[r]:d,[a]:i[d]};return s}function eo(i,n){let t=i&&i.options.stacked;return t||t===void 0&&n.stack!==void 0}function cf(i,n,t){return`${i.id}.${n.id}.${t.stack||t.type}`}function df(i){let{min:n,max:t,minDefined:e,maxDefined:r}=i.getUserBounds();return{min:e?n:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}function uf(i,n,t){let e=i[n]||(i[n]={});return e[t]||(e[t]={})}function zl(i,n,t,e){for(let r of n.getMatchingVisibleMetas(e).reverse()){let a=i[r.index];if(t&&a>0||!t&&a<0)return r.index}return null}function Nl(i,n){let{chart:t,_cachedMeta:e}=i,r=t._stacks||(t._stacks={}),{iScale:a,vScale:o,index:s}=e,l=a.axis,c=o.axis,d=cf(a,o,e),u=n.length,h;for(let f=0;f<u;++f){let m=n[f],{[l]:p,[c]:g}=m,b=m._stacks||(m._stacks={});h=b[c]=uf(r,d,p),h[s]=g,h._top=zl(h,o,!0,e.type),h._bottom=zl(h,o,!1,e.type);let _=h._visualValues||(h._visualValues={});_[s]=g}}function io(i,n){let t=i.scales;return Object.keys(t).filter(e=>t[e].axis===n).shift()}function hf(i,n){return de(i,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function ff(i,n,t){return de(i,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function Xi(i,n){let t=i.controller.index,e=i.vScale&&i.vScale.axis;if(e){n=n||i._parsed;for(let r of n){let a=r._stacks;if(!a||a[e]===void 0||a[e][t]===void 0)return;delete a[e][t],a[e]._visualValues!==void 0&&a[e]._visualValues[t]!==void 0&&delete a[e]._visualValues[t]}}}var no=i=>i==="reset"||i==="none",Wl=(i,n)=>n?i:Object.assign({},i),mf=(i,n,t)=>i&&!n.hidden&&n._stacked&&{keys:Lc(t,!0),values:null},Se=(()=>{class i{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=eo(t.vScale,t),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(t){this.index!==t&&Xi(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,r=this.getDataset(),a=(h,f,m,p)=>h==="x"?f:h==="r"?p:m,o=e.xAxisID=N(r.xAxisID,io(t,"x")),s=e.yAxisID=N(r.yAxisID,io(t,"y")),l=e.rAxisID=N(r.rAxisID,io(t,"r")),c=e.indexAxis,d=e.iAxisID=a(c,o,s,l),u=e.vAxisID=a(c,s,o,l);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(l),e.iScale=this.getScaleForId(d),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ra(this._data,this),t._stacked&&Xi(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(j(e)){let a=this._cachedMeta;this._data=lf(e,a)}else if(r!==e){if(r){Ra(r,this);let a=this._cachedMeta;Xi(a),a._parsed=[]}e&&Object.isExtensible(e)&&gl(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,r=this.getDataset(),a=!1;this._dataCheck();let o=e._stacked;e._stacked=eo(e.vScale,e),e.stack!==r.stack&&(a=!0,Xi(e),e.stack=r.stack),this._resyncElements(t),(a||o!==e._stacked)&&(Nl(this,e._parsed),e._stacked=eo(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:r,_data:a}=this,{iScale:o,_stacked:s}=r,l=o.axis,c=t===0&&e===a.length?!0:r._sorted,d=t>0&&r._parsed[t-1],u,h,f;if(this._parsing===!1)r._parsed=a,r._sorted=!0,f=a;else{et(a[t])?f=this.parseArrayData(r,a,t,e):j(a[t])?f=this.parseObjectData(r,a,t,e):f=this.parsePrimitiveData(r,a,t,e);let m=()=>h[l]===null||d&&h[l]<d[l];for(u=0;u<e;++u)r._parsed[u+t]=h=f[u],c&&(m()&&(c=!1),d=h);r._sorted=c}s&&Nl(this,f)}parsePrimitiveData(t,e,r,a){let{iScale:o,vScale:s}=t,l=o.axis,c=s.axis,d=o.getLabels(),u=o===s,h=new Array(a),f,m,p;for(f=0,m=a;f<m;++f)p=f+r,h[f]={[l]:u||o.parse(d[p],p),[c]:s.parse(e[p],p)};return h}parseArrayData(t,e,r,a){let{xScale:o,yScale:s}=t,l=new Array(a),c,d,u,h;for(c=0,d=a;c<d;++c)u=c+r,h=e[u],l[c]={x:o.parse(h[0],u),y:s.parse(h[1],u)};return l}parseObjectData(t,e,r,a){let{xScale:o,yScale:s}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(a),u,h,f,m;for(u=0,h=a;u<h;++u)f=u+r,m=e[f],d[u]={x:o.parse(ce(m,l),f),y:s.parse(ce(m,c),f)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,r){let a=this.chart,o=this._cachedMeta,s=e[t.axis],l={keys:Lc(a,!0),values:e._stacks[t.axis]._visualValues};return Bl(l,s,o.index,{mode:r})}updateRangeFromParsed(t,e,r,a){let o=r[e.axis],s=o===null?NaN:o,l=a&&r._stacks[e.axis];a&&l&&(a.values=l,s=Bl(a,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){let r=this._cachedMeta,a=r._parsed,o=r._sorted&&t===r.iScale,s=a.length,l=this._getOtherScale(t),c=mf(e,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=df(l),f,m;function p(){m=a[f];let g=m[l.axis];return!at(m[t.axis])||u>g||h<g}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(d,t,m,c),o));++f);if(o){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(d,t,m,c);break}}return d}getAllParsedValues(t){let e=this._cachedMeta._parsed,r=[],a,o,s;for(a=0,o=e.length;a<o;++a)s=e[a][t.axis],at(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,r=e.iScale,a=e.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:a?""+a.getLabelForValue(o[a.axis]):""}}_update(t){let e=this._cachedMeta;this.update(t||"default"),e._clip=sf(N(this.options.clip,of(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,r=this._cachedMeta,a=r.data||[],o=e.chartArea,s=[],l=this._drawStart||0,c=this._drawCount||a.length-l,d=this.options.drawActiveElementsOnTop,u;for(r.dataset&&r.dataset.draw(t,o,l,c),u=l;u<l+c;++u){let h=a[u];h.hidden||(h.active&&d?s.push(h):h.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}getStyle(t,e){let r=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,e,r){let a=this.getDataset(),o;if(t>=0&&t<this._cachedMeta.data.length){let s=this._cachedMeta.data[t];o=s.$context||(s.$context=ff(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=a.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=hf(this.chart.getContext(),this.index)),o.dataset=a,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",r){let a=e==="active",o=this._cachedDataOpts,s=t+"-"+e,l=o[s],c=this.enableOptionSharing&&mi(r);if(l)return Wl(l,c);let d=this.chart.config,u=d.datasetElementScopeKeys(this._type,t),h=a?[`${t}Hover`,"hover",t,""]:[t,""],f=d.getOptionScopes(this.getDataset(),u),m=Object.keys(nt.elements[t]),p=()=>this.getContext(r,a,e),g=d.resolveNamedOptions(f,m,p,h);return g.$shared&&(g.$shared=c,o[s]=Object.freeze(Wl(g,c))),g}_resolveAnimations(t,e,r){let a=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,l=o[s];if(l)return l;let c;if(a.options.animation!==!1){let u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),h);c=u.createResolver(f,this.getContext(t,r,e))}let d=new lr(a,c&&c.animations);return c&&c._cacheable&&(o[s]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||no(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let r=this.resolveDataElementOptions(t,e),a=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(e,o)||o!==a;return this.updateSharedOptions(o,e,r),{sharedOptions:o,includeOptions:s}}updateElement(t,e,r,a){no(a)?Object.assign(t,r):this._resolveAnimations(e,a).update(t,r)}updateSharedOptions(t,e,r){t&&!no(e)&&this._resolveAnimations(void 0,e).update(t,r)}_setStyle(t,e,r,a){t.active=a;let o=this.getStyle(e,a);this._resolveAnimations(e,r,a).update(t,{options:!a&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,e,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,r=this._cachedMeta.data;for(let[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];let a=r.length,o=e.length,s=Math.min(o,a);s&&this.parse(0,s),o>a?this._insertElements(a,o-a,t):o<a&&this._removeElements(o,a-o)}_insertElements(t,e,r=!0){let a=this._cachedMeta,o=a.data,s=t+e,l,c=d=>{for(d.length+=e,l=d.length-1;l>=s;l--)d[l]=d[l-e]};for(c(o),l=t;l<s;++l)o[l]=new this.dataElementType;this._parsing&&c(a._parsed),this.parse(t,e),r&&this.updateElements(o,t,e,"reset")}updateElements(t,e,r,a){}_removeElements(t,e){let r=this._cachedMeta;if(this._parsing){let a=r._parsed.splice(t,e);r._stacked&&Xi(r,a)}r.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,r,a]=t;this[e](r,a)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);let r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return i})();function pf(i,n){if(!i._cache.$bar){let t=i.getMatchingVisibleMetas(n),e=[];for(let r=0,a=t.length;r<a;r++)e=e.concat(t[r].controller.getAllParsedValues(i));i._cache.$bar=Ea(e.sort((r,a)=>r-a))}return i._cache.$bar}function gf(i){let n=i.iScale,t=pf(n,i.type),e=n._length,r,a,o,s,l=()=>{o===32767||o===-32768||(mi(s)&&(e=Math.min(e,Math.abs(o-s)||e)),s=o)};for(r=0,a=t.length;r<a;++r)o=n.getPixelForValue(t[r]),l();for(s=void 0,r=0,a=n.ticks.length;r<a;++r)o=n.getPixelForTick(r),l();return e}function bf(i,n,t,e){let r=t.barThickness,a,o;return U(r)?(a=n.min*t.categoryPercentage,o=t.barPercentage):(a=r*e,o=1),{chunk:a/e,ratio:o,start:n.pixels[i]-a/2}}function _f(i,n,t,e){let r=n.pixels,a=r[i],o=i>0?r[i-1]:null,s=i<r.length-1?r[i+1]:null,l=t.categoryPercentage;o===null&&(o=a-(s===null?n.end-n.start:s-a)),s===null&&(s=a+a-o);let c=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/e,ratio:t.barPercentage,start:c}}function vf(i,n,t,e){let r=t.parse(i[0],e),a=t.parse(i[1],e),o=Math.min(r,a),s=Math.max(r,a),l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),n[t.axis]=c,n._custom={barStart:l,barEnd:c,start:r,end:a,min:o,max:s}}function Fc(i,n,t,e){return et(i)?vf(i,n,t,e):n[t.axis]=t.parse(i,e),n}function Hl(i,n,t,e){let r=i.iScale,a=i.vScale,o=r.getLabels(),s=r===a,l=[],c,d,u,h;for(c=t,d=t+e;c<d;++c)h=n[c],u={},u[r.axis]=s||r.parse(o[c],c),l.push(Fc(h,u,a,c));return l}function ro(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function xf(i,n,t){return i!==0?$t(i):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function yf(i){let n,t,e,r,a;return i.horizontal?(n=i.base>i.x,t="left",e="right"):(n=i.base<i.y,t="bottom",e="top"),n?(r="end",a="start"):(r="start",a="end"),{start:t,end:e,reverse:n,top:r,bottom:a}}function kf(i,n,t,e){let r=n.borderSkipped,a={};if(!r){i.borderSkipped=a;return}if(r===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:o,end:s,reverse:l,top:c,bottom:d}=yf(i);r==="middle"&&t&&(i.enableBorderRadius=!0,(t._top||0)===e?r=c:(t._bottom||0)===e?r=d:(a[Vl(d,o,s,l)]=!0,r=c)),a[Vl(r,o,s,l)]=!0,i.borderSkipped=a}function Vl(i,n,t,e){return e?(i=wf(i,n,t),i=Yl(i,t,n)):i=Yl(i,n,t),i}function wf(i,n,t){return i===n?t:i===t?n:i}function Yl(i,n,t){return i==="start"?n:i==="end"?t:i}function Cf(i,{inflateAmount:n},t){i.inflateAmount=n==="auto"?t===1?.33:0:n}var Tf=(()=>{class i extends Se{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,r,a){return Hl(t,e,r,a)}parseArrayData(t,e,r,a){return Hl(t,e,r,a)}parseObjectData(t,e,r,a){let{iScale:o,vScale:s}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=o.axis==="x"?l:c,u=s.axis==="x"?l:c,h=[],f,m,p,g;for(f=r,m=r+a;f<m;++f)g=e[f],p={},p[o.axis]=o.parse(ce(g,d),f),h.push(Fc(ce(g,u),p,s,f));return h}updateRangeFromParsed(t,e,r,a){super.updateRangeFromParsed(t,e,r,a);let o=r._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let e=this._cachedMeta,{iScale:r,vScale:a}=e,o=this.getParsed(t),s=o._custom,l=ro(s)?"["+s.start+", "+s.end+"]":""+a.getLabelForValue(o[a.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,r,a){let o=a==="reset",{index:s,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:f}=this._getSharedOptions(e,a);for(let m=e;m<e+r;m++){let p=this.getParsed(m),g=o||U(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,u),_=(p._stacks||{})[l.axis],k={horizontal:d,base:g.base,enableBorderRadius:!_||ro(p._custom)||s===_._top||s===_._bottom,x:d?g.head:b.center,y:d?b.center:g.head,height:d?b.size:Math.abs(g.size),width:d?Math.abs(g.size):b.size};f&&(k.options=h||this.resolveDataElementOptions(m,t[m].active?"active":a));let C=k.options||t[m].options;kf(k,C,_,s),Cf(k,C,u.ratio),this.updateElement(t[m],m,k,a)}}_getStacks(t,e){let{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,s=[],l=this._cachedMeta.controller.getParsed(e),c=l&&l[r.axis],d=u=>{let h=u._parsed.find(m=>m[r.axis]===c),f=h&&h[u.vScale.axis];if(U(f)||isNaN(f))return!0};for(let u of a)if(!(e!==void 0&&d(u))&&((o===!1||s.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&s.push(u.stack),u.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)t[N(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,r){let a=this._getStacks(t,r),o=e!==void 0?a.indexOf(e):-1;return o===-1?a.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,r=e.iScale,a=[],o,s;for(o=0,s=e.data.length;o<s;++o)a.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));let l=t.barThickness;return{min:l||gf(e),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:r,index:a},options:{base:o,minBarLength:s}}=this,l=o||0,c=this.getParsed(t),d=c._custom,u=ro(d),h=c[e.axis],f=0,m=r?this.applyStack(e,c,r):h,p,g;m!==h&&(f=m-h,m=h),u&&(h=d.barStart,m=d.barEnd-d.barStart,h!==0&&$t(h)!==$t(d.barEnd)&&(f=0),f+=h);let b=!U(o)&&!u?o:f,_=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(f+m):p=_,g=p-_,Math.abs(g)<s){g=xf(g,e,l)*s,h===l&&(_-=g/2);let k=e.getPixelForDecimal(0),C=e.getPixelForDecimal(1),v=Math.min(k,C),y=Math.max(k,C);_=Math.max(Math.min(_,y),v),p=_+g,r&&!u&&(c._stacks[e.axis]._visualValues[a]=e.getValueForPixel(p)-e.getValueForPixel(_))}if(_===e.getPixelForValue(l)){let k=$t(g)*e.getLineWidthForValue(l)/2;_+=k,g-=k}return{size:g,base:_,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){let r=e.scale,a=this.options,o=a.skipNull,s=N(a.maxBarThickness,1/0),l,c,d=this._getAxisCount();if(e.grouped){let u=o?this._getStackCount(t):e.stackCount,h=a.barThickness==="flex"?_f(t,e,a,u*d):bf(t,e,a,u*d),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(N(f,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+m;l=h.start+h.chunk*p+h.chunk/2,c=Math.min(s,h.chunk*h.ratio)}else l=r.getPixelForValue(this.getParsed(t)[r.axis],t),c=Math.min(s,e.min*e.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){let t=this._cachedMeta,e=t.vScale,r=t.data,a=r.length,o=0;for(;o<a;++o)this.getParsed(o)[e.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}return i})(),Mf=(()=>{class i extends Se{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,r,a){let o=super.parsePrimitiveData(t,e,r,a);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+r).radius;return o}parseArrayData(t,e,r,a){let o=super.parseArrayData(t,e,r,a);for(let s=0;s<o.length;s++){let l=e[r+s];o[s]._custom=N(l[2],this.resolveDataElementOptions(s+r).radius)}return o}parseObjectData(t,e,r,a){let o=super.parseObjectData(t,e,r,a);for(let s=0;s<o.length;s++){let l=e[r+s];o[s]._custom=N(l&&l.r&&+l.r,this.resolveDataElementOptions(s+r).radius)}return o}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:o}=e,s=this.getParsed(t),l=a.getLabelForValue(s.x),c=o.getLabelForValue(s.y),d=s._custom;return{label:r[t]||"",value:"("+l+", "+c+(d?", "+d:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,a),u=s.axis,h=l.axis;for(let f=e;f<e+r;f++){let m=t[f],p=!o&&this.getParsed(f),g={},b=g[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),_=g[h]=o?l.getBasePixel():l.getPixelForValue(p[h]);g.skip=isNaN(b)||isNaN(_),d&&(g.options=c||this.resolveDataElementOptions(f,m.active?"active":a),o&&(g.options.radius=0)),this.updateElement(m,f,g,a)}}resolveDataElementOptions(t,e){let r=this.getParsed(t),a=super.resolveDataElementOptions(t,e);a.$shared&&(a=Object.assign({},a,{$shared:!1}));let o=a.radius;return e!=="active"&&(a.radius=0),a.radius+=N(r&&r._custom,o),a}}return i})();function Df(i,n,t){let e=1,r=1,a=0,o=0;if(n<it){let s=i,l=s+n,c=Math.cos(s),d=Math.sin(s),u=Math.cos(l),h=Math.sin(l),f=(k,C,v)=>gi(k,s,l,!0)?1:Math.max(C,C*t,v,v*t),m=(k,C,v)=>gi(k,s,l,!0)?-1:Math.min(C,C*t,v,v*t),p=f(0,c,u),g=f(lt,d,h),b=m(Q,c,u),_=m(Q+lt,d,h);e=(p-b)/2,r=(g-_)/2,a=-(p+b)/2,o=-(g+_)/2}return{ratioX:e,ratioY:r,offsetX:a,offsetY:o}}var Eo=(()=>{class i extends Se{static id="doughnut";static 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"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:r,color:a}}=t.legend.options;return e.labels.map((o,s)=>{let c=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:a,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let o=c=>+r[c];if(j(r[t])){let{key:c="value"}=this._parsing;o=d=>+ce(r[d],c)}let s,l;for(s=t,l=t+e;s<l;++s)a._parsed[s]=o(s)}}_getRotation(){return Ht(this.options.rotation-90)}_getCircumference(){return Ht(this.options.circumference)}_getRotationExtents(){let t=it,e=-it;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let a=this.chart.getDatasetMeta(r).controller,o=a._getRotation(),s=a._getCircumference();t=Math.min(t,o),e=Math.max(e,o+s)}return{rotation:t,circumference:e-t}}update(t){let e=this.chart,{chartArea:r}=e,a=this._cachedMeta,o=a.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-s)/2,0),c=Math.min(sl(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:p,offsetY:g}=Df(h,u,c),b=(r.width-s)/f,_=(r.height-s)/m,k=Math.max(Math.min(b,_)/2,0),C=Da(this.options.radius,k),v=Math.max(C*c,0),y=(C-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=g*C,a.total=this.calculateTotal(),this.outerRadius=C-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*d,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){let r=this.options,a=this._cachedMeta,o=this._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||a._parsed[t]===null||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*o/it)}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,l=s.chartArea,d=s.options.animation,u=(l.left+l.right)/2,h=(l.top+l.bottom)/2,f=o&&d.animateScale,m=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(e,a),_=this._getRotation(),k;for(k=0;k<e;++k)_+=this._circumference(k,o);for(k=e;k<e+r;++k){let C=this._circumference(k,o),v=t[k],y={x:u+this.offsetX,y:h+this.offsetY,startAngle:_,endAngle:_+C,circumference:C,outerRadius:p,innerRadius:m};b&&(y.options=g||this.resolveDataElementOptions(k,v.active?"active":a)),_+=C,this.updateElement(v,k,y,a)}}calculateTotal(){let t=this._cachedMeta,e=t.data,r=0,a;for(a=0;a<e.length;a++){let o=t._parsed[a];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(a)&&!e[a].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?it*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart,a=r.data.labels||[],o=bi(e._parsed[t],r.options.locale);return{label:a[t]||"",value:o}}getMaxBorderWidth(t){let e=0,r=this.chart,a,o,s,l,c;if(!t){for(a=0,o=r.data.datasets.length;a<o;++a)if(r.isDatasetVisible(a)){s=r.getDatasetMeta(a),t=s.data,l=s.controller;break}}if(!t)return 0;for(a=0,o=t.length;a<o;++a)c=l.resolveDataElementOptions(a),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let r=0,a=t.length;r<a;++r){let o=this.resolveDataElementOptions(r);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(e+=this._getRingWeight(r));return e}_getRingWeight(t){return Math.max(N(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return i})(),Pf=(()=>{class i extends Se{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:r,data:a=[],_dataset:o}=e,s=this.chart._animationsDisabled,{start:l,count:c}=Ba(e,a,s);this._drawStart=l,this._drawCount=c,za(e)&&(l=0,c=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=a;let d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:d},t),this.updateElements(a,l,c,t)}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,a),f=s.axis,m=l.axis,{spanGaps:p,segment:g}=this.options,b=He(p)?p:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||a==="none",k=e+r,C=t.length,v=e>0&&this.getParsed(e-1);for(let y=0;y<C;++y){let P=t[y],D=_?P:{};if(y<e||y>=k){D.skip=!0;continue}let S=this.getParsed(y),L=U(S[m]),B=D[f]=s.getPixelForValue(S[f],y),W=D[m]=o||L?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,S,c):S[m],y);D.skip=isNaN(B)||isNaN(W)||L,D.stop=y>0&&Math.abs(S[f]-v[f])>b,g&&(D.parsed=S,D.raw=d.data[y]),h&&(D.options=u||this.resolveDataElementOptions(y,P.active?"active":a)),_||this.updateElement(P,y,D,a),v=S}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,r=e.options&&e.options.borderWidth||0,a=t.data||[];if(!a.length)return r;let o=a[0].size(this.resolveDataElementOptions(0)),s=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,o,s)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return i})(),Bc=(()=>{class i extends Se{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:r,color:a}}=t.legend.options;return e.labels.map((o,s)=>{let c=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:a,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart,a=r.data.labels||[],o=bi(e._parsed[t].r,r.options.locale);return{label:a[t]||"",value:o}}parseObjectData(t,e,r,a){return $a.bind(this)(t,e,r,a)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,a)=>{let o=this.getParsed(a).r;!isNaN(o)&&this.chart.getDataVisibility(a)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,r=t.options,a=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(a/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),l=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,c=s.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,h=d.yCenter,f=d.getIndexAngle(0)-.5*Q,m=f,p,g=360/this.countVisibleElements();for(p=0;p<e;++p)m+=this._computeAngle(p,a,g);for(p=e;p<e+r;p++){let b=t[p],_=m,k=m+this._computeAngle(p,a,g),C=s.getDataVisibility(p)?d.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=k,o&&(c.animateScale&&(C=0),c.animateRotate&&(_=k=f));let v={x:u,y:h,innerRadius:0,outerRadius:C,startAngle:_,endAngle:k,options:this.resolveDataElementOptions(p,b.active?"active":a)};this.updateElement(b,p,v,a)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((r,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&e++}),e}_computeAngle(t,e,r){return this.chart.getDataVisibility(t)?Ht(this.resolveDataElementOptions(t,e).angle||r):0}}return i})(),Sf=(()=>{class i extends Eo{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return i})(),Of=(()=>{class i extends Se{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let e=this._cachedMeta.vScale,r=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(r[e.axis])}}parseObjectData(t,e,r,a){return $a.bind(this)(t,e,r,a)}update(t){let e=this._cachedMeta,r=e.dataset,a=e.data||[],o=e.iScale.getLabels();if(r.points=a,t!=="resize"){let s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);let l={_loop:!0,_fullLoop:o.length===a.length,options:s};this.updateElement(r,void 0,l,t)}this.updateElements(a,0,a.length,t)}updateElements(t,e,r,a){let o=this._cachedMeta.rScale,s=a==="reset";for(let l=e;l<e+r;l++){let c=t[l],d=this.resolveDataElementOptions(l,c.active?"active":a),u=o.getPointPositionForValue(l,this.getParsed(l).r),h=s?o.xCenter:u.x,f=s?o.yCenter:u.y,m={x:h,y:f,angle:u.angle,skip:isNaN(h)||isNaN(f),options:d};this.updateElement(c,l,m,a)}}}return i})(),If=(()=>{class i extends Se{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){let e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:o}=e,s=this.getParsed(t),l=a.getLabelForValue(s.x),c=o.getLabelForValue(s.y);return{label:r[t]||"",value:"("+l+", "+c+")"}}update(t){let e=this._cachedMeta,{data:r=[]}=e,a=this.chart._animationsDisabled,{start:o,count:s}=Ba(e,r,a);if(this._drawStart=o,this._drawCount=s,za(e)&&(o=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=e;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=r;let d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(l,void 0,{animated:!a,options:d},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(r,o,s,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(e,a),h=this.getSharedOptions(u),f=this.includeOptions(a,h),m=s.axis,p=l.axis,{spanGaps:g,segment:b}=this.options,_=He(g)?g:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||o||a==="none",C=e>0&&this.getParsed(e-1);for(let v=e;v<e+r;++v){let y=t[v],P=this.getParsed(v),D=k?y:{},S=U(P[p]),L=D[m]=s.getPixelForValue(P[m],v),B=D[p]=o||S?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,P,c):P[p],v);D.skip=isNaN(L)||isNaN(B)||S,D.stop=v>0&&Math.abs(P[m]-C[m])>_,b&&(D.parsed=P,D.raw=d.data[v]),f&&(D.options=h||this.resolveDataElementOptions(v,y.active?"active":a)),k||this.updateElement(y,v,D,a),C=P}this.updateSharedOptions(h,a,u)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let l=0;for(let c=e.length-1;c>=0;--c)l=Math.max(l,e[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let r=t.dataset,a=r.options&&r.options.borderWidth||0;if(!e.length)return a;let o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(a,o,s)/2}}return i})(),Af=Object.freeze({__proto__:null,BarController:Tf,BubbleController:Mf,DoughnutController:Eo,LineController:Pf,PieController:Sf,PolarAreaController:Bc,RadarController:Of,ScatterController:If});function Ye(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var po=class i{static override(n){Object.assign(i.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return Ye()}parse(){return Ye()}format(){return Ye()}add(){return Ye()}diff(){return Ye()}startOf(){return Ye()}endOf(){return Ye()}},Lo={_date:po};function Rf(i,n,t,e){let{controller:r,data:a,_sorted:o}=i,s=r._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(s&&n===s.axis&&n!=="r"&&o&&a.length){let c=s._reversePixels?fl:Kt;if(e){if(r._sharedOptions){let d=a[0],u=typeof d.getRange=="function"&&d.getRange(n);if(u){let h=c(a,n,t-u),f=c(a,n,t+u);return{lo:h.lo,hi:f.hi}}}}else{let d=c(a,n,t);if(l){let{vScale:u}=r._cachedMeta,{_parsed:h}=i,f=h.slice(0,d.lo+1).reverse().findIndex(p=>!U(p[u.axis]));d.lo-=Math.max(0,f);let m=h.slice(d.hi).findIndex(p=>!U(p[u.axis]));d.hi+=Math.max(0,m)}return d}}return{lo:0,hi:a.length-1}}function on(i,n,t,e,r){let a=i.getSortedVisibleDatasetMetas(),o=t[n];for(let s=0,l=a.length;s<l;++s){let{index:c,data:d}=a[s],{lo:u,hi:h}=Rf(a[s],n,o,r);for(let f=u;f<=h;++f){let m=d[f];m.skip||e(m,c,f)}}}function Ef(i){let n=i.indexOf("x")!==-1,t=i.indexOf("y")!==-1;return function(e,r){let a=n?Math.abs(e.x-r.x):0,o=t?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function ao(i,n,t,e,r){let a=[];return!r&&!i.isPointInArea(n)||on(i,t,n,function(s,l,c){!r&&!Zt(s,i.chartArea,0)||s.inRange(n.x,n.y,e)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function Lf(i,n,t,e){let r=[];function a(o,s,l){let{startAngle:c,endAngle:d}=o.getProps(["startAngle","endAngle"],e),{angle:u}=Aa(o,{x:n.x,y:n.y});gi(u,c,d)&&r.push({element:o,datasetIndex:s,index:l})}return on(i,t,n,a),r}function Ff(i,n,t,e,r,a){let o=[],s=Ef(t),l=Number.POSITIVE_INFINITY;function c(d,u,h){let f=d.inRange(n.x,n.y,r);if(e&&!f)return;let m=d.getCenterPoint(r);if(!(!!a||i.isPointInArea(m))&&!f)return;let g=s(n,m);g<l?(o=[{element:d,datasetIndex:u,index:h}],l=g):g===l&&o.push({element:d,datasetIndex:u,index:h})}return on(i,t,n,c),o}function oo(i,n,t,e,r,a){return!a&&!i.isPointInArea(n)?[]:t==="r"&&!e?Lf(i,n,t,r):Ff(i,n,t,e,r,a)}function Ul(i,n,t,e,r){let a=[],o=t==="x"?"inXRange":"inYRange",s=!1;return on(i,t,n,(l,c,d)=>{l[o]&&l[o](n[t],r)&&(a.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(n.x,n.y,r))}),e&&!s?[]:a}var Bf={evaluateInteractionItems:on,modes:{index(i,n,t,e){let r=De(n,i),a=t.axis||"x",o=t.includeInvisible||!1,s=t.intersect?ao(i,r,a,e,o):oo(i,r,a,!1,e,o),l=[];return s.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let d=s[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(i,n,t,e){let r=De(n,i),a=t.axis||"xy",o=t.includeInvisible||!1,s=t.intersect?ao(i,r,a,e,o):oo(i,r,a,!1,e,o);if(s.length>0){let l=s[0].datasetIndex,c=i.getDatasetMeta(l).data;s=[];for(let d=0;d<c.length;++d)s.push({element:c[d],datasetIndex:l,index:d})}return s},point(i,n,t,e){let r=De(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return ao(i,r,a,e,o)},nearest(i,n,t,e){let r=De(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return oo(i,r,a,t.intersect,e,o)},x(i,n,t,e){let r=De(n,i);return Ul(i,r,"x",t.intersect,e)},y(i,n,t,e){let r=De(n,i);return Ul(i,r,"y",t.intersect,e)}}},zc=["left","top","right","bottom"];function Gi(i,n){return i.filter(t=>t.pos===n)}function jl(i,n){return i.filter(t=>zc.indexOf(t.pos)===-1&&t.box.axis===n)}function Ki(i,n){return i.sort((t,e)=>{let r=n?e:t,a=n?t:e;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function zf(i){let n=[],t,e,r,a,o,s;for(t=0,e=(i||[]).length;t<e;++t)r=i[t],{position:a,options:{stack:o,stackWeight:s=1}}=r,n.push({index:t,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&a+o,stackWeight:s});return n}function Nf(i){let n={};for(let t of i){let{stack:e,pos:r,stackWeight:a}=t;if(!e||!zc.includes(r))continue;let o=n[e]||(n[e]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return n}function Wf(i,n){let t=Nf(i),{vBoxMaxWidth:e,hBoxMaxHeight:r}=n,a,o,s;for(a=0,o=i.length;a<o;++a){s=i[a];let{fullSize:l}=s.box,c=t[s.stack],d=c&&s.stackWeight/c.weight;s.horizontal?(s.width=d?d*e:l&&n.availableWidth,s.height=r):(s.width=e,s.height=d?d*r:l&&n.availableHeight)}return t}function Hf(i){let n=zf(i),t=Ki(n.filter(c=>c.box.fullSize),!0),e=Ki(Gi(n,"left"),!0),r=Ki(Gi(n,"right")),a=Ki(Gi(n,"top"),!0),o=Ki(Gi(n,"bottom")),s=jl(n,"x"),l=jl(n,"y");return{fullSize:t,leftAndTop:e.concat(a),rightAndBottom:r.concat(l).concat(o).concat(s),chartArea:Gi(n,"chartArea"),vertical:e.concat(r).concat(l),horizontal:a.concat(o).concat(s)}}function ql(i,n,t,e){return Math.max(i[t],n[t])+Math.max(i[e],n[e])}function Nc(i,n){i.top=Math.max(i.top,n.top),i.left=Math.max(i.left,n.left),i.bottom=Math.max(i.bottom,n.bottom),i.right=Math.max(i.right,n.right)}function Vf(i,n,t,e){let{pos:r,box:a}=t,o=i.maxPadding;if(!j(r)){t.size&&(i[r]-=t.size);let u=e[t.stack]||{size:0,count:1};u.size=Math.max(u.size,t.horizontal?a.height:a.width),t.size=u.size/u.count,i[r]+=t.size}a.getPadding&&Nc(o,a.getPadding());let s=Math.max(0,n.outerWidth-ql(o,i,"left","right")),l=Math.max(0,n.outerHeight-ql(o,i,"top","bottom")),c=s!==i.w,d=l!==i.h;return i.w=s,i.h=l,t.horizontal?{same:c,other:d}:{same:d,other:c}}function Yf(i){let n=i.maxPadding;function t(e){let r=Math.max(n[e]-i[e],0);return i[e]+=r,r}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function Uf(i,n){let t=n.maxPadding;function e(r){let a={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{a[o]=Math.max(n[o],t[o])}),a}return e(i?["left","right"]:["top","bottom"])}function tn(i,n,t,e){let r=[],a,o,s,l,c,d;for(a=0,o=i.length,c=0;a<o;++a){s=i[a],l=s.box,l.update(s.width||n.w,s.height||n.h,Uf(s.horizontal,n));let{same:u,other:h}=Vf(n,t,s,e);c|=u&&r.length,d=d||h,l.fullSize||r.push(s)}return c&&tn(r,n,t,e)||d}function tr(i,n,t,e,r){i.top=t,i.left=n,i.right=n+e,i.bottom=t+r,i.width=e,i.height=r}function $l(i,n,t,e){let r=t.padding,{x:a,y:o}=n;for(let s of i){let l=s.box,c=e[s.stack]||{count:1,placed:0,weight:1},d=s.stackWeight/c.weight||1;if(s.horizontal){let u=n.w*d,h=c.size||l.height;mi(c.start)&&(o=c.start),l.fullSize?tr(l,r.left,o,t.outerWidth-r.right-r.left,h):tr(l,n.left+c.placed,o,u,h),c.start=o,c.placed+=u,o=l.bottom}else{let u=n.h*d,h=c.size||l.width;mi(c.start)&&(a=c.start),l.fullSize?tr(l,a,r.top,h,t.outerHeight-r.bottom-r.top):tr(l,a,n.top+c.placed,h,u),c.start=a,c.placed+=u,a=l.right}}n.x=a,n.y=o}var wt={addBox(i,n){i.boxes||(i.boxes=[]),n.fullSize=n.fullSize||!1,n.position=n.position||"top",n.weight=n.weight||0,n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]},i.boxes.push(n)},removeBox(i,n){let t=i.boxes?i.boxes.indexOf(n):-1;t!==-1&&i.boxes.splice(t,1)},configure(i,n,t){n.fullSize=t.fullSize,n.position=t.position,n.weight=t.weight},update(i,n,t,e){if(!i)return;let r=xt(i.options.layout.padding),a=Math.max(n-r.width,0),o=Math.max(t-r.height,0),s=Hf(i.boxes),l=s.vertical,c=s.horizontal;G(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,u=Object.freeze({outerWidth:n,outerHeight:t,padding:r,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/d,hBoxMaxHeight:o/2}),h=Object.assign({},r);Nc(h,xt(e));let f=Object.assign({maxPadding:h,w:a,h:o,x:r.left,y:r.top},r),m=Wf(l.concat(c),u);tn(s.fullSize,f,u,m),tn(l,f,u,m),tn(c,f,u,m)&&tn(l,f,u,m),Yf(f),$l(s.leftAndTop,f,u,m),f.x+=f.w,f.y+=f.h,$l(s.rightAndBottom,f,u,m),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},G(s.chartArea,p=>{let g=p.box;Object.assign(g,i.chartArea),g.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},cr=class{acquireContext(n,t){}releaseContext(n){return!1}addEventListener(n,t,e){}removeEventListener(n,t,e){}getDevicePixelRatio(){return 1}getMaximumSize(n,t,e,r){return t=Math.max(0,t||n.width),e=e||n.height,{width:t,height:Math.max(0,r?Math.floor(t/r):e)}}isAttached(n){return!0}updateConfig(n){}},go=class extends cr{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}},or="$chartjs",jf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ql=i=>i===null||i==="";function qf(i,n){let t=i.style,e=i.getAttribute("height"),r=i.getAttribute("width");if(i[or]={initial:{height:e,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Ql(r)){let a=Xa(i,"width");a!==void 0&&(i.width=a)}if(Ql(e))if(i.style.height==="")i.height=i.width/(n||2);else{let a=Xa(i,"height");a!==void 0&&(i.height=a)}return i}var Wc=Ol?{passive:!0}:!1;function $f(i,n,t){i&&i.addEventListener(n,t,Wc)}function Qf(i,n,t){i&&i.canvas&&i.canvas.removeEventListener(n,t,Wc)}function Xf(i,n){let t=jf[i.type]||i.type,{x:e,y:r}=De(i,n);return{type:t,chart:n,native:i,x:e!==void 0?e:null,y:r!==void 0?r:null}}function dr(i,n){for(let t of i)if(t===n||t.contains(n))return!0}function Gf(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||dr(s.addedNodes,e),o=o&&!dr(s.removedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function Kf(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||dr(s.removedNodes,e),o=o&&!dr(s.addedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}var nn=new Map,Xl=0;function Hc(){let i=window.devicePixelRatio;i!==Xl&&(Xl=i,nn.forEach((n,t)=>{t.currentDevicePixelRatio!==i&&n()}))}function Zf(i,n){nn.size||window.addEventListener("resize",Hc),nn.set(i,n)}function Jf(i){nn.delete(i),nn.size||window.removeEventListener("resize",Hc)}function tm(i,n,t){let e=i.canvas,r=e&&Zn(e);if(!r)return;let a=Fa((s,l)=>{let c=r.clientWidth;t(s,l),c<r.clientWidth&&t()},window),o=new ResizeObserver(s=>{let l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||a(c,d)});return o.observe(r),Zf(i,a),o}function so(i,n,t){t&&t.disconnect(),n==="resize"&&Jf(i)}function em(i,n,t){let e=i.canvas,r=Fa(a=>{i.ctx!==null&&t(Xf(a,i))},i);return $f(e,n,r),r}var bo=class extends cr{acquireContext(n,t){let e=n&&n.getContext&&n.getContext("2d");return e&&e.canvas===n?(qf(n,t),e):null}releaseContext(n){let t=n.canvas;if(!t[or])return!1;let e=t[or].initial;["height","width"].forEach(a=>{let o=e[a];U(o)?t.removeAttribute(a):t.setAttribute(a,o)});let r=e.style||{};return Object.keys(r).forEach(a=>{t.style[a]=r[a]}),t.width=t.width,delete t[or],!0}addEventListener(n,t,e){this.removeEventListener(n,t);let r=n.$proxies||(n.$proxies={}),o={attach:Gf,detach:Kf,resize:tm}[t]||em;r[t]=o(n,t,e)}removeEventListener(n,t){let e=n.$proxies||(n.$proxies={}),r=e[t];if(!r)return;({attach:so,detach:so,resize:so}[t]||Qf)(n,t,r),e[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,e,r){return Sl(n,t,e,r)}isAttached(n){let t=n&&Zn(n);return!!(t&&t.isConnected)}};function im(i){return!Kn()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?go:bo}var Qt=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(n){let{x:t,y:e}=this.getProps(["x","y"],n);return{x:t,y:e}}hasValue(){return He(this.x)&&He(this.y)}getProps(n,t){let e=this.$animations;if(!t||!e)return this;let r={};return n.forEach(a=>{r[a]=e[a]&&e[a].active()?e[a]._to:this[a]}),r}};function nm(i,n){let t=i.options.ticks,e=rm(i),r=Math.min(t.maxTicksLimit||e,e),a=t.major.enabled?om(n):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>r)return sm(n,c,a,o/r),c;let d=am(a,n,r);if(o>0){let u,h,f=o>1?Math.round((l-s)/(o-1)):null;for(er(n,c,d,U(f)?0:s-f,s),u=0,h=o-1;u<h;u++)er(n,c,d,a[u],a[u+1]);return er(n,c,d,l,U(f)?n.length:l+f),c}return er(n,c,d),c}function rm(i){let n=i.options.offset,t=i._tickSize(),e=i._length/t+(n?0:1),r=i._maxLength/t;return Math.floor(Math.min(e,r))}function am(i,n,t){let e=lm(i),r=n.length/t;if(!e)return Math.max(r,1);let a=dl(e);for(let o=0,s=a.length-1;o<s;o++){let l=a[o];if(l>r)return l}return Math.max(r,1)}function om(i){let n=[],t,e;for(t=0,e=i.length;t<e;t++)i[t].major&&n.push(t);return n}function sm(i,n,t,e){let r=0,a=t[0],o;for(e=Math.ceil(e),o=0;o<i.length;o++)o===a&&(n.push(i[o]),r++,a=t[r*e])}function er(i,n,t,e,r){let a=N(e,0),o=Math.min(N(r,i.length),i.length),s=0,l,c,d;for(t=Math.ceil(t),r&&(l=r-e,t=l/Math.floor(l/t)),d=a;d<0;)s++,d=Math.round(a+s*t);for(c=Math.max(a,0);c<o;c++)c===d&&(n.push(i[c]),s++,d=Math.round(a+s*t))}function lm(i){let n=i.length,t,e;if(n<2)return!1;for(e=i[0],t=1;t<n;++t)if(i[t]-i[t-1]!==e)return!1;return e}var cm=i=>i==="left"?"right":i==="right"?"left":i,Gl=(i,n,t)=>n==="top"||n==="left"?i[n]+t:i[n]-t,Kl=(i,n)=>Math.min(n||i,i);function Zl(i,n){let t=[],e=i.length/n,r=i.length,a=0;for(;a<r;a+=e)t.push(i[Math.floor(a)]);return t}function dm(i,n,t){let e=i.ticks.length,r=Math.min(n,e-1),a=i._startPixel,o=i._endPixel,s=1e-6,l=i.getPixelForTick(r),c;if(!(t&&(e===1?c=Math.max(l-a,o-l):n===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(r-1))/2,l+=r<n?c:-c,l<a-s||l>o+s)))return l}function um(i,n){G(i,t=>{let e=t.gc,r=e.length/2,a;if(r>n){for(a=0;a<r;++a)delete t.data[e[a]];e.splice(0,r)}})}function Zi(i){return i.drawTicks?i.tickLength:0}function Jl(i,n){if(!i.display)return 0;let t=dt(i.font,n),e=xt(i.padding);return(et(i.text)?i.text.length:1)*t.lineHeight+e.height}function hm(i,n){return de(i,{scale:n,type:"scale"})}function fm(i,n,t){return de(i,{tick:t,index:n,type:"tick"})}function mm(i,n,t){let e=qn(i);return(t&&n!=="right"||!t&&n==="right")&&(e=cm(e)),e}function pm(i,n,t,e){let{top:r,left:a,bottom:o,right:s,chart:l}=i,{chartArea:c,scales:d}=l,u=0,h,f,m,p=o-r,g=s-a;if(i.isHorizontal()){if(f=vt(e,a,s),j(t)){let b=Object.keys(t)[0],_=t[b];m=d[b].getPixelForValue(_)+p-n}else t==="center"?m=(c.bottom+c.top)/2+p-n:m=Gl(i,t,n);h=s-a}else{if(j(t)){let b=Object.keys(t)[0],_=t[b];f=d[b].getPixelForValue(_)-g+n}else t==="center"?f=(c.left+c.right)/2-g+n:f=Gl(i,t,n);m=vt(e,o,r),u=t==="left"?-lt:lt}return{titleX:f,titleY:m,maxWidth:h,rotation:u}}var je=class i extends Qt{constructor(n){super(),this.id=n.id,this.type=n.type,this.options=void 0,this.ctx=n.ctx,this.chart=n.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(n){this.options=n.setContext(this.getContext()),this.axis=n.axis,this._userMin=this.parse(n.min),this._userMax=this.parse(n.max),this._suggestedMin=this.parse(n.suggestedMin),this._suggestedMax=this.parse(n.suggestedMax)}parse(n,t){return n}getUserBounds(){let{_userMin:n,_userMax:t,_suggestedMin:e,_suggestedMax:r}=this;return n=St(n,Number.POSITIVE_INFINITY),t=St(t,Number.NEGATIVE_INFINITY),e=St(e,Number.POSITIVE_INFINITY),r=St(r,Number.NEGATIVE_INFINITY),{min:St(n,e),max:St(t,r),minDefined:at(n),maxDefined:at(t)}}getMinMax(n){let{min:t,max:e,minDefined:r,maxDefined:a}=this.getUserBounds(),o;if(r&&a)return{min:t,max:e};let s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)o=s[l].controller.getMinMax(this,n),r||(t=Math.min(t,o.min)),a||(e=Math.max(e,o.max));return t=a&&t>e?e:t,e=r&&t>e?t:e,{min:St(t,St(e,t)),max:St(e,St(t,e))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}getLabelItems(n=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(n))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){J(this.options.beforeUpdate,[this])}update(n,t,e){let{beginAtZero:r,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=t,this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=wl(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=s<this.ticks.length;this._convertTicksToLabels(l?Zl(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=nm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let n=this.options.reverse,t,e;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){J(this.options.afterUpdate,[this])}beforeSetDimensions(){J(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(){J(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),J(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){J(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(n){let t=this.options.ticks,e,r,a;for(e=0,r=n.length;e<r;e++)a=n[e],a.label=J(t.callback,[a.value,e,n],this)}afterTickToLabelConversion(){J(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){J(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let n=this.options,t=n.ticks,e=Kl(this.ticks.length,n.ticks.maxTicksLimit),r=t.minRotation||0,a=t.maxRotation,o=r,s,l,c;if(!this._isVisible()||!t.display||r>=a||e<=1||!this.isHorizontal()){this.labelRotation=r;return}let d=this._getLabelSizes(),u=d.widest.width,h=d.highest.height,f=pt(this.chart.width-u,0,this.maxWidth);s=n.offset?this.maxWidth/e:f/(e-1),u+6>s&&(s=f/(e-(n.offset?.5:1)),l=this.maxHeight-Zi(n.grid)-t.padding-Jl(n.title,this.chart.options.font),c=Math.sqrt(u*u+h*h),o=Un(Math.min(Math.asin(pt((d.highest.height+6)/s,-1,1)),Math.asin(pt(l/c,-1,1))-Math.asin(pt(h/c,-1,1)))),o=Math.max(r,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){J(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){J(this.options.beforeFit,[this])}fit(){let n={width:0,height:0},{chart:t,options:{ticks:e,title:r,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){let l=Jl(r,t.options.font);if(s?(n.width=this.maxWidth,n.height=Zi(a)+l):(n.height=this.maxHeight,n.width=Zi(a)+l),e.display&&this.ticks.length){let{first:c,last:d,widest:u,highest:h}=this._getLabelSizes(),f=e.padding*2,m=Ht(this.labelRotation),p=Math.cos(m),g=Math.sin(m);if(s){let b=e.mirror?0:g*u.width+p*h.height;n.height=Math.min(this.maxHeight,n.height+b+f)}else{let b=e.mirror?0:p*u.width+g*h.height;n.width=Math.min(this.maxWidth,n.width+b+f)}this._calculatePadding(c,d,g,p)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,t,e,r){let{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),h=0,f=0;l?c?(h=r*n.width,f=e*t.height):(h=e*n.height,f=r*t.width):a==="start"?f=t.width:a==="end"?h=n.width:a!=="inner"&&(h=n.width/2,f=t.width/2),this.paddingLeft=Math.max((h-d+o)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-u+o)*this.width/(this.width-u),0)}else{let d=t.height/2,u=n.height/2;a==="start"?(d=0,u=n.height):a==="end"&&(d=t.height,u=0),this.paddingTop=d+o,this.paddingBottom=u+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(){J(this.options.afterFit,[this])}isHorizontal(){let{axis:n,position:t}=this.options;return t==="top"||t==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let t,e;for(t=0,e=n.length;t<e;t++)U(n[t].label)&&(n.splice(t,1),e--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let n=this._labelSizes;if(!n){let t=this.options.ticks.sampleSize,e=this.ticks;t<e.length&&(e=Zl(e,t)),this._labelSizes=n=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return n}_computeLabelSizes(n,t,e){let{ctx:r,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(t/Kl(t,e)),c=0,d=0,u,h,f,m,p,g,b,_,k,C,v;for(u=0;u<t;u+=l){if(m=n[u].label,p=this._resolveTickFontOptions(u),r.font=g=p.string,b=a[g]=a[g]||{data:{},gc:[]},_=p.lineHeight,k=C=0,!U(m)&&!et(m))k=Ui(r,b.data,b.gc,k,m),C=_;else if(et(m))for(h=0,f=m.length;h<f;++h)v=m[h],!U(v)&&!et(v)&&(k=Ui(r,b.data,b.gc,k,v),C+=_);o.push(k),s.push(C),c=Math.max(k,c),d=Math.max(C,d)}um(a,t);let y=o.indexOf(c),P=s.indexOf(d),D=S=>({width:o[S]||0,height:s[S]||0});return{first:D(0),last:D(t-1),widest:D(y),highest:D(P),widths:o,heights:s}}getLabelForValue(n){return n}getPixelForValue(n,t){return NaN}getValueForPixel(n){}getPixelForTick(n){let t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);let t=this._startPixel+n*this._length;return hl(this._alignToPixels?Ce(this.chart,t,0):t)}getDecimalForPixel(n){let t=(n-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:n,max:t}=this;return n<0&&t<0?t:n>0&&t>0?n:0}getContext(n){let t=this.ticks||[];if(n>=0&&n<t.length){let e=t[n];return e.$context||(e.$context=fm(this.getContext(),n,e))}return this.$context||(this.$context=hm(this.chart.getContext(),this))}_tickSize(){let n=this.options.ticks,t=Ht(this.labelRotation),e=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),a=this._getLabelSizes(),o=n.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*e>s*r?s/e:l/r:l*r<s*e?l/e:s/r}_isVisible(){let n=this.options.display;return n!=="auto"?!!n:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(n){let t=this.axis,e=this.chart,r=this.options,{grid:a,position:o,border:s}=r,l=a.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),h=Zi(a),f=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,b=function(Y){return Ce(e,Y,p)},_,k,C,v,y,P,D,S,L,B,W,rt;if(o==="top")_=b(this.bottom),P=this.bottom-h,S=_-g,B=b(n.top)+g,rt=n.bottom;else if(o==="bottom")_=b(this.top),B=n.top,rt=b(n.bottom)-g,P=_+g,S=this.top+h;else if(o==="left")_=b(this.right),y=this.right-h,D=_-g,L=b(n.left)+g,W=n.right;else if(o==="right")_=b(this.left),L=n.left,W=b(n.right)-g,y=_+g,D=this.left+h;else if(t==="x"){if(o==="center")_=b((n.top+n.bottom)/2+.5);else if(j(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}B=n.top,rt=n.bottom,P=_+g,S=P+h}else if(t==="y"){if(o==="center")_=b((n.left+n.right)/2);else if(j(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}y=_-g,D=y-h,L=n.left,W=n.right}let bt=N(r.ticks.maxTicksLimit,u),z=Math.max(1,Math.ceil(u/bt));for(k=0;k<u;k+=z){let Y=this.getContext(k),K=a.setContext(Y),At=s.setContext(Y),ut=K.lineWidth,me=K.color,pe=At.dash||[],Ft=At.dashOffset,ge=K.tickWidth,Bt=K.tickColor,be=K.tickBorderDash||[],Xt=K.tickBorderDashOffset;C=dm(this,k,l),C!==void 0&&(v=Ce(e,C,ut),c?y=D=L=W=v:P=S=B=rt=v,f.push({tx1:y,ty1:P,tx2:D,ty2:S,x1:L,y1:B,x2:W,y2:rt,width:ut,color:me,borderDash:pe,borderDashOffset:Ft,tickWidth:ge,tickColor:Bt,tickBorderDash:be,tickBorderDashOffset:Xt}))}return this._ticksLength=u,this._borderValue=_,f}_computeLabelItems(n){let t=this.axis,e=this.options,{position:r,ticks:a}=e,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=a,h=Zi(e.grid),f=h+d,m=u?-d:f,p=-Ht(this.labelRotation),g=[],b,_,k,C,v,y,P,D,S,L,B,W,rt="middle";if(r==="top")y=this.bottom-m,P=this._getXAxisLabelAlignment();else if(r==="bottom")y=this.top+m,P=this._getXAxisLabelAlignment();else if(r==="left"){let z=this._getYAxisLabelAlignment(h);P=z.textAlign,v=z.x}else if(r==="right"){let z=this._getYAxisLabelAlignment(h);P=z.textAlign,v=z.x}else if(t==="x"){if(r==="center")y=(n.top+n.bottom)/2+f;else if(j(r)){let z=Object.keys(r)[0],Y=r[z];y=this.chart.scales[z].getPixelForValue(Y)+f}P=this._getXAxisLabelAlignment()}else if(t==="y"){if(r==="center")v=(n.left+n.right)/2-f;else if(j(r)){let z=Object.keys(r)[0],Y=r[z];v=this.chart.scales[z].getPixelForValue(Y)}P=this._getYAxisLabelAlignment(h).textAlign}t==="y"&&(l==="start"?rt="top":l==="end"&&(rt="bottom"));let bt=this._getLabelSizes();for(b=0,_=s.length;b<_;++b){k=s[b],C=k.label;let z=a.setContext(this.getContext(b));D=this.getPixelForTick(b)+a.labelOffset,S=this._resolveTickFontOptions(b),L=S.lineHeight,B=et(C)?C.length:1;let Y=B/2,K=z.color,At=z.textStrokeColor,ut=z.textStrokeWidth,me=P;o?(v=D,P==="inner"&&(b===_-1?me=this.options.reverse?"left":"right":b===0?me=this.options.reverse?"right":"left":me="center"),r==="top"?c==="near"||p!==0?W=-B*L+L/2:c==="center"?W=-bt.highest.height/2-Y*L+L:W=-bt.highest.height+L/2:c==="near"||p!==0?W=L/2:c==="center"?W=bt.highest.height/2-Y*L:W=bt.highest.height-B*L,u&&(W*=-1),p!==0&&!z.showLabelBackdrop&&(v+=L/2*Math.sin(p))):(y=D,W=(1-B)*L/2);let pe;if(z.showLabelBackdrop){let Ft=xt(z.backdropPadding),ge=bt.heights[b],Bt=bt.widths[b],be=W-Ft.top,Xt=0-Ft.left;switch(rt){case"middle":be-=ge/2;break;case"bottom":be-=ge;break}switch(P){case"center":Xt-=Bt/2;break;case"right":Xt-=Bt;break;case"inner":b===_-1?Xt-=Bt:b>0&&(Xt-=Bt/2);break}pe={left:Xt,top:be,width:Bt+Ft.width,height:ge+Ft.height,color:z.backdropColor}}g.push({label:C,font:S,textOffset:W,options:{rotation:p,color:K,strokeColor:At,strokeWidth:ut,textAlign:me,textBaseline:rt,translation:[v,y],backdrop:pe}})}return g}_getXAxisLabelAlignment(){let{position:n,ticks:t}=this.options;if(-Ht(this.labelRotation))return n==="top"?"left":"right";let r="center";return t.align==="start"?r="left":t.align==="end"?r="right":t.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(n){let{position:t,ticks:{crossAlign:e,mirror:r,padding:a}}=this.options,o=this._getLabelSizes(),s=n+a,l=o.widest.width,c,d;return t==="left"?r?(d=this.right+a,e==="near"?c="left":e==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-s,e==="near"?c="right":e==="center"?(c="center",d-=l/2):(c="left",d=this.left)):t==="right"?r?(d=this.left+a,e==="near"?c="right":e==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+s,e==="near"?c="left":e==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;let n=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){let{ctx:n,options:{backgroundColor:t},left:e,top:r,width:a,height:o}=this;t&&(n.save(),n.fillStyle=t,n.fillRect(e,r,a,o),n.restore())}getLineWidthForValue(n){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let r=this.ticks.findIndex(a=>a.value===n);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(n){let t=this.options.grid,e=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n)),a,o,s=(l,c,d)=>{!d.width||!d.color||(e.save(),e.lineWidth=d.width,e.strokeStyle=d.color,e.setLineDash(d.borderDash||[]),e.lineDashOffset=d.borderDashOffset,e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(c.x,c.y),e.stroke(),e.restore())};if(t.display)for(a=0,o=r.length;a<o;++a){let l=r[a];t.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:n,ctx:t,options:{border:e,grid:r}}=this,a=e.setContext(this.getContext()),o=e.display?a.width:0;if(!o)return;let s=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,d,u,h;this.isHorizontal()?(c=Ce(n,this.left,o)-o/2,d=Ce(n,this.right,s)+s/2,u=h=l):(u=Ce(n,this.top,o)-o/2,h=Ce(n,this.bottom,s)+s/2,c=d=l),t.save(),t.lineWidth=a.width,t.strokeStyle=a.color,t.beginPath(),t.moveTo(c,u),t.lineTo(d,h),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;let e=this.ctx,r=this._computeLabelArea();r&&$i(e,r);let a=this.getLabelItems(n);for(let o of a){let s=o.options,l=o.font,c=o.label,d=o.textOffset;Te(e,c,0,d,l,s)}r&&Qi(e)}drawTitle(){let{ctx:n,options:{position:t,title:e,reverse:r}}=this;if(!e.display)return;let a=dt(e.font),o=xt(e.padding),s=e.align,l=a.lineHeight/2;t==="bottom"||t==="center"||j(t)?(l+=o.bottom,et(e.text)&&(l+=a.lineHeight*(e.text.length-1))):l+=o.top;let{titleX:c,titleY:d,maxWidth:u,rotation:h}=pm(this,l,t,s);Te(n,e.text,0,0,a,{color:e.color,maxWidth:u,rotation:h,textAlign:mm(s,t,r),textBaseline:"middle",translation:[c,d]})}draw(n){this._isVisible()&&(this.drawBackground(),this.drawGrid(n),this.drawBorder(),this.drawTitle(),this.drawLabels(n))}_layers(){let n=this.options,t=n.ticks&&n.ticks.z||0,e=N(n.grid&&n.grid.z,-1),r=N(n.border&&n.border.z,0);return!this._isVisible()||this.draw!==i.prototype.draw?[{z:t,draw:a=>{this.draw(a)}}]:[{z:e,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(n){let t=this.chart.getSortedVisibleDatasetMetas(),e=this.axis+"AxisID",r=[],a,o;for(a=0,o=t.length;a<o;++a){let s=t[a];s[e]===this.id&&(!n||s.type===n)&&r.push(s)}return r}_resolveTickFontOptions(n){let t=this.options.ticks.setContext(this.getContext(n));return dt(t.font)}_maxDigits(){let n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}},yi=class{constructor(n,t,e){this.type=n,this.scope=t,this.override=e,this.items=Object.create(null)}isForType(n){return Object.prototype.isPrototypeOf.call(this.type.prototype,n.prototype)}register(n){let t=Object.getPrototypeOf(n),e;_m(t)&&(e=this.register(t));let r=this.items,a=n.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+n);return a in r||(r[a]=n,gm(n,o,e),this.override&&nt.override(n.id,n.overrides)),o}get(n){return this.items[n]}unregister(n){let t=this.items,e=n.id,r=this.scope;e in t&&delete t[e],r&&e in nt[r]&&(delete nt[r][e],this.override&&delete we[e])}};function gm(i,n,t){let e=ui(Object.create(null),[t?nt.get(t):{},nt.get(n),i.defaults]);nt.set(n,e),i.defaultRoutes&&bm(n,i.defaultRoutes),i.descriptors&&nt.describe(n,i.descriptors)}function bm(i,n){Object.keys(n).forEach(t=>{let e=t.split("."),r=e.pop(),a=[i].concat(e).join("."),o=n[t].split("."),s=o.pop(),l=o.join(".");nt.route(a,r,l,s)})}function _m(i){return"id"in i&&"defaults"in i}var _o=class{constructor(){this.controllers=new yi(Se,"datasets",!0),this.elements=new yi(Qt,"elements"),this.plugins=new yi(Object,"plugins"),this.scales=new yi(je,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,t,e){[...t].forEach(r=>{let a=e||this._getRegistryForType(r);e||a.isForType(r)||a===this.plugins&&r.id?this._exec(n,a,r):G(r,o=>{let s=e||this._getRegistryForType(o);this._exec(n,s,o)})})}_exec(n,t,e){let r=Yn(n);J(e["before"+r],[],e),t[n](e),J(e["after"+r],[],e)}_getRegistryForType(n){for(let t=0;t<this._typedRegistries.length;t++){let e=this._typedRegistries[t];if(e.isForType(n))return e}return this.plugins}_get(n,t,e){let r=t.get(n);if(r===void 0)throw new Error('"'+n+'" is not a registered '+e+".");return r}},ie=new _o,vo=class{constructor(){this._init=[]}notify(n,t,e,r){t==="beforeInit"&&(this._init=this._createDescriptors(n,!0),this._notify(this._init,n,"install"));let a=r?this._descriptors(n).filter(r):this._descriptors(n),o=this._notify(a,n,t,e);return t==="afterDestroy"&&(this._notify(a,n,"stop"),this._notify(this._init,n,"uninstall")),o}_notify(n,t,e,r){r=r||{};for(let a of n){let o=a.plugin,s=o[e],l=[t,r,a.options];if(J(s,l,o)===!1&&r.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(n){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(n);return this._notifyStateChanges(n),t}_createDescriptors(n,t){let e=n&&n.config,r=N(e.options&&e.options.plugins,{}),a=vm(e);return r===!1&&!t?[]:ym(n,a,r,t)}_notifyStateChanges(n){let t=this._oldCache||[],e=this._cache,r=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(r(t,e),n,"stop"),this._notify(r(e,t),n,"start")}};function vm(i){let n={},t=[],e=Object.keys(ie.plugins.items);for(let a=0;a<e.length;a++)t.push(ie.getPlugin(e[a]));let r=i.plugins||[];for(let a=0;a<r.length;a++){let o=r[a];t.indexOf(o)===-1&&(t.push(o),n[o.id]=!0)}return{plugins:t,localIds:n}}function xm(i,n){return!n&&i===!1?null:i===!0?{}:i}function ym(i,{plugins:n,localIds:t},e,r){let a=[],o=i.getContext();for(let s of n){let l=s.id,c=xm(e[l],r);c!==null&&a.push({plugin:s,options:km(i.config,{plugin:s,local:t[l]},c,o)})}return a}function km(i,{plugin:n,local:t},e,r){let a=i.pluginScopeKeys(n),o=i.getOptionScopes(e,a);return t&&n.defaults&&o.push(n.defaults),i.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function xo(i,n){let t=nt.datasets[i]||{};return((n.datasets||{})[i]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function wm(i,n){let t=i;return i==="_index_"?t=n:i==="_value_"&&(t=n==="x"?"y":"x"),t}function Cm(i,n){return i===n?"_index_":"_value_"}function tc(i){if(i==="x"||i==="y"||i==="r")return i}function Tm(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function yo(i,...n){if(tc(i))return i;for(let t of n){let e=t.axis||Tm(t.position)||i.length>1&&tc(i[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function ec(i,n,t){if(t[n+"AxisID"]===i)return{axis:n}}function Mm(i,n){if(n.data&&n.data.datasets){let t=n.data.datasets.filter(e=>e.xAxisID===i||e.yAxisID===i);if(t.length)return ec(i,"x",t[0])||ec(i,"y",t[0])}return{}}function Dm(i,n){let t=we[i.type]||{scales:{}},e=n.scales||{},r=xo(i.type,n),a=Object.create(null);return Object.keys(e).forEach(o=>{let s=e[o];if(!j(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);let l=yo(o,s,Mm(o,i),nt.scales[s.type]),c=Cm(l,r),d=t.scales||{};a[o]=fi(Object.create(null),[{axis:l},s,d[l],d[c]])}),i.data.datasets.forEach(o=>{let s=o.type||i.type,l=o.indexAxis||xo(s,n),d=(we[s]||{}).scales||{};Object.keys(d).forEach(u=>{let h=wm(u,l),f=o[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),fi(a[f],[{axis:h},e[f],d[u]])})}),Object.keys(a).forEach(o=>{let s=a[o];fi(s,[nt.scales[s.type],nt.scale])}),a}function Vc(i){let n=i.options||(i.options={});n.plugins=N(n.plugins,{}),n.scales=Dm(i,n)}function Yc(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Pm(i){return i=i||{},i.data=Yc(i.data),Vc(i),i}var ic=new Map,Uc=new Set;function ir(i,n){let t=ic.get(i);return t||(t=n(),ic.set(i,t),Uc.add(t)),t}var Ji=(i,n,t)=>{let e=ce(n,t);e!==void 0&&i.add(e)},ko=class{constructor(n){this._config=Pm(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=Yc(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){let n=this._config;this.clearCache(),Vc(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return ir(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return ir(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return ir(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){let t=n.id,e=this.type;return ir(`${e}-plugin-${t}`,()=>[[`plugins.${t}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,t){let e=this._scopeCache,r=e.get(n);return(!r||t)&&(r=new Map,e.set(n,r)),r}getOptionScopes(n,t,e){let{options:r,type:a}=this,o=this._cachedScopes(n,e),s=o.get(t);if(s)return s;let l=new Set;t.forEach(d=>{n&&(l.add(n),d.forEach(u=>Ji(l,n,u))),d.forEach(u=>Ji(l,r,u)),d.forEach(u=>Ji(l,we[a]||{},u)),d.forEach(u=>Ji(l,nt,u)),d.forEach(u=>Ji(l,$n,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Uc.has(t)&&o.set(t,c),c}chartOptionScopes(){let{options:n,type:t}=this;return[n,we[t]||{},nt.datasets[t]||{},{type:t},nt,$n]}resolveNamedOptions(n,t,e,r=[""]){let a={$shared:!0},{resolver:o,subPrefixes:s}=nc(this._resolverCache,n,r),l=o;if(Om(o,t)){a.$shared=!1,e=se(e)?e():e;let c=this.createResolver(n,e,s);l=We(o,e,c)}for(let c of t)a[c]=l[c];return a}createResolver(n,t,e=[""],r){let{resolver:a}=nc(this._resolverCache,n,e);return j(t)?We(a,t,void 0,r):a}};function nc(i,n,t){let e=i.get(n);e||(e=new Map,i.set(n,e));let r=t.join(),a=e.get(r);return a||(a={resolver:Gn(n,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},e.set(r,a)),a}var Sm=i=>j(i)&&Object.getOwnPropertyNames(i).some(n=>se(i[n]));function Om(i,n){let{isScriptable:t,isIndexable:e}=Ua(i);for(let r of n){let a=t(r),o=e(r),s=(o||a)&&i[r];if(a&&(se(s)||Sm(s))||o&&et(s))return!0}return!1}var Im="4.5.0",Am=["top","bottom","left","right","chartArea"];function rc(i,n){return i==="top"||i==="bottom"||Am.indexOf(i)===-1&&n==="x"}function ac(i,n){return function(t,e){return t[i]===e[i]?t[n]-e[n]:t[i]-e[i]}}function oc(i){let n=i.chart,t=n.options.animation;n.notifyPlugins("afterRender"),J(t&&t.onComplete,[i],n)}function Rm(i){let n=i.chart,t=n.options.animation;J(t&&t.onProgress,[i],n)}function jc(i){return Kn()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var sr={},sc=i=>{let n=jc(i);return Object.values(sr).filter(t=>t.canvas===n).pop()};function Em(i,n,t){let e=Object.keys(i);for(let r of e){let a=+r;if(a>=n){let o=i[r];delete i[r],(t>0||a>n)&&(i[a+t]=o)}}}function Lm(i,n,t,e){return!t||i.type==="mouseout"?null:e?n:i}var Fm=(()=>{class i{static defaults=nt;static instances=sr;static overrides=we;static registry=ie;static version=Im;static getChart=sc;static register(...t){ie.add(...t),lc()}static unregister(...t){ie.remove(...t),lc()}constructor(t,e){let r=this.config=new ko(e),a=jc(t),o=sc(a);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||im(a)),this.platform.updateConfig(r);let l=this.platform.acquireContext(a,s.aspectRatio),c=l&&l.canvas,d=c&&c.height,u=c&&c.width;if(this.id=ol(),this.ctx=l,this.canvas=c,this.width=u,this.height=d,this._options=s,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 vo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=bl(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],sr[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ue.listen(this,"complete",oc),ue.listen(this,"progress",Rm),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:a,_aspectRatio:o}=this;return U(t)?e&&o?o:a?r/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ie}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qa(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ha(this.canvas,this.ctx),this}stop(){return ue.stop(this),this}resize(t,e){ue.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let r=this.options,a=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(a,t,e,o),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Qa(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),J(r.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};G(e,(r,a)=>{r.id=a})}buildOrUpdateScales(){let t=this.options,e=t.scales,r=this.scales,a=Object.keys(r).reduce((s,l)=>(s[l]=!1,s),{}),o=[];e&&(o=o.concat(Object.keys(e).map(s=>{let l=e[s],c=yo(s,l),d=c==="r",u=c==="x";return{options:l,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),G(o,s=>{let l=s.options,c=l.id,d=yo(c,l),u=N(l.type,s.dtype);(l.position===void 0||rc(l.position,d)!==rc(s.dposition))&&(l.position=s.dposition),a[c]=!0;let h=null;if(c in r&&r[c].type===u)h=r[c];else{let f=ie.getScale(u);h=new f({id:c,type:u,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(l,t)}),G(a,(s,l)=>{s||delete r[l]}),G(r,s=>{wt.configure(this,s,s.options),wt.addBox(this,s)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,r=t.length;if(t.sort((a,o)=>a.index-o.index),r>e){for(let a=e;a<r;++a)this._destroyDatasetMeta(a);t.splice(e,r-e)}this._sortedMetasets=t.slice(0).sort(ac("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((r,a)=>{e.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,r,a;for(this._removeUnreferencedMetasets(),r=0,a=e.length;r<a;r++){let o=e[r],s=this.getDatasetMeta(r),l=o.type||this.config.type;if(s.type&&s.type!==l&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=l,s.indexAxis=o.indexAxis||xo(l,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{let c=ie.getController(l),{datasetElementType:d,dataElementType:u}=nt.datasets[l];Object.assign(c,{dataElementType:ie.getElement(u),datasetElementType:d&&ie.getElement(d)}),s.controller=new c(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){G(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let r=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let d=0,u=this.data.datasets.length;d<u;d++){let{controller:h}=this.getDatasetMeta(d),f=!a&&o.indexOf(h)===-1;h.buildOrUpdateElements(f),s=Math.max(+h.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),a||G(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ac("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){G(this.scales,t=>{wt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Pa(e,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:r,start:a,count:o}of e){let s=r==="_removeElements"?-o:o;Em(t,a,s)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,l)=>l+","+s.splice(1).join(","))),a=r(0);for(let o=1;o<e;o++)if(!Pa(a,r(o)))return;return Array.from(a).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;wt.update(this,this.width,this.height,t);let e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],G(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,o)=>{a._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,r=this.data.datasets.length;e<r;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,r=this.data.datasets.length;e<r;++e)this._updateDataset(e,se(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let r=this.getDatasetMeta(t),a={meta:r,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(e),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ue.has(this)?this.attached&&!ue.running(this)&&ue.start(this):(this.draw(),oc({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:r,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,r=[],a,o;for(a=0,o=e.length;a<o;++a){let s=e[a];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,r={meta:t,index:t.index,cancelable:!0},a=to(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&$i(e,a),t.controller.draw(),a&&Qi(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Zt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,a){let o=Bf.modes[e];return typeof o=="function"?o(this,t,r,a):[]}getDatasetMeta(t){let e=this.data.datasets[t],r=this._metasets,a=r.filter(o=>o&&o._dataset===e).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=de(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!e.hidden}setDatasetVisibility(t,e){let r=this.getDatasetMeta(t);r.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,r){let a=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,a);mi(e)?(o.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(l=>l.datasetIndex===t?a:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ue.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ha(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete sr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,r=(o,s)=>{e.addEventListener(this,o,s),t[o]=s},a=(o,s,l)=>{o.offsetX=s,o.offsetY=l,this._eventHandler(o)};G(this.options.events,o=>r(o,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,r=(c,d)=>{e.addEventListener(this,c,d),t[c]=d},a=(c,d)=>{t[c]&&(e.removeEventListener(this,c,d),delete t[c])},o=(c,d)=>{this.canvas&&this.resize(c,d)},s,l=()=>{a("attach",l),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,a("resize",o),this._stop(),this._resize(0,0),r("attach",l)},e.isAttached(this.canvas)?l():s()}unbindEvents(){G(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},G(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,r){let a=r?"set":"remove",o,s,l,c;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+a+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){s=t[l];let d=s&&this.getDatasetMeta(s.datasetIndex).controller;d&&d[a+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],r=t.map(({datasetIndex:o,index:s})=>{let l=this.getDatasetMeta(o);if(!l)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:l.data[s],index:s}});!ji(r,e)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,e))}notifyPlugins(t,e,r){return this._plugins.notify(this,t,e,r)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,r){let a=this.options.hover,o=(c,d)=>c.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),s=o(e,t),l=r?t:o(t,e);s.length&&this.updateHoverStyle(s,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(t,e){let r={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},a=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;let o=this._handleEvent(t,e,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(o||r.changed)&&this.render(),this}_handleEvent(t,e,r){let{_active:a=[],options:o}=this,s=e,l=this._getActiveElements(t,a,r,s),c=cl(t),d=Lm(t,this._lastEvent,r,c);r&&(this._lastEvent=null,J(o.onHover,[t,l,this],this),c&&J(o.onClick,[t,l,this],this));let u=!ji(l,a);return(u||e)&&(this._active=l,this._updateHoverStyles(l,a,e)),this._lastEvent=d,u}_getActiveElements(t,e,r,a){if(t.type==="mouseout")return[];if(!r)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,a)}}return i})();function lc(){return G(Fm.instances,i=>i._plugins.invalidate())}function Bm(i,n,t){let{startAngle:e,x:r,y:a,outerRadius:o,innerRadius:s,options:l}=n,{borderWidth:c,borderJoinStyle:d}=l,u=Math.min(c/o,_t(e-t));if(i.beginPath(),i.arc(r,a,o-c/2,e+u/2,t-u/2),s>0){let h=Math.min(c/s,_t(e-t));i.arc(r,a,s+c/2,t-h/2,e+h/2,!0)}else{let h=Math.min(c/2,o*_t(e-t));if(d==="round")i.arc(r,a,h,t-Q/2,e+Q/2,!0);else if(d==="bevel"){let f=2*h*h,m=-f*Math.cos(t+Q/2)+r,p=-f*Math.sin(t+Q/2)+a,g=f*Math.cos(e+Q/2)+r,b=f*Math.sin(e+Q/2)+a;i.lineTo(m,p),i.lineTo(g,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function zm(i,n,t){let{startAngle:e,pixelMargin:r,x:a,y:o,outerRadius:s,innerRadius:l}=n,c=r/s;i.beginPath(),i.arc(a,o,s,e-c,t+c),l>r?(c=r/l,i.arc(a,o,l,t+c,e-c,!0)):i.arc(a,o,r,t+lt,e-lt),i.closePath(),i.clip()}function Nm(i){return Xn(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Wm(i,n,t,e){let r=Nm(i.options.borderRadius),a=(t-n)/2,o=Math.min(a,e*n/2),s=l=>{let c=(t-Math.min(a,l))*e/2;return pt(l,0,Math.min(a,c))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:pt(r.innerStart,0,o),innerEnd:pt(r.innerEnd,0,o)}}function xi(i,n,t,e){return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function ur(i,n,t,e,r,a){let{x:o,y:s,startAngle:l,pixelMargin:c,innerRadius:d}=n,u=Math.max(n.outerRadius+e+t-c,0),h=d>0?d+e+t+c:0,f=0,m=r-l;if(e){let z=d>0?d-e:0,Y=u>0?u-e:0,K=(z+Y)/2,At=K!==0?m*K/(K+e):m;f=(m-At)/2}let p=Math.max(.001,m*u-t/Q)/u,g=(m-p)/2,b=l+g+f,_=r-g-f,{outerStart:k,outerEnd:C,innerStart:v,innerEnd:y}=Wm(n,h,u,_-b),P=u-k,D=u-C,S=b+k/P,L=_-C/D,B=h+v,W=h+y,rt=b+v/B,bt=_-y/W;if(i.beginPath(),a){let z=(S+L)/2;if(i.arc(o,s,u,S,z),i.arc(o,s,u,z,L),C>0){let ut=xi(D,L,o,s);i.arc(ut.x,ut.y,C,L,_+lt)}let Y=xi(W,_,o,s);if(i.lineTo(Y.x,Y.y),y>0){let ut=xi(W,bt,o,s);i.arc(ut.x,ut.y,y,_+lt,bt+Math.PI)}let K=(_-y/h+(b+v/h))/2;if(i.arc(o,s,h,_-y/h,K,!0),i.arc(o,s,h,K,b+v/h,!0),v>0){let ut=xi(B,rt,o,s);i.arc(ut.x,ut.y,v,rt+Math.PI,b-lt)}let At=xi(P,b,o,s);if(i.lineTo(At.x,At.y),k>0){let ut=xi(P,S,o,s);i.arc(ut.x,ut.y,k,b-lt,S)}}else{i.moveTo(o,s);let z=Math.cos(S)*u+o,Y=Math.sin(S)*u+s;i.lineTo(z,Y);let K=Math.cos(L)*u+o,At=Math.sin(L)*u+s;i.lineTo(K,At)}i.closePath()}function Hm(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s}=n,l=n.endAngle;if(a){ur(i,n,t,e,l,r);for(let c=0;c<a;++c)i.fill();isNaN(s)||(l=o+(s%it||it))}return ur(i,n,t,e,l,r),i.fill(),l}function Vm(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s,options:l}=n,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:h,borderRadius:f}=l,m=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=h,m?(i.lineWidth=c*2,i.lineJoin=d||"round"):(i.lineWidth=c,i.lineJoin=d||"bevel");let p=n.endAngle;if(a){ur(i,n,t,e,p,r);for(let g=0;g<a;++g)i.stroke();isNaN(s)||(p=o+(s%it||it))}m&&zm(i,n,p),l.selfJoin&&p-o>=Q&&f===0&&d!=="miter"&&Bm(i,n,p),a||(ur(i,n,t,e,p,r),i.stroke())}var wo=class extends Qt{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(n){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,t,e){let r=this.getProps(["x","y"],e),{angle:a,distance:o}=Aa(r,{x:n,y:t}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e),h=(this.options.spacing+this.options.borderWidth)/2,f=N(u,l-s),m=gi(a,s,l)&&s!==l,p=f>=it||m,g=te(o,c+h,d+h);return p&&g}getCenterPoint(n){let{x:t,y:e,startAngle:r,endAngle:a,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:l,spacing:c}=this.options,d=(r+a)/2,u=(o+s+c+l)/2;return{x:t+Math.cos(d)*u,y:e+Math.sin(d)*u}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){let{options:t,circumference:e}=this,r=(t.offset||0)/4,a=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=e>it?Math.floor(e/it):0,e===0||this.innerRadius<0||this.outerRadius<0)return;n.save();let s=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(s)*r,Math.sin(s)*r);let l=1-Math.sin(Math.min(Q,e||0)),c=r*l;n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,Hm(n,this,c,a,o),Vm(n,this,c,a,o),n.restore()}};function qc(i,n,t=n){i.lineCap=N(t.borderCapStyle,n.borderCapStyle),i.setLineDash(N(t.borderDash,n.borderDash)),i.lineDashOffset=N(t.borderDashOffset,n.borderDashOffset),i.lineJoin=N(t.borderJoinStyle,n.borderJoinStyle),i.lineWidth=N(t.borderWidth,n.borderWidth),i.strokeStyle=N(t.borderColor,n.borderColor)}function Ym(i,n,t){i.lineTo(t.x,t.y)}function Um(i){return i.stepped?yl:i.tension||i.cubicInterpolationMode==="monotone"?kl:Ym}function $c(i,n,t={}){let e=i.length,{start:r=0,end:a=e-1}=t,{start:o,end:s}=n,l=Math.max(r,o),c=Math.min(a,s),d=r<o&&a<o||r>s&&a>s;return{count:e,start:l,loop:n.loop,ilen:c<l&&!d?e+c-l:c-l}}function jm(i,n,t,e){let{points:r,options:a}=n,{count:o,start:s,loop:l,ilen:c}=$c(r,t,e),d=Um(a),{move:u=!0,reverse:h}=e||{},f,m,p;for(f=0;f<=c;++f)m=r[(s+(h?c-f:f))%o],!m.skip&&(u?(i.moveTo(m.x,m.y),u=!1):d(i,p,m,h,a.stepped),p=m);return l&&(m=r[(s+(h?c:0))%o],d(i,p,m,h,a.stepped)),!!l}function qm(i,n,t,e){let r=n.points,{count:a,start:o,ilen:s}=$c(r,t,e),{move:l=!0,reverse:c}=e||{},d=0,u=0,h,f,m,p,g,b,_=C=>(o+(c?s-C:C))%a,k=()=>{p!==g&&(i.lineTo(d,g),i.lineTo(d,p),i.lineTo(d,b))};for(l&&(f=r[_(0)],i.moveTo(f.x,f.y)),h=0;h<=s;++h){if(f=r[_(h)],f.skip)continue;let C=f.x,v=f.y,y=C|0;y===m?(v<p?p=v:v>g&&(g=v),d=(u*d+C)/++u):(k(),i.lineTo(C,v),m=y,u=0,p=g=v),b=v}k()}function Co(i){let n=i.options,t=n.borderDash&&n.borderDash.length;return!i._decimated&&!i._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?qm:jm}function $m(i){return i.stepped?Il:i.tension||i.cubicInterpolationMode==="monotone"?Al:ke}function Qm(i,n,t,e){let r=n._path;r||(r=n._path=new Path2D,n.path(r,t,e)&&r.closePath()),qc(i,n.options),i.stroke(r)}function Xm(i,n,t,e){let{segments:r,options:a}=n,o=Co(n);for(let s of r)qc(i,a,s.style),i.beginPath(),o(i,n,s,{start:t,end:t+e-1})&&i.closePath(),i.stroke()}var Gm=typeof Path2D=="function";function Km(i,n,t,e){Gm&&!n.options.segment?Qm(i,n,t,e):Xm(i,n,t,e)}var mr=(()=>{class i extends Qt{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,e){let r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){let a=r.spanGaps?this._loop:this._fullLoop;Pl(this._points,r,t,a,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=El(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,r=t.length;return r&&e[t[r-1].end]}interpolate(t,e){let r=this.options,a=t[e],o=this.points,s=Ja(this,{property:e,start:a,end:a});if(!s.length)return;let l=[],c=$m(r),d,u;for(d=0,u=s.length;d<u;++d){let{start:h,end:f}=s[d],m=o[h],p=o[f];if(m===p){l.push(m);continue}let g=Math.abs((a-m[e])/(p[e]-m[e])),b=c(m,p,g,r.stepped);b[e]=t[e],l.push(b)}return l.length===1?l[0]:l}pathSegment(t,e,r){return Co(this)(t,this,e,r)}path(t,e,r){let a=this.segments,o=Co(this),s=this._loop;e=e||0,r=r||this.points.length-e;for(let l of a)s&=o(t,this,l,{start:e,end:e+r-1});return!!s}draw(t,e,r,a){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Km(t,this,r,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return i})();function cc(i,n,t,e){let r=i.options,{[t]:a}=i.getProps([t],e);return Math.abs(n-a)<r.radius+r.hitRadius}var Zm=(()=>{class i extends Qt{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,r){let a=this.options,{x:o,y:s}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,e){return cc(this,t,"x",e)}inYRange(t,e){return cc(this,t,"y",e)}getCenterPoint(t){let{x:e,y:r}=this.getProps(["x","y"],t);return{x:e,y:r}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);let r=e&&t.borderWidth||0;return(e+r)*2}draw(t,e){let r=this.options;this.skip||r.radius<.1||!Zt(this,e,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,Qn(t,r,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return i})();function Qc(i,n){let{x:t,y:e,base:r,width:a,height:o}=i.getProps(["x","y","base","width","height"],n),s,l,c,d,u;return i.horizontal?(u=o/2,s=Math.min(t,r),l=Math.max(t,r),c=e-u,d=e+u):(u=a/2,s=t-u,l=t+u,c=Math.min(e,r),d=Math.max(e,r)),{left:s,top:c,right:l,bottom:d}}function Pe(i,n,t,e){return i?0:pt(n,t,e)}function Jm(i,n,t){let e=i.options.borderWidth,r=i.borderSkipped,a=Ya(e);return{t:Pe(r.top,a.top,0,t),r:Pe(r.right,a.right,0,n),b:Pe(r.bottom,a.bottom,0,t),l:Pe(r.left,a.left,0,n)}}function tp(i,n,t){let{enableBorderRadius:e}=i.getProps(["enableBorderRadius"]),r=i.options.borderRadius,a=Me(r),o=Math.min(n,t),s=i.borderSkipped,l=e||j(r);return{topLeft:Pe(!l||s.top||s.left,a.topLeft,0,o),topRight:Pe(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Pe(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Pe(!l||s.bottom||s.right,a.bottomRight,0,o)}}function ep(i){let n=Qc(i),t=n.right-n.left,e=n.bottom-n.top,r=Jm(i,t/2,e/2),a=tp(i,t/2,e/2);return{outer:{x:n.left,y:n.top,w:t,h:e,radius:a},inner:{x:n.left+r.l,y:n.top+r.t,w:t-r.l-r.r,h:e-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function lo(i,n,t,e){let r=n===null,a=t===null,s=i&&!(r&&a)&&Qc(i,e);return s&&(r||te(n,s.left,s.right))&&(a||te(t,s.top,s.bottom))}function ip(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function np(i,n){i.rect(n.x,n.y,n.w,n.h)}function co(i,n,t={}){let e=i.x!==t.x?-n:0,r=i.y!==t.y?-n:0,a=(i.x+i.w!==t.x+t.w?n:0)-e,o=(i.y+i.h!==t.y+t.h?n:0)-r;return{x:i.x+e,y:i.y+r,w:i.w+a,h:i.h+o,radius:i.radius}}var To=class extends Qt{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(n){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,n&&Object.assign(this,n)}draw(n){let{inflateAmount:t,options:{borderColor:e,backgroundColor:r}}=this,{inner:a,outer:o}=ep(this),s=ip(o.radius)?_i:np;n.save(),(o.w!==a.w||o.h!==a.h)&&(n.beginPath(),s(n,co(o,t,a)),n.clip(),s(n,co(a,-t,o)),n.fillStyle=e,n.fill("evenodd")),n.beginPath(),s(n,co(a,t)),n.fillStyle=r,n.fill(),n.restore()}inRange(n,t,e){return lo(this,n,t,e)}inXRange(n,t){return lo(this,n,null,t)}inYRange(n,t){return lo(this,null,n,t)}getCenterPoint(n){let{x:t,y:e,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],n);return{x:a?(t+r)/2:t,y:a?e:(e+r)/2}}getRange(n){return n==="x"?this.width/2:this.height/2}},rp=Object.freeze({__proto__:null,ArcElement:wo,BarElement:To,LineElement:mr,PointElement:Zm}),Mo=["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)"],dc=Mo.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Xc(i){return Mo[i%Mo.length]}function Gc(i){return dc[i%dc.length]}function ap(i,n){return i.borderColor=Xc(n),i.backgroundColor=Gc(n),++n}function op(i,n){return i.backgroundColor=i.data.map(()=>Xc(n++)),n}function sp(i,n){return i.backgroundColor=i.data.map(()=>Gc(n++)),n}function lp(i){let n=0;return(t,e)=>{let r=i.getDatasetMeta(e).controller;r instanceof Eo?n=op(t,n):r instanceof Bc?n=sp(t,n):r&&(n=ap(t,n))}}function uc(i){let n;for(n in i)if(i[n].borderColor||i[n].backgroundColor)return!0;return!1}function cp(i){return i&&(i.borderColor||i.backgroundColor)}function dp(){return nt.borderColor!=="rgba(0,0,0,0.1)"||nt.backgroundColor!=="rgba(0,0,0,0.1)"}var up={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,n,t){if(!t.enabled)return;let{data:{datasets:e},options:r}=i.config,{elements:a}=r,o=uc(e)||cp(r)||a&&uc(a)||dp();if(!t.forceOverride&&o)return;let s=lp(i);e.forEach(s)}};function hp(i,n,t,e,r){let a=r.samples||e;if(a>=t)return i.slice(n,n+t);let o=[],s=(t-2)/(a-2),l=0,c=n+t-1,d=n,u,h,f,m,p;for(o[l++]=i[d],u=0;u<a-2;u++){let g=0,b=0,_,k=Math.floor((u+1)*s)+1+n,C=Math.min(Math.floor((u+2)*s)+1,t)+n,v=C-k;for(_=k;_<C;_++)g+=i[_].x,b+=i[_].y;g/=v,b/=v;let y=Math.floor(u*s)+1+n,P=Math.min(Math.floor((u+1)*s)+1,t)+n,{x:D,y:S}=i[d];for(f=m=-1,_=y;_<P;_++)m=.5*Math.abs((D-g)*(i[_].y-S)-(D-i[_].x)*(b-S)),m>f&&(f=m,h=i[_],p=_);o[l++]=h,d=p}return o[l++]=i[c],o}function fp(i,n,t,e){let r=0,a=0,o,s,l,c,d,u,h,f,m,p,g=[],b=n+t-1,_=i[n].x,C=i[b].x-_;for(o=n;o<n+t;++o){s=i[o],l=(s.x-_)/C*e,c=s.y;let v=l|0;if(v===d)c<m?(m=c,u=o):c>p&&(p=c,h=o),r=(a*r+s.x)/++a;else{let y=o-1;if(!U(u)&&!U(h)){let P=Math.min(u,h),D=Math.max(u,h);P!==f&&P!==y&&g.push(_n(ti({},i[P]),{x:r})),D!==f&&D!==y&&g.push(_n(ti({},i[D]),{x:r}))}o>0&&y!==f&&g.push(i[y]),g.push(s),d=v,a=0,m=p=c,u=h=f=o}}return g}function Kc(i){if(i._decimated){let n=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:n})}}function hc(i){i.data.datasets.forEach(n=>{Kc(n)})}function mp(i,n){let t=n.length,e=0,r,{iScale:a}=i,{min:o,max:s,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(e=pt(Kt(n,a.axis,o).lo,0,t-1)),c?r=pt(Kt(n,a.axis,s).hi+1,e,t)-e:r=t-e,{start:e,count:r}}var pp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,n,t)=>{if(!t.enabled){hc(i);return}let e=i.width;i.data.datasets.forEach((r,a)=>{let{_data:o,indexAxis:s}=r,l=i.getDatasetMeta(a),c=o||r.data;if(vi([s,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let d=i.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||i.options.parsing)return;let{start:u,count:h}=mp(l,c),f=t.threshold||4*e;if(h<=f){Kc(r);return}U(o)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let m;switch(t.algorithm){case"lttb":m=hp(c,u,h,e,t);break;case"min-max":m=fp(c,u,h,e);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=m})},destroy(i){hc(i)}};function gp(i,n,t){let e=i.segments,r=i.points,a=n.points,o=[];for(let s of e){let{start:l,end:c}=s;c=pr(l,c,r);let d=Do(t,r[l],r[c],s.loop);if(!n.segments){o.push({source:s,target:d,start:r[l],end:r[c]});continue}let u=Ja(n,d);for(let h of u){let f=Do(t,a[h.start],a[h.end],h.loop),m=Za(s,r,f);for(let p of m)o.push({source:p,target:h,start:{[t]:fc(d,f,"start",Math.max)},end:{[t]:fc(d,f,"end",Math.min)}})}}return o}function Do(i,n,t,e){if(e)return;let r=n[i],a=t[i];return i==="angle"&&(r=_t(r),a=_t(a)),{property:i,start:r,end:a}}function bp(i,n){let{x:t=null,y:e=null}=i||{},r=n.points,a=[];return n.segments.forEach(({start:o,end:s})=>{s=pr(o,s,r);let l=r[o],c=r[s];e!==null?(a.push({x:l.x,y:e}),a.push({x:c.x,y:e})):t!==null&&(a.push({x:t,y:l.y}),a.push({x:t,y:c.y}))}),a}function pr(i,n,t){for(;n>i;n--){let e=t[n];if(!isNaN(e.x)&&!isNaN(e.y))break}return n}function fc(i,n,t,e){return i&&n?e(i[t],n[t]):i?i[t]:n?n[t]:0}function Zc(i,n){let t=[],e=!1;return et(i)?(e=!0,t=i):t=bp(i,n),t.length?new mr({points:t,options:{tension:0},_loop:e,_fullLoop:e}):null}function mc(i){return i&&i.fill!==!1}function _p(i,n,t){let r=i[n].fill,a=[n],o;if(!t)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!at(r))return r;if(o=i[r],!o)return!1;if(o.visible)return r;a.push(r),r=o.fill}return!1}function vp(i,n,t){let e=wp(i);if(j(e))return isNaN(e.value)?!1:e;let r=parseFloat(e);return at(r)&&Math.floor(r)===r?xp(e[0],n,r,t):["origin","start","end","stack","shape"].indexOf(e)>=0&&e}function xp(i,n,t,e){return(i==="-"||i==="+")&&(t=n+t),t===n||t<0||t>=e?!1:t}function yp(i,n){let t=null;return i==="start"?t=n.bottom:i==="end"?t=n.top:j(i)?t=n.getPixelForValue(i.value):n.getBasePixel&&(t=n.getBasePixel()),t}function kp(i,n,t){let e;return i==="start"?e=t:i==="end"?e=n.options.reverse?n.min:n.max:j(i)?e=i.value:e=n.getBaseValue(),e}function wp(i){let n=i.options,t=n.fill,e=N(t&&t.target,t);return e===void 0&&(e=!!n.backgroundColor),e===!1||e===null?!1:e===!0?"origin":e}function Cp(i){let{scale:n,index:t,line:e}=i,r=[],a=e.segments,o=e.points,s=Tp(n,t);s.push(Zc({x:null,y:n.bottom},e));for(let l=0;l<a.length;l++){let c=a[l];for(let d=c.start;d<=c.end;d++)Mp(r,o[d],s)}return new mr({points:r,options:{}})}function Tp(i,n){let t=[],e=i.getMatchingVisibleMetas("line");for(let r=0;r<e.length;r++){let a=e[r];if(a.index===n)break;a.hidden||t.unshift(a.dataset)}return t}function Mp(i,n,t){let e=[];for(let r=0;r<t.length;r++){let a=t[r],{first:o,last:s,point:l}=Dp(a,n,"x");if(!(!l||o&&s)){if(o)e.unshift(l);else if(i.push(l),!s)break}}i.push(...e)}function Dp(i,n,t){let e=i.interpolate(n,t);if(!e)return{};let r=e[t],a=i.segments,o=i.points,s=!1,l=!1;for(let c=0;c<a.length;c++){let d=a[c],u=o[d.start][t],h=o[d.end][t];if(te(r,u,h)){s=r===u,l=r===h;break}}return{first:s,last:l,point:e}}var hr=class{constructor(n){this.x=n.x,this.y=n.y,this.radius=n.radius}pathSegment(n,t,e){let{x:r,y:a,radius:o}=this;return t=t||{start:0,end:it},n.arc(r,a,o,t.end,t.start,!0),!e.bounds}interpolate(n){let{x:t,y:e,radius:r}=this,a=n.angle;return{x:t+Math.cos(a)*r,y:e+Math.sin(a)*r,angle:a}}};function Pp(i){let{chart:n,fill:t,line:e}=i;if(at(t))return Sp(n,t);if(t==="stack")return Cp(i);if(t==="shape")return!0;let r=Op(i);return r instanceof hr?r:Zc(r,e)}function Sp(i,n){let t=i.getDatasetMeta(n);return t&&i.isDatasetVisible(n)?t.dataset:null}function Op(i){return(i.scale||{}).getPointPositionForValue?Ap(i):Ip(i)}function Ip(i){let{scale:n={},fill:t}=i,e=yp(t,n);if(at(e)){let r=n.isHorizontal();return{x:r?e:null,y:r?null:e}}return null}function Ap(i){let{scale:n,fill:t}=i,e=n.options,r=n.getLabels().length,a=e.reverse?n.max:n.min,o=kp(t,n,a),s=[];if(e.grid.circular){let l=n.getPointPositionForValue(0,a);return new hr({x:l.x,y:l.y,radius:n.getDistanceFromCenterForValue(o)})}for(let l=0;l<r;++l)s.push(n.getPointPositionForValue(l,o));return s}function uo(i,n,t){let e=Pp(n),{chart:r,index:a,line:o,scale:s,axis:l}=n,c=o.options,d=c.fill,u=c.backgroundColor,{above:h=u,below:f=u}=d||{},m=r.getDatasetMeta(a),p=to(r,m);e&&o.points.length&&($i(i,t),Rp(i,{line:o,target:e,above:h,below:f,area:t,scale:s,axis:l,clip:p}),Qi(i))}function Rp(i,n){let{line:t,target:e,above:r,below:a,area:o,scale:s,clip:l}=n,c=t._loop?"angle":n.axis;i.save();let d=a;a!==r&&(c==="x"?(pc(i,e,o.top),ho(i,{line:t,target:e,color:r,scale:s,property:c,clip:l}),i.restore(),i.save(),pc(i,e,o.bottom)):c==="y"&&(gc(i,e,o.left),ho(i,{line:t,target:e,color:a,scale:s,property:c,clip:l}),i.restore(),i.save(),gc(i,e,o.right),d=r)),ho(i,{line:t,target:e,color:d,scale:s,property:c,clip:l}),i.restore()}function pc(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:l,end:c}=s,d=r[l],u=r[pr(l,c,r)];a?(i.moveTo(d.x,d.y),a=!1):(i.lineTo(d.x,t),i.lineTo(d.x,d.y)),o=!!n.pathSegment(i,s,{move:o}),o?i.closePath():i.lineTo(u.x,t)}i.lineTo(n.first().x,t),i.closePath(),i.clip()}function gc(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:l,end:c}=s,d=r[l],u=r[pr(l,c,r)];a?(i.moveTo(d.x,d.y),a=!1):(i.lineTo(t,d.y),i.lineTo(d.x,d.y)),o=!!n.pathSegment(i,s,{move:o}),o?i.closePath():i.lineTo(t,u.y)}i.lineTo(t,n.first().y),i.closePath(),i.clip()}function ho(i,n){let{line:t,target:e,property:r,color:a,scale:o,clip:s}=n,l=gp(t,e,r);for(let{source:c,target:d,start:u,end:h}of l){let{style:{backgroundColor:f=a}={}}=c,m=e!==!0;i.save(),i.fillStyle=f,Ep(i,o,s,m&&Do(r,u,h)),i.beginPath();let p=!!t.pathSegment(i,c),g;if(m){p?i.closePath():bc(i,e,h,r);let b=!!e.pathSegment(i,d,{move:p,reverse:!0});g=p&&b,g||bc(i,e,u,r)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function Ep(i,n,t,e){let r=n.chart.chartArea,{property:a,start:o,end:s}=e||{};if(a==="x"||a==="y"){let l,c,d,u;a==="x"?(l=o,c=r.top,d=s,u=r.bottom):(l=r.left,c=o,d=r.right,u=s),i.beginPath(),t&&(l=Math.max(l,t.left),d=Math.min(d,t.right),c=Math.max(c,t.top),u=Math.min(u,t.bottom)),i.rect(l,c,d-l,u-c),i.clip()}}function bc(i,n,t,e){let r=n.interpolate(t,e);r&&i.lineTo(r.x,r.y)}var Lp={id:"filler",afterDatasetsUpdate(i,n,t){let e=(i.data.datasets||[]).length,r=[],a,o,s,l;for(o=0;o<e;++o)a=i.getDatasetMeta(o),s=a.dataset,l=null,s&&s.options&&s instanceof mr&&(l={visible:i.isDatasetVisible(o),index:o,fill:vp(s,o,e),chart:i,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=l,r.push(l);for(o=0;o<e;++o)l=r[o],!(!l||l.fill===!1)&&(l.fill=_p(r,o,t.propagate))},beforeDraw(i,n,t){let e=t.drawTime==="beforeDraw",r=i.getSortedVisibleDatasetMetas(),a=i.chartArea;for(let o=r.length-1;o>=0;--o){let s=r[o].$filler;s&&(s.line.updateControlPoints(a,s.axis),e&&s.fill&&uo(i.ctx,s,a))}},beforeDatasetsDraw(i,n,t){if(t.drawTime!=="beforeDatasetsDraw")return;let e=i.getSortedVisibleDatasetMetas();for(let r=e.length-1;r>=0;--r){let a=e[r].$filler;mc(a)&&uo(i.ctx,a,i.chartArea)}},beforeDatasetDraw(i,n,t){let e=n.meta.$filler;!mc(e)||t.drawTime!=="beforeDatasetDraw"||uo(i.ctx,e,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},_c=(i,n)=>{let{boxHeight:t=n,boxWidth:e=n}=i;return i.usePointStyle&&(t=Math.min(t,n),e=i.pointStyleWidth||Math.min(e,n)),{boxWidth:e,boxHeight:t,itemHeight:Math.max(n,t)}},Fp=(i,n)=>i!==null&&n!==null&&i.datasetIndex===n.datasetIndex&&i.index===n.index,fr=class extends Qt{constructor(n){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=n.chart,this.options=n.options,this.ctx=n.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(n,t,e){this.maxWidth=n,this.maxHeight=t,this._margins=e,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let n=this.options.labels||{},t=J(n.generateLabels,[this.chart],this)||[];n.filter&&(t=t.filter(e=>n.filter(e,this.chart.data))),n.sort&&(t=t.sort((e,r)=>n.sort(e,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:n,ctx:t}=this;if(!n.display){this.width=this.height=0;return}let e=n.labels,r=dt(e.font),a=r.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=_c(e,a),c,d;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(o,a,s,l)+10):(d=this.maxHeight,c=this._fitCols(o,r,s,l)+10),this.width=Math.min(c,n.maxWidth||this.maxWidth),this.height=Math.min(d,n.maxHeight||this.maxHeight)}_fitRows(n,t,e,r){let{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=r+s,u=n;a.textAlign="left",a.textBaseline="middle";let h=-1,f=-d;return this.legendItems.forEach((m,p)=>{let g=e+t/2+a.measureText(m.text).width;(p===0||c[c.length-1]+g+2*s>o)&&(u+=d,c[c.length-(p>0?0:1)]=0,f+=d,h++),l[p]={left:0,top:f,row:h,width:g,height:r},c[c.length-1]+=g+s}),u}_fitCols(n,t,e,r){let{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=o-n,u=s,h=0,f=0,m=0,p=0;return this.legendItems.forEach((g,b)=>{let{itemWidth:_,itemHeight:k}=Bp(e,t,a,g,r);b>0&&f+k+2*s>d&&(u+=h+s,c.push({width:h,height:f}),m+=h+s,p++,h=f=0),l[b]={left:m,top:f,col:p,width:_,height:k},h=Math.max(h,_),f+=k+s}),u+=h,c.push({width:h,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let n=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:e,labels:{padding:r},rtl:a}}=this,o=Ve(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=vt(e,this.left+r,this.right-this.lineWidths[s]);for(let c of t)s!==c.row&&(s=c.row,l=vt(e,this.left+r,this.right-this.lineWidths[s])),c.top+=this.top+n+r,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+r}else{let s=0,l=vt(e,this.top+n+r,this.bottom-this.columnSizes[s].height);for(let c of t)c.col!==s&&(s=c.col,l=vt(e,this.top+n+r,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+r,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let n=this.ctx;$i(n,this),this._draw(),Qi(n)}}_draw(){let{options:n,columnSizes:t,lineWidths:e,ctx:r}=this,{align:a,labels:o}=n,s=nt.color,l=Ve(n.rtl,this.left,this.width),c=dt(o.font),{padding:d}=o,u=c.size,h=u/2,f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;let{boxWidth:m,boxHeight:p,itemHeight:g}=_c(o,u),b=function(y,P,D){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;r.save();let S=N(D.lineWidth,1);if(r.fillStyle=N(D.fillStyle,s),r.lineCap=N(D.lineCap,"butt"),r.lineDashOffset=N(D.lineDashOffset,0),r.lineJoin=N(D.lineJoin,"miter"),r.lineWidth=S,r.strokeStyle=N(D.strokeStyle,s),r.setLineDash(N(D.lineDash,[])),o.usePointStyle){let L={radius:p*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:S},B=l.xPlus(y,m/2),W=P+h;Va(r,L,B,W,o.pointStyleWidth&&m)}else{let L=P+Math.max((u-p)/2,0),B=l.leftForLtr(y,m),W=Me(D.borderRadius);r.beginPath(),Object.values(W).some(rt=>rt!==0)?_i(r,{x:B,y:L,w:m,h:p,radius:W}):r.rect(B,L,m,p),r.fill(),S!==0&&r.stroke()}r.restore()},_=function(y,P,D){Te(r,D.text,y,P+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},k=this.isHorizontal(),C=this._computeTitleHeight();k?f={x:vt(a,this.left+d,this.right-e[0]),y:this.top+d+C,line:0}:f={x:this.left+d,y:vt(a,this.top+C+d,this.bottom-t[0].height),line:0},Ga(this.ctx,n.textDirection);let v=g+d;this.legendItems.forEach((y,P)=>{r.strokeStyle=y.fontColor,r.fillStyle=y.fontColor;let D=r.measureText(y.text).width,S=l.textAlign(y.textAlign||(y.textAlign=o.textAlign)),L=m+h+D,B=f.x,W=f.y;l.setWidth(this.width),k?P>0&&B+L+d>this.right&&(W=f.y+=v,f.line++,B=f.x=vt(a,this.left+d,this.right-e[f.line])):P>0&&W+v>this.bottom&&(B=f.x=B+t[f.line].width+d,f.line++,W=f.y=vt(a,this.top+C+d,this.bottom-t[f.line].height));let rt=l.x(B);if(b(rt,W,y),B=_l(S,B+m+h,k?B+L:this.right,n.rtl),_(l.x(B),W,y),k)f.x+=L+d;else if(typeof y.text!="string"){let bt=c.lineHeight;f.y+=Jc(y,bt)+d}else f.y+=v}),Ka(this.ctx,n.textDirection)}drawTitle(){let n=this.options,t=n.title,e=dt(t.font),r=xt(t.padding);if(!t.display)return;let a=Ve(n.rtl,this.left,this.width),o=this.ctx,s=t.position,l=e.size/2,c=r.top+l,d,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),d=this.top+c,u=vt(n.align,u,this.right-h);else{let m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);d=c+vt(n.align,this.top,this.bottom-m-n.labels.padding-this._computeTitleHeight())}let f=vt(s,u,u+h);o.textAlign=a.textAlign(qn(s)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=e.string,Te(o,t.text,f,d,e)}_computeTitleHeight(){let n=this.options.title,t=dt(n.font),e=xt(n.padding);return n.display?t.lineHeight+e.height:0}_getLegendItemAt(n,t){let e,r,a;if(te(n,this.left,this.right)&&te(t,this.top,this.bottom)){for(a=this.legendHitBoxes,e=0;e<a.length;++e)if(r=a[e],te(n,r.left,r.left+r.width)&&te(t,r.top,r.top+r.height))return this.legendItems[e]}return null}handleEvent(n){let t=this.options;if(!Wp(n.type,t))return;let e=this._getLegendItemAt(n.x,n.y);if(n.type==="mousemove"||n.type==="mouseout"){let r=this._hoveredItem,a=Fp(r,e);r&&!a&&J(t.onLeave,[n,r,this],this),this._hoveredItem=e,e&&!a&&J(t.onHover,[n,e,this],this)}else e&&J(t.onClick,[n,e,this],this)}};function Bp(i,n,t,e,r){let a=zp(e,i,n,t),o=Np(r,e,n.lineHeight);return{itemWidth:a,itemHeight:o}}function zp(i,n,t,e){let r=i.text;return r&&typeof r!="string"&&(r=r.reduce((a,o)=>a.length>o.length?a:o)),n+t.size/2+e.measureText(r).width}function Np(i,n,t){let e=i;return typeof n.text!="string"&&(e=Jc(n,t)),e}function Jc(i,n){let t=i.text?i.text.length:0;return n*t}function Wp(i,n){return!!((i==="mousemove"||i==="mouseout")&&(n.onHover||n.onLeave)||n.onClick&&(i==="click"||i==="mouseup"))}var Hp={id:"legend",_element:fr,start(i,n,t){let e=i.legend=new fr({ctx:i.ctx,options:t,chart:i});wt.configure(i,e,t),wt.addBox(i,e)},stop(i){wt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,n,t){let e=i.legend;wt.configure(i,e,t),e.options=t},afterUpdate(i){let n=i.legend;n.buildLabels(),n.adjustHitBoxes()},afterEvent(i,n){n.replay||i.legend.handleEvent(n.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,n,t){let e=n.datasetIndex,r=t.chart;r.isDatasetVisible(e)?(r.hide(e),n.hidden=!0):(r.show(e),n.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let n=i.data.datasets,{labels:{usePointStyle:t,pointStyle:e,textAlign:r,color:a,useBorderRadius:o,borderRadius:s}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),d=xt(c.borderWidth);return{text:n[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:e||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},rn=class extends Qt{constructor(n){super(),this.chart=n.chart,this.options=n.options,this.ctx=n.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(n,t){let e=this.options;if(this.left=0,this.top=0,!e.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=n,this.height=this.bottom=t;let r=et(e.text)?e.text.length:1;this._padding=xt(e.padding);let a=r*dt(e.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let n=this.options.position;return n==="top"||n==="bottom"}_drawArgs(n){let{top:t,left:e,bottom:r,right:a,options:o}=this,s=o.align,l=0,c,d,u;return this.isHorizontal()?(d=vt(s,e,a),u=t+n,c=a-e):(o.position==="left"?(d=e+n,u=vt(s,r,t),l=Q*-.5):(d=a-n,u=vt(s,t,r),l=Q*.5),c=r-t),{titleX:d,titleY:u,maxWidth:c,rotation:l}}draw(){let n=this.ctx,t=this.options;if(!t.display)return;let e=dt(t.font),a=e.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:l,rotation:c}=this._drawArgs(a);Te(n,t.text,0,0,e,{color:t.color,maxWidth:l,rotation:c,textAlign:qn(t.align),textBaseline:"middle",translation:[o,s]})}};function Vp(i,n){let t=new rn({ctx:i.ctx,options:n,chart:i});wt.configure(i,t,n),wt.addBox(i,t),i.titleBlock=t}var Yp={id:"title",_element:rn,start(i,n,t){Vp(i,t)},stop(i){let n=i.titleBlock;wt.removeBox(i,n),delete i.titleBlock},beforeUpdate(i,n,t){let e=i.titleBlock;wt.configure(i,e,t),e.options=t},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}},nr=new WeakMap,Up={id:"subtitle",start(i,n,t){let e=new rn({ctx:i.ctx,options:t,chart:i});wt.configure(i,e,t),wt.addBox(i,e),nr.set(i,e)},stop(i){wt.removeBox(i,nr.get(i)),nr.delete(i)},beforeUpdate(i,n,t){let e=nr.get(i);wt.configure(i,e,t),e.options=t},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}},en={average(i){if(!i.length)return!1;let n,t,e=new Set,r=0,a=0;for(n=0,t=i.length;n<t;++n){let s=i[n].element;if(s&&s.hasValue()){let l=s.tooltipPosition();e.add(l.x),r+=l.y,++a}}return a===0||e.size===0?!1:{x:[...e].reduce((s,l)=>s+l)/e.size,y:r/a}},nearest(i,n){if(!i.length)return!1;let t=n.x,e=n.y,r=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=i.length;a<o;++a){let l=i[a].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),d=Hn(n,c);d<r&&(r=d,s=l)}}if(s){let l=s.tooltipPosition();t=l.x,e=l.y}return{x:t,y:e}}};function ee(i,n){return n&&(et(n)?Array.prototype.push.apply(i,n):i.push(n)),i}function he(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
1
+ import{n as Es}from"./chunk-HIADZ4BV.js";import{q as Rs}from"./chunk-QLTN6G6E.js";import{i as ys,n as Is,p as As}from"./chunk-XDPHEQEO.js";import{b as Ds,e as Ps,f as ua}from"./chunk-SZ2GUIT5.js";import{Ab as ft,Bb as mt,C as as,Dd as da,E as yn,F as os,Fa as Dt,Fb as Ni,Fd as li,Ga as Dn,Gb as bs,Hb as Et,Ia as ea,J as ss,Jb as ai,Kb as _s,La as ms,Lb as vs,Nd as ci,Oa as Le,Oc as ks,Pa as Pn,Qa as Fe,Sa as Bi,Td as Wi,U as ls,Ua as ia,Ud as An,V as kn,Va as ps,W as cs,Wa as Pt,X as Li,Xa as ii,Xb as ze,Ya as Sn,a as ei,ab as qt,b as vn,ba as ds,bb as na,ca as wn,cb as ra,da as Cn,ea as _e,eb as aa,ee as Ss,f as Ei,fb as oa,fd as ca,fe as Os,g as Ee,ga as V,gb as sa,gc as xs,hb as Rt,hc as la,i as is,ib as ht,j as xn,ja as ot,jb as yt,ka as st,kb as ae,la as us,ld as ws,ma as hs,md as On,na as ta,nc as oi,o as ns,pc as ct,q as rs,qc as si,qd as Cs,ra as Fi,rb as Be,sb as gs,tb as Nt,ua as Tn,va as Mn,vb as Gt,wa as ve,wb as ni,wd as In,xa as fs,xb as ri,xd as Ts,yb as zi,zb as Tt,zd as Ms}from"./chunk-OB3QLUH6.js";var ba=["*"];function au(i,n){i&1&&ri(0)}var ou=["tabListContainer"],su=["tabList"],lu=["tabListInner"],cu=["nextPaginator"],du=["previousPaginator"],uu=["content"];function hu(i,n){}var fu=["tabBodyWrapper"],mu=["tabHeader"];function pu(i,n){}function gu(i,n){if(i&1&&ia(0,pu,0,0,"ng-template",12),i&2){let t=Gt().$implicit;Rt("cdkPortalOutlet",t.templateLabel)}}function bu(i,n){if(i&1&&_s(0),i&2){let t=Gt().$implicit;vs(t.textLabel)}}function _u(i,n){if(i&1){let t=Be();ht(0,"div",7,2),Nt("click",function(){let r=ot(t),a=r.$implicit,o=r.$index,s=Gt(),l=Ni(1);return st(s._handleClick(a,l,o))})("cdkFocusChange",function(r){let a=ot(t).$index,o=Gt();return st(o._tabFocusChanged(r,a))}),ae(2,"span",8)(3,"div",9),ht(4,"span",10)(5,"span",11),na(6,gu,1,1,null,12)(7,bu,1,1),yt()()()}if(i&2){let t=n.$implicit,e=n.$index,r=Ni(1),a=Gt();ai(t.labelClass),Et("mdc-tab--active",a.selectedIndex===e),Rt("id",a._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",a.fitInkBarToContent),qt("tabIndex",a._getTabIndex(e))("aria-posinset",e+1)("aria-setsize",a._tabs.length)("aria-controls",a._getTabContentId(e))("aria-selected",a.selectedIndex===e)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),Dt(3),Rt("matRippleTrigger",r)("matRippleDisabled",t.disabled||a.disableRipple),Dt(3),ra(t.templateLabel?6:7)}}function vu(i,n){i&1&&ri(0)}function xu(i,n){if(i&1){let t=Be();ht(0,"mat-tab-body",13),Nt("_onCentered",function(){ot(t);let r=Gt();return st(r._removeTabBodyWrapperHeight())})("_onCentering",function(r){ot(t);let a=Gt();return st(a._setTabBodyWrapperHeight(r))})("_beforeCentering",function(r){ot(t);let a=Gt();return st(a._bodyCentered(r))}),yt()}if(i&2){let t=n.$implicit,e=n.$index,r=Gt();ai(t.bodyClass),Rt("id",r._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),qt("tabindex",r.contentTabIndex!=null&&r.selectedIndex===e?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(t,e))("aria-hidden",r.selectedIndex!==e)}}var yu=new _e("MatTabContent"),ku=(()=>{class i{template=V(Dn);constructor(){}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Fe({type:i,selectors:[["","matTabContent",""]],features:[ze([{provide:yu,useExisting:i}])]})}return i})(),wu=new _e("MatTabLabel"),zs=new _e("MAT_TAB"),Cu=(()=>{class i extends Ps{_closestTab=V(zs,{optional:!0});static \u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(i)))(r||i)}})();static \u0275dir=Fe({type:i,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[ze([{provide:wu,useExisting:i}]),Bi]})}return i})(),Ns=new _e("MAT_TAB_GROUP"),Tu=(()=>{class i{_viewContainerRef=V(ms);_closestTabGroup=V(Ns,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;id=null;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new xn;position=null;origin=null;isActive=!1;constructor(){V(On).load(An)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Ds(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Le({type:i,selectors:[["mat-tab"]],contentQueries:function(e,r,a){if(e&1&&(zi(a,Cu,5),zi(a,ku,7,Dn)),e&2){let o;ft(o=mt())&&(r.templateLabel=o.first),ft(o=mt())&&(r._explicitContent=o.first)}},viewQuery:function(e,r){if(e&1&&Tt(Dn,7),e&2){let a;ft(a=mt())&&(r._implicitContent=a.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,r){e&2&&qt("id",null)},inputs:{disabled:[2,"disabled","disabled",ct],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[ze([{provide:zs,useExisting:i}]),Tn],ngContentSelectors:ba,decls:1,vars:0,template:function(e,r){e&1&&(ni(),ps(0,au,1,0,"ng-template"))},encapsulation:2})}return i})(),ha="mdc-tab-indicator--active",Ls="mdc-tab-indicator--no-transition",fa=class{_items;_currentItem;constructor(n){this._items=n}hide(){this._items.forEach(n=>n.deactivateInkBar()),this._currentItem=void 0}alignToElement(n){let t=this._items.find(r=>r.elementRef.nativeElement===n),e=this._currentItem;if(t!==e&&(e?.deactivateInkBar(),t)){let r=e?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(r),this._currentItem=t}}},Mu=(()=>{class i{_elementRef=V(ve);_inkBarElement;_inkBarContentElement;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this._elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement){e.classList.add(ha);return}let r=e.getBoundingClientRect(),a=t.width/r.width,o=t.left-r.left;e.classList.add(Ls),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${a})`),e.getBoundingClientRect(),e.classList.remove(Ls),e.classList.add(ha),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(ha)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this._elementRef.nativeElement.ownerDocument||document,e=this._inkBarElement=t.createElement("span"),r=this._inkBarContentElement=t.createElement("span");e.className="mdc-tab-indicator",r.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",e.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let t=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;t.appendChild(this._inkBarElement)}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Fe({type:i,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",ct]}})}return i})();var Ws=(()=>{class i extends Mu{elementRef=V(ve);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(i)))(r||i)}})();static \u0275dir=Fe({type:i,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,r){e&2&&(qt("aria-disabled",!!r.disabled),Et("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[2,"disabled","disabled",ct]},features:[Bi]})}return i})(),Fs={passive:!0},Du=650,Pu=100,Su=(()=>{class i{_elementRef=V(ve);_changeDetectorRef=V(oi);_viewportRuler=V(Os);_dir=V(da,{optional:!0});_ngZone=V(ii);_platform=V(ca);_sharedResizeObserver=V(Rs);_injector=V(ta);_renderer=V(ea);_animationsDisabled=ci();_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new xn;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged;_keyManager;_currentTextContent;_stopScrolling=new xn;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let e=isNaN(t)?0:t;this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}_selectedIndex=0;selectFocusedIndex=new Pt;indexFocused=new Pt;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),Fs),this._renderer.listen(this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Fs))}ngAfterContentInit(){let t=this._dir?this._dir.change:rs("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(ss(32),Li(this._destroyed)),r=this._viewportRuler.change(150).pipe(Li(this._destroyed)),a=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Ms(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),Sn(a,{injector:this._injector}),yn(t,r,e,this._items.changes,this._itemsResized()).pipe(Li(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),a()})}),this._keyManager?.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return typeof ResizeObserver!="function"?ns:this._items.changes.pipe(kn(this._items),cs(t=>new is(e=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(a=>e.next(a));return t.forEach(a=>r.observe(a.elementRef.nativeElement)),()=>{r.disconnect()}}))),ls(1),os(t=>t.some(e=>e.contentRect.width>0&&e.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!Ts(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let e=this._items.get(this.focusIndex);e&&!e.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager?.onKeydown(t)}}_onContentChanges(){let t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return this._items?!!this._items.toArray()[t]:!0}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();let e=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?e.scrollLeft=0:e.scrollLeft=e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let t=this.scrollDistance,e=this._getLayoutDirection()==="ltr"?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){let e=this._tabListContainer.nativeElement.offsetWidth,r=(t=="before"?-1:1)*e/3;return this._scrollTo(this._scrollDistance+r)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;let e=this._items?this._items.toArray()[t]:null;if(!e)return;let r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:a,offsetWidth:o}=e.elementRef.nativeElement,s,l;this._getLayoutDirection()=="ltr"?(s=a,l=s+o):(l=this._tabListInner.nativeElement.offsetWidth-a,s=l-o);let c=this.scrollDistance,d=this.scrollDistance+r;s<c?this.scrollDistance-=c-s:l>d&&(this.scrollDistance+=Math.min(l-d,s-c))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let t=this._tabListInner.nativeElement.scrollWidth,e=this._elementRef.nativeElement.offsetWidth,r=t-e>=5;r||(this.scrollDistance=0),r!==this._showPaginationControls&&(this._showPaginationControls=r,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let t=this._tabListInner.nativeElement.scrollWidth,e=this._tabListContainer.nativeElement.offsetWidth;return t-e||0}_alignInkBarToSelectedTab(){let t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&e.button!=null&&e.button!==0||(this._stopInterval(),as(Du,Pu).pipe(Li(yn(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:r,distance:a}=this._scrollHeader(t);(a===0||a>=r)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Fe({type:i,inputs:{disablePagination:[2,"disablePagination","disablePagination",ct],selectedIndex:[2,"selectedIndex","selectedIndex",si]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return i})(),Ou=(()=>{class i extends Su{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new fa(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Mn(i)))(r||i)}})();static \u0275cmp=Le({type:i,selectors:[["mat-tab-header"]],contentQueries:function(e,r,a){if(e&1&&zi(a,Ws,4),e&2){let o;ft(o=mt())&&(r._items=o)}},viewQuery:function(e,r){if(e&1&&(Tt(ou,7),Tt(su,7),Tt(lu,7),Tt(cu,5),Tt(du,5)),e&2){let a;ft(a=mt())&&(r._tabListContainer=a.first),ft(a=mt())&&(r._tabList=a.first),ft(a=mt())&&(r._tabListInner=a.first),ft(a=mt())&&(r._nextPaginator=a.first),ft(a=mt())&&(r._previousPaginator=a.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,r){e&2&&Et("mat-mdc-tab-header-pagination-controls-enabled",r._showPaginationControls)("mat-mdc-tab-header-rtl",r._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",ct]},features:[Bi],ngContentSelectors:ba,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(e,r){if(e&1){let a=Be();ni(),ht(0,"div",5,0),Nt("click",function(){return ot(a),st(r._handlePaginatorClick("before"))})("mousedown",function(s){return ot(a),st(r._handlePaginatorPress("before",s))})("touchend",function(){return ot(a),st(r._stopInterval())}),ae(2,"div",6),yt(),ht(3,"div",7,1),Nt("keydown",function(s){return ot(a),st(r._handleKeydown(s))}),ht(5,"div",8,2),Nt("cdkObserveContent",function(){return ot(a),st(r._onContentChanges())}),ht(7,"div",9,3),ri(9),yt()()(),ht(10,"div",10,4),Nt("mousedown",function(s){return ot(a),st(r._handlePaginatorPress("after",s))})("click",function(){return ot(a),st(r._handlePaginatorClick("after"))})("touchend",function(){return ot(a),st(r._stopInterval())}),ae(12,"div",6),yt()}e&2&&(Et("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),Rt("matRippleDisabled",r._disableScrollBefore||r.disableRipple),Dt(3),Et("_mat-animation-noopable",r._animationsDisabled),Dt(2),qt("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby||null),Dt(5),Et("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),Rt("matRippleDisabled",r._disableScrollAfter||r.disableRipple))},dependencies:[Wi,Cs],styles:[`.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}
2
+ `],encapsulation:2})}return i})(),Iu=new _e("MAT_TABS_CONFIG"),Bs=(()=>{class i extends ua{_host=V(ma);_centeringSub=Ee.EMPTY;_leavingSub=Ee.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(kn(this._host._isCenterPosition())).subscribe(t=>{this._host._content&&t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Fe({type:i,selectors:[["","matTabBodyHost",""]],features:[Bi]})}return i})(),ma=(()=>{class i{_elementRef=V(ve);_dir=V(da,{optional:!0});_ngZone=V(ii);_injector=V(ta);_renderer=V(ea);_diAnimationsDisabled=ci();_eventCleanups;_initialized;_fallbackTimer;_positionIndex;_dirChangeSubscription=Ee.EMPTY;_position;_previousPosition;_onCentering=new Pt;_beforeCentering=new Pt;_afterLeavingCenter=new Pt;_onCentered=new Pt(!0);_portalHost;_contentElement;_content;animationDuration="500ms";preserveContent=!1;set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(){if(this._dir){let t=V(oi);this._dirChangeSubscription=this._dir.change.subscribe(e=>{this._computePositionAnimationState(e),t.markForCheck()})}}ngOnInit(){this._bindTransitionEvents(),this._position==="center"&&(this._setActiveClass(!0),Sn(()=>this._onCentering.emit(this._elementRef.nativeElement.clientHeight),{injector:this._injector})),this._initialized=!0}ngOnDestroy(){clearTimeout(this._fallbackTimer),this._eventCleanups?.forEach(t=>t()),this._dirChangeSubscription.unsubscribe()}_bindTransitionEvents(){this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,e=r=>{r.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.remove("mat-tab-body-animating"),r.type==="transitionend"&&this._transitionDone())};this._eventCleanups=[this._renderer.listen(t,"transitionstart",r=>{r.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.add("mat-tab-body-animating"),this._transitionStarted())}),this._renderer.listen(t,"transitionend",e),this._renderer.listen(t,"transitioncancel",e)]})}_transitionStarted(){clearTimeout(this._fallbackTimer);let t=this._position==="center";this._beforeCentering.emit(t),t&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_transitionDone(){this._position==="center"?this._onCentered.emit():this._previousPosition==="center"&&this._afterLeavingCenter.emit()}_setActiveClass(t){this._elementRef.nativeElement.classList.toggle("mat-mdc-tab-body-active",t)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(){return this._positionIndex===0}_computePositionAnimationState(t=this._getLayoutDirection()){this._previousPosition=this._position,this._positionIndex<0?this._position=t=="ltr"?"left":"right":this._positionIndex>0?this._position=t=="ltr"?"right":"left":this._position="center",this._animationsDisabled()?this._simulateTransitionEvents():this._initialized&&(this._position==="center"||this._previousPosition==="center")&&(clearTimeout(this._fallbackTimer),this._fallbackTimer=this._ngZone.runOutsideAngular(()=>setTimeout(()=>this._simulateTransitionEvents(),100)))}_simulateTransitionEvents(){this._transitionStarted(),Sn(()=>this._transitionDone(),{injector:this._injector})}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0ms"||this.animationDuration==="0s"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Le({type:i,selectors:[["mat-tab-body"]],viewQuery:function(e,r){if(e&1&&(Tt(Bs,5),Tt(uu,5)),e&2){let a;ft(a=mt())&&(r._portalHost=a.first),ft(a=mt())&&(r._contentElement=a.first)}},hostAttrs:[1,"mat-mdc-tab-body"],hostVars:1,hostBindings:function(e,r){e&2&&qt("inert",r._position==="center"?null:"")},inputs:{_content:[0,"content","_content"],animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_onCentered:"_onCentered"},decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(e,r){e&1&&(ht(0,"div",1,0),ia(2,hu,0,0,"ng-template",2),yt()),e&2&&Et("mat-tab-body-content-left",r._position==="left")("mat-tab-body-content-right",r._position==="right")("mat-tab-body-content-can-animate",r._position==="center"||r._previousPosition==="center")},dependencies:[Bs,Ss],styles:[`.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}
3
+ `],encapsulation:2})}return i})(),I_=(()=>{class i{_elementRef=V(ve);_changeDetectorRef=V(oi);_ngZone=V(ii);_tabsSubscription=Ee.EMPTY;_tabLabelSubscription=Ee.EMPTY;_tabBodySubscription=Ee.EMPTY;_diAnimationsDisabled=ci();_allTabs;_tabBodies;_tabBodyWrapper;_tabHeader;_tabs=new fs;_indexToSelect=0;_lastFocusedTabIndex=null;_tabBodyWrapperHeight=0;color;get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(t){this._fitInkBarToContent=t,this._changeDetectorRef.markForCheck()}_fitInkBarToContent=!1;stretchTabs=!0;alignTabs=null;dynamicHeight=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=isNaN(t)?null:t}_selectedIndex=null;headerPosition="above";get animationDuration(){return this._animationDuration}set animationDuration(t){let e=t+"";this._animationDuration=/^\d+$/.test(e)?t+"ms":e}_animationDuration;get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(t){this._contentTabIndex=isNaN(t)?null:t}_contentTabIndex;disablePagination=!1;disableRipple=!1;preserveContent=!1;get backgroundColor(){return this._backgroundColor}set backgroundColor(t){let e=this._elementRef.nativeElement.classList;e.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&e.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}_backgroundColor;ariaLabel;ariaLabelledby;selectedIndexChange=new Pt;focusChange=new Pt;animationDone=new Pt;selectedTabChange=new Pt(!0);_groupId;_isServer=!V(ca).isBrowser;constructor(){let t=V(Iu,{optional:!0});this._groupId=V(In).getId("mat-tab-group-"),this.animationDuration=t&&t.animationDuration?t.animationDuration:"500ms",this.disablePagination=t&&t.disablePagination!=null?t.disablePagination:!1,this.dynamicHeight=t&&t.dynamicHeight!=null?t.dynamicHeight:!1,t?.contentTabIndex!=null&&(this.contentTabIndex=t.contentTabIndex),this.preserveContent=!!t?.preserveContent,this.fitInkBarToContent=t&&t.fitInkBarToContent!=null?t.fitInkBarToContent:!1,this.stretchTabs=t&&t.stretchTabs!=null?t.stretchTabs:!0,this.alignTabs=t&&t.alignTabs!=null?t.alignTabs:null}ngAfterContentChecked(){let t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){let e=this._selectedIndex==null;if(!e){this.selectedTabChange.emit(this._createChangeEvent(t));let r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,a)=>r.isActive=a===t),e||(this.selectedIndexChange.emit(t),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((e,r)=>{e.position=r-t,this._selectedIndex!=null&&e.position==0&&!e.origin&&(e.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let t=this._clampTabIndex(this._indexToSelect);if(t===this._selectedIndex){let e=this._tabs.toArray(),r;for(let a=0;a<e.length;a++)if(e[a].isActive){this._indexToSelect=this._selectedIndex=a,this._lastFocusedTabIndex=null,r=e[a];break}!r&&e[t]&&Promise.resolve().then(()=>{e[t].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(t))})}this._changeDetectorRef.markForCheck()})}ngAfterViewInit(){this._tabBodySubscription=this._tabBodies.changes.subscribe(()=>this._bodyCentered(!0))}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(kn(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(e=>e._closestTabGroup===this||!e._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe(),this._tabBodySubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(t){let e=this._tabHeader;e&&(e.focusIndex=t)}_focusChanged(t){this._lastFocusedTabIndex=t,this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){let e=new pa;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=yn(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t,e){return t.id||`${this._groupId}-label-${e}`}_getTabContentId(t){return`${this._groupId}-content-${t}`}_setTabBodyWrapperHeight(t){if(!this.dynamicHeight||!this._tabBodyWrapperHeight){this._tabBodyWrapperHeight=t;return}let e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}_removeTabBodyWrapperHeight(){let t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this._ngZone.run(()=>this.animationDone.emit())}_handleClick(t,e,r){e.focusIndex=r,t.disabled||(this.selectedIndex=r)}_getTabIndex(t){let e=this._lastFocusedTabIndex??this.selectedIndex;return t===e?0:-1}_tabFocusChanged(t,e){t&&t!=="mouse"&&t!=="touch"&&(this._tabHeader.focusIndex=e)}_bodyCentered(t){t&&this._tabBodies?.forEach((e,r)=>e._setActiveClass(r===this._selectedIndex))}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0"||this.animationDuration==="0ms"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Le({type:i,selectors:[["mat-tab-group"]],contentQueries:function(e,r,a){if(e&1&&zi(a,Tu,5),e&2){let o;ft(o=mt())&&(r._allTabs=o)}},viewQuery:function(e,r){if(e&1&&(Tt(fu,5),Tt(mu,5),Tt(ma,5)),e&2){let a;ft(a=mt())&&(r._tabBodyWrapper=a.first),ft(a=mt())&&(r._tabHeader=a.first),ft(a=mt())&&(r._tabBodies=a)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(e,r){e&2&&(qt("mat-align-tabs",r.alignTabs),ai("mat-"+(r.color||"primary")),bs("--mat-tab-animation-duration",r.animationDuration),Et("mat-mdc-tab-group-dynamic-height",r.dynamicHeight)("mat-mdc-tab-group-inverted-header",r.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",r.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",ct],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",ct],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",ct],selectedIndex:[2,"selectedIndex","selectedIndex",si],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",si],disablePagination:[2,"disablePagination","disablePagination",ct],disableRipple:[2,"disableRipple","disableRipple",ct],preserveContent:[2,"preserveContent","preserveContent",ct],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[ze([{provide:Ns,useExisting:i}])],ngContentSelectors:ba,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","class","content","position","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","_beforeCentering","id","content","position","animationDuration","preserveContent"]],template:function(e,r){if(e&1){let a=Be();ni(),ht(0,"mat-tab-header",3,0),Nt("indexFocused",function(s){return ot(a),st(r._focusChanged(s))})("selectFocusedIndex",function(s){return ot(a),st(r.selectedIndex=s)}),oa(2,_u,8,17,"div",4,aa),yt(),na(4,vu,1,0),ht(5,"div",5,1),oa(7,xu,1,10,"mat-tab-body",6,aa),yt()}e&2&&(Rt("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby),Dt(2),sa(r._tabs),Dt(2),ra(r._isServer?4:-1),Dt(),Et("_mat-animation-noopable",r._animationsDisabled()),Dt(2),sa(r._tabs))},dependencies:[Ou,Ws,ws,Wi,ua,ma],styles:[`.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}
4
+ `],encapsulation:2})}return i})(),pa=class{index;tab};var A_=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Pn({type:i});static \u0275inj=Cn({imports:[li,li]})}return i})();var Au=["input"],Ru=["label"],Eu=["*"],Lu=new _e("mat-checkbox-default-options",{providedIn:"root",factory:Vs});function Vs(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var kt=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(kt||{}),_a=class{source;checked},Hs=Vs(),Fu=(()=>{class i{_elementRef=V(ve);_changeDetectorRef=V(oi);_ngZone=V(ii);_animationsDisabled=ci();_options=V(Lu,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){let e=new _a;return e.source=this,e.checked=t,e}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required;labelPosition="after";name=null;change=new Pt;indeterminateChange=new Pt;value;disableRipple;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=kt.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){V(On).load(An);let t=V(new la("tabindex"),{optional:!0});this._options=this._options||Hs,this.color=this._options.color||Hs.color,this.tabIndex=t==null?0:parseInt(t)||0,this.id=this._uniqueId=V(In).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(t){t.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(t){t!==this.disabled&&(this._disabled=t,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(t){let e=t!=this._indeterminate();this._indeterminate.set(t),e&&(t?this._transitionCheckState(kt.Indeterminate):this._transitionCheckState(this.checked?kt.Checked:kt.Unchecked),this.indeterminateChange.emit(t)),this._syncIndeterminate(t)}_indeterminate=Fi(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}validate(t){return this.required&&t.value!==!0?{required:!0}:null}registerOnValidatorChange(t){this._validatorChangeFn=t}_transitionCheckState(t){let e=this._currentCheckState,r=this._getAnimationTargetElement();if(!(e===t||!r)&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);let a=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(a)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let t=this._options?.clickAction;!this.disabled&&t!=="noop"?(this.indeterminate&&t!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?kt.Checked:kt.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&t==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(t){t.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(t,e){if(this._animationsDisabled)return"";switch(t){case kt.Init:if(e===kt.Checked)return this._animationClasses.uncheckedToChecked;if(e==kt.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case kt.Unchecked:return e===kt.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case kt.Checked:return e===kt.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case kt.Indeterminate:return e===kt.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(t){let e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(t){t.target&&this._labelElement.nativeElement.contains(t.target)&&t.stopPropagation()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Le({type:i,selectors:[["mat-checkbox"]],viewQuery:function(e,r){if(e&1&&(Tt(Au,5),Tt(Ru,5)),e&2){let a;ft(a=mt())&&(r._inputElement=a.first),ft(a=mt())&&(r._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(e,r){e&2&&(gs("id",r.id),qt("tabindex",null)("aria-label",null)("aria-labelledby",null),ai(r.color?"mat-"+r.color:"mat-accent"),Et("_mat-animation-noopable",r._animationsDisabled)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked)("mat-mdc-checkbox-disabled-interactive",r.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",ct],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",ct],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",ct],tabIndex:[2,"tabIndex","tabIndex",t=>t==null?void 0:si(t)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",ct],checked:[2,"checked","checked",ct],disabled:[2,"disabled","disabled",ct],indeterminate:[2,"indeterminate","indeterminate",ct]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[ze([{provide:Is,useExisting:ds(()=>i),multi:!0},{provide:As,useExisting:i,multi:!0}]),Tn],ngContentSelectors:Eu,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(e,r){if(e&1){let a=Be();ni(),ht(0,"div",3),Nt("click",function(s){return ot(a),st(r._preventBubblingFromLabel(s))}),ht(1,"div",4,0)(3,"div",5),Nt("click",function(){return ot(a),st(r._onTouchTargetClick())}),yt(),ht(4,"input",6,1),Nt("blur",function(){return ot(a),st(r._onBlur())})("click",function(){return ot(a),st(r._onInputClick())})("change",function(s){return ot(a),st(r._onInteractionEvent(s))}),yt(),ae(6,"div",7),ht(7,"div",8),us(),ht(8,"svg",9),ae(9,"path",10),yt(),hs(),ae(10,"div",11),yt(),ae(11,"div",12),yt(),ht(12,"label",13,2),ri(14),yt()()}if(e&2){let a=Ni(2);Rt("labelPosition",r.labelPosition),Dt(4),Et("mdc-checkbox--selected",r.checked),Rt("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled&&!r.disabledInteractive)("id",r.inputId)("required",r.required)("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex),qt("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("aria-controls",r.ariaControls)("aria-disabled",r.disabled&&r.disabledInteractive?!0:null)("aria-expanded",r.ariaExpanded)("aria-owns",r.ariaOwns)("name",r.name)("value",r.value),Dt(7),Rt("matRippleTrigger",a)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),Dt(),Rt("for",r.inputId)}},dependencies:[Wi,Es],styles:[`.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover>.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover>.mat-mdc-checkbox-ripple>.mat-ripple-element{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked+.mdc-checkbox__ripple{opacity:var(--mat-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active>.mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mat-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control+.mdc-checkbox__ripple{background-color:var(--mat-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;width:var(--mat-checkbox-state-layer-size, 40px);height:var(--mat-checkbox-state-layer-size, 40px);top:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);right:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - var(--mat-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}@media(forced-colors: active){.mdc-checkbox--disabled{opacity:.5}}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mat-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mat-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover>.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover>.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mat-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mat-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover>.mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mat-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mat-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mat-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mat-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background>.mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-touch-target,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__native-control,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__ripple,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mat-mdc-checkbox-ripple::before,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__checkmark>.mdc-checkbox__checkmark-path,.mat-mdc-checkbox._mat-animation-noopable>.mat-internal-form-field>.mdc-checkbox>.mdc-checkbox__background>.mdc-checkbox__mixedmark{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox .mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:""}
5
+ `],encapsulation:2,changeDetection:0})}return i})(),G_=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=Pn({type:i});static \u0275inj=Cn({imports:[Fu,li,li]})}return i})();var i0=(()=>{class i{_TRACKED_PLUGINS=[{id:"derived-data",versionRequirement:null},{id:"signalk-autostate",versionRequirement:null},{id:"signalk-polar-performance-plugin",versionRequirement:null},{id:"autopilot",versionRequirement:null}];_connectionSvc=V(ys);_API_URL=Fi(null);_connection=ks(this._connectionSvc.getServiceEndpointStatusAsO());_pluginInformation=xs({loader:e=>Ei(this,[e],function*({abortSignal:t}){let r=this._API_URL();if(!r)return console.error("API URL not set yet."),[];try{let a=yield fetch(r,{signal:t});return a.ok?yield a.json():(console.error("[SkPlugin Service] Error fetching plugin information:",a.statusText),[])}catch(a){return console.error("[SkPlugin Service] Error fetching plugin information:",a),[]}})});constructor(){this._API_URL.set(`${this._connectionSvc.signalKURL.url}/signalk/v2/features?enabled=enabled`)}getPluginInformation(){return Ei(this,null,function*(){for(this._pluginInformation.reload();this._pluginInformation.isLoading();)yield new Promise(t=>setTimeout(t,100));return this._pluginInformation.value()?.plugins||[]})}isInstalled(t){return Ei(this,null,function*(){let e=yield this.getPluginInformation();return!e||e.length===0?!1:e.some(r=>r.id===t)})}isEnabled(t){return Ei(this,null,function*(){let e=yield this.getPluginInformation();return!e||e.length===0?!1:e.some(r=>r.id===t&&r.enabled)})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=wn({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var a0=(()=>{class i{DEFAULT_FONT="Roboto";EDGE_BUFFER=10;debug=!1;scaleFactor=window.devicePixelRatio||1;fontsReadyPromise;sharedResizeObserver=null;observedCanvases=new Map;dprMediaQuery=null;resizeCallbacks=new WeakMap;constructor(){this.fontsReadyPromise=document.fonts.ready}registerCanvas(t,e={}){if(e=ei({autoRelease:!0},e),!t)return;if(t.style.width="100%",t.style.height="100%",e.onResize){let a=(o,s)=>{o===0||s===0||e.onResize(o,s)};this.resizeCallbacks.set(t,a)}this.sharedResizeObserver||(this.debug&&console.log("[CanvasService] Creating shared ResizeObserver for all canvases"),this.sharedResizeObserver=new ResizeObserver(a=>{this.debug&&console.log("[CanvasService] Shared ResizeObserver callback fired",a.map(o=>{let s=o.target,l=s.parentElement;return{tag:s.tagName,id:s.id,class:s.className,parent:l?{tag:l.tagName,class:l.className,id:l.id}:null,contentRect:o.contentRect,style:{width:s.style.width,height:s.style.height},backingStore:{width:s.width,height:s.height}}}));for(let o of a){let s=o.target;if(this.debug){let c=s.parentElement;console.log("[CanvasService] Shared ResizeObserver entry (detailed)",{tag:s.tagName,id:s.id,class:s.className,parent:c?{tag:c.tagName,class:c.className,id:c.id}:null,contentRect:o.contentRect,style:{width:s.style.width,height:s.style.height},backingStore:{width:s.width,height:s.height}})}this.setHighDPISize(s,o.contentRect);let l=this.resizeCallbacks.get(s);l&&l(Math.round(o.contentRect.width),Math.round(o.contentRect.height))}})),this.sharedResizeObserver.observe(t),this.debug&&console.log("[CanvasService] Started observing canvas (shared observer)",{tag:t.tagName,id:t.id,class:t.className,selector:t.getAttribute("ng-reflect-ng-if")||"",parent:t.parentElement?{tag:t.parentElement.tagName,class:t.parentElement.className,id:t.parentElement.id}:null}),this.observedCanvases.set(t,e||{}),this.setHighDPISize(t,t.getBoundingClientRect());let r=this.resizeCallbacks.get(t);if(r){let a=t.getBoundingClientRect();r(Math.round(a.width),Math.round(a.height))}}unregisterCanvas(t){if(!t||!this.observedCanvases.has(t))return;this.sharedResizeObserver&&(this.sharedResizeObserver.unobserve(t),this.observedCanvases.size<=1&&(this.sharedResizeObserver.disconnect(),this.sharedResizeObserver=null,this.debug&&console.log("[CanvasService] Shared ResizeObserver disconnected (no canvases left)"))),this.resizeCallbacks.delete(t),this.observedCanvases.get(t)?.autoRelease&&this.releaseCanvas(t,{clear:!0,removeFromDom:!0}),this.observedCanvases.delete(t),this.observedCanvases.size===0&&this.cleanupDPRListener()}onDPRChange=()=>{let t=window.devicePixelRatio||1;t!==this.scaleFactor&&(this.scaleFactor=t,this.observedCanvases.forEach((e,r)=>{try{this.setHighDPISize(r,r.getBoundingClientRect())}catch(a){console.warn("[CanvasService] onDPRChange failed for canvas",a)}}),this.cleanupDPRListener(),this.setupDPRListener())};setupDPRListener(){try{this.cleanupDPRListener();let t=`(resolution: ${window.devicePixelRatio||1}dppx)`;this.dprMediaQuery=window.matchMedia(t),this.dprMediaQuery&&((r,a)=>{"addEventListener"in r?r.addEventListener("change",a):"addListener"in r&&r.addListener(a)})(this.dprMediaQuery,this.onDPRChange)}catch(t){console.warn("[CanvasService] setupDPRListener failed",t)}}cleanupDPRListener(){if(this.dprMediaQuery){try{((e,r)=>{"removeEventListener"in e?e.removeEventListener("change",r):"removeListener"in e&&e.removeListener(r)})(this.dprMediaQuery,this.onDPRChange)}catch{}this.dprMediaQuery=null}}setHighDPISize(t,e){let r=Math.round(e.width),a=Math.round(e.height);t.width=Math.round(r*this.scaleFactor),t.height=Math.round(a*this.scaleFactor),t.style.width=`${r}px`,t.style.height=`${a}px`;try{let o=t.getContext("2d");o&&(o.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),o.clearRect(0,0,t.width,t.height))}catch(o){console.warn("[CanvasService] setHighDPISize: failed to set context transform",o)}}drawTitle(t,e,r,a="normal",o,s,l=.1){if(!t)return;let c=()=>{let d=!1;try{let u=t;if(typeof u.getTransform=="function"){let h=u.getTransform(),f=h&&h.a?h.a:1;Math.abs(f-this.scaleFactor)>1e-6&&(t.save(),t.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),d=!0)}else try{t.save(),t.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),d=!0}catch{}this.drawTitleInternal(t,e,r,a,o,s,l),d&&t.restore()}catch(u){console.warn("[CanvasService] drawTitle failed",u);try{this.drawTitleInternal(t,e,r,a,o,s,l)}catch{}}};document.fonts.status==="loaded"?this.fontsReadyPromise.then(()=>requestAnimationFrame(c)).catch(()=>requestAnimationFrame(c)):this.fontsReadyPromise.then(()=>requestAnimationFrame(c)).catch(d=>{console.warn(`[CanvasService] Font readiness failed: ${d}`),requestAnimationFrame(c)})}drawTitleInternal(t,e,r,a="normal",o,s,l){if(!t)return;let c=o-2*this.EDGE_BUFFER,d=Math.round(s*l),u=this.calculateOptimalFontSize(t,e,c,d,a);t.clearRect(0,0,o,s),t.font=`${a} ${u}px ${this.DEFAULT_FONT}`,t.fillStyle=r,t.textAlign="left",t.textBaseline="top",t.fillText(e,this.EDGE_BUFFER,this.EDGE_BUFFER,c)}clearCanvas(t,e,r){t.clearRect(0,0,e,r)}drawText(t,e,r=this.EDGE_BUFFER,a=this.EDGE_BUFFER,o,s,l="normal",c="#000",d="center",u="middle"){if(!t)return;let h=()=>{try{t.save(),t.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTextInternal(t,e,r,a,o,s,l,c,d,u)}finally{try{t.restore()}catch{}}};document.fonts.status==="loaded"?h():this.fontsReadyPromise.then(h).catch(f=>{console.warn(`[Canvas Service] Font readiness failed: ${f}`),h()})}drawTextInternal(t,e,r=this.EDGE_BUFFER,a=this.EDGE_BUFFER,o,s,l="normal",c="#000",d="center",u="middle"){let h=this.calculateOptimalFontSize(t,e,o,s,l);t.font=`${l} ${h}px ${this.DEFAULT_FONT}`,t.fillStyle=c,t.textAlign=d,t.textBaseline=u,t.fillText(e,r,a,o)}calculateOptimalFontSize(t,e,r,a,o="normal"){let s=1,l=a,c=l;for(;s<=l;)c=Math.round((s+l)/2),t.font=`${o} ${c}px ${this.DEFAULT_FONT}`,t.measureText(e).width>r?l=c-1:s=c+1;return l}createTitleBitmap(t,e,r,a,o,s=.1){let l=document.createElement("canvas");l.width=Math.round(a*this.scaleFactor),l.height=Math.round(o*this.scaleFactor),l.style.width=`${a}px`,l.style.height=`${o}px`;let c=l.getContext("2d");return c&&(c.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(c,t,e,r,a,o,s),document.fonts.status!=="loaded"&&document.fonts.ready.then(()=>{try{c.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(c,t,e,r,a,o,s)}catch{}}).catch(()=>{})),l}renderStaticToBitmap(t,e,r,a){let o=document.createElement("canvas");o.width=e*this.scaleFactor,o.height=r*this.scaleFactor;let s=o.getContext("2d");return s&&(s.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),a(s)),o}drawRectangle(t,e,r,a,o,s){t.fillStyle=s,t.fillRect(e,r,a,o)}releaseCanvas(t,e={removeFromDom:!0,clear:!0}){if(!t)return;let{removeFromDom:r=!0,clear:a=!0}=e;try{let o=t.getContext("2d");a&&o&&o.clearRect(0,0,t.width,t.height),t.width=0,t.height=0,r&&t.parentNode&&t.parentNode.removeChild(t)}catch(o){console.warn("[CanvasService] releaseCanvas failed",o)}}releaseCanvases(t,e){t.forEach(r=>this.releaseCanvas(r,e))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=wn({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Yi(i){return i+.5|0}var xe=(i,n,t)=>Math.max(Math.min(i,t),n);function Hi(i){return xe(Yi(i*2.55),0,255)}function ye(i){return xe(Yi(i*255),0,255)}function oe(i){return xe(Yi(i/2.55)/100,0,1)}function Ys(i){return xe(Yi(i*100),0,100)}var Wt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xa=[..."0123456789ABCDEF"],Bu=i=>xa[i&15],zu=i=>xa[(i&240)>>4]+xa[i&15],Rn=i=>(i&240)>>4===(i&15),Nu=i=>Rn(i.r)&&Rn(i.g)&&Rn(i.b)&&Rn(i.a);function Wu(i){var n=i.length,t;return i[0]==="#"&&(n===4||n===5?t={r:255&Wt[i[1]]*17,g:255&Wt[i[2]]*17,b:255&Wt[i[3]]*17,a:n===5?Wt[i[4]]*17:255}:(n===7||n===9)&&(t={r:Wt[i[1]]<<4|Wt[i[2]],g:Wt[i[3]]<<4|Wt[i[4]],b:Wt[i[5]]<<4|Wt[i[6]],a:n===9?Wt[i[7]]<<4|Wt[i[8]]:255})),t}var Hu=(i,n)=>i<255?n(i):"";function Vu(i){var n=Nu(i)?Bu:zu;return i?"#"+n(i.r)+n(i.g)+n(i.b)+Hu(i.a,n):void 0}var Yu=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function $s(i,n,t){let e=n*Math.min(t,1-t),r=(a,o=(a+i/30)%12)=>t-e*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function Uu(i,n,t){let e=(r,a=(r+i/60)%6)=>t-t*n*Math.max(Math.min(a,4-a,1),0);return[e(5),e(3),e(1)]}function ju(i,n,t){let e=$s(i,1,.5),r;for(n+t>1&&(r=1/(n+t),n*=r,t*=r),r=0;r<3;r++)e[r]*=1-n-t,e[r]+=n;return e}function qu(i,n,t,e,r){return i===r?(n-t)/e+(n<t?6:0):n===r?(t-i)/e+2:(i-n)/e+4}function ya(i){let t=i.r/255,e=i.g/255,r=i.b/255,a=Math.max(t,e,r),o=Math.min(t,e,r),s=(a+o)/2,l,c,d;return a!==o&&(d=a-o,c=s>.5?d/(2-a-o):d/(a+o),l=qu(t,e,r,d,a),l=l*60+.5),[l|0,c||0,s]}function ka(i,n,t,e){return(Array.isArray(n)?i(n[0],n[1],n[2]):i(n,t,e)).map(ye)}function wa(i,n,t){return ka($s,i,n,t)}function $u(i,n,t){return ka(ju,i,n,t)}function Qu(i,n,t){return ka(Uu,i,n,t)}function Qs(i){return(i%360+360)%360}function Xu(i){let n=Yu.exec(i),t=255,e;if(!n)return;n[5]!==e&&(t=n[6]?Hi(+n[5]):ye(+n[5]));let r=Qs(+n[2]),a=+n[3]/100,o=+n[4]/100;return n[1]==="hwb"?e=$u(r,a,o):n[1]==="hsv"?e=Qu(r,a,o):e=wa(r,a,o),{r:e[0],g:e[1],b:e[2],a:t}}function Gu(i,n){var t=ya(i);t[0]=Qs(t[0]+n),t=wa(t),i.r=t[0],i.g=t[1],i.b=t[2]}function Ku(i){if(!i)return;let n=ya(i),t=n[0],e=Ys(n[1]),r=Ys(n[2]);return i.a<255?`hsla(${t}, ${e}%, ${r}%, ${oe(i.a)})`:`hsl(${t}, ${e}%, ${r}%)`}var Us={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},js={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Zu(){let i={},n=Object.keys(js),t=Object.keys(Us),e,r,a,o,s;for(e=0;e<n.length;e++){for(o=s=n[e],r=0;r<t.length;r++)a=t[r],s=s.replace(a,Us[a]);a=parseInt(js[o],16),i[s]=[a>>16&255,a>>8&255,a&255]}return i}var En;function Ju(i){En||(En=Zu(),En.transparent=[0,0,0,0]);let n=En[i.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}var th=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function eh(i){let n=th.exec(i),t=255,e,r,a;if(n){if(n[7]!==e){let o=+n[7];t=n[8]?Hi(o):xe(o*255,0,255)}return e=+n[1],r=+n[3],a=+n[5],e=255&(n[2]?Hi(e):xe(e,0,255)),r=255&(n[4]?Hi(r):xe(r,0,255)),a=255&(n[6]?Hi(a):xe(a,0,255)),{r:e,g:r,b:a,a:t}}}function ih(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${oe(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var va=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,di=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function nh(i,n,t){let e=di(oe(i.r)),r=di(oe(i.g)),a=di(oe(i.b));return{r:ye(va(e+t*(di(oe(n.r))-e))),g:ye(va(r+t*(di(oe(n.g))-r))),b:ye(va(a+t*(di(oe(n.b))-a))),a:i.a+t*(n.a-i.a)}}function Ln(i,n,t){if(i){let e=ya(i);e[n]=Math.max(0,Math.min(e[n]+e[n]*t,n===0?360:1)),e=wa(e),i.r=e[0],i.g=e[1],i.b=e[2]}}function Xs(i,n){return i&&Object.assign(n||{},i)}function qs(i){var n={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(n={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(n.a=ye(i[3]))):(n=Xs(i,{r:0,g:0,b:0,a:1}),n.a=ye(n.a)),n}function rh(i){return i.charAt(0)==="r"?eh(i):Xu(i)}var Vi=class i{constructor(n){if(n instanceof i)return n;let t=typeof n,e;t==="object"?e=qs(n):t==="string"&&(e=Wu(n)||Ju(n)||rh(n)),this._rgb=e,this._valid=!!e}get valid(){return this._valid}get rgb(){var n=Xs(this._rgb);return n&&(n.a=oe(n.a)),n}set rgb(n){this._rgb=qs(n)}rgbString(){return this._valid?ih(this._rgb):void 0}hexString(){return this._valid?Vu(this._rgb):void 0}hslString(){return this._valid?Ku(this._rgb):void 0}mix(n,t){if(n){let e=this.rgb,r=n.rgb,a,o=t===a?.5:t,s=2*o-1,l=e.a-r.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,e.r=255&c*e.r+a*r.r+.5,e.g=255&c*e.g+a*r.g+.5,e.b=255&c*e.b+a*r.b+.5,e.a=o*e.a+(1-o)*r.a,this.rgb=e}return this}interpolate(n,t){return n&&(this._rgb=nh(this._rgb,n._rgb,t)),this}clone(){return new i(this.rgb)}alpha(n){return this._rgb.a=ye(n),this}clearer(n){let t=this._rgb;return t.a*=1-n,this}greyscale(){let n=this._rgb,t=Yi(n.r*.3+n.g*.59+n.b*.11);return n.r=n.g=n.b=t,this}opaquer(n){let t=this._rgb;return t.a*=1+n,this}negate(){let n=this._rgb;return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,this}lighten(n){return Ln(this._rgb,2,n),this}darken(n){return Ln(this._rgb,2,-n),this}saturate(n){return Ln(this._rgb,1,n),this}desaturate(n){return Ln(this._rgb,1,-n),this}rotate(n){return Gu(this._rgb,n),this}};function Jt(){}var ol=(()=>{let i=0;return()=>i++})();function U(i){return i==null}function et(i){if(Array.isArray&&Array.isArray(i))return!0;let n=Object.prototype.toString.call(i);return n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"}function j(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function at(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function St(i,n){return at(i)?i:n}function N(i,n){return typeof i>"u"?n:i}var sl=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/n,Da=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*n:+i;function J(i,n,t){if(i&&typeof i.call=="function")return i.apply(t,n)}function G(i,n,t,e){let r,a,o;if(et(i))if(a=i.length,e)for(r=a-1;r>=0;r--)n.call(t,i[r],r);else for(r=0;r<a;r++)n.call(t,i[r],r);else if(j(i))for(o=Object.keys(i),a=o.length,r=0;r<a;r++)n.call(t,i[o[r]],o[r])}function qi(i,n){let t,e,r,a;if(!i||!n||i.length!==n.length)return!1;for(t=0,e=i.length;t<e;++t)if(r=i[t],a=n[t],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function Nn(i){if(et(i))return i.map(Nn);if(j(i)){let n=Object.create(null),t=Object.keys(i),e=t.length,r=0;for(;r<e;++r)n[t[r]]=Nn(i[t[r]]);return n}return i}function ll(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function ah(i,n,t,e){if(!ll(i))return;let r=n[i],a=t[i];j(r)&&j(a)?hi(r,a,e):n[i]=Nn(a)}function hi(i,n,t){let e=et(n)?n:[n],r=e.length;if(!j(i))return i;t=t||{};let a=t.merger||ah,o;for(let s=0;s<r;++s){if(o=e[s],!j(o))continue;let l=Object.keys(o);for(let c=0,d=l.length;c<d;++c)a(l[c],i,o,t)}return i}function mi(i,n){return hi(i,n,{merger:oh})}function oh(i,n,t){if(!ll(i))return;let e=n[i],r=t[i];j(e)&&j(r)?mi(e,r):Object.prototype.hasOwnProperty.call(n,i)||(n[i]=Nn(r))}var Gs={"":i=>i,x:i=>i.x,y:i=>i.y};function sh(i){let n=i.split("."),t=[],e="";for(let r of n)e+=r,e.endsWith("\\")?e=e.slice(0,-1)+".":(t.push(e),e="");return t}function lh(i){let n=sh(i);return t=>{for(let e of n){if(e==="")break;t=t&&t[e]}return t}}function ce(i,n){return(Gs[n]||(Gs[n]=lh(n)))(i)}function Yn(i){return i.charAt(0).toUpperCase()+i.slice(1)}var pi=i=>typeof i<"u",se=i=>typeof i=="function",Pa=(i,n)=>{if(i.size!==n.size)return!1;for(let t of i)if(!n.has(t))return!1;return!0};function cl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var Q=Math.PI,it=2*Q,ch=it+Q,Wn=Number.POSITIVE_INFINITY,dh=Q/180,lt=Q/2,Ne=Q/4,Ks=Q*2/3,le=Math.log10,$t=Math.sign;function gi(i,n,t){return Math.abs(i-n)<t}function Sa(i){let n=Math.round(i);i=gi(i,n,i/1e3)?n:i;let t=Math.pow(10,Math.floor(le(i))),e=i/t;return(e<=1?1:e<=2?2:e<=5?5:10)*t}function dl(i){let n=[],t=Math.sqrt(i),e;for(e=1;e<t;e++)i%e===0&&(n.push(e),n.push(i/e));return t===(t|0)&&n.push(t),n.sort((r,a)=>r-a).pop(),n}function uh(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Ve(i){return!uh(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function ul(i,n){let t=Math.round(i);return t-n<=i&&t+n>=i}function Oa(i,n,t){let e,r,a;for(e=0,r=i.length;e<r;e++)a=i[e][t],isNaN(a)||(n.min=Math.min(n.min,a),n.max=Math.max(n.max,a))}function Ht(i){return i*(Q/180)}function Un(i){return i*(180/Q)}function Ia(i){if(!at(i))return;let n=1,t=0;for(;Math.round(i*n)/n!==i;)n*=10,t++;return t}function Aa(i,n){let t=n.x-i.x,e=n.y-i.y,r=Math.sqrt(t*t+e*e),a=Math.atan2(e,t);return a<-.5*Q&&(a+=it),{angle:a,distance:r}}function Hn(i,n){return Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))}function hh(i,n){return(i-n+ch)%it-Q}function _t(i){return(i%it+it)%it}function bi(i,n,t,e){let r=_t(i),a=_t(n),o=_t(t),s=_t(a-r),l=_t(o-r),c=_t(r-a),d=_t(r-o);return r===a||r===o||e&&a===o||s>l&&c<d}function pt(i,n,t){return Math.max(n,Math.min(t,i))}function hl(i){return pt(i,-32768,32767)}function te(i,n,t,e=1e-6){return i>=Math.min(n,t)-e&&i<=Math.max(n,t)+e}function jn(i,n,t){t=t||(o=>i[o]<n);let e=i.length-1,r=0,a;for(;e-r>1;)a=r+e>>1,t(a)?r=a:e=a;return{lo:r,hi:e}}var Kt=(i,n,t,e)=>jn(i,t,e?r=>{let a=i[r][n];return a<t||a===t&&i[r+1][n]===t}:r=>i[r][n]<t),fl=(i,n,t)=>jn(i,t,e=>i[e][n]>=t);function ml(i,n,t){let e=0,r=i.length;for(;e<r&&i[e]<n;)e++;for(;r>e&&i[r-1]>t;)r--;return e>0||r<i.length?i.slice(e,r):i}var pl=["push","pop","shift","splice","unshift"];function gl(i,n){if(i._chartjs){i._chartjs.listeners.push(n);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),pl.forEach(t=>{let e="_onData"+Yn(t),r=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...a){let o=r.apply(this,a);return i._chartjs.listeners.forEach(s=>{typeof s[e]=="function"&&s[e](...a)}),o}})})}function Ra(i,n){let t=i._chartjs;if(!t)return;let e=t.listeners,r=e.indexOf(n);r!==-1&&e.splice(r,1),!(e.length>0)&&(pl.forEach(a=>{delete i[a]}),delete i._chartjs)}function Ea(i){let n=new Set(i);return n.size===i.length?i:Array.from(n)}var La=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Fa(i,n){let t=[],e=!1;return function(...r){t=r,e||(e=!0,La.call(window,()=>{e=!1,i.apply(n,t)}))}}function bl(i,n){let t;return function(...e){return n?(clearTimeout(t),t=setTimeout(i,n,e)):i.apply(this,e),n}}var qn=i=>i==="start"?"left":i==="end"?"right":"center",vt=(i,n,t)=>i==="start"?n:i==="end"?t:(n+t)/2,_l=(i,n,t,e)=>i===(e?"left":"right")?t:i==="center"?(n+t)/2:n;function Ba(i,n,t){let e=n.length,r=0,a=e;if(i._sorted){let{iScale:o,vScale:s,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,d=o.axis,{min:u,max:h,minDefined:f,maxDefined:m}=o.getUserBounds();if(f){if(r=Math.min(Kt(l,d,u).lo,t?e:Kt(n,d,o.getPixelForValue(u)).lo),c){let p=l.slice(0,r+1).reverse().findIndex(g=>!U(g[s.axis]));r-=Math.max(0,p)}r=pt(r,0,e-1)}if(m){let p=Math.max(Kt(l,o.axis,h,!0).hi+1,t?0:Kt(n,d,o.getPixelForValue(h),!0).hi+1);if(c){let g=l.slice(p-1).findIndex(b=>!U(b[s.axis]));p+=Math.max(0,g)}a=pt(p,r,e)-r}else a=e-r}return{start:r,count:a}}function za(i){let{xScale:n,yScale:t,_scaleRanges:e}=i,r={xmin:n.min,xmax:n.max,ymin:t.min,ymax:t.max};if(!e)return i._scaleRanges=r,!0;let a=e.xmin!==n.min||e.xmax!==n.max||e.ymin!==t.min||e.ymax!==t.max;return Object.assign(e,r),a}var Fn=i=>i===0||i===1,Zs=(i,n,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-n)*it/t)),Js=(i,n,t)=>Math.pow(2,-10*i)*Math.sin((i-n)*it/t)+1,ui={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*lt)+1,easeOutSine:i=>Math.sin(i*lt),easeInOutSine:i=>-.5*(Math.cos(Q*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Fn(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Fn(i)?i:Zs(i,.075,.3),easeOutElastic:i=>Fn(i)?i:Js(i,.075,.3),easeInOutElastic(i){return Fn(i)?i:i<.5?.5*Zs(i*2,.1125,.45):.5+.5*Js(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let n=1.70158;return(i/=.5)<1?.5*(i*i*(((n*=1.525)+1)*i-n)):.5*((i-=2)*i*(((n*=1.525)+1)*i+n)+2)},easeInBounce:i=>1-ui.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?ui.easeInBounce(i*2)*.5:ui.easeOutBounce(i*2-1)*.5+.5};function Na(i){if(i&&typeof i=="object"){let n=i.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return!1}function Wa(i){return Na(i)?i:new Vi(i)}function Ca(i){return Na(i)?i:new Vi(i).saturate(.5).darken(.1).hexString()}var fh=["x","y","borderWidth","radius","tension"],mh=["color","borderColor","backgroundColor"];function ph(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"}),i.set("animations",{colors:{type:"color",properties:mh},numbers:{type:"number",properties:fh}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}})}function gh(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var tl=new Map;function bh(i,n){n=n||{};let t=i+JSON.stringify(n),e=tl.get(t);return e||(e=new Intl.NumberFormat(i,n),tl.set(t,e)),e}function _i(i,n,t){return bh(n,t).format(i)}var vl={values(i){return et(i)?i:""+i},numeric(i,n,t){if(i===0)return"0";let e=this.chart.options.locale,r,a=i;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=_h(i,t)}let o=le(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),_i(i,e,l)},logarithmic(i,n,t){if(i===0)return"0";let e=t[n].significand||i/Math.pow(10,Math.floor(le(i)));return[1,2,3,5,10,15].includes(e)||n>.8*t.length?vl.numeric.call(this,i,n,t):""}};function _h(i,n){let t=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var $i={formatters:vl};function vh(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,t)=>t.lineWidth,tickColor:(n,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$i.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"&&n!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"})}var Ce=Object.create(null),$n=Object.create(null);function Ui(i,n){if(!n)return i;let t=n.split(".");for(let e=0,r=t.length;e<r;++e){let a=t[e];i=i[a]||(i[a]=Object.create(null))}return i}function Ta(i,n,t){return typeof n=="string"?hi(Ui(i,n),t):hi(Ui(i,""),n)}var Ma=class{constructor(n,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,r)=>Ca(r.backgroundColor),this.hoverBorderColor=(e,r)=>Ca(r.borderColor),this.hoverColor=(e,r)=>Ca(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(n),this.apply(t)}set(n,t){return Ta(this,n,t)}get(n){return Ui(this,n)}describe(n,t){return Ta($n,n,t)}override(n,t){return Ta(Ce,n,t)}route(n,t,e,r){let a=Ui(this,n),o=Ui(this,e),s="_"+t;Object.defineProperties(a,{[s]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[s],c=o[r];return j(l)?Object.assign({},c,l):N(l,c)},set(l){this[s]=l}}})}apply(n){n.forEach(t=>t(this))}},nt=new Ma({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ph,gh,vh]);function xh(i){return!i||U(i.size)||U(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function ji(i,n,t,e,r){let a=n[r];return a||(a=n[r]=i.measureText(r).width,t.push(r)),a>e&&(e=a),e}function xl(i,n,t,e){e=e||{};let r=e.data=e.data||{},a=e.garbageCollect=e.garbageCollect||[];e.font!==n&&(r=e.data={},a=e.garbageCollect=[],e.font=n),i.save(),i.font=n;let o=0,s=t.length,l,c,d,u,h;for(l=0;l<s;l++)if(u=t[l],u!=null&&!et(u))o=ji(i,r,a,o,u);else if(et(u))for(c=0,d=u.length;c<d;c++)h=u[c],h!=null&&!et(h)&&(o=ji(i,r,a,o,h));i.restore();let f=a.length/2;if(f>t.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return o}function Te(i,n,t){let e=i.currentDevicePixelRatio,r=t!==0?Math.max(t/2,.5):0;return Math.round((n-r)*e)/e+r}function Ha(i,n){!n&&!i||(n=n||i.getContext("2d"),n.save(),n.resetTransform(),n.clearRect(0,0,i.width,i.height),n.restore())}function Qn(i,n,t,e){Va(i,n,t,e,null)}function Va(i,n,t,e,r){let a,o,s,l,c,d,u,h,f=n.pointStyle,m=n.rotation,p=n.radius,g=(m||0)*dh;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){i.save(),i.translate(t,e),i.rotate(g),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),f){default:r?i.ellipse(t,e,r/2,p,0,0,it):i.arc(t,e,p,0,it),i.closePath();break;case"triangle":d=r?r/2:p,i.moveTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=Ks,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=Ks,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,o=Math.cos(g+Ne)*l,u=Math.cos(g+Ne)*(r?r/2-c:l),s=Math.sin(g+Ne)*l,h=Math.sin(g+Ne)*(r?r/2-c:l),i.arc(t-u,e-s,c,g-Q,g-lt),i.arc(t+h,e-o,c,g-lt,g),i.arc(t+u,e+s,c,g,g+lt),i.arc(t-h,e+o,c,g+lt,g+Q),i.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,d=r?r/2:l,i.rect(t-d,e-l,2*d,2*l);break}g+=Ne;case"rectRot":u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+h,e-o),i.lineTo(t+u,e+s),i.lineTo(t-h,e+o),i.closePath();break;case"crossRot":g+=Ne;case"cross":u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+u,e+s),i.moveTo(t+h,e-o),i.lineTo(t-h,e+o);break;case"star":u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+u,e+s),i.moveTo(t+h,e-o),i.lineTo(t-h,e+o),g+=Ne,u=Math.cos(g)*(r?r/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,h=Math.sin(g)*(r?r/2:p),i.moveTo(t-u,e-s),i.lineTo(t+u,e+s),i.moveTo(t+h,e-o),i.lineTo(t-h,e+o);break;case"line":o=r?r/2:Math.cos(g)*p,s=Math.sin(g)*p,i.moveTo(t-o,e-s),i.lineTo(t+o,e+s);break;case"dash":i.moveTo(t,e),i.lineTo(t+Math.cos(g)*(r?r/2:p),e+Math.sin(g)*p);break;case!1:i.closePath();break}i.fill(),n.borderWidth>0&&i.stroke()}}function Zt(i,n,t){return t=t||.5,!n||i&&i.x>n.left-t&&i.x<n.right+t&&i.y>n.top-t&&i.y<n.bottom+t}function Qi(i,n){i.save(),i.beginPath(),i.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),i.clip()}function Xi(i){i.restore()}function yl(i,n,t,e,r){if(!n)return i.lineTo(t.x,t.y);if(r==="middle"){let a=(n.x+t.x)/2;i.lineTo(a,n.y),i.lineTo(a,t.y)}else r==="after"!=!!e?i.lineTo(n.x,t.y):i.lineTo(t.x,n.y);i.lineTo(t.x,t.y)}function kl(i,n,t,e){if(!n)return i.lineTo(t.x,t.y);i.bezierCurveTo(e?n.cp1x:n.cp2x,e?n.cp1y:n.cp2y,e?t.cp2x:t.cp1x,e?t.cp2y:t.cp1y,t.x,t.y)}function yh(i,n){n.translation&&i.translate(n.translation[0],n.translation[1]),U(n.rotation)||i.rotate(n.rotation),n.color&&(i.fillStyle=n.color),n.textAlign&&(i.textAlign=n.textAlign),n.textBaseline&&(i.textBaseline=n.textBaseline)}function kh(i,n,t,e,r){if(r.strikethrough||r.underline){let a=i.measureText(e),o=n-a.actualBoundingBoxLeft,s=n+a.actualBoundingBoxRight,l=t-a.actualBoundingBoxAscent,c=t+a.actualBoundingBoxDescent,d=r.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=r.decorationWidth||2,i.moveTo(o,d),i.lineTo(s,d),i.stroke()}}function wh(i,n){let t=i.fillStyle;i.fillStyle=n.color,i.fillRect(n.left,n.top,n.width,n.height),i.fillStyle=t}function Me(i,n,t,e,r,a={}){let o=et(n)?n:[n],s=a.strokeWidth>0&&a.strokeColor!=="",l,c;for(i.save(),i.font=r.string,yh(i,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&wh(i,a.backdrop),s&&(a.strokeColor&&(i.strokeStyle=a.strokeColor),U(a.strokeWidth)||(i.lineWidth=a.strokeWidth),i.strokeText(c,t,e,a.maxWidth)),i.fillText(c,t,e,a.maxWidth),kh(i,t,e,c,a),e+=Number(r.lineHeight);i.restore()}function vi(i,n){let{x:t,y:e,w:r,h:a,radius:o}=n;i.arc(t+o.topLeft,e+o.topLeft,o.topLeft,1.5*Q,Q,!0),i.lineTo(t,e+a-o.bottomLeft),i.arc(t+o.bottomLeft,e+a-o.bottomLeft,o.bottomLeft,Q,lt,!0),i.lineTo(t+r-o.bottomRight,e+a),i.arc(t+r-o.bottomRight,e+a-o.bottomRight,o.bottomRight,lt,0,!0),i.lineTo(t+r,e+o.topRight),i.arc(t+r-o.topRight,e+o.topRight,o.topRight,0,-lt,!0),i.lineTo(t+o.topLeft,e)}var Ch=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Th=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Mh(i,n){let t=(""+i).match(Ch);if(!t||t[1]==="normal")return n*1.2;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100;break}return n*i}var Dh=i=>+i||0;function Xn(i,n){let t={},e=j(n),r=e?Object.keys(n):n,a=j(i)?e?o=>N(i[o],i[n[o]]):o=>i[o]:()=>i;for(let o of r)t[o]=Dh(a(o));return t}function Ya(i){return Xn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function De(i){return Xn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function xt(i){let n=Ya(i);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function dt(i,n){i=i||{},n=n||nt.font;let t=N(i.size,n.size);typeof t=="string"&&(t=parseInt(t,10));let e=N(i.style,n.style);e&&!(""+e).match(Th)&&(console.warn('Invalid font style specified: "'+e+'"'),e=void 0);let r={family:N(i.family,n.family),lineHeight:Mh(N(i.lineHeight,n.lineHeight),t),size:t,style:e,weight:N(i.weight,n.weight),string:""};return r.string=xh(r),r}function xi(i,n,t,e){let r=!0,a,o,s;for(a=0,o=i.length;a<o;++a)if(s=i[a],s!==void 0&&(n!==void 0&&typeof s=="function"&&(s=s(n),r=!1),t!==void 0&&et(s)&&(s=s[t%s.length],r=!1),s!==void 0))return e&&!r&&(e.cacheable=!1),s}function wl(i,n,t){let{min:e,max:r}=i,a=Da(n,(r-e)/2),o=(s,l)=>t&&s===0?0:s+l;return{min:o(e,-Math.abs(a)),max:o(r,a)}}function de(i,n){return Object.assign(Object.create(i),n)}function Gn(i,n=[""],t,e,r=()=>i[0]){let a=t||i;typeof e>"u"&&(e=Ml("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:a,_fallback:e,_getTarget:r,override:s=>Gn([s,...i],n,a,e)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete i[0][l],!0},get(s,l){return Cl(s,l,()=>Lh(l,n,i,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(s,l){return il(s).includes(l)},ownKeys(s){return il(s)},set(s,l,c){let d=s._storage||(s._storage=r());return s[l]=d[l]=c,delete s._keys,!0}})}function He(i,n,t,e){let r={_cacheable:!1,_proxy:i,_context:n,_subProxy:t,_stack:new Set,_descriptors:Ua(i,e),setContext:a=>He(i,a,t,e),override:a=>He(i.override(a),n,t,e)};return new Proxy(r,{deleteProperty(a,o){return delete a[o],delete i[o],!0},get(a,o,s){return Cl(a,o,()=>Sh(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(i,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,o)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(a,o){return Reflect.has(i,o)},ownKeys(){return Reflect.ownKeys(i)},set(a,o,s){return i[o]=s,delete a[o],!0}})}function Ua(i,n={scriptable:!0,indexable:!0}){let{_scriptable:t=n.scriptable,_indexable:e=n.indexable,_allKeys:r=n.allKeys}=i;return{allKeys:r,scriptable:t,indexable:e,isScriptable:se(t)?t:()=>t,isIndexable:se(e)?e:()=>e}}var Ph=(i,n)=>i?i+Yn(n):n,ja=(i,n)=>j(n)&&i!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function Cl(i,n,t){if(Object.prototype.hasOwnProperty.call(i,n)||n==="constructor")return i[n];let e=t();return i[n]=e,e}function Sh(i,n,t){let{_proxy:e,_context:r,_subProxy:a,_descriptors:o}=i,s=e[n];return se(s)&&o.isScriptable(n)&&(s=Oh(n,s,i,t)),et(s)&&s.length&&(s=Ih(n,s,i,o.isIndexable)),ja(n,s)&&(s=He(s,r,a&&a[n],o)),s}function Oh(i,n,t,e){let{_proxy:r,_context:a,_subProxy:o,_stack:s}=t;if(s.has(i))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+i);s.add(i);let l=n(a,o||e);return s.delete(i),ja(i,l)&&(l=qa(r._scopes,r,i,l)),l}function Ih(i,n,t,e){let{_proxy:r,_context:a,_subProxy:o,_descriptors:s}=t;if(typeof a.index<"u"&&e(i))return n[a.index%n.length];if(j(n[0])){let l=n,c=r._scopes.filter(d=>d!==l);n=[];for(let d of l){let u=qa(c,r,i,d);n.push(He(u,a,o&&o[i],s))}}return n}function Tl(i,n,t){return se(i)?i(n,t):i}var Ah=(i,n)=>i===!0?n:typeof i=="string"?ce(n,i):void 0;function Rh(i,n,t,e,r){for(let a of n){let o=Ah(t,a);if(o){i.add(o);let s=Tl(o._fallback,t,r);if(typeof s<"u"&&s!==t&&s!==e)return s}else if(o===!1&&typeof e<"u"&&t!==e)return null}return!1}function qa(i,n,t,e){let r=n._rootScopes,a=Tl(n._fallback,t,e),o=[...i,...r],s=new Set;s.add(e);let l=el(s,o,t,a||t,e);return l===null||typeof a<"u"&&a!==t&&(l=el(s,o,a,l,e),l===null)?!1:Gn(Array.from(s),[""],r,a,()=>Eh(n,t,e))}function el(i,n,t,e,r){for(;t;)t=Rh(i,n,t,e,r);return t}function Eh(i,n,t){let e=i._getTarget();n in e||(e[n]={});let r=e[n];return et(r)&&j(t)?t:r||{}}function Lh(i,n,t,e){let r;for(let a of n)if(r=Ml(Ph(a,i),t),typeof r<"u")return ja(i,r)?qa(t,e,i,r):r}function Ml(i,n){for(let t of n){if(!t)continue;let e=t[i];if(typeof e<"u")return e}}function il(i){let n=i._keys;return n||(n=i._keys=Fh(i._scopes)),n}function Fh(i){let n=new Set;for(let t of i)for(let e of Object.keys(t).filter(r=>!r.startsWith("_")))n.add(e);return Array.from(n)}function $a(i,n,t,e){let{iScale:r}=i,{key:a="r"}=this._parsing,o=new Array(e),s,l,c,d;for(s=0,l=e;s<l;++s)c=s+t,d=n[c],o[s]={r:r.parse(ce(d,a),c)};return o}var Bh=Number.EPSILON||1e-14,fi=(i,n)=>n<i.length&&!i[n].skip&&i[n],Dl=i=>i==="x"?"y":"x";function zh(i,n,t,e){let r=i.skip?n:i,a=n,o=t.skip?n:t,s=Hn(a,r),l=Hn(o,a),c=s/(s+l),d=l/(s+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;let u=e*c,h=e*d;return{previous:{x:a.x-u*(o.x-r.x),y:a.y-u*(o.y-r.y)},next:{x:a.x+h*(o.x-r.x),y:a.y+h*(o.y-r.y)}}}function Nh(i,n,t){let e=i.length,r,a,o,s,l,c=fi(i,0);for(let d=0;d<e-1;++d)if(l=c,c=fi(i,d+1),!(!l||!c)){if(gi(n[d],0,Bh)){t[d]=t[d+1]=0;continue}r=t[d]/n[d],a=t[d+1]/n[d],s=Math.pow(r,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),t[d]=r*o*n[d],t[d+1]=a*o*n[d])}}function Wh(i,n,t="x"){let e=Dl(t),r=i.length,a,o,s,l=fi(i,0);for(let c=0;c<r;++c){if(o=s,s=l,l=fi(i,c+1),!s)continue;let d=s[t],u=s[e];o&&(a=(d-o[t])/3,s[`cp1${t}`]=d-a,s[`cp1${e}`]=u-a*n[c]),l&&(a=(l[t]-d)/3,s[`cp2${t}`]=d+a,s[`cp2${e}`]=u+a*n[c])}}function Hh(i,n="x"){let t=Dl(n),e=i.length,r=Array(e).fill(0),a=Array(e),o,s,l,c=fi(i,0);for(o=0;o<e;++o)if(s=l,l=c,c=fi(i,o+1),!!l){if(c){let d=c[n]-l[n];r[o]=d!==0?(c[t]-l[t])/d:0}a[o]=s?c?$t(r[o-1])!==$t(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}Nh(i,r,a),Wh(i,a,n)}function Bn(i,n,t){return Math.max(Math.min(i,t),n)}function Vh(i,n){let t,e,r,a,o,s=Zt(i[0],n);for(t=0,e=i.length;t<e;++t)o=a,a=s,s=t<e-1&&Zt(i[t+1],n),a&&(r=i[t],o&&(r.cp1x=Bn(r.cp1x,n.left,n.right),r.cp1y=Bn(r.cp1y,n.top,n.bottom)),s&&(r.cp2x=Bn(r.cp2x,n.left,n.right),r.cp2y=Bn(r.cp2y,n.top,n.bottom)))}function Pl(i,n,t,e,r){let a,o,s,l;if(n.spanGaps&&(i=i.filter(c=>!c.skip)),n.cubicInterpolationMode==="monotone")Hh(i,r);else{let c=e?i[i.length-1]:i[0];for(a=0,o=i.length;a<o;++a)s=i[a],l=zh(c,s,i[Math.min(a+1,o-(e?0:1))%o],n.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}n.capBezierPoints&&Vh(i,t)}function Kn(){return typeof window<"u"&&typeof document<"u"}function Zn(i){let n=i.parentNode;return n&&n.toString()==="[object ShadowRoot]"&&(n=n.host),n}function Vn(i,n,t){let e;return typeof i=="string"?(e=parseInt(i,10),i.indexOf("%")!==-1&&(e=e/100*n.parentNode[t])):e=i,e}var Jn=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Yh(i,n){return Jn(i).getPropertyValue(n)}var Uh=["top","right","bottom","left"];function We(i,n,t){let e={};t=t?"-"+t:"";for(let r=0;r<4;r++){let a=Uh[r];e[a]=parseFloat(i[n+"-"+a+t])||0}return e.width=e.left+e.right,e.height=e.top+e.bottom,e}var jh=(i,n,t)=>(i>0||n>0)&&(!t||!t.shadowRoot);function qh(i,n){let t=i.touches,e=t&&t.length?t[0]:i,{offsetX:r,offsetY:a}=e,o=!1,s,l;if(jh(r,a,i.target))s=r,l=a;else{let c=n.getBoundingClientRect();s=e.clientX-c.left,l=e.clientY-c.top,o=!0}return{x:s,y:l,box:o}}function Pe(i,n){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:e}=n,r=Jn(t),a=r.boxSizing==="border-box",o=We(r,"padding"),s=We(r,"border","width"),{x:l,y:c,box:d}=qh(i,t),u=o.left+(d&&s.left),h=o.top+(d&&s.top),{width:f,height:m}=n;return a&&(f-=o.width+s.width,m-=o.height+s.height),{x:Math.round((l-u)/f*t.width/e),y:Math.round((c-h)/m*t.height/e)}}function $h(i,n,t){let e,r;if(n===void 0||t===void 0){let a=i&&Zn(i);if(!a)n=i.clientWidth,t=i.clientHeight;else{let o=a.getBoundingClientRect(),s=Jn(a),l=We(s,"border","width"),c=We(s,"padding");n=o.width-c.width-l.width,t=o.height-c.height-l.height,e=Vn(s.maxWidth,a,"clientWidth"),r=Vn(s.maxHeight,a,"clientHeight")}}return{width:n,height:t,maxWidth:e||Wn,maxHeight:r||Wn}}var we=i=>Math.round(i*10)/10;function Sl(i,n,t,e){let r=Jn(i),a=We(r,"margin"),o=Vn(r.maxWidth,i,"clientWidth")||Wn,s=Vn(r.maxHeight,i,"clientHeight")||Wn,l=$h(i,n,t),{width:c,height:d}=l;if(r.boxSizing==="content-box"){let h=We(r,"border","width"),f=We(r,"padding");c-=f.width+h.width,d-=f.height+h.height}return c=Math.max(0,c-a.width),d=Math.max(0,e?c/e:d-a.height),c=we(Math.min(c,o,l.maxWidth)),d=we(Math.min(d,s,l.maxHeight)),c&&!d&&(d=we(c/2)),(n!==void 0||t!==void 0)&&e&&l.height&&d>l.height&&(d=l.height,c=we(Math.floor(d*e))),{width:c,height:d}}function Qa(i,n,t){let e=n||1,r=we(i.height*e),a=we(i.width*e);i.height=we(i.height),i.width=we(i.width);let o=i.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${i.height}px`,o.style.width=`${i.width}px`),i.currentDevicePixelRatio!==e||o.height!==r||o.width!==a?(i.currentDevicePixelRatio=e,o.height=r,o.width=a,i.ctx.setTransform(e,0,0,e,0,0),!0):!1}var Ol=(function(){let i=!1;try{let n={get passive(){return i=!0,!1}};Kn()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch{}return i})();function Xa(i,n){let t=Yh(i,n),e=t&&t.match(/^(\d+)(\.\d+)?px$/);return e?+e[1]:void 0}function ke(i,n,t,e){return{x:i.x+t*(n.x-i.x),y:i.y+t*(n.y-i.y)}}function Il(i,n,t,e){return{x:i.x+t*(n.x-i.x),y:e==="middle"?t<.5?i.y:n.y:e==="after"?t<1?i.y:n.y:t>0?n.y:i.y}}function Al(i,n,t,e){let r={x:i.cp2x,y:i.cp2y},a={x:n.cp1x,y:n.cp1y},o=ke(i,r,t),s=ke(r,a,t),l=ke(a,n,t),c=ke(o,s,t),d=ke(s,l,t);return ke(c,d,t)}var Qh=function(i,n){return{x(t){return i+i+n-t},setWidth(t){n=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}},Xh=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,n){return i+n},leftForLtr(i,n){return i}}};function Ye(i,n,t){return i?Qh(n,t):Xh()}function Ga(i,n){let t,e;(n==="ltr"||n==="rtl")&&(t=i.canvas.style,e=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",n,"important"),i.prevTextDirection=e)}function Ka(i,n){n!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",n[0],n[1]))}function Rl(i){return i==="angle"?{between:bi,compare:hh,normalize:_t}:{between:te,compare:(n,t)=>n-t,normalize:n=>n}}function nl({start:i,end:n,count:t,loop:e,style:r}){return{start:i%t,end:n%t,loop:e&&(n-i+1)%t===0,style:r}}function Gh(i,n,t){let{property:e,start:r,end:a}=t,{between:o,normalize:s}=Rl(e),l=n.length,{start:c,end:d,loop:u}=i,h,f;if(u){for(c+=l,d+=l,h=0,f=l;h<f&&o(s(n[c%l][e]),r,a);++h)c--,d--;c%=l,d%=l}return d<c&&(d+=l),{start:c,end:d,loop:u,style:i.style}}function Za(i,n,t){if(!t)return[i];let{property:e,start:r,end:a}=t,o=n.length,{compare:s,between:l,normalize:c}=Rl(e),{start:d,end:u,loop:h,style:f}=Gh(i,n,t),m=[],p=!1,g=null,b,_,k,C=()=>l(r,k,b)&&s(r,k)!==0,v=()=>s(a,b)===0||l(a,k,b),y=()=>p||C(),P=()=>!p||v();for(let D=d,S=d;D<=u;++D)_=n[D%o],!_.skip&&(b=c(_[e]),b!==k&&(p=l(b,r,a),g===null&&y()&&(g=s(b,r)===0?D:S),g!==null&&P()&&(m.push(nl({start:g,end:D,loop:h,count:o,style:f})),g=null),S=D,k=b));return g!==null&&m.push(nl({start:g,end:u,loop:h,count:o,style:f})),m}function Ja(i,n){let t=[],e=i.segments;for(let r=0;r<e.length;r++){let a=Za(e[r],i.points,n);a.length&&t.push(...a)}return t}function Kh(i,n,t,e){let r=0,a=n-1;if(t&&!e)for(;r<n&&!i[r].skip;)r++;for(;r<n&&i[r].skip;)r++;for(r%=n,t&&(a+=r);a>r&&i[a%n].skip;)a--;return a%=n,{start:r,end:a}}function Zh(i,n,t,e){let r=i.length,a=[],o=n,s=i[n],l;for(l=n+1;l<=t;++l){let c=i[l%r];c.skip||c.stop?s.skip||(e=!1,a.push({start:n%r,end:(l-1)%r,loop:e}),n=o=c.stop?l:null):(o=l,s.skip&&(n=l)),s=c}return o!==null&&a.push({start:n%r,end:o%r,loop:e}),a}function El(i,n){let t=i.points,e=i.options.spanGaps,r=t.length;if(!r)return[];let a=!!i._loop,{start:o,end:s}=Kh(t,r,a,e);if(e===!0)return rl(i,[{start:o,end:s,loop:a}],t,n);let l=s<o?s+r:s,c=!!i._fullLoop&&o===0&&s===r-1;return rl(i,Zh(t,o,l,c),t,n)}function rl(i,n,t,e){return!e||!e.setContext||!t?n:Jh(i,n,t,e)}function Jh(i,n,t,e){let r=i._chart.getContext(),a=al(i.options),{_datasetIndex:o,options:{spanGaps:s}}=i,l=t.length,c=[],d=a,u=n[0].start,h=u;function f(m,p,g,b){let _=s?-1:1;if(m!==p){for(m+=l;t[m%l].skip;)m-=_;for(;t[p%l].skip;)p+=_;m%l!==p%l&&(c.push({start:m%l,end:p%l,loop:g,style:b}),d=b,u=p%l)}}for(let m of n){u=s?u:m.start;let p=t[u%l],g;for(h=u+1;h<=m.end;h++){let b=t[h%l];g=al(e.setContext(de(r,{type:"segment",p0:p,p1:b,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:o}))),tf(g,d)&&f(u,h-1,m.loop,d),p=b,d=g}u<h-1&&f(u,h-1,m.loop,d)}return c}function al(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function tf(i,n){if(!n)return!1;let t=[],e=function(r,a){return Na(a)?(t.includes(a)||t.push(a),t.indexOf(a)):a};return JSON.stringify(i,e)!==JSON.stringify(n,e)}function zn(i,n,t){return i.options.clip?i[t]:n[t]}function ef(i,n){let{xScale:t,yScale:e}=i;return t&&e?{left:zn(t,n,"left"),right:zn(t,n,"right"),top:zn(e,n,"top"),bottom:zn(e,n,"bottom")}:n}function to(i,n){let t=n._clip;if(t.disabled)return!1;let e=ef(n,i.chartArea);return{left:t.left===!1?0:e.left-(t.left===!0?0:t.left),right:t.right===!1?i.width:e.right+(t.right===!0?0:t.right),top:t.top===!1?0:e.top-(t.top===!0?0:t.top),bottom:t.bottom===!1?i.height:e.bottom+(t.bottom===!0?0:t.bottom)}}var fo=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,e,r){let a=t.listeners[r],o=t.duration;a.forEach(s=>s({chart:n,initial:t.initial,numSteps:o,currentStep:Math.min(e-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=La.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let t=0;this._charts.forEach((e,r)=>{if(!e.running||!e.items.length)return;let a=e.items,o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>e.duration&&(e.duration=l._total),l.tick(n),s=!0):(a[o]=a[a.length-1],a.pop());s&&(r.draw(),this._notify(r,e,n,"progress")),a.length||(e.running=!1,this._notify(r,e,n,"complete"),e.initial=!1),t+=a.length}),this._lastDate=n,t===0&&(this._running=!1)}_getAnims(n){let t=this._charts,e=t.get(n);return e||(e={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(n,e)),e}listen(n,t,e){this._getAnims(n).listeners[t].push(e)}add(n,t){!t||!t.length||this._getAnims(n).items.push(...t)}has(n){return this._getAnims(n).items.length>0}start(n){let t=this._charts.get(n);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,r)=>Math.max(e,r._duration),0),this._refresh())}running(n){if(!this._running)return!1;let t=this._charts.get(n);return!(!t||!t.running||!t.items.length)}stop(n){let t=this._charts.get(n);if(!t||!t.items.length)return;let e=t.items,r=e.length-1;for(;r>=0;--r)e[r].cancel();t.items=[],this._notify(n,t,Date.now(),"complete")}remove(n){return this._charts.delete(n)}},ue=new fo,Ll="transparent",nf={boolean(i,n,t){return t>.5?n:i},color(i,n,t){let e=Wa(i||Ll),r=e.valid&&Wa(n||Ll);return r&&r.valid?r.mix(e,t).hexString():n},number(i,n,t){return i+(n-i)*t}},mo=class{constructor(n,t,e,r){let a=t[e];r=xi([n.to,r,a,n.from]);let o=xi([n.from,a,r]);this._active=!0,this._fn=n.fn||nf[n.type||typeof o],this._easing=ui[n.easing]||ui.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=t,this._prop=e,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(n,t,e){if(this._active){this._notify(!1);let r=this._target[this._prop],a=e-this._start,o=this._duration-a;this._start=e,this._duration=Math.floor(Math.max(o,n.duration)),this._total+=a,this._loop=!!n.loop,this._to=xi([n.to,t,r,n.from]),this._from=xi([n.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){let t=n-this._start,e=this._duration,r=this._prop,a=this._from,o=this._loop,s=this._to,l;if(this._active=a!==s&&(o||t<e),!this._active){this._target[r]=s,this._notify(!0);return}if(t<0){this._target[r]=a;return}l=t/e%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(a,s,l)}wait(){let n=this._promises||(this._promises=[]);return new Promise((t,e)=>{n.push({res:t,rej:e})})}_notify(n){let t=n?"res":"rej",e=this._promises||[];for(let r=0;r<e.length;r++)e[r][t]()}},lr=class{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!j(n))return;let t=Object.keys(nt.animation),e=this._properties;Object.getOwnPropertyNames(n).forEach(r=>{let a=n[r];if(!j(a))return;let o={};for(let s of t)o[s]=a[s];(et(a.properties)&&a.properties||[r]).forEach(s=>{(s===r||!e.has(s))&&e.set(s,o)})})}_animateOptions(n,t){let e=t.options,r=af(n,e);if(!r)return[];let a=this._createAnimations(r,e);return e.$shared&&rf(n.options.$animations,e).then(()=>{n.options=e},()=>{}),a}_createAnimations(n,t){let e=this._properties,r=[],a=n.$animations||(n.$animations={}),o=Object.keys(t),s=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(n,t));continue}let d=t[c],u=a[c],h=e.get(c);if(u)if(h&&u.active()){u.update(h,d,s);continue}else u.cancel();if(!h||!h.duration){n[c]=d;continue}a[c]=u=new mo(h,n,c,d),r.push(u)}return r}update(n,t){if(this._properties.size===0){Object.assign(n,t);return}let e=this._createAnimations(n,t);if(e.length)return ue.add(this._chart,e),!0}};function rf(i,n){let t=[],e=Object.keys(n);for(let r=0;r<e.length;r++){let a=i[e[r]];a&&a.active()&&t.push(a.wait())}return Promise.all(t)}function af(i,n){if(!n)return;let t=i.options;if(!t){i.options=n;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function Fl(i,n){let t=i&&i.options||{},e=t.reverse,r=t.min===void 0?n:0,a=t.max===void 0?n:0;return{start:e?a:r,end:e?r:a}}function of(i,n,t){if(t===!1)return!1;let e=Fl(i,t),r=Fl(n,t);return{top:r.end,right:e.end,bottom:r.start,left:e.start}}function sf(i){let n,t,e,r;return j(i)?(n=i.top,t=i.right,e=i.bottom,r=i.left):n=t=e=r=i,{top:n,right:t,bottom:e,left:r,disabled:i===!1}}function Lc(i,n){let t=[],e=i._getSortedDatasetMetas(n),r,a;for(r=0,a=e.length;r<a;++r)t.push(e[r].index);return t}function Bl(i,n,t,e={}){let r=i.keys,a=e.mode==="single",o,s,l,c;if(n===null)return;let d=!1;for(o=0,s=r.length;o<s;++o){if(l=+r[o],l===t){if(d=!0,e.all)continue;break}c=i.values[l],at(c)&&(a||n===0||$t(n)===$t(c))&&(n+=c)}return!d&&!e.all?0:n}function lf(i,n){let{iScale:t,vScale:e}=n,r=t.axis==="x"?"x":"y",a=e.axis==="x"?"x":"y",o=Object.keys(i),s=new Array(o.length),l,c,d;for(l=0,c=o.length;l<c;++l)d=o[l],s[l]={[r]:d,[a]:i[d]};return s}function eo(i,n){let t=i&&i.options.stacked;return t||t===void 0&&n.stack!==void 0}function cf(i,n,t){return`${i.id}.${n.id}.${t.stack||t.type}`}function df(i){let{min:n,max:t,minDefined:e,maxDefined:r}=i.getUserBounds();return{min:e?n:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}function uf(i,n,t){let e=i[n]||(i[n]={});return e[t]||(e[t]={})}function zl(i,n,t,e){for(let r of n.getMatchingVisibleMetas(e).reverse()){let a=i[r.index];if(t&&a>0||!t&&a<0)return r.index}return null}function Nl(i,n){let{chart:t,_cachedMeta:e}=i,r=t._stacks||(t._stacks={}),{iScale:a,vScale:o,index:s}=e,l=a.axis,c=o.axis,d=cf(a,o,e),u=n.length,h;for(let f=0;f<u;++f){let m=n[f],{[l]:p,[c]:g}=m,b=m._stacks||(m._stacks={});h=b[c]=uf(r,d,p),h[s]=g,h._top=zl(h,o,!0,e.type),h._bottom=zl(h,o,!1,e.type);let _=h._visualValues||(h._visualValues={});_[s]=g}}function io(i,n){let t=i.scales;return Object.keys(t).filter(e=>t[e].axis===n).shift()}function hf(i,n){return de(i,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function ff(i,n,t){return de(i,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function Gi(i,n){let t=i.controller.index,e=i.vScale&&i.vScale.axis;if(e){n=n||i._parsed;for(let r of n){let a=r._stacks;if(!a||a[e]===void 0||a[e][t]===void 0)return;delete a[e][t],a[e]._visualValues!==void 0&&a[e]._visualValues[t]!==void 0&&delete a[e]._visualValues[t]}}}var no=i=>i==="reset"||i==="none",Wl=(i,n)=>n?i:Object.assign({},i),mf=(i,n,t)=>i&&!n.hidden&&n._stacked&&{keys:Lc(t,!0),values:null},Oe=(()=>{class i{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=eo(t.vScale,t),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(t){this.index!==t&&Gi(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,r=this.getDataset(),a=(h,f,m,p)=>h==="x"?f:h==="r"?p:m,o=e.xAxisID=N(r.xAxisID,io(t,"x")),s=e.yAxisID=N(r.yAxisID,io(t,"y")),l=e.rAxisID=N(r.rAxisID,io(t,"r")),c=e.indexAxis,d=e.iAxisID=a(c,o,s,l),u=e.vAxisID=a(c,s,o,l);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(l),e.iScale=this.getScaleForId(d),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ra(this._data,this),t._stacked&&Gi(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(j(e)){let a=this._cachedMeta;this._data=lf(e,a)}else if(r!==e){if(r){Ra(r,this);let a=this._cachedMeta;Gi(a),a._parsed=[]}e&&Object.isExtensible(e)&&gl(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,r=this.getDataset(),a=!1;this._dataCheck();let o=e._stacked;e._stacked=eo(e.vScale,e),e.stack!==r.stack&&(a=!0,Gi(e),e.stack=r.stack),this._resyncElements(t),(a||o!==e._stacked)&&(Nl(this,e._parsed),e._stacked=eo(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:r,_data:a}=this,{iScale:o,_stacked:s}=r,l=o.axis,c=t===0&&e===a.length?!0:r._sorted,d=t>0&&r._parsed[t-1],u,h,f;if(this._parsing===!1)r._parsed=a,r._sorted=!0,f=a;else{et(a[t])?f=this.parseArrayData(r,a,t,e):j(a[t])?f=this.parseObjectData(r,a,t,e):f=this.parsePrimitiveData(r,a,t,e);let m=()=>h[l]===null||d&&h[l]<d[l];for(u=0;u<e;++u)r._parsed[u+t]=h=f[u],c&&(m()&&(c=!1),d=h);r._sorted=c}s&&Nl(this,f)}parsePrimitiveData(t,e,r,a){let{iScale:o,vScale:s}=t,l=o.axis,c=s.axis,d=o.getLabels(),u=o===s,h=new Array(a),f,m,p;for(f=0,m=a;f<m;++f)p=f+r,h[f]={[l]:u||o.parse(d[p],p),[c]:s.parse(e[p],p)};return h}parseArrayData(t,e,r,a){let{xScale:o,yScale:s}=t,l=new Array(a),c,d,u,h;for(c=0,d=a;c<d;++c)u=c+r,h=e[u],l[c]={x:o.parse(h[0],u),y:s.parse(h[1],u)};return l}parseObjectData(t,e,r,a){let{xScale:o,yScale:s}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(a),u,h,f,m;for(u=0,h=a;u<h;++u)f=u+r,m=e[f],d[u]={x:o.parse(ce(m,l),f),y:s.parse(ce(m,c),f)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,r){let a=this.chart,o=this._cachedMeta,s=e[t.axis],l={keys:Lc(a,!0),values:e._stacks[t.axis]._visualValues};return Bl(l,s,o.index,{mode:r})}updateRangeFromParsed(t,e,r,a){let o=r[e.axis],s=o===null?NaN:o,l=a&&r._stacks[e.axis];a&&l&&(a.values=l,s=Bl(a,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){let r=this._cachedMeta,a=r._parsed,o=r._sorted&&t===r.iScale,s=a.length,l=this._getOtherScale(t),c=mf(e,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=df(l),f,m;function p(){m=a[f];let g=m[l.axis];return!at(m[t.axis])||u>g||h<g}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(d,t,m,c),o));++f);if(o){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(d,t,m,c);break}}return d}getAllParsedValues(t){let e=this._cachedMeta._parsed,r=[],a,o,s;for(a=0,o=e.length;a<o;++a)s=e[a][t.axis],at(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,r=e.iScale,a=e.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:a?""+a.getLabelForValue(o[a.axis]):""}}_update(t){let e=this._cachedMeta;this.update(t||"default"),e._clip=sf(N(this.options.clip,of(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,r=this._cachedMeta,a=r.data||[],o=e.chartArea,s=[],l=this._drawStart||0,c=this._drawCount||a.length-l,d=this.options.drawActiveElementsOnTop,u;for(r.dataset&&r.dataset.draw(t,o,l,c),u=l;u<l+c;++u){let h=a[u];h.hidden||(h.active&&d?s.push(h):h.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}getStyle(t,e){let r=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,e,r){let a=this.getDataset(),o;if(t>=0&&t<this._cachedMeta.data.length){let s=this._cachedMeta.data[t];o=s.$context||(s.$context=ff(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=a.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=hf(this.chart.getContext(),this.index)),o.dataset=a,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",r){let a=e==="active",o=this._cachedDataOpts,s=t+"-"+e,l=o[s],c=this.enableOptionSharing&&pi(r);if(l)return Wl(l,c);let d=this.chart.config,u=d.datasetElementScopeKeys(this._type,t),h=a?[`${t}Hover`,"hover",t,""]:[t,""],f=d.getOptionScopes(this.getDataset(),u),m=Object.keys(nt.elements[t]),p=()=>this.getContext(r,a,e),g=d.resolveNamedOptions(f,m,p,h);return g.$shared&&(g.$shared=c,o[s]=Object.freeze(Wl(g,c))),g}_resolveAnimations(t,e,r){let a=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,l=o[s];if(l)return l;let c;if(a.options.animation!==!1){let u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),h);c=u.createResolver(f,this.getContext(t,r,e))}let d=new lr(a,c&&c.animations);return c&&c._cacheable&&(o[s]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||no(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let r=this.resolveDataElementOptions(t,e),a=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(e,o)||o!==a;return this.updateSharedOptions(o,e,r),{sharedOptions:o,includeOptions:s}}updateElement(t,e,r,a){no(a)?Object.assign(t,r):this._resolveAnimations(e,a).update(t,r)}updateSharedOptions(t,e,r){t&&!no(e)&&this._resolveAnimations(void 0,e).update(t,r)}_setStyle(t,e,r,a){t.active=a;let o=this.getStyle(e,a);this._resolveAnimations(e,r,a).update(t,{options:!a&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,e,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,r=this._cachedMeta.data;for(let[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];let a=r.length,o=e.length,s=Math.min(o,a);s&&this.parse(0,s),o>a?this._insertElements(a,o-a,t):o<a&&this._removeElements(o,a-o)}_insertElements(t,e,r=!0){let a=this._cachedMeta,o=a.data,s=t+e,l,c=d=>{for(d.length+=e,l=d.length-1;l>=s;l--)d[l]=d[l-e]};for(c(o),l=t;l<s;++l)o[l]=new this.dataElementType;this._parsing&&c(a._parsed),this.parse(t,e),r&&this.updateElements(o,t,e,"reset")}updateElements(t,e,r,a){}_removeElements(t,e){let r=this._cachedMeta;if(this._parsing){let a=r._parsed.splice(t,e);r._stacked&&Gi(r,a)}r.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,r,a]=t;this[e](r,a)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);let r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return i})();function pf(i,n){if(!i._cache.$bar){let t=i.getMatchingVisibleMetas(n),e=[];for(let r=0,a=t.length;r<a;r++)e=e.concat(t[r].controller.getAllParsedValues(i));i._cache.$bar=Ea(e.sort((r,a)=>r-a))}return i._cache.$bar}function gf(i){let n=i.iScale,t=pf(n,i.type),e=n._length,r,a,o,s,l=()=>{o===32767||o===-32768||(pi(s)&&(e=Math.min(e,Math.abs(o-s)||e)),s=o)};for(r=0,a=t.length;r<a;++r)o=n.getPixelForValue(t[r]),l();for(s=void 0,r=0,a=n.ticks.length;r<a;++r)o=n.getPixelForTick(r),l();return e}function bf(i,n,t,e){let r=t.barThickness,a,o;return U(r)?(a=n.min*t.categoryPercentage,o=t.barPercentage):(a=r*e,o=1),{chunk:a/e,ratio:o,start:n.pixels[i]-a/2}}function _f(i,n,t,e){let r=n.pixels,a=r[i],o=i>0?r[i-1]:null,s=i<r.length-1?r[i+1]:null,l=t.categoryPercentage;o===null&&(o=a-(s===null?n.end-n.start:s-a)),s===null&&(s=a+a-o);let c=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/e,ratio:t.barPercentage,start:c}}function vf(i,n,t,e){let r=t.parse(i[0],e),a=t.parse(i[1],e),o=Math.min(r,a),s=Math.max(r,a),l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),n[t.axis]=c,n._custom={barStart:l,barEnd:c,start:r,end:a,min:o,max:s}}function Fc(i,n,t,e){return et(i)?vf(i,n,t,e):n[t.axis]=t.parse(i,e),n}function Hl(i,n,t,e){let r=i.iScale,a=i.vScale,o=r.getLabels(),s=r===a,l=[],c,d,u,h;for(c=t,d=t+e;c<d;++c)h=n[c],u={},u[r.axis]=s||r.parse(o[c],c),l.push(Fc(h,u,a,c));return l}function ro(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function xf(i,n,t){return i!==0?$t(i):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function yf(i){let n,t,e,r,a;return i.horizontal?(n=i.base>i.x,t="left",e="right"):(n=i.base<i.y,t="bottom",e="top"),n?(r="end",a="start"):(r="start",a="end"),{start:t,end:e,reverse:n,top:r,bottom:a}}function kf(i,n,t,e){let r=n.borderSkipped,a={};if(!r){i.borderSkipped=a;return}if(r===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:o,end:s,reverse:l,top:c,bottom:d}=yf(i);r==="middle"&&t&&(i.enableBorderRadius=!0,(t._top||0)===e?r=c:(t._bottom||0)===e?r=d:(a[Vl(d,o,s,l)]=!0,r=c)),a[Vl(r,o,s,l)]=!0,i.borderSkipped=a}function Vl(i,n,t,e){return e?(i=wf(i,n,t),i=Yl(i,t,n)):i=Yl(i,n,t),i}function wf(i,n,t){return i===n?t:i===t?n:i}function Yl(i,n,t){return i==="start"?n:i==="end"?t:i}function Cf(i,{inflateAmount:n},t){i.inflateAmount=n==="auto"?t===1?.33:0:n}var Tf=(()=>{class i extends Oe{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,r,a){return Hl(t,e,r,a)}parseArrayData(t,e,r,a){return Hl(t,e,r,a)}parseObjectData(t,e,r,a){let{iScale:o,vScale:s}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=o.axis==="x"?l:c,u=s.axis==="x"?l:c,h=[],f,m,p,g;for(f=r,m=r+a;f<m;++f)g=e[f],p={},p[o.axis]=o.parse(ce(g,d),f),h.push(Fc(ce(g,u),p,s,f));return h}updateRangeFromParsed(t,e,r,a){super.updateRangeFromParsed(t,e,r,a);let o=r._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let e=this._cachedMeta,{iScale:r,vScale:a}=e,o=this.getParsed(t),s=o._custom,l=ro(s)?"["+s.start+", "+s.end+"]":""+a.getLabelForValue(o[a.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,r,a){let o=a==="reset",{index:s,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:f}=this._getSharedOptions(e,a);for(let m=e;m<e+r;m++){let p=this.getParsed(m),g=o||U(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,u),_=(p._stacks||{})[l.axis],k={horizontal:d,base:g.base,enableBorderRadius:!_||ro(p._custom)||s===_._top||s===_._bottom,x:d?g.head:b.center,y:d?b.center:g.head,height:d?b.size:Math.abs(g.size),width:d?Math.abs(g.size):b.size};f&&(k.options=h||this.resolveDataElementOptions(m,t[m].active?"active":a));let C=k.options||t[m].options;kf(k,C,_,s),Cf(k,C,u.ratio),this.updateElement(t[m],m,k,a)}}_getStacks(t,e){let{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,s=[],l=this._cachedMeta.controller.getParsed(e),c=l&&l[r.axis],d=u=>{let h=u._parsed.find(m=>m[r.axis]===c),f=h&&h[u.vScale.axis];if(U(f)||isNaN(f))return!0};for(let u of a)if(!(e!==void 0&&d(u))&&((o===!1||s.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&s.push(u.stack),u.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)t[N(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,r){let a=this._getStacks(t,r),o=e!==void 0?a.indexOf(e):-1;return o===-1?a.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,r=e.iScale,a=[],o,s;for(o=0,s=e.data.length;o<s;++o)a.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));let l=t.barThickness;return{min:l||gf(e),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:r,index:a},options:{base:o,minBarLength:s}}=this,l=o||0,c=this.getParsed(t),d=c._custom,u=ro(d),h=c[e.axis],f=0,m=r?this.applyStack(e,c,r):h,p,g;m!==h&&(f=m-h,m=h),u&&(h=d.barStart,m=d.barEnd-d.barStart,h!==0&&$t(h)!==$t(d.barEnd)&&(f=0),f+=h);let b=!U(o)&&!u?o:f,_=e.getPixelForValue(b);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(f+m):p=_,g=p-_,Math.abs(g)<s){g=xf(g,e,l)*s,h===l&&(_-=g/2);let k=e.getPixelForDecimal(0),C=e.getPixelForDecimal(1),v=Math.min(k,C),y=Math.max(k,C);_=Math.max(Math.min(_,y),v),p=_+g,r&&!u&&(c._stacks[e.axis]._visualValues[a]=e.getValueForPixel(p)-e.getValueForPixel(_))}if(_===e.getPixelForValue(l)){let k=$t(g)*e.getLineWidthForValue(l)/2;_+=k,g-=k}return{size:g,base:_,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){let r=e.scale,a=this.options,o=a.skipNull,s=N(a.maxBarThickness,1/0),l,c,d=this._getAxisCount();if(e.grouped){let u=o?this._getStackCount(t):e.stackCount,h=a.barThickness==="flex"?_f(t,e,a,u*d):bf(t,e,a,u*d),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(N(f,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+m;l=h.start+h.chunk*p+h.chunk/2,c=Math.min(s,h.chunk*h.ratio)}else l=r.getPixelForValue(this.getParsed(t)[r.axis],t),c=Math.min(s,e.min*e.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){let t=this._cachedMeta,e=t.vScale,r=t.data,a=r.length,o=0;for(;o<a;++o)this.getParsed(o)[e.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}return i})(),Mf=(()=>{class i extends Oe{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,r,a){let o=super.parsePrimitiveData(t,e,r,a);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+r).radius;return o}parseArrayData(t,e,r,a){let o=super.parseArrayData(t,e,r,a);for(let s=0;s<o.length;s++){let l=e[r+s];o[s]._custom=N(l[2],this.resolveDataElementOptions(s+r).radius)}return o}parseObjectData(t,e,r,a){let o=super.parseObjectData(t,e,r,a);for(let s=0;s<o.length;s++){let l=e[r+s];o[s]._custom=N(l&&l.r&&+l.r,this.resolveDataElementOptions(s+r).radius)}return o}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:o}=e,s=this.getParsed(t),l=a.getLabelForValue(s.x),c=o.getLabelForValue(s.y),d=s._custom;return{label:r[t]||"",value:"("+l+", "+c+(d?", "+d:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,a),u=s.axis,h=l.axis;for(let f=e;f<e+r;f++){let m=t[f],p=!o&&this.getParsed(f),g={},b=g[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),_=g[h]=o?l.getBasePixel():l.getPixelForValue(p[h]);g.skip=isNaN(b)||isNaN(_),d&&(g.options=c||this.resolveDataElementOptions(f,m.active?"active":a),o&&(g.options.radius=0)),this.updateElement(m,f,g,a)}}resolveDataElementOptions(t,e){let r=this.getParsed(t),a=super.resolveDataElementOptions(t,e);a.$shared&&(a=Object.assign({},a,{$shared:!1}));let o=a.radius;return e!=="active"&&(a.radius=0),a.radius+=N(r&&r._custom,o),a}}return i})();function Df(i,n,t){let e=1,r=1,a=0,o=0;if(n<it){let s=i,l=s+n,c=Math.cos(s),d=Math.sin(s),u=Math.cos(l),h=Math.sin(l),f=(k,C,v)=>bi(k,s,l,!0)?1:Math.max(C,C*t,v,v*t),m=(k,C,v)=>bi(k,s,l,!0)?-1:Math.min(C,C*t,v,v*t),p=f(0,c,u),g=f(lt,d,h),b=m(Q,c,u),_=m(Q+lt,d,h);e=(p-b)/2,r=(g-_)/2,a=-(p+b)/2,o=-(g+_)/2}return{ratioX:e,ratioY:r,offsetX:a,offsetY:o}}var Eo=(()=>{class i extends Oe{static id="doughnut";static 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"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data,{labels:{pointStyle:r,textAlign:a,color:o,useBorderRadius:s,borderRadius:l}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((c,d)=>{let h=t.getDatasetMeta(0).controller.getStyle(d);return{text:c,fillStyle:h.backgroundColor,fontColor:o,hidden:!t.getDataVisibility(d),lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:h.borderWidth,strokeStyle:h.borderColor,textAlign:a,pointStyle:r,borderRadius:s&&(l||h.borderRadius),index:d}}):[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let o=c=>+r[c];if(j(r[t])){let{key:c="value"}=this._parsing;o=d=>+ce(r[d],c)}let s,l;for(s=t,l=t+e;s<l;++s)a._parsed[s]=o(s)}}_getRotation(){return Ht(this.options.rotation-90)}_getCircumference(){return Ht(this.options.circumference)}_getRotationExtents(){let t=it,e=-it;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let a=this.chart.getDatasetMeta(r).controller,o=a._getRotation(),s=a._getCircumference();t=Math.min(t,o),e=Math.max(e,o+s)}return{rotation:t,circumference:e-t}}update(t){let e=this.chart,{chartArea:r}=e,a=this._cachedMeta,o=a.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-s)/2,0),c=Math.min(sl(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:p,offsetY:g}=Df(h,u,c),b=(r.width-s)/f,_=(r.height-s)/m,k=Math.max(Math.min(b,_)/2,0),C=Da(this.options.radius,k),v=Math.max(C*c,0),y=(C-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=g*C,a.total=this.calculateTotal(),this.outerRadius=C-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*d,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){let r=this.options,a=this._cachedMeta,o=this._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||a._parsed[t]===null||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*o/it)}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,l=s.chartArea,d=s.options.animation,u=(l.left+l.right)/2,h=(l.top+l.bottom)/2,f=o&&d.animateScale,m=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(e,a),_=this._getRotation(),k;for(k=0;k<e;++k)_+=this._circumference(k,o);for(k=e;k<e+r;++k){let C=this._circumference(k,o),v=t[k],y={x:u+this.offsetX,y:h+this.offsetY,startAngle:_,endAngle:_+C,circumference:C,outerRadius:p,innerRadius:m};b&&(y.options=g||this.resolveDataElementOptions(k,v.active?"active":a)),_+=C,this.updateElement(v,k,y,a)}}calculateTotal(){let t=this._cachedMeta,e=t.data,r=0,a;for(a=0;a<e.length;a++){let o=t._parsed[a];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(a)&&!e[a].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?it*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart,a=r.data.labels||[],o=_i(e._parsed[t],r.options.locale);return{label:a[t]||"",value:o}}getMaxBorderWidth(t){let e=0,r=this.chart,a,o,s,l,c;if(!t){for(a=0,o=r.data.datasets.length;a<o;++a)if(r.isDatasetVisible(a)){s=r.getDatasetMeta(a),t=s.data,l=s.controller;break}}if(!t)return 0;for(a=0,o=t.length;a<o;++a)c=l.resolveDataElementOptions(a),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let r=0,a=t.length;r<a;++r){let o=this.resolveDataElementOptions(r);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(e+=this._getRingWeight(r));return e}_getRingWeight(t){return Math.max(N(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return i})(),Pf=(()=>{class i extends Oe{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:r,data:a=[],_dataset:o}=e,s=this.chart._animationsDisabled,{start:l,count:c}=Ba(e,a,s);this._drawStart=l,this._drawCount=c,za(e)&&(l=0,c=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=a;let d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:d},t),this.updateElements(a,l,c,t)}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,a),f=s.axis,m=l.axis,{spanGaps:p,segment:g}=this.options,b=Ve(p)?p:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||a==="none",k=e+r,C=t.length,v=e>0&&this.getParsed(e-1);for(let y=0;y<C;++y){let P=t[y],D=_?P:{};if(y<e||y>=k){D.skip=!0;continue}let S=this.getParsed(y),L=U(S[m]),B=D[f]=s.getPixelForValue(S[f],y),W=D[m]=o||L?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,S,c):S[m],y);D.skip=isNaN(B)||isNaN(W)||L,D.stop=y>0&&Math.abs(S[f]-v[f])>b,g&&(D.parsed=S,D.raw=d.data[y]),h&&(D.options=u||this.resolveDataElementOptions(y,P.active?"active":a)),_||this.updateElement(P,y,D,a),v=S}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,r=e.options&&e.options.borderWidth||0,a=t.data||[];if(!a.length)return r;let o=a[0].size(this.resolveDataElementOptions(0)),s=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,o,s)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return i})(),Bc=(()=>{class i extends Oe{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:r,color:a}}=t.legend.options;return e.labels.map((o,s)=>{let c=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:a,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart,a=r.data.labels||[],o=_i(e._parsed[t].r,r.options.locale);return{label:a[t]||"",value:o}}parseObjectData(t,e,r,a){return $a.bind(this)(t,e,r,a)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,a)=>{let o=this.getParsed(a).r;!isNaN(o)&&this.chart.getDataVisibility(a)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,r=t.options,a=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(a/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),l=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,c=s.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,h=d.yCenter,f=d.getIndexAngle(0)-.5*Q,m=f,p,g=360/this.countVisibleElements();for(p=0;p<e;++p)m+=this._computeAngle(p,a,g);for(p=e;p<e+r;p++){let b=t[p],_=m,k=m+this._computeAngle(p,a,g),C=s.getDataVisibility(p)?d.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=k,o&&(c.animateScale&&(C=0),c.animateRotate&&(_=k=f));let v={x:u,y:h,innerRadius:0,outerRadius:C,startAngle:_,endAngle:k,options:this.resolveDataElementOptions(p,b.active?"active":a)};this.updateElement(b,p,v,a)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((r,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&e++}),e}_computeAngle(t,e,r){return this.chart.getDataVisibility(t)?Ht(this.resolveDataElementOptions(t,e).angle||r):0}}return i})(),Sf=(()=>{class i extends Eo{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return i})(),Of=(()=>{class i extends Oe{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let e=this._cachedMeta.vScale,r=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(r[e.axis])}}parseObjectData(t,e,r,a){return $a.bind(this)(t,e,r,a)}update(t){let e=this._cachedMeta,r=e.dataset,a=e.data||[],o=e.iScale.getLabels();if(r.points=a,t!=="resize"){let s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);let l={_loop:!0,_fullLoop:o.length===a.length,options:s};this.updateElement(r,void 0,l,t)}this.updateElements(a,0,a.length,t)}updateElements(t,e,r,a){let o=this._cachedMeta.rScale,s=a==="reset";for(let l=e;l<e+r;l++){let c=t[l],d=this.resolveDataElementOptions(l,c.active?"active":a),u=o.getPointPositionForValue(l,this.getParsed(l).r),h=s?o.xCenter:u.x,f=s?o.yCenter:u.y,m={x:h,y:f,angle:u.angle,skip:isNaN(h)||isNaN(f),options:d};this.updateElement(c,l,m,a)}}}return i})(),If=(()=>{class i extends Oe{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){let e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:o}=e,s=this.getParsed(t),l=a.getLabelForValue(s.x),c=o.getLabelForValue(s.y);return{label:r[t]||"",value:"("+l+", "+c+")"}}update(t){let e=this._cachedMeta,{data:r=[]}=e,a=this.chart._animationsDisabled,{start:o,count:s}=Ba(e,r,a);if(this._drawStart=o,this._drawCount=s,za(e)&&(o=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=e;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=r;let d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(l,void 0,{animated:!a,options:d},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(r,o,s,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(e,a),h=this.getSharedOptions(u),f=this.includeOptions(a,h),m=s.axis,p=l.axis,{spanGaps:g,segment:b}=this.options,_=Ve(g)?g:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||o||a==="none",C=e>0&&this.getParsed(e-1);for(let v=e;v<e+r;++v){let y=t[v],P=this.getParsed(v),D=k?y:{},S=U(P[p]),L=D[m]=s.getPixelForValue(P[m],v),B=D[p]=o||S?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,P,c):P[p],v);D.skip=isNaN(L)||isNaN(B)||S,D.stop=v>0&&Math.abs(P[m]-C[m])>_,b&&(D.parsed=P,D.raw=d.data[v]),f&&(D.options=h||this.resolveDataElementOptions(v,y.active?"active":a)),k||this.updateElement(y,v,D,a),C=P}this.updateSharedOptions(h,a,u)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let l=0;for(let c=e.length-1;c>=0;--c)l=Math.max(l,e[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let r=t.dataset,a=r.options&&r.options.borderWidth||0;if(!e.length)return a;let o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(a,o,s)/2}}return i})(),Af=Object.freeze({__proto__:null,BarController:Tf,BubbleController:Mf,DoughnutController:Eo,LineController:Pf,PieController:Sf,PolarAreaController:Bc,RadarController:Of,ScatterController:If});function Ue(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var po=class i{static override(n){Object.assign(i.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return Ue()}parse(){return Ue()}format(){return Ue()}add(){return Ue()}diff(){return Ue()}startOf(){return Ue()}endOf(){return Ue()}},Lo={_date:po};function Rf(i,n,t,e){let{controller:r,data:a,_sorted:o}=i,s=r._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(s&&n===s.axis&&n!=="r"&&o&&a.length){let c=s._reversePixels?fl:Kt;if(e){if(r._sharedOptions){let d=a[0],u=typeof d.getRange=="function"&&d.getRange(n);if(u){let h=c(a,n,t-u),f=c(a,n,t+u);return{lo:h.lo,hi:f.hi}}}}else{let d=c(a,n,t);if(l){let{vScale:u}=r._cachedMeta,{_parsed:h}=i,f=h.slice(0,d.lo+1).reverse().findIndex(p=>!U(p[u.axis]));d.lo-=Math.max(0,f);let m=h.slice(d.hi).findIndex(p=>!U(p[u.axis]));d.hi+=Math.max(0,m)}return d}}return{lo:0,hi:a.length-1}}function sn(i,n,t,e,r){let a=i.getSortedVisibleDatasetMetas(),o=t[n];for(let s=0,l=a.length;s<l;++s){let{index:c,data:d}=a[s],{lo:u,hi:h}=Rf(a[s],n,o,r);for(let f=u;f<=h;++f){let m=d[f];m.skip||e(m,c,f)}}}function Ef(i){let n=i.indexOf("x")!==-1,t=i.indexOf("y")!==-1;return function(e,r){let a=n?Math.abs(e.x-r.x):0,o=t?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function ao(i,n,t,e,r){let a=[];return!r&&!i.isPointInArea(n)||sn(i,t,n,function(s,l,c){!r&&!Zt(s,i.chartArea,0)||s.inRange(n.x,n.y,e)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function Lf(i,n,t,e){let r=[];function a(o,s,l){let{startAngle:c,endAngle:d}=o.getProps(["startAngle","endAngle"],e),{angle:u}=Aa(o,{x:n.x,y:n.y});bi(u,c,d)&&r.push({element:o,datasetIndex:s,index:l})}return sn(i,t,n,a),r}function Ff(i,n,t,e,r,a){let o=[],s=Ef(t),l=Number.POSITIVE_INFINITY;function c(d,u,h){let f=d.inRange(n.x,n.y,r);if(e&&!f)return;let m=d.getCenterPoint(r);if(!(!!a||i.isPointInArea(m))&&!f)return;let g=s(n,m);g<l?(o=[{element:d,datasetIndex:u,index:h}],l=g):g===l&&o.push({element:d,datasetIndex:u,index:h})}return sn(i,t,n,c),o}function oo(i,n,t,e,r,a){return!a&&!i.isPointInArea(n)?[]:t==="r"&&!e?Lf(i,n,t,r):Ff(i,n,t,e,r,a)}function Ul(i,n,t,e,r){let a=[],o=t==="x"?"inXRange":"inYRange",s=!1;return sn(i,t,n,(l,c,d)=>{l[o]&&l[o](n[t],r)&&(a.push({element:l,datasetIndex:c,index:d}),s=s||l.inRange(n.x,n.y,r))}),e&&!s?[]:a}var Bf={evaluateInteractionItems:sn,modes:{index(i,n,t,e){let r=Pe(n,i),a=t.axis||"x",o=t.includeInvisible||!1,s=t.intersect?ao(i,r,a,e,o):oo(i,r,a,!1,e,o),l=[];return s.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let d=s[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(i,n,t,e){let r=Pe(n,i),a=t.axis||"xy",o=t.includeInvisible||!1,s=t.intersect?ao(i,r,a,e,o):oo(i,r,a,!1,e,o);if(s.length>0){let l=s[0].datasetIndex,c=i.getDatasetMeta(l).data;s=[];for(let d=0;d<c.length;++d)s.push({element:c[d],datasetIndex:l,index:d})}return s},point(i,n,t,e){let r=Pe(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return ao(i,r,a,e,o)},nearest(i,n,t,e){let r=Pe(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return oo(i,r,a,t.intersect,e,o)},x(i,n,t,e){let r=Pe(n,i);return Ul(i,r,"x",t.intersect,e)},y(i,n,t,e){let r=Pe(n,i);return Ul(i,r,"y",t.intersect,e)}}},zc=["left","top","right","bottom"];function Ki(i,n){return i.filter(t=>t.pos===n)}function jl(i,n){return i.filter(t=>zc.indexOf(t.pos)===-1&&t.box.axis===n)}function Zi(i,n){return i.sort((t,e)=>{let r=n?e:t,a=n?t:e;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function zf(i){let n=[],t,e,r,a,o,s;for(t=0,e=(i||[]).length;t<e;++t)r=i[t],{position:a,options:{stack:o,stackWeight:s=1}}=r,n.push({index:t,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&a+o,stackWeight:s});return n}function Nf(i){let n={};for(let t of i){let{stack:e,pos:r,stackWeight:a}=t;if(!e||!zc.includes(r))continue;let o=n[e]||(n[e]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return n}function Wf(i,n){let t=Nf(i),{vBoxMaxWidth:e,hBoxMaxHeight:r}=n,a,o,s;for(a=0,o=i.length;a<o;++a){s=i[a];let{fullSize:l}=s.box,c=t[s.stack],d=c&&s.stackWeight/c.weight;s.horizontal?(s.width=d?d*e:l&&n.availableWidth,s.height=r):(s.width=e,s.height=d?d*r:l&&n.availableHeight)}return t}function Hf(i){let n=zf(i),t=Zi(n.filter(c=>c.box.fullSize),!0),e=Zi(Ki(n,"left"),!0),r=Zi(Ki(n,"right")),a=Zi(Ki(n,"top"),!0),o=Zi(Ki(n,"bottom")),s=jl(n,"x"),l=jl(n,"y");return{fullSize:t,leftAndTop:e.concat(a),rightAndBottom:r.concat(l).concat(o).concat(s),chartArea:Ki(n,"chartArea"),vertical:e.concat(r).concat(l),horizontal:a.concat(o).concat(s)}}function ql(i,n,t,e){return Math.max(i[t],n[t])+Math.max(i[e],n[e])}function Nc(i,n){i.top=Math.max(i.top,n.top),i.left=Math.max(i.left,n.left),i.bottom=Math.max(i.bottom,n.bottom),i.right=Math.max(i.right,n.right)}function Vf(i,n,t,e){let{pos:r,box:a}=t,o=i.maxPadding;if(!j(r)){t.size&&(i[r]-=t.size);let u=e[t.stack]||{size:0,count:1};u.size=Math.max(u.size,t.horizontal?a.height:a.width),t.size=u.size/u.count,i[r]+=t.size}a.getPadding&&Nc(o,a.getPadding());let s=Math.max(0,n.outerWidth-ql(o,i,"left","right")),l=Math.max(0,n.outerHeight-ql(o,i,"top","bottom")),c=s!==i.w,d=l!==i.h;return i.w=s,i.h=l,t.horizontal?{same:c,other:d}:{same:d,other:c}}function Yf(i){let n=i.maxPadding;function t(e){let r=Math.max(n[e]-i[e],0);return i[e]+=r,r}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function Uf(i,n){let t=n.maxPadding;function e(r){let a={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{a[o]=Math.max(n[o],t[o])}),a}return e(i?["left","right"]:["top","bottom"])}function en(i,n,t,e){let r=[],a,o,s,l,c,d;for(a=0,o=i.length,c=0;a<o;++a){s=i[a],l=s.box,l.update(s.width||n.w,s.height||n.h,Uf(s.horizontal,n));let{same:u,other:h}=Vf(n,t,s,e);c|=u&&r.length,d=d||h,l.fullSize||r.push(s)}return c&&en(r,n,t,e)||d}function tr(i,n,t,e,r){i.top=t,i.left=n,i.right=n+e,i.bottom=t+r,i.width=e,i.height=r}function $l(i,n,t,e){let r=t.padding,{x:a,y:o}=n;for(let s of i){let l=s.box,c=e[s.stack]||{count:1,placed:0,weight:1},d=s.stackWeight/c.weight||1;if(s.horizontal){let u=n.w*d,h=c.size||l.height;pi(c.start)&&(o=c.start),l.fullSize?tr(l,r.left,o,t.outerWidth-r.right-r.left,h):tr(l,n.left+c.placed,o,u,h),c.start=o,c.placed+=u,o=l.bottom}else{let u=n.h*d,h=c.size||l.width;pi(c.start)&&(a=c.start),l.fullSize?tr(l,a,r.top,h,t.outerHeight-r.bottom-r.top):tr(l,a,n.top+c.placed,h,u),c.start=a,c.placed+=u,a=l.right}}n.x=a,n.y=o}var wt={addBox(i,n){i.boxes||(i.boxes=[]),n.fullSize=n.fullSize||!1,n.position=n.position||"top",n.weight=n.weight||0,n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]},i.boxes.push(n)},removeBox(i,n){let t=i.boxes?i.boxes.indexOf(n):-1;t!==-1&&i.boxes.splice(t,1)},configure(i,n,t){n.fullSize=t.fullSize,n.position=t.position,n.weight=t.weight},update(i,n,t,e){if(!i)return;let r=xt(i.options.layout.padding),a=Math.max(n-r.width,0),o=Math.max(t-r.height,0),s=Hf(i.boxes),l=s.vertical,c=s.horizontal;G(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,u=Object.freeze({outerWidth:n,outerHeight:t,padding:r,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/d,hBoxMaxHeight:o/2}),h=Object.assign({},r);Nc(h,xt(e));let f=Object.assign({maxPadding:h,w:a,h:o,x:r.left,y:r.top},r),m=Wf(l.concat(c),u);en(s.fullSize,f,u,m),en(l,f,u,m),en(c,f,u,m)&&en(l,f,u,m),Yf(f),$l(s.leftAndTop,f,u,m),f.x+=f.w,f.y+=f.h,$l(s.rightAndBottom,f,u,m),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},G(s.chartArea,p=>{let g=p.box;Object.assign(g,i.chartArea),g.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},cr=class{acquireContext(n,t){}releaseContext(n){return!1}addEventListener(n,t,e){}removeEventListener(n,t,e){}getDevicePixelRatio(){return 1}getMaximumSize(n,t,e,r){return t=Math.max(0,t||n.width),e=e||n.height,{width:t,height:Math.max(0,r?Math.floor(t/r):e)}}isAttached(n){return!0}updateConfig(n){}},go=class extends cr{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}},or="$chartjs",jf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ql=i=>i===null||i==="";function qf(i,n){let t=i.style,e=i.getAttribute("height"),r=i.getAttribute("width");if(i[or]={initial:{height:e,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Ql(r)){let a=Xa(i,"width");a!==void 0&&(i.width=a)}if(Ql(e))if(i.style.height==="")i.height=i.width/(n||2);else{let a=Xa(i,"height");a!==void 0&&(i.height=a)}return i}var Wc=Ol?{passive:!0}:!1;function $f(i,n,t){i&&i.addEventListener(n,t,Wc)}function Qf(i,n,t){i&&i.canvas&&i.canvas.removeEventListener(n,t,Wc)}function Xf(i,n){let t=jf[i.type]||i.type,{x:e,y:r}=Pe(i,n);return{type:t,chart:n,native:i,x:e!==void 0?e:null,y:r!==void 0?r:null}}function dr(i,n){for(let t of i)if(t===n||t.contains(n))return!0}function Gf(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||dr(s.addedNodes,e),o=o&&!dr(s.removedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function Kf(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||dr(s.removedNodes,e),o=o&&!dr(s.addedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}var rn=new Map,Xl=0;function Hc(){let i=window.devicePixelRatio;i!==Xl&&(Xl=i,rn.forEach((n,t)=>{t.currentDevicePixelRatio!==i&&n()}))}function Zf(i,n){rn.size||window.addEventListener("resize",Hc),rn.set(i,n)}function Jf(i){rn.delete(i),rn.size||window.removeEventListener("resize",Hc)}function tm(i,n,t){let e=i.canvas,r=e&&Zn(e);if(!r)return;let a=Fa((s,l)=>{let c=r.clientWidth;t(s,l),c<r.clientWidth&&t()},window),o=new ResizeObserver(s=>{let l=s[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||a(c,d)});return o.observe(r),Zf(i,a),o}function so(i,n,t){t&&t.disconnect(),n==="resize"&&Jf(i)}function em(i,n,t){let e=i.canvas,r=Fa(a=>{i.ctx!==null&&t(Xf(a,i))},i);return $f(e,n,r),r}var bo=class extends cr{acquireContext(n,t){let e=n&&n.getContext&&n.getContext("2d");return e&&e.canvas===n?(qf(n,t),e):null}releaseContext(n){let t=n.canvas;if(!t[or])return!1;let e=t[or].initial;["height","width"].forEach(a=>{let o=e[a];U(o)?t.removeAttribute(a):t.setAttribute(a,o)});let r=e.style||{};return Object.keys(r).forEach(a=>{t.style[a]=r[a]}),t.width=t.width,delete t[or],!0}addEventListener(n,t,e){this.removeEventListener(n,t);let r=n.$proxies||(n.$proxies={}),o={attach:Gf,detach:Kf,resize:tm}[t]||em;r[t]=o(n,t,e)}removeEventListener(n,t){let e=n.$proxies||(n.$proxies={}),r=e[t];if(!r)return;({attach:so,detach:so,resize:so}[t]||Qf)(n,t,r),e[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,e,r){return Sl(n,t,e,r)}isAttached(n){let t=n&&Zn(n);return!!(t&&t.isConnected)}};function im(i){return!Kn()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?go:bo}var Qt=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(n){let{x:t,y:e}=this.getProps(["x","y"],n);return{x:t,y:e}}hasValue(){return Ve(this.x)&&Ve(this.y)}getProps(n,t){let e=this.$animations;if(!t||!e)return this;let r={};return n.forEach(a=>{r[a]=e[a]&&e[a].active()?e[a]._to:this[a]}),r}};function nm(i,n){let t=i.options.ticks,e=rm(i),r=Math.min(t.maxTicksLimit||e,e),a=t.major.enabled?om(n):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>r)return sm(n,c,a,o/r),c;let d=am(a,n,r);if(o>0){let u,h,f=o>1?Math.round((l-s)/(o-1)):null;for(er(n,c,d,U(f)?0:s-f,s),u=0,h=o-1;u<h;u++)er(n,c,d,a[u],a[u+1]);return er(n,c,d,l,U(f)?n.length:l+f),c}return er(n,c,d),c}function rm(i){let n=i.options.offset,t=i._tickSize(),e=i._length/t+(n?0:1),r=i._maxLength/t;return Math.floor(Math.min(e,r))}function am(i,n,t){let e=lm(i),r=n.length/t;if(!e)return Math.max(r,1);let a=dl(e);for(let o=0,s=a.length-1;o<s;o++){let l=a[o];if(l>r)return l}return Math.max(r,1)}function om(i){let n=[],t,e;for(t=0,e=i.length;t<e;t++)i[t].major&&n.push(t);return n}function sm(i,n,t,e){let r=0,a=t[0],o;for(e=Math.ceil(e),o=0;o<i.length;o++)o===a&&(n.push(i[o]),r++,a=t[r*e])}function er(i,n,t,e,r){let a=N(e,0),o=Math.min(N(r,i.length),i.length),s=0,l,c,d;for(t=Math.ceil(t),r&&(l=r-e,t=l/Math.floor(l/t)),d=a;d<0;)s++,d=Math.round(a+s*t);for(c=Math.max(a,0);c<o;c++)c===d&&(n.push(i[c]),s++,d=Math.round(a+s*t))}function lm(i){let n=i.length,t,e;if(n<2)return!1;for(e=i[0],t=1;t<n;++t)if(i[t]-i[t-1]!==e)return!1;return e}var cm=i=>i==="left"?"right":i==="right"?"left":i,Gl=(i,n,t)=>n==="top"||n==="left"?i[n]+t:i[n]-t,Kl=(i,n)=>Math.min(n||i,i);function Zl(i,n){let t=[],e=i.length/n,r=i.length,a=0;for(;a<r;a+=e)t.push(i[Math.floor(a)]);return t}function dm(i,n,t){let e=i.ticks.length,r=Math.min(n,e-1),a=i._startPixel,o=i._endPixel,s=1e-6,l=i.getPixelForTick(r),c;if(!(t&&(e===1?c=Math.max(l-a,o-l):n===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(r-1))/2,l+=r<n?c:-c,l<a-s||l>o+s)))return l}function um(i,n){G(i,t=>{let e=t.gc,r=e.length/2,a;if(r>n){for(a=0;a<r;++a)delete t.data[e[a]];e.splice(0,r)}})}function Ji(i){return i.drawTicks?i.tickLength:0}function Jl(i,n){if(!i.display)return 0;let t=dt(i.font,n),e=xt(i.padding);return(et(i.text)?i.text.length:1)*t.lineHeight+e.height}function hm(i,n){return de(i,{scale:n,type:"scale"})}function fm(i,n,t){return de(i,{tick:t,index:n,type:"tick"})}function mm(i,n,t){let e=qn(i);return(t&&n!=="right"||!t&&n==="right")&&(e=cm(e)),e}function pm(i,n,t,e){let{top:r,left:a,bottom:o,right:s,chart:l}=i,{chartArea:c,scales:d}=l,u=0,h,f,m,p=o-r,g=s-a;if(i.isHorizontal()){if(f=vt(e,a,s),j(t)){let b=Object.keys(t)[0],_=t[b];m=d[b].getPixelForValue(_)+p-n}else t==="center"?m=(c.bottom+c.top)/2+p-n:m=Gl(i,t,n);h=s-a}else{if(j(t)){let b=Object.keys(t)[0],_=t[b];f=d[b].getPixelForValue(_)-g+n}else t==="center"?f=(c.left+c.right)/2-g+n:f=Gl(i,t,n);m=vt(e,o,r),u=t==="left"?-lt:lt}return{titleX:f,titleY:m,maxWidth:h,rotation:u}}var qe=class i extends Qt{constructor(n){super(),this.id=n.id,this.type=n.type,this.options=void 0,this.ctx=n.ctx,this.chart=n.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(n){this.options=n.setContext(this.getContext()),this.axis=n.axis,this._userMin=this.parse(n.min),this._userMax=this.parse(n.max),this._suggestedMin=this.parse(n.suggestedMin),this._suggestedMax=this.parse(n.suggestedMax)}parse(n,t){return n}getUserBounds(){let{_userMin:n,_userMax:t,_suggestedMin:e,_suggestedMax:r}=this;return n=St(n,Number.POSITIVE_INFINITY),t=St(t,Number.NEGATIVE_INFINITY),e=St(e,Number.POSITIVE_INFINITY),r=St(r,Number.NEGATIVE_INFINITY),{min:St(n,e),max:St(t,r),minDefined:at(n),maxDefined:at(t)}}getMinMax(n){let{min:t,max:e,minDefined:r,maxDefined:a}=this.getUserBounds(),o;if(r&&a)return{min:t,max:e};let s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)o=s[l].controller.getMinMax(this,n),r||(t=Math.min(t,o.min)),a||(e=Math.max(e,o.max));return t=a&&t>e?e:t,e=r&&t>e?t:e,{min:St(t,St(e,t)),max:St(e,St(t,e))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}getLabelItems(n=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(n))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){J(this.options.beforeUpdate,[this])}update(n,t,e){let{beginAtZero:r,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=t,this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=wl(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=s<this.ticks.length;this._convertTicksToLabels(l?Zl(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=nm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let n=this.options.reverse,t,e;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){J(this.options.afterUpdate,[this])}beforeSetDimensions(){J(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(){J(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),J(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){J(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(n){let t=this.options.ticks,e,r,a;for(e=0,r=n.length;e<r;e++)a=n[e],a.label=J(t.callback,[a.value,e,n],this)}afterTickToLabelConversion(){J(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){J(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let n=this.options,t=n.ticks,e=Kl(this.ticks.length,n.ticks.maxTicksLimit),r=t.minRotation||0,a=t.maxRotation,o=r,s,l,c;if(!this._isVisible()||!t.display||r>=a||e<=1||!this.isHorizontal()){this.labelRotation=r;return}let d=this._getLabelSizes(),u=d.widest.width,h=d.highest.height,f=pt(this.chart.width-u,0,this.maxWidth);s=n.offset?this.maxWidth/e:f/(e-1),u+6>s&&(s=f/(e-(n.offset?.5:1)),l=this.maxHeight-Ji(n.grid)-t.padding-Jl(n.title,this.chart.options.font),c=Math.sqrt(u*u+h*h),o=Un(Math.min(Math.asin(pt((d.highest.height+6)/s,-1,1)),Math.asin(pt(l/c,-1,1))-Math.asin(pt(h/c,-1,1)))),o=Math.max(r,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){J(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){J(this.options.beforeFit,[this])}fit(){let n={width:0,height:0},{chart:t,options:{ticks:e,title:r,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){let l=Jl(r,t.options.font);if(s?(n.width=this.maxWidth,n.height=Ji(a)+l):(n.height=this.maxHeight,n.width=Ji(a)+l),e.display&&this.ticks.length){let{first:c,last:d,widest:u,highest:h}=this._getLabelSizes(),f=e.padding*2,m=Ht(this.labelRotation),p=Math.cos(m),g=Math.sin(m);if(s){let b=e.mirror?0:g*u.width+p*h.height;n.height=Math.min(this.maxHeight,n.height+b+f)}else{let b=e.mirror?0:p*u.width+g*h.height;n.width=Math.min(this.maxWidth,n.width+b+f)}this._calculatePadding(c,d,g,p)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,t,e,r){let{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),h=0,f=0;l?c?(h=r*n.width,f=e*t.height):(h=e*n.height,f=r*t.width):a==="start"?f=t.width:a==="end"?h=n.width:a!=="inner"&&(h=n.width/2,f=t.width/2),this.paddingLeft=Math.max((h-d+o)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-u+o)*this.width/(this.width-u),0)}else{let d=t.height/2,u=n.height/2;a==="start"?(d=0,u=n.height):a==="end"&&(d=t.height,u=0),this.paddingTop=d+o,this.paddingBottom=u+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(){J(this.options.afterFit,[this])}isHorizontal(){let{axis:n,position:t}=this.options;return t==="top"||t==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let t,e;for(t=0,e=n.length;t<e;t++)U(n[t].label)&&(n.splice(t,1),e--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let n=this._labelSizes;if(!n){let t=this.options.ticks.sampleSize,e=this.ticks;t<e.length&&(e=Zl(e,t)),this._labelSizes=n=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return n}_computeLabelSizes(n,t,e){let{ctx:r,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(t/Kl(t,e)),c=0,d=0,u,h,f,m,p,g,b,_,k,C,v;for(u=0;u<t;u+=l){if(m=n[u].label,p=this._resolveTickFontOptions(u),r.font=g=p.string,b=a[g]=a[g]||{data:{},gc:[]},_=p.lineHeight,k=C=0,!U(m)&&!et(m))k=ji(r,b.data,b.gc,k,m),C=_;else if(et(m))for(h=0,f=m.length;h<f;++h)v=m[h],!U(v)&&!et(v)&&(k=ji(r,b.data,b.gc,k,v),C+=_);o.push(k),s.push(C),c=Math.max(k,c),d=Math.max(C,d)}um(a,t);let y=o.indexOf(c),P=s.indexOf(d),D=S=>({width:o[S]||0,height:s[S]||0});return{first:D(0),last:D(t-1),widest:D(y),highest:D(P),widths:o,heights:s}}getLabelForValue(n){return n}getPixelForValue(n,t){return NaN}getValueForPixel(n){}getPixelForTick(n){let t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);let t=this._startPixel+n*this._length;return hl(this._alignToPixels?Te(this.chart,t,0):t)}getDecimalForPixel(n){let t=(n-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:n,max:t}=this;return n<0&&t<0?t:n>0&&t>0?n:0}getContext(n){let t=this.ticks||[];if(n>=0&&n<t.length){let e=t[n];return e.$context||(e.$context=fm(this.getContext(),n,e))}return this.$context||(this.$context=hm(this.chart.getContext(),this))}_tickSize(){let n=this.options.ticks,t=Ht(this.labelRotation),e=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),a=this._getLabelSizes(),o=n.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*e>s*r?s/e:l/r:l*r<s*e?l/e:s/r}_isVisible(){let n=this.options.display;return n!=="auto"?!!n:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(n){let t=this.axis,e=this.chart,r=this.options,{grid:a,position:o,border:s}=r,l=a.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),h=Ji(a),f=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,b=function(Y){return Te(e,Y,p)},_,k,C,v,y,P,D,S,L,B,W,rt;if(o==="top")_=b(this.bottom),P=this.bottom-h,S=_-g,B=b(n.top)+g,rt=n.bottom;else if(o==="bottom")_=b(this.top),B=n.top,rt=b(n.bottom)-g,P=_+g,S=this.top+h;else if(o==="left")_=b(this.right),y=this.right-h,D=_-g,L=b(n.left)+g,W=n.right;else if(o==="right")_=b(this.left),L=n.left,W=b(n.right)-g,y=_+g,D=this.left+h;else if(t==="x"){if(o==="center")_=b((n.top+n.bottom)/2+.5);else if(j(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}B=n.top,rt=n.bottom,P=_+g,S=P+h}else if(t==="y"){if(o==="center")_=b((n.left+n.right)/2);else if(j(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}y=_-g,D=y-h,L=n.left,W=n.right}let bt=N(r.ticks.maxTicksLimit,u),z=Math.max(1,Math.ceil(u/bt));for(k=0;k<u;k+=z){let Y=this.getContext(k),K=a.setContext(Y),At=s.setContext(Y),ut=K.lineWidth,me=K.color,pe=At.dash||[],Ft=At.dashOffset,ge=K.tickWidth,Bt=K.tickColor,be=K.tickBorderDash||[],Xt=K.tickBorderDashOffset;C=dm(this,k,l),C!==void 0&&(v=Te(e,C,ut),c?y=D=L=W=v:P=S=B=rt=v,f.push({tx1:y,ty1:P,tx2:D,ty2:S,x1:L,y1:B,x2:W,y2:rt,width:ut,color:me,borderDash:pe,borderDashOffset:Ft,tickWidth:ge,tickColor:Bt,tickBorderDash:be,tickBorderDashOffset:Xt}))}return this._ticksLength=u,this._borderValue=_,f}_computeLabelItems(n){let t=this.axis,e=this.options,{position:r,ticks:a}=e,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=a,h=Ji(e.grid),f=h+d,m=u?-d:f,p=-Ht(this.labelRotation),g=[],b,_,k,C,v,y,P,D,S,L,B,W,rt="middle";if(r==="top")y=this.bottom-m,P=this._getXAxisLabelAlignment();else if(r==="bottom")y=this.top+m,P=this._getXAxisLabelAlignment();else if(r==="left"){let z=this._getYAxisLabelAlignment(h);P=z.textAlign,v=z.x}else if(r==="right"){let z=this._getYAxisLabelAlignment(h);P=z.textAlign,v=z.x}else if(t==="x"){if(r==="center")y=(n.top+n.bottom)/2+f;else if(j(r)){let z=Object.keys(r)[0],Y=r[z];y=this.chart.scales[z].getPixelForValue(Y)+f}P=this._getXAxisLabelAlignment()}else if(t==="y"){if(r==="center")v=(n.left+n.right)/2-f;else if(j(r)){let z=Object.keys(r)[0],Y=r[z];v=this.chart.scales[z].getPixelForValue(Y)}P=this._getYAxisLabelAlignment(h).textAlign}t==="y"&&(l==="start"?rt="top":l==="end"&&(rt="bottom"));let bt=this._getLabelSizes();for(b=0,_=s.length;b<_;++b){k=s[b],C=k.label;let z=a.setContext(this.getContext(b));D=this.getPixelForTick(b)+a.labelOffset,S=this._resolveTickFontOptions(b),L=S.lineHeight,B=et(C)?C.length:1;let Y=B/2,K=z.color,At=z.textStrokeColor,ut=z.textStrokeWidth,me=P;o?(v=D,P==="inner"&&(b===_-1?me=this.options.reverse?"left":"right":b===0?me=this.options.reverse?"right":"left":me="center"),r==="top"?c==="near"||p!==0?W=-B*L+L/2:c==="center"?W=-bt.highest.height/2-Y*L+L:W=-bt.highest.height+L/2:c==="near"||p!==0?W=L/2:c==="center"?W=bt.highest.height/2-Y*L:W=bt.highest.height-B*L,u&&(W*=-1),p!==0&&!z.showLabelBackdrop&&(v+=L/2*Math.sin(p))):(y=D,W=(1-B)*L/2);let pe;if(z.showLabelBackdrop){let Ft=xt(z.backdropPadding),ge=bt.heights[b],Bt=bt.widths[b],be=W-Ft.top,Xt=0-Ft.left;switch(rt){case"middle":be-=ge/2;break;case"bottom":be-=ge;break}switch(P){case"center":Xt-=Bt/2;break;case"right":Xt-=Bt;break;case"inner":b===_-1?Xt-=Bt:b>0&&(Xt-=Bt/2);break}pe={left:Xt,top:be,width:Bt+Ft.width,height:ge+Ft.height,color:z.backdropColor}}g.push({label:C,font:S,textOffset:W,options:{rotation:p,color:K,strokeColor:At,strokeWidth:ut,textAlign:me,textBaseline:rt,translation:[v,y],backdrop:pe}})}return g}_getXAxisLabelAlignment(){let{position:n,ticks:t}=this.options;if(-Ht(this.labelRotation))return n==="top"?"left":"right";let r="center";return t.align==="start"?r="left":t.align==="end"?r="right":t.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(n){let{position:t,ticks:{crossAlign:e,mirror:r,padding:a}}=this.options,o=this._getLabelSizes(),s=n+a,l=o.widest.width,c,d;return t==="left"?r?(d=this.right+a,e==="near"?c="left":e==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-s,e==="near"?c="right":e==="center"?(c="center",d-=l/2):(c="left",d=this.left)):t==="right"?r?(d=this.left+a,e==="near"?c="right":e==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+s,e==="near"?c="left":e==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;let n=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){let{ctx:n,options:{backgroundColor:t},left:e,top:r,width:a,height:o}=this;t&&(n.save(),n.fillStyle=t,n.fillRect(e,r,a,o),n.restore())}getLineWidthForValue(n){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let r=this.ticks.findIndex(a=>a.value===n);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(n){let t=this.options.grid,e=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n)),a,o,s=(l,c,d)=>{!d.width||!d.color||(e.save(),e.lineWidth=d.width,e.strokeStyle=d.color,e.setLineDash(d.borderDash||[]),e.lineDashOffset=d.borderDashOffset,e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(c.x,c.y),e.stroke(),e.restore())};if(t.display)for(a=0,o=r.length;a<o;++a){let l=r[a];t.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:n,ctx:t,options:{border:e,grid:r}}=this,a=e.setContext(this.getContext()),o=e.display?a.width:0;if(!o)return;let s=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,d,u,h;this.isHorizontal()?(c=Te(n,this.left,o)-o/2,d=Te(n,this.right,s)+s/2,u=h=l):(u=Te(n,this.top,o)-o/2,h=Te(n,this.bottom,s)+s/2,c=d=l),t.save(),t.lineWidth=a.width,t.strokeStyle=a.color,t.beginPath(),t.moveTo(c,u),t.lineTo(d,h),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;let e=this.ctx,r=this._computeLabelArea();r&&Qi(e,r);let a=this.getLabelItems(n);for(let o of a){let s=o.options,l=o.font,c=o.label,d=o.textOffset;Me(e,c,0,d,l,s)}r&&Xi(e)}drawTitle(){let{ctx:n,options:{position:t,title:e,reverse:r}}=this;if(!e.display)return;let a=dt(e.font),o=xt(e.padding),s=e.align,l=a.lineHeight/2;t==="bottom"||t==="center"||j(t)?(l+=o.bottom,et(e.text)&&(l+=a.lineHeight*(e.text.length-1))):l+=o.top;let{titleX:c,titleY:d,maxWidth:u,rotation:h}=pm(this,l,t,s);Me(n,e.text,0,0,a,{color:e.color,maxWidth:u,rotation:h,textAlign:mm(s,t,r),textBaseline:"middle",translation:[c,d]})}draw(n){this._isVisible()&&(this.drawBackground(),this.drawGrid(n),this.drawBorder(),this.drawTitle(),this.drawLabels(n))}_layers(){let n=this.options,t=n.ticks&&n.ticks.z||0,e=N(n.grid&&n.grid.z,-1),r=N(n.border&&n.border.z,0);return!this._isVisible()||this.draw!==i.prototype.draw?[{z:t,draw:a=>{this.draw(a)}}]:[{z:e,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(n){let t=this.chart.getSortedVisibleDatasetMetas(),e=this.axis+"AxisID",r=[],a,o;for(a=0,o=t.length;a<o;++a){let s=t[a];s[e]===this.id&&(!n||s.type===n)&&r.push(s)}return r}_resolveTickFontOptions(n){let t=this.options.ticks.setContext(this.getContext(n));return dt(t.font)}_maxDigits(){let n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}},ki=class{constructor(n,t,e){this.type=n,this.scope=t,this.override=e,this.items=Object.create(null)}isForType(n){return Object.prototype.isPrototypeOf.call(this.type.prototype,n.prototype)}register(n){let t=Object.getPrototypeOf(n),e;_m(t)&&(e=this.register(t));let r=this.items,a=n.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+n);return a in r||(r[a]=n,gm(n,o,e),this.override&&nt.override(n.id,n.overrides)),o}get(n){return this.items[n]}unregister(n){let t=this.items,e=n.id,r=this.scope;e in t&&delete t[e],r&&e in nt[r]&&(delete nt[r][e],this.override&&delete Ce[e])}};function gm(i,n,t){let e=hi(Object.create(null),[t?nt.get(t):{},nt.get(n),i.defaults]);nt.set(n,e),i.defaultRoutes&&bm(n,i.defaultRoutes),i.descriptors&&nt.describe(n,i.descriptors)}function bm(i,n){Object.keys(n).forEach(t=>{let e=t.split("."),r=e.pop(),a=[i].concat(e).join("."),o=n[t].split("."),s=o.pop(),l=o.join(".");nt.route(a,r,l,s)})}function _m(i){return"id"in i&&"defaults"in i}var _o=class{constructor(){this.controllers=new ki(Oe,"datasets",!0),this.elements=new ki(Qt,"elements"),this.plugins=new ki(Object,"plugins"),this.scales=new ki(qe,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,t,e){[...t].forEach(r=>{let a=e||this._getRegistryForType(r);e||a.isForType(r)||a===this.plugins&&r.id?this._exec(n,a,r):G(r,o=>{let s=e||this._getRegistryForType(o);this._exec(n,s,o)})})}_exec(n,t,e){let r=Yn(n);J(e["before"+r],[],e),t[n](e),J(e["after"+r],[],e)}_getRegistryForType(n){for(let t=0;t<this._typedRegistries.length;t++){let e=this._typedRegistries[t];if(e.isForType(n))return e}return this.plugins}_get(n,t,e){let r=t.get(n);if(r===void 0)throw new Error('"'+n+'" is not a registered '+e+".");return r}},ie=new _o,vo=class{constructor(){this._init=void 0}notify(n,t,e,r){if(t==="beforeInit"&&(this._init=this._createDescriptors(n,!0),this._notify(this._init,n,"install")),this._init===void 0)return;let a=r?this._descriptors(n).filter(r):this._descriptors(n),o=this._notify(a,n,t,e);return t==="afterDestroy"&&(this._notify(a,n,"stop"),this._notify(this._init,n,"uninstall"),this._init=void 0),o}_notify(n,t,e,r){r=r||{};for(let a of n){let o=a.plugin,s=o[e],l=[t,r,a.options];if(J(s,l,o)===!1&&r.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(n){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(n);return this._notifyStateChanges(n),t}_createDescriptors(n,t){let e=n&&n.config,r=N(e.options&&e.options.plugins,{}),a=vm(e);return r===!1&&!t?[]:ym(n,a,r,t)}_notifyStateChanges(n){let t=this._oldCache||[],e=this._cache,r=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(r(t,e),n,"stop"),this._notify(r(e,t),n,"start")}};function vm(i){let n={},t=[],e=Object.keys(ie.plugins.items);for(let a=0;a<e.length;a++)t.push(ie.getPlugin(e[a]));let r=i.plugins||[];for(let a=0;a<r.length;a++){let o=r[a];t.indexOf(o)===-1&&(t.push(o),n[o.id]=!0)}return{plugins:t,localIds:n}}function xm(i,n){return!n&&i===!1?null:i===!0?{}:i}function ym(i,{plugins:n,localIds:t},e,r){let a=[],o=i.getContext();for(let s of n){let l=s.id,c=xm(e[l],r);c!==null&&a.push({plugin:s,options:km(i.config,{plugin:s,local:t[l]},c,o)})}return a}function km(i,{plugin:n,local:t},e,r){let a=i.pluginScopeKeys(n),o=i.getOptionScopes(e,a);return t&&n.defaults&&o.push(n.defaults),i.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function xo(i,n){let t=nt.datasets[i]||{};return((n.datasets||{})[i]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function wm(i,n){let t=i;return i==="_index_"?t=n:i==="_value_"&&(t=n==="x"?"y":"x"),t}function Cm(i,n){return i===n?"_index_":"_value_"}function tc(i){if(i==="x"||i==="y"||i==="r")return i}function Tm(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function yo(i,...n){if(tc(i))return i;for(let t of n){let e=t.axis||Tm(t.position)||i.length>1&&tc(i[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function ec(i,n,t){if(t[n+"AxisID"]===i)return{axis:n}}function Mm(i,n){if(n.data&&n.data.datasets){let t=n.data.datasets.filter(e=>e.xAxisID===i||e.yAxisID===i);if(t.length)return ec(i,"x",t[0])||ec(i,"y",t[0])}return{}}function Dm(i,n){let t=Ce[i.type]||{scales:{}},e=n.scales||{},r=xo(i.type,n),a=Object.create(null);return Object.keys(e).forEach(o=>{let s=e[o];if(!j(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);let l=yo(o,s,Mm(o,i),nt.scales[s.type]),c=Cm(l,r),d=t.scales||{};a[o]=mi(Object.create(null),[{axis:l},s,d[l],d[c]])}),i.data.datasets.forEach(o=>{let s=o.type||i.type,l=o.indexAxis||xo(s,n),d=(Ce[s]||{}).scales||{};Object.keys(d).forEach(u=>{let h=wm(u,l),f=o[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),mi(a[f],[{axis:h},e[f],d[u]])})}),Object.keys(a).forEach(o=>{let s=a[o];mi(s,[nt.scales[s.type],nt.scale])}),a}function Vc(i){let n=i.options||(i.options={});n.plugins=N(n.plugins,{}),n.scales=Dm(i,n)}function Yc(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Pm(i){return i=i||{},i.data=Yc(i.data),Vc(i),i}var ic=new Map,Uc=new Set;function ir(i,n){let t=ic.get(i);return t||(t=n(),ic.set(i,t),Uc.add(t)),t}var tn=(i,n,t)=>{let e=ce(n,t);e!==void 0&&i.add(e)},ko=class{constructor(n){this._config=Pm(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=Yc(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){let n=this._config;this.clearCache(),Vc(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return ir(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return ir(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return ir(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){let t=n.id,e=this.type;return ir(`${e}-plugin-${t}`,()=>[[`plugins.${t}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,t){let e=this._scopeCache,r=e.get(n);return(!r||t)&&(r=new Map,e.set(n,r)),r}getOptionScopes(n,t,e){let{options:r,type:a}=this,o=this._cachedScopes(n,e),s=o.get(t);if(s)return s;let l=new Set;t.forEach(d=>{n&&(l.add(n),d.forEach(u=>tn(l,n,u))),d.forEach(u=>tn(l,r,u)),d.forEach(u=>tn(l,Ce[a]||{},u)),d.forEach(u=>tn(l,nt,u)),d.forEach(u=>tn(l,$n,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Uc.has(t)&&o.set(t,c),c}chartOptionScopes(){let{options:n,type:t}=this;return[n,Ce[t]||{},nt.datasets[t]||{},{type:t},nt,$n]}resolveNamedOptions(n,t,e,r=[""]){let a={$shared:!0},{resolver:o,subPrefixes:s}=nc(this._resolverCache,n,r),l=o;if(Om(o,t)){a.$shared=!1,e=se(e)?e():e;let c=this.createResolver(n,e,s);l=He(o,e,c)}for(let c of t)a[c]=l[c];return a}createResolver(n,t,e=[""],r){let{resolver:a}=nc(this._resolverCache,n,e);return j(t)?He(a,t,void 0,r):a}};function nc(i,n,t){let e=i.get(n);e||(e=new Map,i.set(n,e));let r=t.join(),a=e.get(r);return a||(a={resolver:Gn(n,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},e.set(r,a)),a}var Sm=i=>j(i)&&Object.getOwnPropertyNames(i).some(n=>se(i[n]));function Om(i,n){let{isScriptable:t,isIndexable:e}=Ua(i);for(let r of n){let a=t(r),o=e(r),s=(o||a)&&i[r];if(a&&(se(s)||Sm(s))||o&&et(s))return!0}return!1}var Im="4.5.1",Am=["top","bottom","left","right","chartArea"];function rc(i,n){return i==="top"||i==="bottom"||Am.indexOf(i)===-1&&n==="x"}function ac(i,n){return function(t,e){return t[i]===e[i]?t[n]-e[n]:t[i]-e[i]}}function oc(i){let n=i.chart,t=n.options.animation;n.notifyPlugins("afterRender"),J(t&&t.onComplete,[i],n)}function Rm(i){let n=i.chart,t=n.options.animation;J(t&&t.onProgress,[i],n)}function jc(i){return Kn()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var sr={},sc=i=>{let n=jc(i);return Object.values(sr).filter(t=>t.canvas===n).pop()};function Em(i,n,t){let e=Object.keys(i);for(let r of e){let a=+r;if(a>=n){let o=i[r];delete i[r],(t>0||a>n)&&(i[a+t]=o)}}}function Lm(i,n,t,e){return!t||i.type==="mouseout"?null:e?n:i}var Fm=(()=>{class i{static defaults=nt;static instances=sr;static overrides=Ce;static registry=ie;static version=Im;static getChart=sc;static register(...t){ie.add(...t),lc()}static unregister(...t){ie.remove(...t),lc()}constructor(t,e){let r=this.config=new ko(e),a=jc(t),o=sc(a);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||im(a)),this.platform.updateConfig(r);let l=this.platform.acquireContext(a,s.aspectRatio),c=l&&l.canvas,d=c&&c.height,u=c&&c.width;if(this.id=ol(),this.ctx=l,this.canvas=c,this.width=u,this.height=d,this._options=s,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 vo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=bl(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],sr[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ue.listen(this,"complete",oc),ue.listen(this,"progress",Rm),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:a,_aspectRatio:o}=this;return U(t)?e&&o?o:a?r/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ie}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qa(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ha(this.canvas,this.ctx),this}stop(){return ue.stop(this),this}resize(t,e){ue.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let r=this.options,a=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(a,t,e,o),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Qa(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),J(r.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};G(e,(r,a)=>{r.id=a})}buildOrUpdateScales(){let t=this.options,e=t.scales,r=this.scales,a=Object.keys(r).reduce((s,l)=>(s[l]=!1,s),{}),o=[];e&&(o=o.concat(Object.keys(e).map(s=>{let l=e[s],c=yo(s,l),d=c==="r",u=c==="x";return{options:l,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),G(o,s=>{let l=s.options,c=l.id,d=yo(c,l),u=N(l.type,s.dtype);(l.position===void 0||rc(l.position,d)!==rc(s.dposition))&&(l.position=s.dposition),a[c]=!0;let h=null;if(c in r&&r[c].type===u)h=r[c];else{let f=ie.getScale(u);h=new f({id:c,type:u,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(l,t)}),G(a,(s,l)=>{s||delete r[l]}),G(r,s=>{wt.configure(this,s,s.options),wt.addBox(this,s)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,r=t.length;if(t.sort((a,o)=>a.index-o.index),r>e){for(let a=e;a<r;++a)this._destroyDatasetMeta(a);t.splice(e,r-e)}this._sortedMetasets=t.slice(0).sort(ac("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((r,a)=>{e.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,r,a;for(this._removeUnreferencedMetasets(),r=0,a=e.length;r<a;r++){let o=e[r],s=this.getDatasetMeta(r),l=o.type||this.config.type;if(s.type&&s.type!==l&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=l,s.indexAxis=o.indexAxis||xo(l,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{let c=ie.getController(l),{datasetElementType:d,dataElementType:u}=nt.datasets[l];Object.assign(c,{dataElementType:ie.getElement(u),datasetElementType:d&&ie.getElement(d)}),s.controller=new c(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){G(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let r=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let d=0,u=this.data.datasets.length;d<u;d++){let{controller:h}=this.getDatasetMeta(d),f=!a&&o.indexOf(h)===-1;h.buildOrUpdateElements(f),s=Math.max(+h.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),a||G(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ac("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){G(this.scales,t=>{wt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Pa(e,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:r,start:a,count:o}of e){let s=r==="_removeElements"?-o:o;Em(t,a,s)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,l)=>l+","+s.splice(1).join(","))),a=r(0);for(let o=1;o<e;o++)if(!Pa(a,r(o)))return;return Array.from(a).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;wt.update(this,this.width,this.height,t);let e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],G(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,o)=>{a._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,r=this.data.datasets.length;e<r;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,r=this.data.datasets.length;e<r;++e)this._updateDataset(e,se(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let r=this.getDatasetMeta(t),a={meta:r,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(e),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ue.has(this)?this.attached&&!ue.running(this)&&ue.start(this):(this.draw(),oc({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:r,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,r=[],a,o;for(a=0,o=e.length;a<o;++a){let s=e[a];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,r={meta:t,index:t.index,cancelable:!0},a=to(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&Qi(e,a),t.controller.draw(),a&&Xi(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Zt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,a){let o=Bf.modes[e];return typeof o=="function"?o(this,t,r,a):[]}getDatasetMeta(t){let e=this.data.datasets[t],r=this._metasets,a=r.filter(o=>o&&o._dataset===e).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=de(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!e.hidden}setDatasetVisibility(t,e){let r=this.getDatasetMeta(t);r.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,r){let a=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,a);pi(e)?(o.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(l=>l.datasetIndex===t?a:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ue.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ha(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete sr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,r=(o,s)=>{e.addEventListener(this,o,s),t[o]=s},a=(o,s,l)=>{o.offsetX=s,o.offsetY=l,this._eventHandler(o)};G(this.options.events,o=>r(o,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,r=(c,d)=>{e.addEventListener(this,c,d),t[c]=d},a=(c,d)=>{t[c]&&(e.removeEventListener(this,c,d),delete t[c])},o=(c,d)=>{this.canvas&&this.resize(c,d)},s,l=()=>{a("attach",l),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,a("resize",o),this._stop(),this._resize(0,0),r("attach",l)},e.isAttached(this.canvas)?l():s()}unbindEvents(){G(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},G(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,r){let a=r?"set":"remove",o,s,l,c;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+a+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){s=t[l];let d=s&&this.getDatasetMeta(s.datasetIndex).controller;d&&d[a+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],r=t.map(({datasetIndex:o,index:s})=>{let l=this.getDatasetMeta(o);if(!l)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:l.data[s],index:s}});!qi(r,e)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,e))}notifyPlugins(t,e,r){return this._plugins.notify(this,t,e,r)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,r){let a=this.options.hover,o=(c,d)=>c.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),s=o(e,t),l=r?t:o(t,e);s.length&&this.updateHoverStyle(s,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(t,e){let r={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},a=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;let o=this._handleEvent(t,e,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(o||r.changed)&&this.render(),this}_handleEvent(t,e,r){let{_active:a=[],options:o}=this,s=e,l=this._getActiveElements(t,a,r,s),c=cl(t),d=Lm(t,this._lastEvent,r,c);r&&(this._lastEvent=null,J(o.onHover,[t,l,this],this),c&&J(o.onClick,[t,l,this],this));let u=!qi(l,a);return(u||e)&&(this._active=l,this._updateHoverStyles(l,a,e)),this._lastEvent=d,u}_getActiveElements(t,e,r,a){if(t.type==="mouseout")return[];if(!r)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,a)}}return i})();function lc(){return G(Fm.instances,i=>i._plugins.invalidate())}function Bm(i,n,t){let{startAngle:e,x:r,y:a,outerRadius:o,innerRadius:s,options:l}=n,{borderWidth:c,borderJoinStyle:d}=l,u=Math.min(c/o,_t(e-t));if(i.beginPath(),i.arc(r,a,o-c/2,e+u/2,t-u/2),s>0){let h=Math.min(c/s,_t(e-t));i.arc(r,a,s+c/2,t-h/2,e+h/2,!0)}else{let h=Math.min(c/2,o*_t(e-t));if(d==="round")i.arc(r,a,h,t-Q/2,e+Q/2,!0);else if(d==="bevel"){let f=2*h*h,m=-f*Math.cos(t+Q/2)+r,p=-f*Math.sin(t+Q/2)+a,g=f*Math.cos(e+Q/2)+r,b=f*Math.sin(e+Q/2)+a;i.lineTo(m,p),i.lineTo(g,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function zm(i,n,t){let{startAngle:e,pixelMargin:r,x:a,y:o,outerRadius:s,innerRadius:l}=n,c=r/s;i.beginPath(),i.arc(a,o,s,e-c,t+c),l>r?(c=r/l,i.arc(a,o,l,t+c,e-c,!0)):i.arc(a,o,r,t+lt,e-lt),i.closePath(),i.clip()}function Nm(i){return Xn(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Wm(i,n,t,e){let r=Nm(i.options.borderRadius),a=(t-n)/2,o=Math.min(a,e*n/2),s=l=>{let c=(t-Math.min(a,l))*e/2;return pt(l,0,Math.min(a,c))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:pt(r.innerStart,0,o),innerEnd:pt(r.innerEnd,0,o)}}function yi(i,n,t,e){return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function ur(i,n,t,e,r,a){let{x:o,y:s,startAngle:l,pixelMargin:c,innerRadius:d}=n,u=Math.max(n.outerRadius+e+t-c,0),h=d>0?d+e+t+c:0,f=0,m=r-l;if(e){let z=d>0?d-e:0,Y=u>0?u-e:0,K=(z+Y)/2,At=K!==0?m*K/(K+e):m;f=(m-At)/2}let p=Math.max(.001,m*u-t/Q)/u,g=(m-p)/2,b=l+g+f,_=r-g-f,{outerStart:k,outerEnd:C,innerStart:v,innerEnd:y}=Wm(n,h,u,_-b),P=u-k,D=u-C,S=b+k/P,L=_-C/D,B=h+v,W=h+y,rt=b+v/B,bt=_-y/W;if(i.beginPath(),a){let z=(S+L)/2;if(i.arc(o,s,u,S,z),i.arc(o,s,u,z,L),C>0){let ut=yi(D,L,o,s);i.arc(ut.x,ut.y,C,L,_+lt)}let Y=yi(W,_,o,s);if(i.lineTo(Y.x,Y.y),y>0){let ut=yi(W,bt,o,s);i.arc(ut.x,ut.y,y,_+lt,bt+Math.PI)}let K=(_-y/h+(b+v/h))/2;if(i.arc(o,s,h,_-y/h,K,!0),i.arc(o,s,h,K,b+v/h,!0),v>0){let ut=yi(B,rt,o,s);i.arc(ut.x,ut.y,v,rt+Math.PI,b-lt)}let At=yi(P,b,o,s);if(i.lineTo(At.x,At.y),k>0){let ut=yi(P,S,o,s);i.arc(ut.x,ut.y,k,b-lt,S)}}else{i.moveTo(o,s);let z=Math.cos(S)*u+o,Y=Math.sin(S)*u+s;i.lineTo(z,Y);let K=Math.cos(L)*u+o,At=Math.sin(L)*u+s;i.lineTo(K,At)}i.closePath()}function Hm(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s}=n,l=n.endAngle;if(a){ur(i,n,t,e,l,r);for(let c=0;c<a;++c)i.fill();isNaN(s)||(l=o+(s%it||it))}return ur(i,n,t,e,l,r),i.fill(),l}function Vm(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s,options:l}=n,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:h,borderRadius:f}=l,m=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=h,m?(i.lineWidth=c*2,i.lineJoin=d||"round"):(i.lineWidth=c,i.lineJoin=d||"bevel");let p=n.endAngle;if(a){ur(i,n,t,e,p,r);for(let g=0;g<a;++g)i.stroke();isNaN(s)||(p=o+(s%it||it))}m&&zm(i,n,p),l.selfJoin&&p-o>=Q&&f===0&&d!=="miter"&&Bm(i,n,p),a||(ur(i,n,t,e,p,r),i.stroke())}var wo=class extends Qt{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(n){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,t,e){let r=this.getProps(["x","y"],e),{angle:a,distance:o}=Aa(r,{x:n,y:t}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e),h=(this.options.spacing+this.options.borderWidth)/2,f=N(u,l-s),m=bi(a,s,l)&&s!==l,p=f>=it||m,g=te(o,c+h,d+h);return p&&g}getCenterPoint(n){let{x:t,y:e,startAngle:r,endAngle:a,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:l,spacing:c}=this.options,d=(r+a)/2,u=(o+s+c+l)/2;return{x:t+Math.cos(d)*u,y:e+Math.sin(d)*u}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){let{options:t,circumference:e}=this,r=(t.offset||0)/4,a=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=e>it?Math.floor(e/it):0,e===0||this.innerRadius<0||this.outerRadius<0)return;n.save();let s=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(s)*r,Math.sin(s)*r);let l=1-Math.sin(Math.min(Q,e||0)),c=r*l;n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,Hm(n,this,c,a,o),Vm(n,this,c,a,o),n.restore()}};function qc(i,n,t=n){i.lineCap=N(t.borderCapStyle,n.borderCapStyle),i.setLineDash(N(t.borderDash,n.borderDash)),i.lineDashOffset=N(t.borderDashOffset,n.borderDashOffset),i.lineJoin=N(t.borderJoinStyle,n.borderJoinStyle),i.lineWidth=N(t.borderWidth,n.borderWidth),i.strokeStyle=N(t.borderColor,n.borderColor)}function Ym(i,n,t){i.lineTo(t.x,t.y)}function Um(i){return i.stepped?yl:i.tension||i.cubicInterpolationMode==="monotone"?kl:Ym}function $c(i,n,t={}){let e=i.length,{start:r=0,end:a=e-1}=t,{start:o,end:s}=n,l=Math.max(r,o),c=Math.min(a,s),d=r<o&&a<o||r>s&&a>s;return{count:e,start:l,loop:n.loop,ilen:c<l&&!d?e+c-l:c-l}}function jm(i,n,t,e){let{points:r,options:a}=n,{count:o,start:s,loop:l,ilen:c}=$c(r,t,e),d=Um(a),{move:u=!0,reverse:h}=e||{},f,m,p;for(f=0;f<=c;++f)m=r[(s+(h?c-f:f))%o],!m.skip&&(u?(i.moveTo(m.x,m.y),u=!1):d(i,p,m,h,a.stepped),p=m);return l&&(m=r[(s+(h?c:0))%o],d(i,p,m,h,a.stepped)),!!l}function qm(i,n,t,e){let r=n.points,{count:a,start:o,ilen:s}=$c(r,t,e),{move:l=!0,reverse:c}=e||{},d=0,u=0,h,f,m,p,g,b,_=C=>(o+(c?s-C:C))%a,k=()=>{p!==g&&(i.lineTo(d,g),i.lineTo(d,p),i.lineTo(d,b))};for(l&&(f=r[_(0)],i.moveTo(f.x,f.y)),h=0;h<=s;++h){if(f=r[_(h)],f.skip)continue;let C=f.x,v=f.y,y=C|0;y===m?(v<p?p=v:v>g&&(g=v),d=(u*d+C)/++u):(k(),i.lineTo(C,v),m=y,u=0,p=g=v),b=v}k()}function Co(i){let n=i.options,t=n.borderDash&&n.borderDash.length;return!i._decimated&&!i._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?qm:jm}function $m(i){return i.stepped?Il:i.tension||i.cubicInterpolationMode==="monotone"?Al:ke}function Qm(i,n,t,e){let r=n._path;r||(r=n._path=new Path2D,n.path(r,t,e)&&r.closePath()),qc(i,n.options),i.stroke(r)}function Xm(i,n,t,e){let{segments:r,options:a}=n,o=Co(n);for(let s of r)qc(i,a,s.style),i.beginPath(),o(i,n,s,{start:t,end:t+e-1})&&i.closePath(),i.stroke()}var Gm=typeof Path2D=="function";function Km(i,n,t,e){Gm&&!n.options.segment?Qm(i,n,t,e):Xm(i,n,t,e)}var mr=(()=>{class i extends Qt{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,e){let r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){let a=r.spanGaps?this._loop:this._fullLoop;Pl(this._points,r,t,a,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=El(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,r=t.length;return r&&e[t[r-1].end]}interpolate(t,e){let r=this.options,a=t[e],o=this.points,s=Ja(this,{property:e,start:a,end:a});if(!s.length)return;let l=[],c=$m(r),d,u;for(d=0,u=s.length;d<u;++d){let{start:h,end:f}=s[d],m=o[h],p=o[f];if(m===p){l.push(m);continue}let g=Math.abs((a-m[e])/(p[e]-m[e])),b=c(m,p,g,r.stepped);b[e]=t[e],l.push(b)}return l.length===1?l[0]:l}pathSegment(t,e,r){return Co(this)(t,this,e,r)}path(t,e,r){let a=this.segments,o=Co(this),s=this._loop;e=e||0,r=r||this.points.length-e;for(let l of a)s&=o(t,this,l,{start:e,end:e+r-1});return!!s}draw(t,e,r,a){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Km(t,this,r,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return i})();function cc(i,n,t,e){let r=i.options,{[t]:a}=i.getProps([t],e);return Math.abs(n-a)<r.radius+r.hitRadius}var Zm=(()=>{class i extends Qt{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,r){let a=this.options,{x:o,y:s}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,e){return cc(this,t,"x",e)}inYRange(t,e){return cc(this,t,"y",e)}getCenterPoint(t){let{x:e,y:r}=this.getProps(["x","y"],t);return{x:e,y:r}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);let r=e&&t.borderWidth||0;return(e+r)*2}draw(t,e){let r=this.options;this.skip||r.radius<.1||!Zt(this,e,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,Qn(t,r,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return i})();function Qc(i,n){let{x:t,y:e,base:r,width:a,height:o}=i.getProps(["x","y","base","width","height"],n),s,l,c,d,u;return i.horizontal?(u=o/2,s=Math.min(t,r),l=Math.max(t,r),c=e-u,d=e+u):(u=a/2,s=t-u,l=t+u,c=Math.min(e,r),d=Math.max(e,r)),{left:s,top:c,right:l,bottom:d}}function Se(i,n,t,e){return i?0:pt(n,t,e)}function Jm(i,n,t){let e=i.options.borderWidth,r=i.borderSkipped,a=Ya(e);return{t:Se(r.top,a.top,0,t),r:Se(r.right,a.right,0,n),b:Se(r.bottom,a.bottom,0,t),l:Se(r.left,a.left,0,n)}}function tp(i,n,t){let{enableBorderRadius:e}=i.getProps(["enableBorderRadius"]),r=i.options.borderRadius,a=De(r),o=Math.min(n,t),s=i.borderSkipped,l=e||j(r);return{topLeft:Se(!l||s.top||s.left,a.topLeft,0,o),topRight:Se(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Se(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Se(!l||s.bottom||s.right,a.bottomRight,0,o)}}function ep(i){let n=Qc(i),t=n.right-n.left,e=n.bottom-n.top,r=Jm(i,t/2,e/2),a=tp(i,t/2,e/2);return{outer:{x:n.left,y:n.top,w:t,h:e,radius:a},inner:{x:n.left+r.l,y:n.top+r.t,w:t-r.l-r.r,h:e-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function lo(i,n,t,e){let r=n===null,a=t===null,s=i&&!(r&&a)&&Qc(i,e);return s&&(r||te(n,s.left,s.right))&&(a||te(t,s.top,s.bottom))}function ip(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function np(i,n){i.rect(n.x,n.y,n.w,n.h)}function co(i,n,t={}){let e=i.x!==t.x?-n:0,r=i.y!==t.y?-n:0,a=(i.x+i.w!==t.x+t.w?n:0)-e,o=(i.y+i.h!==t.y+t.h?n:0)-r;return{x:i.x+e,y:i.y+r,w:i.w+a,h:i.h+o,radius:i.radius}}var To=class extends Qt{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(n){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,n&&Object.assign(this,n)}draw(n){let{inflateAmount:t,options:{borderColor:e,backgroundColor:r}}=this,{inner:a,outer:o}=ep(this),s=ip(o.radius)?vi:np;n.save(),(o.w!==a.w||o.h!==a.h)&&(n.beginPath(),s(n,co(o,t,a)),n.clip(),s(n,co(a,-t,o)),n.fillStyle=e,n.fill("evenodd")),n.beginPath(),s(n,co(a,t)),n.fillStyle=r,n.fill(),n.restore()}inRange(n,t,e){return lo(this,n,t,e)}inXRange(n,t){return lo(this,n,null,t)}inYRange(n,t){return lo(this,null,n,t)}getCenterPoint(n){let{x:t,y:e,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],n);return{x:a?(t+r)/2:t,y:a?e:(e+r)/2}}getRange(n){return n==="x"?this.width/2:this.height/2}},rp=Object.freeze({__proto__:null,ArcElement:wo,BarElement:To,LineElement:mr,PointElement:Zm}),Mo=["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)"],dc=Mo.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Xc(i){return Mo[i%Mo.length]}function Gc(i){return dc[i%dc.length]}function ap(i,n){return i.borderColor=Xc(n),i.backgroundColor=Gc(n),++n}function op(i,n){return i.backgroundColor=i.data.map(()=>Xc(n++)),n}function sp(i,n){return i.backgroundColor=i.data.map(()=>Gc(n++)),n}function lp(i){let n=0;return(t,e)=>{let r=i.getDatasetMeta(e).controller;r instanceof Eo?n=op(t,n):r instanceof Bc?n=sp(t,n):r&&(n=ap(t,n))}}function uc(i){let n;for(n in i)if(i[n].borderColor||i[n].backgroundColor)return!0;return!1}function cp(i){return i&&(i.borderColor||i.backgroundColor)}function dp(){return nt.borderColor!=="rgba(0,0,0,0.1)"||nt.backgroundColor!=="rgba(0,0,0,0.1)"}var up={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,n,t){if(!t.enabled)return;let{data:{datasets:e},options:r}=i.config,{elements:a}=r,o=uc(e)||cp(r)||a&&uc(a)||dp();if(!t.forceOverride&&o)return;let s=lp(i);e.forEach(s)}};function hp(i,n,t,e,r){let a=r.samples||e;if(a>=t)return i.slice(n,n+t);let o=[],s=(t-2)/(a-2),l=0,c=n+t-1,d=n,u,h,f,m,p;for(o[l++]=i[d],u=0;u<a-2;u++){let g=0,b=0,_,k=Math.floor((u+1)*s)+1+n,C=Math.min(Math.floor((u+2)*s)+1,t)+n,v=C-k;for(_=k;_<C;_++)g+=i[_].x,b+=i[_].y;g/=v,b/=v;let y=Math.floor(u*s)+1+n,P=Math.min(Math.floor((u+1)*s)+1,t)+n,{x:D,y:S}=i[d];for(f=m=-1,_=y;_<P;_++)m=.5*Math.abs((D-g)*(i[_].y-S)-(D-i[_].x)*(b-S)),m>f&&(f=m,h=i[_],p=_);o[l++]=h,d=p}return o[l++]=i[c],o}function fp(i,n,t,e){let r=0,a=0,o,s,l,c,d,u,h,f,m,p,g=[],b=n+t-1,_=i[n].x,C=i[b].x-_;for(o=n;o<n+t;++o){s=i[o],l=(s.x-_)/C*e,c=s.y;let v=l|0;if(v===d)c<m?(m=c,u=o):c>p&&(p=c,h=o),r=(a*r+s.x)/++a;else{let y=o-1;if(!U(u)&&!U(h)){let P=Math.min(u,h),D=Math.max(u,h);P!==f&&P!==y&&g.push(vn(ei({},i[P]),{x:r})),D!==f&&D!==y&&g.push(vn(ei({},i[D]),{x:r}))}o>0&&y!==f&&g.push(i[y]),g.push(s),d=v,a=0,m=p=c,u=h=f=o}}return g}function Kc(i){if(i._decimated){let n=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:n})}}function hc(i){i.data.datasets.forEach(n=>{Kc(n)})}function mp(i,n){let t=n.length,e=0,r,{iScale:a}=i,{min:o,max:s,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(e=pt(Kt(n,a.axis,o).lo,0,t-1)),c?r=pt(Kt(n,a.axis,s).hi+1,e,t)-e:r=t-e,{start:e,count:r}}var pp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,n,t)=>{if(!t.enabled){hc(i);return}let e=i.width;i.data.datasets.forEach((r,a)=>{let{_data:o,indexAxis:s}=r,l=i.getDatasetMeta(a),c=o||r.data;if(xi([s,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let d=i.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||i.options.parsing)return;let{start:u,count:h}=mp(l,c),f=t.threshold||4*e;if(h<=f){Kc(r);return}U(o)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let m;switch(t.algorithm){case"lttb":m=hp(c,u,h,e,t);break;case"min-max":m=fp(c,u,h,e);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=m})},destroy(i){hc(i)}};function gp(i,n,t){let e=i.segments,r=i.points,a=n.points,o=[];for(let s of e){let{start:l,end:c}=s;c=pr(l,c,r);let d=Do(t,r[l],r[c],s.loop);if(!n.segments){o.push({source:s,target:d,start:r[l],end:r[c]});continue}let u=Ja(n,d);for(let h of u){let f=Do(t,a[h.start],a[h.end],h.loop),m=Za(s,r,f);for(let p of m)o.push({source:p,target:h,start:{[t]:fc(d,f,"start",Math.max)},end:{[t]:fc(d,f,"end",Math.min)}})}}return o}function Do(i,n,t,e){if(e)return;let r=n[i],a=t[i];return i==="angle"&&(r=_t(r),a=_t(a)),{property:i,start:r,end:a}}function bp(i,n){let{x:t=null,y:e=null}=i||{},r=n.points,a=[];return n.segments.forEach(({start:o,end:s})=>{s=pr(o,s,r);let l=r[o],c=r[s];e!==null?(a.push({x:l.x,y:e}),a.push({x:c.x,y:e})):t!==null&&(a.push({x:t,y:l.y}),a.push({x:t,y:c.y}))}),a}function pr(i,n,t){for(;n>i;n--){let e=t[n];if(!isNaN(e.x)&&!isNaN(e.y))break}return n}function fc(i,n,t,e){return i&&n?e(i[t],n[t]):i?i[t]:n?n[t]:0}function Zc(i,n){let t=[],e=!1;return et(i)?(e=!0,t=i):t=bp(i,n),t.length?new mr({points:t,options:{tension:0},_loop:e,_fullLoop:e}):null}function mc(i){return i&&i.fill!==!1}function _p(i,n,t){let r=i[n].fill,a=[n],o;if(!t)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!at(r))return r;if(o=i[r],!o)return!1;if(o.visible)return r;a.push(r),r=o.fill}return!1}function vp(i,n,t){let e=wp(i);if(j(e))return isNaN(e.value)?!1:e;let r=parseFloat(e);return at(r)&&Math.floor(r)===r?xp(e[0],n,r,t):["origin","start","end","stack","shape"].indexOf(e)>=0&&e}function xp(i,n,t,e){return(i==="-"||i==="+")&&(t=n+t),t===n||t<0||t>=e?!1:t}function yp(i,n){let t=null;return i==="start"?t=n.bottom:i==="end"?t=n.top:j(i)?t=n.getPixelForValue(i.value):n.getBasePixel&&(t=n.getBasePixel()),t}function kp(i,n,t){let e;return i==="start"?e=t:i==="end"?e=n.options.reverse?n.min:n.max:j(i)?e=i.value:e=n.getBaseValue(),e}function wp(i){let n=i.options,t=n.fill,e=N(t&&t.target,t);return e===void 0&&(e=!!n.backgroundColor),e===!1||e===null?!1:e===!0?"origin":e}function Cp(i){let{scale:n,index:t,line:e}=i,r=[],a=e.segments,o=e.points,s=Tp(n,t);s.push(Zc({x:null,y:n.bottom},e));for(let l=0;l<a.length;l++){let c=a[l];for(let d=c.start;d<=c.end;d++)Mp(r,o[d],s)}return new mr({points:r,options:{}})}function Tp(i,n){let t=[],e=i.getMatchingVisibleMetas("line");for(let r=0;r<e.length;r++){let a=e[r];if(a.index===n)break;a.hidden||t.unshift(a.dataset)}return t}function Mp(i,n,t){let e=[];for(let r=0;r<t.length;r++){let a=t[r],{first:o,last:s,point:l}=Dp(a,n,"x");if(!(!l||o&&s)){if(o)e.unshift(l);else if(i.push(l),!s)break}}i.push(...e)}function Dp(i,n,t){let e=i.interpolate(n,t);if(!e)return{};let r=e[t],a=i.segments,o=i.points,s=!1,l=!1;for(let c=0;c<a.length;c++){let d=a[c],u=o[d.start][t],h=o[d.end][t];if(te(r,u,h)){s=r===u,l=r===h;break}}return{first:s,last:l,point:e}}var hr=class{constructor(n){this.x=n.x,this.y=n.y,this.radius=n.radius}pathSegment(n,t,e){let{x:r,y:a,radius:o}=this;return t=t||{start:0,end:it},n.arc(r,a,o,t.end,t.start,!0),!e.bounds}interpolate(n){let{x:t,y:e,radius:r}=this,a=n.angle;return{x:t+Math.cos(a)*r,y:e+Math.sin(a)*r,angle:a}}};function Pp(i){let{chart:n,fill:t,line:e}=i;if(at(t))return Sp(n,t);if(t==="stack")return Cp(i);if(t==="shape")return!0;let r=Op(i);return r instanceof hr?r:Zc(r,e)}function Sp(i,n){let t=i.getDatasetMeta(n);return t&&i.isDatasetVisible(n)?t.dataset:null}function Op(i){return(i.scale||{}).getPointPositionForValue?Ap(i):Ip(i)}function Ip(i){let{scale:n={},fill:t}=i,e=yp(t,n);if(at(e)){let r=n.isHorizontal();return{x:r?e:null,y:r?null:e}}return null}function Ap(i){let{scale:n,fill:t}=i,e=n.options,r=n.getLabels().length,a=e.reverse?n.max:n.min,o=kp(t,n,a),s=[];if(e.grid.circular){let l=n.getPointPositionForValue(0,a);return new hr({x:l.x,y:l.y,radius:n.getDistanceFromCenterForValue(o)})}for(let l=0;l<r;++l)s.push(n.getPointPositionForValue(l,o));return s}function uo(i,n,t){let e=Pp(n),{chart:r,index:a,line:o,scale:s,axis:l}=n,c=o.options,d=c.fill,u=c.backgroundColor,{above:h=u,below:f=u}=d||{},m=r.getDatasetMeta(a),p=to(r,m);e&&o.points.length&&(Qi(i,t),Rp(i,{line:o,target:e,above:h,below:f,area:t,scale:s,axis:l,clip:p}),Xi(i))}function Rp(i,n){let{line:t,target:e,above:r,below:a,area:o,scale:s,clip:l}=n,c=t._loop?"angle":n.axis;i.save();let d=a;a!==r&&(c==="x"?(pc(i,e,o.top),ho(i,{line:t,target:e,color:r,scale:s,property:c,clip:l}),i.restore(),i.save(),pc(i,e,o.bottom)):c==="y"&&(gc(i,e,o.left),ho(i,{line:t,target:e,color:a,scale:s,property:c,clip:l}),i.restore(),i.save(),gc(i,e,o.right),d=r)),ho(i,{line:t,target:e,color:d,scale:s,property:c,clip:l}),i.restore()}function pc(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:l,end:c}=s,d=r[l],u=r[pr(l,c,r)];a?(i.moveTo(d.x,d.y),a=!1):(i.lineTo(d.x,t),i.lineTo(d.x,d.y)),o=!!n.pathSegment(i,s,{move:o}),o?i.closePath():i.lineTo(u.x,t)}i.lineTo(n.first().x,t),i.closePath(),i.clip()}function gc(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:l,end:c}=s,d=r[l],u=r[pr(l,c,r)];a?(i.moveTo(d.x,d.y),a=!1):(i.lineTo(t,d.y),i.lineTo(d.x,d.y)),o=!!n.pathSegment(i,s,{move:o}),o?i.closePath():i.lineTo(t,u.y)}i.lineTo(t,n.first().y),i.closePath(),i.clip()}function ho(i,n){let{line:t,target:e,property:r,color:a,scale:o,clip:s}=n,l=gp(t,e,r);for(let{source:c,target:d,start:u,end:h}of l){let{style:{backgroundColor:f=a}={}}=c,m=e!==!0;i.save(),i.fillStyle=f,Ep(i,o,s,m&&Do(r,u,h)),i.beginPath();let p=!!t.pathSegment(i,c),g;if(m){p?i.closePath():bc(i,e,h,r);let b=!!e.pathSegment(i,d,{move:p,reverse:!0});g=p&&b,g||bc(i,e,u,r)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function Ep(i,n,t,e){let r=n.chart.chartArea,{property:a,start:o,end:s}=e||{};if(a==="x"||a==="y"){let l,c,d,u;a==="x"?(l=o,c=r.top,d=s,u=r.bottom):(l=r.left,c=o,d=r.right,u=s),i.beginPath(),t&&(l=Math.max(l,t.left),d=Math.min(d,t.right),c=Math.max(c,t.top),u=Math.min(u,t.bottom)),i.rect(l,c,d-l,u-c),i.clip()}}function bc(i,n,t,e){let r=n.interpolate(t,e);r&&i.lineTo(r.x,r.y)}var Lp={id:"filler",afterDatasetsUpdate(i,n,t){let e=(i.data.datasets||[]).length,r=[],a,o,s,l;for(o=0;o<e;++o)a=i.getDatasetMeta(o),s=a.dataset,l=null,s&&s.options&&s instanceof mr&&(l={visible:i.isDatasetVisible(o),index:o,fill:vp(s,o,e),chart:i,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=l,r.push(l);for(o=0;o<e;++o)l=r[o],!(!l||l.fill===!1)&&(l.fill=_p(r,o,t.propagate))},beforeDraw(i,n,t){let e=t.drawTime==="beforeDraw",r=i.getSortedVisibleDatasetMetas(),a=i.chartArea;for(let o=r.length-1;o>=0;--o){let s=r[o].$filler;s&&(s.line.updateControlPoints(a,s.axis),e&&s.fill&&uo(i.ctx,s,a))}},beforeDatasetsDraw(i,n,t){if(t.drawTime!=="beforeDatasetsDraw")return;let e=i.getSortedVisibleDatasetMetas();for(let r=e.length-1;r>=0;--r){let a=e[r].$filler;mc(a)&&uo(i.ctx,a,i.chartArea)}},beforeDatasetDraw(i,n,t){let e=n.meta.$filler;!mc(e)||t.drawTime!=="beforeDatasetDraw"||uo(i.ctx,e,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},_c=(i,n)=>{let{boxHeight:t=n,boxWidth:e=n}=i;return i.usePointStyle&&(t=Math.min(t,n),e=i.pointStyleWidth||Math.min(e,n)),{boxWidth:e,boxHeight:t,itemHeight:Math.max(n,t)}},Fp=(i,n)=>i!==null&&n!==null&&i.datasetIndex===n.datasetIndex&&i.index===n.index,fr=class extends Qt{constructor(n){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=n.chart,this.options=n.options,this.ctx=n.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(n,t,e){this.maxWidth=n,this.maxHeight=t,this._margins=e,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let n=this.options.labels||{},t=J(n.generateLabels,[this.chart],this)||[];n.filter&&(t=t.filter(e=>n.filter(e,this.chart.data))),n.sort&&(t=t.sort((e,r)=>n.sort(e,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:n,ctx:t}=this;if(!n.display){this.width=this.height=0;return}let e=n.labels,r=dt(e.font),a=r.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=_c(e,a),c,d;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(o,a,s,l)+10):(d=this.maxHeight,c=this._fitCols(o,r,s,l)+10),this.width=Math.min(c,n.maxWidth||this.maxWidth),this.height=Math.min(d,n.maxHeight||this.maxHeight)}_fitRows(n,t,e,r){let{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=r+s,u=n;a.textAlign="left",a.textBaseline="middle";let h=-1,f=-d;return this.legendItems.forEach((m,p)=>{let g=e+t/2+a.measureText(m.text).width;(p===0||c[c.length-1]+g+2*s>o)&&(u+=d,c[c.length-(p>0?0:1)]=0,f+=d,h++),l[p]={left:0,top:f,row:h,width:g,height:r},c[c.length-1]+=g+s}),u}_fitCols(n,t,e,r){let{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=o-n,u=s,h=0,f=0,m=0,p=0;return this.legendItems.forEach((g,b)=>{let{itemWidth:_,itemHeight:k}=Bp(e,t,a,g,r);b>0&&f+k+2*s>d&&(u+=h+s,c.push({width:h,height:f}),m+=h+s,p++,h=f=0),l[b]={left:m,top:f,col:p,width:_,height:k},h=Math.max(h,_),f+=k+s}),u+=h,c.push({width:h,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let n=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:e,labels:{padding:r},rtl:a}}=this,o=Ye(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=vt(e,this.left+r,this.right-this.lineWidths[s]);for(let c of t)s!==c.row&&(s=c.row,l=vt(e,this.left+r,this.right-this.lineWidths[s])),c.top+=this.top+n+r,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+r}else{let s=0,l=vt(e,this.top+n+r,this.bottom-this.columnSizes[s].height);for(let c of t)c.col!==s&&(s=c.col,l=vt(e,this.top+n+r,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+r,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let n=this.ctx;Qi(n,this),this._draw(),Xi(n)}}_draw(){let{options:n,columnSizes:t,lineWidths:e,ctx:r}=this,{align:a,labels:o}=n,s=nt.color,l=Ye(n.rtl,this.left,this.width),c=dt(o.font),{padding:d}=o,u=c.size,h=u/2,f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;let{boxWidth:m,boxHeight:p,itemHeight:g}=_c(o,u),b=function(y,P,D){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;r.save();let S=N(D.lineWidth,1);if(r.fillStyle=N(D.fillStyle,s),r.lineCap=N(D.lineCap,"butt"),r.lineDashOffset=N(D.lineDashOffset,0),r.lineJoin=N(D.lineJoin,"miter"),r.lineWidth=S,r.strokeStyle=N(D.strokeStyle,s),r.setLineDash(N(D.lineDash,[])),o.usePointStyle){let L={radius:p*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:S},B=l.xPlus(y,m/2),W=P+h;Va(r,L,B,W,o.pointStyleWidth&&m)}else{let L=P+Math.max((u-p)/2,0),B=l.leftForLtr(y,m),W=De(D.borderRadius);r.beginPath(),Object.values(W).some(rt=>rt!==0)?vi(r,{x:B,y:L,w:m,h:p,radius:W}):r.rect(B,L,m,p),r.fill(),S!==0&&r.stroke()}r.restore()},_=function(y,P,D){Me(r,D.text,y,P+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},k=this.isHorizontal(),C=this._computeTitleHeight();k?f={x:vt(a,this.left+d,this.right-e[0]),y:this.top+d+C,line:0}:f={x:this.left+d,y:vt(a,this.top+C+d,this.bottom-t[0].height),line:0},Ga(this.ctx,n.textDirection);let v=g+d;this.legendItems.forEach((y,P)=>{r.strokeStyle=y.fontColor,r.fillStyle=y.fontColor;let D=r.measureText(y.text).width,S=l.textAlign(y.textAlign||(y.textAlign=o.textAlign)),L=m+h+D,B=f.x,W=f.y;l.setWidth(this.width),k?P>0&&B+L+d>this.right&&(W=f.y+=v,f.line++,B=f.x=vt(a,this.left+d,this.right-e[f.line])):P>0&&W+v>this.bottom&&(B=f.x=B+t[f.line].width+d,f.line++,W=f.y=vt(a,this.top+C+d,this.bottom-t[f.line].height));let rt=l.x(B);if(b(rt,W,y),B=_l(S,B+m+h,k?B+L:this.right,n.rtl),_(l.x(B),W,y),k)f.x+=L+d;else if(typeof y.text!="string"){let bt=c.lineHeight;f.y+=Jc(y,bt)+d}else f.y+=v}),Ka(this.ctx,n.textDirection)}drawTitle(){let n=this.options,t=n.title,e=dt(t.font),r=xt(t.padding);if(!t.display)return;let a=Ye(n.rtl,this.left,this.width),o=this.ctx,s=t.position,l=e.size/2,c=r.top+l,d,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),d=this.top+c,u=vt(n.align,u,this.right-h);else{let m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);d=c+vt(n.align,this.top,this.bottom-m-n.labels.padding-this._computeTitleHeight())}let f=vt(s,u,u+h);o.textAlign=a.textAlign(qn(s)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=e.string,Me(o,t.text,f,d,e)}_computeTitleHeight(){let n=this.options.title,t=dt(n.font),e=xt(n.padding);return n.display?t.lineHeight+e.height:0}_getLegendItemAt(n,t){let e,r,a;if(te(n,this.left,this.right)&&te(t,this.top,this.bottom)){for(a=this.legendHitBoxes,e=0;e<a.length;++e)if(r=a[e],te(n,r.left,r.left+r.width)&&te(t,r.top,r.top+r.height))return this.legendItems[e]}return null}handleEvent(n){let t=this.options;if(!Wp(n.type,t))return;let e=this._getLegendItemAt(n.x,n.y);if(n.type==="mousemove"||n.type==="mouseout"){let r=this._hoveredItem,a=Fp(r,e);r&&!a&&J(t.onLeave,[n,r,this],this),this._hoveredItem=e,e&&!a&&J(t.onHover,[n,e,this],this)}else e&&J(t.onClick,[n,e,this],this)}};function Bp(i,n,t,e,r){let a=zp(e,i,n,t),o=Np(r,e,n.lineHeight);return{itemWidth:a,itemHeight:o}}function zp(i,n,t,e){let r=i.text;return r&&typeof r!="string"&&(r=r.reduce((a,o)=>a.length>o.length?a:o)),n+t.size/2+e.measureText(r).width}function Np(i,n,t){let e=i;return typeof n.text!="string"&&(e=Jc(n,t)),e}function Jc(i,n){let t=i.text?i.text.length:0;return n*t}function Wp(i,n){return!!((i==="mousemove"||i==="mouseout")&&(n.onHover||n.onLeave)||n.onClick&&(i==="click"||i==="mouseup"))}var Hp={id:"legend",_element:fr,start(i,n,t){let e=i.legend=new fr({ctx:i.ctx,options:t,chart:i});wt.configure(i,e,t),wt.addBox(i,e)},stop(i){wt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,n,t){let e=i.legend;wt.configure(i,e,t),e.options=t},afterUpdate(i){let n=i.legend;n.buildLabels(),n.adjustHitBoxes()},afterEvent(i,n){n.replay||i.legend.handleEvent(n.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,n,t){let e=n.datasetIndex,r=t.chart;r.isDatasetVisible(e)?(r.hide(e),n.hidden=!0):(r.show(e),n.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let n=i.data.datasets,{labels:{usePointStyle:t,pointStyle:e,textAlign:r,color:a,useBorderRadius:o,borderRadius:s}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),d=xt(c.borderWidth);return{text:n[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:e||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},an=class extends Qt{constructor(n){super(),this.chart=n.chart,this.options=n.options,this.ctx=n.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(n,t){let e=this.options;if(this.left=0,this.top=0,!e.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=n,this.height=this.bottom=t;let r=et(e.text)?e.text.length:1;this._padding=xt(e.padding);let a=r*dt(e.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let n=this.options.position;return n==="top"||n==="bottom"}_drawArgs(n){let{top:t,left:e,bottom:r,right:a,options:o}=this,s=o.align,l=0,c,d,u;return this.isHorizontal()?(d=vt(s,e,a),u=t+n,c=a-e):(o.position==="left"?(d=e+n,u=vt(s,r,t),l=Q*-.5):(d=a-n,u=vt(s,t,r),l=Q*.5),c=r-t),{titleX:d,titleY:u,maxWidth:c,rotation:l}}draw(){let n=this.ctx,t=this.options;if(!t.display)return;let e=dt(t.font),a=e.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:l,rotation:c}=this._drawArgs(a);Me(n,t.text,0,0,e,{color:t.color,maxWidth:l,rotation:c,textAlign:qn(t.align),textBaseline:"middle",translation:[o,s]})}};function Vp(i,n){let t=new an({ctx:i.ctx,options:n,chart:i});wt.configure(i,t,n),wt.addBox(i,t),i.titleBlock=t}var Yp={id:"title",_element:an,start(i,n,t){Vp(i,t)},stop(i){let n=i.titleBlock;wt.removeBox(i,n),delete i.titleBlock},beforeUpdate(i,n,t){let e=i.titleBlock;wt.configure(i,e,t),e.options=t},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}},nr=new WeakMap,Up={id:"subtitle",start(i,n,t){let e=new an({ctx:i.ctx,options:t,chart:i});wt.configure(i,e,t),wt.addBox(i,e),nr.set(i,e)},stop(i){wt.removeBox(i,nr.get(i)),nr.delete(i)},beforeUpdate(i,n,t){let e=nr.get(i);wt.configure(i,e,t),e.options=t},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}},nn={average(i){if(!i.length)return!1;let n,t,e=new Set,r=0,a=0;for(n=0,t=i.length;n<t;++n){let s=i[n].element;if(s&&s.hasValue()){let l=s.tooltipPosition();e.add(l.x),r+=l.y,++a}}return a===0||e.size===0?!1:{x:[...e].reduce((s,l)=>s+l)/e.size,y:r/a}},nearest(i,n){if(!i.length)return!1;let t=n.x,e=n.y,r=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=i.length;a<o;++a){let l=i[a].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),d=Hn(n,c);d<r&&(r=d,s=l)}}if(s){let l=s.tooltipPosition();t=l.x,e=l.y}return{x:t,y:e}}};function ee(i,n){return n&&(et(n)?Array.prototype.push.apply(i,n):i.push(n)),i}function he(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
6
6
  `)>-1?i.split(`
7
- `):i}function jp(i,n){let{element:t,datasetIndex:e,index:r}=n,a=i.getDatasetMeta(e).controller,{label:o,value:s}=a.getLabelAndValue(r);return{chart:i,label:o,parsed:a.getParsed(r),raw:i.data.datasets[e].data[r],formattedValue:s,dataset:a.getDataset(),dataIndex:r,datasetIndex:e,element:t}}function vc(i,n){let t=i.chart.ctx,{body:e,footer:r,title:a}=i,{boxWidth:o,boxHeight:s}=n,l=dt(n.bodyFont),c=dt(n.titleFont),d=dt(n.footerFont),u=a.length,h=r.length,f=e.length,m=xt(n.padding),p=m.height,g=0,b=e.reduce((C,v)=>C+v.before.length+v.lines.length+v.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*n.titleSpacing+n.titleMarginBottom),b){let C=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=f*C+(b-f)*l.lineHeight+(b-1)*n.bodySpacing}h&&(p+=n.footerMarginTop+h*d.lineHeight+(h-1)*n.footerSpacing);let _=0,k=function(C){g=Math.max(g,t.measureText(C).width+_)};return t.save(),t.font=c.string,G(i.title,k),t.font=l.string,G(i.beforeBody.concat(i.afterBody),k),_=n.displayColors?o+2+n.boxPadding:0,G(e,C=>{G(C.before,k),G(C.lines,k),G(C.after,k)}),_=0,t.font=d.string,G(i.footer,k),t.restore(),g+=m.width,{width:g,height:p}}function qp(i,n){let{y:t,height:e}=n;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}function $p(i,n,t,e){let{x:r,width:a}=e,o=t.caretSize+t.caretPadding;if(i==="left"&&r+a+o>n.width||i==="right"&&r-a-o<0)return!0}function Qp(i,n,t,e){let{x:r,width:a}=t,{width:o,chartArea:{left:s,right:l}}=i,c="center";return e==="center"?c=r<=(s+l)/2?"left":"right":r<=a/2?c="left":r>=o-a/2&&(c="right"),$p(c,i,n,t)&&(c="center"),c}function xc(i,n,t){let e=t.yAlign||n.yAlign||qp(i,t);return{xAlign:t.xAlign||n.xAlign||Qp(i,n,t,e),yAlign:e}}function Xp(i,n){let{x:t,width:e}=i;return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Gp(i,n,t){let{y:e,height:r}=i;return n==="top"?e+=t:n==="bottom"?e-=r+t:e-=r/2,e}function yc(i,n,t,e){let{caretSize:r,caretPadding:a,cornerRadius:o}=i,{xAlign:s,yAlign:l}=t,c=r+a,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:f}=Me(o),m=Xp(n,s),p=Gp(n,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(d,h)+r:s==="right"&&(m+=Math.max(u,f)+r),{x:pt(m,0,e.width-n.width),y:pt(p,0,e.height-n.height)}}function rr(i,n,t){let e=xt(t.padding);return n==="center"?i.x+i.width/2:n==="right"?i.x+i.width-e.right:i.x+e.left}function kc(i){return ee([],he(i))}function Kp(i,n,t){return de(i,{tooltip:n,tooltipItems:t,type:"tooltip"})}function wc(i,n){let t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?i.override(t):i}var td={beforeTitle:Jt,title(i){if(i.length>0){let n=i[0],t=n.chart.data.labels,e=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(e>0&&n.dataIndex<e)return t[n.dataIndex]}return""},afterTitle:Jt,beforeBody:Jt,beforeLabel:Jt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let n=i.dataset.label||"";n&&(n+=": ");let t=i.formattedValue;return U(t)||(n+=t),n},labelColor(i){let t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){let t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Jt,afterBody:Jt,beforeFooter:Jt,footer:Jt,afterFooter:Jt};function Ot(i,n,t,e){let r=i[n].call(t,e);return typeof r>"u"?td[n].call(t,e):r}var Cc=(()=>{class i extends Qt{static positioners=en;constructor(t){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=t.chart,this.options=t.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(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&e.options.animation&&r.animations,o=new lr(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Kp(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:r}=e,a=Ot(r,"beforeTitle",this,t),o=Ot(r,"title",this,t),s=Ot(r,"afterTitle",this,t),l=[];return l=ee(l,he(a)),l=ee(l,he(o)),l=ee(l,he(s)),l}getBeforeBody(t,e){return kc(Ot(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:r}=e,a=[];return G(t,o=>{let s={before:[],lines:[],after:[]},l=wc(r,o);ee(s.before,he(Ot(l,"beforeLabel",this,o))),ee(s.lines,Ot(l,"label",this,o)),ee(s.after,he(Ot(l,"afterLabel",this,o))),a.push(s)}),a}getAfterBody(t,e){return kc(Ot(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:r}=e,a=Ot(r,"beforeFooter",this,t),o=Ot(r,"footer",this,t),s=Ot(r,"afterFooter",this,t),l=[];return l=ee(l,he(a)),l=ee(l,he(o)),l=ee(l,he(s)),l}_createItems(t){let e=this._active,r=this.chart.data,a=[],o=[],s=[],l=[],c,d;for(c=0,d=e.length;c<d;++c)l.push(jp(this.chart,e[c]));return t.filter&&(l=l.filter((u,h,f)=>t.filter(u,h,f,r))),t.itemSort&&(l=l.sort((u,h)=>t.itemSort(u,h,r))),G(l,u=>{let h=wc(t.callbacks,u);a.push(Ot(h,"labelColor",this,u)),o.push(Ot(h,"labelPointStyle",this,u)),s.push(Ot(h,"labelTextColor",this,u))}),this.labelColors=a,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){let r=this.options.setContext(this.getContext()),a=this._active,o,s=[];if(!a.length)this.opacity!==0&&(o={opacity:0});else{let l=en[r.position].call(this,a,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);let c=this._size=vc(this,r),d=Object.assign({},l,c),u=xc(this.chart,r,d),h=yc(r,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,r,a){let o=this.getCaretPosition(t,r,a);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,r){let{xAlign:a,yAlign:o}=this,{caretSize:s,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:h}=Me(l),{x:f,y:m}=t,{width:p,height:g}=e,b,_,k,C,v,y;return o==="center"?(v=m+g/2,a==="left"?(b=f,_=b-s,C=v+s,y=v-s):(b=f+p,_=b+s,C=v-s,y=v+s),k=b):(a==="left"?_=f+Math.max(c,u)+s:a==="right"?_=f+p-Math.max(d,h)-s:_=this.caretX,o==="top"?(C=m,v=C-s,b=_-s,k=_+s):(C=m+g,v=C+s,b=_+s,k=_-s),y=C),{x1:b,x2:_,x3:k,y1:C,y2:v,y3:y}}drawTitle(t,e,r){let a=this.title,o=a.length,s,l,c;if(o){let d=Ve(r.rtl,this.x,this.width);for(t.x=rr(this,r.titleAlign,r),e.textAlign=d.textAlign(r.titleAlign),e.textBaseline="middle",s=dt(r.titleFont),l=r.titleSpacing,e.fillStyle=r.titleColor,e.font=s.string,c=0;c<o;++c)e.fillText(a[c],d.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+l,c+1===o&&(t.y+=r.titleMarginBottom-l)}}_drawColorBox(t,e,r,a,o){let s=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=o,u=dt(o.bodyFont),h=rr(this,"left",o),f=a.x(h),m=c<u.lineHeight?(u.lineHeight-c)/2:0,p=e.y+m;if(o.usePointStyle){let g={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=a.leftForLtr(f,d)+d/2,_=p+c/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Qn(t,g,b,_),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Qn(t,g,b,_)}else{t.lineWidth=j(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;let g=a.leftForLtr(f,d),b=a.leftForLtr(a.xPlus(f,1),d-2),_=Me(s.borderRadius);Object.values(_).some(k=>k!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,_i(t,{x:g,y:p,w:d,h:c,radius:_}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),_i(t,{x:b,y:p+1,w:d-2,h:c-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,d,c),t.strokeRect(g,p,d,c),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,d-2,c-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){let{body:a}=this,{bodySpacing:o,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:u}=r,h=dt(r.bodyFont),f=h.lineHeight,m=0,p=Ve(r.rtl,this.x,this.width),g=function(S){e.fillText(S,p.x(t.x+m),t.y+f/2),t.y+=f+o},b=p.textAlign(s),_,k,C,v,y,P,D;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=rr(this,b,r),e.fillStyle=r.bodyColor,G(this.beforeBody,g),m=l&&b!=="right"?s==="center"?d/2+u:d+2+u:0,v=0,P=a.length;v<P;++v){for(_=a[v],k=this.labelTextColors[v],e.fillStyle=k,G(_.before,g),C=_.lines,l&&C.length&&(this._drawColorBox(e,t,v,p,r),f=Math.max(h.lineHeight,c)),y=0,D=C.length;y<D;++y)g(C[y]),f=h.lineHeight;G(_.after,g)}m=0,f=h.lineHeight,G(this.afterBody,g),t.y-=o}drawFooter(t,e,r){let a=this.footer,o=a.length,s,l;if(o){let c=Ve(r.rtl,this.x,this.width);for(t.x=rr(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=c.textAlign(r.footerAlign),e.textBaseline="middle",s=dt(r.footerFont),e.fillStyle=r.footerColor,e.font=s.string,l=0;l<o;++l)e.fillText(a[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,e,r,a){let{xAlign:o,yAlign:s}=this,{x:l,y:c}=t,{width:d,height:u}=r,{topLeft:h,topRight:f,bottomLeft:m,bottomRight:p}=Me(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(l+h,c),s==="top"&&this.drawCaret(t,e,r,a),e.lineTo(l+d-f,c),e.quadraticCurveTo(l+d,c,l+d,c+f),s==="center"&&o==="right"&&this.drawCaret(t,e,r,a),e.lineTo(l+d,c+u-p),e.quadraticCurveTo(l+d,c+u,l+d-p,c+u),s==="bottom"&&this.drawCaret(t,e,r,a),e.lineTo(l+m,c+u),e.quadraticCurveTo(l,c+u,l,c+u-m),s==="center"&&o==="left"&&this.drawCaret(t,e,r,a),e.lineTo(l,c+h),e.quadraticCurveTo(l,c,l+h,c),e.closePath(),e.fill(),a.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,r=this.$animations,a=r&&r.x,o=r&&r.y;if(a||o){let s=en[t.position].call(this,this._active,this._eventPosition);if(!s)return;let l=this._size=vc(this,t),c=Object.assign({},s,this._size),d=xc(e,t,c),u=yc(t,c,d,e);(a._to!==u.x||o._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(e);let a={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let s=xt(e.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&l&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,a,e),Ga(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Ka(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let r=this._active,a=t.map(({datasetIndex:l,index:c})=>{let d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),o=!ji(r,a),s=this._positionChanged(a,e);(o||s)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,r=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let a=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,r),l=this._positionChanged(s,t),c=e||!ji(s,o)||l;return c&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,r,a){let o=this.options;if(t.type==="mouseout")return[];if(!a)return e.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,e){let{caretX:r,caretY:a,options:o}=this,s=en[o.position].call(this,t,e);return s!==!1&&(r!==s.x||a!==s.y)}}return i})(),Zp={id:"tooltip",_element:Cc,positioners:en,afterInit(i,n,t){t&&(i.tooltip=new Cc({chart:i,options:t}))},beforeUpdate(i,n,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,n,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){let n=i.tooltip;if(n&&n._willRender()){let t={tooltip:n};if(i.notifyPlugins("beforeTooltipDraw",_n(ti({},t),{cancelable:!0}))===!1)return;n.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,n){if(i.tooltip){let t=n.replay;i.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(i,n)=>n.bodyFont.size,boxWidth:(i,n)=>n.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:td},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Jp=Object.freeze({__proto__:null,Colors:up,Decimation:pp,Filler:Lp,Legend:Hp,SubTitle:Up,Title:Yp,Tooltip:Zp}),tg=(i,n,t,e)=>(typeof n=="string"?(t=i.push(n)-1,e.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function eg(i,n,t,e){let r=i.indexOf(n);if(r===-1)return tg(i,n,t,e);let a=i.lastIndexOf(n);return r!==a?t:r}var ig=(i,n)=>i===null?null:pt(Math.round(i),0,n);function Tc(i){let n=this.getLabels();return i>=0&&i<n.length?n[i]:i}var ng=(()=>{class i extends je{static id="category";static defaults={ticks:{callback:Tc}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let r=this.getLabels();for(let{index:a,label:o}of e)r[a]===o&&r.splice(a,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(U(t))return null;let r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:eg(r,t,N(e,t),this._addedLabels),ig(e,r.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),e||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){let t=this.min,e=this.max,r=this.options.offset,a=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=e;s++)a.push({value:s});return a}getLabelForValue(t){return Tc.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return i})();function rg(i,n){let t=[],{bounds:r,step:a,min:o,max:s,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=a||1,m=d-1,{min:p,max:g}=n,b=!U(o),_=!U(s),k=!U(c),C=(g-p)/(u+1),v=Sa((g-p)/m/f)*f,y,P,D,S;if(v<1e-14&&!b&&!_)return[{value:p},{value:g}];S=Math.ceil(g/v)-Math.floor(p/v),S>m&&(v=Sa(S*v/m/f)*f),U(l)||(y=Math.pow(10,l),v=Math.ceil(v*y)/y),r==="ticks"?(P=Math.floor(p/v)*v,D=Math.ceil(g/v)*v):(P=p,D=g),b&&_&&a&&ul((s-o)/a,v/1e3)?(S=Math.round(Math.min((s-o)/v,d)),v=(s-o)/S,P=o,D=s):k?(P=b?o:P,D=_?s:D,S=c-1,v=(D-P)/S):(S=(D-P)/v,pi(S,Math.round(S),v/1e3)?S=Math.round(S):S=Math.ceil(S));let L=Math.max(Ia(v),Ia(P));y=Math.pow(10,U(l)?L:l),P=Math.round(P*y)/y,D=Math.round(D*y)/y;let B=0;for(b&&(h&&P!==o?(t.push({value:o}),P<o&&B++,pi(Math.round((P+B*v)*y)/y,o,Mc(o,C,i))&&B++):P<o&&B++);B<S;++B){let W=Math.round((P+B*v)*y)/y;if(_&&W>s)break;t.push({value:W})}return _&&h&&D!==s?t.length&&pi(t[t.length-1].value,s,Mc(s,C,i))?t[t.length-1].value=s:t.push({value:s}):(!_||D===s)&&t.push({value:D}),t}function Mc(i,n,{horizontal:t,minRotation:e}){let r=Ht(e),a=(t?Math.sin(r):Math.cos(r))||.001,o=.75*n*(""+i).length;return Math.min(n/a,o)}var ki=class extends je{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return U(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){let{beginAtZero:n}=this.options,{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:r,max:a}=this,o=l=>r=t?r:l,s=l=>a=e?a:l;if(n){let l=$t(r),c=$t(a);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(r===a){let l=a===0?1:Math.abs(a*.05);s(a+l),n||o(r-l)}this.min=r,this.max=a}getTickLimit(){let n=this.options.ticks,{maxTicksLimit:t,stepSize:e}=n,r;return e?(r=Math.ceil(this.max/e)-Math.floor(this.min/e)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${e} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let n=this.options,t=n.ticks,e=this.getTickLimit();e=Math.max(2,e);let r={maxTicks:e,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},a=this._range||this,o=rg(r,a);return n.bounds==="ticks"&&Oa(o,this,"value"),n.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let n=this.ticks,t=this.min,e=this.max;if(super.configure(),this.options.offset&&n.length){let r=(e-t)/Math.max(n.length-1,1)/2;t-=r,e+=r}this._startValue=t,this._endValue=e,this._valueRange=e-t}getLabelForValue(n){return bi(n,this.chart.options.locale,this.options.ticks.format)}},Po=class extends ki{static id="linear";static defaults={ticks:{callback:qi.formatters.numeric}};determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=at(n)?n:0,this.max=at(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let n=this.isHorizontal(),t=n?this.width:this.height,e=Ht(this.options.ticks.minRotation),r=(n?Math.sin(e):Math.cos(e))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,a.lineHeight/r))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}},an=i=>Math.floor(le(i)),Ue=(i,n)=>Math.pow(10,an(i)+n);function Dc(i){return i/Math.pow(10,an(i))===1}function Pc(i,n,t){let e=Math.pow(10,t),r=Math.floor(i/e);return Math.ceil(n/e)-r}function ag(i,n){let t=n-i,e=an(t);for(;Pc(i,n,e)>10;)e++;for(;Pc(i,n,e)<10;)e--;return Math.min(e,an(i))}function og(i,{min:n,max:t}){n=St(i.min,n);let e=[],r=an(n),a=ag(n,t),o=a<0?Math.pow(10,Math.abs(a)):1,s=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((n-l)*o)/o,d=Math.floor((n-l)/s/10)*s*10,u=Math.floor((c-d)/Math.pow(10,a)),h=St(i.min,Math.round((l+d+u*Math.pow(10,a))*o)/o);for(;h<t;)e.push({value:h,major:Dc(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(a++,u=2,o=a>=0?1:o),h=Math.round((l+d+u*Math.pow(10,a))*o)/o;let f=St(i.max,h);return e.push({value:f,major:Dc(f),significand:u}),e}var So=class extends je{static id="logarithmic";static defaults={ticks:{callback:qi.formatters.logarithmic,major:{enabled:!0}}};constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){let e=ki.prototype.parse.apply(this,[n,t]);if(e===0){this._zero=!0;return}return at(e)&&e>0?e:null}determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=at(n)?Math.max(0,n):null,this.max=at(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!at(this._userMin)&&(this.min=n===Ue(this.min,0)?Ue(this.min,-1):Ue(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:n,maxDefined:t}=this.getUserBounds(),e=this.min,r=this.max,a=s=>e=n?e:s,o=s=>r=t?r:s;e===r&&(e<=0?(a(1),o(10)):(a(Ue(e,-1)),o(Ue(r,1)))),e<=0&&a(Ue(r,-1)),r<=0&&o(Ue(e,1)),this.min=e,this.max=r}buildTicks(){let n=this.options,t={min:this._userMin,max:this._userMax},e=og(t,this);return n.bounds==="ticks"&&Oa(e,this,"value"),n.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(n){return n===void 0?"0":bi(n,this.chart.options.locale,this.options.ticks.format)}configure(){let n=this.min;super.configure(),this._startValue=le(n),this._valueRange=le(this.max)-le(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(le(n)-this._startValue)/this._valueRange)}getValueForPixel(n){let t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}};function Oo(i){let n=i.ticks;if(n.display&&i.display){let t=xt(n.backdropPadding);return N(n.font&&n.font.size,nt.font.size)+t.height}return 0}function sg(i,n,t){return t=et(t)?t:[t],{w:xl(i,n.string,t),h:t.length*n.lineHeight}}function Sc(i,n,t,e,r){return i===e||i===r?{start:n-t/2,end:n+t/2}:i<e||i>r?{start:n-t,end:n}:{start:n,end:n+t}}function lg(i){let n={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},n),e=[],r=[],a=i._pointLabels.length,o=i.options.pointLabels,s=o.centerPointLabels?Q/a:0;for(let l=0;l<a;l++){let c=o.setContext(i.getPointLabelContext(l));r[l]=c.padding;let d=i.getPointPosition(l,i.drawingArea+r[l],s),u=dt(c.font),h=sg(i.ctx,u,i._pointLabels[l]);e[l]=h;let f=_t(i.getIndexAngle(l)+s),m=Math.round(Un(f)),p=Sc(m,d.x,h.w,0,180),g=Sc(m,d.y,h.h,90,270);cg(t,n,f,p,g)}i.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),i._pointLabelItems=hg(i,e,r)}function cg(i,n,t,e,r){let a=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t)),s=0,l=0;e.start<n.l?(s=(n.l-e.start)/a,i.l=Math.min(i.l,n.l-s)):e.end>n.r&&(s=(e.end-n.r)/a,i.r=Math.max(i.r,n.r+s)),r.start<n.t?(l=(n.t-r.start)/o,i.t=Math.min(i.t,n.t-l)):r.end>n.b&&(l=(r.end-n.b)/o,i.b=Math.max(i.b,n.b+l))}function dg(i,n,t){let e=i.drawingArea,{extra:r,additionalAngle:a,padding:o,size:s}=t,l=i.getPointPosition(n,e+r+o,a),c=Math.round(Un(_t(l.angle+lt))),d=pg(l.y,s.h,c),u=fg(c),h=mg(l.x,s.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:h,top:d,right:h+s.w,bottom:d+s.h}}function ug(i,n){if(!n)return!0;let{left:t,top:e,right:r,bottom:a}=i;return!(Zt({x:t,y:e},n)||Zt({x:t,y:a},n)||Zt({x:r,y:e},n)||Zt({x:r,y:a},n))}function hg(i,n,t){let e=[],r=i._pointLabels.length,a=i.options,{centerPointLabels:o,display:s}=a.pointLabels,l={extra:Oo(a)/2,additionalAngle:o?Q/r:0},c;for(let d=0;d<r;d++){l.padding=t[d],l.size=n[d];let u=dg(i,d,l);e.push(u),s==="auto"&&(u.visible=ug(u,c),u.visible&&(c=u))}return e}function fg(i){return i===0||i===180?"center":i<180?"left":"right"}function mg(i,n,t){return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function pg(i,n,t){return t===90||t===270?i-=n/2:(t>270||t<90)&&(i-=n),i}function gg(i,n,t){let{left:e,top:r,right:a,bottom:o}=t,{backdropColor:s}=n;if(!U(s)){let l=Me(n.borderRadius),c=xt(n.backdropPadding);i.fillStyle=s;let d=e-c.left,u=r-c.top,h=a-e+c.width,f=o-r+c.height;Object.values(l).some(m=>m!==0)?(i.beginPath(),_i(i,{x:d,y:u,w:h,h:f,radius:l}),i.fill()):i.fillRect(d,u,h,f)}}function bg(i,n){let{ctx:t,options:{pointLabels:e}}=i;for(let r=n-1;r>=0;r--){let a=i._pointLabelItems[r];if(!a.visible)continue;let o=e.setContext(i.getPointLabelContext(r));gg(t,o,a);let s=dt(o.font),{x:l,y:c,textAlign:d}=a;Te(t,i._pointLabels[r],l,c+s.lineHeight/2,s,{color:o.color,textAlign:d,textBaseline:"middle"})}}function ed(i,n,t,e){let{ctx:r}=i;if(t)r.arc(i.xCenter,i.yCenter,n,0,it);else{let a=i.getPointPosition(0,n);r.moveTo(a.x,a.y);for(let o=1;o<e;o++)a=i.getPointPosition(o,n),r.lineTo(a.x,a.y)}}function _g(i,n,t,e,r){let a=i.ctx,o=n.circular,{color:s,lineWidth:l}=n;!o&&!e||!s||!l||t<0||(a.save(),a.strokeStyle=s,a.lineWidth=l,a.setLineDash(r.dash||[]),a.lineDashOffset=r.dashOffset,a.beginPath(),ed(i,t,o,e),a.closePath(),a.stroke(),a.restore())}function vg(i,n,t){return de(i,{label:t,index:n,type:"pointLabel"})}var Io=class extends ki{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:qi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let n=this._padding=xt(Oo(this.options)/2),t=this.width=this.maxWidth-n.width,e=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+e/2+n.top),this.drawingArea=Math.floor(Math.min(t,e)/2)}determineDataLimits(){let{min:n,max:t}=this.getMinMax(!1);this.min=at(n)&&!isNaN(n)?n:0,this.max=at(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Oo(this.options))}generateTickLabels(n){ki.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,e)=>{let r=J(this.options.pointLabels.callback,[t,e],this);return r||r===0?r:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let n=this.options;n.display&&n.pointLabels.display?lg(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,e,r){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((e-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,e,r))}getIndexAngle(n){let t=it/(this._pointLabels.length||1),e=this.options.startAngle||0;return _t(n*t+Ht(e))}getDistanceFromCenterForValue(n){if(U(n))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(U(n))return NaN;let t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){let t=this._pointLabels||[];if(n>=0&&n<t.length){let e=t[n];return vg(this.getContext(),n,e)}}getPointPosition(n,t,e=0){let r=this.getIndexAngle(n)-lt+e;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){let{left:t,top:e,right:r,bottom:a}=this._pointLabelItems[n];return{left:t,top:e,right:r,bottom:a}}drawBackground(){let{backgroundColor:n,grid:{circular:t}}=this.options;if(n){let e=this.ctx;e.save(),e.beginPath(),ed(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),e.closePath(),e.fillStyle=n,e.fill(),e.restore()}}drawGrid(){let n=this.ctx,t=this.options,{angleLines:e,grid:r,border:a}=t,o=this._pointLabels.length,s,l,c;if(t.pointLabels.display&&bg(this,o),r.display&&this.ticks.forEach((d,u)=>{if(u!==0||u===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=r.setContext(h),m=a.setContext(h);_g(this,f,l,o,m)}}),e.display){for(n.save(),s=o-1;s>=0;s--){let d=e.setContext(this.getPointLabelContext(s)),{color:u,lineWidth:h}=d;!h||!u||(n.lineWidth=h,n.strokeStyle=u,n.setLineDash(d.borderDash),n.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(s,l),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(c.x,c.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){let n=this.ctx,t=this.options,e=t.ticks;if(!e.display)return;let r=this.getIndexAngle(0),a,o;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(r),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=e.setContext(this.getContext(l)),d=dt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){n.font=d.string,o=n.measureText(s.label).width,n.fillStyle=c.backdropColor;let u=xt(c.backdropPadding);n.fillRect(-o/2-u.left,-a-d.size/2-u.top,o+u.width,d.size+u.height)}Te(n,s.label,0,-a,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),n.restore()}drawTitle(){}},gr={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}},It=Object.keys(gr);function Oc(i,n){return i-n}function Ic(i,n){if(U(n))return null;let t=i._adapter,{parser:e,round:r,isoWeekday:a}=i._parseOpts,o=n;return typeof e=="function"&&(o=e(o)),at(o)||(o=typeof e=="string"?t.parse(o,e):t.parse(o)),o===null?null:(r&&(o=r==="week"&&(He(a)||a===!0)?t.startOf(o,"isoWeek",a):t.startOf(o,r)),+o)}function Ac(i,n,t,e){let r=It.length;for(let a=It.indexOf(i);a<r-1;++a){let o=gr[It[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((t-n)/(s*o.size))<=e)return It[a]}return It[r-1]}function xg(i,n,t,e,r){for(let a=It.length-1;a>=It.indexOf(t);a--){let o=It[a];if(gr[o].common&&i._adapter.diff(r,e,o)>=n-1)return o}return It[t?It.indexOf(t):0]}function yg(i){for(let n=It.indexOf(i)+1,t=It.length;n<t;++n)if(gr[It[n]].common)return It[n]}function Rc(i,n,t){if(!t)i[n]=!0;else if(t.length){let{lo:e,hi:r}=jn(t,n),a=t[e]>=n?t[e]:t[r];i[a]=!0}}function kg(i,n,t,e){let r=i._adapter,a=+r.startOf(n[0].value,e),o=n[n.length-1].value,s,l;for(s=a;s<=o;s=+r.add(s,1,e))l=t[s],l>=0&&(n[l].major=!0);return n}function Ec(i,n,t){let e=[],r={},a=n.length,o,s;for(o=0;o<a;++o)s=n[o],r[s]=o,e.push({value:s,major:!1});return a===0||!t?e:kg(i,e,r,t)}var Ao=(()=>{class i extends je{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let r=t.time||(t.time={}),a=this._adapter=new Lo._date(t.adapters.date);a.init(e),fi(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Ic(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,r=t.time.unit||"day",{min:a,max:o,minDefined:s,maxDefined:l}=this.getUserBounds();function c(d){!s&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!l&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!s||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),a=at(a)&&!isNaN(a)?a:+e.startOf(Date.now(),r),o=at(o)&&!isNaN(o)?o:+e.endOf(Date.now(),r)+1,this.min=Math.min(a,o-1),this.max=Math.max(a+1,o)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],r=t[t.length-1]),{min:e,max:r}}buildTicks(){let t=this.options,e=t.time,r=t.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);let o=this.min,s=this.max,l=ml(a,o,s);return this._unit=e.unit||(r.autoSkip?Ac(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):xg(this,l.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:yg(this._unit),this.initOffsets(a),t.reverse&&l.reverse(),Ec(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,r=0,a,o;this.options.offset&&t.length&&(a=this.getDecimalForValue(t[0]),t.length===1?e=1-a:e=(this.getDecimalForValue(t[1])-a)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);let s=t.length<3?.5:.25;e=pt(e,0,s),r=pt(r,0,s),this._offsets={start:e,end:r,factor:1/(e+1+r)}}_generate(){let t=this._adapter,e=this.min,r=this.max,a=this.options,o=a.time,s=o.unit||Ac(o.minUnit,e,r,this._getLabelCapacity(e)),l=N(a.ticks.stepSize,1),c=s==="week"?o.isoWeekday:!1,d=He(c)||c===!0,u={},h=e,f,m;if(d&&(h=+t.startOf(h,"isoWeek",c)),h=+t.startOf(h,d?"day":s),t.diff(r,e,s)>1e5*l)throw new Error(e+" and "+r+" are too far apart with stepSize of "+l+" "+s);let p=a.ticks.source==="data"&&this.getDataTimestamps();for(f=h,m=0;f<r;f=+t.add(f,l,s),m++)Rc(u,f,p);return(f===r||a.bounds==="ticks"||m===1)&&Rc(u,f,p),Object.keys(u).sort(Oc).map(g=>+g)}getLabelForValue(t){let e=this._adapter,r=this.options.time;return r.tooltipFormat?e.format(t,r.tooltipFormat):e.format(t,r.displayFormats.datetime)}format(t,e){let a=this.options.time.displayFormats,o=this._unit,s=e||a[o];return this._adapter.format(t,s)}_tickFormatFunction(t,e,r,a){let o=this.options,s=o.ticks.callback;if(s)return J(s,[t,e,r],this);let l=o.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&l[c],h=d&&l[d],f=r[e],m=d&&h&&f&&f.major;return this._adapter.format(t,a||(m?h:u))}generateTickLabels(t){let e,r,a;for(e=0,r=t.length;e<r;++e)a=t[e],a.label=this._tickFormatFunction(a.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+r)*e.factor)}getValueForPixel(t){let e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,r=this.ctx.measureText(t).width,a=Ht(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(a),s=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:r*o+l*s,h:r*s+l*o}}_getLabelCapacity(t){let e=this.options.time,r=e.displayFormats,a=r[e.unit]||r.millisecond,o=this._tickFormatFunction(t,0,Ec(this,[t],this._majorUnit),a),s=this._getLabelSize(o),l=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],e,r;if(t.length)return t;let a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(e=0,r=a.length;e<r;++e)t=t.concat(a[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,r;if(t.length)return t;let a=this.getLabels();for(e=0,r=a.length;e<r;++e)t.push(Ic(this,a[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ea(t.sort(Oc))}}return i})();function ar(i,n,t){let e=0,r=i.length-1,a,o,s,l;t?(n>=i[e].pos&&n<=i[r].pos&&({lo:e,hi:r}=Kt(i,"pos",n)),{pos:a,time:s}=i[e],{pos:o,time:l}=i[r]):(n>=i[e].time&&n<=i[r].time&&({lo:e,hi:r}=Kt(i,"time",n)),{time:a,pos:s}=i[e],{time:o,pos:l}=i[r]);let c=o-a;return c?s+(l-s)*(n-a)/c:s}var Ro=class extends Ao{static id="timeseries";static defaults=Ao.defaults;constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=ar(t,this.min),this._tableRange=ar(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){let{min:t,max:e}=this,r=[],a=[],o,s,l,c,d;for(o=0,s=n.length;o<s;++o)c=n[o],c>=t&&c<=e&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:e,pos:1}];for(o=0,s=r.length;o<s;++o)d=r[o+1],l=r[o-1],c=r[o],Math.round((d+l)/2)!==c&&a.push({time:c,pos:o/(s-1)});return a}_generate(){let n=this.min,t=this.max,e=super.getDataTimestamps();return(!e.includes(n)||!e.length)&&e.splice(0,0,n),(!e.includes(t)||e.length===1)&&e.push(t),e.sort((r,a)=>r-a)}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;let t=this.getDataTimestamps(),e=this.getLabelTimestamps();return t.length&&e.length?n=this.normalize(t.concat(e)):n=t.length?t:e,n=this._cache.all=n,n}getDecimalForValue(n){return(ar(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){let t=this._offsets,e=this.getDecimalForPixel(n)/t.factor-t.end;return ar(this._table,e*this._tableRange+this._minPos,!0)}},wg=Object.freeze({__proto__:null,CategoryScale:ng,LinearScale:Po,LogarithmicScale:So,RadialLinearScale:Io,TimeScale:Ao,TimeSeriesScale:Ro}),h0=[Af,rp,Jp,wg];function Mt(i){"@babel/helpers - typeof";return Mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mt(i)}function F(i){if(i===null||i===!0||i===!1)return NaN;var n=Number(i);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function x(i,n){if(n.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+n.length+" present")}function M(i){x(1,arguments);var n=Object.prototype.toString.call(i);return i instanceof Date||Mt(i)==="object"&&n==="[object Date]"?new Date(i.getTime()):typeof i=="number"||n==="[object Number]"?new Date(i):((typeof i=="string"||n==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function wi(i,n){x(2,arguments);var t=M(i),e=F(n);return isNaN(e)?new Date(NaN):(e&&t.setDate(t.getDate()+e),t)}function Oe(i,n){x(2,arguments);var t=M(i),e=F(n);if(isNaN(e))return new Date(NaN);if(!e)return t;var r=t.getDate(),a=new Date(t.getTime());a.setMonth(t.getMonth()+e+1,0);var o=a.getDate();return r>=o?a:(t.setFullYear(a.getFullYear(),a.getMonth(),r),t)}function Vt(i,n){x(2,arguments);var t=M(i).getTime(),e=F(n);return new Date(t+e)}var Cg=36e5;function br(i,n){x(2,arguments);var t=F(n);return Vt(i,t*Cg)}var Tg={};function Ct(){return Tg}function sn(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.weekStartsOn)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:d.weekStartsOn)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=M(i),f=h.getDay(),m=(f<u?7:0)+f-u;return h.setDate(h.getDate()-m),h.setHours(0,0,0,0),h}function Ie(i){var n=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return n.setUTCFullYear(i.getFullYear()),i.getTime()-n.getTime()}function qe(i){x(1,arguments);var n=M(i);return n.setHours(0,0,0,0),n}var Mg=864e5;function Fo(i,n){x(2,arguments);var t=qe(i),e=qe(n),r=t.getTime()-Ie(t),a=e.getTime()-Ie(e);return Math.round((r-a)/Mg)}var Dg=6e4;function _r(i,n){x(2,arguments);var t=F(n);return Vt(i,t*Dg)}function vr(i,n){x(2,arguments);var t=F(n),e=t*3;return Oe(i,e)}function xr(i,n){x(2,arguments);var t=F(n);return Vt(i,t*1e3)}function yr(i,n){x(2,arguments);var t=F(n),e=t*7;return wi(i,e)}function kr(i,n){x(2,arguments);var t=F(n);return Oe(i,t*12)}function Ae(i,n){x(2,arguments);var t=M(i),e=M(n),r=t.getTime()-e.getTime();return r<0?-1:r>0?1:r}var Pg=365.2425,Sg=Math.pow(10,8)*24*60*60*1e3,$e=6e4,Qe=36e5,id=1e3,xv=-Sg;var Og=3600;var nd=Og*24,yv=nd*7,Ig=nd*Pg,Ag=Ig/12,kv=Ag*3;function Bo(i){return x(1,arguments),i instanceof Date||Mt(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function Ci(i){if(x(1,arguments),!Bo(i)&&typeof i!="number")return!1;var n=M(i);return!isNaN(Number(n))}function zo(i,n){x(2,arguments);var t=M(i),e=M(n),r=t.getFullYear()-e.getFullYear(),a=t.getMonth()-e.getMonth();return r*12+a}function No(i,n){x(2,arguments);var t=M(i),e=M(n);return t.getFullYear()-e.getFullYear()}function rd(i,n){var t=i.getFullYear()-n.getFullYear()||i.getMonth()-n.getMonth()||i.getDate()-n.getDate()||i.getHours()-n.getHours()||i.getMinutes()-n.getMinutes()||i.getSeconds()-n.getSeconds()||i.getMilliseconds()-n.getMilliseconds();return t<0?-1:t>0?1:t}function Ti(i,n){x(2,arguments);var t=M(i),e=M(n),r=rd(t,e),a=Math.abs(Fo(t,e));t.setDate(t.getDate()-r*a);var o=+(rd(t,e)===-r),s=r*(a-o);return s===0?0:s}function ne(i,n){return x(2,arguments),M(i).getTime()-M(n).getTime()}var ad={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(n){return n<0?Math.ceil(n):Math.floor(n)}},Rg="trunc";function re(i){return i?ad[i]:ad[Rg]}function wr(i,n,t){x(2,arguments);var e=ne(i,n)/Qe;return re(t?.roundingMethod)(e)}function Cr(i,n,t){x(2,arguments);var e=ne(i,n)/$e;return re(t?.roundingMethod)(e)}function Mi(i){x(1,arguments);var n=M(i);return n.setHours(23,59,59,999),n}function Di(i){x(1,arguments);var n=M(i),t=n.getMonth();return n.setFullYear(n.getFullYear(),t+1,0),n.setHours(23,59,59,999),n}function Wo(i){x(1,arguments);var n=M(i);return Mi(n).getTime()===Di(n).getTime()}function Pi(i,n){x(2,arguments);var t=M(i),e=M(n),r=Ae(t,e),a=Math.abs(zo(t,e)),o;if(a<1)o=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-r*a);var s=Ae(t,e)===-r;Wo(M(i))&&a===1&&Ae(i,e)===1&&(s=!1),o=r*(a-Number(s))}return o===0?0:o}function Tr(i,n,t){x(2,arguments);var e=Pi(i,n)/3;return re(t?.roundingMethod)(e)}function Mr(i,n,t){x(2,arguments);var e=ne(i,n)/1e3;return re(t?.roundingMethod)(e)}function Dr(i,n,t){x(2,arguments);var e=Ti(i,n)/7;return re(t?.roundingMethod)(e)}function Pr(i,n){x(2,arguments);var t=M(i),e=M(n),r=Ae(t,e),a=Math.abs(No(t,e));t.setFullYear(1584),e.setFullYear(1584);var o=Ae(t,e)===-r,s=r*(a-Number(o));return s===0?0:s}function Sr(i){x(1,arguments);var n=M(i);return n.setSeconds(0,0),n}function Or(i){x(1,arguments);var n=M(i),t=n.getMonth(),e=t-t%3;return n.setMonth(e,1),n.setHours(0,0,0,0),n}function Ir(i){x(1,arguments);var n=M(i);return n.setDate(1),n.setHours(0,0,0,0),n}function Ar(i){x(1,arguments);var n=M(i),t=n.getFullYear();return n.setFullYear(t+1,0,0),n.setHours(23,59,59,999),n}function Rr(i){x(1,arguments);var n=M(i),t=new Date(0);return t.setFullYear(n.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Er(i){x(1,arguments);var n=M(i);return n.setMinutes(59,59,999),n}function Lr(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.weekStartsOn)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:d.weekStartsOn)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=M(i),f=h.getDay(),m=(f<u?-7:0)+6-(f-u);return h.setDate(h.getDate()+m),h.setHours(23,59,59,999),h}function Fr(i){x(1,arguments);var n=M(i);return n.setSeconds(59,999),n}function Br(i){x(1,arguments);var n=M(i),t=n.getMonth(),e=t-t%3+3;return n.setMonth(e,0),n.setHours(23,59,59,999),n}function zr(i){x(1,arguments);var n=M(i);return n.setMilliseconds(999),n}function ln(i,n){x(2,arguments);var t=F(n);return Vt(i,-t)}var Eg=864e5;function Ho(i){x(1,arguments);var n=M(i),t=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var e=n.getTime(),r=t-e;return Math.floor(r/Eg)+1}function Yt(i){x(1,arguments);var n=1,t=M(i),e=t.getUTCDay(),r=(e<n?7:0)+e-n;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function cn(i){x(1,arguments);var n=M(i),t=n.getUTCFullYear(),e=new Date(0);e.setUTCFullYear(t+1,0,4),e.setUTCHours(0,0,0,0);var r=Yt(e),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var o=Yt(a);return n.getTime()>=r.getTime()?t+1:n.getTime()>=o.getTime()?t:t-1}function Vo(i){x(1,arguments);var n=cn(i),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var e=Yt(t);return e}var Lg=6048e5;function dn(i){x(1,arguments);var n=M(i),t=Yt(n).getTime()-Vo(n).getTime();return Math.round(t/Lg)+1}function Lt(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.weekStartsOn)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:d.weekStartsOn)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=M(i),f=h.getUTCDay(),m=(f<u?7:0)+f-u;return h.setUTCDate(h.getUTCDate()-m),h.setUTCHours(0,0,0,0),h}function Xe(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=M(i),u=d.getUTCFullYear(),h=Ct(),f=F((t=(e=(r=(a=n?.firstWeekContainsDate)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&e!==void 0?e:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,f),m.setUTCHours(0,0,0,0);var p=Lt(m,n),g=new Date(0);g.setUTCFullYear(u,0,f),g.setUTCHours(0,0,0,0);var b=Lt(g,n);return d.getTime()>=p.getTime()?u+1:d.getTime()>=b.getTime()?u:u-1}function Yo(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.firstWeekContainsDate)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:d.firstWeekContainsDate)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=Xe(i,n),f=new Date(0);f.setUTCFullYear(h,0,u),f.setUTCHours(0,0,0,0);var m=Lt(f,n);return m}var Fg=6048e5;function un(i,n){x(1,arguments);var t=M(i),e=Lt(t,n).getTime()-Yo(t,n).getTime();return Math.round(e/Fg)+1}function X(i,n){for(var t=i<0?"-":"",e=Math.abs(i).toString();e.length<n;)e="0"+e;return t+e}var Bg={y:function(n,t){var e=n.getUTCFullYear(),r=e>0?e:1-e;return X(t==="yy"?r%100:r,t.length)},M:function(n,t){var e=n.getUTCMonth();return t==="M"?String(e+1):X(e+1,2)},d:function(n,t){return X(n.getUTCDate(),t.length)},a:function(n,t){var e=n.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h:function(n,t){return X(n.getUTCHours()%12||12,t.length)},H:function(n,t){return X(n.getUTCHours(),t.length)},m:function(n,t){return X(n.getUTCMinutes(),t.length)},s:function(n,t){return X(n.getUTCSeconds(),t.length)},S:function(n,t){var e=t.length,r=n.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,e-3));return X(a,t.length)}},fe=Bg;var Si={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zg={G:function(n,t,e){var r=n.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){var r=n.getUTCFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return fe.y(n,t)},Y:function(n,t,e,r){var a=Xe(n,r),o=a>0?a:1-a;if(t==="YY"){var s=o%100;return X(s,2)}return t==="Yo"?e.ordinalNumber(o,{unit:"year"}):X(o,t.length)},R:function(n,t){var e=cn(n);return X(e,t.length)},u:function(n,t){var e=n.getUTCFullYear();return X(e,t.length)},Q:function(n,t,e){var r=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return X(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){var r=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return X(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){var r=n.getUTCMonth();switch(t){case"M":case"MM":return fe.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){var r=n.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return X(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){var a=un(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):X(a,t.length)},I:function(n,t,e){var r=dn(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):X(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getUTCDate(),{unit:"date"}):fe.d(n,t)},D:function(n,t,e){var r=Ho(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):X(r,t.length)},E:function(n,t,e){var r=n.getUTCDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){var a=n.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return X(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){var a=n.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return X(o,t.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){var r=n.getUTCDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return X(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){var r=n.getUTCHours(),a=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){var r=n.getUTCHours(),a;switch(r===12?a=Si.noon:r===0?a=Si.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){var r=n.getUTCHours(),a;switch(r>=17?a=Si.evening:r>=12?a=Si.afternoon:r>=4?a=Si.morning:a=Si.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){var r=n.getUTCHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return fe.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getUTCHours(),{unit:"hour"}):fe.H(n,t)},K:function(n,t,e){var r=n.getUTCHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},k:function(n,t,e){var r=n.getUTCHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):fe.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):fe.s(n,t)},S:function(n,t){return fe.S(n,t)},X:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return sd(o);case"XXXX":case"XX":return Ge(o);case"XXXXX":case"XXX":default:return Ge(o,":")}},x:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"x":return sd(o);case"xxxx":case"xx":return Ge(o);case"xxxxx":case"xxx":default:return Ge(o,":")}},O:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+od(o,":");case"OOOO":default:return"GMT"+Ge(o,":")}},z:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+od(o,":");case"zzzz":default:return"GMT"+Ge(o,":")}},t:function(n,t,e,r){var a=r._originalDate||n,o=Math.floor(a.getTime()/1e3);return X(o,t.length)},T:function(n,t,e,r){var a=r._originalDate||n,o=a.getTime();return X(o,t.length)}};function od(i,n){var t=i>0?"-":"+",e=Math.abs(i),r=Math.floor(e/60),a=e%60;if(a===0)return t+String(r);var o=n||"";return t+String(r)+o+X(a,2)}function sd(i,n){if(i%60===0){var t=i>0?"-":"+";return t+X(Math.abs(i)/60,2)}return Ge(i,n)}function Ge(i,n){var t=n||"",e=i>0?"-":"+",r=Math.abs(i),a=X(Math.floor(r/60),2),o=X(r%60,2);return e+a+t+o}var ld=zg;var cd=function(n,t){switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},dd=function(n,t){switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ng=function(n,t){var e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return cd(n,t);var o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",cd(r,t)).replace("{{time}}",dd(a,t))},Wg={p:dd,P:Ng},hn=Wg;var Hg=["D","DD"],Vg=["YY","YYYY"];function Nr(i){return Hg.indexOf(i)!==-1}function Wr(i){return Vg.indexOf(i)!==-1}function Oi(i,n,t){if(i==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Yg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ug=function(n,t,e){var r,a=Yg[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r},ud=Ug;function fn(i){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.width?String(n.width):i.defaultWidth,e=i.formats[t]||i.formats[i.defaultWidth];return e}}var jg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$g={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Qg={date:fn({formats:jg,defaultWidth:"full"}),time:fn({formats:qg,defaultWidth:"full"}),dateTime:fn({formats:$g,defaultWidth:"full"})},hd=Qg;var Xg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gg=function(n,t,e,r){return Xg[n]},fd=Gg;function Ke(i){return function(n,t){var e=t!=null&&t.context?String(t.context):"standalone",r;if(e==="formatting"&&i.formattingValues){var a=i.defaultFormattingWidth||i.defaultWidth,o=t!=null&&t.width?String(t.width):a;r=i.formattingValues[o]||i.formattingValues[a]}else{var s=i.defaultWidth,l=t!=null&&t.width?String(t.width):i.defaultWidth;r=i.values[l]||i.values[s]}var c=i.argumentCallback?i.argumentCallback(n):n;return r[c]}}var Kg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ib={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nb=function(n,t){var e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},rb={ordinalNumber:nb,era:Ke({values:Kg,defaultWidth:"wide"}),quarter:Ke({values:Zg,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:Ke({values:Jg,defaultWidth:"wide"}),day:Ke({values:tb,defaultWidth:"wide"}),dayPeriod:Ke({values:eb,defaultWidth:"wide",formattingValues:ib,defaultFormattingWidth:"wide"})},md=rb;function Ze(i){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=t.width,r=e&&i.matchPatterns[e]||i.matchPatterns[i.defaultMatchWidth],a=n.match(r);if(!a)return null;var o=a[0],s=e&&i.parsePatterns[e]||i.parsePatterns[i.defaultParseWidth],l=Array.isArray(s)?ob(s,function(u){return u.test(o)}):ab(s,function(u){return u.test(o)}),c;c=i.valueCallback?i.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;var d=n.slice(o.length);return{value:c,rest:d}}}function ab(i,n){for(var t in i)if(i.hasOwnProperty(t)&&n(i[t]))return t}function ob(i,n){for(var t=0;t<i.length;t++)if(n(i[t]))return t}function Uo(i){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=n.match(i.matchPattern);if(!e)return null;var r=e[0],a=n.match(i.parsePattern);if(!a)return null;var o=i.valueCallback?i.valueCallback(a[0]):a[0];o=t.valueCallback?t.valueCallback(o):o;var s=n.slice(r.length);return{value:o,rest:s}}}var sb=/^(\d+)(th|st|nd|rd)?/i,lb=/\d+/i,cb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},db={any:[/^b/i,/^(a|c)/i]},ub={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hb={any:[/1/i,/2/i,/3/i,/4/i]},fb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},mb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},gb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_b={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vb={ordinalNumber:Uo({matchPattern:sb,parsePattern:lb,valueCallback:function(n){return parseInt(n,10)}}),era:Ze({matchPatterns:cb,defaultMatchWidth:"wide",parsePatterns:db,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:ub,defaultMatchWidth:"wide",parsePatterns:hb,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:Ze({matchPatterns:fb,defaultMatchWidth:"wide",parsePatterns:mb,defaultParseWidth:"any"}),day:Ze({matchPatterns:pb,defaultMatchWidth:"wide",parsePatterns:gb,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:bb,defaultMatchWidth:"any",parsePatterns:_b,defaultParseWidth:"any"})},pd=vb;var xb={code:"en-US",formatDistance:ud,formatLong:hd,formatRelative:fd,localize:md,match:pd,options:{weekStartsOn:0,firstWeekContainsDate:1}},gd=xb;var Hr=gd;var yb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wb=/^'([^]*?)'?$/,Cb=/''/g,Tb=/[a-zA-Z]/;function Vr(i,n,t){var e,r,a,o,s,l,c,d,u,h,f,m,p,g,b,_,k,C;x(2,arguments);var v=String(n),y=Ct(),P=(e=(r=t?.locale)!==null&&r!==void 0?r:y.locale)!==null&&e!==void 0?e:Hr,D=F((a=(o=(s=(l=t?.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(c=t.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:y.firstWeekContainsDate)!==null&&o!==void 0?o:(u=y.locale)===null||u===void 0||(h=u.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=F((f=(m=(p=(g=t?.weekStartsOn)!==null&&g!==void 0?g:t==null||(b=t.locale)===null||b===void 0||(_=b.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:y.weekStartsOn)!==null&&m!==void 0?m:(k=y.locale)===null||k===void 0||(C=k.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&f!==void 0?f:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var L=M(i);if(!Ci(L))throw new RangeError("Invalid time value");var B=Ie(L),W=ln(L,B),rt={firstWeekContainsDate:D,weekStartsOn:S,locale:P,_originalDate:L},bt=v.match(kb).map(function(z){var Y=z[0];if(Y==="p"||Y==="P"){var K=hn[Y];return K(z,P.formatLong)}return z}).join("").match(yb).map(function(z){if(z==="''")return"'";var Y=z[0];if(Y==="'")return Mb(z);var K=ld[Y];if(K)return!(t!=null&&t.useAdditionalWeekYearTokens)&&Wr(z)&&Oi(z,n,String(i)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Nr(z)&&Oi(z,n,String(i)),K(W,z,P.localize,rt);if(Y.match(Tb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return z}).join("");return bt}function Mb(i){var n=i.match(wb);return n?n[1].replace(Cb,"'"):i}function jo(i,n){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(i[t]=n[t]);return i}function qo(i,n){(n==null||n>i.length)&&(n=i.length);for(var t=0,e=Array(n);t<n;t++)e[t]=i[t];return e}function bd(i,n){if(i){if(typeof i=="string")return qo(i,n);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qo(i,n):void 0}}function $o(i,n){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=bd(i))||n&&i&&typeof i.length=="number"){t&&(i=t);var e=0,r=function(){};return{s:r,n:function(){return e>=i.length?{done:!0}:{done:!1,value:i[e++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
8
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(i)},n:function(){var c=t.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function T(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Yr(i,n){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(i,n)}function A(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),n&&Yr(i,n)}function mn(i){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mn(i)}function Qo(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qo=function(){return!!i})()}function _d(i,n){if(n&&(Mt(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(i)}function R(i){var n=Qo();return function(){var t,e=mn(i);if(n){var r=mn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return _d(this,t)}}function O(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function vd(i,n){if(Mt(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var e=t.call(i,n||"default");if(Mt(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function Ur(i){var n=vd(i,"string");return Mt(n)=="symbol"?n:n+""}function xd(i,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(i,Ur(e.key),e)}}function I(i,n,t){return n&&xd(i.prototype,n),t&&xd(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function w(i,n,t){return(n=Ur(n))in i?Object.defineProperty(i,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[n]=t,i}var Db=10,yd=(function(){function i(){O(this,i),w(this,"priority",void 0),w(this,"subPriority",0)}return I(i,[{key:"validate",value:function(t,e){return!0}}]),i})(),kd=(function(i){A(t,i);var n=R(t);function t(e,r,a,o,s){var l;return O(this,t),l=n.call(this),l.value=e,l.validateValue=r,l.setValue=a,l.priority=o,s&&(l.subPriority=s),l}return I(t,[{key:"validate",value:function(r,a){return this.validateValue(r,this.value,a)}},{key:"set",value:function(r,a,o){return this.setValue(r,a,this.value,o)}}]),t})(yd),wd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",Db),w(T(e),"subPriority",-1),e}return I(t,[{key:"set",value:function(r,a){if(a.timestampIsSet)return r;var o=new Date(0);return o.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),o.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),o}}]),t})(yd);var E=(function(){function i(){O(this,i),w(this,"incompatibleTokens",void 0),w(this,"priority",void 0),w(this,"subPriority",void 0)}return I(i,[{key:"run",value:function(t,e,r,a){var o=this.parse(t,e,r,a);return o?{setter:new kd(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(t,e,r){return!0}}]),i})();var Cd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",140),w(T(e),"incompatibleTokens",["R","u","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"})||o.era(r,{width:"narrow"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})||o.era(r,{width:"abbreviated"})||o.era(r,{width:"narrow"})}}},{key:"set",value:function(r,a,o){return a.era=o,r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var $={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Ut={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Z(i,n){return i&&{value:n(i.value),rest:i.rest}}function q(i,n){var t=n.match(i);return t?{value:parseInt(t[0],10),rest:n.slice(t[0].length)}:null}function jt(i,n){var t=n.match(i);if(!t)return null;if(t[0]==="Z")return{value:0,rest:n.slice(1)};var e=t[1]==="+"?1:-1,r=t[2]?parseInt(t[2],10):0,a=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:e*(r*Qe+a*$e+o*id),rest:n.slice(t[0].length)}}function jr(i){return q($.anyDigitsSigned,i)}function H(i,n){switch(i){case 1:return q($.singleDigit,n);case 2:return q($.twoDigits,n);case 3:return q($.threeDigits,n);case 4:return q($.fourDigits,n);default:return q(new RegExp("^\\d{1,"+i+"}"),n)}}function Ii(i,n){switch(i){case 1:return q($.singleDigitSigned,n);case 2:return q($.twoDigitsSigned,n);case 3:return q($.threeDigitsSigned,n);case 4:return q($.fourDigitsSigned,n);default:return q(new RegExp("^-?\\d{1,"+i+"}"),n)}}function Ai(i){switch(i){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qr(i,n){var t=n>0,e=t?n:1-n,r;if(e<=50)r=i||100;else{var a=e+50,o=Math.floor(a/100)*100,s=i>=a%100;r=i+o-(s?100:0)}return t?r:1-r}function $r(i){return i%400===0||i%4===0&&i%100!==0}var Td=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Z(H(4,r),s);case"yo":return Z(o.ordinalNumber(r,{unit:"year"}),s);default:return Z(H(a.length,r),s)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,o){var s=r.getUTCFullYear();if(o.isTwoDigitYear){var l=qr(o.year,s);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in a)||a.era===1?o.year:1-o.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Md=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Z(H(4,r),s);case"Yo":return Z(o.ordinalNumber(r,{unit:"year"}),s);default:return Z(H(a.length,r),s)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,o,s){var l=Xe(r,s);if(o.isTwoDigitYear){var c=qr(o.year,l);return r.setUTCFullYear(c,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Lt(r,s)}var d=!("era"in a)||a.era===1?o.year:1-o.year;return r.setUTCFullYear(d,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Lt(r,s)}}]),t})(E);var Dd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a){return a==="R"?Ii(4,r):Ii(a.length,r)}},{key:"set",value:function(r,a,o){var s=new Date(0);return s.setUTCFullYear(o,0,4),s.setUTCHours(0,0,0,0),Yt(s)}}]),t})(E);var Pd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a){return a==="u"?Ii(4,r):Ii(a.length,r)}},{key:"set",value:function(r,a,o){return r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Sd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",120),w(T(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"Q":case"QQ":return H(a.length,r);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"})||o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})||o.quarter(r,{width:"abbreviated",context:"formatting"})||o.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Od=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",120),w(T(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"q":case"qq":return H(a.length,r);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"})||o.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})||o.quarter(r,{width:"abbreviated",context:"standalone"})||o.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Id=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),w(T(e),"priority",110),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return c-1};switch(a){case"M":return Z(q($.month,r),s);case"MM":return Z(H(2,r),s);case"Mo":return Z(o.ordinalNumber(r,{unit:"month"}),s);case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"})||o.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})||o.month(r,{width:"abbreviated",context:"formatting"})||o.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Ad=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",110),w(T(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return c-1};switch(a){case"L":return Z(q($.month,r),s);case"LL":return Z(H(2,r),s);case"Lo":return Z(o.ordinalNumber(r,{unit:"month"}),s);case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"})||o.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})||o.month(r,{width:"abbreviated",context:"standalone"})||o.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);function Xo(i,n,t){x(2,arguments);var e=M(i),r=F(n),a=un(e,t)-r;return e.setUTCDate(e.getUTCDate()-a*7),e}var Rd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",100),w(T(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"w":return q($.week,r);case"wo":return o.ordinalNumber(r,{unit:"week"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,o,s){return Lt(Xo(r,o,s),s)}}]),t})(E);function Go(i,n){x(2,arguments);var t=M(i),e=F(n),r=dn(t)-e;return t.setUTCDate(t.getUTCDate()-r*7),t}var Ed=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",100),w(T(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"I":return q($.week,r);case"Io":return o.ordinalNumber(r,{unit:"week"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,o){return Yt(Go(r,o))}}]),t})(E);var Pb=[31,28,31,30,31,30,31,31,30,31,30,31],Sb=[31,29,31,30,31,30,31,31,30,31,30,31],Ld=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"subPriority",1),w(T(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"d":return q($.date,r);case"do":return o.ordinalNumber(r,{unit:"date"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){var o=r.getUTCFullYear(),s=$r(o),l=r.getUTCMonth();return s?a>=1&&a<=Sb[l]:a>=1&&a<=Pb[l]}},{key:"set",value:function(r,a,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Fd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"subpriority",1),w(T(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"D":case"DD":return q($.dayOfYear,r);case"Do":return o.ordinalNumber(r,{unit:"date"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){var o=r.getUTCFullYear(),s=$r(o);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(r,a,o){return r.setUTCMonth(0,o),r.setUTCHours(0,0,0,0),r}}]),t})(E);function Je(i,n,t){var e,r,a,o,s,l,c,d;x(2,arguments);var u=Ct(),h=F((e=(r=(a=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&r!==void 0?r:(c=u.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&e!==void 0?e:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=M(i),m=F(n),p=f.getUTCDay(),g=m%7,b=(g+7)%7,_=(b<h?7:0)+m-p;return f.setUTCDate(f.getUTCDate()+_),f}var Bd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,o,s){return r=Je(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(E);var zd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o,s){var l=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return Z(H(a.length,r),l);case"eo":return Z(o.ordinalNumber(r,{unit:"day"}),l);case"eee":return o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,o,s){return r=Je(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Nd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o,s){var l=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return Z(H(a.length,r),l);case"co":return Z(o.ordinalNumber(r,{unit:"day"}),l);case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"})||o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})||o.day(r,{width:"abbreviated",context:"standalone"})||o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,o,s){return r=Je(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(E);function Ko(i,n){x(2,arguments);var t=F(n);t%7===0&&(t=t-7);var e=1,r=M(i),a=r.getUTCDay(),o=t%7,s=(o+7)%7,l=(s<e?7:0)+t-a;return r.setUTCDate(r.getUTCDate()+l),r}var Wd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return c===0?7:c};switch(a){case"i":case"ii":return H(a.length,r);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return Z(o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiii":return Z(o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Z(o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Z(o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(r,a){return a>=1&&a<=7}},{key:"set",value:function(r,a,o){return r=Ko(r,o),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Hd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",80),w(T(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"a":case"aa":case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,o){return r.setUTCHours(Ai(o),0,0,0),r}}]),t})(E);var Vd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",80),w(T(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"b":case"bb":case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,o){return r.setUTCHours(Ai(o),0,0,0),r}}]),t})(E);var Yd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",80),w(T(e),"incompatibleTokens",["a","b","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,o){return r.setUTCHours(Ai(o),0,0,0),r}}]),t})(E);var Ud=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["H","K","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"h":return q($.hour12h,r);case"ho":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=12}},{key:"set",value:function(r,a,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):!s&&o===12?r.setUTCHours(0,0,0,0):r.setUTCHours(o,0,0,0),r}}]),t})(E);var jd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"H":return q($.hour23h,r);case"Ho":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=23}},{key:"set",value:function(r,a,o){return r.setUTCHours(o,0,0,0),r}}]),t})(E);var qd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["h","H","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"K":return q($.hour11h,r);case"Ko":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):r.setUTCHours(o,0,0,0),r}}]),t})(E);var $d=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"k":return q($.hour24h,r);case"ko":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=24}},{key:"set",value:function(r,a,o){var s=o<=24?o%24:o;return r.setUTCHours(s,0,0,0),r}}]),t})(E);var Qd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",60),w(T(e),"incompatibleTokens",["t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"m":return q($.minute,r);case"mo":return o.ordinalNumber(r,{unit:"minute"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,o){return r.setUTCMinutes(o,0,0),r}}]),t})(E);var Xd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",50),w(T(e),"incompatibleTokens",["t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"s":return q($.second,r);case"so":return o.ordinalNumber(r,{unit:"second"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,o){return r.setUTCSeconds(o,0),r}}]),t})(E);var Gd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",30),w(T(e),"incompatibleTokens",["t","T"]),e}return I(t,[{key:"parse",value:function(r,a){var o=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Z(H(a.length,r),o)}},{key:"set",value:function(r,a,o){return r.setUTCMilliseconds(o),r}}]),t})(E);var Kd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",10),w(T(e),"incompatibleTokens",["t","T","x"]),e}return I(t,[{key:"parse",value:function(r,a){switch(a){case"X":return jt(Ut.basicOptionalMinutes,r);case"XX":return jt(Ut.basic,r);case"XXXX":return jt(Ut.basicOptionalSeconds,r);case"XXXXX":return jt(Ut.extendedOptionalSeconds,r);case"XXX":default:return jt(Ut.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(E);var Zd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",10),w(T(e),"incompatibleTokens",["t","T","X"]),e}return I(t,[{key:"parse",value:function(r,a){switch(a){case"x":return jt(Ut.basicOptionalMinutes,r);case"xx":return jt(Ut.basic,r);case"xxxx":return jt(Ut.basicOptionalSeconds,r);case"xxxxx":return jt(Ut.extendedOptionalSeconds,r);case"xxx":default:return jt(Ut.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(E);var Jd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",40),w(T(e),"incompatibleTokens","*"),e}return I(t,[{key:"parse",value:function(r){return jr(r)}},{key:"set",value:function(r,a,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),t})(E);var tu=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",20),w(T(e),"incompatibleTokens","*"),e}return I(t,[{key:"parse",value:function(r){return jr(r)}},{key:"set",value:function(r,a,o){return[new Date(o),{timestampIsSet:!0}]}}]),t})(E);var eu={G:new Cd,y:new Td,Y:new Md,R:new Dd,u:new Pd,Q:new Sd,q:new Od,M:new Id,L:new Ad,w:new Rd,I:new Ed,d:new Ld,D:new Fd,E:new Bd,e:new zd,c:new Nd,i:new Wd,a:new Hd,b:new Vd,B:new Yd,h:new Ud,H:new jd,K:new qd,k:new $d,m:new Qd,s:new Xd,S:new Gd,X:new Kd,x:new Zd,t:new Jd,T:new tu};var Ob=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ib=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ab=/^'([^]*?)'?$/,Rb=/''/g,Eb=/\S/,Lb=/[a-zA-Z]/;function Qr(i,n,t,e){var r,a,o,s,l,c,d,u,h,f,m,p,g,b,_,k,C,v;x(3,arguments);var y=String(i),P=String(n),D=Ct(),S=(r=(a=e?.locale)!==null&&a!==void 0?a:D.locale)!==null&&r!==void 0?r:Hr;if(!S.match)throw new RangeError("locale must contain match property");var L=F((o=(s=(l=(c=e?.firstWeekContainsDate)!==null&&c!==void 0?c:e==null||(d=e.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:D.firstWeekContainsDate)!==null&&s!==void 0?s:(h=D.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=F((m=(p=(g=(b=e?.weekStartsOn)!==null&&b!==void 0?b:e==null||(_=e.locale)===null||_===void 0||(k=_.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&g!==void 0?g:D.weekStartsOn)!==null&&p!==void 0?p:(C=D.locale)===null||C===void 0||(v=C.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&m!==void 0?m:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(P==="")return y===""?M(t):new Date(NaN);var W={firstWeekContainsDate:L,weekStartsOn:B,locale:S},rt=[new wd],bt=P.match(Ib).map(function(gt){var tt=gt[0];if(tt in hn){var zt=hn[tt];return zt(gt,S.formatLong)}return gt}).join("").match(Ob),z=[],Y=$o(bt),K;try{var At=function(){var tt=K.value;!(e!=null&&e.useAdditionalWeekYearTokens)&&Wr(tt)&&Oi(tt,P,i),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Nr(tt)&&Oi(tt,P,i);var zt=tt[0],bn=eu[zt];if(bn){var Jo=bn.incompatibleTokens;if(Array.isArray(Jo)){var ts=z.find(function(es){return Jo.includes(es.token)||es.token===zt});if(ts)throw new RangeError("The format string mustn't contain `".concat(ts.fullToken,"` and `").concat(tt,"` at the same time"))}else if(bn.incompatibleTokens==="*"&&z.length>0)throw new RangeError("The format string mustn't contain `".concat(tt,"` and any other token at the same time"));z.push({token:zt,fullToken:tt});var Jr=bn.run(y,tt,S.match,W);if(!Jr)return{v:new Date(NaN)};rt.push(Jr.setter),y=Jr.rest}else{if(zt.match(Lb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+zt+"`");if(tt==="''"?tt="'":zt==="'"&&(tt=Fb(tt)),y.indexOf(tt)===0)y=y.slice(tt.length);else return{v:new Date(NaN)}}};for(Y.s();!(K=Y.n()).done;){var ut=At();if(Mt(ut)==="object")return ut.v}}catch(gt){Y.e(gt)}finally{Y.f()}if(y.length>0&&Eb.test(y))return new Date(NaN);var me=rt.map(function(gt){return gt.priority}).sort(function(gt,tt){return tt-gt}).filter(function(gt,tt,zt){return zt.indexOf(gt)===tt}).map(function(gt){return rt.filter(function(tt){return tt.priority===gt}).sort(function(tt,zt){return zt.subPriority-tt.subPriority})}).map(function(gt){return gt[0]}),pe=M(t);if(isNaN(pe.getTime()))return new Date(NaN);var Ft=ln(pe,Ie(pe)),ge={},Bt=$o(me),be;try{for(Bt.s();!(be=Bt.n()).done;){var Xt=be.value;if(!Xt.validate(Ft,W))return new Date(NaN);var gn=Xt.set(Ft,ge,W);Array.isArray(gn)?(Ft=gn[0],jo(ge,gn[1])):Ft=gn}}catch(gt){Bt.e(gt)}finally{Bt.f()}return Ft}function Fb(i){return i.match(Ab)[1].replace(Rb,"'")}function Xr(i){x(1,arguments);var n=M(i);return n.setMinutes(0,0,0),n}function Gr(i){x(1,arguments);var n=M(i);return n.setMilliseconds(0),n}function Zr(i,n){var t;x(1,arguments);var e=F((t=n?.additionalDigits)!==null&&t!==void 0?t:2);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof i=="string"||Object.prototype.toString.call(i)==="[object String]"))return new Date(NaN);var r=Wb(i),a;if(r.date){var o=Hb(r.date,e);a=Vb(o.restDateString,o.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s=a.getTime(),l=0,c;if(r.time&&(l=Yb(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=Ub(r.timezone),isNaN(c))return new Date(NaN)}else{var d=new Date(s+l),u=new Date(0);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return new Date(s+l+c)}var Kr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Bb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,zb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Nb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Wb(i){var n={},t=i.split(Kr.dateTimeDelimiter),e;if(t.length>2)return n;if(/:/.test(t[0])?e=t[0]:(n.date=t[0],e=t[1],Kr.timeZoneDelimiter.test(n.date)&&(n.date=i.split(Kr.timeZoneDelimiter)[0],e=i.substr(n.date.length,i.length))),e){var r=Kr.timezone.exec(e);r?(n.time=e.replace(r[1],""),n.timezone=r[1]):n.time=e}return n}function Hb(i,n){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),e=i.match(t);if(!e)return{year:NaN,restDateString:""};var r=e[1]?parseInt(e[1]):null,a=e[2]?parseInt(e[2]):null;return{year:a===null?r:a*100,restDateString:i.slice((e[1]||e[2]).length)}}function Vb(i,n){if(n===null)return new Date(NaN);var t=i.match(Bb);if(!t)return new Date(NaN);var e=!!t[4],r=pn(t[1]),a=pn(t[2])-1,o=pn(t[3]),s=pn(t[4]),l=pn(t[5])-1;if(e)return Xb(n,s,l)?jb(n,s,l):new Date(NaN);var c=new Date(0);return!$b(n,a,o)||!Qb(n,r)?new Date(NaN):(c.setUTCFullYear(n,a,Math.max(r,o)),c)}function pn(i){return i?parseInt(i):1}function Yb(i){var n=i.match(zb);if(!n)return NaN;var t=Zo(n[1]),e=Zo(n[2]),r=Zo(n[3]);return Gb(t,e,r)?t*Qe+e*$e+r*1e3:NaN}function Zo(i){return i&&parseFloat(i.replace(",","."))||0}function Ub(i){if(i==="Z")return 0;var n=i.match(Nb);if(!n)return 0;var t=n[1]==="+"?-1:1,e=parseInt(n[2]),r=n[3]&&parseInt(n[3])||0;return Kb(e,r)?t*(e*Qe+r*$e):NaN}function jb(i,n,t){var e=new Date(0);e.setUTCFullYear(i,0,4);var r=e.getUTCDay()||7,a=(n-1)*7+t+1-r;return e.setUTCDate(e.getUTCDate()+a),e}var qb=[31,null,31,30,31,30,31,31,30,31,30,31];function iu(i){return i%400===0||i%4===0&&i%100!==0}function $b(i,n,t){return n>=0&&n<=11&&t>=1&&t<=(qb[n]||(iu(i)?29:28))}function Qb(i,n){return n>=1&&n<=(iu(i)?366:365)}function Xb(i,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function Gb(i,n,t){return i===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&i>=0&&i<25}function Kb(i,n){return n>=0&&n<=59}var Zb={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Lo._date.override({_id:"date-fns",formats:function(){return Zb},parse:function(i,n){if(i===null||typeof i>"u")return null;let t=typeof i;return t==="number"||i instanceof Date?i=M(i):t==="string"&&(typeof n=="string"?i=Qr(i,n,new Date,this.options):i=Zr(i,this.options)),Ci(i)?i.getTime():null},format:function(i,n){return Vr(i,n,this.options)},add:function(i,n,t){switch(t){case"millisecond":return Vt(i,n);case"second":return xr(i,n);case"minute":return _r(i,n);case"hour":return br(i,n);case"day":return wi(i,n);case"week":return yr(i,n);case"month":return Oe(i,n);case"quarter":return vr(i,n);case"year":return kr(i,n);default:return i}},diff:function(i,n,t){switch(t){case"millisecond":return ne(i,n);case"second":return Mr(i,n);case"minute":return Cr(i,n);case"hour":return wr(i,n);case"day":return Ti(i,n);case"week":return Dr(i,n);case"month":return Pi(i,n);case"quarter":return Tr(i,n);case"year":return Pr(i,n);default:return 0}},startOf:function(i,n,t){switch(n){case"second":return Gr(i);case"minute":return Sr(i);case"hour":return Xr(i);case"day":return qe(i);case"week":return sn(i);case"isoWeek":return sn(i,{weekStartsOn:+t});case"month":return Ir(i);case"quarter":return Or(i);case"year":return Rr(i);default:return i}},endOf:function(i,n){switch(n){case"second":return zr(i);case"minute":return Fr(i);case"hour":return Er(i);case"day":return Mi(i);case"week":return Lr(i);case"month":return Di(i);case"quarter":return Br(i);case"year":return Ar(i);default:return i}}});export{Fu as a,G_ as b,i0 as c,Cu as d,Tu as e,I_ as f,A_ as g,a0 as h,et as i,j,at as k,N as l,J as m,mi as n,se as o,Q as p,it as q,dh as r,lt as s,ze as t,Ks as u,He as v,Ht as w,Un as x,Aa as y,Hn as z,nt as A,$i as B,Qi as C,_i as D,Me as E,xt as F,dt as G,lr as H,Eo as I,Pf as J,Qt as K,Fm as L,mr as M,Zm as N,Lp as O,Yp as P,Up as Q,ng as R,Po as S,Ao as T,h0 as U};
7
+ `):i}function jp(i,n){let{element:t,datasetIndex:e,index:r}=n,a=i.getDatasetMeta(e).controller,{label:o,value:s}=a.getLabelAndValue(r);return{chart:i,label:o,parsed:a.getParsed(r),raw:i.data.datasets[e].data[r],formattedValue:s,dataset:a.getDataset(),dataIndex:r,datasetIndex:e,element:t}}function vc(i,n){let t=i.chart.ctx,{body:e,footer:r,title:a}=i,{boxWidth:o,boxHeight:s}=n,l=dt(n.bodyFont),c=dt(n.titleFont),d=dt(n.footerFont),u=a.length,h=r.length,f=e.length,m=xt(n.padding),p=m.height,g=0,b=e.reduce((C,v)=>C+v.before.length+v.lines.length+v.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*n.titleSpacing+n.titleMarginBottom),b){let C=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=f*C+(b-f)*l.lineHeight+(b-1)*n.bodySpacing}h&&(p+=n.footerMarginTop+h*d.lineHeight+(h-1)*n.footerSpacing);let _=0,k=function(C){g=Math.max(g,t.measureText(C).width+_)};return t.save(),t.font=c.string,G(i.title,k),t.font=l.string,G(i.beforeBody.concat(i.afterBody),k),_=n.displayColors?o+2+n.boxPadding:0,G(e,C=>{G(C.before,k),G(C.lines,k),G(C.after,k)}),_=0,t.font=d.string,G(i.footer,k),t.restore(),g+=m.width,{width:g,height:p}}function qp(i,n){let{y:t,height:e}=n;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}function $p(i,n,t,e){let{x:r,width:a}=e,o=t.caretSize+t.caretPadding;if(i==="left"&&r+a+o>n.width||i==="right"&&r-a-o<0)return!0}function Qp(i,n,t,e){let{x:r,width:a}=t,{width:o,chartArea:{left:s,right:l}}=i,c="center";return e==="center"?c=r<=(s+l)/2?"left":"right":r<=a/2?c="left":r>=o-a/2&&(c="right"),$p(c,i,n,t)&&(c="center"),c}function xc(i,n,t){let e=t.yAlign||n.yAlign||qp(i,t);return{xAlign:t.xAlign||n.xAlign||Qp(i,n,t,e),yAlign:e}}function Xp(i,n){let{x:t,width:e}=i;return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Gp(i,n,t){let{y:e,height:r}=i;return n==="top"?e+=t:n==="bottom"?e-=r+t:e-=r/2,e}function yc(i,n,t,e){let{caretSize:r,caretPadding:a,cornerRadius:o}=i,{xAlign:s,yAlign:l}=t,c=r+a,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:f}=De(o),m=Xp(n,s),p=Gp(n,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(d,h)+r:s==="right"&&(m+=Math.max(u,f)+r),{x:pt(m,0,e.width-n.width),y:pt(p,0,e.height-n.height)}}function rr(i,n,t){let e=xt(t.padding);return n==="center"?i.x+i.width/2:n==="right"?i.x+i.width-e.right:i.x+e.left}function kc(i){return ee([],he(i))}function Kp(i,n,t){return de(i,{tooltip:n,tooltipItems:t,type:"tooltip"})}function wc(i,n){let t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?i.override(t):i}var td={beforeTitle:Jt,title(i){if(i.length>0){let n=i[0],t=n.chart.data.labels,e=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(e>0&&n.dataIndex<e)return t[n.dataIndex]}return""},afterTitle:Jt,beforeBody:Jt,beforeLabel:Jt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let n=i.dataset.label||"";n&&(n+=": ");let t=i.formattedValue;return U(t)||(n+=t),n},labelColor(i){let t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){let t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Jt,afterBody:Jt,beforeFooter:Jt,footer:Jt,afterFooter:Jt};function Ot(i,n,t,e){let r=i[n].call(t,e);return typeof r>"u"?td[n].call(t,e):r}var Cc=(()=>{class i extends Qt{static positioners=nn;constructor(t){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=t.chart,this.options=t.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(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&e.options.animation&&r.animations,o=new lr(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Kp(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:r}=e,a=Ot(r,"beforeTitle",this,t),o=Ot(r,"title",this,t),s=Ot(r,"afterTitle",this,t),l=[];return l=ee(l,he(a)),l=ee(l,he(o)),l=ee(l,he(s)),l}getBeforeBody(t,e){return kc(Ot(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:r}=e,a=[];return G(t,o=>{let s={before:[],lines:[],after:[]},l=wc(r,o);ee(s.before,he(Ot(l,"beforeLabel",this,o))),ee(s.lines,Ot(l,"label",this,o)),ee(s.after,he(Ot(l,"afterLabel",this,o))),a.push(s)}),a}getAfterBody(t,e){return kc(Ot(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:r}=e,a=Ot(r,"beforeFooter",this,t),o=Ot(r,"footer",this,t),s=Ot(r,"afterFooter",this,t),l=[];return l=ee(l,he(a)),l=ee(l,he(o)),l=ee(l,he(s)),l}_createItems(t){let e=this._active,r=this.chart.data,a=[],o=[],s=[],l=[],c,d;for(c=0,d=e.length;c<d;++c)l.push(jp(this.chart,e[c]));return t.filter&&(l=l.filter((u,h,f)=>t.filter(u,h,f,r))),t.itemSort&&(l=l.sort((u,h)=>t.itemSort(u,h,r))),G(l,u=>{let h=wc(t.callbacks,u);a.push(Ot(h,"labelColor",this,u)),o.push(Ot(h,"labelPointStyle",this,u)),s.push(Ot(h,"labelTextColor",this,u))}),this.labelColors=a,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){let r=this.options.setContext(this.getContext()),a=this._active,o,s=[];if(!a.length)this.opacity!==0&&(o={opacity:0});else{let l=nn[r.position].call(this,a,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);let c=this._size=vc(this,r),d=Object.assign({},l,c),u=xc(this.chart,r,d),h=yc(r,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,r,a){let o=this.getCaretPosition(t,r,a);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,r){let{xAlign:a,yAlign:o}=this,{caretSize:s,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:h}=De(l),{x:f,y:m}=t,{width:p,height:g}=e,b,_,k,C,v,y;return o==="center"?(v=m+g/2,a==="left"?(b=f,_=b-s,C=v+s,y=v-s):(b=f+p,_=b+s,C=v-s,y=v+s),k=b):(a==="left"?_=f+Math.max(c,u)+s:a==="right"?_=f+p-Math.max(d,h)-s:_=this.caretX,o==="top"?(C=m,v=C-s,b=_-s,k=_+s):(C=m+g,v=C+s,b=_+s,k=_-s),y=C),{x1:b,x2:_,x3:k,y1:C,y2:v,y3:y}}drawTitle(t,e,r){let a=this.title,o=a.length,s,l,c;if(o){let d=Ye(r.rtl,this.x,this.width);for(t.x=rr(this,r.titleAlign,r),e.textAlign=d.textAlign(r.titleAlign),e.textBaseline="middle",s=dt(r.titleFont),l=r.titleSpacing,e.fillStyle=r.titleColor,e.font=s.string,c=0;c<o;++c)e.fillText(a[c],d.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+l,c+1===o&&(t.y+=r.titleMarginBottom-l)}}_drawColorBox(t,e,r,a,o){let s=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=o,u=dt(o.bodyFont),h=rr(this,"left",o),f=a.x(h),m=c<u.lineHeight?(u.lineHeight-c)/2:0,p=e.y+m;if(o.usePointStyle){let g={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=a.leftForLtr(f,d)+d/2,_=p+c/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Qn(t,g,b,_),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Qn(t,g,b,_)}else{t.lineWidth=j(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;let g=a.leftForLtr(f,d),b=a.leftForLtr(a.xPlus(f,1),d-2),_=De(s.borderRadius);Object.values(_).some(k=>k!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,vi(t,{x:g,y:p,w:d,h:c,radius:_}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),vi(t,{x:b,y:p+1,w:d-2,h:c-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,d,c),t.strokeRect(g,p,d,c),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,d-2,c-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){let{body:a}=this,{bodySpacing:o,bodyAlign:s,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:u}=r,h=dt(r.bodyFont),f=h.lineHeight,m=0,p=Ye(r.rtl,this.x,this.width),g=function(S){e.fillText(S,p.x(t.x+m),t.y+f/2),t.y+=f+o},b=p.textAlign(s),_,k,C,v,y,P,D;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=rr(this,b,r),e.fillStyle=r.bodyColor,G(this.beforeBody,g),m=l&&b!=="right"?s==="center"?d/2+u:d+2+u:0,v=0,P=a.length;v<P;++v){for(_=a[v],k=this.labelTextColors[v],e.fillStyle=k,G(_.before,g),C=_.lines,l&&C.length&&(this._drawColorBox(e,t,v,p,r),f=Math.max(h.lineHeight,c)),y=0,D=C.length;y<D;++y)g(C[y]),f=h.lineHeight;G(_.after,g)}m=0,f=h.lineHeight,G(this.afterBody,g),t.y-=o}drawFooter(t,e,r){let a=this.footer,o=a.length,s,l;if(o){let c=Ye(r.rtl,this.x,this.width);for(t.x=rr(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=c.textAlign(r.footerAlign),e.textBaseline="middle",s=dt(r.footerFont),e.fillStyle=r.footerColor,e.font=s.string,l=0;l<o;++l)e.fillText(a[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,e,r,a){let{xAlign:o,yAlign:s}=this,{x:l,y:c}=t,{width:d,height:u}=r,{topLeft:h,topRight:f,bottomLeft:m,bottomRight:p}=De(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(l+h,c),s==="top"&&this.drawCaret(t,e,r,a),e.lineTo(l+d-f,c),e.quadraticCurveTo(l+d,c,l+d,c+f),s==="center"&&o==="right"&&this.drawCaret(t,e,r,a),e.lineTo(l+d,c+u-p),e.quadraticCurveTo(l+d,c+u,l+d-p,c+u),s==="bottom"&&this.drawCaret(t,e,r,a),e.lineTo(l+m,c+u),e.quadraticCurveTo(l,c+u,l,c+u-m),s==="center"&&o==="left"&&this.drawCaret(t,e,r,a),e.lineTo(l,c+h),e.quadraticCurveTo(l,c,l+h,c),e.closePath(),e.fill(),a.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,r=this.$animations,a=r&&r.x,o=r&&r.y;if(a||o){let s=nn[t.position].call(this,this._active,this._eventPosition);if(!s)return;let l=this._size=vc(this,t),c=Object.assign({},s,this._size),d=xc(e,t,c),u=yc(t,c,d,e);(a._to!==u.x||o._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(e);let a={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let s=xt(e.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&l&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,a,e),Ga(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Ka(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let r=this._active,a=t.map(({datasetIndex:l,index:c})=>{let d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),o=!qi(r,a),s=this._positionChanged(a,e);(o||s)&&(this._active=a,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,r=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let a=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,r),l=this._positionChanged(s,t),c=e||!qi(s,o)||l;return c&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,r,a){let o=this.options;if(t.type==="mouseout")return[];if(!a)return e.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,e){let{caretX:r,caretY:a,options:o}=this,s=nn[o.position].call(this,t,e);return s!==!1&&(r!==s.x||a!==s.y)}}return i})(),Zp={id:"tooltip",_element:Cc,positioners:nn,afterInit(i,n,t){t&&(i.tooltip=new Cc({chart:i,options:t}))},beforeUpdate(i,n,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,n,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){let n=i.tooltip;if(n&&n._willRender()){let t={tooltip:n};if(i.notifyPlugins("beforeTooltipDraw",vn(ei({},t),{cancelable:!0}))===!1)return;n.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,n){if(i.tooltip){let t=n.replay;i.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(i,n)=>n.bodyFont.size,boxWidth:(i,n)=>n.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:td},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Jp=Object.freeze({__proto__:null,Colors:up,Decimation:pp,Filler:Lp,Legend:Hp,SubTitle:Up,Title:Yp,Tooltip:Zp}),tg=(i,n,t,e)=>(typeof n=="string"?(t=i.push(n)-1,e.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function eg(i,n,t,e){let r=i.indexOf(n);if(r===-1)return tg(i,n,t,e);let a=i.lastIndexOf(n);return r!==a?t:r}var ig=(i,n)=>i===null?null:pt(Math.round(i),0,n);function Tc(i){let n=this.getLabels();return i>=0&&i<n.length?n[i]:i}var ng=(()=>{class i extends qe{static id="category";static defaults={ticks:{callback:Tc}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let r=this.getLabels();for(let{index:a,label:o}of e)r[a]===o&&r.splice(a,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(U(t))return null;let r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:eg(r,t,N(e,t),this._addedLabels),ig(e,r.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),e||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){let t=this.min,e=this.max,r=this.options.offset,a=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=e;s++)a.push({value:s});return a}getLabelForValue(t){return Tc.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return i})();function rg(i,n){let t=[],{bounds:r,step:a,min:o,max:s,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=a||1,m=d-1,{min:p,max:g}=n,b=!U(o),_=!U(s),k=!U(c),C=(g-p)/(u+1),v=Sa((g-p)/m/f)*f,y,P,D,S;if(v<1e-14&&!b&&!_)return[{value:p},{value:g}];S=Math.ceil(g/v)-Math.floor(p/v),S>m&&(v=Sa(S*v/m/f)*f),U(l)||(y=Math.pow(10,l),v=Math.ceil(v*y)/y),r==="ticks"?(P=Math.floor(p/v)*v,D=Math.ceil(g/v)*v):(P=p,D=g),b&&_&&a&&ul((s-o)/a,v/1e3)?(S=Math.round(Math.min((s-o)/v,d)),v=(s-o)/S,P=o,D=s):k?(P=b?o:P,D=_?s:D,S=c-1,v=(D-P)/S):(S=(D-P)/v,gi(S,Math.round(S),v/1e3)?S=Math.round(S):S=Math.ceil(S));let L=Math.max(Ia(v),Ia(P));y=Math.pow(10,U(l)?L:l),P=Math.round(P*y)/y,D=Math.round(D*y)/y;let B=0;for(b&&(h&&P!==o?(t.push({value:o}),P<o&&B++,gi(Math.round((P+B*v)*y)/y,o,Mc(o,C,i))&&B++):P<o&&B++);B<S;++B){let W=Math.round((P+B*v)*y)/y;if(_&&W>s)break;t.push({value:W})}return _&&h&&D!==s?t.length&&gi(t[t.length-1].value,s,Mc(s,C,i))?t[t.length-1].value=s:t.push({value:s}):(!_||D===s)&&t.push({value:D}),t}function Mc(i,n,{horizontal:t,minRotation:e}){let r=Ht(e),a=(t?Math.sin(r):Math.cos(r))||.001,o=.75*n*(""+i).length;return Math.min(n/a,o)}var wi=class extends qe{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return U(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){let{beginAtZero:n}=this.options,{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:r,max:a}=this,o=l=>r=t?r:l,s=l=>a=e?a:l;if(n){let l=$t(r),c=$t(a);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(r===a){let l=a===0?1:Math.abs(a*.05);s(a+l),n||o(r-l)}this.min=r,this.max=a}getTickLimit(){let n=this.options.ticks,{maxTicksLimit:t,stepSize:e}=n,r;return e?(r=Math.ceil(this.max/e)-Math.floor(this.min/e)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${e} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let n=this.options,t=n.ticks,e=this.getTickLimit();e=Math.max(2,e);let r={maxTicks:e,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},a=this._range||this,o=rg(r,a);return n.bounds==="ticks"&&Oa(o,this,"value"),n.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let n=this.ticks,t=this.min,e=this.max;if(super.configure(),this.options.offset&&n.length){let r=(e-t)/Math.max(n.length-1,1)/2;t-=r,e+=r}this._startValue=t,this._endValue=e,this._valueRange=e-t}getLabelForValue(n){return _i(n,this.chart.options.locale,this.options.ticks.format)}},Po=class extends wi{static id="linear";static defaults={ticks:{callback:$i.formatters.numeric}};determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=at(n)?n:0,this.max=at(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let n=this.isHorizontal(),t=n?this.width:this.height,e=Ht(this.options.ticks.minRotation),r=(n?Math.sin(e):Math.cos(e))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,a.lineHeight/r))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}},on=i=>Math.floor(le(i)),je=(i,n)=>Math.pow(10,on(i)+n);function Dc(i){return i/Math.pow(10,on(i))===1}function Pc(i,n,t){let e=Math.pow(10,t),r=Math.floor(i/e);return Math.ceil(n/e)-r}function ag(i,n){let t=n-i,e=on(t);for(;Pc(i,n,e)>10;)e++;for(;Pc(i,n,e)<10;)e--;return Math.min(e,on(i))}function og(i,{min:n,max:t}){n=St(i.min,n);let e=[],r=on(n),a=ag(n,t),o=a<0?Math.pow(10,Math.abs(a)):1,s=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((n-l)*o)/o,d=Math.floor((n-l)/s/10)*s*10,u=Math.floor((c-d)/Math.pow(10,a)),h=St(i.min,Math.round((l+d+u*Math.pow(10,a))*o)/o);for(;h<t;)e.push({value:h,major:Dc(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(a++,u=2,o=a>=0?1:o),h=Math.round((l+d+u*Math.pow(10,a))*o)/o;let f=St(i.max,h);return e.push({value:f,major:Dc(f),significand:u}),e}var So=class extends qe{static id="logarithmic";static defaults={ticks:{callback:$i.formatters.logarithmic,major:{enabled:!0}}};constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){let e=wi.prototype.parse.apply(this,[n,t]);if(e===0){this._zero=!0;return}return at(e)&&e>0?e:null}determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=at(n)?Math.max(0,n):null,this.max=at(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!at(this._userMin)&&(this.min=n===je(this.min,0)?je(this.min,-1):je(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:n,maxDefined:t}=this.getUserBounds(),e=this.min,r=this.max,a=s=>e=n?e:s,o=s=>r=t?r:s;e===r&&(e<=0?(a(1),o(10)):(a(je(e,-1)),o(je(r,1)))),e<=0&&a(je(r,-1)),r<=0&&o(je(e,1)),this.min=e,this.max=r}buildTicks(){let n=this.options,t={min:this._userMin,max:this._userMax},e=og(t,this);return n.bounds==="ticks"&&Oa(e,this,"value"),n.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(n){return n===void 0?"0":_i(n,this.chart.options.locale,this.options.ticks.format)}configure(){let n=this.min;super.configure(),this._startValue=le(n),this._valueRange=le(this.max)-le(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(le(n)-this._startValue)/this._valueRange)}getValueForPixel(n){let t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}};function Oo(i){let n=i.ticks;if(n.display&&i.display){let t=xt(n.backdropPadding);return N(n.font&&n.font.size,nt.font.size)+t.height}return 0}function sg(i,n,t){return t=et(t)?t:[t],{w:xl(i,n.string,t),h:t.length*n.lineHeight}}function Sc(i,n,t,e,r){return i===e||i===r?{start:n-t/2,end:n+t/2}:i<e||i>r?{start:n-t,end:n}:{start:n,end:n+t}}function lg(i){let n={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},n),e=[],r=[],a=i._pointLabels.length,o=i.options.pointLabels,s=o.centerPointLabels?Q/a:0;for(let l=0;l<a;l++){let c=o.setContext(i.getPointLabelContext(l));r[l]=c.padding;let d=i.getPointPosition(l,i.drawingArea+r[l],s),u=dt(c.font),h=sg(i.ctx,u,i._pointLabels[l]);e[l]=h;let f=_t(i.getIndexAngle(l)+s),m=Math.round(Un(f)),p=Sc(m,d.x,h.w,0,180),g=Sc(m,d.y,h.h,90,270);cg(t,n,f,p,g)}i.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),i._pointLabelItems=hg(i,e,r)}function cg(i,n,t,e,r){let a=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t)),s=0,l=0;e.start<n.l?(s=(n.l-e.start)/a,i.l=Math.min(i.l,n.l-s)):e.end>n.r&&(s=(e.end-n.r)/a,i.r=Math.max(i.r,n.r+s)),r.start<n.t?(l=(n.t-r.start)/o,i.t=Math.min(i.t,n.t-l)):r.end>n.b&&(l=(r.end-n.b)/o,i.b=Math.max(i.b,n.b+l))}function dg(i,n,t){let e=i.drawingArea,{extra:r,additionalAngle:a,padding:o,size:s}=t,l=i.getPointPosition(n,e+r+o,a),c=Math.round(Un(_t(l.angle+lt))),d=pg(l.y,s.h,c),u=fg(c),h=mg(l.x,s.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:h,top:d,right:h+s.w,bottom:d+s.h}}function ug(i,n){if(!n)return!0;let{left:t,top:e,right:r,bottom:a}=i;return!(Zt({x:t,y:e},n)||Zt({x:t,y:a},n)||Zt({x:r,y:e},n)||Zt({x:r,y:a},n))}function hg(i,n,t){let e=[],r=i._pointLabels.length,a=i.options,{centerPointLabels:o,display:s}=a.pointLabels,l={extra:Oo(a)/2,additionalAngle:o?Q/r:0},c;for(let d=0;d<r;d++){l.padding=t[d],l.size=n[d];let u=dg(i,d,l);e.push(u),s==="auto"&&(u.visible=ug(u,c),u.visible&&(c=u))}return e}function fg(i){return i===0||i===180?"center":i<180?"left":"right"}function mg(i,n,t){return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function pg(i,n,t){return t===90||t===270?i-=n/2:(t>270||t<90)&&(i-=n),i}function gg(i,n,t){let{left:e,top:r,right:a,bottom:o}=t,{backdropColor:s}=n;if(!U(s)){let l=De(n.borderRadius),c=xt(n.backdropPadding);i.fillStyle=s;let d=e-c.left,u=r-c.top,h=a-e+c.width,f=o-r+c.height;Object.values(l).some(m=>m!==0)?(i.beginPath(),vi(i,{x:d,y:u,w:h,h:f,radius:l}),i.fill()):i.fillRect(d,u,h,f)}}function bg(i,n){let{ctx:t,options:{pointLabels:e}}=i;for(let r=n-1;r>=0;r--){let a=i._pointLabelItems[r];if(!a.visible)continue;let o=e.setContext(i.getPointLabelContext(r));gg(t,o,a);let s=dt(o.font),{x:l,y:c,textAlign:d}=a;Me(t,i._pointLabels[r],l,c+s.lineHeight/2,s,{color:o.color,textAlign:d,textBaseline:"middle"})}}function ed(i,n,t,e){let{ctx:r}=i;if(t)r.arc(i.xCenter,i.yCenter,n,0,it);else{let a=i.getPointPosition(0,n);r.moveTo(a.x,a.y);for(let o=1;o<e;o++)a=i.getPointPosition(o,n),r.lineTo(a.x,a.y)}}function _g(i,n,t,e,r){let a=i.ctx,o=n.circular,{color:s,lineWidth:l}=n;!o&&!e||!s||!l||t<0||(a.save(),a.strokeStyle=s,a.lineWidth=l,a.setLineDash(r.dash||[]),a.lineDashOffset=r.dashOffset,a.beginPath(),ed(i,t,o,e),a.closePath(),a.stroke(),a.restore())}function vg(i,n,t){return de(i,{label:t,index:n,type:"pointLabel"})}var Io=class extends wi{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:$i.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let n=this._padding=xt(Oo(this.options)/2),t=this.width=this.maxWidth-n.width,e=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+e/2+n.top),this.drawingArea=Math.floor(Math.min(t,e)/2)}determineDataLimits(){let{min:n,max:t}=this.getMinMax(!1);this.min=at(n)&&!isNaN(n)?n:0,this.max=at(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Oo(this.options))}generateTickLabels(n){wi.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,e)=>{let r=J(this.options.pointLabels.callback,[t,e],this);return r||r===0?r:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let n=this.options;n.display&&n.pointLabels.display?lg(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,e,r){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((e-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,e,r))}getIndexAngle(n){let t=it/(this._pointLabels.length||1),e=this.options.startAngle||0;return _t(n*t+Ht(e))}getDistanceFromCenterForValue(n){if(U(n))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(U(n))return NaN;let t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){let t=this._pointLabels||[];if(n>=0&&n<t.length){let e=t[n];return vg(this.getContext(),n,e)}}getPointPosition(n,t,e=0){let r=this.getIndexAngle(n)-lt+e;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){let{left:t,top:e,right:r,bottom:a}=this._pointLabelItems[n];return{left:t,top:e,right:r,bottom:a}}drawBackground(){let{backgroundColor:n,grid:{circular:t}}=this.options;if(n){let e=this.ctx;e.save(),e.beginPath(),ed(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),e.closePath(),e.fillStyle=n,e.fill(),e.restore()}}drawGrid(){let n=this.ctx,t=this.options,{angleLines:e,grid:r,border:a}=t,o=this._pointLabels.length,s,l,c;if(t.pointLabels.display&&bg(this,o),r.display&&this.ticks.forEach((d,u)=>{if(u!==0||u===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=r.setContext(h),m=a.setContext(h);_g(this,f,l,o,m)}}),e.display){for(n.save(),s=o-1;s>=0;s--){let d=e.setContext(this.getPointLabelContext(s)),{color:u,lineWidth:h}=d;!h||!u||(n.lineWidth=h,n.strokeStyle=u,n.setLineDash(d.borderDash),n.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(s,l),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(c.x,c.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){let n=this.ctx,t=this.options,e=t.ticks;if(!e.display)return;let r=this.getIndexAngle(0),a,o;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(r),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=e.setContext(this.getContext(l)),d=dt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){n.font=d.string,o=n.measureText(s.label).width,n.fillStyle=c.backdropColor;let u=xt(c.backdropPadding);n.fillRect(-o/2-u.left,-a-d.size/2-u.top,o+u.width,d.size+u.height)}Me(n,s.label,0,-a,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),n.restore()}drawTitle(){}},gr={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}},It=Object.keys(gr);function Oc(i,n){return i-n}function Ic(i,n){if(U(n))return null;let t=i._adapter,{parser:e,round:r,isoWeekday:a}=i._parseOpts,o=n;return typeof e=="function"&&(o=e(o)),at(o)||(o=typeof e=="string"?t.parse(o,e):t.parse(o)),o===null?null:(r&&(o=r==="week"&&(Ve(a)||a===!0)?t.startOf(o,"isoWeek",a):t.startOf(o,r)),+o)}function Ac(i,n,t,e){let r=It.length;for(let a=It.indexOf(i);a<r-1;++a){let o=gr[It[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((t-n)/(s*o.size))<=e)return It[a]}return It[r-1]}function xg(i,n,t,e,r){for(let a=It.length-1;a>=It.indexOf(t);a--){let o=It[a];if(gr[o].common&&i._adapter.diff(r,e,o)>=n-1)return o}return It[t?It.indexOf(t):0]}function yg(i){for(let n=It.indexOf(i)+1,t=It.length;n<t;++n)if(gr[It[n]].common)return It[n]}function Rc(i,n,t){if(!t)i[n]=!0;else if(t.length){let{lo:e,hi:r}=jn(t,n),a=t[e]>=n?t[e]:t[r];i[a]=!0}}function kg(i,n,t,e){let r=i._adapter,a=+r.startOf(n[0].value,e),o=n[n.length-1].value,s,l;for(s=a;s<=o;s=+r.add(s,1,e))l=t[s],l>=0&&(n[l].major=!0);return n}function Ec(i,n,t){let e=[],r={},a=n.length,o,s;for(o=0;o<a;++o)s=n[o],r[s]=o,e.push({value:s,major:!1});return a===0||!t?e:kg(i,e,r,t)}var Ao=(()=>{class i extends qe{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let r=t.time||(t.time={}),a=this._adapter=new Lo._date(t.adapters.date);a.init(e),mi(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Ic(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,r=t.time.unit||"day",{min:a,max:o,minDefined:s,maxDefined:l}=this.getUserBounds();function c(d){!s&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!l&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!s||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),a=at(a)&&!isNaN(a)?a:+e.startOf(Date.now(),r),o=at(o)&&!isNaN(o)?o:+e.endOf(Date.now(),r)+1,this.min=Math.min(a,o-1),this.max=Math.max(a+1,o)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],r=t[t.length-1]),{min:e,max:r}}buildTicks(){let t=this.options,e=t.time,r=t.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);let o=this.min,s=this.max,l=ml(a,o,s);return this._unit=e.unit||(r.autoSkip?Ac(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):xg(this,l.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:yg(this._unit),this.initOffsets(a),t.reverse&&l.reverse(),Ec(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,r=0,a,o;this.options.offset&&t.length&&(a=this.getDecimalForValue(t[0]),t.length===1?e=1-a:e=(this.getDecimalForValue(t[1])-a)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);let s=t.length<3?.5:.25;e=pt(e,0,s),r=pt(r,0,s),this._offsets={start:e,end:r,factor:1/(e+1+r)}}_generate(){let t=this._adapter,e=this.min,r=this.max,a=this.options,o=a.time,s=o.unit||Ac(o.minUnit,e,r,this._getLabelCapacity(e)),l=N(a.ticks.stepSize,1),c=s==="week"?o.isoWeekday:!1,d=Ve(c)||c===!0,u={},h=e,f,m;if(d&&(h=+t.startOf(h,"isoWeek",c)),h=+t.startOf(h,d?"day":s),t.diff(r,e,s)>1e5*l)throw new Error(e+" and "+r+" are too far apart with stepSize of "+l+" "+s);let p=a.ticks.source==="data"&&this.getDataTimestamps();for(f=h,m=0;f<r;f=+t.add(f,l,s),m++)Rc(u,f,p);return(f===r||a.bounds==="ticks"||m===1)&&Rc(u,f,p),Object.keys(u).sort(Oc).map(g=>+g)}getLabelForValue(t){let e=this._adapter,r=this.options.time;return r.tooltipFormat?e.format(t,r.tooltipFormat):e.format(t,r.displayFormats.datetime)}format(t,e){let a=this.options.time.displayFormats,o=this._unit,s=e||a[o];return this._adapter.format(t,s)}_tickFormatFunction(t,e,r,a){let o=this.options,s=o.ticks.callback;if(s)return J(s,[t,e,r],this);let l=o.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&l[c],h=d&&l[d],f=r[e],m=d&&h&&f&&f.major;return this._adapter.format(t,a||(m?h:u))}generateTickLabels(t){let e,r,a;for(e=0,r=t.length;e<r;++e)a=t[e],a.label=this._tickFormatFunction(a.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+r)*e.factor)}getValueForPixel(t){let e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,r=this.ctx.measureText(t).width,a=Ht(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(a),s=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:r*o+l*s,h:r*s+l*o}}_getLabelCapacity(t){let e=this.options.time,r=e.displayFormats,a=r[e.unit]||r.millisecond,o=this._tickFormatFunction(t,0,Ec(this,[t],this._majorUnit),a),s=this._getLabelSize(o),l=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],e,r;if(t.length)return t;let a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(e=0,r=a.length;e<r;++e)t=t.concat(a[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,r;if(t.length)return t;let a=this.getLabels();for(e=0,r=a.length;e<r;++e)t.push(Ic(this,a[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ea(t.sort(Oc))}}return i})();function ar(i,n,t){let e=0,r=i.length-1,a,o,s,l;t?(n>=i[e].pos&&n<=i[r].pos&&({lo:e,hi:r}=Kt(i,"pos",n)),{pos:a,time:s}=i[e],{pos:o,time:l}=i[r]):(n>=i[e].time&&n<=i[r].time&&({lo:e,hi:r}=Kt(i,"time",n)),{time:a,pos:s}=i[e],{time:o,pos:l}=i[r]);let c=o-a;return c?s+(l-s)*(n-a)/c:s}var Ro=class extends Ao{static id="timeseries";static defaults=Ao.defaults;constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=ar(t,this.min),this._tableRange=ar(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){let{min:t,max:e}=this,r=[],a=[],o,s,l,c,d;for(o=0,s=n.length;o<s;++o)c=n[o],c>=t&&c<=e&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:e,pos:1}];for(o=0,s=r.length;o<s;++o)d=r[o+1],l=r[o-1],c=r[o],Math.round((d+l)/2)!==c&&a.push({time:c,pos:o/(s-1)});return a}_generate(){let n=this.min,t=this.max,e=super.getDataTimestamps();return(!e.includes(n)||!e.length)&&e.splice(0,0,n),(!e.includes(t)||e.length===1)&&e.push(t),e.sort((r,a)=>r-a)}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;let t=this.getDataTimestamps(),e=this.getLabelTimestamps();return t.length&&e.length?n=this.normalize(t.concat(e)):n=t.length?t:e,n=this._cache.all=n,n}getDecimalForValue(n){return(ar(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){let t=this._offsets,e=this.getDecimalForPixel(n)/t.factor-t.end;return ar(this._table,e*this._tableRange+this._minPos,!0)}},wg=Object.freeze({__proto__:null,CategoryScale:ng,LinearScale:Po,LogarithmicScale:So,RadialLinearScale:Io,TimeScale:Ao,TimeSeriesScale:Ro}),h0=[Af,rp,Jp,wg];function Mt(i){"@babel/helpers - typeof";return Mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mt(i)}function F(i){if(i===null||i===!0||i===!1)return NaN;var n=Number(i);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function x(i,n){if(n.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+n.length+" present")}function M(i){x(1,arguments);var n=Object.prototype.toString.call(i);return i instanceof Date||Mt(i)==="object"&&n==="[object Date]"?new Date(i.getTime()):typeof i=="number"||n==="[object Number]"?new Date(i):((typeof i=="string"||n==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ci(i,n){x(2,arguments);var t=M(i),e=F(n);return isNaN(e)?new Date(NaN):(e&&t.setDate(t.getDate()+e),t)}function Ie(i,n){x(2,arguments);var t=M(i),e=F(n);if(isNaN(e))return new Date(NaN);if(!e)return t;var r=t.getDate(),a=new Date(t.getTime());a.setMonth(t.getMonth()+e+1,0);var o=a.getDate();return r>=o?a:(t.setFullYear(a.getFullYear(),a.getMonth(),r),t)}function Vt(i,n){x(2,arguments);var t=M(i).getTime(),e=F(n);return new Date(t+e)}var Cg=36e5;function br(i,n){x(2,arguments);var t=F(n);return Vt(i,t*Cg)}var Tg={};function Ct(){return Tg}function ln(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.weekStartsOn)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:d.weekStartsOn)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=M(i),f=h.getDay(),m=(f<u?7:0)+f-u;return h.setDate(h.getDate()-m),h.setHours(0,0,0,0),h}function Ae(i){var n=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return n.setUTCFullYear(i.getFullYear()),i.getTime()-n.getTime()}function $e(i){x(1,arguments);var n=M(i);return n.setHours(0,0,0,0),n}var Mg=864e5;function Fo(i,n){x(2,arguments);var t=$e(i),e=$e(n),r=t.getTime()-Ae(t),a=e.getTime()-Ae(e);return Math.round((r-a)/Mg)}var Dg=6e4;function _r(i,n){x(2,arguments);var t=F(n);return Vt(i,t*Dg)}function vr(i,n){x(2,arguments);var t=F(n),e=t*3;return Ie(i,e)}function xr(i,n){x(2,arguments);var t=F(n);return Vt(i,t*1e3)}function yr(i,n){x(2,arguments);var t=F(n),e=t*7;return Ci(i,e)}function kr(i,n){x(2,arguments);var t=F(n);return Ie(i,t*12)}function Re(i,n){x(2,arguments);var t=M(i),e=M(n),r=t.getTime()-e.getTime();return r<0?-1:r>0?1:r}var Pg=365.2425,Sg=Math.pow(10,8)*24*60*60*1e3,Qe=6e4,Xe=36e5,id=1e3,xv=-Sg;var Og=3600;var nd=Og*24,yv=nd*7,Ig=nd*Pg,Ag=Ig/12,kv=Ag*3;function Bo(i){return x(1,arguments),i instanceof Date||Mt(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function Ti(i){if(x(1,arguments),!Bo(i)&&typeof i!="number")return!1;var n=M(i);return!isNaN(Number(n))}function zo(i,n){x(2,arguments);var t=M(i),e=M(n),r=t.getFullYear()-e.getFullYear(),a=t.getMonth()-e.getMonth();return r*12+a}function No(i,n){x(2,arguments);var t=M(i),e=M(n);return t.getFullYear()-e.getFullYear()}function rd(i,n){var t=i.getFullYear()-n.getFullYear()||i.getMonth()-n.getMonth()||i.getDate()-n.getDate()||i.getHours()-n.getHours()||i.getMinutes()-n.getMinutes()||i.getSeconds()-n.getSeconds()||i.getMilliseconds()-n.getMilliseconds();return t<0?-1:t>0?1:t}function Mi(i,n){x(2,arguments);var t=M(i),e=M(n),r=rd(t,e),a=Math.abs(Fo(t,e));t.setDate(t.getDate()-r*a);var o=+(rd(t,e)===-r),s=r*(a-o);return s===0?0:s}function ne(i,n){return x(2,arguments),M(i).getTime()-M(n).getTime()}var ad={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(n){return n<0?Math.ceil(n):Math.floor(n)}},Rg="trunc";function re(i){return i?ad[i]:ad[Rg]}function wr(i,n,t){x(2,arguments);var e=ne(i,n)/Xe;return re(t?.roundingMethod)(e)}function Cr(i,n,t){x(2,arguments);var e=ne(i,n)/Qe;return re(t?.roundingMethod)(e)}function Di(i){x(1,arguments);var n=M(i);return n.setHours(23,59,59,999),n}function Pi(i){x(1,arguments);var n=M(i),t=n.getMonth();return n.setFullYear(n.getFullYear(),t+1,0),n.setHours(23,59,59,999),n}function Wo(i){x(1,arguments);var n=M(i);return Di(n).getTime()===Pi(n).getTime()}function Si(i,n){x(2,arguments);var t=M(i),e=M(n),r=Re(t,e),a=Math.abs(zo(t,e)),o;if(a<1)o=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-r*a);var s=Re(t,e)===-r;Wo(M(i))&&a===1&&Re(i,e)===1&&(s=!1),o=r*(a-Number(s))}return o===0?0:o}function Tr(i,n,t){x(2,arguments);var e=Si(i,n)/3;return re(t?.roundingMethod)(e)}function Mr(i,n,t){x(2,arguments);var e=ne(i,n)/1e3;return re(t?.roundingMethod)(e)}function Dr(i,n,t){x(2,arguments);var e=Mi(i,n)/7;return re(t?.roundingMethod)(e)}function Pr(i,n){x(2,arguments);var t=M(i),e=M(n),r=Re(t,e),a=Math.abs(No(t,e));t.setFullYear(1584),e.setFullYear(1584);var o=Re(t,e)===-r,s=r*(a-Number(o));return s===0?0:s}function Sr(i){x(1,arguments);var n=M(i);return n.setSeconds(0,0),n}function Or(i){x(1,arguments);var n=M(i),t=n.getMonth(),e=t-t%3;return n.setMonth(e,1),n.setHours(0,0,0,0),n}function Ir(i){x(1,arguments);var n=M(i);return n.setDate(1),n.setHours(0,0,0,0),n}function Ar(i){x(1,arguments);var n=M(i),t=n.getFullYear();return n.setFullYear(t+1,0,0),n.setHours(23,59,59,999),n}function Rr(i){x(1,arguments);var n=M(i),t=new Date(0);return t.setFullYear(n.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Er(i){x(1,arguments);var n=M(i);return n.setMinutes(59,59,999),n}function Lr(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.weekStartsOn)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:d.weekStartsOn)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=M(i),f=h.getDay(),m=(f<u?-7:0)+6-(f-u);return h.setDate(h.getDate()+m),h.setHours(23,59,59,999),h}function Fr(i){x(1,arguments);var n=M(i);return n.setSeconds(59,999),n}function Br(i){x(1,arguments);var n=M(i),t=n.getMonth(),e=t-t%3+3;return n.setMonth(e,0),n.setHours(23,59,59,999),n}function zr(i){x(1,arguments);var n=M(i);return n.setMilliseconds(999),n}function cn(i,n){x(2,arguments);var t=F(n);return Vt(i,-t)}var Eg=864e5;function Ho(i){x(1,arguments);var n=M(i),t=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var e=n.getTime(),r=t-e;return Math.floor(r/Eg)+1}function Yt(i){x(1,arguments);var n=1,t=M(i),e=t.getUTCDay(),r=(e<n?7:0)+e-n;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function dn(i){x(1,arguments);var n=M(i),t=n.getUTCFullYear(),e=new Date(0);e.setUTCFullYear(t+1,0,4),e.setUTCHours(0,0,0,0);var r=Yt(e),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var o=Yt(a);return n.getTime()>=r.getTime()?t+1:n.getTime()>=o.getTime()?t:t-1}function Vo(i){x(1,arguments);var n=dn(i),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var e=Yt(t);return e}var Lg=6048e5;function un(i){x(1,arguments);var n=M(i),t=Yt(n).getTime()-Vo(n).getTime();return Math.round(t/Lg)+1}function Lt(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.weekStartsOn)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:d.weekStartsOn)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=M(i),f=h.getUTCDay(),m=(f<u?7:0)+f-u;return h.setUTCDate(h.getUTCDate()-m),h.setUTCHours(0,0,0,0),h}function Ge(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=M(i),u=d.getUTCFullYear(),h=Ct(),f=F((t=(e=(r=(a=n?.firstWeekContainsDate)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&e!==void 0?e:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,f),m.setUTCHours(0,0,0,0);var p=Lt(m,n),g=new Date(0);g.setUTCFullYear(u,0,f),g.setUTCHours(0,0,0,0);var b=Lt(g,n);return d.getTime()>=p.getTime()?u+1:d.getTime()>=b.getTime()?u:u-1}function Yo(i,n){var t,e,r,a,o,s,l,c;x(1,arguments);var d=Ct(),u=F((t=(e=(r=(a=n?.firstWeekContainsDate)!==null&&a!==void 0?a:n==null||(o=n.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:d.firstWeekContainsDate)!==null&&e!==void 0?e:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=Ge(i,n),f=new Date(0);f.setUTCFullYear(h,0,u),f.setUTCHours(0,0,0,0);var m=Lt(f,n);return m}var Fg=6048e5;function hn(i,n){x(1,arguments);var t=M(i),e=Lt(t,n).getTime()-Yo(t,n).getTime();return Math.round(e/Fg)+1}function X(i,n){for(var t=i<0?"-":"",e=Math.abs(i).toString();e.length<n;)e="0"+e;return t+e}var Bg={y:function(n,t){var e=n.getUTCFullYear(),r=e>0?e:1-e;return X(t==="yy"?r%100:r,t.length)},M:function(n,t){var e=n.getUTCMonth();return t==="M"?String(e+1):X(e+1,2)},d:function(n,t){return X(n.getUTCDate(),t.length)},a:function(n,t){var e=n.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h:function(n,t){return X(n.getUTCHours()%12||12,t.length)},H:function(n,t){return X(n.getUTCHours(),t.length)},m:function(n,t){return X(n.getUTCMinutes(),t.length)},s:function(n,t){return X(n.getUTCSeconds(),t.length)},S:function(n,t){var e=t.length,r=n.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,e-3));return X(a,t.length)}},fe=Bg;var Oi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zg={G:function(n,t,e){var r=n.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){var r=n.getUTCFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return fe.y(n,t)},Y:function(n,t,e,r){var a=Ge(n,r),o=a>0?a:1-a;if(t==="YY"){var s=o%100;return X(s,2)}return t==="Yo"?e.ordinalNumber(o,{unit:"year"}):X(o,t.length)},R:function(n,t){var e=dn(n);return X(e,t.length)},u:function(n,t){var e=n.getUTCFullYear();return X(e,t.length)},Q:function(n,t,e){var r=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return X(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){var r=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return X(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){var r=n.getUTCMonth();switch(t){case"M":case"MM":return fe.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){var r=n.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return X(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){var a=hn(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):X(a,t.length)},I:function(n,t,e){var r=un(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):X(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getUTCDate(),{unit:"date"}):fe.d(n,t)},D:function(n,t,e){var r=Ho(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):X(r,t.length)},E:function(n,t,e){var r=n.getUTCDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){var a=n.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return X(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){var a=n.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return X(o,t.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){var r=n.getUTCDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return X(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){var r=n.getUTCHours(),a=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){var r=n.getUTCHours(),a;switch(r===12?a=Oi.noon:r===0?a=Oi.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){var r=n.getUTCHours(),a;switch(r>=17?a=Oi.evening:r>=12?a=Oi.afternoon:r>=4?a=Oi.morning:a=Oi.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){var r=n.getUTCHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return fe.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getUTCHours(),{unit:"hour"}):fe.H(n,t)},K:function(n,t,e){var r=n.getUTCHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},k:function(n,t,e){var r=n.getUTCHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):fe.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):fe.s(n,t)},S:function(n,t){return fe.S(n,t)},X:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return sd(o);case"XXXX":case"XX":return Ke(o);case"XXXXX":case"XXX":default:return Ke(o,":")}},x:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"x":return sd(o);case"xxxx":case"xx":return Ke(o);case"xxxxx":case"xxx":default:return Ke(o,":")}},O:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+od(o,":");case"OOOO":default:return"GMT"+Ke(o,":")}},z:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+od(o,":");case"zzzz":default:return"GMT"+Ke(o,":")}},t:function(n,t,e,r){var a=r._originalDate||n,o=Math.floor(a.getTime()/1e3);return X(o,t.length)},T:function(n,t,e,r){var a=r._originalDate||n,o=a.getTime();return X(o,t.length)}};function od(i,n){var t=i>0?"-":"+",e=Math.abs(i),r=Math.floor(e/60),a=e%60;if(a===0)return t+String(r);var o=n||"";return t+String(r)+o+X(a,2)}function sd(i,n){if(i%60===0){var t=i>0?"-":"+";return t+X(Math.abs(i)/60,2)}return Ke(i,n)}function Ke(i,n){var t=n||"",e=i>0?"-":"+",r=Math.abs(i),a=X(Math.floor(r/60),2),o=X(r%60,2);return e+a+t+o}var ld=zg;var cd=function(n,t){switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},dd=function(n,t){switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ng=function(n,t){var e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return cd(n,t);var o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",cd(r,t)).replace("{{time}}",dd(a,t))},Wg={p:dd,P:Ng},fn=Wg;var Hg=["D","DD"],Vg=["YY","YYYY"];function Nr(i){return Hg.indexOf(i)!==-1}function Wr(i){return Vg.indexOf(i)!==-1}function Ii(i,n,t){if(i==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Yg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ug=function(n,t,e){var r,a=Yg[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r},ud=Ug;function mn(i){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.width?String(n.width):i.defaultWidth,e=i.formats[t]||i.formats[i.defaultWidth];return e}}var jg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$g={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Qg={date:mn({formats:jg,defaultWidth:"full"}),time:mn({formats:qg,defaultWidth:"full"}),dateTime:mn({formats:$g,defaultWidth:"full"})},hd=Qg;var Xg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gg=function(n,t,e,r){return Xg[n]},fd=Gg;function Ze(i){return function(n,t){var e=t!=null&&t.context?String(t.context):"standalone",r;if(e==="formatting"&&i.formattingValues){var a=i.defaultFormattingWidth||i.defaultWidth,o=t!=null&&t.width?String(t.width):a;r=i.formattingValues[o]||i.formattingValues[a]}else{var s=i.defaultWidth,l=t!=null&&t.width?String(t.width):i.defaultWidth;r=i.values[l]||i.values[s]}var c=i.argumentCallback?i.argumentCallback(n):n;return r[c]}}var Kg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ib={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nb=function(n,t){var e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},rb={ordinalNumber:nb,era:Ze({values:Kg,defaultWidth:"wide"}),quarter:Ze({values:Zg,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:Ze({values:Jg,defaultWidth:"wide"}),day:Ze({values:tb,defaultWidth:"wide"}),dayPeriod:Ze({values:eb,defaultWidth:"wide",formattingValues:ib,defaultFormattingWidth:"wide"})},md=rb;function Je(i){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=t.width,r=e&&i.matchPatterns[e]||i.matchPatterns[i.defaultMatchWidth],a=n.match(r);if(!a)return null;var o=a[0],s=e&&i.parsePatterns[e]||i.parsePatterns[i.defaultParseWidth],l=Array.isArray(s)?ob(s,function(u){return u.test(o)}):ab(s,function(u){return u.test(o)}),c;c=i.valueCallback?i.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;var d=n.slice(o.length);return{value:c,rest:d}}}function ab(i,n){for(var t in i)if(i.hasOwnProperty(t)&&n(i[t]))return t}function ob(i,n){for(var t=0;t<i.length;t++)if(n(i[t]))return t}function Uo(i){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=n.match(i.matchPattern);if(!e)return null;var r=e[0],a=n.match(i.parsePattern);if(!a)return null;var o=i.valueCallback?i.valueCallback(a[0]):a[0];o=t.valueCallback?t.valueCallback(o):o;var s=n.slice(r.length);return{value:o,rest:s}}}var sb=/^(\d+)(th|st|nd|rd)?/i,lb=/\d+/i,cb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},db={any:[/^b/i,/^(a|c)/i]},ub={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hb={any:[/1/i,/2/i,/3/i,/4/i]},fb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},mb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},gb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_b={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vb={ordinalNumber:Uo({matchPattern:sb,parsePattern:lb,valueCallback:function(n){return parseInt(n,10)}}),era:Je({matchPatterns:cb,defaultMatchWidth:"wide",parsePatterns:db,defaultParseWidth:"any"}),quarter:Je({matchPatterns:ub,defaultMatchWidth:"wide",parsePatterns:hb,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:Je({matchPatterns:fb,defaultMatchWidth:"wide",parsePatterns:mb,defaultParseWidth:"any"}),day:Je({matchPatterns:pb,defaultMatchWidth:"wide",parsePatterns:gb,defaultParseWidth:"any"}),dayPeriod:Je({matchPatterns:bb,defaultMatchWidth:"any",parsePatterns:_b,defaultParseWidth:"any"})},pd=vb;var xb={code:"en-US",formatDistance:ud,formatLong:hd,formatRelative:fd,localize:md,match:pd,options:{weekStartsOn:0,firstWeekContainsDate:1}},gd=xb;var Hr=gd;var yb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wb=/^'([^]*?)'?$/,Cb=/''/g,Tb=/[a-zA-Z]/;function Vr(i,n,t){var e,r,a,o,s,l,c,d,u,h,f,m,p,g,b,_,k,C;x(2,arguments);var v=String(n),y=Ct(),P=(e=(r=t?.locale)!==null&&r!==void 0?r:y.locale)!==null&&e!==void 0?e:Hr,D=F((a=(o=(s=(l=t?.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(c=t.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:y.firstWeekContainsDate)!==null&&o!==void 0?o:(u=y.locale)===null||u===void 0||(h=u.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=F((f=(m=(p=(g=t?.weekStartsOn)!==null&&g!==void 0?g:t==null||(b=t.locale)===null||b===void 0||(_=b.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:y.weekStartsOn)!==null&&m!==void 0?m:(k=y.locale)===null||k===void 0||(C=k.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&f!==void 0?f:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var L=M(i);if(!Ti(L))throw new RangeError("Invalid time value");var B=Ae(L),W=cn(L,B),rt={firstWeekContainsDate:D,weekStartsOn:S,locale:P,_originalDate:L},bt=v.match(kb).map(function(z){var Y=z[0];if(Y==="p"||Y==="P"){var K=fn[Y];return K(z,P.formatLong)}return z}).join("").match(yb).map(function(z){if(z==="''")return"'";var Y=z[0];if(Y==="'")return Mb(z);var K=ld[Y];if(K)return!(t!=null&&t.useAdditionalWeekYearTokens)&&Wr(z)&&Ii(z,n,String(i)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Nr(z)&&Ii(z,n,String(i)),K(W,z,P.localize,rt);if(Y.match(Tb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return z}).join("");return bt}function Mb(i){var n=i.match(wb);return n?n[1].replace(Cb,"'"):i}function jo(i,n){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(i[t]=n[t]);return i}function qo(i,n){(n==null||n>i.length)&&(n=i.length);for(var t=0,e=Array(n);t<n;t++)e[t]=i[t];return e}function bd(i,n){if(i){if(typeof i=="string")return qo(i,n);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qo(i,n):void 0}}function $o(i,n){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=bd(i))||n&&i&&typeof i.length=="number"){t&&(i=t);var e=0,r=function(){};return{s:r,n:function(){return e>=i.length?{done:!0}:{done:!1,value:i[e++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(i)},n:function(){var c=t.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function T(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Yr(i,n){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(i,n)}function A(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),n&&Yr(i,n)}function pn(i){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(i)}function Qo(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qo=function(){return!!i})()}function _d(i,n){if(n&&(Mt(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(i)}function R(i){var n=Qo();return function(){var t,e=pn(i);if(n){var r=pn(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return _d(this,t)}}function O(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function vd(i,n){if(Mt(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var e=t.call(i,n||"default");if(Mt(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function Ur(i){var n=vd(i,"string");return Mt(n)=="symbol"?n:n+""}function xd(i,n){for(var t=0;t<n.length;t++){var e=n[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(i,Ur(e.key),e)}}function I(i,n,t){return n&&xd(i.prototype,n),t&&xd(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function w(i,n,t){return(n=Ur(n))in i?Object.defineProperty(i,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[n]=t,i}var Db=10,yd=(function(){function i(){O(this,i),w(this,"priority",void 0),w(this,"subPriority",0)}return I(i,[{key:"validate",value:function(t,e){return!0}}]),i})(),kd=(function(i){A(t,i);var n=R(t);function t(e,r,a,o,s){var l;return O(this,t),l=n.call(this),l.value=e,l.validateValue=r,l.setValue=a,l.priority=o,s&&(l.subPriority=s),l}return I(t,[{key:"validate",value:function(r,a){return this.validateValue(r,this.value,a)}},{key:"set",value:function(r,a,o){return this.setValue(r,a,this.value,o)}}]),t})(yd),wd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",Db),w(T(e),"subPriority",-1),e}return I(t,[{key:"set",value:function(r,a){if(a.timestampIsSet)return r;var o=new Date(0);return o.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),o.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),o}}]),t})(yd);var E=(function(){function i(){O(this,i),w(this,"incompatibleTokens",void 0),w(this,"priority",void 0),w(this,"subPriority",void 0)}return I(i,[{key:"run",value:function(t,e,r,a){var o=this.parse(t,e,r,a);return o?{setter:new kd(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(t,e,r){return!0}}]),i})();var Cd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",140),w(T(e),"incompatibleTokens",["R","u","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"})||o.era(r,{width:"narrow"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})||o.era(r,{width:"abbreviated"})||o.era(r,{width:"narrow"})}}},{key:"set",value:function(r,a,o){return a.era=o,r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var $={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Ut={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Z(i,n){return i&&{value:n(i.value),rest:i.rest}}function q(i,n){var t=n.match(i);return t?{value:parseInt(t[0],10),rest:n.slice(t[0].length)}:null}function jt(i,n){var t=n.match(i);if(!t)return null;if(t[0]==="Z")return{value:0,rest:n.slice(1)};var e=t[1]==="+"?1:-1,r=t[2]?parseInt(t[2],10):0,a=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:e*(r*Xe+a*Qe+o*id),rest:n.slice(t[0].length)}}function jr(i){return q($.anyDigitsSigned,i)}function H(i,n){switch(i){case 1:return q($.singleDigit,n);case 2:return q($.twoDigits,n);case 3:return q($.threeDigits,n);case 4:return q($.fourDigits,n);default:return q(new RegExp("^\\d{1,"+i+"}"),n)}}function Ai(i,n){switch(i){case 1:return q($.singleDigitSigned,n);case 2:return q($.twoDigitsSigned,n);case 3:return q($.threeDigitsSigned,n);case 4:return q($.fourDigitsSigned,n);default:return q(new RegExp("^-?\\d{1,"+i+"}"),n)}}function Ri(i){switch(i){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qr(i,n){var t=n>0,e=t?n:1-n,r;if(e<=50)r=i||100;else{var a=e+50,o=Math.floor(a/100)*100,s=i>=a%100;r=i+o-(s?100:0)}return t?r:1-r}function $r(i){return i%400===0||i%4===0&&i%100!==0}var Td=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Z(H(4,r),s);case"yo":return Z(o.ordinalNumber(r,{unit:"year"}),s);default:return Z(H(a.length,r),s)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,o){var s=r.getUTCFullYear();if(o.isTwoDigitYear){var l=qr(o.year,s);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in a)||a.era===1?o.year:1-o.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Md=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Z(H(4,r),s);case"Yo":return Z(o.ordinalNumber(r,{unit:"year"}),s);default:return Z(H(a.length,r),s)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,o,s){var l=Ge(r,s);if(o.isTwoDigitYear){var c=qr(o.year,l);return r.setUTCFullYear(c,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Lt(r,s)}var d=!("era"in a)||a.era===1?o.year:1-o.year;return r.setUTCFullYear(d,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Lt(r,s)}}]),t})(E);var Dd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a){return a==="R"?Ai(4,r):Ai(a.length,r)}},{key:"set",value:function(r,a,o){var s=new Date(0);return s.setUTCFullYear(o,0,4),s.setUTCHours(0,0,0,0),Yt(s)}}]),t})(E);var Pd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",130),w(T(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a){return a==="u"?Ai(4,r):Ai(a.length,r)}},{key:"set",value:function(r,a,o){return r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Sd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",120),w(T(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"Q":case"QQ":return H(a.length,r);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"})||o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})||o.quarter(r,{width:"abbreviated",context:"formatting"})||o.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Od=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",120),w(T(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"q":case"qq":return H(a.length,r);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"})||o.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})||o.quarter(r,{width:"abbreviated",context:"standalone"})||o.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,o){return r.setUTCMonth((o-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Id=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),w(T(e),"priority",110),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return c-1};switch(a){case"M":return Z(q($.month,r),s);case"MM":return Z(H(2,r),s);case"Mo":return Z(o.ordinalNumber(r,{unit:"month"}),s);case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"})||o.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})||o.month(r,{width:"abbreviated",context:"formatting"})||o.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Ad=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",110),w(T(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return c-1};switch(a){case"L":return Z(q($.month,r),s);case"LL":return Z(H(2,r),s);case"Lo":return Z(o.ordinalNumber(r,{unit:"month"}),s);case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"})||o.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})||o.month(r,{width:"abbreviated",context:"standalone"})||o.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,o){return r.setUTCMonth(o,1),r.setUTCHours(0,0,0,0),r}}]),t})(E);function Xo(i,n,t){x(2,arguments);var e=M(i),r=F(n),a=hn(e,t)-r;return e.setUTCDate(e.getUTCDate()-a*7),e}var Rd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",100),w(T(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"w":return q($.week,r);case"wo":return o.ordinalNumber(r,{unit:"week"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,o,s){return Lt(Xo(r,o,s),s)}}]),t})(E);function Go(i,n){x(2,arguments);var t=M(i),e=F(n),r=un(t)-e;return t.setUTCDate(t.getUTCDate()-r*7),t}var Ed=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",100),w(T(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"I":return q($.week,r);case"Io":return o.ordinalNumber(r,{unit:"week"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,o){return Yt(Go(r,o))}}]),t})(E);var Pb=[31,28,31,30,31,30,31,31,30,31,30,31],Sb=[31,29,31,30,31,30,31,31,30,31,30,31],Ld=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"subPriority",1),w(T(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"d":return q($.date,r);case"do":return o.ordinalNumber(r,{unit:"date"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){var o=r.getUTCFullYear(),s=$r(o),l=r.getUTCMonth();return s?a>=1&&a<=Sb[l]:a>=1&&a<=Pb[l]}},{key:"set",value:function(r,a,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Fd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"subpriority",1),w(T(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"D":case"DD":return q($.dayOfYear,r);case"Do":return o.ordinalNumber(r,{unit:"date"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){var o=r.getUTCFullYear(),s=$r(o);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(r,a,o){return r.setUTCMonth(0,o),r.setUTCHours(0,0,0,0),r}}]),t})(E);function ti(i,n,t){var e,r,a,o,s,l,c,d;x(2,arguments);var u=Ct(),h=F((e=(r=(a=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&r!==void 0?r:(c=u.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&e!==void 0?e:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=M(i),m=F(n),p=f.getUTCDay(),g=m%7,b=(g+7)%7,_=(b<h?7:0)+m-p;return f.setUTCDate(f.getUTCDate()+_),f}var Bd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,o,s){return r=ti(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(E);var zd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o,s){var l=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return Z(H(a.length,r),l);case"eo":return Z(o.ordinalNumber(r,{unit:"day"}),l);case"eee":return o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,o,s){return r=ti(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Nd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o,s){var l=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return Z(H(a.length,r),l);case"co":return Z(o.ordinalNumber(r,{unit:"day"}),l);case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"})||o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})||o.day(r,{width:"abbreviated",context:"standalone"})||o.day(r,{width:"short",context:"standalone"})||o.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,o,s){return r=ti(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(E);function Ko(i,n){x(2,arguments);var t=F(n);t%7===0&&(t=t-7);var e=1,r=M(i),a=r.getUTCDay(),o=t%7,s=(o+7)%7,l=(s<e?7:0)+t-a;return r.setUTCDate(r.getUTCDate()+l),r}var Wd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",90),w(T(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){var s=function(c){return c===0?7:c};switch(a){case"i":case"ii":return H(a.length,r);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return Z(o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiii":return Z(o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Z(o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Z(o.day(r,{width:"wide",context:"formatting"})||o.day(r,{width:"abbreviated",context:"formatting"})||o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(r,a){return a>=1&&a<=7}},{key:"set",value:function(r,a,o){return r=Ko(r,o),r.setUTCHours(0,0,0,0),r}}]),t})(E);var Hd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",80),w(T(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"a":case"aa":case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,o){return r.setUTCHours(Ri(o),0,0,0),r}}]),t})(E);var Vd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",80),w(T(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"b":case"bb":case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,o){return r.setUTCHours(Ri(o),0,0,0),r}}]),t})(E);var Yd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",80),w(T(e),"incompatibleTokens",["a","b","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})||o.dayPeriod(r,{width:"abbreviated",context:"formatting"})||o.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,o){return r.setUTCHours(Ri(o),0,0,0),r}}]),t})(E);var Ud=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["H","K","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"h":return q($.hour12h,r);case"ho":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=12}},{key:"set",value:function(r,a,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):!s&&o===12?r.setUTCHours(0,0,0,0):r.setUTCHours(o,0,0,0),r}}]),t})(E);var jd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"H":return q($.hour23h,r);case"Ho":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=23}},{key:"set",value:function(r,a,o){return r.setUTCHours(o,0,0,0),r}}]),t})(E);var qd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["h","H","k","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"K":return q($.hour11h,r);case"Ko":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,o){var s=r.getUTCHours()>=12;return s&&o<12?r.setUTCHours(o+12,0,0,0):r.setUTCHours(o,0,0,0),r}}]),t})(E);var $d=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",70),w(T(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"k":return q($.hour24h,r);case"ko":return o.ordinalNumber(r,{unit:"hour"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=24}},{key:"set",value:function(r,a,o){var s=o<=24?o%24:o;return r.setUTCHours(s,0,0,0),r}}]),t})(E);var Qd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",60),w(T(e),"incompatibleTokens",["t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"m":return q($.minute,r);case"mo":return o.ordinalNumber(r,{unit:"minute"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,o){return r.setUTCMinutes(o,0,0),r}}]),t})(E);var Xd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",50),w(T(e),"incompatibleTokens",["t","T"]),e}return I(t,[{key:"parse",value:function(r,a,o){switch(a){case"s":return q($.second,r);case"so":return o.ordinalNumber(r,{unit:"second"});default:return H(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,o){return r.setUTCSeconds(o,0),r}}]),t})(E);var Gd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",30),w(T(e),"incompatibleTokens",["t","T"]),e}return I(t,[{key:"parse",value:function(r,a){var o=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Z(H(a.length,r),o)}},{key:"set",value:function(r,a,o){return r.setUTCMilliseconds(o),r}}]),t})(E);var Kd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",10),w(T(e),"incompatibleTokens",["t","T","x"]),e}return I(t,[{key:"parse",value:function(r,a){switch(a){case"X":return jt(Ut.basicOptionalMinutes,r);case"XX":return jt(Ut.basic,r);case"XXXX":return jt(Ut.basicOptionalSeconds,r);case"XXXXX":return jt(Ut.extendedOptionalSeconds,r);case"XXX":default:return jt(Ut.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(E);var Zd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",10),w(T(e),"incompatibleTokens",["t","T","X"]),e}return I(t,[{key:"parse",value:function(r,a){switch(a){case"x":return jt(Ut.basicOptionalMinutes,r);case"xx":return jt(Ut.basic,r);case"xxxx":return jt(Ut.basicOptionalSeconds,r);case"xxxxx":return jt(Ut.extendedOptionalSeconds,r);case"xxx":default:return jt(Ut.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(E);var Jd=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",40),w(T(e),"incompatibleTokens","*"),e}return I(t,[{key:"parse",value:function(r){return jr(r)}},{key:"set",value:function(r,a,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),t})(E);var tu=(function(i){A(t,i);var n=R(t);function t(){var e;O(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return e=n.call.apply(n,[this].concat(a)),w(T(e),"priority",20),w(T(e),"incompatibleTokens","*"),e}return I(t,[{key:"parse",value:function(r){return jr(r)}},{key:"set",value:function(r,a,o){return[new Date(o),{timestampIsSet:!0}]}}]),t})(E);var eu={G:new Cd,y:new Td,Y:new Md,R:new Dd,u:new Pd,Q:new Sd,q:new Od,M:new Id,L:new Ad,w:new Rd,I:new Ed,d:new Ld,D:new Fd,E:new Bd,e:new zd,c:new Nd,i:new Wd,a:new Hd,b:new Vd,B:new Yd,h:new Ud,H:new jd,K:new qd,k:new $d,m:new Qd,s:new Xd,S:new Gd,X:new Kd,x:new Zd,t:new Jd,T:new tu};var Ob=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ib=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ab=/^'([^]*?)'?$/,Rb=/''/g,Eb=/\S/,Lb=/[a-zA-Z]/;function Qr(i,n,t,e){var r,a,o,s,l,c,d,u,h,f,m,p,g,b,_,k,C,v;x(3,arguments);var y=String(i),P=String(n),D=Ct(),S=(r=(a=e?.locale)!==null&&a!==void 0?a:D.locale)!==null&&r!==void 0?r:Hr;if(!S.match)throw new RangeError("locale must contain match property");var L=F((o=(s=(l=(c=e?.firstWeekContainsDate)!==null&&c!==void 0?c:e==null||(d=e.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:D.firstWeekContainsDate)!==null&&s!==void 0?s:(h=D.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=F((m=(p=(g=(b=e?.weekStartsOn)!==null&&b!==void 0?b:e==null||(_=e.locale)===null||_===void 0||(k=_.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&g!==void 0?g:D.weekStartsOn)!==null&&p!==void 0?p:(C=D.locale)===null||C===void 0||(v=C.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&m!==void 0?m:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(P==="")return y===""?M(t):new Date(NaN);var W={firstWeekContainsDate:L,weekStartsOn:B,locale:S},rt=[new wd],bt=P.match(Ib).map(function(gt){var tt=gt[0];if(tt in fn){var zt=fn[tt];return zt(gt,S.formatLong)}return gt}).join("").match(Ob),z=[],Y=$o(bt),K;try{var At=function(){var tt=K.value;!(e!=null&&e.useAdditionalWeekYearTokens)&&Wr(tt)&&Ii(tt,P,i),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Nr(tt)&&Ii(tt,P,i);var zt=tt[0],_n=eu[zt];if(_n){var Jo=_n.incompatibleTokens;if(Array.isArray(Jo)){var ts=z.find(function(es){return Jo.includes(es.token)||es.token===zt});if(ts)throw new RangeError("The format string mustn't contain `".concat(ts.fullToken,"` and `").concat(tt,"` at the same time"))}else if(_n.incompatibleTokens==="*"&&z.length>0)throw new RangeError("The format string mustn't contain `".concat(tt,"` and any other token at the same time"));z.push({token:zt,fullToken:tt});var Jr=_n.run(y,tt,S.match,W);if(!Jr)return{v:new Date(NaN)};rt.push(Jr.setter),y=Jr.rest}else{if(zt.match(Lb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+zt+"`");if(tt==="''"?tt="'":zt==="'"&&(tt=Fb(tt)),y.indexOf(tt)===0)y=y.slice(tt.length);else return{v:new Date(NaN)}}};for(Y.s();!(K=Y.n()).done;){var ut=At();if(Mt(ut)==="object")return ut.v}}catch(gt){Y.e(gt)}finally{Y.f()}if(y.length>0&&Eb.test(y))return new Date(NaN);var me=rt.map(function(gt){return gt.priority}).sort(function(gt,tt){return tt-gt}).filter(function(gt,tt,zt){return zt.indexOf(gt)===tt}).map(function(gt){return rt.filter(function(tt){return tt.priority===gt}).sort(function(tt,zt){return zt.subPriority-tt.subPriority})}).map(function(gt){return gt[0]}),pe=M(t);if(isNaN(pe.getTime()))return new Date(NaN);var Ft=cn(pe,Ae(pe)),ge={},Bt=$o(me),be;try{for(Bt.s();!(be=Bt.n()).done;){var Xt=be.value;if(!Xt.validate(Ft,W))return new Date(NaN);var bn=Xt.set(Ft,ge,W);Array.isArray(bn)?(Ft=bn[0],jo(ge,bn[1])):Ft=bn}}catch(gt){Bt.e(gt)}finally{Bt.f()}return Ft}function Fb(i){return i.match(Ab)[1].replace(Rb,"'")}function Xr(i){x(1,arguments);var n=M(i);return n.setMinutes(0,0,0),n}function Gr(i){x(1,arguments);var n=M(i);return n.setMilliseconds(0),n}function Zr(i,n){var t;x(1,arguments);var e=F((t=n?.additionalDigits)!==null&&t!==void 0?t:2);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof i=="string"||Object.prototype.toString.call(i)==="[object String]"))return new Date(NaN);var r=Wb(i),a;if(r.date){var o=Hb(r.date,e);a=Vb(o.restDateString,o.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s=a.getTime(),l=0,c;if(r.time&&(l=Yb(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=Ub(r.timezone),isNaN(c))return new Date(NaN)}else{var d=new Date(s+l),u=new Date(0);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return new Date(s+l+c)}var Kr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Bb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,zb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Nb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Wb(i){var n={},t=i.split(Kr.dateTimeDelimiter),e;if(t.length>2)return n;if(/:/.test(t[0])?e=t[0]:(n.date=t[0],e=t[1],Kr.timeZoneDelimiter.test(n.date)&&(n.date=i.split(Kr.timeZoneDelimiter)[0],e=i.substr(n.date.length,i.length))),e){var r=Kr.timezone.exec(e);r?(n.time=e.replace(r[1],""),n.timezone=r[1]):n.time=e}return n}function Hb(i,n){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),e=i.match(t);if(!e)return{year:NaN,restDateString:""};var r=e[1]?parseInt(e[1]):null,a=e[2]?parseInt(e[2]):null;return{year:a===null?r:a*100,restDateString:i.slice((e[1]||e[2]).length)}}function Vb(i,n){if(n===null)return new Date(NaN);var t=i.match(Bb);if(!t)return new Date(NaN);var e=!!t[4],r=gn(t[1]),a=gn(t[2])-1,o=gn(t[3]),s=gn(t[4]),l=gn(t[5])-1;if(e)return Xb(n,s,l)?jb(n,s,l):new Date(NaN);var c=new Date(0);return!$b(n,a,o)||!Qb(n,r)?new Date(NaN):(c.setUTCFullYear(n,a,Math.max(r,o)),c)}function gn(i){return i?parseInt(i):1}function Yb(i){var n=i.match(zb);if(!n)return NaN;var t=Zo(n[1]),e=Zo(n[2]),r=Zo(n[3]);return Gb(t,e,r)?t*Xe+e*Qe+r*1e3:NaN}function Zo(i){return i&&parseFloat(i.replace(",","."))||0}function Ub(i){if(i==="Z")return 0;var n=i.match(Nb);if(!n)return 0;var t=n[1]==="+"?-1:1,e=parseInt(n[2]),r=n[3]&&parseInt(n[3])||0;return Kb(e,r)?t*(e*Xe+r*Qe):NaN}function jb(i,n,t){var e=new Date(0);e.setUTCFullYear(i,0,4);var r=e.getUTCDay()||7,a=(n-1)*7+t+1-r;return e.setUTCDate(e.getUTCDate()+a),e}var qb=[31,null,31,30,31,30,31,31,30,31,30,31];function iu(i){return i%400===0||i%4===0&&i%100!==0}function $b(i,n,t){return n>=0&&n<=11&&t>=1&&t<=(qb[n]||(iu(i)?29:28))}function Qb(i,n){return n>=1&&n<=(iu(i)?366:365)}function Xb(i,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function Gb(i,n,t){return i===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&i>=0&&i<25}function Kb(i,n){return n>=0&&n<=59}var Zb={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Lo._date.override({_id:"date-fns",formats:function(){return Zb},parse:function(i,n){if(i===null||typeof i>"u")return null;let t=typeof i;return t==="number"||i instanceof Date?i=M(i):t==="string"&&(typeof n=="string"?i=Qr(i,n,new Date,this.options):i=Zr(i,this.options)),Ti(i)?i.getTime():null},format:function(i,n){return Vr(i,n,this.options)},add:function(i,n,t){switch(t){case"millisecond":return Vt(i,n);case"second":return xr(i,n);case"minute":return _r(i,n);case"hour":return br(i,n);case"day":return Ci(i,n);case"week":return yr(i,n);case"month":return Ie(i,n);case"quarter":return vr(i,n);case"year":return kr(i,n);default:return i}},diff:function(i,n,t){switch(t){case"millisecond":return ne(i,n);case"second":return Mr(i,n);case"minute":return Cr(i,n);case"hour":return wr(i,n);case"day":return Mi(i,n);case"week":return Dr(i,n);case"month":return Si(i,n);case"quarter":return Tr(i,n);case"year":return Pr(i,n);default:return 0}},startOf:function(i,n,t){switch(n){case"second":return Gr(i);case"minute":return Sr(i);case"hour":return Xr(i);case"day":return $e(i);case"week":return ln(i);case"isoWeek":return ln(i,{weekStartsOn:+t});case"month":return Ir(i);case"quarter":return Or(i);case"year":return Rr(i);default:return i}},endOf:function(i,n){switch(n){case"second":return zr(i);case"minute":return Fr(i);case"hour":return Er(i);case"day":return Di(i);case"week":return Lr(i);case"month":return Pi(i);case"quarter":return Br(i);case"year":return Ar(i);default:return i}}});export{Fu as a,G_ as b,i0 as c,Cu as d,Tu as e,I_ as f,A_ as g,a0 as h,et as i,j,at as k,N as l,J as m,pi as n,se as o,Q as p,it as q,dh as r,lt as s,Ne as t,Ks as u,Ve as v,Ht as w,Un as x,Aa as y,Hn as z,nt as A,Qi as B,Xi as C,vi as D,De as E,xt as F,dt as G,lr as H,Eo as I,Pf as J,Qt as K,Fm as L,mr as M,Zm as N,Lp as O,Yp as P,Up as Q,ng as R,Po as S,Ao as T,h0 as U};