@mxtommy/kip 4.5.2 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +12 -3
  2. package/package.json +13 -15
  3. package/plugin/history-series.service.js +14 -24
  4. package/plugin/index.js +139 -95
  5. package/plugin/{duckdb-parquet-storage.service.js → sqlite-history-storage.service.js} +330 -503
  6. package/public/assets/help-docs/widget-historical-series.md +5 -5
  7. package/public/{chunk-TVNXBPFF.js → chunk-356CW47X.js} +1 -1
  8. package/public/{chunk-NFJ4RQSE.js → chunk-3JA4CQ7T.js} +1 -1
  9. package/public/{chunk-VXTTEFRP.js → chunk-5SAXWR6Z.js} +8 -8
  10. package/public/{chunk-67V4XHCY.js → chunk-6A4NRSCL.js} +1 -1
  11. package/public/{chunk-P7JKENHI.js → chunk-AC6VD2FN.js} +1 -1
  12. package/public/{chunk-TBNKOU7M.js → chunk-B4NYOD6L.js} +1 -1
  13. package/public/{chunk-WH5CIUSB.js → chunk-BGGO4PGD.js} +1 -1
  14. package/public/{chunk-KQEEYPK3.js → chunk-BMHMHQFO.js} +1 -1
  15. package/public/{chunk-RCYOZLZB.js → chunk-CSIELI2Z.js} +2 -2
  16. package/public/{chunk-R36UY4Q4.js → chunk-CYTLQDGF.js} +1 -1
  17. package/public/{chunk-YI3MZWRZ.js → chunk-HSKVTFFQ.js} +1 -1
  18. package/public/{chunk-IH4CEW4C.js → chunk-MDNGWQNG.js} +8 -8
  19. package/public/{chunk-VPF5756E.js → chunk-MGLD6QDJ.js} +1 -1
  20. package/public/{chunk-P4CRTB7N.js → chunk-NJISHUGY.js} +1 -1
  21. package/public/{chunk-ISF5E3CX.js → chunk-P3M6SJQT.js} +11 -11
  22. package/public/{chunk-WQSJFJLW.js → chunk-POMIQBAL.js} +2 -2
  23. package/public/{chunk-SJFJEOSG.js → chunk-PPF5S5CV.js} +1 -1
  24. package/public/{chunk-OPTBDYBL.js → chunk-PUPM3HUQ.js} +1 -1
  25. package/public/chunk-PZ6I6W3H.js +16 -0
  26. package/public/{chunk-VXCYPAWR.js → chunk-QU3JR4YV.js} +1 -1
  27. package/public/{chunk-Q2ANAJAD.js → chunk-SUWMN3AE.js} +1 -1
  28. package/public/{chunk-CD5TQSCS.js → chunk-UYHRT3PR.js} +1 -1
  29. package/public/{chunk-FZFDGAQO.js → chunk-WJFXI5PQ.js} +1 -1
  30. package/public/{chunk-I4SJ5UNN.js → chunk-ZXO4VMEH.js} +1 -1
  31. package/public/{chunk-XBSU7OGT.js → chunk-ZY3U4H4Z.js} +1 -1
  32. package/public/index.html +1 -1
  33. package/public/{main-B6TXB3EB.js → main-I33LH3HC.js} +1 -1
  34. package/plugin/plugin-auth.service.js +0 -75
  35. package/public/chunk-BTFZS2TW.js +0 -16
@@ -1,9 +1,9 @@
1
- import{i as Gs,n as Hn,r as Qs}from"./chunk-SJFJEOSG.js";import{m as $s}from"./chunk-67V4XHCY.js";import{i as Ys,m as js,o as Vn,q as qs}from"./chunk-P7JKENHI.js";import{$b as Ss,Ab as ga,Bb as ba,Bd as Rs,Ca as kt,Cb as yt,Cc as Ki,Da as ue,Db as ot,Eb as ht,Fa as ee,Fb as Ht,Ga as zn,Gd as Es,H as bs,Ha as Bn,Hd as Ls,Ia as Nn,J as En,Jc as be,K as _s,Ka as Kt,La as Cs,Lc as Z,Mb as me,Mc as _e,Nb as Ps,Nd as Qe,Ob as Mt,Od as Fs,P as vs,Pe as Zi,Qb as ie,Qd as zs,Qe as Us,Rb as Oe,Sb as Ae,Tb as bi,Ub as pe,Va as gt,Vb as lt,Wb as dt,Xa as pi,Xd as Re,Ya as Wn,_a as Gi,_b as Xi,a as vt,aa as ys,ac as Dt,ae as Xe,b as Vt,ba as Ln,be as yi,ca as xs,cb as Ts,cc as _i,da as qi,dc as Is,de as ka,ec as Os,ee as xi,f as Qt,fb as he,fe as Bs,g as Ge,gb as gi,hb as fe,j as ms,ja as Fn,k as An,ka as fi,kb as Qi,la as mi,lb as ha,ld as va,le as Ns,m as ua,mb as Ms,na as Xt,oe as Ws,pa as E,pd as ya,pe as wa,q as ps,qd as As,rc as ge,rd as vi,s as gs,tb as Ds,ua as rt,ub as At,va as at,w as Rn,wa as ks,wb as fa,we as Vs,xa as ws,xb as ma,xe as Hs,ya as $i,zb as pa,zc as _a,zd as xa}from"./chunk-BTFZS2TW.js";var Xs={name:"@mxtommy/kip",version:"4.5.2",description:"An advanced and versatile marine instrumentation package to display Signal K data.",license:"MIT",author:{name:"Thomas St.Pierre, David Godin"},contributors:[{name:"David Godin",email:"godind@hotmail.com"},{name:"Thomas St.Pierre",email:"thomas@samoht.ca"}],homepage:"https://github.com/mxtommy/Kip",bugs:"https://github.com/mxtommy/Kip/issues",repository:{type:"git",url:"git+https://github.com/mxtommy/Kip.git"},keywords:["signalk-webapp","signalk-category-instruments","signalk-category-notifications","signalk-category-ais","signalk-node-server-plugin","signal k","signalk","instruments","dashboard","marine","nmea"],signalk:{appIcon:"assets/icon-72x72.png",displayName:"KIP Instrument MFD"},main:"plugin/index.js",files:["plugin/**","public/**","README.md","LICENSE","CHANGELOG.md","CONTRIBUTORS.md","package.json"],"signalk-plugin-enabled-by-default":!0,scripts:{test:"CI=1 ng test --watch=false","test:plugin":"npm run build:plugin && node --test --test-concurrency=1 kip-plugin/tests/index.test.cjs","test:interactive":"ng test","test:headless":"CI=1 ng test --browsers=ChromeHeadless --watch=false",lint:"ng lint",dev:"ng serve --configuration=dev --serve-path=/@mxtommy/kip/","build:plugin":"tsc -p ./kip-plugin/tsconfig.plugin.json","build:dev":"ng build --configuration=dev","build:prod":"ng build --configuration=production","build:all":"npm run build:plugin && npm run build:prod",e2e:"ng e2e","generate:widget":"npx schematics ./tools/schematics/collection.json:create-host2-widget --dry-run=false"},schematics:"tools/schematics/collection.json",devDependencies:{"@angular/cdk":"21.2.0","@angular/common":"21.2.0","@angular/compiler":"21.2.0","@angular/core":"21.2.0","@angular/forms":"21.2.0","@angular/material":"21.2.0","@angular/animations":"21.2.0","@angular/platform-browser":"21.2.0","@angular/platform-browser-dynamic":"21.2.0","@angular/router":"21.2.0","@angular-devkit/build-angular":"^21.1.4","@angular-devkit/schematics-cli":"^20.1.6","@angular/build":"^21.1.4","@angular/cli":"^21.1.4","@angular/compiler-cli":"21.2.0","@angular/language-service":"21.2.0","@types/canvas-gauges":"^2.1.8","@types/d3":"^7.4.3","@types/jasmine":"~3.6.0","@types/jasminewd2":"^2.0.9","@types/js-quantities":"^1.6.6","@types/lodash-es":"^4.17.9","@types/node":"^24.1.0","angular-eslint":"21.2.0",codelyzer:"^6.0.0",eslint:"^9.29.0","jasmine-core":"~4.0.1","jasmine-spec-reporter":"~5.0.0",karma:"^6.4.4","karma-chrome-launcher":"~3.1.0","karma-cli":"~2.0.0","karma-coverage":"^2.2.0","karma-jasmine":"~4.0.0","karma-jasmine-html-reporter":"^1.6.0","karma-spec-reporter":"^0.0.36","ng-packagr":"^21.0.1",protractor:"~7.0.0","pwa-asset-generator":"^8.1.1",sass:"^1.49.9","ts-node":"^10.9.2",typescript:"^5.9.3","@aziham/chartjs-plugin-streaming":"^3.5.1","@godind/ng-canvas-gauges":"^6.2.1","@zakj/no-sleep":"^0.13.5","chart.js":"^4.5.1","chartjs-adapter-date-fns":"^3.0.0","chartjs-plugin-annotation":"^3.0.1",clipboard:"^2.0.11","compare-versions":"^6.1.1","core-js":"^3.13.1",d3:"^7.9.0","date-fns":"^2.30.0",gridstack:"^12.3.3","js-quantities":"^1.8.0","lodash-es":"^4.17.23","ngx-markdown":"^21.0.1",prismjs:"^1.30.0",rxjs:"^7.8.2",screenfull:"^6.0.2","sk-ais-status-plugin":"^1.0.0",steelseries:"^2.0.9",tslib:"^2.6.2","zone.js":"^0.15.1"},dependencies:{"@dsnp/parquetjs":"^1.8.7","@duckdb/node-api":"^1.4.4-r.2","@signalk/server-api":"^2.22.0"}};var E_=(()=>{class i{MODE_PATH="self.environment.mode";configurableThemeColors=[{label:"Contrast",value:"contrast"},{label:"Blue",value:"blue"},{label:"Green",value:"green"},{label:"Orange",value:"orange"},{label:"Yellow",value:"yellow"},{label:"Pink",value:"pink"},{label:"Purple",value:"purple"},{label:"Grey",value:"grey"}];cssThemeColorRoles$=new ua(null);_cssThemeColorRoles=null;_settings=E(js);_data=E(Qs);_iconRegistry=E(Us);_sanitizer=E(Es);isNightMode=ee(!1);_useAutoNightMode=Zi(this._settings.getAutoNightModeAsO(),{requireSync:!0});_theme=Zi(this._settings.getThemeNameAsO(),{requireSync:!0});_redNightMode=Zi(this._settings.getRedNightModeAsO(),{requireSync:!0});_environmentMode=Zi(this._data.subscribePath(this.MODE_PATH,"default"));previousEnvironmentMode=null;appVersion=ee(Xs.version);browserVersion=ee("Unknown");osVersion=ee("Unknown");constructor(){this._iconRegistry.addSvgIconSet(this._sanitizer.bypassSecurityTrustResourceUrl("assets/svg/icons.svg")),zn(()=>{this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")}),zn(()=>{let t=this._environmentMode().data.value;_a(()=>{this.previousEnvironmentMode!==t&&(this.previousEnvironmentMode=t,this._useAutoNightMode()&&(this.isNightMode.set(t==="night"),this.toggleDayNightMode()))})}),zn(()=>{let t=this._redNightMode();_a(()=>{t?this.toggleDayNightMode():this.toggleDayNightMode()})}),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue(),this.browserVersion.set(this.getBrowserVersion()),this.osVersion.set(this.getOSVersion()),console.log("*********** KIP Version Information ***********"),console.log(`** App Version: ${this.appVersion()}`),console.log(`** Browser Version: ${this.browserVersion()}`),console.log(`** OS Version: ${this.osVersion()}`),console.log("***********************************************")}readThemeCssRoleVariables(){let t=document.body,e=getComputedStyle(t),r={background:e.getPropertyValue("--mat-sys-background").trim(),cardColor:e.getPropertyValue("--kip-widget-card-background-color").trim(),blue:e.getPropertyValue("--kip-blue-color").trim(),blueDim:e.getPropertyValue("--kip-blue-dim-color").trim(),blueDimmer:e.getPropertyValue("--kip-blue-dimmer-color").trim(),green:e.getPropertyValue("--kip-green-color").trim(),greenDim:e.getPropertyValue("--kip-green-dim-color").trim(),greenDimmer:e.getPropertyValue("--kip-green-dimmer-color").trim(),grey:e.getPropertyValue("--kip-grey-color").trim(),greyDim:e.getPropertyValue("--kip-grey-dim-color").trim(),greyDimmer:e.getPropertyValue("--kip-grey-dimmer-color").trim(),orange:e.getPropertyValue("--kip-orange-color").trim(),orangeDim:e.getPropertyValue("--kip-orange-dim-color").trim(),orangeDimmer:e.getPropertyValue("--kip-orange-dimmer-color").trim(),pink:e.getPropertyValue("--kip-pink-color").trim(),pinkDim:e.getPropertyValue("--kip-pink-dim-color").trim(),pinkDimmer:e.getPropertyValue("--kip-pink-dimmer-color").trim(),purple:e.getPropertyValue("--kip-purple-color").trim(),purpleDim:e.getPropertyValue("--kip-purple-dim-color").trim(),purpleDimmer:e.getPropertyValue("--kip-purple-dimmer-color").trim(),contrast:e.getPropertyValue("--kip-contrast-color").trim(),contrastDim:e.getPropertyValue("--kip-contrast-dim-color").trim(),contrastDimmer:e.getPropertyValue("--kip-contrast-dimmer-color").trim(),yellow:e.getPropertyValue("--kip-yellow-color").trim(),yellowDim:e.getPropertyValue("--kip-yellow-dim-color").trim(),yellowDimmer:e.getPropertyValue("--kip-yellow-dimmer-color").trim(),port:e.getPropertyValue("--kip-port-color").trim(),starboard:e.getPropertyValue("--kip-starboard-color").trim(),zoneNominal:e.getPropertyValue("--kip-zone-nominal-color").trim(),zoneAlert:e.getPropertyValue("--kip-zone-alert-color").trim(),zoneWarn:e.getPropertyValue("--kip-zone-warn-color").trim(),zoneAlarm:e.getPropertyValue("--kip-zone-alarm-color").trim(),zoneEmergency:e.getPropertyValue("--kip-zone-emergency-color").trim()};this.cssThemeColorRoles$.next(r)}get cssThemeColors(){return this._cssThemeColorRoles}setBrightness(t,e=!1){let r=document.body;r.style.setProperty("--kip-nightModeBrightness",`${t}`);let a=e?" sepia(0.5) hue-rotate(-30deg)":"";r.style.setProperty("--kip-nightModeFilters",a)}toggleDayNightMode(){this.isNightMode()?this._redNightMode()?(document.body.classList.toggle("night-theme",!0),this.setBrightness(1,!1)):(this.setBrightness(this._settings.getNightModeBrightness(),!0),document.body.classList.remove("night-theme"),this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")):(document.body.classList.remove("night-theme"),this._theme()==="light-theme"&&document.body.classList.toggle("light-theme",this._theme()==="light-theme"),this.setBrightness(1,!1)),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue()}getBrowserVersion(){let t=navigator.userAgent,e="Unknown";return t.includes("Edg")?e=`Edge ${t.match(/Edg\/(\d+)/)?.[1]}`:t.includes("Chrome")&&!t.includes("Edg")&&!t.includes("Chromium")?e=`Chrome ${t.match(/Chrome\/(\d+)/)?.[1]}`:t.includes("Chromium")?e=`Chromium ${t.match(/Chromium\/(\d+)/)?.[1]}`:t.includes("Firefox")?e=`Firefox ${t.match(/Firefox\/(\d+)/)?.[1]}`:t.includes("Safari")&&!t.includes("Chrome")&&!t.includes("Chromium")?e=`Safari ${t.match(/Version\/(\d+)/)?.[1]}`:(t.includes("Opera")||t.includes("OPR"))&&(e=`Opera ${t.match(/(Opera|OPR)\/(\d+)/)?.[2]}`),e}getOSVersion(){let t=navigator.platform,e=navigator.userAgent;return t.startsWith("Mac")?"macOS":t.startsWith("Win")?"Windows":/Linux/.test(t)?e.includes("ARM")||e.includes("aarch64")||e.includes("Raspberry")||t.includes("armv7l")||t.includes("armv8l")?"Raspberry Pi":"Linux":"Unknown OS"}static \u0275fac=function(e){return new(e||i)};static \u0275prov=fi({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Pa=["*"];function wu(i,n){i&1&&Ae(0)}var Cu=["tabListContainer"],Tu=["tabList"],Mu=["tabListInner"],Du=["nextPaginator"],Pu=["previousPaginator"],Su=["content"];function Iu(i,n){}var Ou=["tabBodyWrapper"],Au=["tabHeader"];function Ru(i,n){}function Eu(i,n){if(i&1&&ha(0,Ru,0,0,"ng-template",12),i&2){let t=ie().$implicit;yt("cdkPortalOutlet",t.templateLabel)}}function Lu(i,n){if(i&1&&Is(0),i&2){let t=ie().$implicit;Os(t.textLabel)}}function Fu(i,n){if(i&1){let t=me();ot(0,"div",7,2),Mt("click",function(){let r=rt(t),a=r.$implicit,o=r.$index,s=ie(),c=Xi(1);return at(s._handleClick(a,c,o))})("cdkFocusChange",function(r){let a=rt(t).$index,o=ie();return at(o._tabFocusChanged(r,a))}),Ht(2,"span",8)(3,"div",9),ot(4,"span",10)(5,"span",11),fa(6,Eu,1,1,null,12)(7,Lu,1,1),ht()()()}if(i&2){let t=n.$implicit,e=n.$index,r=Xi(1),a=ie();_i(t.labelClass),Dt("mdc-tab--active",a.selectedIndex===e),yt("id",a._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",a.fitInkBarToContent),At("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),gt(3),yt("matRippleTrigger",r)("matRippleDisabled",t.disabled||a.disableRipple),gt(3),ma(t.templateLabel?6:7)}}function zu(i,n){i&1&&Ae(0)}function Bu(i,n){if(i&1){let t=me();ot(0,"mat-tab-body",13),Mt("_onCentered",function(){rt(t);let r=ie();return at(r._removeTabBodyWrapperHeight())})("_onCentering",function(r){rt(t);let a=ie();return at(a._setTabBodyWrapperHeight(r))})("_beforeCentering",function(r){rt(t);let a=ie();return at(a._bodyCentered(r))}),ht()}if(i&2){let t=n.$implicit,e=n.$index,r=ie();_i(t.bodyClass),yt("id",r._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),At("tabindex",r.contentTabIndex!=null&&r.selectedIndex===e?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(t,e))("aria-hidden",r.selectedIndex!==e)}}var Nu=new Xt("MatTabContent"),Wu=(()=>{class i{template=E(Wn);constructor(){}static \u0275fac=function(e){return new(e||i)};static \u0275dir=fe({type:i,selectors:[["","matTabContent",""]],features:[ge([{provide:Nu,useExisting:i}])]})}return i})(),Vu=new Xt("MatTabLabel"),tc=new Xt("MAT_TAB"),Hu=(()=>{class i extends Ws{_closestTab=E(tc,{optional:!0});static \u0275fac=(()=>{let t;return function(r){return(t||(t=Nn(i)))(r||i)}})();static \u0275dir=fe({type:i,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[ge([{provide:Vu,useExisting:i}]),Qi]})}return i})(),ec=new Xt("MAT_TAB_GROUP"),Yu=(()=>{class i{_viewContainerRef=E(Ts);_closestTabGroup=E(ec,{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 An;position=null;origin=null;isActive=!1;constructor(){E(vi).load(yi)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Ns(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=he({type:i,selectors:[["mat-tab"]],contentQueries:function(e,r,a){if(e&1&&bi(a,Hu,5)(a,Wu,7,Wn),e&2){let o;lt(o=dt())&&(r.templateLabel=o.first),lt(o=dt())&&(r._explicitContent=o.first)}},viewQuery:function(e,r){if(e&1&&pe(Wn,7),e&2){let a;lt(a=dt())&&(r._implicitContent=a.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,r){e&2&&At("id",null)},inputs:{disabled:[2,"disabled","disabled",Z],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[ge([{provide:tc,useExisting:i}]),Bn],ngContentSelectors:Pa,decls:1,vars:0,template:function(e,r){e&1&&(Oe(),Ms(0,wu,1,0,"ng-template"))},encapsulation:2})}return i})(),Ca="mdc-tab-indicator--active",Ks="mdc-tab-indicator--no-transition",Ta=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}}},ju=(()=>{class i{_elementRef=E(Kt);_inkBarElement=null;_inkBarContentElement=null;_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(Ca);return}let r=e.getBoundingClientRect(),a=t.width/r.width,o=t.left-r.left;e.classList.add(Ks),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${a})`),e.getBoundingClientRect(),e.classList.remove(Ks),e.classList.add(Ca),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(Ca)}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",Z]}})}return i})();var ic=(()=>{class i extends ju{elementRef=E(Kt);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=Nn(i)))(r||i)}})();static \u0275dir=fe({type:i,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,r){e&2&&(At("aria-disabled",!!r.disabled),Dt("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[2,"disabled","disabled",Z]},features:[Qi]})}return i})(),Zs={passive:!0},Uu=650,qu=100,$u=(()=>{class i{_elementRef=E(Kt);_changeDetectorRef=E(be);_viewportRuler=E(Hs);_dir=E(ka,{optional:!0});_ngZone=E(ue);_platform=E(va);_sharedResizeObserver=E($s);_injector=E($i);_renderer=E(Gi);_animationsDisabled=Re();_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new An;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged=!1;_keyManager;_currentTextContent;_stopScrolling=new An;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 kt;indexFocused=new kt;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"),Zs),this._renderer.listen(this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Zs))}ngAfterContentInit(){let t=this._dir?this._dir.change:gs("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(vs(32),qi(this._destroyed)),r=this._viewportRuler.change(150).pipe(qi(this._destroyed)),a=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new zs(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),pi(a,{injector:this._injector}),En(t,r,e,this._items.changes,this._itemsResized()).pipe(qi(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"?ps:this._items.changes.pipe(Ln(this._items),xs(t=>new ms(e=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(a=>e.next(a));return t.forEach(a=>r.observe(a.elementRef.nativeElement)),()=>{r.disconnect()}}))),ys(1),_s(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(!Fs(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,c;this._getLayoutDirection()=="ltr"?(s=a,c=s+o):(c=this._tabListInner.nativeElement.offsetWidth-a,s=c-o);let l=this.scrollDistance,d=this.scrollDistance+r;s<l?this.scrollDistance-=l-s:c>d&&(this.scrollDistance+=Math.min(c-d,s-l))}_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(),bs(Uu,qu).pipe(qi(En(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",Z],selectedIndex:[2,"selectedIndex","selectedIndex",_e]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return i})(),Gu=(()=>{class i extends $u{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new Ta(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Nn(i)))(r||i)}})();static \u0275cmp=he({type:i,selectors:[["mat-tab-header"]],contentQueries:function(e,r,a){if(e&1&&bi(a,ic,4),e&2){let o;lt(o=dt())&&(r._items=o)}},viewQuery:function(e,r){if(e&1&&pe(Cu,7)(Tu,7)(Mu,7)(Du,5)(Pu,5),e&2){let a;lt(a=dt())&&(r._tabListContainer=a.first),lt(a=dt())&&(r._tabList=a.first),lt(a=dt())&&(r._tabListInner=a.first),lt(a=dt())&&(r._nextPaginator=a.first),lt(a=dt())&&(r._previousPaginator=a.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,r){e&2&&Dt("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",Z]},features:[Qi],ngContentSelectors:Pa,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=me();Oe(),ot(0,"div",5,0),Mt("click",function(){return rt(a),at(r._handlePaginatorClick("before"))})("mousedown",function(s){return rt(a),at(r._handlePaginatorPress("before",s))})("touchend",function(){return rt(a),at(r._stopInterval())}),Ht(2,"div",6),ht(),ot(3,"div",7,1),Mt("keydown",function(s){return rt(a),at(r._handleKeydown(s))}),ot(5,"div",8,2),Mt("cdkObserveContent",function(){return rt(a),at(r._onContentChanges())}),ot(7,"div",9,3),Ae(9),ht()()(),ot(10,"div",10,4),Mt("mousedown",function(s){return rt(a),at(r._handlePaginatorPress("after",s))})("click",function(){return rt(a),at(r._handlePaginatorClick("after"))})("touchend",function(){return rt(a),at(r._stopInterval())}),Ht(12,"div",6),ht()}e&2&&(Dt("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),yt("matRippleDisabled",r._disableScrollBefore||r.disableRipple),gt(3),Dt("_mat-animation-noopable",r._animationsDisabled),gt(2),At("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby||null),gt(5),Dt("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),yt("matRippleDisabled",r._disableScrollAfter||r.disableRipple))},dependencies:[Xe,Ls],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})(),Qu=new Xt("MAT_TABS_CONFIG"),Js=(()=>{class i extends wa{_host=E(Ma);_ngZone=E(ue);_centeringSub=Ge.EMPTY;_leavingSub=Ge.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Ln(this._host._isCenterPosition())).subscribe(t=>{this._host._content&&t&&!this.hasAttached()&&this._ngZone.run(()=>{Promise.resolve().then(),this.attach(this._host._content)})}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this._ngZone.run(()=>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:[Qi]})}return i})(),Ma=(()=>{class i{_elementRef=E(Kt);_dir=E(ka,{optional:!0});_ngZone=E(ue);_injector=E($i);_renderer=E(Gi);_diAnimationsDisabled=Re();_eventCleanups;_initialized=!1;_fallbackTimer;_positionIndex;_dirChangeSubscription=Ge.EMPTY;_position;_previousPosition;_onCentering=new kt;_beforeCentering=new kt;_afterLeavingCenter=new kt;_onCentered=new kt(!0);_portalHost;_contentElement;_content;animationDuration="500ms";preserveContent=!1;set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(){if(this._dir){let t=E(be);this._dirChangeSubscription=this._dir.change.subscribe(e=>{this._computePositionAnimationState(e),t.markForCheck()})}}ngOnInit(){this._bindTransitionEvents(),this._position==="center"&&(this._setActiveClass(!0),pi(()=>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(),pi(()=>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=he({type:i,selectors:[["mat-tab-body"]],viewQuery:function(e,r){if(e&1&&pe(Js,5)(Su,5),e&2){let a;lt(a=dt())&&(r._portalHost=a.first),lt(a=dt())&&(r._contentElement=a.first)}},hostAttrs:[1,"mat-mdc-tab-body"],hostVars:1,hostBindings:function(e,r){e&2&&At("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&&(ot(0,"div",1,0),ha(2,Iu,0,0,"ng-template",2),ht()),e&2&&Dt("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:[Js,Vs],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})(),uv=(()=>{class i{_elementRef=E(Kt);_changeDetectorRef=E(be);_ngZone=E(ue);_tabsSubscription=Ge.EMPTY;_tabLabelSubscription=Ge.EMPTY;_tabBodySubscription=Ge.EMPTY;_diAnimationsDisabled=Re();_allTabs;_tabBodies;_tabBodyWrapper;_tabHeader;_tabs=new Cs;_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=null;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 kt;focusChange=new kt;animationDone=new kt;selectedTabChange=new kt(!0);_groupId;_isServer=!E(va).isBrowser;constructor(){let t=E(Qu,{optional:!0});this._groupId=E(Qe).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(Ln(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 Da;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=En(...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=he({type:i,selectors:[["mat-tab-group"]],contentQueries:function(e,r,a){if(e&1&&bi(a,Yu,5),e&2){let o;lt(o=dt())&&(r._allTabs=o)}},viewQuery:function(e,r){if(e&1&&pe(Ou,5)(Au,5)(Ma,5),e&2){let a;lt(a=dt())&&(r._tabBodyWrapper=a.first),lt(a=dt())&&(r._tabHeader=a.first),lt(a=dt())&&(r._tabBodies=a)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(e,r){e&2&&(At("mat-align-tabs",r.alignTabs),_i("mat-"+(r.color||"primary")),Ss("--mat-tab-animation-duration",r.animationDuration),Dt("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",Z],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",Z],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",Z],selectedIndex:[2,"selectedIndex","selectedIndex",_e],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",_e],disablePagination:[2,"disablePagination","disablePagination",Z],disableRipple:[2,"disableRipple","disableRipple",Z],preserveContent:[2,"preserveContent","preserveContent",Z],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[ge([{provide:ec,useExisting:i}])],ngContentSelectors:Pa,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=me();Oe(),ot(0,"mat-tab-header",3,0),Mt("indexFocused",function(s){return rt(a),at(r._focusChanged(s))})("selectFocusedIndex",function(s){return rt(a),at(r.selectedIndex=s)}),ga(2,Fu,8,17,"div",4,pa),ht(),fa(4,zu,1,0),ot(5,"div",5,1),ga(7,Bu,1,10,"mat-tab-body",6,pa),ht()}e&2&&(yt("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination),Ds("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby),gt(2),ba(r._tabs),gt(2),ma(r._isServer?4:-1),gt(),Dt("_mat-animation-noopable",r._animationsDisabled()),gt(2),ba(r._tabs))},dependencies:[Gu,ic,As,Xe,wa,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})(),Da=class{index;tab};var hv=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=gi({type:i});static \u0275inj=mi({imports:[xi]})}return i})();var Xu=["input"],Ku=["label"],Zu=["*"],Sa={color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1},Ju=new Xt("mat-checkbox-default-options",{providedIn:"root",factory:()=>Sa}),Pt=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(Pt||{}),Ia=class{source;checked},th=(()=>{class i{_elementRef=E(Kt);_changeDetectorRef=E(be);_ngZone=E(ue);_animationsDisabled=Re();_options=E(Ju,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){let e=new Ia;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=!1;labelPosition="after";name=null;change=new kt;indeterminateChange=new kt;value;disableRipple=!1;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=Pt.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){E(vi).load(yi);let t=E(new Ki("tabindex"),{optional:!0});this._options=this._options||Sa,this.color=this._options.color||Sa.color,this.tabIndex=t==null?0:parseInt(t)||0,this.id=this._uniqueId=E(Qe).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(Pt.Indeterminate):this._transitionCheckState(this.checked?Pt.Checked:Pt.Unchecked),this.indeterminateChange.emit(t)),this._syncIndeterminate(t)}_indeterminate=ee(!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?Pt.Checked:Pt.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 Pt.Init:if(e===Pt.Checked)return this._animationClasses.uncheckedToChecked;if(e==Pt.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Pt.Unchecked:return e===Pt.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Pt.Checked:return e===Pt.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Pt.Indeterminate:return e===Pt.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=he({type:i,selectors:[["mat-checkbox"]],viewQuery:function(e,r){if(e&1&&pe(Xu,5)(Ku,5),e&2){let a;lt(a=dt())&&(r._inputElement=a.first),lt(a=dt())&&(r._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(e,r){e&2&&(Ps("id",r.id),At("tabindex",null)("aria-label",null)("aria-labelledby",null),_i(r.color?"mat-"+r.color:"mat-accent"),Dt("_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",Z],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",Z],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",Z],tabIndex:[2,"tabIndex","tabIndex",t=>t==null?void 0:_e(t)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Z],checked:[2,"checked","checked",Z],disabled:[2,"disabled","disabled",Z],indeterminate:[2,"indeterminate","indeterminate",Z]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[ge([{provide:Vn,useExisting:Fn(()=>i),multi:!0},{provide:qs,useExisting:i,multi:!0}]),Bn],ngContentSelectors:Zu,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=me();Oe(),ot(0,"div",3),Mt("click",function(s){return rt(a),at(r._preventBubblingFromLabel(s))}),ot(1,"div",4,0)(3,"div",5),Mt("click",function(){return rt(a),at(r._onTouchTargetClick())}),ht(),ot(4,"input",6,1),Mt("blur",function(){return rt(a),at(r._onBlur())})("click",function(){return rt(a),at(r._onInputClick())})("change",function(s){return rt(a),at(r._onInteractionEvent(s))}),ht(),Ht(6,"div",7),ot(7,"div",8),ks(),ot(8,"svg",9),Ht(9,"path",10),ht(),ws(),Ht(10,"div",11),ht(),Ht(11,"div",12),ht(),ot(12,"label",13,2),Ae(14),ht()()}if(e&2){let a=Xi(2);yt("labelPosition",r.labelPosition),gt(4),Dt("mdc-checkbox--selected",r.checked),yt("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),At("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),gt(7),yt("matRippleTrigger",a)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),gt(),yt("for",r.inputId)}},dependencies:[Xe,Hn],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}.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))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__background{border-color:GrayText}}.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)}@media(forced-colors: active){.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{border-color:GrayText}}.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))}@media(forced-colors: active){.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:GrayText}}.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:GrayText}}.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))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:GrayText}}.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))}@media(forced-colors: active){.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{color:GrayText}}.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:var(--mat-checkbox-touch-target-size, 48px);width:var(--mat-checkbox-touch-target-size, 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-visible~.mat-focus-indicator::before{content:""}
5
- `],encapsulation:2,changeDetection:0})}return i})(),Iv=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=gi({type:i});static \u0275inj=mi({imports:[th,xi]})}return i})();var eh=["input"],ih=["formField"],nh=["*"],Yn=class{source;value;constructor(n,t){this.source=n,this.value=t}},rh={provide:Vn,useExisting:Fn(()=>oh),multi:!0},nc=new Xt("MatRadioGroup"),ah=new Xt("mat-radio-default-options",{providedIn:"root",factory:()=>({color:"accent",disabledInteractive:!1})}),oh=(()=>{class i{_changeDetector=E(be);_value=null;_name=E(Qe).getId("mat-radio-group-");_selected=null;_isInitialized=!1;_labelPosition="after";_disabled=!1;_required=!1;_buttonChanges;_controlValueAccessorChangeFn=()=>{};onTouched=()=>{};change=new kt;_radios;color;get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition=t==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=t,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markRadiosForCheck()}_disabledInteractive=!1;constructor(){}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(t=>t===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){let t=this._selected!==null&&this._selected.value===this._value;this._radios&&!t&&(this._selected=null,this._radios.forEach(e=>{e.checked=this.value===e.value,e.checked&&(this._selected=e)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new Yn(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}static \u0275fac=function(e){return new(e||i)};static \u0275dir=fe({type:i,selectors:[["mat-radio-group"]],contentQueries:function(e,r,a){if(e&1&&bi(a,rc,5),e&2){let o;lt(o=dt())&&(r._radios=o)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",Z],required:[2,"required","required",Z],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Z]},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[ge([rh,{provide:nc,useExisting:i}])]})}return i})(),rc=(()=>{class i{_elementRef=E(Kt);_changeDetector=E(be);_focusMonitor=E(ya);_radioDispatcher=E(Gs);_defaultOptions=E(ah,{optional:!0});_ngZone=E(ue);_renderer=E(Gi);_uniqueId=E(Qe).getId("mat-radio-");_cleanupClick;id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}_labelPosition;get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){t!==this._required&&this._changeDetector.markForCheck(),this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(t){this._color=t}_color;get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new kt;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled=!1;_required=!1;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations=Re();_injector=E($i);constructor(){E(vi).load(yi);let t=E(nc,{optional:!0}),e=E(new Ki("tabindex"),{optional:!0});this.radioGroup=t,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,e&&(this.tabIndex=_e(e,0))}focus(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,e)=>{t!==this.id&&e===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._cleanupClick=this._renderer.listen(this._inputElement.nativeElement,"click",this._onInputClick)})}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new Yn(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){let e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_onInputClick=t=>{this.disabled&&this.disabledInteractive&&t.preventDefault()};_updateTabIndex(){let t=this.radioGroup,e;if(!t||!t.selected||this.disabled?e=this.tabIndex:e=t.selected===this?this.tabIndex:-1,e!==this._previousTabIndex){let r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",e+""),this._previousTabIndex=e,pi(()=>{queueMicrotask(()=>{t&&t.selected&&t.selected!==this&&document.activeElement===r&&(t.selected?._inputElement.nativeElement.focus(),document.activeElement===r&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=he({type:i,selectors:[["mat-radio-button"]],viewQuery:function(e,r){if(e&1&&pe(eh,5)(ih,7,Kt),e&2){let a;lt(a=dt())&&(r._inputElement=a.first),lt(a=dt())&&(r._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(e,r){e&1&&Mt("focus",function(){return r._inputElement.nativeElement.focus()}),e&2&&(At("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),Dt("mat-primary",r.color==="primary")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("mat-mdc-radio-checked",r.checked)("mat-mdc-radio-disabled",r.disabled)("mat-mdc-radio-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",Z],tabIndex:[2,"tabIndex","tabIndex",t=>t==null?0:_e(t)],checked:[2,"checked","checked",Z],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",Z],required:[2,"required","required",Z],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Z]},outputs:{change:"change"},exportAs:["matRadioButton"],ngContentSelectors:nh,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio","aria-invalid","false",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(e,r){if(e&1){let a=me();Oe(),ot(0,"div",2,0)(2,"div",3)(3,"div",4),Mt("click",function(s){return rt(a),at(r._onTouchTargetClick(s))}),ht(),ot(4,"input",5,1),Mt("change",function(s){return rt(a),at(r._onInputInteraction(s))}),ht(),ot(6,"div",6),Ht(7,"div",7)(8,"div",8),ht(),ot(9,"div",9),Ht(10,"div",10),ht()(),ot(11,"label",11),Ae(12),ht()()}e&2&&(yt("labelPosition",r.labelPosition),gt(2),Dt("mdc-radio--disabled",r.disabled),gt(2),yt("id",r.inputId)("checked",r.checked)("disabled",r.disabled&&!r.disabledInteractive)("required",r.required),At("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),gt(5),yt("matRippleTrigger",r._rippleTrigger.nativeElement)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),gt(2),yt("for",r.inputId))},dependencies:[Xe,Hn],styles:[`.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled])~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-hover-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-pressed-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px);top:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0);border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),background-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}@media(forced-colors: active){.mat-mdc-radio-button .mdc-radio__inner-circle{background-color:CanvasText !important}}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface, currentColor));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-focus-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface, currentColor));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button label{cursor:pointer}.mat-mdc-radio-button label:empty{display:none}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple>.mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio>.mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-radio-touch-target-size, 48px);width:var(--mat-radio-touch-target-size, 48px);transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}
6
- `],encapsulation:2,changeDetection:0})}return i})(),Zv=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=gi({type:i});static \u0275inj=mi({imports:[Bs,rc,xi]})}return i})();var sh={listSupported:!0,detailSupported:!0,saveConfigSupported:!0,detailFallbackToList:!1},ac=new Set(["oneOf","anyOf","allOf","if","then","else","dependencies","dependentRequired","dependentSchemas","$ref","not","patternProperties","contains"]),a0=(()=>{class i{http=E(Rs);connection=E(Ys);kipRuntimeModeCache=null;kipRuntimeModePromise=null;capabilities=ee(sh);detectCapabilities(){return Qt(this,null,function*(){let t=yield this.listPlugins();if(!t.ok)return t.capabilities;let e=t.data;return e.length===0?t.capabilities:(yield this.getPlugin(e[0].id)).capabilities})}listPlugins(){return Qt(this,null,function*(){try{let e=(yield Rn(this.http.get(this.toServerUrl("/plugins")))).map(r=>this.normalizePlugin(r));return this.success(e,Vt(vt({},this.capabilities()),{listSupported:!0}))}catch(t){return this.handleHttpError(t,this.capabilities(),{listSupported:!1})}})}getPlugin(t){return Qt(this,null,function*(){try{let e=yield Rn(this.http.get(this.toServerUrl(`/plugins/${encodeURIComponent(t)}`))),r=yield this.findPluginFromList(t);return r?this.success(Vt(vt({},r),{state:Vt(vt({},r.state),{enabled:e.enabled})}),Vt(vt({},this.capabilities()),{detailSupported:!0})):this.success({id:e.id,name:e.name,packageName:e.id,version:e.version,description:"",keywords:[],statusMessage:null,schema:null,state:{configuration:{},enabled:e.enabled,enableDebug:!1,enableLogging:!1}},Vt(vt({},this.capabilities()),{detailSupported:!0}))}catch(e){if(this.isHttpStatus(e,404)){let r=yield this.findPluginFromList(t);if(r)return this.success(r,Vt(vt({},this.capabilities()),{detailSupported:!1,detailFallbackToList:!0}))}return this.handleHttpError(e,this.capabilities(),{detailSupported:!1})}})}getPluginConfig(t){return Qt(this,null,function*(){let e=yield this.getPlugin(t);return this.isFailure(e)?this.failure(e):this.success(e.data.state,e.capabilities)})}resolveKipRuntimeModeConfig(t="kip"){return Qt(this,null,function*(){let e={historySeriesServiceEnabled:!0,registerAsHistoryApiProvider:!0},r=yield this.getPluginConfig(t);if(this.isFailure(r))return e;let a=r.data.configuration??{};return{historySeriesServiceEnabled:this.resolveBooleanConfig(a,"historySeriesServiceEnabled",e.historySeriesServiceEnabled),registerAsHistoryApiProvider:this.resolveBooleanConfig(a,"registerAsHistoryApiProvider",e.registerAsHistoryApiProvider)}})}getKipRuntimeModeConfigCached(t="kip",e=!1){return Qt(this,null,function*(){return e&&(this.kipRuntimeModeCache=null,this.kipRuntimeModePromise=null),this.kipRuntimeModeCache?this.kipRuntimeModeCache:this.kipRuntimeModePromise?this.kipRuntimeModePromise:(this.kipRuntimeModePromise=this.resolveKipRuntimeModeConfig(t).then(r=>(this.kipRuntimeModeCache=r,r)).finally(()=>{this.kipRuntimeModePromise=null}),this.kipRuntimeModePromise)})}savePluginConfig(t,e){return Qt(this,null,function*(){let r=yield this.getPlugin(t);if(this.isFailure(r))return this.failure(r);let a=r.data,o={configuration:vt(vt({},a.state.configuration||{}),e.configuration||{}),enabled:e.enabled??a.state.enabled,enableDebug:e.enableDebug??a.state.enableDebug,enableLogging:e.enableLogging??a.state.enableLogging};try{return yield Rn(this.http.post(this.toServerUrl(`/plugins/${encodeURIComponent(t)}/config`),o)),this.success({pluginId:t,state:o},Vt(vt({},r.capabilities),{saveConfigSupported:!0}))}catch(s){return this.handleHttpError(s,r.capabilities,{saveConfigSupported:!1})}})}setPluginEnabled(t,e){return Qt(this,null,function*(){return this.savePluginConfig(t,{configuration:{},enabled:e})})}validateDependency(t){return Qt(this,null,function*(){let e=yield this.getPlugin(t.pluginId);if(this.isFailure(e))return e.error.reason==="not-found"?this.success({status:"missing",pluginId:t.pluginId},e.capabilities):this.failure(e);let r=e.data;if((t.requireEnabled??!0)&&!r.state.enabled)return this.success({status:"disabled",pluginId:t.pluginId,plugin:r},e.capabilities);let o=this.getConfigMismatchKeys(t.requiredConfig,r.state.configuration);return o.length>0?this.success({status:"config-mismatch",pluginId:t.pluginId,plugin:r,missingKeys:o},e.capabilities):this.success({status:"ready",pluginId:t.pluginId,plugin:r},e.capabilities)})}normalizePluginSchema(t){if(!t||typeof t!="object")return{hasSchema:!1,supported:!1,fields:[],unsupportedKeywords:[]};let e=t,r=Object.keys(e).filter(c=>ac.has(c)),a=new Set(Array.isArray(e.required)?e.required.filter(c=>typeof c=="string"):[]),o=e.properties&&typeof e.properties=="object"?e.properties:{},s=Object.entries(o).map(([c,l])=>this.toSchemaField(c,l,a.has(c)));return{hasSchema:!0,supported:r.length===0,fields:s,unsupportedKeywords:r}}findPluginFromList(t){return Qt(this,null,function*(){let e=yield this.listPlugins();return e.ok?e.data.find(r=>r.id===t)??null:null})}normalizePlugin(t){return{id:t.id,name:t.name,packageName:t.packageName,version:t.version,description:t.description,keywords:t.keywords??[],statusMessage:t.statusMessage??null,schema:t.schema??null,state:{configuration:t.data?.configuration??{},enabled:t.data?.enabled??!1,enableLogging:t.data?.enableLogging??!1,enableDebug:t.data?.enableDebug??!1}}}toSchemaField(t,e,r){if(!e||typeof e!="object")return{key:t,type:"unknown",required:r,unsupportedKeywords:[]};let a=e,o=typeof a.type=="string"?a.type:"unknown",s=Object.keys(a).filter(c=>ac.has(c));return{key:t,type:this.normalizeSchemaType(o),required:r,title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enumValues:Array.isArray(a.enum)?a.enum:void 0,defaultValue:a.default,minimum:typeof a.minimum=="number"?a.minimum:void 0,maximum:typeof a.maximum=="number"?a.maximum:void 0,pattern:typeof a.pattern=="string"?a.pattern:void 0,unsupportedKeywords:s}}normalizeSchemaType(t){return t==="string"||t==="number"||t==="integer"||t==="boolean"||t==="array"||t==="object"?t:"unknown"}toServerUrl(t){let e=this.connection.signalKURL?.url?.trim();return e?`${e.endsWith("/")?e.slice(0,-1):e}${t}`:t}resolveBooleanConfig(t,e,r){let a=t[e];return typeof a=="boolean"?a:r}getConfigMismatchKeys(t,e){return t?Object.entries(t).filter(([r,a])=>!this.deepEquals(e?.[r],a)).map(([r])=>r):[]}deepEquals(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((r,a)=>this.deepEquals(r,e[a]));if(t&&e&&typeof t=="object"&&typeof e=="object"){let r=t,a=e,o=new Set([...Object.keys(r),...Object.keys(a)]);for(let s of o)if(!this.deepEquals(r[s],a[s]))return!1;return!0}return!1}success(t,e){return this.capabilities.set(e),{ok:!0,data:t,capabilities:e}}failure(t){return{ok:!1,error:t.error,capabilities:t.capabilities}}isFailure(t){return t.ok===!1}handleHttpError(t,e,r={}){let a=vt(vt({},e),r),o=this.mapError(t);return this.capabilities.set(a),{ok:!1,error:o,capabilities:a}}mapError(t){return t instanceof xa?t.status===0?{reason:"network-failure",statusCode:t.status,message:"[Plugin Config Service] Network error while calling plugin API"}:t.status===401?{reason:"auth-required",statusCode:401,message:"[Plugin Config Service] Authentication required"}:t.status===403?{reason:"forbidden",statusCode:403,message:"[Plugin Config Service] Access forbidden for plugin API"}:t.status===404?{reason:"not-found",statusCode:404,message:"[Plugin Config Service] Plugin endpoint or resource not found"}:t.status===405||t.status===501?{reason:"capability-unsupported",statusCode:t.status,message:"[Plugin Config Service] Plugin API capability is not supported by this server"}:t.status>=500?{reason:"server-error",statusCode:t.status,message:"[Plugin Config Service] Server error while calling plugin API"}:{reason:"unknown",statusCode:t.status,message:"[Plugin Config Service] Unexpected plugin API error"}:{reason:"unknown",message:"[Plugin Config Service] Unknown error while calling plugin API"}}isHttpStatus(t,e){return t instanceof xa&&t.status===e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=fi({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var c0=(()=>{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=vt({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,c=s.parentElement;return{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}}}));for(let o of a){let s=o.target;if(this.debug){let l=s.parentElement;console.log("[CanvasService] Shared ResizeObserver entry (detailed)",{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}})}this.setHighDPISize(s,o.contentRect);let c=this.resizeCallbacks.get(s);c&&c(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(t){}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,c=.1){if(!t)return;let l=()=>{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(h){}this.drawTitleInternal(t,e,r,a,o,s,c),d&&t.restore()}catch(u){console.warn("[CanvasService] drawTitle failed",u);try{this.drawTitleInternal(t,e,r,a,o,s,c)}catch(h){}}};document.fonts.status==="loaded"?this.fontsReadyPromise.then(()=>requestAnimationFrame(l)).catch(()=>requestAnimationFrame(l)):this.fontsReadyPromise.then(()=>requestAnimationFrame(l)).catch(d=>{console.warn(`[CanvasService] Font readiness failed: ${d}`),requestAnimationFrame(l)})}drawTitleInternal(t,e,r,a="normal",o,s,c){if(!t)return;let l=o-2*this.EDGE_BUFFER,d=Math.round(s*c),u=this.calculateOptimalFontSize(t,e,l,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,l)}clearCanvas(t,e,r){t.clearRect(0,0,e,r)}drawText(t,e,r=this.EDGE_BUFFER,a=this.EDGE_BUFFER,o,s,c="normal",l="#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,c,l,d,u)}finally{try{t.restore()}catch(f){}}};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,c="normal",l="#000",d="center",u="middle"){let h=this.calculateOptimalFontSize(t,e,o,s,c);t.font=`${c} ${h}px ${this.DEFAULT_FONT}`,t.fillStyle=l,t.textAlign=d,t.textBaseline=u,t.fillText(e,r,a,o)}calculateOptimalFontSize(t,e,r,a,o="normal"){let s=1,c=a,l=c;for(;s<=c;)l=Math.round((s+c)/2),t.font=`${o} ${l}px ${this.DEFAULT_FONT}`,t.measureText(e).width>r?c=l-1:s=l+1;return c}createTitleBitmap(t,e,r,a,o,s=.1){let c=document.createElement("canvas");c.width=Math.round(a*this.scaleFactor),c.height=Math.round(o*this.scaleFactor),c.style.width=`${a}px`,c.style.height=`${o}px`;let l=c.getContext("2d");return l&&(l.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(l,t,e,r,a,o,s),document.fonts.status!=="loaded"&&document.fonts.ready.then(()=>{try{l.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(l,t,e,r,a,o,s)}catch(d){}}).catch(()=>{})),c}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=fi({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function nn(i){return i+.5|0}var Ee=(i,n,t)=>Math.max(Math.min(i,t),n);function tn(i){return Ee(nn(i*2.55),0,255)}function Le(i){return Ee(nn(i*255),0,255)}function ve(i){return Ee(nn(i/2.55)/100,0,1)}function oc(i){return Ee(nn(i*100),0,100)}var Yt={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},Aa=[..."0123456789ABCDEF"],ch=i=>Aa[i&15],lh=i=>Aa[(i&240)>>4]+Aa[i&15],jn=i=>(i&240)>>4===(i&15),dh=i=>jn(i.r)&&jn(i.g)&&jn(i.b)&&jn(i.a);function uh(i){var n=i.length,t;return i[0]==="#"&&(n===4||n===5?t={r:255&Yt[i[1]]*17,g:255&Yt[i[2]]*17,b:255&Yt[i[3]]*17,a:n===5?Yt[i[4]]*17:255}:(n===7||n===9)&&(t={r:Yt[i[1]]<<4|Yt[i[2]],g:Yt[i[3]]<<4|Yt[i[4]],b:Yt[i[5]]<<4|Yt[i[6]],a:n===9?Yt[i[7]]<<4|Yt[i[8]]:255})),t}var hh=(i,n)=>i<255?n(i):"";function fh(i){var n=dh(i)?ch:lh;return i?"#"+n(i.r)+n(i.g)+n(i.b)+hh(i.a,n):void 0}var mh=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function dc(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 ph(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 gh(i,n,t){let e=dc(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 bh(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 Ra(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,c,l,d;return a!==o&&(d=a-o,l=s>.5?d/(2-a-o):d/(a+o),c=bh(t,e,r,d,a),c=c*60+.5),[c|0,l||0,s]}function Ea(i,n,t,e){return(Array.isArray(n)?i(n[0],n[1],n[2]):i(n,t,e)).map(Le)}function La(i,n,t){return Ea(dc,i,n,t)}function _h(i,n,t){return Ea(gh,i,n,t)}function vh(i,n,t){return Ea(ph,i,n,t)}function uc(i){return(i%360+360)%360}function yh(i){let n=mh.exec(i),t=255,e;if(!n)return;n[5]!==e&&(t=n[6]?tn(+n[5]):Le(+n[5]));let r=uc(+n[2]),a=+n[3]/100,o=+n[4]/100;return n[1]==="hwb"?e=_h(r,a,o):n[1]==="hsv"?e=vh(r,a,o):e=La(r,a,o),{r:e[0],g:e[1],b:e[2],a:t}}function xh(i,n){var t=Ra(i);t[0]=uc(t[0]+n),t=La(t),i.r=t[0],i.g=t[1],i.b=t[2]}function kh(i){if(!i)return;let n=Ra(i),t=n[0],e=oc(n[1]),r=oc(n[2]);return i.a<255?`hsla(${t}, ${e}%, ${r}%, ${ve(i.a)})`:`hsl(${t}, ${e}%, ${r}%)`}var sc={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"},cc={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 wh(){let i={},n=Object.keys(cc),t=Object.keys(sc),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,sc[a]);a=parseInt(cc[o],16),i[s]=[a>>16&255,a>>8&255,a&255]}return i}var Un;function Ch(i){Un||(Un=wh(),Un.transparent=[0,0,0,0]);let n=Un[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 Mh(i){let n=Th.exec(i),t=255,e,r,a;if(n){if(n[7]!==e){let o=+n[7];t=n[8]?tn(o):Ee(o*255,0,255)}return e=+n[1],r=+n[3],a=+n[5],e=255&(n[2]?tn(e):Ee(e,0,255)),r=255&(n[4]?tn(r):Ee(r,0,255)),a=255&(n[6]?tn(a):Ee(a,0,255)),{r:e,g:r,b:a,a:t}}}function Dh(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${ve(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var Oa=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,ki=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Ph(i,n,t){let e=ki(ve(i.r)),r=ki(ve(i.g)),a=ki(ve(i.b));return{r:Le(Oa(e+t*(ki(ve(n.r))-e))),g:Le(Oa(r+t*(ki(ve(n.g))-r))),b:Le(Oa(a+t*(ki(ve(n.b))-a))),a:i.a+t*(n.a-i.a)}}function qn(i,n,t){if(i){let e=Ra(i);e[n]=Math.max(0,Math.min(e[n]+e[n]*t,n===0?360:1)),e=La(e),i.r=e[0],i.g=e[1],i.b=e[2]}}function hc(i,n){return i&&Object.assign(n||{},i)}function lc(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=Le(i[3]))):(n=hc(i,{r:0,g:0,b:0,a:1}),n.a=Le(n.a)),n}function Sh(i){return i.charAt(0)==="r"?Mh(i):yh(i)}var en=class i{constructor(n){if(n instanceof i)return n;let t=typeof n,e;t==="object"?e=lc(n):t==="string"&&(e=uh(n)||Ch(n)||Sh(n)),this._rgb=e,this._valid=!!e}get valid(){return this._valid}get rgb(){var n=hc(this._rgb);return n&&(n.a=ve(n.a)),n}set rgb(n){this._rgb=lc(n)}rgbString(){return this._valid?Dh(this._rgb):void 0}hexString(){return this._valid?fh(this._rgb):void 0}hslString(){return this._valid?kh(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,c=e.a-r.a,l=((s*c===-1?s:(s+c)/(1+s*c))+1)/2;a=1-l,e.r=255&l*e.r+a*r.r+.5,e.g=255&l*e.g+a*r.g+.5,e.b=255&l*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=Ph(this._rgb,n._rgb,t)),this}clone(){return new i(this.rgb)}alpha(n){return this._rgb.a=Le(n),this}clearer(n){let t=this._rgb;return t.a*=1-n,this}greyscale(){let n=this._rgb,t=nn(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 qn(this._rgb,2,n),this}darken(n){return qn(this._rgb,2,-n),this}saturate(n){return qn(this._rgb,1,n),this}desaturate(n){return qn(this._rgb,1,-n),this}rotate(n){return xh(this._rgb,n),this}};function ae(){}var wc=(()=>{let i=0;return()=>i++})();function j(i){return i==null}function it(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 U(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function ut(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Rt(i,n){return ut(i)?i:n}function W(i,n){return typeof i>"u"?n:i}var Cc=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/n,Na=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*n:+i;function tt(i,n,t){if(i&&typeof i.call=="function")return i.apply(t,n)}function X(i,n,t,e){let r,a,o;if(it(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(U(i))for(o=Object.keys(i),a=o.length,r=0;r<a;r++)n.call(t,i[o[r]],o[r])}function on(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 Xn(i){if(it(i))return i.map(Xn);if(U(i)){let n=Object.create(null),t=Object.keys(i),e=t.length,r=0;for(;r<e;++r)n[t[r]]=Xn(i[t[r]]);return n}return i}function Tc(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Ih(i,n,t,e){if(!Tc(i))return;let r=n[i],a=t[i];U(r)&&U(a)?Ci(r,a,e):n[i]=Xn(a)}function Ci(i,n,t){let e=it(n)?n:[n],r=e.length;if(!U(i))return i;t=t||{};let a=t.merger||Ih,o;for(let s=0;s<r;++s){if(o=e[s],!U(o))continue;let c=Object.keys(o);for(let l=0,d=c.length;l<d;++l)a(c[l],i,o,t)}return i}function Mi(i,n){return Ci(i,n,{merger:Oh})}function Oh(i,n,t){if(!Tc(i))return;let e=n[i],r=t[i];U(e)&&U(r)?Mi(e,r):Object.prototype.hasOwnProperty.call(n,i)||(n[i]=Xn(r))}var fc={"":i=>i,x:i=>i.x,y:i=>i.y};function Ah(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 Rh(i){let n=Ah(i);return t=>{for(let e of n){if(e==="")break;t=t&&t[e]}return t}}function ke(i,n){return(fc[n]||(fc[n]=Rh(n)))(i)}function tr(i){return i.charAt(0).toUpperCase()+i.slice(1)}var Di=i=>typeof i<"u",ye=i=>typeof i=="function",Wa=(i,n)=>{if(i.size!==n.size)return!1;for(let t of i)if(!n.has(t))return!1;return!0};function Mc(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var G=Math.PI,nt=2*G,Eh=nt+G,Kn=Number.POSITIVE_INFINITY,Lh=G/180,ft=G/2,Ke=G/4,mc=G*2/3,xe=Math.log10,Zt=Math.sign;function Pi(i,n,t){return Math.abs(i-n)<t}function Va(i){let n=Math.round(i);i=Pi(i,n,i/1e3)?n:i;let t=Math.pow(10,Math.floor(xe(i))),e=i/t;return(e<=1?1:e<=2?2:e<=5?5:10)*t}function Dc(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 Fh(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function ti(i){return!Fh(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Pc(i,n){let t=Math.round(i);return t-n<=i&&t+n>=i}function Ha(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 jt(i){return i*(G/180)}function er(i){return i*(180/G)}function Ya(i){if(!ut(i))return;let n=1,t=0;for(;Math.round(i*n)/n!==i;)n*=10,t++;return t}function ja(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*G&&(a+=nt),{angle:a,distance:r}}function Zn(i,n){return Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))}function zh(i,n){return(i-n+Eh)%nt-G}function wt(i){return(i%nt+nt)%nt}function Si(i,n,t,e){let r=wt(i),a=wt(n),o=wt(t),s=wt(a-r),c=wt(o-r),l=wt(r-a),d=wt(r-o);return r===a||r===o||e&&a===o||s>c&&l<d}function bt(i,n,t){return Math.max(n,Math.min(t,i))}function Sc(i){return bt(i,-32768,32767)}function oe(i,n,t,e=1e-6){return i>=Math.min(n,t)-e&&i<=Math.max(n,t)+e}function ir(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 ne=(i,n,t,e)=>ir(i,t,e?r=>{let a=i[r][n];return a<t||a===t&&i[r+1][n]===t}:r=>i[r][n]<t),Ic=(i,n,t)=>ir(i,t,e=>i[e][n]>=t);function Oc(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 Ac=["push","pop","shift","splice","unshift"];function Rc(i,n){if(i._chartjs){i._chartjs.listeners.push(n);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),Ac.forEach(t=>{let e="_onData"+tr(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 Ua(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)&&(Ac.forEach(a=>{delete i[a]}),delete i._chartjs)}function qa(i){let n=new Set(i);return n.size===i.length?i:Array.from(n)}var $a=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Ga(i,n){let t=[],e=!1;return function(...r){t=r,e||(e=!0,$a.call(window,()=>{e=!1,i.apply(n,t)}))}}function Ec(i,n){let t;return function(...e){return n?(clearTimeout(t),t=setTimeout(i,n,e)):i.apply(this,e),n}}var nr=i=>i==="start"?"left":i==="end"?"right":"center",Ct=(i,n,t)=>i==="start"?n:i==="end"?t:(n+t)/2,Lc=(i,n,t,e)=>i===(e?"left":"right")?t:i==="center"?(n+t)/2:n;function Qa(i,n,t){let e=n.length,r=0,a=e;if(i._sorted){let{iScale:o,vScale:s,_parsed:c}=i,l=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(ne(c,d,u).lo,t?e:ne(n,d,o.getPixelForValue(u)).lo),l){let p=c.slice(0,r+1).reverse().findIndex(g=>!j(g[s.axis]));r-=Math.max(0,p)}r=bt(r,0,e-1)}if(m){let p=Math.max(ne(c,o.axis,h,!0).hi+1,t?0:ne(n,d,o.getPixelForValue(h),!0).hi+1);if(l){let g=c.slice(p-1).findIndex(b=>!j(b[s.axis]));p+=Math.max(0,g)}a=bt(p,r,e)-r}else a=e-r}return{start:r,count:a}}function Xa(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 $n=i=>i===0||i===1,pc=(i,n,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-n)*nt/t)),gc=(i,n,t)=>Math.pow(2,-10*i)*Math.sin((i-n)*nt/t)+1,wi={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*ft)+1,easeOutSine:i=>Math.sin(i*ft),easeInOutSine:i=>-.5*(Math.cos(G*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=>$n(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=>$n(i)?i:pc(i,.075,.3),easeOutElastic:i=>$n(i)?i:gc(i,.075,.3),easeInOutElastic(i){return $n(i)?i:i<.5?.5*pc(i*2,.1125,.45):.5+.5*gc(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-wi.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?wi.easeInBounce(i*2)*.5:wi.easeOutBounce(i*2-1)*.5+.5};function Ka(i){if(i&&typeof i=="object"){let n=i.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return!1}function Za(i){return Ka(i)?i:new en(i)}function Fa(i){return Ka(i)?i:new en(i).saturate(.5).darken(.1).hexString()}var Bh=["x","y","borderWidth","radius","tension"],Nh=["color","borderColor","backgroundColor"];function Wh(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:Nh},numbers:{type:"number",properties:Bh}}),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 Vh(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var bc=new Map;function Hh(i,n){n=n||{};let t=i+JSON.stringify(n),e=bc.get(t);return e||(e=new Intl.NumberFormat(i,n),bc.set(t,e)),e}function Ii(i,n,t){return Hh(n,t).format(i)}var Fc={values(i){return it(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 l=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(l<1e-4||l>1e15)&&(r="scientific"),a=Yh(i,t)}let o=xe(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:r,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Ii(i,e,c)},logarithmic(i,n,t){if(i===0)return"0";let e=t[n].significand||i/Math.pow(10,Math.floor(xe(i)));return[1,2,3,5,10,15].includes(e)||n>.8*t.length?Fc.numeric.call(this,i,n,t):""}};function Yh(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 sn={formatters:Fc};function jh(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:sn.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 Be=Object.create(null),rr=Object.create(null);function rn(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 za(i,n,t){return typeof n=="string"?Ci(rn(i,n),t):Ci(rn(i,""),n)}var Ba=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)=>Fa(r.backgroundColor),this.hoverBorderColor=(e,r)=>Fa(r.borderColor),this.hoverColor=(e,r)=>Fa(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 za(this,n,t)}get(n){return rn(this,n)}describe(n,t){return za(rr,n,t)}override(n,t){return za(Be,n,t)}route(n,t,e,r){let a=rn(this,n),o=rn(this,e),s="_"+t;Object.defineProperties(a,{[s]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){let c=this[s],l=o[r];return U(c)?Object.assign({},l,c):W(c,l)},set(c){this[s]=c}}})}apply(n){n.forEach(t=>t(this))}},st=new Ba({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Wh,Vh,jh]);function Uh(i){return!i||j(i.size)||j(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function an(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 zc(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,c,l,d,u,h;for(c=0;c<s;c++)if(u=t[c],u!=null&&!it(u))o=an(i,r,a,o,u);else if(it(u))for(l=0,d=u.length;l<d;l++)h=u[l],h!=null&&!it(h)&&(o=an(i,r,a,o,h));i.restore();let f=a.length/2;if(f>t.length){for(c=0;c<f;c++)delete r[a[c]];a.splice(0,f)}return o}function Ne(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 Ja(i,n){!n&&!i||(n=n||i.getContext("2d"),n.save(),n.resetTransform(),n.clearRect(0,0,i.width,i.height),n.restore())}function ar(i,n,t,e){to(i,n,t,e,null)}function to(i,n,t,e,r){let a,o,s,c,l,d,u,h,f=n.pointStyle,m=n.rotation,p=n.radius,g=(m||0)*Lh;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,nt):i.arc(t,e,p,0,nt),i.closePath();break;case"triangle":d=r?r/2:p,i.moveTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=mc,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=mc,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),i.closePath();break;case"rectRounded":l=p*.516,c=p-l,o=Math.cos(g+Ke)*c,u=Math.cos(g+Ke)*(r?r/2-l:c),s=Math.sin(g+Ke)*c,h=Math.sin(g+Ke)*(r?r/2-l:c),i.arc(t-u,e-s,l,g-G,g-ft),i.arc(t+h,e-o,l,g-ft,g),i.arc(t+u,e+s,l,g,g+ft),i.arc(t-h,e+o,l,g+ft,g+G),i.closePath();break;case"rect":if(!m){c=Math.SQRT1_2*p,d=r?r/2:c,i.rect(t-d,e-c,2*d,2*c);break}g+=Ke;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+=Ke;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+=Ke,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 re(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 cn(i,n){i.save(),i.beginPath(),i.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),i.clip()}function ln(i){i.restore()}function Bc(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 Nc(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 qh(i,n){n.translation&&i.translate(n.translation[0],n.translation[1]),j(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 $h(i,n,t,e,r){if(r.strikethrough||r.underline){let a=i.measureText(e),o=n-a.actualBoundingBoxLeft,s=n+a.actualBoundingBoxRight,c=t-a.actualBoundingBoxAscent,l=t+a.actualBoundingBoxDescent,d=r.strikethrough?(c+l)/2:l;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=r.decorationWidth||2,i.moveTo(o,d),i.lineTo(s,d),i.stroke()}}function Gh(i,n){let t=i.fillStyle;i.fillStyle=n.color,i.fillRect(n.left,n.top,n.width,n.height),i.fillStyle=t}function We(i,n,t,e,r,a={}){let o=it(n)?n:[n],s=a.strokeWidth>0&&a.strokeColor!=="",c,l;for(i.save(),i.font=r.string,qh(i,a),c=0;c<o.length;++c)l=o[c],a.backdrop&&Gh(i,a.backdrop),s&&(a.strokeColor&&(i.strokeStyle=a.strokeColor),j(a.strokeWidth)||(i.lineWidth=a.strokeWidth),i.strokeText(l,t,e,a.maxWidth)),i.fillText(l,t,e,a.maxWidth),$h(i,t,e,l,a),e+=Number(r.lineHeight);i.restore()}function Oi(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*G,G,!0),i.lineTo(t,e+a-o.bottomLeft),i.arc(t+o.bottomLeft,e+a-o.bottomLeft,o.bottomLeft,G,ft,!0),i.lineTo(t+r-o.bottomRight,e+a),i.arc(t+r-o.bottomRight,e+a-o.bottomRight,o.bottomRight,ft,0,!0),i.lineTo(t+r,e+o.topRight),i.arc(t+r-o.topRight,e+o.topRight,o.topRight,0,-ft,!0),i.lineTo(t+o.topLeft,e)}var Qh=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Xh=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Kh(i,n){let t=(""+i).match(Qh);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 Zh=i=>+i||0;function or(i,n){let t={},e=U(n),r=e?Object.keys(n):n,a=U(i)?e?o=>W(i[o],i[n[o]]):o=>i[o]:()=>i;for(let o of r)t[o]=Zh(a(o));return t}function eo(i){return or(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Ve(i){return or(i,["topLeft","topRight","bottomLeft","bottomRight"])}function Tt(i){let n=eo(i);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function mt(i,n){i=i||{},n=n||st.font;let t=W(i.size,n.size);typeof t=="string"&&(t=parseInt(t,10));let e=W(i.style,n.style);e&&!(""+e).match(Xh)&&(console.warn('Invalid font style specified: "'+e+'"'),e=void 0);let r={family:W(i.family,n.family),lineHeight:Kh(W(i.lineHeight,n.lineHeight),t),size:t,style:e,weight:W(i.weight,n.weight),string:""};return r.string=Uh(r),r}function Ai(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&&it(s)&&(s=s[t%s.length],r=!1),s!==void 0))return e&&!r&&(e.cacheable=!1),s}function Wc(i,n,t){let{min:e,max:r}=i,a=Na(n,(r-e)/2),o=(s,c)=>t&&s===0?0:s+c;return{min:o(e,-Math.abs(a)),max:o(r,a)}}function we(i,n){return Object.assign(Object.create(i),n)}function sr(i,n=[""],t,e,r=()=>i[0]){let a=t||i;typeof e>"u"&&(e=Yc("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:a,_fallback:e,_getTarget:r,override:s=>sr([s,...i],n,a,e)};return new Proxy(o,{deleteProperty(s,c){return delete s[c],delete s._keys,delete i[0][c],!0},get(s,c){return Vc(s,c,()=>sf(c,n,i,s))},getOwnPropertyDescriptor(s,c){return Reflect.getOwnPropertyDescriptor(s._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(s,c){return vc(s).includes(c)},ownKeys(s){return vc(s)},set(s,c,l){let d=s._storage||(s._storage=r());return s[c]=d[c]=l,delete s._keys,!0}})}function Je(i,n,t,e){let r={_cacheable:!1,_proxy:i,_context:n,_subProxy:t,_stack:new Set,_descriptors:io(i,e),setContext:a=>Je(i,a,t,e),override:a=>Je(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 Vc(a,o,()=>tf(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 io(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:ye(t)?t:()=>t,isIndexable:ye(e)?e:()=>e}}var Jh=(i,n)=>i?i+tr(n):n,no=(i,n)=>U(n)&&i!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function Vc(i,n,t){if(Object.prototype.hasOwnProperty.call(i,n)||n==="constructor")return i[n];let e=t();return i[n]=e,e}function tf(i,n,t){let{_proxy:e,_context:r,_subProxy:a,_descriptors:o}=i,s=e[n];return ye(s)&&o.isScriptable(n)&&(s=ef(n,s,i,t)),it(s)&&s.length&&(s=nf(n,s,i,o.isIndexable)),no(n,s)&&(s=Je(s,r,a&&a[n],o)),s}function ef(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 c=n(a,o||e);return s.delete(i),no(i,c)&&(c=ro(r._scopes,r,i,c)),c}function nf(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(U(n[0])){let c=n,l=r._scopes.filter(d=>d!==c);n=[];for(let d of c){let u=ro(l,r,i,d);n.push(Je(u,a,o&&o[i],s))}}return n}function Hc(i,n,t){return ye(i)?i(n,t):i}var rf=(i,n)=>i===!0?n:typeof i=="string"?ke(n,i):void 0;function af(i,n,t,e,r){for(let a of n){let o=rf(t,a);if(o){i.add(o);let s=Hc(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 ro(i,n,t,e){let r=n._rootScopes,a=Hc(n._fallback,t,e),o=[...i,...r],s=new Set;s.add(e);let c=_c(s,o,t,a||t,e);return c===null||typeof a<"u"&&a!==t&&(c=_c(s,o,a,c,e),c===null)?!1:sr(Array.from(s),[""],r,a,()=>of(n,t,e))}function _c(i,n,t,e,r){for(;t;)t=af(i,n,t,e,r);return t}function of(i,n,t){let e=i._getTarget();n in e||(e[n]={});let r=e[n];return it(r)&&U(t)?t:r||{}}function sf(i,n,t,e){let r;for(let a of n)if(r=Yc(Jh(a,i),t),typeof r<"u")return no(i,r)?ro(t,e,i,r):r}function Yc(i,n){for(let t of n){if(!t)continue;let e=t[i];if(typeof e<"u")return e}}function vc(i){let n=i._keys;return n||(n=i._keys=cf(i._scopes)),n}function cf(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 ao(i,n,t,e){let{iScale:r}=i,{key:a="r"}=this._parsing,o=new Array(e),s,c,l,d;for(s=0,c=e;s<c;++s)l=s+t,d=n[l],o[s]={r:r.parse(ke(d,a),l)};return o}var lf=Number.EPSILON||1e-14,Ti=(i,n)=>n<i.length&&!i[n].skip&&i[n],jc=i=>i==="x"?"y":"x";function df(i,n,t,e){let r=i.skip?n:i,a=n,o=t.skip?n:t,s=Zn(a,r),c=Zn(o,a),l=s/(s+c),d=c/(s+c);l=isNaN(l)?0:l,d=isNaN(d)?0:d;let u=e*l,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 uf(i,n,t){let e=i.length,r,a,o,s,c,l=Ti(i,0);for(let d=0;d<e-1;++d)if(c=l,l=Ti(i,d+1),!(!c||!l)){if(Pi(n[d],0,lf)){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 hf(i,n,t="x"){let e=jc(t),r=i.length,a,o,s,c=Ti(i,0);for(let l=0;l<r;++l){if(o=s,s=c,c=Ti(i,l+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[l]),c&&(a=(c[t]-d)/3,s[`cp2${t}`]=d+a,s[`cp2${e}`]=u+a*n[l])}}function ff(i,n="x"){let t=jc(n),e=i.length,r=Array(e).fill(0),a=Array(e),o,s,c,l=Ti(i,0);for(o=0;o<e;++o)if(s=c,c=l,l=Ti(i,o+1),!!c){if(l){let d=l[n]-c[n];r[o]=d!==0?(l[t]-c[t])/d:0}a[o]=s?l?Zt(r[o-1])!==Zt(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}uf(i,r,a),hf(i,a,n)}function Gn(i,n,t){return Math.max(Math.min(i,t),n)}function mf(i,n){let t,e,r,a,o,s=re(i[0],n);for(t=0,e=i.length;t<e;++t)o=a,a=s,s=t<e-1&&re(i[t+1],n),a&&(r=i[t],o&&(r.cp1x=Gn(r.cp1x,n.left,n.right),r.cp1y=Gn(r.cp1y,n.top,n.bottom)),s&&(r.cp2x=Gn(r.cp2x,n.left,n.right),r.cp2y=Gn(r.cp2y,n.top,n.bottom)))}function Uc(i,n,t,e,r){let a,o,s,c;if(n.spanGaps&&(i=i.filter(l=>!l.skip)),n.cubicInterpolationMode==="monotone")ff(i,r);else{let l=e?i[i.length-1]:i[0];for(a=0,o=i.length;a<o;++a)s=i[a],c=df(l,s,i[Math.min(a+1,o-(e?0:1))%o],n.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,l=s}n.capBezierPoints&&mf(i,t)}function cr(){return typeof window<"u"&&typeof document<"u"}function lr(i){let n=i.parentNode;return n&&n.toString()==="[object ShadowRoot]"&&(n=n.host),n}function Jn(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 dr=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function pf(i,n){return dr(i).getPropertyValue(n)}var gf=["top","right","bottom","left"];function Ze(i,n,t){let e={};t=t?"-"+t:"";for(let r=0;r<4;r++){let a=gf[r];e[a]=parseFloat(i[n+"-"+a+t])||0}return e.width=e.left+e.right,e.height=e.top+e.bottom,e}var bf=(i,n,t)=>(i>0||n>0)&&(!t||!t.shadowRoot);function _f(i,n){let t=i.touches,e=t&&t.length?t[0]:i,{offsetX:r,offsetY:a}=e,o=!1,s,c;if(bf(r,a,i.target))s=r,c=a;else{let l=n.getBoundingClientRect();s=e.clientX-l.left,c=e.clientY-l.top,o=!0}return{x:s,y:c,box:o}}function He(i,n){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:e}=n,r=dr(t),a=r.boxSizing==="border-box",o=Ze(r,"padding"),s=Ze(r,"border","width"),{x:c,y:l,box:d}=_f(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((c-u)/f*t.width/e),y:Math.round((l-h)/m*t.height/e)}}function vf(i,n,t){let e,r;if(n===void 0||t===void 0){let a=i&&lr(i);if(!a)n=i.clientWidth,t=i.clientHeight;else{let o=a.getBoundingClientRect(),s=dr(a),c=Ze(s,"border","width"),l=Ze(s,"padding");n=o.width-l.width-c.width,t=o.height-l.height-c.height,e=Jn(s.maxWidth,a,"clientWidth"),r=Jn(s.maxHeight,a,"clientHeight")}}return{width:n,height:t,maxWidth:e||Kn,maxHeight:r||Kn}}var ze=i=>Math.round(i*10)/10;function qc(i,n,t,e){let r=dr(i),a=Ze(r,"margin"),o=Jn(r.maxWidth,i,"clientWidth")||Kn,s=Jn(r.maxHeight,i,"clientHeight")||Kn,c=vf(i,n,t),{width:l,height:d}=c;if(r.boxSizing==="content-box"){let h=Ze(r,"border","width"),f=Ze(r,"padding");l-=f.width+h.width,d-=f.height+h.height}return l=Math.max(0,l-a.width),d=Math.max(0,e?l/e:d-a.height),l=ze(Math.min(l,o,c.maxWidth)),d=ze(Math.min(d,s,c.maxHeight)),l&&!d&&(d=ze(l/2)),(n!==void 0||t!==void 0)&&e&&c.height&&d>c.height&&(d=c.height,l=ze(Math.floor(d*e))),{width:l,height:d}}function oo(i,n,t){let e=n||1,r=ze(i.height*e),a=ze(i.width*e);i.height=ze(i.height),i.width=ze(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 $c=(function(){let i=!1;try{let n={get passive(){return i=!0,!1}};cr()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch(n){}return i})();function so(i,n){let t=pf(i,n),e=t&&t.match(/^(\d+)(\.\d+)?px$/);return e?+e[1]:void 0}function Fe(i,n,t,e){return{x:i.x+t*(n.x-i.x),y:i.y+t*(n.y-i.y)}}function Gc(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 Qc(i,n,t,e){let r={x:i.cp2x,y:i.cp2y},a={x:n.cp1x,y:n.cp1y},o=Fe(i,r,t),s=Fe(r,a,t),c=Fe(a,n,t),l=Fe(o,s,t),d=Fe(s,c,t);return Fe(l,d,t)}var yf=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}}},xf=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,n){return i+n},leftForLtr(i,n){return i}}};function ei(i,n,t){return i?yf(n,t):xf()}function co(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 lo(i,n){n!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",n[0],n[1]))}function Xc(i){return i==="angle"?{between:Si,compare:zh,normalize:wt}:{between:oe,compare:(n,t)=>n-t,normalize:n=>n}}function yc({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 kf(i,n,t){let{property:e,start:r,end:a}=t,{between:o,normalize:s}=Xc(e),c=n.length,{start:l,end:d,loop:u}=i,h,f;if(u){for(l+=c,d+=c,h=0,f=c;h<f&&o(s(n[l%c][e]),r,a);++h)l--,d--;l%=c,d%=c}return d<l&&(d+=c),{start:l,end:d,loop:u,style:i.style}}function uo(i,n,t){if(!t)return[i];let{property:e,start:r,end:a}=t,o=n.length,{compare:s,between:c,normalize:l}=Xc(e),{start:d,end:u,loop:h,style:f}=kf(i,n,t),m=[],p=!1,g=null,b,_,k,C=()=>c(r,k,b)&&s(r,k)!==0,v=()=>s(a,b)===0||c(a,k,b),x=()=>p||C(),P=()=>!p||v();for(let D=d,S=d;D<=u;++D)_=n[D%o],!_.skip&&(b=l(_[e]),b!==k&&(p=c(b,r,a),g===null&&x()&&(g=s(b,r)===0?D:S),g!==null&&P()&&(m.push(yc({start:g,end:D,loop:h,count:o,style:f})),g=null),S=D,k=b));return g!==null&&m.push(yc({start:g,end:u,loop:h,count:o,style:f})),m}function ho(i,n){let t=[],e=i.segments;for(let r=0;r<e.length;r++){let a=uo(e[r],i.points,n);a.length&&t.push(...a)}return t}function wf(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 Cf(i,n,t,e){let r=i.length,a=[],o=n,s=i[n],c;for(c=n+1;c<=t;++c){let l=i[c%r];l.skip||l.stop?s.skip||(e=!1,a.push({start:n%r,end:(c-1)%r,loop:e}),n=o=l.stop?c:null):(o=c,s.skip&&(n=c)),s=l}return o!==null&&a.push({start:n%r,end:o%r,loop:e}),a}function Kc(i,n){let t=i.points,e=i.options.spanGaps,r=t.length;if(!r)return[];let a=!!i._loop,{start:o,end:s}=wf(t,r,a,e);if(e===!0)return xc(i,[{start:o,end:s,loop:a}],t,n);let c=s<o?s+r:s,l=!!i._fullLoop&&o===0&&s===r-1;return xc(i,Cf(t,o,c,l),t,n)}function xc(i,n,t,e){return!e||!e.setContext||!t?n:Tf(i,n,t,e)}function Tf(i,n,t,e){let r=i._chart.getContext(),a=kc(i.options),{_datasetIndex:o,options:{spanGaps:s}}=i,c=t.length,l=[],d=a,u=n[0].start,h=u;function f(m,p,g,b){let _=s?-1:1;if(m!==p){for(m+=c;t[m%c].skip;)m-=_;for(;t[p%c].skip;)p+=_;m%c!==p%c&&(l.push({start:m%c,end:p%c,loop:g,style:b}),d=b,u=p%c)}}for(let m of n){u=s?u:m.start;let p=t[u%c],g;for(h=u+1;h<=m.end;h++){let b=t[h%c];g=kc(e.setContext(we(r,{type:"segment",p0:p,p1:b,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:o}))),Mf(g,d)&&f(u,h-1,m.loop,d),p=b,d=g}u<h-1&&f(u,h-1,m.loop,d)}return l}function kc(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Mf(i,n){if(!n)return!1;let t=[],e=function(r,a){return Ka(a)?(t.includes(a)||t.push(a),t.indexOf(a)):a};return JSON.stringify(i,e)!==JSON.stringify(n,e)}function Qn(i,n,t){return i.options.clip?i[t]:n[t]}function Df(i,n){let{xScale:t,yScale:e}=i;return t&&e?{left:Qn(t,n,"left"),right:Qn(t,n,"right"),top:Qn(e,n,"top"),bottom:Qn(e,n,"bottom")}:n}function fo(i,n){let t=n._clip;if(t.disabled)return!1;let e=Df(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 To=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=$a.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,c;for(;o>=0;--o)c=a[o],c._active?(c._total>e.duration&&(e.duration=c._total),c.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)}},Ce=new To,Zc="transparent",Pf={boolean(i,n,t){return t>.5?n:i},color(i,n,t){let e=Za(i||Zc),r=e.valid&&Za(n||Zc);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=Ai([n.to,r,a,n.from]);let o=Ai([n.from,a,r]);this._active=!0,this._fn=n.fn||Pf[n.type||typeof o],this._easing=wi[n.easing]||wi.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=Ai([n.to,t,r,n.from]),this._from=Ai([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,c;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}c=t/e%2,c=o&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[r]=this._fn(a,s,c)}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]()}},vr=class{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!U(n))return;let t=Object.keys(st.animation),e=this._properties;Object.getOwnPropertyNames(n).forEach(r=>{let a=n[r];if(!U(a))return;let o={};for(let s of t)o[s]=a[s];(it(a.properties)&&a.properties||[r]).forEach(s=>{(s===r||!e.has(s))&&e.set(s,o)})})}_animateOptions(n,t){let e=t.options,r=If(n,e);if(!r)return[];let a=this._createAnimations(r,e);return e.$shared&&Sf(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(),c;for(c=o.length-1;c>=0;--c){let l=o[c];if(l.charAt(0)==="$")continue;if(l==="options"){r.push(...this._animateOptions(n,t));continue}let d=t[l],u=a[l],h=e.get(l);if(u)if(h&&u.active()){u.update(h,d,s);continue}else u.cancel();if(!h||!h.duration){n[l]=d;continue}a[l]=u=new Mo(h,n,l,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 Ce.add(this._chart,e),!0}};function Sf(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 If(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 Jc(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=Jc(i,t),r=Jc(n,t);return{top:r.end,right:e.end,bottom:r.start,left:e.start}}function Af(i){let n,t,e,r;return U(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 Zl(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 tl(i,n,t,e={}){let r=i.keys,a=e.mode==="single",o,s,c,l;if(n===null)return;let d=!1;for(o=0,s=r.length;o<s;++o){if(c=+r[o],c===t){if(d=!0,e.all)continue;break}l=i.values[c],ut(l)&&(a||n===0||Zt(n)===Zt(l))&&(n+=l)}return!d&&!e.all?0:n}function Rf(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),c,l,d;for(c=0,l=o.length;c<l;++c)d=o[c],s[c]={[r]:d,[a]:i[d]};return s}function mo(i,n){let t=i&&i.options.stacked;return t||t===void 0&&n.stack!==void 0}function Ef(i,n,t){return`${i.id}.${n.id}.${t.stack||t.type}`}function Lf(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 Ff(i,n,t){let e=i[n]||(i[n]={});return e[t]||(e[t]={})}function el(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 il(i,n){let{chart:t,_cachedMeta:e}=i,r=t._stacks||(t._stacks={}),{iScale:a,vScale:o,index:s}=e,c=a.axis,l=o.axis,d=Ef(a,o,e),u=n.length,h;for(let f=0;f<u;++f){let m=n[f],{[c]:p,[l]:g}=m,b=m._stacks||(m._stacks={});h=b[l]=Ff(r,d,p),h[s]=g,h._top=el(h,o,!0,e.type),h._bottom=el(h,o,!1,e.type);let _=h._visualValues||(h._visualValues={});_[s]=g}}function po(i,n){let t=i.scales;return Object.keys(t).filter(e=>t[e].axis===n).shift()}function zf(i,n){return we(i,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function Bf(i,n,t){return we(i,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function dn(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 go=i=>i==="reset"||i==="none",nl=(i,n)=>n?i:Object.assign({},i),Nf=(i,n,t)=>i&&!n.hidden&&n._stacked&&{keys:Zl(t,!0),values:null},je=(()=>{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=mo(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&&dn(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=W(r.xAxisID,po(t,"x")),s=e.yAxisID=W(r.yAxisID,po(t,"y")),c=e.rAxisID=W(r.rAxisID,po(t,"r")),l=e.indexAxis,d=e.iAxisID=a(l,o,s,c),u=e.vAxisID=a(l,s,o,c);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(c),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&&Ua(this._data,this),t._stacked&&dn(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(U(e)){let a=this._cachedMeta;this._data=Rf(e,a)}else if(r!==e){if(r){Ua(r,this);let a=this._cachedMeta;dn(a),a._parsed=[]}e&&Object.isExtensible(e)&&Rc(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=mo(e.vScale,e),e.stack!==r.stack&&(a=!0,dn(e),e.stack=r.stack),this._resyncElements(t),(a||o!==e._stacked)&&(il(this,e._parsed),e._stacked=mo(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,c=o.axis,l=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{it(a[t])?f=this.parseArrayData(r,a,t,e):U(a[t])?f=this.parseObjectData(r,a,t,e):f=this.parsePrimitiveData(r,a,t,e);let m=()=>h[c]===null||d&&h[c]<d[c];for(u=0;u<e;++u)r._parsed[u+t]=h=f[u],l&&(m()&&(l=!1),d=h);r._sorted=l}s&&il(this,f)}parsePrimitiveData(t,e,r,a){let{iScale:o,vScale:s}=t,c=o.axis,l=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]={[c]:u||o.parse(d[p],p),[l]:s.parse(e[p],p)};return h}parseArrayData(t,e,r,a){let{xScale:o,yScale:s}=t,c=new Array(a),l,d,u,h;for(l=0,d=a;l<d;++l)u=l+r,h=e[u],c[l]={x:o.parse(h[0],u),y:s.parse(h[1],u)};return c}parseObjectData(t,e,r,a){let{xScale:o,yScale:s}=t,{xAxisKey:c="x",yAxisKey:l="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(ke(m,c),f),y:s.parse(ke(m,l),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],c={keys:Zl(a,!0),values:e._stacks[t.axis]._visualValues};return tl(c,s,o.index,{mode:r})}updateRangeFromParsed(t,e,r,a){let o=r[e.axis],s=o===null?NaN:o,c=a&&r._stacks[e.axis];a&&c&&(a.values=c,s=tl(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,c=this._getOtherScale(t),l=Nf(e,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=Lf(c),f,m;function p(){m=a[f];let g=m[c.axis];return!ut(m[t.axis])||u>g||h<g}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(d,t,m,l),o));++f);if(o){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(d,t,m,l);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],ut(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=Af(W(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=[],c=this._drawStart||0,l=this._drawCount||a.length-c,d=this.options.drawActiveElementsOnTop,u;for(r.dataset&&r.dataset.draw(t,o,c,l),u=c;u<c+l;++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=Bf(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=zf(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,c=o[s],l=this.enableOptionSharing&&Di(r);if(c)return nl(c,l);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(st.elements[t]),p=()=>this.getContext(r,a,e),g=d.resolveNamedOptions(f,m,p,h);return g.$shared&&(g.$shared=l,o[s]=Object.freeze(nl(g,l))),g}_resolveAnimations(t,e,r){let a=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,c=o[s];if(c)return c;let l;if(a.options.animation!==!1){let u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),h);l=u.createResolver(f,this.getContext(t,r,e))}let d=new vr(a,l&&l.animations);return l&&l._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||go(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){go(a)?Object.assign(t,r):this._resolveAnimations(e,a).update(t,r)}updateSharedOptions(t,e,r){t&&!go(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[c,l,d]of this._syncList)this[c](l,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,c,l=d=>{for(d.length+=e,c=d.length-1;c>=s;c--)d[c]=d[c-e]};for(l(o),c=t;c<s;++c)o[c]=new this.dataElementType;this._parsing&&l(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&&dn(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 Wf(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=qa(e.sort((r,a)=>r-a))}return i._cache.$bar}function Vf(i){let n=i.iScale,t=Wf(n,i.type),e=n._length,r,a,o,s,c=()=>{o===32767||o===-32768||(Di(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]),c();for(s=void 0,r=0,a=n.ticks.length;r<a;++r)o=n.getPixelForTick(r),c();return e}function Hf(i,n,t,e){let r=t.barThickness,a,o;return j(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 Yf(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,c=t.categoryPercentage;o===null&&(o=a-(s===null?n.end-n.start:s-a)),s===null&&(s=a+a-o);let l=a-(a-Math.min(o,s))/2*c;return{chunk:Math.abs(s-o)/2*c/e,ratio:t.barPercentage,start:l}}function jf(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),c=o,l=s;Math.abs(o)>Math.abs(s)&&(c=s,l=o),n[t.axis]=l,n._custom={barStart:c,barEnd:l,start:r,end:a,min:o,max:s}}function Jl(i,n,t,e){return it(i)?jf(i,n,t,e):n[t.axis]=t.parse(i,e),n}function rl(i,n,t,e){let r=i.iScale,a=i.vScale,o=r.getLabels(),s=r===a,c=[],l,d,u,h;for(l=t,d=t+e;l<d;++l)h=n[l],u={},u[r.axis]=s||r.parse(o[l],l),c.push(Jl(h,u,a,l));return c}function bo(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Uf(i,n,t){return i!==0?Zt(i):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function qf(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 $f(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:c,top:l,bottom:d}=qf(i);r==="middle"&&t&&(i.enableBorderRadius=!0,(t._top||0)===e?r=l:(t._bottom||0)===e?r=d:(a[al(d,o,s,c)]=!0,r=l)),a[al(r,o,s,c)]=!0,i.borderSkipped=a}function al(i,n,t,e){return e?(i=Gf(i,n,t),i=ol(i,t,n)):i=ol(i,n,t),i}function Gf(i,n,t){return i===n?t:i===t?n:i}function ol(i,n,t){return i==="start"?n:i==="end"?t:i}function Qf(i,{inflateAmount:n},t){i.inflateAmount=n==="auto"?t===1?.33:0:n}var Xf=(()=>{class i extends je{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 rl(t,e,r,a)}parseArrayData(t,e,r,a){return rl(t,e,r,a)}parseObjectData(t,e,r,a){let{iScale:o,vScale:s}=t,{xAxisKey:c="x",yAxisKey:l="y"}=this._parsing,d=o.axis==="x"?c:l,u=s.axis==="x"?c:l,h=[],f,m,p,g;for(f=r,m=r+a;f<m;++f)g=e[f],p={},p[o.axis]=o.parse(ke(g,d),f),h.push(Jl(ke(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,c=bo(s)?"["+s.start+", "+s.end+"]":""+a.getLabelForValue(o[a.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:c}}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:c}}=this,l=c.getBasePixel(),d=c.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||j(p[c.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,u),_=(p._stacks||{})[c.axis],k={horizontal:d,base:g.base,enableBorderRadius:!_||bo(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;$f(k,C,_,s),Qf(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=[],c=this._cachedMeta.controller.getParsed(e),l=c&&c[r.axis],d=u=>{let h=u._parsed.find(m=>m[r.axis]===l),f=h&&h[u.vScale.axis];if(j(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[W(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 c=t.barThickness;return{min:c||Vf(e),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:r,index:a},options:{base:o,minBarLength:s}}=this,c=o||0,l=this.getParsed(t),d=l._custom,u=bo(d),h=l[e.axis],f=0,m=r?this.applyStack(e,l,r):h,p,g;m!==h&&(f=m-h,m=h),u&&(h=d.barStart,m=d.barEnd-d.barStart,h!==0&&Zt(h)!==Zt(d.barEnd)&&(f=0),f+=h);let b=!j(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=Uf(g,e,c)*s,h===c&&(_-=g/2);let k=e.getPixelForDecimal(0),C=e.getPixelForDecimal(1),v=Math.min(k,C),x=Math.max(k,C);_=Math.max(Math.min(_,x),v),p=_+g,r&&!u&&(l._stacks[e.axis]._visualValues[a]=e.getValueForPixel(p)-e.getValueForPixel(_))}if(_===e.getPixelForValue(c)){let k=Zt(g)*e.getLineWidthForValue(c)/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=W(a.maxBarThickness,1/0),c,l,d=this._getAxisCount();if(e.grouped){let u=o?this._getStackCount(t):e.stackCount,h=a.barThickness==="flex"?Yf(t,e,a,u*d):Hf(t,e,a,u*d),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(W(f,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+m;c=h.start+h.chunk*p+h.chunk/2,l=Math.min(s,h.chunk*h.ratio)}else c=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,e.min*e.ratio);return{base:c-l/2,head:c+l/2,center:c,size:l}}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})(),Kf=(()=>{class i extends je{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 c=e[r+s];o[s]._custom=W(c[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 c=e[r+s];o[s]._custom=W(c&&c.r&&+c.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),c=a.getLabelForValue(s.x),l=o.getLabelForValue(s.y),d=s._custom;return{label:r[t]||"",value:"("+c+", "+l+(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:c}=this._cachedMeta,{sharedOptions:l,includeOptions:d}=this._getSharedOptions(e,a),u=s.axis,h=c.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?c.getBasePixel():c.getPixelForValue(p[h]);g.skip=isNaN(b)||isNaN(_),d&&(g.options=l||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+=W(r&&r._custom,o),a}}return i})();function Zf(i,n,t){let e=1,r=1,a=0,o=0;if(n<nt){let s=i,c=s+n,l=Math.cos(s),d=Math.sin(s),u=Math.cos(c),h=Math.sin(c),f=(k,C,v)=>Si(k,s,c,!0)?1:Math.max(C,C*t,v,v*t),m=(k,C,v)=>Si(k,s,c,!0)?-1:Math.min(C,C*t,v,v*t),p=f(0,l,u),g=f(ft,d,h),b=m(G,l,u),_=m(G+ft,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 qo=(()=>{class i extends je{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:c}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,d)=>{let h=t.getDatasetMeta(0).controller.getStyle(d);return{text:l,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&&(c||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=l=>+r[l];if(U(r[t])){let{key:l="value"}=this._parsing;o=d=>+ke(r[d],l)}let s,c;for(s=t,c=t+e;s<c;++s)a._parsed[s]=o(s)}}_getRotation(){return jt(this.options.rotation-90)}_getCircumference(){return jt(this.options.circumference)}_getRotationExtents(){let t=nt,e=-nt;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,c=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(Cc(this.options.cutout,c),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:p,offsetY:g}=Zf(h,u,l),b=(r.width-s)/f,_=(r.height-s)/m,k=Math.max(Math.min(b,_)/2,0),C=Na(this.options.radius,k),v=Math.max(C*l,0),x=(C-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=g*C,a.total=this.calculateTotal(),this.outerRadius=C-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*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/nt)}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,c=s.chartArea,d=s.options.animation,u=(c.left+c.right)/2,h=(c.top+c.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],x={x:u+this.offsetX,y:h+this.offsetY,startAngle:_,endAngle:_+C,circumference:C,outerRadius:p,innerRadius:m};b&&(x.options=g||this.resolveDataElementOptions(k,v.active?"active":a)),_+=C,this.updateElement(v,k,x,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)?nt*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart,a=r.data.labels||[],o=Ii(e._parsed[t],r.options.locale);return{label:a[t]||"",value:o}}getMaxBorderWidth(t){let e=0,r=this.chart,a,o,s,c,l;if(!t){for(a=0,o=r.data.datasets.length;a<o;++a)if(r.isDatasetVisible(a)){s=r.getDatasetMeta(a),t=s.data,c=s.controller;break}}if(!t)return 0;for(a=0,o=t.length;a<o;++a)l=c.resolveDataElementOptions(a),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.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(W(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return i})(),Jf=(()=>{class i extends je{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:c,count:l}=Qa(e,a,s);this._drawStart=c,this._drawCount=l,Xa(e)&&(c=0,l=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,c,l,t)}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:c,_stacked:l,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,a),f=s.axis,m=c.axis,{spanGaps:p,segment:g}=this.options,b=ti(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 x=0;x<C;++x){let P=t[x],D=_?P:{};if(x<e||x>=k){D.skip=!0;continue}let S=this.getParsed(x),F=j(S[m]),B=D[f]=s.getPixelForValue(S[f],x),V=D[m]=o||F?c.getBasePixel():c.getPixelForValue(l?this.applyStack(c,S,l):S[m],x);D.skip=isNaN(B)||isNaN(V)||F,D.stop=x>0&&Math.abs(S[f]-v[f])>b,g&&(D.parsed=S,D.raw=d.data[x]),h&&(D.options=u||this.resolveDataElementOptions(x,P.active?"active":a)),_||this.updateElement(P,x,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})(),td=(()=>{class i extends je{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 l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.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=Ii(e._parsed[t].r,r.options.locale);return{label:a[t]||"",value:o}}parseObjectData(t,e,r,a){return ao.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),c=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,l=s.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,h=d.yCenter,f=d.getIndexAngle(0)-.5*G,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&&(l.animateScale&&(C=0),l.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)?jt(this.resolveDataElementOptions(t,e).angle||r):0}}return i})(),tm=(()=>{class i extends qo{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return i})(),em=(()=>{class i extends je{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 ao.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 c={_loop:!0,_fullLoop:o.length===a.length,options:s};this.updateElement(r,void 0,c,t)}this.updateElements(a,0,a.length,t)}updateElements(t,e,r,a){let o=this._cachedMeta.rScale,s=a==="reset";for(let c=e;c<e+r;c++){let l=t[c],d=this.resolveDataElementOptions(c,l.active?"active":a),u=o.getPointPositionForValue(c,this.getParsed(c).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(l,c,m,a)}}}return i})(),im=(()=>{class i extends je{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),c=a.getLabelForValue(s.x),l=o.getLabelForValue(s.y);return{label:r[t]||"",value:"("+c+", "+l+")"}}update(t){let e=this._cachedMeta,{data:r=[]}=e,a=this.chart._animationsDisabled,{start:o,count:s}=Qa(e,r,a);if(this._drawStart=o,this._drawCount=s,Xa(e)&&(o=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:c,_dataset:l}=e;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!l._decimated,c.points=r;let d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(c,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:c,_stacked:l,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(e,a),h=this.getSharedOptions(u),f=this.includeOptions(a,h),m=s.axis,p=c.axis,{spanGaps:g,segment:b}=this.options,_=ti(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 x=t[v],P=this.getParsed(v),D=k?x:{},S=j(P[p]),F=D[m]=s.getPixelForValue(P[m],v),B=D[p]=o||S?c.getBasePixel():c.getPixelForValue(l?this.applyStack(c,P,l):P[p],v);D.skip=isNaN(F)||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,x.active?"active":a)),k||this.updateElement(x,v,D,a),C=P}this.updateSharedOptions(h,a,u)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let c=0;for(let l=e.length-1;l>=0;--l)c=Math.max(c,e[l].size(this.resolveDataElementOptions(l))/2);return c>0&&c}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})(),nm=Object.freeze({__proto__:null,BarController:Xf,BubbleController:Kf,DoughnutController:qo,LineController:Jf,PieController:tm,PolarAreaController:td,RadarController:em,ScatterController:im});function ii(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Do=class i{static override(n){Object.assign(i.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return ii()}parse(){return ii()}format(){return ii()}add(){return ii()}diff(){return ii()}startOf(){return ii()}endOf(){return ii()}},$o={_date:Do};function rm(i,n,t,e){let{controller:r,data:a,_sorted:o}=i,s=r._cachedMeta.iScale,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(s&&n===s.axis&&n!=="r"&&o&&a.length){let l=s._reversePixels?Ic:ne;if(e){if(r._sharedOptions){let d=a[0],u=typeof d.getRange=="function"&&d.getRange(n);if(u){let h=l(a,n,t-u),f=l(a,n,t+u);return{lo:h.lo,hi:f.hi}}}}else{let d=l(a,n,t);if(c){let{vScale:u}=r._cachedMeta,{_parsed:h}=i,f=h.slice(0,d.lo+1).reverse().findIndex(p=>!j(p[u.axis]));d.lo-=Math.max(0,f);let m=h.slice(d.hi).findIndex(p=>!j(p[u.axis]));d.hi+=Math.max(0,m)}return d}}return{lo:0,hi:a.length-1}}function yn(i,n,t,e,r){let a=i.getSortedVisibleDatasetMetas(),o=t[n];for(let s=0,c=a.length;s<c;++s){let{index:l,data:d}=a[s],{lo:u,hi:h}=rm(a[s],n,o,r);for(let f=u;f<=h;++f){let m=d[f];m.skip||e(m,l,f)}}}function am(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 _o(i,n,t,e,r){let a=[];return!r&&!i.isPointInArea(n)||yn(i,t,n,function(s,c,l){!r&&!re(s,i.chartArea,0)||s.inRange(n.x,n.y,e)&&a.push({element:s,datasetIndex:c,index:l})},!0),a}function om(i,n,t,e){let r=[];function a(o,s,c){let{startAngle:l,endAngle:d}=o.getProps(["startAngle","endAngle"],e),{angle:u}=ja(o,{x:n.x,y:n.y});Si(u,l,d)&&r.push({element:o,datasetIndex:s,index:c})}return yn(i,t,n,a),r}function sm(i,n,t,e,r,a){let o=[],s=am(t),c=Number.POSITIVE_INFINITY;function l(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<c?(o=[{element:d,datasetIndex:u,index:h}],c=g):g===c&&o.push({element:d,datasetIndex:u,index:h})}return yn(i,t,n,l),o}function vo(i,n,t,e,r,a){return!a&&!i.isPointInArea(n)?[]:t==="r"&&!e?om(i,n,t,r):sm(i,n,t,e,r,a)}function sl(i,n,t,e,r){let a=[],o=t==="x"?"inXRange":"inYRange",s=!1;return yn(i,t,n,(c,l,d)=>{c[o]&&c[o](n[t],r)&&(a.push({element:c,datasetIndex:l,index:d}),s=s||c.inRange(n.x,n.y,r))}),e&&!s?[]:a}var cm={evaluateInteractionItems:yn,modes:{index(i,n,t,e){let r=He(n,i),a=t.axis||"x",o=t.includeInvisible||!1,s=t.intersect?_o(i,r,a,e,o):vo(i,r,a,!1,e,o),c=[];return s.length?(i.getSortedVisibleDatasetMetas().forEach(l=>{let d=s[0].index,u=l.data[d];u&&!u.skip&&c.push({element:u,datasetIndex:l.index,index:d})}),c):[]},dataset(i,n,t,e){let r=He(n,i),a=t.axis||"xy",o=t.includeInvisible||!1,s=t.intersect?_o(i,r,a,e,o):vo(i,r,a,!1,e,o);if(s.length>0){let c=s[0].datasetIndex,l=i.getDatasetMeta(c).data;s=[];for(let d=0;d<l.length;++d)s.push({element:l[d],datasetIndex:c,index:d})}return s},point(i,n,t,e){let r=He(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return _o(i,r,a,e,o)},nearest(i,n,t,e){let r=He(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return vo(i,r,a,t.intersect,e,o)},x(i,n,t,e){let r=He(n,i);return sl(i,r,"x",t.intersect,e)},y(i,n,t,e){let r=He(n,i);return sl(i,r,"y",t.intersect,e)}}},ed=["left","top","right","bottom"];function un(i,n){return i.filter(t=>t.pos===n)}function cl(i,n){return i.filter(t=>ed.indexOf(t.pos)===-1&&t.box.axis===n)}function hn(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 lm(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 dm(i){let n={};for(let t of i){let{stack:e,pos:r,stackWeight:a}=t;if(!e||!ed.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 um(i,n){let t=dm(i),{vBoxMaxWidth:e,hBoxMaxHeight:r}=n,a,o,s;for(a=0,o=i.length;a<o;++a){s=i[a];let{fullSize:c}=s.box,l=t[s.stack],d=l&&s.stackWeight/l.weight;s.horizontal?(s.width=d?d*e:c&&n.availableWidth,s.height=r):(s.width=e,s.height=d?d*r:c&&n.availableHeight)}return t}function hm(i){let n=lm(i),t=hn(n.filter(l=>l.box.fullSize),!0),e=hn(un(n,"left"),!0),r=hn(un(n,"right")),a=hn(un(n,"top"),!0),o=hn(un(n,"bottom")),s=cl(n,"x"),c=cl(n,"y");return{fullSize:t,leftAndTop:e.concat(a),rightAndBottom:r.concat(c).concat(o).concat(s),chartArea:un(n,"chartArea"),vertical:e.concat(r).concat(c),horizontal:a.concat(o).concat(s)}}function ll(i,n,t,e){return Math.max(i[t],n[t])+Math.max(i[e],n[e])}function id(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 fm(i,n,t,e){let{pos:r,box:a}=t,o=i.maxPadding;if(!U(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&&id(o,a.getPadding());let s=Math.max(0,n.outerWidth-ll(o,i,"left","right")),c=Math.max(0,n.outerHeight-ll(o,i,"top","bottom")),l=s!==i.w,d=c!==i.h;return i.w=s,i.h=c,t.horizontal?{same:l,other:d}:{same:d,other:l}}function mm(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 pm(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 pn(i,n,t,e){let r=[],a,o,s,c,l,d;for(a=0,o=i.length,l=0;a<o;++a){s=i[a],c=s.box,c.update(s.width||n.w,s.height||n.h,pm(s.horizontal,n));let{same:u,other:h}=fm(n,t,s,e);l|=u&&r.length,d=d||h,c.fullSize||r.push(s)}return l&&pn(r,n,t,e)||d}function ur(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 dl(i,n,t,e){let r=t.padding,{x:a,y:o}=n;for(let s of i){let c=s.box,l=e[s.stack]||{count:1,placed:0,weight:1},d=s.stackWeight/l.weight||1;if(s.horizontal){let u=n.w*d,h=l.size||c.height;Di(l.start)&&(o=l.start),c.fullSize?ur(c,r.left,o,t.outerWidth-r.right-r.left,h):ur(c,n.left+l.placed,o,u,h),l.start=o,l.placed+=u,o=c.bottom}else{let u=n.h*d,h=l.size||c.width;Di(l.start)&&(a=l.start),c.fullSize?ur(c,a,r.top,h,t.outerHeight-r.bottom-r.top):ur(c,a,n.top+l.placed,h,u),l.start=a,l.placed+=u,a=c.right}}n.x=a,n.y=o}var St={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=Tt(i.options.layout.padding),a=Math.max(n-r.width,0),o=Math.max(t-r.height,0),s=hm(i.boxes),c=s.vertical,l=s.horizontal;X(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=c.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);id(h,Tt(e));let f=Object.assign({maxPadding:h,w:a,h:o,x:r.left,y:r.top},r),m=um(c.concat(l),u);pn(s.fullSize,f,u,m),pn(c,f,u,m),pn(l,f,u,m)&&pn(c,f,u,m),mm(f),dl(s.leftAndTop,f,u,m),f.x+=f.w,f.y+=f.h,dl(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},X(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})})}},yr=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){}},Po=class extends yr{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}},br="$chartjs",gm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ul=i=>i===null||i==="";function bm(i,n){let t=i.style,e=i.getAttribute("height"),r=i.getAttribute("width");if(i[br]={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",ul(r)){let a=so(i,"width");a!==void 0&&(i.width=a)}if(ul(e))if(i.style.height==="")i.height=i.width/(n||2);else{let a=so(i,"height");a!==void 0&&(i.height=a)}return i}var nd=$c?{passive:!0}:!1;function _m(i,n,t){i&&i.addEventListener(n,t,nd)}function vm(i,n,t){i&&i.canvas&&i.canvas.removeEventListener(n,t,nd)}function ym(i,n){let t=gm[i.type]||i.type,{x:e,y:r}=He(i,n);return{type:t,chart:n,native:i,x:e!==void 0?e:null,y:r!==void 0?r:null}}function xr(i,n){for(let t of i)if(t===n||t.contains(n))return!0}function xm(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||xr(s.addedNodes,e),o=o&&!xr(s.removedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function km(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||xr(s.removedNodes,e),o=o&&!xr(s.addedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}var bn=new Map,hl=0;function rd(){let i=window.devicePixelRatio;i!==hl&&(hl=i,bn.forEach((n,t)=>{t.currentDevicePixelRatio!==i&&n()}))}function wm(i,n){bn.size||window.addEventListener("resize",rd),bn.set(i,n)}function Cm(i){bn.delete(i),bn.size||window.removeEventListener("resize",rd)}function Tm(i,n,t){let e=i.canvas,r=e&&lr(e);if(!r)return;let a=Ga((s,c)=>{let l=r.clientWidth;t(s,c),l<r.clientWidth&&t()},window),o=new ResizeObserver(s=>{let c=s[0],l=c.contentRect.width,d=c.contentRect.height;l===0&&d===0||a(l,d)});return o.observe(r),wm(i,a),o}function yo(i,n,t){t&&t.disconnect(),n==="resize"&&Cm(i)}function Mm(i,n,t){let e=i.canvas,r=Ga(a=>{i.ctx!==null&&t(ym(a,i))},i);return _m(e,n,r),r}var So=class extends yr{acquireContext(n,t){let e=n&&n.getContext&&n.getContext("2d");return e&&e.canvas===n?(bm(n,t),e):null}releaseContext(n){let t=n.canvas;if(!t[br])return!1;let e=t[br].initial;["height","width"].forEach(a=>{let o=e[a];j(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[br],!0}addEventListener(n,t,e){this.removeEventListener(n,t);let r=n.$proxies||(n.$proxies={}),o={attach:xm,detach:km,resize:Tm}[t]||Mm;r[t]=o(n,t,e)}removeEventListener(n,t){let e=n.$proxies||(n.$proxies={}),r=e[t];if(!r)return;({attach:yo,detach:yo,resize:yo}[t]||vm)(n,t,r),e[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,e,r){return qc(n,t,e,r)}isAttached(n){let t=n&&lr(n);return!!(t&&t.isConnected)}};function Dm(i){return!cr()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Po:So}var Jt=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 ti(this.x)&&ti(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 Pm(i,n){let t=i.options.ticks,e=Sm(i),r=Math.min(t.maxTicksLimit||e,e),a=t.major.enabled?Om(n):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>r)return Am(n,l,a,o/r),l;let d=Im(a,n,r);if(o>0){let u,h,f=o>1?Math.round((c-s)/(o-1)):null;for(hr(n,l,d,j(f)?0:s-f,s),u=0,h=o-1;u<h;u++)hr(n,l,d,a[u],a[u+1]);return hr(n,l,d,c,j(f)?n.length:c+f),l}return hr(n,l,d),l}function Sm(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 Im(i,n,t){let e=Rm(i),r=n.length/t;if(!e)return Math.max(r,1);let a=Dc(e);for(let o=0,s=a.length-1;o<s;o++){let c=a[o];if(c>r)return c}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 Am(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 hr(i,n,t,e,r){let a=W(e,0),o=Math.min(W(r,i.length),i.length),s=0,c,l,d;for(t=Math.ceil(t),r&&(c=r-e,t=c/Math.floor(c/t)),d=a;d<0;)s++,d=Math.round(a+s*t);for(l=Math.max(a,0);l<o;l++)l===d&&(n.push(i[l]),s++,d=Math.round(a+s*t))}function Rm(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 Em=i=>i==="left"?"right":i==="right"?"left":i,fl=(i,n,t)=>n==="top"||n==="left"?i[n]+t:i[n]-t,ml=(i,n)=>Math.min(n||i,i);function pl(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 Lm(i,n,t){let e=i.ticks.length,r=Math.min(n,e-1),a=i._startPixel,o=i._endPixel,s=1e-6,c=i.getPixelForTick(r),l;if(!(t&&(e===1?l=Math.max(c-a,o-c):n===0?l=(i.getPixelForTick(1)-c)/2:l=(c-i.getPixelForTick(r-1))/2,c+=r<n?l:-l,c<a-s||c>o+s)))return c}function Fm(i,n){X(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 fn(i){return i.drawTicks?i.tickLength:0}function gl(i,n){if(!i.display)return 0;let t=mt(i.font,n),e=Tt(i.padding);return(it(i.text)?i.text.length:1)*t.lineHeight+e.height}function zm(i,n){return we(i,{scale:n,type:"scale"})}function Bm(i,n,t){return we(i,{tick:t,index:n,type:"tick"})}function Nm(i,n,t){let e=nr(i);return(t&&n!=="right"||!t&&n==="right")&&(e=Em(e)),e}function Wm(i,n,t,e){let{top:r,left:a,bottom:o,right:s,chart:c}=i,{chartArea:l,scales:d}=c,u=0,h,f,m,p=o-r,g=s-a;if(i.isHorizontal()){if(f=Ct(e,a,s),U(t)){let b=Object.keys(t)[0],_=t[b];m=d[b].getPixelForValue(_)+p-n}else t==="center"?m=(l.bottom+l.top)/2+p-n:m=fl(i,t,n);h=s-a}else{if(U(t)){let b=Object.keys(t)[0],_=t[b];f=d[b].getPixelForValue(_)-g+n}else t==="center"?f=(l.left+l.right)/2-g+n:f=fl(i,t,n);m=Ct(e,o,r),u=t==="left"?-ft:ft}return{titleX:f,titleY:m,maxWidth:h,rotation:u}}var ri=class i extends Jt{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=Rt(n,Number.POSITIVE_INFINITY),t=Rt(t,Number.NEGATIVE_INFINITY),e=Rt(e,Number.POSITIVE_INFINITY),r=Rt(r,Number.NEGATIVE_INFINITY),{min:Rt(n,e),max:Rt(t,r),minDefined:ut(n),maxDefined:ut(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 c=0,l=s.length;c<l;++c)o=s[c].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:Rt(t,Rt(e,t)),max:Rt(e,Rt(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(){tt(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=Wc(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let c=s<this.ticks.length;this._convertTicksToLabels(c?pl(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Pm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&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(){tt(this.options.afterUpdate,[this])}beforeSetDimensions(){tt(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(){tt(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),tt(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){tt(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=tt(t.callback,[a.value,e,n],this)}afterTickToLabelConversion(){tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let n=this.options,t=n.ticks,e=ml(this.ticks.length,n.ticks.maxTicksLimit),r=t.minRotation||0,a=t.maxRotation,o=r,s,c,l;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=bt(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)),c=this.maxHeight-fn(n.grid)-t.padding-gl(n.title,this.chart.options.font),l=Math.sqrt(u*u+h*h),o=er(Math.min(Math.asin(bt((d.highest.height+6)/s,-1,1)),Math.asin(bt(c/l,-1,1))-Math.asin(bt(h/l,-1,1)))),o=Math.max(r,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){tt(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 c=gl(r,t.options.font);if(s?(n.width=this.maxWidth,n.height=fn(a)+c):(n.height=this.maxHeight,n.width=fn(a)+c),e.display&&this.ticks.length){let{first:l,last:d,widest:u,highest:h}=this._getLabelSizes(),f=e.padding*2,m=jt(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(l,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,c=this.labelRotation!==0,l=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;c?l?(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(){tt(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++)j(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=pl(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=[],c=Math.floor(t/ml(t,e)),l=0,d=0,u,h,f,m,p,g,b,_,k,C,v;for(u=0;u<t;u+=c){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,!j(m)&&!it(m))k=an(r,b.data,b.gc,k,m),C=_;else if(it(m))for(h=0,f=m.length;h<f;++h)v=m[h],!j(v)&&!it(v)&&(k=an(r,b.data,b.gc,k,v),C+=_);o.push(k),s.push(C),l=Math.max(k,l),d=Math.max(C,d)}Fm(a,t);let x=o.indexOf(l),P=s.indexOf(d),D=S=>({width:o[S]||0,height:s[S]||0});return{first:D(0),last:D(t-1),widest:D(x),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 Sc(this._alignToPixels?Ne(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=Bm(this.getContext(),n,e))}return this.$context||(this.$context=zm(this.chart.getContext(),this))}_tickSize(){let n=this.options.ticks,t=jt(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,c=a?a.highest.height+o:0;return this.isHorizontal()?c*e>s*r?s/e:c/r:c*r<s*e?c/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,c=a.offset,l=this.isHorizontal(),u=this.ticks.length+(c?1:0),h=fn(a),f=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,b=function(Y){return Ne(e,Y,p)},_,k,C,v,x,P,D,S,F,B,V,ct;if(o==="top")_=b(this.bottom),P=this.bottom-h,S=_-g,B=b(n.top)+g,ct=n.bottom;else if(o==="bottom")_=b(this.top),B=n.top,ct=b(n.bottom)-g,P=_+g,S=this.top+h;else if(o==="left")_=b(this.right),x=this.right-h,D=_-g,F=b(n.left)+g,V=n.right;else if(o==="right")_=b(this.left),F=n.left,V=b(n.right)-g,x=_+g,D=this.left+h;else if(t==="x"){if(o==="center")_=b((n.top+n.bottom)/2+.5);else if(U(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}B=n.top,ct=n.bottom,P=_+g,S=P+h}else if(t==="y"){if(o==="center")_=b((n.left+n.right)/2);else if(U(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}x=_-g,D=x-h,F=n.left,V=n.right}let xt=W(r.ticks.maxTicksLimit,u),N=Math.max(1,Math.ceil(u/xt));for(k=0;k<u;k+=N){let Y=this.getContext(k),K=a.setContext(Y),Ft=s.setContext(Y),pt=K.lineWidth,De=K.color,Pe=Ft.dash||[],Bt=Ft.dashOffset,Se=K.tickWidth,Nt=K.tickColor,Ie=K.tickBorderDash||[],te=K.tickBorderDashOffset;C=Lm(this,k,c),C!==void 0&&(v=Ne(e,C,pt),l?x=D=F=V=v:P=S=B=ct=v,f.push({tx1:x,ty1:P,tx2:D,ty2:S,x1:F,y1:B,x2:V,y2:ct,width:pt,color:De,borderDash:Pe,borderDashOffset:Bt,tickWidth:Se,tickColor:Nt,tickBorderDash:Ie,tickBorderDashOffset:te}))}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:c,crossAlign:l,padding:d,mirror:u}=a,h=fn(e.grid),f=h+d,m=u?-d:f,p=-jt(this.labelRotation),g=[],b,_,k,C,v,x,P,D,S,F,B,V,ct="middle";if(r==="top")x=this.bottom-m,P=this._getXAxisLabelAlignment();else if(r==="bottom")x=this.top+m,P=this._getXAxisLabelAlignment();else if(r==="left"){let N=this._getYAxisLabelAlignment(h);P=N.textAlign,v=N.x}else if(r==="right"){let N=this._getYAxisLabelAlignment(h);P=N.textAlign,v=N.x}else if(t==="x"){if(r==="center")x=(n.top+n.bottom)/2+f;else if(U(r)){let N=Object.keys(r)[0],Y=r[N];x=this.chart.scales[N].getPixelForValue(Y)+f}P=this._getXAxisLabelAlignment()}else if(t==="y"){if(r==="center")v=(n.left+n.right)/2-f;else if(U(r)){let N=Object.keys(r)[0],Y=r[N];v=this.chart.scales[N].getPixelForValue(Y)}P=this._getYAxisLabelAlignment(h).textAlign}t==="y"&&(c==="start"?ct="top":c==="end"&&(ct="bottom"));let xt=this._getLabelSizes();for(b=0,_=s.length;b<_;++b){k=s[b],C=k.label;let N=a.setContext(this.getContext(b));D=this.getPixelForTick(b)+a.labelOffset,S=this._resolveTickFontOptions(b),F=S.lineHeight,B=it(C)?C.length:1;let Y=B/2,K=N.color,Ft=N.textStrokeColor,pt=N.textStrokeWidth,De=P;o?(v=D,P==="inner"&&(b===_-1?De=this.options.reverse?"left":"right":b===0?De=this.options.reverse?"right":"left":De="center"),r==="top"?l==="near"||p!==0?V=-B*F+F/2:l==="center"?V=-xt.highest.height/2-Y*F+F:V=-xt.highest.height+F/2:l==="near"||p!==0?V=F/2:l==="center"?V=xt.highest.height/2-Y*F:V=xt.highest.height-B*F,u&&(V*=-1),p!==0&&!N.showLabelBackdrop&&(v+=F/2*Math.sin(p))):(x=D,V=(1-B)*F/2);let Pe;if(N.showLabelBackdrop){let Bt=Tt(N.backdropPadding),Se=xt.heights[b],Nt=xt.widths[b],Ie=V-Bt.top,te=0-Bt.left;switch(ct){case"middle":Ie-=Se/2;break;case"bottom":Ie-=Se;break}switch(P){case"center":te-=Nt/2;break;case"right":te-=Nt;break;case"inner":b===_-1?te-=Nt:b>0&&(te-=Nt/2);break}Pe={left:te,top:Ie,width:Nt+Bt.width,height:Se+Bt.height,color:N.backdropColor}}g.push({label:C,font:S,textOffset:V,options:{rotation:p,color:K,strokeColor:Ft,strokeWidth:pt,textAlign:De,textBaseline:ct,translation:[v,x],backdrop:Pe}})}return g}_getXAxisLabelAlignment(){let{position:n,ticks:t}=this.options;if(-jt(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,c=o.widest.width,l,d;return t==="left"?r?(d=this.right+a,e==="near"?l="left":e==="center"?(l="center",d+=c/2):(l="right",d+=c)):(d=this.right-s,e==="near"?l="right":e==="center"?(l="center",d-=c/2):(l="left",d=this.left)):t==="right"?r?(d=this.left+a,e==="near"?l="right":e==="center"?(l="center",d-=c/2):(l="left",d-=c)):(d=this.left+s,e==="near"?l="left":e==="center"?(l="center",d+=c/2):(l="right",d=this.right)):l="right",{textAlign:l,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=(c,l,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(c.x,c.y),e.lineTo(l.x,l.y),e.stroke(),e.restore())};if(t.display)for(a=0,o=r.length;a<o;++a){let c=r[a];t.drawOnChartArea&&s({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),t.drawTicks&&s({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.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,c=this._borderValue,l,d,u,h;this.isHorizontal()?(l=Ne(n,this.left,o)-o/2,d=Ne(n,this.right,s)+s/2,u=h=c):(u=Ne(n,this.top,o)-o/2,h=Ne(n,this.bottom,s)+s/2,l=d=c),t.save(),t.lineWidth=a.width,t.strokeStyle=a.color,t.beginPath(),t.moveTo(l,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&&cn(e,r);let a=this.getLabelItems(n);for(let o of a){let s=o.options,c=o.font,l=o.label,d=o.textOffset;We(e,l,0,d,c,s)}r&&ln(e)}drawTitle(){let{ctx:n,options:{position:t,title:e,reverse:r}}=this;if(!e.display)return;let a=mt(e.font),o=Tt(e.padding),s=e.align,c=a.lineHeight/2;t==="bottom"||t==="center"||U(t)?(c+=o.bottom,it(e.text)&&(c+=a.lineHeight*(e.text.length-1))):c+=o.top;let{titleX:l,titleY:d,maxWidth:u,rotation:h}=Wm(this,c,t,s);We(n,e.text,0,0,a,{color:e.color,maxWidth:u,rotation:h,textAlign:Nm(s,t,r),textBaseline:"middle",translation:[l,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=W(n.grid&&n.grid.z,-1),r=W(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 mt(t.font)}_maxDigits(){let n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}},Ei=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;Ym(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,Vm(n,o,e),this.override&&st.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 st[r]&&(delete st[r][e],this.override&&delete Be[e])}};function Vm(i,n,t){let e=Ci(Object.create(null),[t?st.get(t):{},st.get(n),i.defaults]);st.set(n,e),i.defaultRoutes&&Hm(n,i.defaultRoutes),i.descriptors&&st.describe(n,i.descriptors)}function Hm(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(),c=o.join(".");st.route(a,r,c,s)})}function Ym(i){return"id"in i&&"defaults"in i}var Io=class{constructor(){this.controllers=new Ei(je,"datasets",!0),this.elements=new Ei(Jt,"elements"),this.plugins=new Ei(Object,"plugins"),this.scales=new Ei(ri,"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):X(r,o=>{let s=e||this._getRegistryForType(o);this._exec(n,s,o)})})}_exec(n,t,e){let r=tr(n);tt(e["before"+r],[],e),t[n](e),tt(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}},ce=new Io,Oo=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],c=[t,r,a.options];if(tt(s,c,o)===!1&&r.cancelable)return!1}return!0}invalidate(){j(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=W(e.options&&e.options.plugins,{}),a=jm(e);return r===!1&&!t?[]:qm(n,a,r,t)}_notifyStateChanges(n){let t=this._oldCache||[],e=this._cache,r=(a,o)=>a.filter(s=>!o.some(c=>s.plugin.id===c.plugin.id));this._notify(r(t,e),n,"stop"),this._notify(r(e,t),n,"start")}};function jm(i){let n={},t=[],e=Object.keys(ce.plugins.items);for(let a=0;a<e.length;a++)t.push(ce.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 Um(i,n){return!n&&i===!1?null:i===!0?{}:i}function qm(i,{plugins:n,localIds:t},e,r){let a=[],o=i.getContext();for(let s of n){let c=s.id,l=Um(e[c],r);l!==null&&a.push({plugin:s,options:$m(i.config,{plugin:s,local:t[c]},l,o)})}return a}function $m(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 Ao(i,n){let t=st.datasets[i]||{};return((n.datasets||{})[i]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function Gm(i,n){let t=i;return i==="_index_"?t=n:i==="_value_"&&(t=n==="x"?"y":"x"),t}function Qm(i,n){return i===n?"_index_":"_value_"}function bl(i){if(i==="x"||i==="y"||i==="r")return i}function Xm(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Ro(i,...n){if(bl(i))return i;for(let t of n){let e=t.axis||Xm(t.position)||i.length>1&&bl(i[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function _l(i,n,t){if(t[n+"AxisID"]===i)return{axis:n}}function Km(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 _l(i,"x",t[0])||_l(i,"y",t[0])}return{}}function Zm(i,n){let t=Be[i.type]||{scales:{}},e=n.scales||{},r=Ao(i.type,n),a=Object.create(null);return Object.keys(e).forEach(o=>{let s=e[o];if(!U(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 c=Ro(o,s,Km(o,i),st.scales[s.type]),l=Qm(c,r),d=t.scales||{};a[o]=Mi(Object.create(null),[{axis:c},s,d[c],d[l]])}),i.data.datasets.forEach(o=>{let s=o.type||i.type,c=o.indexAxis||Ao(s,n),d=(Be[s]||{}).scales||{};Object.keys(d).forEach(u=>{let h=Gm(u,c),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,[st.scales[s.type],st.scale])}),a}function ad(i){let n=i.options||(i.options={});n.plugins=W(n.plugins,{}),n.scales=Zm(i,n)}function od(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Jm(i){return i=i||{},i.data=od(i.data),ad(i),i}var vl=new Map,sd=new Set;function fr(i,n){let t=vl.get(i);return t||(t=n(),vl.set(i,t),sd.add(t)),t}var mn=(i,n,t)=>{let e=ke(n,t);e!==void 0&&i.add(e)},Eo=class{constructor(n){this._config=Jm(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=od(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(),ad(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return fr(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return fr(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return fr(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){let t=n.id,e=this.type;return fr(`${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 c=new Set;t.forEach(d=>{n&&(c.add(n),d.forEach(u=>mn(c,n,u))),d.forEach(u=>mn(c,r,u)),d.forEach(u=>mn(c,Be[a]||{},u)),d.forEach(u=>mn(c,st,u)),d.forEach(u=>mn(c,rr,u))});let l=Array.from(c);return l.length===0&&l.push(Object.create(null)),sd.has(t)&&o.set(t,l),l}chartOptionScopes(){let{options:n,type:t}=this;return[n,Be[t]||{},st.datasets[t]||{},{type:t},st,rr]}resolveNamedOptions(n,t,e,r=[""]){let a={$shared:!0},{resolver:o,subPrefixes:s}=yl(this._resolverCache,n,r),c=o;if(ep(o,t)){a.$shared=!1,e=ye(e)?e():e;let l=this.createResolver(n,e,s);c=Je(o,e,l)}for(let l of t)a[l]=c[l];return a}createResolver(n,t,e=[""],r){let{resolver:a}=yl(this._resolverCache,n,e);return U(t)?Je(a,t,void 0,r):a}};function yl(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:sr(n,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},e.set(r,a)),a}var tp=i=>U(i)&&Object.getOwnPropertyNames(i).some(n=>ye(i[n]));function ep(i,n){let{isScriptable:t,isIndexable:e}=io(i);for(let r of n){let a=t(r),o=e(r),s=(o||a)&&i[r];if(a&&(ye(s)||tp(s))||o&&it(s))return!0}return!1}var ip="4.5.1",np=["top","bottom","left","right","chartArea"];function xl(i,n){return i==="top"||i==="bottom"||np.indexOf(i)===-1&&n==="x"}function kl(i,n){return function(t,e){return t[i]===e[i]?t[n]-e[n]:t[i]-e[i]}}function wl(i){let n=i.chart,t=n.options.animation;n.notifyPlugins("afterRender"),tt(t&&t.onComplete,[i],n)}function rp(i){let n=i.chart,t=n.options.animation;tt(t&&t.onProgress,[i],n)}function cd(i){return cr()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var _r={},Cl=i=>{let n=cd(i);return Object.values(_r).filter(t=>t.canvas===n).pop()};function ap(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 op(i,n,t,e){return!t||i.type==="mouseout"?null:e?n:i}var sp=(()=>{class i{static defaults=st;static instances=_r;static overrides=Be;static registry=ce;static version=ip;static getChart=Cl;static register(...t){ce.add(...t),Tl()}static unregister(...t){ce.remove(...t),Tl()}constructor(t,e){let r=this.config=new Eo(e),a=cd(t),o=Cl(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||Dm(a)),this.platform.updateConfig(r);let c=this.platform.acquireContext(a,s.aspectRatio),l=c&&c.canvas,d=l&&l.height,u=l&&l.width;if(this.id=wc(),this.ctx=c,this.canvas=l,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 Oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ec(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],_r[this.id]=this,!c||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ce.listen(this,"complete",wl),Ce.listen(this,"progress",rp),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:a,_aspectRatio:o}=this;return j(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 ce}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oo(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ja(this.canvas,this.ctx),this}stop(){return Ce.stop(this),this}resize(t,e){Ce.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),c=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,oo(this,c,!0)&&(this.notifyPlugins("resize",{size:s}),tt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};X(e,(r,a)=>{r.id=a})}buildOrUpdateScales(){let t=this.options,e=t.scales,r=this.scales,a=Object.keys(r).reduce((s,c)=>(s[c]=!1,s),{}),o=[];e&&(o=o.concat(Object.keys(e).map(s=>{let c=e[s],l=Ro(s,c),d=l==="r",u=l==="x";return{options:c,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),X(o,s=>{let c=s.options,l=c.id,d=Ro(l,c),u=W(c.type,s.dtype);(c.position===void 0||xl(c.position,d)!==xl(s.dposition))&&(c.position=s.dposition),a[l]=!0;let h=null;if(l in r&&r[l].type===u)h=r[l];else{let f=ce.getScale(u);h=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(c,t)}),X(a,(s,c)=>{s||delete r[c]}),X(r,s=>{St.configure(this,s,s.options),St.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(kl("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),c=o.type||this.config.type;if(s.type&&s.type!==c&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=c,s.indexAxis=o.indexAxis||Ao(c,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 l=ce.getController(c),{datasetElementType:d,dataElementType:u}=st.datasets[c];Object.assign(l,{dataElementType:ce.getElement(u),datasetElementType:d&&ce.getElement(d)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){X(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||X(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(kl("z","_idx"));let{_active:c,_lastEvent:l}=this;l?this._eventHandler(l,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){X(this.scales,t=>{St.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Wa(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;ap(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,c)=>c+","+s.splice(1).join(","))),a=r(0);for(let o=1;o<e;o++)if(!Wa(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;St.update(this,this.width,this.height,t);let e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],X(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,ye(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&&(Ce.has(this)?this.attached&&!Ce.running(this)&&Ce.start(this):(this.draw(),wl({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=fo(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&cn(e,a),t.controller.draw(),a&&ln(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return re(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,a){let o=cm.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=we(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);Di(e)?(o.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(c=>c.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(),Ce.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(),Ja(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete _r[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,c)=>{o.offsetX=s,o.offsetY=c,this._eventHandler(o)};X(this.options.events,o=>r(o,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,r=(l,d)=>{e.addEventListener(this,l,d),t[l]=d},a=(l,d)=>{t[l]&&(e.removeEventListener(this,l,d),delete t[l])},o=(l,d)=>{this.canvas&&this.resize(l,d)},s,c=()=>{a("attach",c),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",c)},e.isAttached(this.canvas)?c():s()}unbindEvents(){X(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},X(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,c,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+a+"DatasetHoverStyle"]()),c=0,l=t.length;c<l;++c){s=t[c];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 c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:c.data[s],index:s}});!on(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=(l,d)=>l.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),s=o(e,t),c=r?t:o(t,e);s.length&&this.updateHoverStyle(s,a.mode,!1),c.length&&a.mode&&this.updateHoverStyle(c,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,c=this._getActiveElements(t,a,r,s),l=Mc(t),d=op(t,this._lastEvent,r,l);r&&(this._lastEvent=null,tt(o.onHover,[t,c,this],this),l&&tt(o.onClick,[t,c,this],this));let u=!on(c,a);return(u||e)&&(this._active=c,this._updateHoverStyles(c,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 Tl(){return X(sp.instances,i=>i._plugins.invalidate())}function cp(i,n,t){let{startAngle:e,x:r,y:a,outerRadius:o,innerRadius:s,options:c}=n,{borderWidth:l,borderJoinStyle:d}=c,u=Math.min(l/o,wt(e-t));if(i.beginPath(),i.arc(r,a,o-l/2,e+u/2,t-u/2),s>0){let h=Math.min(l/s,wt(e-t));i.arc(r,a,s+l/2,t-h/2,e+h/2,!0)}else{let h=Math.min(l/2,o*wt(e-t));if(d==="round")i.arc(r,a,h,t-G/2,e+G/2,!0);else if(d==="bevel"){let f=2*h*h,m=-f*Math.cos(t+G/2)+r,p=-f*Math.sin(t+G/2)+a,g=f*Math.cos(e+G/2)+r,b=f*Math.sin(e+G/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 lp(i,n,t){let{startAngle:e,pixelMargin:r,x:a,y:o,outerRadius:s,innerRadius:c}=n,l=r/s;i.beginPath(),i.arc(a,o,s,e-l,t+l),c>r?(l=r/c,i.arc(a,o,c,t+l,e-l,!0)):i.arc(a,o,r,t+ft,e-ft),i.closePath(),i.clip()}function dp(i){return or(i,["outerStart","outerEnd","innerStart","innerEnd"])}function up(i,n,t,e){let r=dp(i.options.borderRadius),a=(t-n)/2,o=Math.min(a,e*n/2),s=c=>{let l=(t-Math.min(a,c))*e/2;return bt(c,0,Math.min(a,l))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:bt(r.innerStart,0,o),innerEnd:bt(r.innerEnd,0,o)}}function Ri(i,n,t,e){return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function kr(i,n,t,e,r,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:d}=n,u=Math.max(n.outerRadius+e+t-l,0),h=d>0?d+e+t+l:0,f=0,m=r-c;if(e){let N=d>0?d-e:0,Y=u>0?u-e:0,K=(N+Y)/2,Ft=K!==0?m*K/(K+e):m;f=(m-Ft)/2}let p=Math.max(.001,m*u-t/G)/u,g=(m-p)/2,b=c+g+f,_=r-g-f,{outerStart:k,outerEnd:C,innerStart:v,innerEnd:x}=up(n,h,u,_-b),P=u-k,D=u-C,S=b+k/P,F=_-C/D,B=h+v,V=h+x,ct=b+v/B,xt=_-x/V;if(i.beginPath(),a){let N=(S+F)/2;if(i.arc(o,s,u,S,N),i.arc(o,s,u,N,F),C>0){let pt=Ri(D,F,o,s);i.arc(pt.x,pt.y,C,F,_+ft)}let Y=Ri(V,_,o,s);if(i.lineTo(Y.x,Y.y),x>0){let pt=Ri(V,xt,o,s);i.arc(pt.x,pt.y,x,_+ft,xt+Math.PI)}let K=(_-x/h+(b+v/h))/2;if(i.arc(o,s,h,_-x/h,K,!0),i.arc(o,s,h,K,b+v/h,!0),v>0){let pt=Ri(B,ct,o,s);i.arc(pt.x,pt.y,v,ct+Math.PI,b-ft)}let Ft=Ri(P,b,o,s);if(i.lineTo(Ft.x,Ft.y),k>0){let pt=Ri(P,S,o,s);i.arc(pt.x,pt.y,k,b-ft,S)}}else{i.moveTo(o,s);let N=Math.cos(S)*u+o,Y=Math.sin(S)*u+s;i.lineTo(N,Y);let K=Math.cos(F)*u+o,Ft=Math.sin(F)*u+s;i.lineTo(K,Ft)}i.closePath()}function hp(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s}=n,c=n.endAngle;if(a){kr(i,n,t,e,c,r);for(let l=0;l<a;++l)i.fill();isNaN(s)||(c=o+(s%nt||nt))}return kr(i,n,t,e,c,r),i.fill(),c}function fp(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s,options:c}=n,{borderWidth:l,borderJoinStyle:d,borderDash:u,borderDashOffset:h,borderRadius:f}=c,m=c.borderAlign==="inner";if(!l)return;i.setLineDash(u||[]),i.lineDashOffset=h,m?(i.lineWidth=l*2,i.lineJoin=d||"round"):(i.lineWidth=l,i.lineJoin=d||"bevel");let p=n.endAngle;if(a){kr(i,n,t,e,p,r);for(let g=0;g<a;++g)i.stroke();isNaN(s)||(p=o+(s%nt||nt))}m&&lp(i,n,p),c.selfJoin&&p-o>=G&&f===0&&d!=="miter"&&cp(i,n,p),a||(kr(i,n,t,e,p,r),i.stroke())}var Lo=class extends Jt{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}=ja(r,{x:n,y:t}),{startAngle:s,endAngle:c,innerRadius:l,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e),h=(this.options.spacing+this.options.borderWidth)/2,f=W(u,c-s),m=Si(a,s,c)&&s!==c,p=f>=nt||m,g=oe(o,l+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:c,spacing:l}=this.options,d=(r+a)/2,u=(o+s+l+c)/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>nt?Math.floor(e/nt):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 c=1-Math.sin(Math.min(G,e||0)),l=r*c;n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,hp(n,this,l,a,o),fp(n,this,l,a,o),n.restore()}};function ld(i,n,t=n){i.lineCap=W(t.borderCapStyle,n.borderCapStyle),i.setLineDash(W(t.borderDash,n.borderDash)),i.lineDashOffset=W(t.borderDashOffset,n.borderDashOffset),i.lineJoin=W(t.borderJoinStyle,n.borderJoinStyle),i.lineWidth=W(t.borderWidth,n.borderWidth),i.strokeStyle=W(t.borderColor,n.borderColor)}function mp(i,n,t){i.lineTo(t.x,t.y)}function pp(i){return i.stepped?Bc:i.tension||i.cubicInterpolationMode==="monotone"?Nc:mp}function dd(i,n,t={}){let e=i.length,{start:r=0,end:a=e-1}=t,{start:o,end:s}=n,c=Math.max(r,o),l=Math.min(a,s),d=r<o&&a<o||r>s&&a>s;return{count:e,start:c,loop:n.loop,ilen:l<c&&!d?e+l-c:l-c}}function gp(i,n,t,e){let{points:r,options:a}=n,{count:o,start:s,loop:c,ilen:l}=dd(r,t,e),d=pp(a),{move:u=!0,reverse:h}=e||{},f,m,p;for(f=0;f<=l;++f)m=r[(s+(h?l-f:f))%o],!m.skip&&(u?(i.moveTo(m.x,m.y),u=!1):d(i,p,m,h,a.stepped),p=m);return c&&(m=r[(s+(h?l:0))%o],d(i,p,m,h,a.stepped)),!!c}function bp(i,n,t,e){let r=n.points,{count:a,start:o,ilen:s}=dd(r,t,e),{move:c=!0,reverse:l}=e||{},d=0,u=0,h,f,m,p,g,b,_=C=>(o+(l?s-C:C))%a,k=()=>{p!==g&&(i.lineTo(d,g),i.lineTo(d,p),i.lineTo(d,b))};for(c&&(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,x=C|0;x===m?(v<p?p=v:v>g&&(g=v),d=(u*d+C)/++u):(k(),i.lineTo(C,v),m=x,u=0,p=g=v),b=v}k()}function Fo(i){let n=i.options,t=n.borderDash&&n.borderDash.length;return!i._decimated&&!i._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?bp:gp}function _p(i){return i.stepped?Gc:i.tension||i.cubicInterpolationMode==="monotone"?Qc:Fe}function vp(i,n,t,e){let r=n._path;r||(r=n._path=new Path2D,n.path(r,t,e)&&r.closePath()),ld(i,n.options),i.stroke(r)}function yp(i,n,t,e){let{segments:r,options:a}=n,o=Fo(n);for(let s of r)ld(i,a,s.style),i.beginPath(),o(i,n,s,{start:t,end:t+e-1})&&i.closePath(),i.stroke()}var xp=typeof Path2D=="function";function kp(i,n,t,e){xp&&!n.options.segment?vp(i,n,t,e):yp(i,n,t,e)}var Tr=(()=>{class i extends Jt{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;Uc(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=Kc(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=ho(this,{property:e,start:a,end:a});if(!s.length)return;let c=[],l=_p(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){c.push(m);continue}let g=Math.abs((a-m[e])/(p[e]-m[e])),b=l(m,p,g,r.stepped);b[e]=t[e],c.push(b)}return c.length===1?c[0]:c}pathSegment(t,e,r){return Fo(this)(t,this,e,r)}path(t,e,r){let a=this.segments,o=Fo(this),s=this._loop;e=e||0,r=r||this.points.length-e;for(let c of a)s&=o(t,this,c,{start:e,end:e+r-1});return!!s}draw(t,e,r,a){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),kp(t,this,r,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return i})();function Ml(i,n,t,e){let r=i.options,{[t]:a}=i.getProps([t],e);return Math.abs(n-a)<r.radius+r.hitRadius}var wp=(()=>{class i extends Jt{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 Ml(this,t,"x",e)}inYRange(t,e){return Ml(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||!re(this,e,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,ar(t,r,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return i})();function ud(i,n){let{x:t,y:e,base:r,width:a,height:o}=i.getProps(["x","y","base","width","height"],n),s,c,l,d,u;return i.horizontal?(u=o/2,s=Math.min(t,r),c=Math.max(t,r),l=e-u,d=e+u):(u=a/2,s=t-u,c=t+u,l=Math.min(e,r),d=Math.max(e,r)),{left:s,top:l,right:c,bottom:d}}function Ye(i,n,t,e){return i?0:bt(n,t,e)}function Cp(i,n,t){let e=i.options.borderWidth,r=i.borderSkipped,a=eo(e);return{t:Ye(r.top,a.top,0,t),r:Ye(r.right,a.right,0,n),b:Ye(r.bottom,a.bottom,0,t),l:Ye(r.left,a.left,0,n)}}function Tp(i,n,t){let{enableBorderRadius:e}=i.getProps(["enableBorderRadius"]),r=i.options.borderRadius,a=Ve(r),o=Math.min(n,t),s=i.borderSkipped,c=e||U(r);return{topLeft:Ye(!c||s.top||s.left,a.topLeft,0,o),topRight:Ye(!c||s.top||s.right,a.topRight,0,o),bottomLeft:Ye(!c||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Ye(!c||s.bottom||s.right,a.bottomRight,0,o)}}function Mp(i){let n=ud(i),t=n.right-n.left,e=n.bottom-n.top,r=Cp(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 xo(i,n,t,e){let r=n===null,a=t===null,s=i&&!(r&&a)&&ud(i,e);return s&&(r||oe(n,s.left,s.right))&&(a||oe(t,s.top,s.bottom))}function Dp(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Pp(i,n){i.rect(n.x,n.y,n.w,n.h)}function ko(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 zo=class extends Jt{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}=Mp(this),s=Dp(o.radius)?Oi:Pp;n.save(),(o.w!==a.w||o.h!==a.h)&&(n.beginPath(),s(n,ko(o,t,a)),n.clip(),s(n,ko(a,-t,o)),n.fillStyle=e,n.fill("evenodd")),n.beginPath(),s(n,ko(a,t)),n.fillStyle=r,n.fill(),n.restore()}inRange(n,t,e){return xo(this,n,t,e)}inXRange(n,t){return xo(this,n,null,t)}inYRange(n,t){return xo(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}},Sp=Object.freeze({__proto__:null,ArcElement:Lo,BarElement:zo,LineElement:Tr,PointElement:wp}),Bo=["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)"],Dl=Bo.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function hd(i){return Bo[i%Bo.length]}function fd(i){return Dl[i%Dl.length]}function Ip(i,n){return i.borderColor=hd(n),i.backgroundColor=fd(n),++n}function Op(i,n){return i.backgroundColor=i.data.map(()=>hd(n++)),n}function Ap(i,n){return i.backgroundColor=i.data.map(()=>fd(n++)),n}function Rp(i){let n=0;return(t,e)=>{let r=i.getDatasetMeta(e).controller;r instanceof qo?n=Op(t,n):r instanceof td?n=Ap(t,n):r&&(n=Ip(t,n))}}function Pl(i){let n;for(n in i)if(i[n].borderColor||i[n].backgroundColor)return!0;return!1}function Ep(i){return i&&(i.borderColor||i.backgroundColor)}function Lp(){return st.borderColor!=="rgba(0,0,0,0.1)"||st.backgroundColor!=="rgba(0,0,0,0.1)"}var Fp={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=Pl(e)||Ep(r)||a&&Pl(a)||Lp();if(!t.forceOverride&&o)return;let s=Rp(i);e.forEach(s)}};function zp(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),c=0,l=n+t-1,d=n,u,h,f,m,p;for(o[c++]=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 x=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,_=x;_<P;_++)m=.5*Math.abs((D-g)*(i[_].y-S)-(D-i[_].x)*(b-S)),m>f&&(f=m,h=i[_],p=_);o[c++]=h,d=p}return o[c++]=i[l],o}function Bp(i,n,t,e){let r=0,a=0,o,s,c,l,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],c=(s.x-_)/C*e,l=s.y;let v=c|0;if(v===d)l<m?(m=l,u=o):l>p&&(p=l,h=o),r=(a*r+s.x)/++a;else{let x=o-1;if(!j(u)&&!j(h)){let P=Math.min(u,h),D=Math.max(u,h);P!==f&&P!==x&&g.push(Vt(vt({},i[P]),{x:r})),D!==f&&D!==x&&g.push(Vt(vt({},i[D]),{x:r}))}o>0&&x!==f&&g.push(i[x]),g.push(s),d=v,a=0,m=p=l,u=h=f=o}}return g}function md(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 Sl(i){i.data.datasets.forEach(n=>{md(n)})}function Np(i,n){let t=n.length,e=0,r,{iScale:a}=i,{min:o,max:s,minDefined:c,maxDefined:l}=a.getUserBounds();return c&&(e=bt(ne(n,a.axis,o).lo,0,t-1)),l?r=bt(ne(n,a.axis,s).hi+1,e,t)-e:r=t-e,{start:e,count:r}}var Wp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,n,t)=>{if(!t.enabled){Sl(i);return}let e=i.width;i.data.datasets.forEach((r,a)=>{let{_data:o,indexAxis:s}=r,c=i.getDatasetMeta(a),l=o||r.data;if(Ai([s,i.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;let d=i.scales[c.xAxisID];if(d.type!=="linear"&&d.type!=="time"||i.options.parsing)return;let{start:u,count:h}=Np(c,l),f=t.threshold||4*e;if(h<=f){md(r);return}j(o)&&(r._data=l,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=zp(l,u,h,e,t);break;case"min-max":m=Bp(l,u,h,e);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=m})},destroy(i){Sl(i)}};function Vp(i,n,t){let e=i.segments,r=i.points,a=n.points,o=[];for(let s of e){let{start:c,end:l}=s;l=Mr(c,l,r);let d=No(t,r[c],r[l],s.loop);if(!n.segments){o.push({source:s,target:d,start:r[c],end:r[l]});continue}let u=ho(n,d);for(let h of u){let f=No(t,a[h.start],a[h.end],h.loop),m=uo(s,r,f);for(let p of m)o.push({source:p,target:h,start:{[t]:Il(d,f,"start",Math.max)},end:{[t]:Il(d,f,"end",Math.min)}})}}return o}function No(i,n,t,e){if(e)return;let r=n[i],a=t[i];return i==="angle"&&(r=wt(r),a=wt(a)),{property:i,start:r,end:a}}function Hp(i,n){let{x:t=null,y:e=null}=i||{},r=n.points,a=[];return n.segments.forEach(({start:o,end:s})=>{s=Mr(o,s,r);let c=r[o],l=r[s];e!==null?(a.push({x:c.x,y:e}),a.push({x:l.x,y:e})):t!==null&&(a.push({x:t,y:c.y}),a.push({x:t,y:l.y}))}),a}function Mr(i,n,t){for(;n>i;n--){let e=t[n];if(!isNaN(e.x)&&!isNaN(e.y))break}return n}function Il(i,n,t,e){return i&&n?e(i[t],n[t]):i?i[t]:n?n[t]:0}function pd(i,n){let t=[],e=!1;return it(i)?(e=!0,t=i):t=Hp(i,n),t.length?new Tr({points:t,options:{tension:0},_loop:e,_fullLoop:e}):null}function Ol(i){return i&&i.fill!==!1}function Yp(i,n,t){let r=i[n].fill,a=[n],o;if(!t)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!ut(r))return r;if(o=i[r],!o)return!1;if(o.visible)return r;a.push(r),r=o.fill}return!1}function jp(i,n,t){let e=Gp(i);if(U(e))return isNaN(e.value)?!1:e;let r=parseFloat(e);return ut(r)&&Math.floor(r)===r?Up(e[0],n,r,t):["origin","start","end","stack","shape"].indexOf(e)>=0&&e}function Up(i,n,t,e){return(i==="-"||i==="+")&&(t=n+t),t===n||t<0||t>=e?!1:t}function qp(i,n){let t=null;return i==="start"?t=n.bottom:i==="end"?t=n.top:U(i)?t=n.getPixelForValue(i.value):n.getBasePixel&&(t=n.getBasePixel()),t}function $p(i,n,t){let e;return i==="start"?e=t:i==="end"?e=n.options.reverse?n.min:n.max:U(i)?e=i.value:e=n.getBaseValue(),e}function Gp(i){let n=i.options,t=n.fill,e=W(t&&t.target,t);return e===void 0&&(e=!!n.backgroundColor),e===!1||e===null?!1:e===!0?"origin":e}function Qp(i){let{scale:n,index:t,line:e}=i,r=[],a=e.segments,o=e.points,s=Xp(n,t);s.push(pd({x:null,y:n.bottom},e));for(let c=0;c<a.length;c++){let l=a[c];for(let d=l.start;d<=l.end;d++)Kp(r,o[d],s)}return new Tr({points:r,options:{}})}function Xp(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 Kp(i,n,t){let e=[];for(let r=0;r<t.length;r++){let a=t[r],{first:o,last:s,point:c}=Zp(a,n,"x");if(!(!c||o&&s)){if(o)e.unshift(c);else if(i.push(c),!s)break}}i.push(...e)}function Zp(i,n,t){let e=i.interpolate(n,t);if(!e)return{};let r=e[t],a=i.segments,o=i.points,s=!1,c=!1;for(let l=0;l<a.length;l++){let d=a[l],u=o[d.start][t],h=o[d.end][t];if(oe(r,u,h)){s=r===u,c=r===h;break}}return{first:s,last:c,point:e}}var wr=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:nt},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 Jp(i){let{chart:n,fill:t,line:e}=i;if(ut(t))return tg(n,t);if(t==="stack")return Qp(i);if(t==="shape")return!0;let r=eg(i);return r instanceof wr?r:pd(r,e)}function tg(i,n){let t=i.getDatasetMeta(n);return t&&i.isDatasetVisible(n)?t.dataset:null}function eg(i){return(i.scale||{}).getPointPositionForValue?ng(i):ig(i)}function ig(i){let{scale:n={},fill:t}=i,e=qp(t,n);if(ut(e)){let r=n.isHorizontal();return{x:r?e:null,y:r?null:e}}return null}function ng(i){let{scale:n,fill:t}=i,e=n.options,r=n.getLabels().length,a=e.reverse?n.max:n.min,o=$p(t,n,a),s=[];if(e.grid.circular){let c=n.getPointPositionForValue(0,a);return new wr({x:c.x,y:c.y,radius:n.getDistanceFromCenterForValue(o)})}for(let c=0;c<r;++c)s.push(n.getPointPositionForValue(c,o));return s}function wo(i,n,t){let e=Jp(n),{chart:r,index:a,line:o,scale:s,axis:c}=n,l=o.options,d=l.fill,u=l.backgroundColor,{above:h=u,below:f=u}=d||{},m=r.getDatasetMeta(a),p=fo(r,m);e&&o.points.length&&(cn(i,t),rg(i,{line:o,target:e,above:h,below:f,area:t,scale:s,axis:c,clip:p}),ln(i))}function rg(i,n){let{line:t,target:e,above:r,below:a,area:o,scale:s,clip:c}=n,l=t._loop?"angle":n.axis;i.save();let d=a;a!==r&&(l==="x"?(Al(i,e,o.top),Co(i,{line:t,target:e,color:r,scale:s,property:l,clip:c}),i.restore(),i.save(),Al(i,e,o.bottom)):l==="y"&&(Rl(i,e,o.left),Co(i,{line:t,target:e,color:a,scale:s,property:l,clip:c}),i.restore(),i.save(),Rl(i,e,o.right),d=r)),Co(i,{line:t,target:e,color:d,scale:s,property:l,clip:c}),i.restore()}function Al(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:c,end:l}=s,d=r[c],u=r[Mr(c,l,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 Rl(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:c,end:l}=s,d=r[c],u=r[Mr(c,l,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 Co(i,n){let{line:t,target:e,property:r,color:a,scale:o,clip:s}=n,c=Vp(t,e,r);for(let{source:l,target:d,start:u,end:h}of c){let{style:{backgroundColor:f=a}={}}=l,m=e!==!0;i.save(),i.fillStyle=f,ag(i,o,s,m&&No(r,u,h)),i.beginPath();let p=!!t.pathSegment(i,l),g;if(m){p?i.closePath():El(i,e,h,r);let b=!!e.pathSegment(i,d,{move:p,reverse:!0});g=p&&b,g||El(i,e,u,r)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function ag(i,n,t,e){let r=n.chart.chartArea,{property:a,start:o,end:s}=e||{};if(a==="x"||a==="y"){let c,l,d,u;a==="x"?(c=o,l=r.top,d=s,u=r.bottom):(c=r.left,l=o,d=r.right,u=s),i.beginPath(),t&&(c=Math.max(c,t.left),d=Math.min(d,t.right),l=Math.max(l,t.top),u=Math.min(u,t.bottom)),i.rect(c,l,d-c,u-l),i.clip()}}function El(i,n,t,e){let r=n.interpolate(t,e);r&&i.lineTo(r.x,r.y)}var og={id:"filler",afterDatasetsUpdate(i,n,t){let e=(i.data.datasets||[]).length,r=[],a,o,s,c;for(o=0;o<e;++o)a=i.getDatasetMeta(o),s=a.dataset,c=null,s&&s.options&&s instanceof Tr&&(c={visible:i.isDatasetVisible(o),index:o,fill:jp(s,o,e),chart:i,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=c,r.push(c);for(o=0;o<e;++o)c=r[o],!(!c||c.fill===!1)&&(c.fill=Yp(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&&wo(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;Ol(a)&&wo(i.ctx,a,i.chartArea)}},beforeDatasetDraw(i,n,t){let e=n.meta.$filler;!Ol(e)||t.drawTime!=="beforeDatasetDraw"||wo(i.ctx,e,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Ll=(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)}},sg=(i,n)=>i!==null&&n!==null&&i.datasetIndex===n.datasetIndex&&i.index===n.index,Cr=class extends Jt{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=tt(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=mt(e.font),a=r.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:c}=Ll(e,a),l,d;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,d=this._fitRows(o,a,s,c)+10):(d=this.maxHeight,l=this._fitCols(o,r,s,c)+10),this.width=Math.min(l,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,c=this.legendHitBoxes=[],l=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||l[l.length-1]+g+2*s>o)&&(u+=d,l[l.length-(p>0?0:1)]=0,f+=d,h++),c[p]={left:0,top:f,row:h,width:g,height:r},l[l.length-1]+=g+s}),u}_fitCols(n,t,e,r){let{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,c=this.legendHitBoxes=[],l=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}=cg(e,t,a,g,r);b>0&&f+k+2*s>d&&(u+=h+s,l.push({width:h,height:f}),m+=h+s,p++,h=f=0),c[b]={left:m,top:f,col:p,width:_,height:k},h=Math.max(h,_),f+=k+s}),u+=h,l.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=ei(a,this.left,this.width);if(this.isHorizontal()){let s=0,c=Ct(e,this.left+r,this.right-this.lineWidths[s]);for(let l of t)s!==l.row&&(s=l.row,c=Ct(e,this.left+r,this.right-this.lineWidths[s])),l.top+=this.top+n+r,l.left=o.leftForLtr(o.x(c),l.width),c+=l.width+r}else{let s=0,c=Ct(e,this.top+n+r,this.bottom-this.columnSizes[s].height);for(let l of t)l.col!==s&&(s=l.col,c=Ct(e,this.top+n+r,this.bottom-this.columnSizes[s].height)),l.top=c,l.left+=this.left+r,l.left=o.leftForLtr(o.x(l.left),l.width),c+=l.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let n=this.ctx;cn(n,this),this._draw(),ln(n)}}_draw(){let{options:n,columnSizes:t,lineWidths:e,ctx:r}=this,{align:a,labels:o}=n,s=st.color,c=ei(n.rtl,this.left,this.width),l=mt(o.font),{padding:d}=o,u=l.size,h=u/2,f;this.drawTitle(),r.textAlign=c.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;let{boxWidth:m,boxHeight:p,itemHeight:g}=Ll(o,u),b=function(x,P,D){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;r.save();let S=W(D.lineWidth,1);if(r.fillStyle=W(D.fillStyle,s),r.lineCap=W(D.lineCap,"butt"),r.lineDashOffset=W(D.lineDashOffset,0),r.lineJoin=W(D.lineJoin,"miter"),r.lineWidth=S,r.strokeStyle=W(D.strokeStyle,s),r.setLineDash(W(D.lineDash,[])),o.usePointStyle){let F={radius:p*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:S},B=c.xPlus(x,m/2),V=P+h;to(r,F,B,V,o.pointStyleWidth&&m)}else{let F=P+Math.max((u-p)/2,0),B=c.leftForLtr(x,m),V=Ve(D.borderRadius);r.beginPath(),Object.values(V).some(ct=>ct!==0)?Oi(r,{x:B,y:F,w:m,h:p,radius:V}):r.rect(B,F,m,p),r.fill(),S!==0&&r.stroke()}r.restore()},_=function(x,P,D){We(r,D.text,x,P+g/2,l,{strikethrough:D.hidden,textAlign:c.textAlign(D.textAlign)})},k=this.isHorizontal(),C=this._computeTitleHeight();k?f={x:Ct(a,this.left+d,this.right-e[0]),y:this.top+d+C,line:0}:f={x:this.left+d,y:Ct(a,this.top+C+d,this.bottom-t[0].height),line:0},co(this.ctx,n.textDirection);let v=g+d;this.legendItems.forEach((x,P)=>{r.strokeStyle=x.fontColor,r.fillStyle=x.fontColor;let D=r.measureText(x.text).width,S=c.textAlign(x.textAlign||(x.textAlign=o.textAlign)),F=m+h+D,B=f.x,V=f.y;c.setWidth(this.width),k?P>0&&B+F+d>this.right&&(V=f.y+=v,f.line++,B=f.x=Ct(a,this.left+d,this.right-e[f.line])):P>0&&V+v>this.bottom&&(B=f.x=B+t[f.line].width+d,f.line++,V=f.y=Ct(a,this.top+C+d,this.bottom-t[f.line].height));let ct=c.x(B);if(b(ct,V,x),B=Lc(S,B+m+h,k?B+F:this.right,n.rtl),_(c.x(B),V,x),k)f.x+=F+d;else if(typeof x.text!="string"){let xt=l.lineHeight;f.y+=gd(x,xt)+d}else f.y+=v}),lo(this.ctx,n.textDirection)}drawTitle(){let n=this.options,t=n.title,e=mt(t.font),r=Tt(t.padding);if(!t.display)return;let a=ei(n.rtl,this.left,this.width),o=this.ctx,s=t.position,c=e.size/2,l=r.top+c,d,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),d=this.top+l,u=Ct(n.align,u,this.right-h);else{let m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);d=l+Ct(n.align,this.top,this.bottom-m-n.labels.padding-this._computeTitleHeight())}let f=Ct(s,u,u+h);o.textAlign=a.textAlign(nr(s)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=e.string,We(o,t.text,f,d,e)}_computeTitleHeight(){let n=this.options.title,t=mt(n.font),e=Tt(n.padding);return n.display?t.lineHeight+e.height:0}_getLegendItemAt(n,t){let e,r,a;if(oe(n,this.left,this.right)&&oe(t,this.top,this.bottom)){for(a=this.legendHitBoxes,e=0;e<a.length;++e)if(r=a[e],oe(n,r.left,r.left+r.width)&&oe(t,r.top,r.top+r.height))return this.legendItems[e]}return null}handleEvent(n){let t=this.options;if(!ug(n.type,t))return;let e=this._getLegendItemAt(n.x,n.y);if(n.type==="mousemove"||n.type==="mouseout"){let r=this._hoveredItem,a=sg(r,e);r&&!a&&tt(t.onLeave,[n,r,this],this),this._hoveredItem=e,e&&!a&&tt(t.onHover,[n,e,this],this)}else e&&tt(t.onClick,[n,e,this],this)}};function cg(i,n,t,e,r){let a=lg(e,i,n,t),o=dg(r,e,n.lineHeight);return{itemWidth:a,itemHeight:o}}function lg(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 dg(i,n,t){let e=i;return typeof n.text!="string"&&(e=gd(n,t)),e}function gd(i,n){let t=i.text?i.text.length:0;return n*t}function ug(i,n){return!!((i==="mousemove"||i==="mouseout")&&(n.onHover||n.onLeave)||n.onClick&&(i==="click"||i==="mouseup"))}var hg={id:"legend",_element:Cr,start(i,n,t){let e=i.legend=new Cr({ctx:i.ctx,options:t,chart:i});St.configure(i,e,t),St.addBox(i,e)},stop(i){St.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,n,t){let e=i.legend;St.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(c=>{let l=c.controller.getStyle(t?0:void 0),d=Tt(l.borderWidth);return{text:n[c.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:l.borderColor,pointStyle:e||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:o&&(s||l.borderRadius),datasetIndex:c.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)}}},_n=class extends Jt{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=it(e.text)?e.text.length:1;this._padding=Tt(e.padding);let a=r*mt(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,c=0,l,d,u;return this.isHorizontal()?(d=Ct(s,e,a),u=t+n,l=a-e):(o.position==="left"?(d=e+n,u=Ct(s,r,t),c=G*-.5):(d=a-n,u=Ct(s,t,r),c=G*.5),l=r-t),{titleX:d,titleY:u,maxWidth:l,rotation:c}}draw(){let n=this.ctx,t=this.options;if(!t.display)return;let e=mt(t.font),a=e.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:c,rotation:l}=this._drawArgs(a);We(n,t.text,0,0,e,{color:t.color,maxWidth:c,rotation:l,textAlign:nr(t.align),textBaseline:"middle",translation:[o,s]})}};function fg(i,n){let t=new _n({ctx:i.ctx,options:n,chart:i});St.configure(i,t,n),St.addBox(i,t),i.titleBlock=t}var mg={id:"title",_element:_n,start(i,n,t){fg(i,t)},stop(i){let n=i.titleBlock;St.removeBox(i,n),delete i.titleBlock},beforeUpdate(i,n,t){let e=i.titleBlock;St.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}},mr=new WeakMap,pg={id:"subtitle",start(i,n,t){let e=new _n({ctx:i.ctx,options:t,chart:i});St.configure(i,e,t),St.addBox(i,e),mr.set(i,e)},stop(i){St.removeBox(i,mr.get(i)),mr.delete(i)},beforeUpdate(i,n,t){let e=mr.get(i);St.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}},gn={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 c=s.tooltipPosition();e.add(c.x),r+=c.y,++a}}return a===0||e.size===0?!1:{x:[...e].reduce((s,c)=>s+c)/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 c=i[a].element;if(c&&c.hasValue()){let l=c.getCenterPoint(),d=Zn(n,l);d<r&&(r=d,s=c)}}if(s){let c=s.tooltipPosition();t=c.x,e=c.y}return{x:t,y:e}}};function se(i,n){return n&&(it(n)?Array.prototype.push.apply(i,n):i.push(n)),i}function Te(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
1
+ import{i as Gs,n as Vn,r as Qs}from"./chunk-PPF5S5CV.js";import{m as $s}from"./chunk-6A4NRSCL.js";import{i as Ys,m as js,o as Hn,q as qs}from"./chunk-AC6VD2FN.js";import{$b as Ss,Ab as ga,Bb as ba,Bd as Rs,Ca as yt,Cb as _t,Cc as Ki,Da as ue,Db as rt,Eb as dt,Fa as ee,Fb as Vt,Ga as zn,Gd as Es,H as bs,Ha as Bn,Hd as Ls,Ia as Nn,J as En,Jc as ge,K as _s,Ka as Kt,La as Cs,Lc as Z,Mb as Qi,Mc as be,Nb as Ps,Nd as Ge,Ob as Mt,Od as Fs,P as vs,Pe as Zi,Qb as ie,Qd as zs,Qe as Us,Rb as Ie,Sb as Oe,Tb as gi,Ub as me,Va as mt,Vb as st,Wb as ct,Xa as mi,Xd as Ae,Ya as Wn,_a as $i,_b as Xi,a as bt,aa as ys,ac as Dt,ae as Qe,b as Ht,ba as Ln,be as vi,ca as xs,cb as Ts,cc as bi,da as Ui,dc as Is,de as ka,ec as Os,ee as yi,f as Qt,fb as he,fe as Bs,g as $e,gb as pi,hb as fe,j as ms,ja as Fn,k as An,ka as hi,kb as Gi,la as fi,lb as ha,ld as va,le as Ns,m as ua,mb as Ms,na as Xt,oe as Ws,pa as E,pd as ya,pe as wa,q as ps,qd as As,rc as pe,rd as _i,s as gs,tb as Ds,ua as Ct,ub as At,va as Tt,w as Rn,wa as ks,wb as fa,we as Hs,xa as ws,xb as ma,xe as Vs,ya as qi,zb as pa,zc as _a,zd as xa}from"./chunk-PZ6I6W3H.js";var Xs={name:"@mxtommy/kip",version:"4.6.0",description:"An advanced and versatile marine instrumentation package to display Signal K data.",license:"MIT",author:{name:"Thomas St.Pierre, David Godin"},contributors:[{name:"David Godin",email:"godind@hotmail.com"},{name:"Thomas St.Pierre",email:"thomas@samoht.ca"}],homepage:"https://github.com/mxtommy/Kip",bugs:"https://github.com/mxtommy/Kip/issues",repository:{type:"git",url:"git+https://github.com/mxtommy/Kip.git"},keywords:["signalk-webapp","signalk-category-instruments","signalk-category-notifications","signalk-category-ais","signalk-node-server-plugin","signal k","signalk","instruments","dashboard","marine","nmea"],signalk:{appIcon:"assets/icon-72x72.png",displayName:"KIP Instrument MFD"},main:"plugin/index.js",files:["plugin/**","public/**","README.md","LICENSE","CHANGELOG.md","CONTRIBUTORS.md","package.json"],"signalk-plugin-enabled-by-default":!0,scripts:{test:"CI=1 ng test --watch=false","test:plugin":"npm run build:plugin && node --test --test-concurrency=1 kip-plugin/tests/index.test.cjs","test:interactive":"ng test","test:headless":"CI=1 ng test --browsers=ChromeHeadless --watch=false",lint:"ng lint",dev:"ng serve --configuration=dev --serve-path=/@mxtommy/kip/","build:plugin":"tsc -p ./kip-plugin/tsconfig.plugin.json","build:dev":"ng build --configuration=dev","build:prod":"ng build --configuration=production","build:all":"npm run build:plugin && npm run build:prod",e2e:"ng e2e","generate:widget":"npx schematics ./tools/schematics/collection.json:create-host2-widget --dry-run=false"},schematics:"tools/schematics/collection.json",devDependencies:{"@angular/cdk":"21.2.1","@angular/common":"21.2.1","@angular/compiler":"21.2.1","@angular/core":"21.2.1","@angular/forms":"21.2.1","@angular/material":"21.2.1","@angular/animations":"21.2.1","@angular/platform-browser":"21.2.1","@angular/platform-browser-dynamic":"21.2.1","@angular/router":"21.2.1","@angular-devkit/build-angular":"^21.1.4","@angular-devkit/schematics-cli":"^20.1.6","@angular/build":"^21.1.4","@angular/cli":"^21.1.4","@angular/compiler-cli":"21.2.1","@angular/language-service":"21.2.1","@types/canvas-gauges":"^2.1.8","@types/d3":"^7.4.3","@types/jasmine":"~3.6.0","@types/jasminewd2":"^2.0.9","@types/js-quantities":"^1.6.6","@types/lodash-es":"^4.17.9","@types/node":"^24.1.0","angular-eslint":"21.2.0",codelyzer:"^6.0.0",eslint:"^9.29.0","jasmine-core":"~4.0.1","jasmine-spec-reporter":"~5.0.0",karma:"^6.4.4","karma-chrome-launcher":"~3.1.0","karma-cli":"~2.0.0","karma-coverage":"^2.2.0","karma-jasmine":"~4.0.0","karma-jasmine-html-reporter":"^1.6.0","karma-spec-reporter":"^0.0.36","ng-packagr":"^21.0.1",protractor:"~7.0.0","pwa-asset-generator":"^8.1.1",sass:"^1.49.9","ts-node":"^10.9.2",typescript:"^5.9.3","@aziham/chartjs-plugin-streaming":"^3.5.1","@godind/ng-canvas-gauges":"^6.2.1","@zakj/no-sleep":"^0.13.5","chart.js":"^4.5.1","chartjs-adapter-date-fns":"^3.0.0","chartjs-plugin-annotation":"^3.0.1",clipboard:"^2.0.11","compare-versions":"^6.1.1","core-js":"^3.13.1",d3:"^7.9.0","date-fns":"^2.30.0",gridstack:"^12.3.3","js-quantities":"^1.8.0","lodash-es":"^4.17.23","ngx-markdown":"^21.0.1",prismjs:"^1.30.0",rxjs:"^7.8.2",screenfull:"^6.0.2","sk-ais-status-plugin":"^1.0.0",steelseries:"^2.0.9",tslib:"^2.6.2","zone.js":"^0.15.1"},dependencies:{"@signalk/server-api":"^2.22.0"}};var E_=(()=>{class i{MODE_PATH="self.environment.mode";configurableThemeColors=[{label:"Contrast",value:"contrast"},{label:"Blue",value:"blue"},{label:"Green",value:"green"},{label:"Orange",value:"orange"},{label:"Yellow",value:"yellow"},{label:"Pink",value:"pink"},{label:"Purple",value:"purple"},{label:"Grey",value:"grey"}];cssThemeColorRoles$=new ua(null);_cssThemeColorRoles=null;_settings=E(js);_data=E(Qs);_iconRegistry=E(Us);_sanitizer=E(Es);isNightMode=ee(!1);_useAutoNightMode=Zi(this._settings.getAutoNightModeAsO(),{requireSync:!0});_theme=Zi(this._settings.getThemeNameAsO(),{requireSync:!0});_redNightMode=Zi(this._settings.getRedNightModeAsO(),{requireSync:!0});_environmentMode=Zi(this._data.subscribePath(this.MODE_PATH,"default"));previousEnvironmentMode=null;appVersion=ee(Xs.version);browserVersion=ee("Unknown");osVersion=ee("Unknown");constructor(){this._iconRegistry.addSvgIconSet(this._sanitizer.bypassSecurityTrustResourceUrl("assets/svg/icons.svg")),zn(()=>{this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")}),zn(()=>{let t=this._environmentMode().data.value;_a(()=>{this.previousEnvironmentMode!==t&&(this.previousEnvironmentMode=t,this._useAutoNightMode()&&(this.isNightMode.set(t==="night"),this.toggleDayNightMode()))})}),zn(()=>{let t=this._redNightMode();_a(()=>{t?this.toggleDayNightMode():this.toggleDayNightMode()})}),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue(),this.browserVersion.set(this.getBrowserVersion()),this.osVersion.set(this.getOSVersion()),console.log("*********** KIP Version Information ***********"),console.log(`** App Version: ${this.appVersion()}`),console.log(`** Browser Version: ${this.browserVersion()}`),console.log(`** OS Version: ${this.osVersion()}`),console.log("***********************************************")}readThemeCssRoleVariables(){let t=document.body,e=getComputedStyle(t),r={background:e.getPropertyValue("--mat-sys-background").trim(),cardColor:e.getPropertyValue("--kip-widget-card-background-color").trim(),blue:e.getPropertyValue("--kip-blue-color").trim(),blueDim:e.getPropertyValue("--kip-blue-dim-color").trim(),blueDimmer:e.getPropertyValue("--kip-blue-dimmer-color").trim(),green:e.getPropertyValue("--kip-green-color").trim(),greenDim:e.getPropertyValue("--kip-green-dim-color").trim(),greenDimmer:e.getPropertyValue("--kip-green-dimmer-color").trim(),grey:e.getPropertyValue("--kip-grey-color").trim(),greyDim:e.getPropertyValue("--kip-grey-dim-color").trim(),greyDimmer:e.getPropertyValue("--kip-grey-dimmer-color").trim(),orange:e.getPropertyValue("--kip-orange-color").trim(),orangeDim:e.getPropertyValue("--kip-orange-dim-color").trim(),orangeDimmer:e.getPropertyValue("--kip-orange-dimmer-color").trim(),pink:e.getPropertyValue("--kip-pink-color").trim(),pinkDim:e.getPropertyValue("--kip-pink-dim-color").trim(),pinkDimmer:e.getPropertyValue("--kip-pink-dimmer-color").trim(),purple:e.getPropertyValue("--kip-purple-color").trim(),purpleDim:e.getPropertyValue("--kip-purple-dim-color").trim(),purpleDimmer:e.getPropertyValue("--kip-purple-dimmer-color").trim(),contrast:e.getPropertyValue("--kip-contrast-color").trim(),contrastDim:e.getPropertyValue("--kip-contrast-dim-color").trim(),contrastDimmer:e.getPropertyValue("--kip-contrast-dimmer-color").trim(),yellow:e.getPropertyValue("--kip-yellow-color").trim(),yellowDim:e.getPropertyValue("--kip-yellow-dim-color").trim(),yellowDimmer:e.getPropertyValue("--kip-yellow-dimmer-color").trim(),port:e.getPropertyValue("--kip-port-color").trim(),starboard:e.getPropertyValue("--kip-starboard-color").trim(),zoneNominal:e.getPropertyValue("--kip-zone-nominal-color").trim(),zoneAlert:e.getPropertyValue("--kip-zone-alert-color").trim(),zoneWarn:e.getPropertyValue("--kip-zone-warn-color").trim(),zoneAlarm:e.getPropertyValue("--kip-zone-alarm-color").trim(),zoneEmergency:e.getPropertyValue("--kip-zone-emergency-color").trim()};this.cssThemeColorRoles$.next(r)}get cssThemeColors(){return this._cssThemeColorRoles}setBrightness(t,e=!1){let r=document.body;r.style.setProperty("--kip-nightModeBrightness",`${t}`);let a=e?" sepia(0.5) hue-rotate(-30deg)":"";r.style.setProperty("--kip-nightModeFilters",a)}toggleDayNightMode(){this.isNightMode()?this._redNightMode()?(document.body.classList.toggle("night-theme",!0),this.setBrightness(1,!1)):(this.setBrightness(this._settings.getNightModeBrightness(),!0),document.body.classList.remove("night-theme"),this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")):(document.body.classList.remove("night-theme"),this._theme()==="light-theme"&&document.body.classList.toggle("light-theme",this._theme()==="light-theme"),this.setBrightness(1,!1)),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue()}getBrowserVersion(){let t=navigator.userAgent,e="Unknown";return t.includes("Edg")?e=`Edge ${t.match(/Edg\/(\d+)/)?.[1]}`:t.includes("Chrome")&&!t.includes("Edg")&&!t.includes("Chromium")?e=`Chrome ${t.match(/Chrome\/(\d+)/)?.[1]}`:t.includes("Chromium")?e=`Chromium ${t.match(/Chromium\/(\d+)/)?.[1]}`:t.includes("Firefox")?e=`Firefox ${t.match(/Firefox\/(\d+)/)?.[1]}`:t.includes("Safari")&&!t.includes("Chrome")&&!t.includes("Chromium")?e=`Safari ${t.match(/Version\/(\d+)/)?.[1]}`:(t.includes("Opera")||t.includes("OPR"))&&(e=`Opera ${t.match(/(Opera|OPR)\/(\d+)/)?.[2]}`),e}getOSVersion(){let t=navigator.platform,e=navigator.userAgent;return t.startsWith("Mac")?"macOS":t.startsWith("Win")?"Windows":/Linux/.test(t)?e.includes("ARM")||e.includes("aarch64")||e.includes("Raspberry")||t.includes("armv7l")||t.includes("armv8l")?"Raspberry Pi":"Linux":"Unknown OS"}static \u0275fac=function(e){return new(e||i)};static \u0275prov=hi({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Pa=["*"];function wu(i,n){i&1&&Oe(0)}var Cu=["tabListContainer"],Tu=["tabList"],Mu=["tabListInner"],Du=["nextPaginator"],Pu=["previousPaginator"],Su=["content"];function Iu(i,n){}var Ou=["tabBodyWrapper"],Au=["tabHeader"];function Ru(i,n){}function Eu(i,n){if(i&1&&ha(0,Ru,0,0,"ng-template",12),i&2){let t=ie().$implicit;_t("cdkPortalOutlet",t.templateLabel)}}function Lu(i,n){if(i&1&&Is(0),i&2){let t=ie().$implicit;Os(t.textLabel)}}function Fu(i,n){if(i&1){let t=Qi();rt(0,"div",7,2),Mt("click",function(){let r=Ct(t),a=r.$implicit,o=r.$index,s=ie(),c=Xi(1);return Tt(s._handleClick(a,c,o))})("cdkFocusChange",function(r){let a=Ct(t).$index,o=ie();return Tt(o._tabFocusChanged(r,a))}),Vt(2,"span",8)(3,"div",9),rt(4,"span",10)(5,"span",11),fa(6,Eu,1,1,null,12)(7,Lu,1,1),dt()()()}if(i&2){let t=n.$implicit,e=n.$index,r=Xi(1),a=ie();bi(t.labelClass),Dt("mdc-tab--active",a.selectedIndex===e),_t("id",a._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",a.fitInkBarToContent),At("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),mt(3),_t("matRippleTrigger",r)("matRippleDisabled",t.disabled||a.disableRipple),mt(3),ma(t.templateLabel?6:7)}}function zu(i,n){i&1&&Oe(0)}function Bu(i,n){if(i&1){let t=Qi();rt(0,"mat-tab-body",13),Mt("_onCentered",function(){Ct(t);let r=ie();return Tt(r._removeTabBodyWrapperHeight())})("_onCentering",function(r){Ct(t);let a=ie();return Tt(a._setTabBodyWrapperHeight(r))})("_beforeCentering",function(r){Ct(t);let a=ie();return Tt(a._bodyCentered(r))}),dt()}if(i&2){let t=n.$implicit,e=n.$index,r=ie();bi(t.bodyClass),_t("id",r._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),At("tabindex",r.contentTabIndex!=null&&r.selectedIndex===e?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(t,e))("aria-hidden",r.selectedIndex!==e)}}var Nu=new Xt("MatTabContent"),Wu=(()=>{class i{template=E(Wn);constructor(){}static \u0275fac=function(e){return new(e||i)};static \u0275dir=fe({type:i,selectors:[["","matTabContent",""]],features:[pe([{provide:Nu,useExisting:i}])]})}return i})(),Hu=new Xt("MatTabLabel"),tc=new Xt("MAT_TAB"),Vu=(()=>{class i extends Ws{_closestTab=E(tc,{optional:!0});static \u0275fac=(()=>{let t;return function(r){return(t||(t=Nn(i)))(r||i)}})();static \u0275dir=fe({type:i,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[pe([{provide:Hu,useExisting:i}]),Gi]})}return i})(),ec=new Xt("MAT_TAB_GROUP"),Yu=(()=>{class i{_viewContainerRef=E(Ts);_closestTabGroup=E(ec,{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 An;position=null;origin=null;isActive=!1;constructor(){E(_i).load(vi)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Ns(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=he({type:i,selectors:[["mat-tab"]],contentQueries:function(e,r,a){if(e&1&&gi(a,Vu,5)(a,Wu,7,Wn),e&2){let o;st(o=ct())&&(r.templateLabel=o.first),st(o=ct())&&(r._explicitContent=o.first)}},viewQuery:function(e,r){if(e&1&&me(Wn,7),e&2){let a;st(a=ct())&&(r._implicitContent=a.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,r){e&2&&At("id",null)},inputs:{disabled:[2,"disabled","disabled",Z],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[pe([{provide:tc,useExisting:i}]),Bn],ngContentSelectors:Pa,decls:1,vars:0,template:function(e,r){e&1&&(Ie(),Ms(0,wu,1,0,"ng-template"))},encapsulation:2})}return i})(),Ca="mdc-tab-indicator--active",Ks="mdc-tab-indicator--no-transition",Ta=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}}},ju=(()=>{class i{_elementRef=E(Kt);_inkBarElement=null;_inkBarContentElement=null;_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(Ca);return}let r=e.getBoundingClientRect(),a=t.width/r.width,o=t.left-r.left;e.classList.add(Ks),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${a})`),e.getBoundingClientRect(),e.classList.remove(Ks),e.classList.add(Ca),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(Ca)}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",Z]}})}return i})();var ic=(()=>{class i extends ju{elementRef=E(Kt);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=Nn(i)))(r||i)}})();static \u0275dir=fe({type:i,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,r){e&2&&(At("aria-disabled",!!r.disabled),Dt("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[2,"disabled","disabled",Z]},features:[Gi]})}return i})(),Zs={passive:!0},Uu=650,qu=100,$u=(()=>{class i{_elementRef=E(Kt);_changeDetectorRef=E(ge);_viewportRuler=E(Vs);_dir=E(ka,{optional:!0});_ngZone=E(ue);_platform=E(va);_sharedResizeObserver=E($s);_injector=E(qi);_renderer=E($i);_animationsDisabled=Ae();_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new An;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged=!1;_keyManager;_currentTextContent;_stopScrolling=new An;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 yt;indexFocused=new yt;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"),Zs),this._renderer.listen(this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Zs))}ngAfterContentInit(){let t=this._dir?this._dir.change:gs("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(vs(32),Ui(this._destroyed)),r=this._viewportRuler.change(150).pipe(Ui(this._destroyed)),a=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new zs(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),mi(a,{injector:this._injector}),En(t,r,e,this._items.changes,this._itemsResized()).pipe(Ui(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"?ps:this._items.changes.pipe(Ln(this._items),xs(t=>new ms(e=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(a=>e.next(a));return t.forEach(a=>r.observe(a.elementRef.nativeElement)),()=>{r.disconnect()}}))),ys(1),_s(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(!Fs(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,c;this._getLayoutDirection()=="ltr"?(s=a,c=s+o):(c=this._tabListInner.nativeElement.offsetWidth-a,s=c-o);let l=this.scrollDistance,d=this.scrollDistance+r;s<l?this.scrollDistance-=l-s:c>d&&(this.scrollDistance+=Math.min(c-d,s-l))}_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(),bs(Uu,qu).pipe(Ui(En(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",Z],selectedIndex:[2,"selectedIndex","selectedIndex",be]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return i})(),Gu=(()=>{class i extends $u{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new Ta(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Nn(i)))(r||i)}})();static \u0275cmp=he({type:i,selectors:[["mat-tab-header"]],contentQueries:function(e,r,a){if(e&1&&gi(a,ic,4),e&2){let o;st(o=ct())&&(r._items=o)}},viewQuery:function(e,r){if(e&1&&me(Cu,7)(Tu,7)(Mu,7)(Du,5)(Pu,5),e&2){let a;st(a=ct())&&(r._tabListContainer=a.first),st(a=ct())&&(r._tabList=a.first),st(a=ct())&&(r._tabListInner=a.first),st(a=ct())&&(r._nextPaginator=a.first),st(a=ct())&&(r._previousPaginator=a.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,r){e&2&&Dt("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",Z]},features:[Gi],ngContentSelectors:Pa,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=Qi();Ie(),rt(0,"div",5,0),Mt("click",function(){return Ct(a),Tt(r._handlePaginatorClick("before"))})("mousedown",function(s){return Ct(a),Tt(r._handlePaginatorPress("before",s))})("touchend",function(){return Ct(a),Tt(r._stopInterval())}),Vt(2,"div",6),dt(),rt(3,"div",7,1),Mt("keydown",function(s){return Ct(a),Tt(r._handleKeydown(s))}),rt(5,"div",8,2),Mt("cdkObserveContent",function(){return Ct(a),Tt(r._onContentChanges())}),rt(7,"div",9,3),Oe(9),dt()()(),rt(10,"div",10,4),Mt("mousedown",function(s){return Ct(a),Tt(r._handlePaginatorPress("after",s))})("click",function(){return Ct(a),Tt(r._handlePaginatorClick("after"))})("touchend",function(){return Ct(a),Tt(r._stopInterval())}),Vt(12,"div",6),dt()}e&2&&(Dt("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),_t("matRippleDisabled",r._disableScrollBefore||r.disableRipple),mt(3),Dt("_mat-animation-noopable",r._animationsDisabled),mt(2),At("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby||null),mt(5),Dt("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),_t("matRippleDisabled",r._disableScrollAfter||r.disableRipple))},dependencies:[Qe,Ls],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})(),Qu=new Xt("MAT_TABS_CONFIG"),Js=(()=>{class i extends wa{_host=E(Ma);_ngZone=E(ue);_centeringSub=$e.EMPTY;_leavingSub=$e.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Ln(this._host._isCenterPosition())).subscribe(t=>{this._host._content&&t&&!this.hasAttached()&&this._ngZone.run(()=>{Promise.resolve().then(),this.attach(this._host._content)})}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this._ngZone.run(()=>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:[Gi]})}return i})(),Ma=(()=>{class i{_elementRef=E(Kt);_dir=E(ka,{optional:!0});_ngZone=E(ue);_injector=E(qi);_renderer=E($i);_diAnimationsDisabled=Ae();_eventCleanups;_initialized=!1;_fallbackTimer;_positionIndex;_dirChangeSubscription=$e.EMPTY;_position;_previousPosition;_onCentering=new yt;_beforeCentering=new yt;_afterLeavingCenter=new yt;_onCentered=new yt(!0);_portalHost;_contentElement;_content;animationDuration="500ms";preserveContent=!1;set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(){if(this._dir){let t=E(ge);this._dirChangeSubscription=this._dir.change.subscribe(e=>{this._computePositionAnimationState(e),t.markForCheck()})}}ngOnInit(){this._bindTransitionEvents(),this._position==="center"&&(this._setActiveClass(!0),mi(()=>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(),mi(()=>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=he({type:i,selectors:[["mat-tab-body"]],viewQuery:function(e,r){if(e&1&&me(Js,5)(Su,5),e&2){let a;st(a=ct())&&(r._portalHost=a.first),st(a=ct())&&(r._contentElement=a.first)}},hostAttrs:[1,"mat-mdc-tab-body"],hostVars:1,hostBindings:function(e,r){e&2&&At("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&&(rt(0,"div",1,0),ha(2,Iu,0,0,"ng-template",2),dt()),e&2&&Dt("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:[Js,Hs],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})(),uv=(()=>{class i{_elementRef=E(Kt);_changeDetectorRef=E(ge);_ngZone=E(ue);_tabsSubscription=$e.EMPTY;_tabLabelSubscription=$e.EMPTY;_tabBodySubscription=$e.EMPTY;_diAnimationsDisabled=Ae();_allTabs;_tabBodies;_tabBodyWrapper;_tabHeader;_tabs=new Cs;_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=null;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 yt;focusChange=new yt;animationDone=new yt;selectedTabChange=new yt(!0);_groupId;_isServer=!E(va).isBrowser;constructor(){let t=E(Qu,{optional:!0});this._groupId=E(Ge).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(Ln(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 Da;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=En(...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=he({type:i,selectors:[["mat-tab-group"]],contentQueries:function(e,r,a){if(e&1&&gi(a,Yu,5),e&2){let o;st(o=ct())&&(r._allTabs=o)}},viewQuery:function(e,r){if(e&1&&me(Ou,5)(Au,5)(Ma,5),e&2){let a;st(a=ct())&&(r._tabBodyWrapper=a.first),st(a=ct())&&(r._tabHeader=a.first),st(a=ct())&&(r._tabBodies=a)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(e,r){e&2&&(At("mat-align-tabs",r.alignTabs),bi("mat-"+(r.color||"primary")),Ss("--mat-tab-animation-duration",r.animationDuration),Dt("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",Z],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",Z],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",Z],selectedIndex:[2,"selectedIndex","selectedIndex",be],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",be],disablePagination:[2,"disablePagination","disablePagination",Z],disableRipple:[2,"disableRipple","disableRipple",Z],preserveContent:[2,"preserveContent","preserveContent",Z],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[pe([{provide:ec,useExisting:i}])],ngContentSelectors:Pa,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=Qi();Ie(),rt(0,"mat-tab-header",3,0),Mt("indexFocused",function(s){return Ct(a),Tt(r._focusChanged(s))})("selectFocusedIndex",function(s){return Ct(a),Tt(r.selectedIndex=s)}),ga(2,Fu,8,17,"div",4,pa),dt(),fa(4,zu,1,0),rt(5,"div",5,1),ga(7,Bu,1,10,"mat-tab-body",6,pa),dt()}e&2&&(_t("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination),Ds("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby),mt(2),ba(r._tabs),mt(2),ma(r._isServer?4:-1),mt(),Dt("_mat-animation-noopable",r._animationsDisabled()),mt(2),ba(r._tabs))},dependencies:[Gu,ic,As,Qe,wa,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})(),Da=class{index;tab};var hv=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=pi({type:i});static \u0275inj=fi({imports:[yi]})}return i})();var Xu=["input"],Ku=["label"],Zu=["*"],Sa={color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1},Ju=new Xt("mat-checkbox-default-options",{providedIn:"root",factory:()=>Sa}),Pt=(function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i})(Pt||{}),Ia=class{source;checked},th=(()=>{class i{_elementRef=E(Kt);_changeDetectorRef=E(ge);_ngZone=E(ue);_animationsDisabled=Ae();_options=E(Ju,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){let e=new Ia;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=!1;labelPosition="after";name=null;change=new yt;indeterminateChange=new yt;value;disableRipple=!1;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=Pt.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){E(_i).load(vi);let t=E(new Ki("tabindex"),{optional:!0});this._options=this._options||Sa,this.color=this._options.color||Sa.color,this.tabIndex=t==null?0:parseInt(t)||0,this.id=this._uniqueId=E(Ge).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(Pt.Indeterminate):this._transitionCheckState(this.checked?Pt.Checked:Pt.Unchecked),this.indeterminateChange.emit(t)),this._syncIndeterminate(t)}_indeterminate=ee(!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?Pt.Checked:Pt.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 Pt.Init:if(e===Pt.Checked)return this._animationClasses.uncheckedToChecked;if(e==Pt.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Pt.Unchecked:return e===Pt.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Pt.Checked:return e===Pt.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Pt.Indeterminate:return e===Pt.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=he({type:i,selectors:[["mat-checkbox"]],viewQuery:function(e,r){if(e&1&&me(Xu,5)(Ku,5),e&2){let a;st(a=ct())&&(r._inputElement=a.first),st(a=ct())&&(r._labelElement=a.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(e,r){e&2&&(Ps("id",r.id),At("tabindex",null)("aria-label",null)("aria-labelledby",null),bi(r.color?"mat-"+r.color:"mat-accent"),Dt("_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",Z],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",Z],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",Z],tabIndex:[2,"tabIndex","tabIndex",t=>t==null?void 0:be(t)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Z],checked:[2,"checked","checked",Z],disabled:[2,"disabled","disabled",Z],indeterminate:[2,"indeterminate","indeterminate",Z]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[pe([{provide:Hn,useExisting:Fn(()=>i),multi:!0},{provide:qs,useExisting:i,multi:!0}]),Bn],ngContentSelectors:Zu,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],["aria-hidden","true",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"],["aria-hidden","true",1,"mdc-checkbox__ripple"],["aria-hidden","true",1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24",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","","aria-hidden","true",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(e,r){if(e&1&&(Ie(),rt(0,"div",3),Mt("click",function(o){return r._preventBubblingFromLabel(o)}),rt(1,"div",4,0)(3,"div",5),Mt("click",function(){return r._onTouchTargetClick()}),dt(),rt(4,"input",6,1),Mt("blur",function(){return r._onBlur()})("click",function(){return r._onInputClick()})("change",function(o){return r._onInteractionEvent(o)}),dt(),Vt(6,"div",7),rt(7,"div",8),ks(),rt(8,"svg",9),Vt(9,"path",10),dt(),ws(),Vt(10,"div",11),dt(),Vt(11,"div",12),dt(),rt(12,"label",13,2),Oe(14),dt()()),e&2){let a=Xi(2);_t("labelPosition",r.labelPosition),mt(4),Dt("mdc-checkbox--selected",r.checked),_t("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),At("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),mt(7),_t("matRippleTrigger",a)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),mt(),_t("for",r.inputId)}},dependencies:[Qe,Vn],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}.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))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__background{border-color:GrayText}}.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)}@media(forced-colors: active){.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{border-color:GrayText}}.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))}@media(forced-colors: active){.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:GrayText}}.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:GrayText}}.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))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:GrayText}}.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))}@media(forced-colors: active){.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{color:GrayText}}.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:var(--mat-checkbox-touch-target-size, 48px);width:var(--mat-checkbox-touch-target-size, 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-visible~.mat-focus-indicator::before{content:""}
5
+ `],encapsulation:2,changeDetection:0})}return i})(),Iv=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=pi({type:i});static \u0275inj=fi({imports:[th,yi]})}return i})();var eh=["input"],ih=["formField"],nh=["*"],Yn=class{source;value;constructor(n,t){this.source=n,this.value=t}},rh={provide:Hn,useExisting:Fn(()=>oh),multi:!0},nc=new Xt("MatRadioGroup"),ah=new Xt("mat-radio-default-options",{providedIn:"root",factory:()=>({color:"accent",disabledInteractive:!1})}),oh=(()=>{class i{_changeDetector=E(ge);_value=null;_name=E(Ge).getId("mat-radio-group-");_selected=null;_isInitialized=!1;_labelPosition="after";_disabled=!1;_required=!1;_buttonChanges;_controlValueAccessorChangeFn=()=>{};onTouched=()=>{};change=new yt;_radios;color;get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition=t==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=t,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markRadiosForCheck()}_disabledInteractive=!1;constructor(){}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(t=>t===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){let t=this._selected!==null&&this._selected.value===this._value;this._radios&&!t&&(this._selected=null,this._radios.forEach(e=>{e.checked=this.value===e.value,e.checked&&(this._selected=e)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new Yn(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}static \u0275fac=function(e){return new(e||i)};static \u0275dir=fe({type:i,selectors:[["mat-radio-group"]],contentQueries:function(e,r,a){if(e&1&&gi(a,rc,5),e&2){let o;st(o=ct())&&(r._radios=o)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",Z],required:[2,"required","required",Z],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Z]},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[pe([rh,{provide:nc,useExisting:i}])]})}return i})(),rc=(()=>{class i{_elementRef=E(Kt);_changeDetector=E(ge);_focusMonitor=E(ya);_radioDispatcher=E(Gs);_defaultOptions=E(ah,{optional:!0});_ngZone=E(ue);_renderer=E($i);_uniqueId=E(Ge).getId("mat-radio-");_cleanupClick;id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}_labelPosition;get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){t!==this._required&&this._changeDetector.markForCheck(),this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(t){this._color=t}_color;get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new yt;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled=!1;_required=!1;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations=Ae();_injector=E(qi);constructor(){E(_i).load(vi);let t=E(nc,{optional:!0}),e=E(new Ki("tabindex"),{optional:!0});this.radioGroup=t,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,e&&(this.tabIndex=be(e,0))}focus(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,e)=>{t!==this.id&&e===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._cleanupClick=this._renderer.listen(this._inputElement.nativeElement,"click",this._onInputClick)})}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new Yn(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){let e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_onInputClick=t=>{this.disabled&&this.disabledInteractive&&t.preventDefault()};_updateTabIndex(){let t=this.radioGroup,e;if(!t||!t.selected||this.disabled?e=this.tabIndex:e=t.selected===this?this.tabIndex:-1,e!==this._previousTabIndex){let r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",e+""),this._previousTabIndex=e,mi(()=>{queueMicrotask(()=>{t&&t.selected&&t.selected!==this&&document.activeElement===r&&(t.selected?._inputElement.nativeElement.focus(),document.activeElement===r&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=he({type:i,selectors:[["mat-radio-button"]],viewQuery:function(e,r){if(e&1&&me(eh,5)(ih,7,Kt),e&2){let a;st(a=ct())&&(r._inputElement=a.first),st(a=ct())&&(r._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(e,r){e&1&&Mt("focus",function(){return r._inputElement.nativeElement.focus()}),e&2&&(At("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),Dt("mat-primary",r.color==="primary")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("mat-mdc-radio-checked",r.checked)("mat-mdc-radio-disabled",r.disabled)("mat-mdc-radio-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",Z],tabIndex:[2,"tabIndex","tabIndex",t=>t==null?0:be(t)],checked:[2,"checked","checked",Z],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",Z],required:[2,"required","required",Z],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Z]},outputs:{change:"change"},exportAs:["matRadioButton"],ngContentSelectors:nh,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],["aria-hidden","true",1,"mat-mdc-radio-touch-target",3,"click"],["type","radio","aria-invalid","false",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],["aria-hidden","true",1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","","aria-hidden","true",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(e,r){e&1&&(Ie(),rt(0,"div",2,0)(2,"div",3)(3,"div",4),Mt("click",function(o){return r._onTouchTargetClick(o)}),dt(),rt(4,"input",5,1),Mt("change",function(o){return r._onInputInteraction(o)}),dt(),rt(6,"div",6),Vt(7,"div",7)(8,"div",8),dt(),rt(9,"div",9),Vt(10,"div",10),dt()(),rt(11,"label",11),Oe(12),dt()()),e&2&&(_t("labelPosition",r.labelPosition),mt(2),Dt("mdc-radio--disabled",r.disabled),mt(2),_t("id",r.inputId)("checked",r.checked)("disabled",r.disabled&&!r.disabledInteractive)("required",r.required),At("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),mt(5),_t("matRippleTrigger",r._rippleTrigger.nativeElement)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),mt(2),_t("for",r.inputId))},dependencies:[Qe,Vn],styles:[`.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled])~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-hover-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-pressed-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px);top:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0);border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),background-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}@media(forced-colors: active){.mat-mdc-radio-button .mdc-radio__inner-circle{background-color:CanvasText !important}}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface, currentColor));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-selected-focus-icon-color, var(--mat-sys-primary, currentColor))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__inner-circle{background-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface, currentColor));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button label{cursor:pointer}.mat-mdc-radio-button label:empty{display:none}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple>.mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio>.mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-radio-touch-target-size, 48px);width:var(--mat-radio-touch-target-size, 48px);transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}
6
+ `],encapsulation:2,changeDetection:0})}return i})(),Zv=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=pi({type:i});static \u0275inj=fi({imports:[Bs,rc,yi]})}return i})();var sh={listSupported:!0,detailSupported:!0,saveConfigSupported:!0,detailFallbackToList:!1},ac=new Set(["oneOf","anyOf","allOf","if","then","else","dependencies","dependentRequired","dependentSchemas","$ref","not","patternProperties","contains"]),a0=(()=>{class i{http=E(Rs);connection=E(Ys);kipRuntimeModeCache=null;kipRuntimeModePromise=null;capabilities=ee(sh);detectCapabilities(){return Qt(this,null,function*(){let t=yield this.listPlugins();if(!t.ok)return t.capabilities;let e=t.data;return e.length===0?t.capabilities:(yield this.getPlugin(e[0].id)).capabilities})}listPlugins(){return Qt(this,null,function*(){try{let e=(yield Rn(this.http.get(this.toServerUrl("/plugins")))).map(r=>this.normalizePlugin(r));return this.success(e,Ht(bt({},this.capabilities()),{listSupported:!0}))}catch(t){return this.handleHttpError(t,this.capabilities(),{listSupported:!1})}})}getPlugin(t){return Qt(this,null,function*(){try{let e=yield Rn(this.http.get(this.toServerUrl(`/plugins/${encodeURIComponent(t)}`))),r=yield this.findPluginFromList(t);return r?this.success(Ht(bt({},r),{state:Ht(bt({},r.state),{enabled:e.enabled})}),Ht(bt({},this.capabilities()),{detailSupported:!0})):this.success({id:e.id,name:e.name,packageName:e.id,version:e.version,description:"",keywords:[],statusMessage:null,schema:null,state:{configuration:{},enabled:e.enabled,enableDebug:!1,enableLogging:!1}},Ht(bt({},this.capabilities()),{detailSupported:!0}))}catch(e){if(this.isHttpStatus(e,404)){let r=yield this.findPluginFromList(t);if(r)return this.success(r,Ht(bt({},this.capabilities()),{detailSupported:!1,detailFallbackToList:!0}))}return this.handleHttpError(e,this.capabilities(),{detailSupported:!1})}})}getPluginConfig(t){return Qt(this,null,function*(){let e=yield this.getPlugin(t);return this.isFailure(e)?this.failure(e):this.success(e.data.state,e.capabilities)})}resolveKipRuntimeModeConfig(t="kip"){return Qt(this,null,function*(){let e={historySeriesServiceEnabled:!0,registerAsHistoryApiProvider:!0},r=yield this.getPluginConfig(t);if(this.isFailure(r))return e;let a=r.data.configuration??{};return{historySeriesServiceEnabled:this.resolveBooleanConfig(a,"historySeriesServiceEnabled",e.historySeriesServiceEnabled),registerAsHistoryApiProvider:this.resolveBooleanConfig(a,"registerAsHistoryApiProvider",e.registerAsHistoryApiProvider)}})}getKipRuntimeModeConfigCached(t="kip",e=!1){return Qt(this,null,function*(){return e&&(this.kipRuntimeModeCache=null,this.kipRuntimeModePromise=null),this.kipRuntimeModeCache?this.kipRuntimeModeCache:this.kipRuntimeModePromise?this.kipRuntimeModePromise:(this.kipRuntimeModePromise=this.resolveKipRuntimeModeConfig(t).then(r=>(this.kipRuntimeModeCache=r,r)).finally(()=>{this.kipRuntimeModePromise=null}),this.kipRuntimeModePromise)})}savePluginConfig(t,e){return Qt(this,null,function*(){let r=yield this.getPlugin(t);if(this.isFailure(r))return this.failure(r);let a=r.data,o={configuration:bt(bt({},a.state.configuration||{}),e.configuration||{}),enabled:e.enabled??a.state.enabled,enableDebug:e.enableDebug??a.state.enableDebug,enableLogging:e.enableLogging??a.state.enableLogging};try{return yield Rn(this.http.post(this.toServerUrl(`/plugins/${encodeURIComponent(t)}/config`),o)),this.success({pluginId:t,state:o},Ht(bt({},r.capabilities),{saveConfigSupported:!0}))}catch(s){return this.handleHttpError(s,r.capabilities,{saveConfigSupported:!1})}})}setPluginEnabled(t,e){return Qt(this,null,function*(){return this.savePluginConfig(t,{configuration:{},enabled:e})})}validateDependency(t){return Qt(this,null,function*(){let e=yield this.getPlugin(t.pluginId);if(this.isFailure(e))return e.error.reason==="not-found"?this.success({status:"missing",pluginId:t.pluginId},e.capabilities):this.failure(e);let r=e.data;if((t.requireEnabled??!0)&&!r.state.enabled)return this.success({status:"disabled",pluginId:t.pluginId,plugin:r},e.capabilities);let o=this.getConfigMismatchKeys(t.requiredConfig,r.state.configuration);return o.length>0?this.success({status:"config-mismatch",pluginId:t.pluginId,plugin:r,missingKeys:o},e.capabilities):this.success({status:"ready",pluginId:t.pluginId,plugin:r},e.capabilities)})}normalizePluginSchema(t){if(!t||typeof t!="object")return{hasSchema:!1,supported:!1,fields:[],unsupportedKeywords:[]};let e=t,r=Object.keys(e).filter(c=>ac.has(c)),a=new Set(Array.isArray(e.required)?e.required.filter(c=>typeof c=="string"):[]),o=e.properties&&typeof e.properties=="object"?e.properties:{},s=Object.entries(o).map(([c,l])=>this.toSchemaField(c,l,a.has(c)));return{hasSchema:!0,supported:r.length===0,fields:s,unsupportedKeywords:r}}findPluginFromList(t){return Qt(this,null,function*(){let e=yield this.listPlugins();return e.ok?e.data.find(r=>r.id===t)??null:null})}normalizePlugin(t){return{id:t.id,name:t.name,packageName:t.packageName,version:t.version,description:t.description,keywords:t.keywords??[],statusMessage:t.statusMessage??null,schema:t.schema??null,state:{configuration:t.data?.configuration??{},enabled:t.data?.enabled??!1,enableLogging:t.data?.enableLogging??!1,enableDebug:t.data?.enableDebug??!1}}}toSchemaField(t,e,r){if(!e||typeof e!="object")return{key:t,type:"unknown",required:r,unsupportedKeywords:[]};let a=e,o=typeof a.type=="string"?a.type:"unknown",s=Object.keys(a).filter(c=>ac.has(c));return{key:t,type:this.normalizeSchemaType(o),required:r,title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enumValues:Array.isArray(a.enum)?a.enum:void 0,defaultValue:a.default,minimum:typeof a.minimum=="number"?a.minimum:void 0,maximum:typeof a.maximum=="number"?a.maximum:void 0,pattern:typeof a.pattern=="string"?a.pattern:void 0,unsupportedKeywords:s}}normalizeSchemaType(t){return t==="string"||t==="number"||t==="integer"||t==="boolean"||t==="array"||t==="object"?t:"unknown"}toServerUrl(t){let e=this.connection.signalKURL?.url?.trim();return e?`${e.endsWith("/")?e.slice(0,-1):e}${t}`:t}resolveBooleanConfig(t,e,r){let a=t[e];return typeof a=="boolean"?a:r}getConfigMismatchKeys(t,e){return t?Object.entries(t).filter(([r,a])=>!this.deepEquals(e?.[r],a)).map(([r])=>r):[]}deepEquals(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((r,a)=>this.deepEquals(r,e[a]));if(t&&e&&typeof t=="object"&&typeof e=="object"){let r=t,a=e,o=new Set([...Object.keys(r),...Object.keys(a)]);for(let s of o)if(!this.deepEquals(r[s],a[s]))return!1;return!0}return!1}success(t,e){return this.capabilities.set(e),{ok:!0,data:t,capabilities:e}}failure(t){return{ok:!1,error:t.error,capabilities:t.capabilities}}isFailure(t){return t.ok===!1}handleHttpError(t,e,r={}){let a=bt(bt({},e),r),o=this.mapError(t);return this.capabilities.set(a),{ok:!1,error:o,capabilities:a}}mapError(t){return t instanceof xa?t.status===0?{reason:"network-failure",statusCode:t.status,message:"[Plugin Config Service] Network error while calling plugin API"}:t.status===401?{reason:"auth-required",statusCode:401,message:"[Plugin Config Service] Authentication required"}:t.status===403?{reason:"forbidden",statusCode:403,message:"[Plugin Config Service] Access forbidden for plugin API"}:t.status===404?{reason:"not-found",statusCode:404,message:"[Plugin Config Service] Plugin endpoint or resource not found"}:t.status===405||t.status===501?{reason:"capability-unsupported",statusCode:t.status,message:"[Plugin Config Service] Plugin API capability is not supported by this server"}:t.status>=500?{reason:"server-error",statusCode:t.status,message:"[Plugin Config Service] Server error while calling plugin API"}:{reason:"unknown",statusCode:t.status,message:"[Plugin Config Service] Unexpected plugin API error"}:{reason:"unknown",message:"[Plugin Config Service] Unknown error while calling plugin API"}}isHttpStatus(t,e){return t instanceof xa&&t.status===e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=hi({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var c0=(()=>{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=bt({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,c=s.parentElement;return{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}}}));for(let o of a){let s=o.target;if(this.debug){let l=s.parentElement;console.log("[CanvasService] Shared ResizeObserver entry (detailed)",{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}})}this.setHighDPISize(s,o.contentRect);let c=this.resizeCallbacks.get(s);c&&c(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(t){}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,c=.1){if(!t)return;let l=()=>{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(h){}this.drawTitleInternal(t,e,r,a,o,s,c),d&&t.restore()}catch(u){console.warn("[CanvasService] drawTitle failed",u);try{this.drawTitleInternal(t,e,r,a,o,s,c)}catch(h){}}};document.fonts.status==="loaded"?this.fontsReadyPromise.then(()=>requestAnimationFrame(l)).catch(()=>requestAnimationFrame(l)):this.fontsReadyPromise.then(()=>requestAnimationFrame(l)).catch(d=>{console.warn(`[CanvasService] Font readiness failed: ${d}`),requestAnimationFrame(l)})}drawTitleInternal(t,e,r,a="normal",o,s,c){if(!t)return;let l=o-2*this.EDGE_BUFFER,d=Math.round(s*c),u=this.calculateOptimalFontSize(t,e,l,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,l)}clearCanvas(t,e,r){t.clearRect(0,0,e,r)}drawText(t,e,r=this.EDGE_BUFFER,a=this.EDGE_BUFFER,o,s,c="normal",l="#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,c,l,d,u)}finally{try{t.restore()}catch(f){}}};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,c="normal",l="#000",d="center",u="middle"){let h=this.calculateOptimalFontSize(t,e,o,s,c);t.font=`${c} ${h}px ${this.DEFAULT_FONT}`,t.fillStyle=l,t.textAlign=d,t.textBaseline=u,t.fillText(e,r,a,o)}calculateOptimalFontSize(t,e,r,a,o="normal"){let s=1,c=a,l=c;for(;s<=c;)l=Math.round((s+c)/2),t.font=`${o} ${l}px ${this.DEFAULT_FONT}`,t.measureText(e).width>r?c=l-1:s=l+1;return c}createTitleBitmap(t,e,r,a,o,s=.1){let c=document.createElement("canvas");c.width=Math.round(a*this.scaleFactor),c.height=Math.round(o*this.scaleFactor),c.style.width=`${a}px`,c.style.height=`${o}px`;let l=c.getContext("2d");return l&&(l.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(l,t,e,r,a,o,s),document.fonts.status!=="loaded"&&document.fonts.ready.then(()=>{try{l.setTransform(this.scaleFactor,0,0,this.scaleFactor,0,0),this.drawTitleInternal(l,t,e,r,a,o,s)}catch(d){}}).catch(()=>{})),c}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=hi({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function nn(i){return i+.5|0}var Re=(i,n,t)=>Math.max(Math.min(i,t),n);function tn(i){return Re(nn(i*2.55),0,255)}function Ee(i){return Re(nn(i*255),0,255)}function _e(i){return Re(nn(i/2.55)/100,0,1)}function oc(i){return Re(nn(i*100),0,100)}var Yt={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},Aa=[..."0123456789ABCDEF"],ch=i=>Aa[i&15],lh=i=>Aa[(i&240)>>4]+Aa[i&15],jn=i=>(i&240)>>4===(i&15),dh=i=>jn(i.r)&&jn(i.g)&&jn(i.b)&&jn(i.a);function uh(i){var n=i.length,t;return i[0]==="#"&&(n===4||n===5?t={r:255&Yt[i[1]]*17,g:255&Yt[i[2]]*17,b:255&Yt[i[3]]*17,a:n===5?Yt[i[4]]*17:255}:(n===7||n===9)&&(t={r:Yt[i[1]]<<4|Yt[i[2]],g:Yt[i[3]]<<4|Yt[i[4]],b:Yt[i[5]]<<4|Yt[i[6]],a:n===9?Yt[i[7]]<<4|Yt[i[8]]:255})),t}var hh=(i,n)=>i<255?n(i):"";function fh(i){var n=dh(i)?ch:lh;return i?"#"+n(i.r)+n(i.g)+n(i.b)+hh(i.a,n):void 0}var mh=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function dc(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 ph(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 gh(i,n,t){let e=dc(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 bh(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 Ra(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,c,l,d;return a!==o&&(d=a-o,l=s>.5?d/(2-a-o):d/(a+o),c=bh(t,e,r,d,a),c=c*60+.5),[c|0,l||0,s]}function Ea(i,n,t,e){return(Array.isArray(n)?i(n[0],n[1],n[2]):i(n,t,e)).map(Ee)}function La(i,n,t){return Ea(dc,i,n,t)}function _h(i,n,t){return Ea(gh,i,n,t)}function vh(i,n,t){return Ea(ph,i,n,t)}function uc(i){return(i%360+360)%360}function yh(i){let n=mh.exec(i),t=255,e;if(!n)return;n[5]!==e&&(t=n[6]?tn(+n[5]):Ee(+n[5]));let r=uc(+n[2]),a=+n[3]/100,o=+n[4]/100;return n[1]==="hwb"?e=_h(r,a,o):n[1]==="hsv"?e=vh(r,a,o):e=La(r,a,o),{r:e[0],g:e[1],b:e[2],a:t}}function xh(i,n){var t=Ra(i);t[0]=uc(t[0]+n),t=La(t),i.r=t[0],i.g=t[1],i.b=t[2]}function kh(i){if(!i)return;let n=Ra(i),t=n[0],e=oc(n[1]),r=oc(n[2]);return i.a<255?`hsla(${t}, ${e}%, ${r}%, ${_e(i.a)})`:`hsl(${t}, ${e}%, ${r}%)`}var sc={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"},cc={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 wh(){let i={},n=Object.keys(cc),t=Object.keys(sc),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,sc[a]);a=parseInt(cc[o],16),i[s]=[a>>16&255,a>>8&255,a&255]}return i}var Un;function Ch(i){Un||(Un=wh(),Un.transparent=[0,0,0,0]);let n=Un[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 Mh(i){let n=Th.exec(i),t=255,e,r,a;if(n){if(n[7]!==e){let o=+n[7];t=n[8]?tn(o):Re(o*255,0,255)}return e=+n[1],r=+n[3],a=+n[5],e=255&(n[2]?tn(e):Re(e,0,255)),r=255&(n[4]?tn(r):Re(r,0,255)),a=255&(n[6]?tn(a):Re(a,0,255)),{r:e,g:r,b:a,a:t}}}function Dh(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${_e(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var Oa=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,xi=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Ph(i,n,t){let e=xi(_e(i.r)),r=xi(_e(i.g)),a=xi(_e(i.b));return{r:Ee(Oa(e+t*(xi(_e(n.r))-e))),g:Ee(Oa(r+t*(xi(_e(n.g))-r))),b:Ee(Oa(a+t*(xi(_e(n.b))-a))),a:i.a+t*(n.a-i.a)}}function qn(i,n,t){if(i){let e=Ra(i);e[n]=Math.max(0,Math.min(e[n]+e[n]*t,n===0?360:1)),e=La(e),i.r=e[0],i.g=e[1],i.b=e[2]}}function hc(i,n){return i&&Object.assign(n||{},i)}function lc(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=Ee(i[3]))):(n=hc(i,{r:0,g:0,b:0,a:1}),n.a=Ee(n.a)),n}function Sh(i){return i.charAt(0)==="r"?Mh(i):yh(i)}var en=class i{constructor(n){if(n instanceof i)return n;let t=typeof n,e;t==="object"?e=lc(n):t==="string"&&(e=uh(n)||Ch(n)||Sh(n)),this._rgb=e,this._valid=!!e}get valid(){return this._valid}get rgb(){var n=hc(this._rgb);return n&&(n.a=_e(n.a)),n}set rgb(n){this._rgb=lc(n)}rgbString(){return this._valid?Dh(this._rgb):void 0}hexString(){return this._valid?fh(this._rgb):void 0}hslString(){return this._valid?kh(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,c=e.a-r.a,l=((s*c===-1?s:(s+c)/(1+s*c))+1)/2;a=1-l,e.r=255&l*e.r+a*r.r+.5,e.g=255&l*e.g+a*r.g+.5,e.b=255&l*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=Ph(this._rgb,n._rgb,t)),this}clone(){return new i(this.rgb)}alpha(n){return this._rgb.a=Ee(n),this}clearer(n){let t=this._rgb;return t.a*=1-n,this}greyscale(){let n=this._rgb,t=nn(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 qn(this._rgb,2,n),this}darken(n){return qn(this._rgb,2,-n),this}saturate(n){return qn(this._rgb,1,n),this}desaturate(n){return qn(this._rgb,1,-n),this}rotate(n){return xh(this._rgb,n),this}};function ae(){}var wc=(()=>{let i=0;return()=>i++})();function j(i){return i==null}function it(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 U(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function lt(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Rt(i,n){return lt(i)?i:n}function W(i,n){return typeof i>"u"?n:i}var Cc=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/n,Na=(i,n)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*n:+i;function tt(i,n,t){if(i&&typeof i.call=="function")return i.apply(t,n)}function X(i,n,t,e){let r,a,o;if(it(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(U(i))for(o=Object.keys(i),a=o.length,r=0;r<a;r++)n.call(t,i[o[r]],o[r])}function on(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 Xn(i){if(it(i))return i.map(Xn);if(U(i)){let n=Object.create(null),t=Object.keys(i),e=t.length,r=0;for(;r<e;++r)n[t[r]]=Xn(i[t[r]]);return n}return i}function Tc(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Ih(i,n,t,e){if(!Tc(i))return;let r=n[i],a=t[i];U(r)&&U(a)?wi(r,a,e):n[i]=Xn(a)}function wi(i,n,t){let e=it(n)?n:[n],r=e.length;if(!U(i))return i;t=t||{};let a=t.merger||Ih,o;for(let s=0;s<r;++s){if(o=e[s],!U(o))continue;let c=Object.keys(o);for(let l=0,d=c.length;l<d;++l)a(c[l],i,o,t)}return i}function Ti(i,n){return wi(i,n,{merger:Oh})}function Oh(i,n,t){if(!Tc(i))return;let e=n[i],r=t[i];U(e)&&U(r)?Ti(e,r):Object.prototype.hasOwnProperty.call(n,i)||(n[i]=Xn(r))}var fc={"":i=>i,x:i=>i.x,y:i=>i.y};function Ah(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 Rh(i){let n=Ah(i);return t=>{for(let e of n){if(e==="")break;t=t&&t[e]}return t}}function xe(i,n){return(fc[n]||(fc[n]=Rh(n)))(i)}function tr(i){return i.charAt(0).toUpperCase()+i.slice(1)}var Mi=i=>typeof i<"u",ve=i=>typeof i=="function",Wa=(i,n)=>{if(i.size!==n.size)return!1;for(let t of i)if(!n.has(t))return!1;return!0};function Mc(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var G=Math.PI,nt=2*G,Eh=nt+G,Kn=Number.POSITIVE_INFINITY,Lh=G/180,ut=G/2,Xe=G/4,mc=G*2/3,ye=Math.log10,Zt=Math.sign;function Di(i,n,t){return Math.abs(i-n)<t}function Ha(i){let n=Math.round(i);i=Di(i,n,i/1e3)?n:i;let t=Math.pow(10,Math.floor(ye(i))),e=i/t;return(e<=1?1:e<=2?2:e<=5?5:10)*t}function Dc(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 Fh(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Je(i){return!Fh(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Pc(i,n){let t=Math.round(i);return t-n<=i&&t+n>=i}function Va(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 jt(i){return i*(G/180)}function er(i){return i*(180/G)}function Ya(i){if(!lt(i))return;let n=1,t=0;for(;Math.round(i*n)/n!==i;)n*=10,t++;return t}function ja(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*G&&(a+=nt),{angle:a,distance:r}}function Zn(i,n){return Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))}function zh(i,n){return(i-n+Eh)%nt-G}function xt(i){return(i%nt+nt)%nt}function Pi(i,n,t,e){let r=xt(i),a=xt(n),o=xt(t),s=xt(a-r),c=xt(o-r),l=xt(r-a),d=xt(r-o);return r===a||r===o||e&&a===o||s>c&&l<d}function pt(i,n,t){return Math.max(n,Math.min(t,i))}function Sc(i){return pt(i,-32768,32767)}function oe(i,n,t,e=1e-6){return i>=Math.min(n,t)-e&&i<=Math.max(n,t)+e}function ir(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 ne=(i,n,t,e)=>ir(i,t,e?r=>{let a=i[r][n];return a<t||a===t&&i[r+1][n]===t}:r=>i[r][n]<t),Ic=(i,n,t)=>ir(i,t,e=>i[e][n]>=t);function Oc(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 Ac=["push","pop","shift","splice","unshift"];function Rc(i,n){if(i._chartjs){i._chartjs.listeners.push(n);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[n]}}),Ac.forEach(t=>{let e="_onData"+tr(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 Ua(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)&&(Ac.forEach(a=>{delete i[a]}),delete i._chartjs)}function qa(i){let n=new Set(i);return n.size===i.length?i:Array.from(n)}var $a=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Ga(i,n){let t=[],e=!1;return function(...r){t=r,e||(e=!0,$a.call(window,()=>{e=!1,i.apply(n,t)}))}}function Ec(i,n){let t;return function(...e){return n?(clearTimeout(t),t=setTimeout(i,n,e)):i.apply(this,e),n}}var nr=i=>i==="start"?"left":i==="end"?"right":"center",kt=(i,n,t)=>i==="start"?n:i==="end"?t:(n+t)/2,Lc=(i,n,t,e)=>i===(e?"left":"right")?t:i==="center"?(n+t)/2:n;function Qa(i,n,t){let e=n.length,r=0,a=e;if(i._sorted){let{iScale:o,vScale:s,_parsed:c}=i,l=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(ne(c,d,u).lo,t?e:ne(n,d,o.getPixelForValue(u)).lo),l){let p=c.slice(0,r+1).reverse().findIndex(g=>!j(g[s.axis]));r-=Math.max(0,p)}r=pt(r,0,e-1)}if(m){let p=Math.max(ne(c,o.axis,h,!0).hi+1,t?0:ne(n,d,o.getPixelForValue(h),!0).hi+1);if(l){let g=c.slice(p-1).findIndex(b=>!j(b[s.axis]));p+=Math.max(0,g)}a=pt(p,r,e)-r}else a=e-r}return{start:r,count:a}}function Xa(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 $n=i=>i===0||i===1,pc=(i,n,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-n)*nt/t)),gc=(i,n,t)=>Math.pow(2,-10*i)*Math.sin((i-n)*nt/t)+1,ki={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*ut)+1,easeOutSine:i=>Math.sin(i*ut),easeInOutSine:i=>-.5*(Math.cos(G*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=>$n(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=>$n(i)?i:pc(i,.075,.3),easeOutElastic:i=>$n(i)?i:gc(i,.075,.3),easeInOutElastic(i){return $n(i)?i:i<.5?.5*pc(i*2,.1125,.45):.5+.5*gc(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-ki.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?ki.easeInBounce(i*2)*.5:ki.easeOutBounce(i*2-1)*.5+.5};function Ka(i){if(i&&typeof i=="object"){let n=i.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return!1}function Za(i){return Ka(i)?i:new en(i)}function Fa(i){return Ka(i)?i:new en(i).saturate(.5).darken(.1).hexString()}var Bh=["x","y","borderWidth","radius","tension"],Nh=["color","borderColor","backgroundColor"];function Wh(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:Nh},numbers:{type:"number",properties:Bh}}),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 Hh(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var bc=new Map;function Vh(i,n){n=n||{};let t=i+JSON.stringify(n),e=bc.get(t);return e||(e=new Intl.NumberFormat(i,n),bc.set(t,e)),e}function Si(i,n,t){return Vh(n,t).format(i)}var Fc={values(i){return it(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 l=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(l<1e-4||l>1e15)&&(r="scientific"),a=Yh(i,t)}let o=ye(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:r,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Si(i,e,c)},logarithmic(i,n,t){if(i===0)return"0";let e=t[n].significand||i/Math.pow(10,Math.floor(ye(i)));return[1,2,3,5,10,15].includes(e)||n>.8*t.length?Fc.numeric.call(this,i,n,t):""}};function Yh(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 sn={formatters:Fc};function jh(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:sn.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 ze=Object.create(null),rr=Object.create(null);function rn(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 za(i,n,t){return typeof n=="string"?wi(rn(i,n),t):wi(rn(i,""),n)}var Ba=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)=>Fa(r.backgroundColor),this.hoverBorderColor=(e,r)=>Fa(r.borderColor),this.hoverColor=(e,r)=>Fa(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 za(this,n,t)}get(n){return rn(this,n)}describe(n,t){return za(rr,n,t)}override(n,t){return za(ze,n,t)}route(n,t,e,r){let a=rn(this,n),o=rn(this,e),s="_"+t;Object.defineProperties(a,{[s]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){let c=this[s],l=o[r];return U(c)?Object.assign({},l,c):W(c,l)},set(c){this[s]=c}}})}apply(n){n.forEach(t=>t(this))}},at=new Ba({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Wh,Hh,jh]);function Uh(i){return!i||j(i.size)||j(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function an(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 zc(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,c,l,d,u,h;for(c=0;c<s;c++)if(u=t[c],u!=null&&!it(u))o=an(i,r,a,o,u);else if(it(u))for(l=0,d=u.length;l<d;l++)h=u[l],h!=null&&!it(h)&&(o=an(i,r,a,o,h));i.restore();let f=a.length/2;if(f>t.length){for(c=0;c<f;c++)delete r[a[c]];a.splice(0,f)}return o}function Be(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 Ja(i,n){!n&&!i||(n=n||i.getContext("2d"),n.save(),n.resetTransform(),n.clearRect(0,0,i.width,i.height),n.restore())}function ar(i,n,t,e){to(i,n,t,e,null)}function to(i,n,t,e,r){let a,o,s,c,l,d,u,h,f=n.pointStyle,m=n.rotation,p=n.radius,g=(m||0)*Lh;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,nt):i.arc(t,e,p,0,nt),i.closePath();break;case"triangle":d=r?r/2:p,i.moveTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=mc,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),g+=mc,i.lineTo(t+Math.sin(g)*d,e-Math.cos(g)*p),i.closePath();break;case"rectRounded":l=p*.516,c=p-l,o=Math.cos(g+Xe)*c,u=Math.cos(g+Xe)*(r?r/2-l:c),s=Math.sin(g+Xe)*c,h=Math.sin(g+Xe)*(r?r/2-l:c),i.arc(t-u,e-s,l,g-G,g-ut),i.arc(t+h,e-o,l,g-ut,g),i.arc(t+u,e+s,l,g,g+ut),i.arc(t-h,e+o,l,g+ut,g+G),i.closePath();break;case"rect":if(!m){c=Math.SQRT1_2*p,d=r?r/2:c,i.rect(t-d,e-c,2*d,2*c);break}g+=Xe;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+=Xe;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+=Xe,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 re(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 cn(i,n){i.save(),i.beginPath(),i.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),i.clip()}function ln(i){i.restore()}function Bc(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 Nc(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 qh(i,n){n.translation&&i.translate(n.translation[0],n.translation[1]),j(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 $h(i,n,t,e,r){if(r.strikethrough||r.underline){let a=i.measureText(e),o=n-a.actualBoundingBoxLeft,s=n+a.actualBoundingBoxRight,c=t-a.actualBoundingBoxAscent,l=t+a.actualBoundingBoxDescent,d=r.strikethrough?(c+l)/2:l;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=r.decorationWidth||2,i.moveTo(o,d),i.lineTo(s,d),i.stroke()}}function Gh(i,n){let t=i.fillStyle;i.fillStyle=n.color,i.fillRect(n.left,n.top,n.width,n.height),i.fillStyle=t}function Ne(i,n,t,e,r,a={}){let o=it(n)?n:[n],s=a.strokeWidth>0&&a.strokeColor!=="",c,l;for(i.save(),i.font=r.string,qh(i,a),c=0;c<o.length;++c)l=o[c],a.backdrop&&Gh(i,a.backdrop),s&&(a.strokeColor&&(i.strokeStyle=a.strokeColor),j(a.strokeWidth)||(i.lineWidth=a.strokeWidth),i.strokeText(l,t,e,a.maxWidth)),i.fillText(l,t,e,a.maxWidth),$h(i,t,e,l,a),e+=Number(r.lineHeight);i.restore()}function Ii(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*G,G,!0),i.lineTo(t,e+a-o.bottomLeft),i.arc(t+o.bottomLeft,e+a-o.bottomLeft,o.bottomLeft,G,ut,!0),i.lineTo(t+r-o.bottomRight,e+a),i.arc(t+r-o.bottomRight,e+a-o.bottomRight,o.bottomRight,ut,0,!0),i.lineTo(t+r,e+o.topRight),i.arc(t+r-o.topRight,e+o.topRight,o.topRight,0,-ut,!0),i.lineTo(t+o.topLeft,e)}var Qh=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Xh=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Kh(i,n){let t=(""+i).match(Qh);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 Zh=i=>+i||0;function or(i,n){let t={},e=U(n),r=e?Object.keys(n):n,a=U(i)?e?o=>W(i[o],i[n[o]]):o=>i[o]:()=>i;for(let o of r)t[o]=Zh(a(o));return t}function eo(i){return or(i,{top:"y",right:"x",bottom:"y",left:"x"})}function We(i){return or(i,["topLeft","topRight","bottomLeft","bottomRight"])}function wt(i){let n=eo(i);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ht(i,n){i=i||{},n=n||at.font;let t=W(i.size,n.size);typeof t=="string"&&(t=parseInt(t,10));let e=W(i.style,n.style);e&&!(""+e).match(Xh)&&(console.warn('Invalid font style specified: "'+e+'"'),e=void 0);let r={family:W(i.family,n.family),lineHeight:Kh(W(i.lineHeight,n.lineHeight),t),size:t,style:e,weight:W(i.weight,n.weight),string:""};return r.string=Uh(r),r}function Oi(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&&it(s)&&(s=s[t%s.length],r=!1),s!==void 0))return e&&!r&&(e.cacheable=!1),s}function Wc(i,n,t){let{min:e,max:r}=i,a=Na(n,(r-e)/2),o=(s,c)=>t&&s===0?0:s+c;return{min:o(e,-Math.abs(a)),max:o(r,a)}}function ke(i,n){return Object.assign(Object.create(i),n)}function sr(i,n=[""],t,e,r=()=>i[0]){let a=t||i;typeof e>"u"&&(e=Yc("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:a,_fallback:e,_getTarget:r,override:s=>sr([s,...i],n,a,e)};return new Proxy(o,{deleteProperty(s,c){return delete s[c],delete s._keys,delete i[0][c],!0},get(s,c){return Hc(s,c,()=>sf(c,n,i,s))},getOwnPropertyDescriptor(s,c){return Reflect.getOwnPropertyDescriptor(s._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(s,c){return vc(s).includes(c)},ownKeys(s){return vc(s)},set(s,c,l){let d=s._storage||(s._storage=r());return s[c]=d[c]=l,delete s._keys,!0}})}function Ze(i,n,t,e){let r={_cacheable:!1,_proxy:i,_context:n,_subProxy:t,_stack:new Set,_descriptors:io(i,e),setContext:a=>Ze(i,a,t,e),override:a=>Ze(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 Hc(a,o,()=>tf(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 io(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:ve(t)?t:()=>t,isIndexable:ve(e)?e:()=>e}}var Jh=(i,n)=>i?i+tr(n):n,no=(i,n)=>U(n)&&i!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function Hc(i,n,t){if(Object.prototype.hasOwnProperty.call(i,n)||n==="constructor")return i[n];let e=t();return i[n]=e,e}function tf(i,n,t){let{_proxy:e,_context:r,_subProxy:a,_descriptors:o}=i,s=e[n];return ve(s)&&o.isScriptable(n)&&(s=ef(n,s,i,t)),it(s)&&s.length&&(s=nf(n,s,i,o.isIndexable)),no(n,s)&&(s=Ze(s,r,a&&a[n],o)),s}function ef(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 c=n(a,o||e);return s.delete(i),no(i,c)&&(c=ro(r._scopes,r,i,c)),c}function nf(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(U(n[0])){let c=n,l=r._scopes.filter(d=>d!==c);n=[];for(let d of c){let u=ro(l,r,i,d);n.push(Ze(u,a,o&&o[i],s))}}return n}function Vc(i,n,t){return ve(i)?i(n,t):i}var rf=(i,n)=>i===!0?n:typeof i=="string"?xe(n,i):void 0;function af(i,n,t,e,r){for(let a of n){let o=rf(t,a);if(o){i.add(o);let s=Vc(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 ro(i,n,t,e){let r=n._rootScopes,a=Vc(n._fallback,t,e),o=[...i,...r],s=new Set;s.add(e);let c=_c(s,o,t,a||t,e);return c===null||typeof a<"u"&&a!==t&&(c=_c(s,o,a,c,e),c===null)?!1:sr(Array.from(s),[""],r,a,()=>of(n,t,e))}function _c(i,n,t,e,r){for(;t;)t=af(i,n,t,e,r);return t}function of(i,n,t){let e=i._getTarget();n in e||(e[n]={});let r=e[n];return it(r)&&U(t)?t:r||{}}function sf(i,n,t,e){let r;for(let a of n)if(r=Yc(Jh(a,i),t),typeof r<"u")return no(i,r)?ro(t,e,i,r):r}function Yc(i,n){for(let t of n){if(!t)continue;let e=t[i];if(typeof e<"u")return e}}function vc(i){let n=i._keys;return n||(n=i._keys=cf(i._scopes)),n}function cf(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 ao(i,n,t,e){let{iScale:r}=i,{key:a="r"}=this._parsing,o=new Array(e),s,c,l,d;for(s=0,c=e;s<c;++s)l=s+t,d=n[l],o[s]={r:r.parse(xe(d,a),l)};return o}var lf=Number.EPSILON||1e-14,Ci=(i,n)=>n<i.length&&!i[n].skip&&i[n],jc=i=>i==="x"?"y":"x";function df(i,n,t,e){let r=i.skip?n:i,a=n,o=t.skip?n:t,s=Zn(a,r),c=Zn(o,a),l=s/(s+c),d=c/(s+c);l=isNaN(l)?0:l,d=isNaN(d)?0:d;let u=e*l,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 uf(i,n,t){let e=i.length,r,a,o,s,c,l=Ci(i,0);for(let d=0;d<e-1;++d)if(c=l,l=Ci(i,d+1),!(!c||!l)){if(Di(n[d],0,lf)){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 hf(i,n,t="x"){let e=jc(t),r=i.length,a,o,s,c=Ci(i,0);for(let l=0;l<r;++l){if(o=s,s=c,c=Ci(i,l+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[l]),c&&(a=(c[t]-d)/3,s[`cp2${t}`]=d+a,s[`cp2${e}`]=u+a*n[l])}}function ff(i,n="x"){let t=jc(n),e=i.length,r=Array(e).fill(0),a=Array(e),o,s,c,l=Ci(i,0);for(o=0;o<e;++o)if(s=c,c=l,l=Ci(i,o+1),!!c){if(l){let d=l[n]-c[n];r[o]=d!==0?(l[t]-c[t])/d:0}a[o]=s?l?Zt(r[o-1])!==Zt(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}uf(i,r,a),hf(i,a,n)}function Gn(i,n,t){return Math.max(Math.min(i,t),n)}function mf(i,n){let t,e,r,a,o,s=re(i[0],n);for(t=0,e=i.length;t<e;++t)o=a,a=s,s=t<e-1&&re(i[t+1],n),a&&(r=i[t],o&&(r.cp1x=Gn(r.cp1x,n.left,n.right),r.cp1y=Gn(r.cp1y,n.top,n.bottom)),s&&(r.cp2x=Gn(r.cp2x,n.left,n.right),r.cp2y=Gn(r.cp2y,n.top,n.bottom)))}function Uc(i,n,t,e,r){let a,o,s,c;if(n.spanGaps&&(i=i.filter(l=>!l.skip)),n.cubicInterpolationMode==="monotone")ff(i,r);else{let l=e?i[i.length-1]:i[0];for(a=0,o=i.length;a<o;++a)s=i[a],c=df(l,s,i[Math.min(a+1,o-(e?0:1))%o],n.tension),s.cp1x=c.previous.x,s.cp1y=c.previous.y,s.cp2x=c.next.x,s.cp2y=c.next.y,l=s}n.capBezierPoints&&mf(i,t)}function cr(){return typeof window<"u"&&typeof document<"u"}function lr(i){let n=i.parentNode;return n&&n.toString()==="[object ShadowRoot]"&&(n=n.host),n}function Jn(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 dr=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function pf(i,n){return dr(i).getPropertyValue(n)}var gf=["top","right","bottom","left"];function Ke(i,n,t){let e={};t=t?"-"+t:"";for(let r=0;r<4;r++){let a=gf[r];e[a]=parseFloat(i[n+"-"+a+t])||0}return e.width=e.left+e.right,e.height=e.top+e.bottom,e}var bf=(i,n,t)=>(i>0||n>0)&&(!t||!t.shadowRoot);function _f(i,n){let t=i.touches,e=t&&t.length?t[0]:i,{offsetX:r,offsetY:a}=e,o=!1,s,c;if(bf(r,a,i.target))s=r,c=a;else{let l=n.getBoundingClientRect();s=e.clientX-l.left,c=e.clientY-l.top,o=!0}return{x:s,y:c,box:o}}function He(i,n){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:e}=n,r=dr(t),a=r.boxSizing==="border-box",o=Ke(r,"padding"),s=Ke(r,"border","width"),{x:c,y:l,box:d}=_f(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((c-u)/f*t.width/e),y:Math.round((l-h)/m*t.height/e)}}function vf(i,n,t){let e,r;if(n===void 0||t===void 0){let a=i&&lr(i);if(!a)n=i.clientWidth,t=i.clientHeight;else{let o=a.getBoundingClientRect(),s=dr(a),c=Ke(s,"border","width"),l=Ke(s,"padding");n=o.width-l.width-c.width,t=o.height-l.height-c.height,e=Jn(s.maxWidth,a,"clientWidth"),r=Jn(s.maxHeight,a,"clientHeight")}}return{width:n,height:t,maxWidth:e||Kn,maxHeight:r||Kn}}var Fe=i=>Math.round(i*10)/10;function qc(i,n,t,e){let r=dr(i),a=Ke(r,"margin"),o=Jn(r.maxWidth,i,"clientWidth")||Kn,s=Jn(r.maxHeight,i,"clientHeight")||Kn,c=vf(i,n,t),{width:l,height:d}=c;if(r.boxSizing==="content-box"){let h=Ke(r,"border","width"),f=Ke(r,"padding");l-=f.width+h.width,d-=f.height+h.height}return l=Math.max(0,l-a.width),d=Math.max(0,e?l/e:d-a.height),l=Fe(Math.min(l,o,c.maxWidth)),d=Fe(Math.min(d,s,c.maxHeight)),l&&!d&&(d=Fe(l/2)),(n!==void 0||t!==void 0)&&e&&c.height&&d>c.height&&(d=c.height,l=Fe(Math.floor(d*e))),{width:l,height:d}}function oo(i,n,t){let e=n||1,r=Fe(i.height*e),a=Fe(i.width*e);i.height=Fe(i.height),i.width=Fe(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 $c=(function(){let i=!1;try{let n={get passive(){return i=!0,!1}};cr()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch(n){}return i})();function so(i,n){let t=pf(i,n),e=t&&t.match(/^(\d+)(\.\d+)?px$/);return e?+e[1]:void 0}function Le(i,n,t,e){return{x:i.x+t*(n.x-i.x),y:i.y+t*(n.y-i.y)}}function Gc(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 Qc(i,n,t,e){let r={x:i.cp2x,y:i.cp2y},a={x:n.cp1x,y:n.cp1y},o=Le(i,r,t),s=Le(r,a,t),c=Le(a,n,t),l=Le(o,s,t),d=Le(s,c,t);return Le(l,d,t)}var yf=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}}},xf=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,n){return i+n},leftForLtr(i,n){return i}}};function ti(i,n,t){return i?yf(n,t):xf()}function co(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 lo(i,n){n!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",n[0],n[1]))}function Xc(i){return i==="angle"?{between:Pi,compare:zh,normalize:xt}:{between:oe,compare:(n,t)=>n-t,normalize:n=>n}}function yc({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 kf(i,n,t){let{property:e,start:r,end:a}=t,{between:o,normalize:s}=Xc(e),c=n.length,{start:l,end:d,loop:u}=i,h,f;if(u){for(l+=c,d+=c,h=0,f=c;h<f&&o(s(n[l%c][e]),r,a);++h)l--,d--;l%=c,d%=c}return d<l&&(d+=c),{start:l,end:d,loop:u,style:i.style}}function uo(i,n,t){if(!t)return[i];let{property:e,start:r,end:a}=t,o=n.length,{compare:s,between:c,normalize:l}=Xc(e),{start:d,end:u,loop:h,style:f}=kf(i,n,t),m=[],p=!1,g=null,b,_,k,C=()=>c(r,k,b)&&s(r,k)!==0,v=()=>s(a,b)===0||c(a,k,b),x=()=>p||C(),P=()=>!p||v();for(let D=d,S=d;D<=u;++D)_=n[D%o],!_.skip&&(b=l(_[e]),b!==k&&(p=c(b,r,a),g===null&&x()&&(g=s(b,r)===0?D:S),g!==null&&P()&&(m.push(yc({start:g,end:D,loop:h,count:o,style:f})),g=null),S=D,k=b));return g!==null&&m.push(yc({start:g,end:u,loop:h,count:o,style:f})),m}function ho(i,n){let t=[],e=i.segments;for(let r=0;r<e.length;r++){let a=uo(e[r],i.points,n);a.length&&t.push(...a)}return t}function wf(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 Cf(i,n,t,e){let r=i.length,a=[],o=n,s=i[n],c;for(c=n+1;c<=t;++c){let l=i[c%r];l.skip||l.stop?s.skip||(e=!1,a.push({start:n%r,end:(c-1)%r,loop:e}),n=o=l.stop?c:null):(o=c,s.skip&&(n=c)),s=l}return o!==null&&a.push({start:n%r,end:o%r,loop:e}),a}function Kc(i,n){let t=i.points,e=i.options.spanGaps,r=t.length;if(!r)return[];let a=!!i._loop,{start:o,end:s}=wf(t,r,a,e);if(e===!0)return xc(i,[{start:o,end:s,loop:a}],t,n);let c=s<o?s+r:s,l=!!i._fullLoop&&o===0&&s===r-1;return xc(i,Cf(t,o,c,l),t,n)}function xc(i,n,t,e){return!e||!e.setContext||!t?n:Tf(i,n,t,e)}function Tf(i,n,t,e){let r=i._chart.getContext(),a=kc(i.options),{_datasetIndex:o,options:{spanGaps:s}}=i,c=t.length,l=[],d=a,u=n[0].start,h=u;function f(m,p,g,b){let _=s?-1:1;if(m!==p){for(m+=c;t[m%c].skip;)m-=_;for(;t[p%c].skip;)p+=_;m%c!==p%c&&(l.push({start:m%c,end:p%c,loop:g,style:b}),d=b,u=p%c)}}for(let m of n){u=s?u:m.start;let p=t[u%c],g;for(h=u+1;h<=m.end;h++){let b=t[h%c];g=kc(e.setContext(ke(r,{type:"segment",p0:p,p1:b,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:o}))),Mf(g,d)&&f(u,h-1,m.loop,d),p=b,d=g}u<h-1&&f(u,h-1,m.loop,d)}return l}function kc(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Mf(i,n){if(!n)return!1;let t=[],e=function(r,a){return Ka(a)?(t.includes(a)||t.push(a),t.indexOf(a)):a};return JSON.stringify(i,e)!==JSON.stringify(n,e)}function Qn(i,n,t){return i.options.clip?i[t]:n[t]}function Df(i,n){let{xScale:t,yScale:e}=i;return t&&e?{left:Qn(t,n,"left"),right:Qn(t,n,"right"),top:Qn(e,n,"top"),bottom:Qn(e,n,"bottom")}:n}function fo(i,n){let t=n._clip;if(t.disabled)return!1;let e=Df(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 To=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=$a.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,c;for(;o>=0;--o)c=a[o],c._active?(c._total>e.duration&&(e.duration=c._total),c.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)}},we=new To,Zc="transparent",Pf={boolean(i,n,t){return t>.5?n:i},color(i,n,t){let e=Za(i||Zc),r=e.valid&&Za(n||Zc);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=Oi([n.to,r,a,n.from]);let o=Oi([n.from,a,r]);this._active=!0,this._fn=n.fn||Pf[n.type||typeof o],this._easing=ki[n.easing]||ki.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=Oi([n.to,t,r,n.from]),this._from=Oi([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,c;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}c=t/e%2,c=o&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[r]=this._fn(a,s,c)}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]()}},vr=class{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!U(n))return;let t=Object.keys(at.animation),e=this._properties;Object.getOwnPropertyNames(n).forEach(r=>{let a=n[r];if(!U(a))return;let o={};for(let s of t)o[s]=a[s];(it(a.properties)&&a.properties||[r]).forEach(s=>{(s===r||!e.has(s))&&e.set(s,o)})})}_animateOptions(n,t){let e=t.options,r=If(n,e);if(!r)return[];let a=this._createAnimations(r,e);return e.$shared&&Sf(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(),c;for(c=o.length-1;c>=0;--c){let l=o[c];if(l.charAt(0)==="$")continue;if(l==="options"){r.push(...this._animateOptions(n,t));continue}let d=t[l],u=a[l],h=e.get(l);if(u)if(h&&u.active()){u.update(h,d,s);continue}else u.cancel();if(!h||!h.duration){n[l]=d;continue}a[l]=u=new Mo(h,n,l,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 we.add(this._chart,e),!0}};function Sf(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 If(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 Jc(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=Jc(i,t),r=Jc(n,t);return{top:r.end,right:e.end,bottom:r.start,left:e.start}}function Af(i){let n,t,e,r;return U(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 Zl(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 tl(i,n,t,e={}){let r=i.keys,a=e.mode==="single",o,s,c,l;if(n===null)return;let d=!1;for(o=0,s=r.length;o<s;++o){if(c=+r[o],c===t){if(d=!0,e.all)continue;break}l=i.values[c],lt(l)&&(a||n===0||Zt(n)===Zt(l))&&(n+=l)}return!d&&!e.all?0:n}function Rf(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),c,l,d;for(c=0,l=o.length;c<l;++c)d=o[c],s[c]={[r]:d,[a]:i[d]};return s}function mo(i,n){let t=i&&i.options.stacked;return t||t===void 0&&n.stack!==void 0}function Ef(i,n,t){return`${i.id}.${n.id}.${t.stack||t.type}`}function Lf(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 Ff(i,n,t){let e=i[n]||(i[n]={});return e[t]||(e[t]={})}function el(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 il(i,n){let{chart:t,_cachedMeta:e}=i,r=t._stacks||(t._stacks={}),{iScale:a,vScale:o,index:s}=e,c=a.axis,l=o.axis,d=Ef(a,o,e),u=n.length,h;for(let f=0;f<u;++f){let m=n[f],{[c]:p,[l]:g}=m,b=m._stacks||(m._stacks={});h=b[l]=Ff(r,d,p),h[s]=g,h._top=el(h,o,!0,e.type),h._bottom=el(h,o,!1,e.type);let _=h._visualValues||(h._visualValues={});_[s]=g}}function po(i,n){let t=i.scales;return Object.keys(t).filter(e=>t[e].axis===n).shift()}function zf(i,n){return ke(i,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function Bf(i,n,t){return ke(i,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function dn(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 go=i=>i==="reset"||i==="none",nl=(i,n)=>n?i:Object.assign({},i),Nf=(i,n,t)=>i&&!n.hidden&&n._stacked&&{keys:Zl(t,!0),values:null},Ye=(()=>{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=mo(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&&dn(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=W(r.xAxisID,po(t,"x")),s=e.yAxisID=W(r.yAxisID,po(t,"y")),c=e.rAxisID=W(r.rAxisID,po(t,"r")),l=e.indexAxis,d=e.iAxisID=a(l,o,s,c),u=e.vAxisID=a(l,s,o,c);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(c),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&&Ua(this._data,this),t._stacked&&dn(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(U(e)){let a=this._cachedMeta;this._data=Rf(e,a)}else if(r!==e){if(r){Ua(r,this);let a=this._cachedMeta;dn(a),a._parsed=[]}e&&Object.isExtensible(e)&&Rc(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=mo(e.vScale,e),e.stack!==r.stack&&(a=!0,dn(e),e.stack=r.stack),this._resyncElements(t),(a||o!==e._stacked)&&(il(this,e._parsed),e._stacked=mo(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,c=o.axis,l=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{it(a[t])?f=this.parseArrayData(r,a,t,e):U(a[t])?f=this.parseObjectData(r,a,t,e):f=this.parsePrimitiveData(r,a,t,e);let m=()=>h[c]===null||d&&h[c]<d[c];for(u=0;u<e;++u)r._parsed[u+t]=h=f[u],l&&(m()&&(l=!1),d=h);r._sorted=l}s&&il(this,f)}parsePrimitiveData(t,e,r,a){let{iScale:o,vScale:s}=t,c=o.axis,l=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]={[c]:u||o.parse(d[p],p),[l]:s.parse(e[p],p)};return h}parseArrayData(t,e,r,a){let{xScale:o,yScale:s}=t,c=new Array(a),l,d,u,h;for(l=0,d=a;l<d;++l)u=l+r,h=e[u],c[l]={x:o.parse(h[0],u),y:s.parse(h[1],u)};return c}parseObjectData(t,e,r,a){let{xScale:o,yScale:s}=t,{xAxisKey:c="x",yAxisKey:l="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(xe(m,c),f),y:s.parse(xe(m,l),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],c={keys:Zl(a,!0),values:e._stacks[t.axis]._visualValues};return tl(c,s,o.index,{mode:r})}updateRangeFromParsed(t,e,r,a){let o=r[e.axis],s=o===null?NaN:o,c=a&&r._stacks[e.axis];a&&c&&(a.values=c,s=tl(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,c=this._getOtherScale(t),l=Nf(e,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=Lf(c),f,m;function p(){m=a[f];let g=m[c.axis];return!lt(m[t.axis])||u>g||h<g}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(d,t,m,l),o));++f);if(o){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(d,t,m,l);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],lt(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=Af(W(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=[],c=this._drawStart||0,l=this._drawCount||a.length-c,d=this.options.drawActiveElementsOnTop,u;for(r.dataset&&r.dataset.draw(t,o,c,l),u=c;u<c+l;++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=Bf(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=zf(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,c=o[s],l=this.enableOptionSharing&&Mi(r);if(c)return nl(c,l);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(at.elements[t]),p=()=>this.getContext(r,a,e),g=d.resolveNamedOptions(f,m,p,h);return g.$shared&&(g.$shared=l,o[s]=Object.freeze(nl(g,l))),g}_resolveAnimations(t,e,r){let a=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,c=o[s];if(c)return c;let l;if(a.options.animation!==!1){let u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),h);l=u.createResolver(f,this.getContext(t,r,e))}let d=new vr(a,l&&l.animations);return l&&l._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||go(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){go(a)?Object.assign(t,r):this._resolveAnimations(e,a).update(t,r)}updateSharedOptions(t,e,r){t&&!go(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[c,l,d]of this._syncList)this[c](l,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,c,l=d=>{for(d.length+=e,c=d.length-1;c>=s;c--)d[c]=d[c-e]};for(l(o),c=t;c<s;++c)o[c]=new this.dataElementType;this._parsing&&l(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&&dn(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 Wf(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=qa(e.sort((r,a)=>r-a))}return i._cache.$bar}function Hf(i){let n=i.iScale,t=Wf(n,i.type),e=n._length,r,a,o,s,c=()=>{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]),c();for(s=void 0,r=0,a=n.ticks.length;r<a;++r)o=n.getPixelForTick(r),c();return e}function Vf(i,n,t,e){let r=t.barThickness,a,o;return j(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 Yf(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,c=t.categoryPercentage;o===null&&(o=a-(s===null?n.end-n.start:s-a)),s===null&&(s=a+a-o);let l=a-(a-Math.min(o,s))/2*c;return{chunk:Math.abs(s-o)/2*c/e,ratio:t.barPercentage,start:l}}function jf(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),c=o,l=s;Math.abs(o)>Math.abs(s)&&(c=s,l=o),n[t.axis]=l,n._custom={barStart:c,barEnd:l,start:r,end:a,min:o,max:s}}function Jl(i,n,t,e){return it(i)?jf(i,n,t,e):n[t.axis]=t.parse(i,e),n}function rl(i,n,t,e){let r=i.iScale,a=i.vScale,o=r.getLabels(),s=r===a,c=[],l,d,u,h;for(l=t,d=t+e;l<d;++l)h=n[l],u={},u[r.axis]=s||r.parse(o[l],l),c.push(Jl(h,u,a,l));return c}function bo(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Uf(i,n,t){return i!==0?Zt(i):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function qf(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 $f(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:c,top:l,bottom:d}=qf(i);r==="middle"&&t&&(i.enableBorderRadius=!0,(t._top||0)===e?r=l:(t._bottom||0)===e?r=d:(a[al(d,o,s,c)]=!0,r=l)),a[al(r,o,s,c)]=!0,i.borderSkipped=a}function al(i,n,t,e){return e?(i=Gf(i,n,t),i=ol(i,t,n)):i=ol(i,n,t),i}function Gf(i,n,t){return i===n?t:i===t?n:i}function ol(i,n,t){return i==="start"?n:i==="end"?t:i}function Qf(i,{inflateAmount:n},t){i.inflateAmount=n==="auto"?t===1?.33:0:n}var Xf=(()=>{class i extends Ye{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 rl(t,e,r,a)}parseArrayData(t,e,r,a){return rl(t,e,r,a)}parseObjectData(t,e,r,a){let{iScale:o,vScale:s}=t,{xAxisKey:c="x",yAxisKey:l="y"}=this._parsing,d=o.axis==="x"?c:l,u=s.axis==="x"?c:l,h=[],f,m,p,g;for(f=r,m=r+a;f<m;++f)g=e[f],p={},p[o.axis]=o.parse(xe(g,d),f),h.push(Jl(xe(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,c=bo(s)?"["+s.start+", "+s.end+"]":""+a.getLabelForValue(o[a.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:c}}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:c}}=this,l=c.getBasePixel(),d=c.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||j(p[c.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,u),_=(p._stacks||{})[c.axis],k={horizontal:d,base:g.base,enableBorderRadius:!_||bo(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;$f(k,C,_,s),Qf(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=[],c=this._cachedMeta.controller.getParsed(e),l=c&&c[r.axis],d=u=>{let h=u._parsed.find(m=>m[r.axis]===l),f=h&&h[u.vScale.axis];if(j(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[W(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 c=t.barThickness;return{min:c||Hf(e),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:r,index:a},options:{base:o,minBarLength:s}}=this,c=o||0,l=this.getParsed(t),d=l._custom,u=bo(d),h=l[e.axis],f=0,m=r?this.applyStack(e,l,r):h,p,g;m!==h&&(f=m-h,m=h),u&&(h=d.barStart,m=d.barEnd-d.barStart,h!==0&&Zt(h)!==Zt(d.barEnd)&&(f=0),f+=h);let b=!j(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=Uf(g,e,c)*s,h===c&&(_-=g/2);let k=e.getPixelForDecimal(0),C=e.getPixelForDecimal(1),v=Math.min(k,C),x=Math.max(k,C);_=Math.max(Math.min(_,x),v),p=_+g,r&&!u&&(l._stacks[e.axis]._visualValues[a]=e.getValueForPixel(p)-e.getValueForPixel(_))}if(_===e.getPixelForValue(c)){let k=Zt(g)*e.getLineWidthForValue(c)/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=W(a.maxBarThickness,1/0),c,l,d=this._getAxisCount();if(e.grouped){let u=o?this._getStackCount(t):e.stackCount,h=a.barThickness==="flex"?Yf(t,e,a,u*d):Vf(t,e,a,u*d),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(W(f,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+m;c=h.start+h.chunk*p+h.chunk/2,l=Math.min(s,h.chunk*h.ratio)}else c=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,e.min*e.ratio);return{base:c-l/2,head:c+l/2,center:c,size:l}}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})(),Kf=(()=>{class i extends Ye{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 c=e[r+s];o[s]._custom=W(c[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 c=e[r+s];o[s]._custom=W(c&&c.r&&+c.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),c=a.getLabelForValue(s.x),l=o.getLabelForValue(s.y),d=s._custom;return{label:r[t]||"",value:"("+c+", "+l+(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:c}=this._cachedMeta,{sharedOptions:l,includeOptions:d}=this._getSharedOptions(e,a),u=s.axis,h=c.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?c.getBasePixel():c.getPixelForValue(p[h]);g.skip=isNaN(b)||isNaN(_),d&&(g.options=l||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+=W(r&&r._custom,o),a}}return i})();function Zf(i,n,t){let e=1,r=1,a=0,o=0;if(n<nt){let s=i,c=s+n,l=Math.cos(s),d=Math.sin(s),u=Math.cos(c),h=Math.sin(c),f=(k,C,v)=>Pi(k,s,c,!0)?1:Math.max(C,C*t,v,v*t),m=(k,C,v)=>Pi(k,s,c,!0)?-1:Math.min(C,C*t,v,v*t),p=f(0,l,u),g=f(ut,d,h),b=m(G,l,u),_=m(G+ut,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 qo=(()=>{class i extends Ye{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:c}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,d)=>{let h=t.getDatasetMeta(0).controller.getStyle(d);return{text:l,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&&(c||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=l=>+r[l];if(U(r[t])){let{key:l="value"}=this._parsing;o=d=>+xe(r[d],l)}let s,c;for(s=t,c=t+e;s<c;++s)a._parsed[s]=o(s)}}_getRotation(){return jt(this.options.rotation-90)}_getCircumference(){return jt(this.options.circumference)}_getRotationExtents(){let t=nt,e=-nt;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,c=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(Cc(this.options.cutout,c),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:p,offsetY:g}=Zf(h,u,l),b=(r.width-s)/f,_=(r.height-s)/m,k=Math.max(Math.min(b,_)/2,0),C=Na(this.options.radius,k),v=Math.max(C*l,0),x=(C-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*C,this.offsetY=g*C,a.total=this.calculateTotal(),this.outerRadius=C-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*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/nt)}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,c=s.chartArea,d=s.options.animation,u=(c.left+c.right)/2,h=(c.top+c.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],x={x:u+this.offsetX,y:h+this.offsetY,startAngle:_,endAngle:_+C,circumference:C,outerRadius:p,innerRadius:m};b&&(x.options=g||this.resolveDataElementOptions(k,v.active?"active":a)),_+=C,this.updateElement(v,k,x,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)?nt*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,r=this.chart,a=r.data.labels||[],o=Si(e._parsed[t],r.options.locale);return{label:a[t]||"",value:o}}getMaxBorderWidth(t){let e=0,r=this.chart,a,o,s,c,l;if(!t){for(a=0,o=r.data.datasets.length;a<o;++a)if(r.isDatasetVisible(a)){s=r.getDatasetMeta(a),t=s.data,c=s.controller;break}}if(!t)return 0;for(a=0,o=t.length;a<o;++a)l=c.resolveDataElementOptions(a),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.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(W(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return i})(),Jf=(()=>{class i extends Ye{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:c,count:l}=Qa(e,a,s);this._drawStart=c,this._drawCount=l,Xa(e)&&(c=0,l=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,c,l,t)}updateElements(t,e,r,a){let o=a==="reset",{iScale:s,vScale:c,_stacked:l,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,a),f=s.axis,m=c.axis,{spanGaps:p,segment:g}=this.options,b=Je(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 x=0;x<C;++x){let P=t[x],D=_?P:{};if(x<e||x>=k){D.skip=!0;continue}let S=this.getParsed(x),F=j(S[m]),B=D[f]=s.getPixelForValue(S[f],x),H=D[m]=o||F?c.getBasePixel():c.getPixelForValue(l?this.applyStack(c,S,l):S[m],x);D.skip=isNaN(B)||isNaN(H)||F,D.stop=x>0&&Math.abs(S[f]-v[f])>b,g&&(D.parsed=S,D.raw=d.data[x]),h&&(D.options=u||this.resolveDataElementOptions(x,P.active?"active":a)),_||this.updateElement(P,x,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})(),td=(()=>{class i extends Ye{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 l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.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=Si(e._parsed[t].r,r.options.locale);return{label:a[t]||"",value:o}}parseObjectData(t,e,r,a){return ao.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),c=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,e,r,a){let o=a==="reset",s=this.chart,l=s.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,h=d.yCenter,f=d.getIndexAngle(0)-.5*G,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&&(l.animateScale&&(C=0),l.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)?jt(this.resolveDataElementOptions(t,e).angle||r):0}}return i})(),tm=(()=>{class i extends qo{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return i})(),em=(()=>{class i extends Ye{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 ao.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 c={_loop:!0,_fullLoop:o.length===a.length,options:s};this.updateElement(r,void 0,c,t)}this.updateElements(a,0,a.length,t)}updateElements(t,e,r,a){let o=this._cachedMeta.rScale,s=a==="reset";for(let c=e;c<e+r;c++){let l=t[c],d=this.resolveDataElementOptions(c,l.active?"active":a),u=o.getPointPositionForValue(c,this.getParsed(c).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(l,c,m,a)}}}return i})(),im=(()=>{class i extends Ye{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),c=a.getLabelForValue(s.x),l=o.getLabelForValue(s.y);return{label:r[t]||"",value:"("+c+", "+l+")"}}update(t){let e=this._cachedMeta,{data:r=[]}=e,a=this.chart._animationsDisabled,{start:o,count:s}=Qa(e,r,a);if(this._drawStart=o,this._drawCount=s,Xa(e)&&(o=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:c,_dataset:l}=e;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!l._decimated,c.points=r;let d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(c,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:c,_stacked:l,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(e,a),h=this.getSharedOptions(u),f=this.includeOptions(a,h),m=s.axis,p=c.axis,{spanGaps:g,segment:b}=this.options,_=Je(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 x=t[v],P=this.getParsed(v),D=k?x:{},S=j(P[p]),F=D[m]=s.getPixelForValue(P[m],v),B=D[p]=o||S?c.getBasePixel():c.getPixelForValue(l?this.applyStack(c,P,l):P[p],v);D.skip=isNaN(F)||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,x.active?"active":a)),k||this.updateElement(x,v,D,a),C=P}this.updateSharedOptions(h,a,u)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let c=0;for(let l=e.length-1;l>=0;--l)c=Math.max(c,e[l].size(this.resolveDataElementOptions(l))/2);return c>0&&c}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})(),nm=Object.freeze({__proto__:null,BarController:Xf,BubbleController:Kf,DoughnutController:qo,LineController:Jf,PieController:tm,PolarAreaController:td,RadarController:em,ScatterController:im});function ei(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Do=class i{static override(n){Object.assign(i.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return ei()}parse(){return ei()}format(){return ei()}add(){return ei()}diff(){return ei()}startOf(){return ei()}endOf(){return ei()}},$o={_date:Do};function rm(i,n,t,e){let{controller:r,data:a,_sorted:o}=i,s=r._cachedMeta.iScale,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(s&&n===s.axis&&n!=="r"&&o&&a.length){let l=s._reversePixels?Ic:ne;if(e){if(r._sharedOptions){let d=a[0],u=typeof d.getRange=="function"&&d.getRange(n);if(u){let h=l(a,n,t-u),f=l(a,n,t+u);return{lo:h.lo,hi:f.hi}}}}else{let d=l(a,n,t);if(c){let{vScale:u}=r._cachedMeta,{_parsed:h}=i,f=h.slice(0,d.lo+1).reverse().findIndex(p=>!j(p[u.axis]));d.lo-=Math.max(0,f);let m=h.slice(d.hi).findIndex(p=>!j(p[u.axis]));d.hi+=Math.max(0,m)}return d}}return{lo:0,hi:a.length-1}}function yn(i,n,t,e,r){let a=i.getSortedVisibleDatasetMetas(),o=t[n];for(let s=0,c=a.length;s<c;++s){let{index:l,data:d}=a[s],{lo:u,hi:h}=rm(a[s],n,o,r);for(let f=u;f<=h;++f){let m=d[f];m.skip||e(m,l,f)}}}function am(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 _o(i,n,t,e,r){let a=[];return!r&&!i.isPointInArea(n)||yn(i,t,n,function(s,c,l){!r&&!re(s,i.chartArea,0)||s.inRange(n.x,n.y,e)&&a.push({element:s,datasetIndex:c,index:l})},!0),a}function om(i,n,t,e){let r=[];function a(o,s,c){let{startAngle:l,endAngle:d}=o.getProps(["startAngle","endAngle"],e),{angle:u}=ja(o,{x:n.x,y:n.y});Pi(u,l,d)&&r.push({element:o,datasetIndex:s,index:c})}return yn(i,t,n,a),r}function sm(i,n,t,e,r,a){let o=[],s=am(t),c=Number.POSITIVE_INFINITY;function l(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<c?(o=[{element:d,datasetIndex:u,index:h}],c=g):g===c&&o.push({element:d,datasetIndex:u,index:h})}return yn(i,t,n,l),o}function vo(i,n,t,e,r,a){return!a&&!i.isPointInArea(n)?[]:t==="r"&&!e?om(i,n,t,r):sm(i,n,t,e,r,a)}function sl(i,n,t,e,r){let a=[],o=t==="x"?"inXRange":"inYRange",s=!1;return yn(i,t,n,(c,l,d)=>{c[o]&&c[o](n[t],r)&&(a.push({element:c,datasetIndex:l,index:d}),s=s||c.inRange(n.x,n.y,r))}),e&&!s?[]:a}var cm={evaluateInteractionItems:yn,modes:{index(i,n,t,e){let r=He(n,i),a=t.axis||"x",o=t.includeInvisible||!1,s=t.intersect?_o(i,r,a,e,o):vo(i,r,a,!1,e,o),c=[];return s.length?(i.getSortedVisibleDatasetMetas().forEach(l=>{let d=s[0].index,u=l.data[d];u&&!u.skip&&c.push({element:u,datasetIndex:l.index,index:d})}),c):[]},dataset(i,n,t,e){let r=He(n,i),a=t.axis||"xy",o=t.includeInvisible||!1,s=t.intersect?_o(i,r,a,e,o):vo(i,r,a,!1,e,o);if(s.length>0){let c=s[0].datasetIndex,l=i.getDatasetMeta(c).data;s=[];for(let d=0;d<l.length;++d)s.push({element:l[d],datasetIndex:c,index:d})}return s},point(i,n,t,e){let r=He(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return _o(i,r,a,e,o)},nearest(i,n,t,e){let r=He(n,i),a=t.axis||"xy",o=t.includeInvisible||!1;return vo(i,r,a,t.intersect,e,o)},x(i,n,t,e){let r=He(n,i);return sl(i,r,"x",t.intersect,e)},y(i,n,t,e){let r=He(n,i);return sl(i,r,"y",t.intersect,e)}}},ed=["left","top","right","bottom"];function un(i,n){return i.filter(t=>t.pos===n)}function cl(i,n){return i.filter(t=>ed.indexOf(t.pos)===-1&&t.box.axis===n)}function hn(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 lm(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 dm(i){let n={};for(let t of i){let{stack:e,pos:r,stackWeight:a}=t;if(!e||!ed.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 um(i,n){let t=dm(i),{vBoxMaxWidth:e,hBoxMaxHeight:r}=n,a,o,s;for(a=0,o=i.length;a<o;++a){s=i[a];let{fullSize:c}=s.box,l=t[s.stack],d=l&&s.stackWeight/l.weight;s.horizontal?(s.width=d?d*e:c&&n.availableWidth,s.height=r):(s.width=e,s.height=d?d*r:c&&n.availableHeight)}return t}function hm(i){let n=lm(i),t=hn(n.filter(l=>l.box.fullSize),!0),e=hn(un(n,"left"),!0),r=hn(un(n,"right")),a=hn(un(n,"top"),!0),o=hn(un(n,"bottom")),s=cl(n,"x"),c=cl(n,"y");return{fullSize:t,leftAndTop:e.concat(a),rightAndBottom:r.concat(c).concat(o).concat(s),chartArea:un(n,"chartArea"),vertical:e.concat(r).concat(c),horizontal:a.concat(o).concat(s)}}function ll(i,n,t,e){return Math.max(i[t],n[t])+Math.max(i[e],n[e])}function id(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 fm(i,n,t,e){let{pos:r,box:a}=t,o=i.maxPadding;if(!U(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&&id(o,a.getPadding());let s=Math.max(0,n.outerWidth-ll(o,i,"left","right")),c=Math.max(0,n.outerHeight-ll(o,i,"top","bottom")),l=s!==i.w,d=c!==i.h;return i.w=s,i.h=c,t.horizontal?{same:l,other:d}:{same:d,other:l}}function mm(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 pm(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 pn(i,n,t,e){let r=[],a,o,s,c,l,d;for(a=0,o=i.length,l=0;a<o;++a){s=i[a],c=s.box,c.update(s.width||n.w,s.height||n.h,pm(s.horizontal,n));let{same:u,other:h}=fm(n,t,s,e);l|=u&&r.length,d=d||h,c.fullSize||r.push(s)}return l&&pn(r,n,t,e)||d}function ur(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 dl(i,n,t,e){let r=t.padding,{x:a,y:o}=n;for(let s of i){let c=s.box,l=e[s.stack]||{count:1,placed:0,weight:1},d=s.stackWeight/l.weight||1;if(s.horizontal){let u=n.w*d,h=l.size||c.height;Mi(l.start)&&(o=l.start),c.fullSize?ur(c,r.left,o,t.outerWidth-r.right-r.left,h):ur(c,n.left+l.placed,o,u,h),l.start=o,l.placed+=u,o=c.bottom}else{let u=n.h*d,h=l.size||c.width;Mi(l.start)&&(a=l.start),c.fullSize?ur(c,a,r.top,h,t.outerHeight-r.bottom-r.top):ur(c,a,n.top+l.placed,h,u),l.start=a,l.placed+=u,a=c.right}}n.x=a,n.y=o}var St={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=wt(i.options.layout.padding),a=Math.max(n-r.width,0),o=Math.max(t-r.height,0),s=hm(i.boxes),c=s.vertical,l=s.horizontal;X(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=c.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);id(h,wt(e));let f=Object.assign({maxPadding:h,w:a,h:o,x:r.left,y:r.top},r),m=um(c.concat(l),u);pn(s.fullSize,f,u,m),pn(c,f,u,m),pn(l,f,u,m)&&pn(c,f,u,m),mm(f),dl(s.leftAndTop,f,u,m),f.x+=f.w,f.y+=f.h,dl(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},X(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})})}},yr=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){}},Po=class extends yr{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}},br="$chartjs",gm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ul=i=>i===null||i==="";function bm(i,n){let t=i.style,e=i.getAttribute("height"),r=i.getAttribute("width");if(i[br]={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",ul(r)){let a=so(i,"width");a!==void 0&&(i.width=a)}if(ul(e))if(i.style.height==="")i.height=i.width/(n||2);else{let a=so(i,"height");a!==void 0&&(i.height=a)}return i}var nd=$c?{passive:!0}:!1;function _m(i,n,t){i&&i.addEventListener(n,t,nd)}function vm(i,n,t){i&&i.canvas&&i.canvas.removeEventListener(n,t,nd)}function ym(i,n){let t=gm[i.type]||i.type,{x:e,y:r}=He(i,n);return{type:t,chart:n,native:i,x:e!==void 0?e:null,y:r!==void 0?r:null}}function xr(i,n){for(let t of i)if(t===n||t.contains(n))return!0}function xm(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||xr(s.addedNodes,e),o=o&&!xr(s.removedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function km(i,n,t){let e=i.canvas,r=new MutationObserver(a=>{let o=!1;for(let s of a)o=o||xr(s.removedNodes,e),o=o&&!xr(s.addedNodes,e);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}var bn=new Map,hl=0;function rd(){let i=window.devicePixelRatio;i!==hl&&(hl=i,bn.forEach((n,t)=>{t.currentDevicePixelRatio!==i&&n()}))}function wm(i,n){bn.size||window.addEventListener("resize",rd),bn.set(i,n)}function Cm(i){bn.delete(i),bn.size||window.removeEventListener("resize",rd)}function Tm(i,n,t){let e=i.canvas,r=e&&lr(e);if(!r)return;let a=Ga((s,c)=>{let l=r.clientWidth;t(s,c),l<r.clientWidth&&t()},window),o=new ResizeObserver(s=>{let c=s[0],l=c.contentRect.width,d=c.contentRect.height;l===0&&d===0||a(l,d)});return o.observe(r),wm(i,a),o}function yo(i,n,t){t&&t.disconnect(),n==="resize"&&Cm(i)}function Mm(i,n,t){let e=i.canvas,r=Ga(a=>{i.ctx!==null&&t(ym(a,i))},i);return _m(e,n,r),r}var So=class extends yr{acquireContext(n,t){let e=n&&n.getContext&&n.getContext("2d");return e&&e.canvas===n?(bm(n,t),e):null}releaseContext(n){let t=n.canvas;if(!t[br])return!1;let e=t[br].initial;["height","width"].forEach(a=>{let o=e[a];j(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[br],!0}addEventListener(n,t,e){this.removeEventListener(n,t);let r=n.$proxies||(n.$proxies={}),o={attach:xm,detach:km,resize:Tm}[t]||Mm;r[t]=o(n,t,e)}removeEventListener(n,t){let e=n.$proxies||(n.$proxies={}),r=e[t];if(!r)return;({attach:yo,detach:yo,resize:yo}[t]||vm)(n,t,r),e[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,e,r){return qc(n,t,e,r)}isAttached(n){let t=n&&lr(n);return!!(t&&t.isConnected)}};function Dm(i){return!cr()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Po:So}var Jt=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 Je(this.x)&&Je(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 Pm(i,n){let t=i.options.ticks,e=Sm(i),r=Math.min(t.maxTicksLimit||e,e),a=t.major.enabled?Om(n):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>r)return Am(n,l,a,o/r),l;let d=Im(a,n,r);if(o>0){let u,h,f=o>1?Math.round((c-s)/(o-1)):null;for(hr(n,l,d,j(f)?0:s-f,s),u=0,h=o-1;u<h;u++)hr(n,l,d,a[u],a[u+1]);return hr(n,l,d,c,j(f)?n.length:c+f),l}return hr(n,l,d),l}function Sm(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 Im(i,n,t){let e=Rm(i),r=n.length/t;if(!e)return Math.max(r,1);let a=Dc(e);for(let o=0,s=a.length-1;o<s;o++){let c=a[o];if(c>r)return c}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 Am(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 hr(i,n,t,e,r){let a=W(e,0),o=Math.min(W(r,i.length),i.length),s=0,c,l,d;for(t=Math.ceil(t),r&&(c=r-e,t=c/Math.floor(c/t)),d=a;d<0;)s++,d=Math.round(a+s*t);for(l=Math.max(a,0);l<o;l++)l===d&&(n.push(i[l]),s++,d=Math.round(a+s*t))}function Rm(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 Em=i=>i==="left"?"right":i==="right"?"left":i,fl=(i,n,t)=>n==="top"||n==="left"?i[n]+t:i[n]-t,ml=(i,n)=>Math.min(n||i,i);function pl(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 Lm(i,n,t){let e=i.ticks.length,r=Math.min(n,e-1),a=i._startPixel,o=i._endPixel,s=1e-6,c=i.getPixelForTick(r),l;if(!(t&&(e===1?l=Math.max(c-a,o-c):n===0?l=(i.getPixelForTick(1)-c)/2:l=(c-i.getPixelForTick(r-1))/2,c+=r<n?l:-l,c<a-s||c>o+s)))return c}function Fm(i,n){X(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 fn(i){return i.drawTicks?i.tickLength:0}function gl(i,n){if(!i.display)return 0;let t=ht(i.font,n),e=wt(i.padding);return(it(i.text)?i.text.length:1)*t.lineHeight+e.height}function zm(i,n){return ke(i,{scale:n,type:"scale"})}function Bm(i,n,t){return ke(i,{tick:t,index:n,type:"tick"})}function Nm(i,n,t){let e=nr(i);return(t&&n!=="right"||!t&&n==="right")&&(e=Em(e)),e}function Wm(i,n,t,e){let{top:r,left:a,bottom:o,right:s,chart:c}=i,{chartArea:l,scales:d}=c,u=0,h,f,m,p=o-r,g=s-a;if(i.isHorizontal()){if(f=kt(e,a,s),U(t)){let b=Object.keys(t)[0],_=t[b];m=d[b].getPixelForValue(_)+p-n}else t==="center"?m=(l.bottom+l.top)/2+p-n:m=fl(i,t,n);h=s-a}else{if(U(t)){let b=Object.keys(t)[0],_=t[b];f=d[b].getPixelForValue(_)-g+n}else t==="center"?f=(l.left+l.right)/2-g+n:f=fl(i,t,n);m=kt(e,o,r),u=t==="left"?-ut:ut}return{titleX:f,titleY:m,maxWidth:h,rotation:u}}var ni=class i extends Jt{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=Rt(n,Number.POSITIVE_INFINITY),t=Rt(t,Number.NEGATIVE_INFINITY),e=Rt(e,Number.POSITIVE_INFINITY),r=Rt(r,Number.NEGATIVE_INFINITY),{min:Rt(n,e),max:Rt(t,r),minDefined:lt(n),maxDefined:lt(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 c=0,l=s.length;c<l;++c)o=s[c].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:Rt(t,Rt(e,t)),max:Rt(e,Rt(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(){tt(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=Wc(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let c=s<this.ticks.length;this._convertTicksToLabels(c?pl(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Pm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&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(){tt(this.options.afterUpdate,[this])}beforeSetDimensions(){tt(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(){tt(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),tt(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){tt(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=tt(t.callback,[a.value,e,n],this)}afterTickToLabelConversion(){tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let n=this.options,t=n.ticks,e=ml(this.ticks.length,n.ticks.maxTicksLimit),r=t.minRotation||0,a=t.maxRotation,o=r,s,c,l;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)),c=this.maxHeight-fn(n.grid)-t.padding-gl(n.title,this.chart.options.font),l=Math.sqrt(u*u+h*h),o=er(Math.min(Math.asin(pt((d.highest.height+6)/s,-1,1)),Math.asin(pt(c/l,-1,1))-Math.asin(pt(h/l,-1,1)))),o=Math.max(r,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){tt(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 c=gl(r,t.options.font);if(s?(n.width=this.maxWidth,n.height=fn(a)+c):(n.height=this.maxHeight,n.width=fn(a)+c),e.display&&this.ticks.length){let{first:l,last:d,widest:u,highest:h}=this._getLabelSizes(),f=e.padding*2,m=jt(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(l,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,c=this.labelRotation!==0,l=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;c?l?(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(){tt(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++)j(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=pl(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=[],c=Math.floor(t/ml(t,e)),l=0,d=0,u,h,f,m,p,g,b,_,k,C,v;for(u=0;u<t;u+=c){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,!j(m)&&!it(m))k=an(r,b.data,b.gc,k,m),C=_;else if(it(m))for(h=0,f=m.length;h<f;++h)v=m[h],!j(v)&&!it(v)&&(k=an(r,b.data,b.gc,k,v),C+=_);o.push(k),s.push(C),l=Math.max(k,l),d=Math.max(C,d)}Fm(a,t);let x=o.indexOf(l),P=s.indexOf(d),D=S=>({width:o[S]||0,height:s[S]||0});return{first:D(0),last:D(t-1),widest:D(x),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 Sc(this._alignToPixels?Be(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=Bm(this.getContext(),n,e))}return this.$context||(this.$context=zm(this.chart.getContext(),this))}_tickSize(){let n=this.options.ticks,t=jt(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,c=a?a.highest.height+o:0;return this.isHorizontal()?c*e>s*r?s/e:c/r:c*r<s*e?c/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,c=a.offset,l=this.isHorizontal(),u=this.ticks.length+(c?1:0),h=fn(a),f=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,b=function(Y){return Be(e,Y,p)},_,k,C,v,x,P,D,S,F,B,H,ot;if(o==="top")_=b(this.bottom),P=this.bottom-h,S=_-g,B=b(n.top)+g,ot=n.bottom;else if(o==="bottom")_=b(this.top),B=n.top,ot=b(n.bottom)-g,P=_+g,S=this.top+h;else if(o==="left")_=b(this.right),x=this.right-h,D=_-g,F=b(n.left)+g,H=n.right;else if(o==="right")_=b(this.left),F=n.left,H=b(n.right)-g,x=_+g,D=this.left+h;else if(t==="x"){if(o==="center")_=b((n.top+n.bottom)/2+.5);else if(U(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}B=n.top,ot=n.bottom,P=_+g,S=P+h}else if(t==="y"){if(o==="center")_=b((n.left+n.right)/2);else if(U(o)){let Y=Object.keys(o)[0],K=o[Y];_=b(this.chart.scales[Y].getPixelForValue(K))}x=_-g,D=x-h,F=n.left,H=n.right}let vt=W(r.ticks.maxTicksLimit,u),N=Math.max(1,Math.ceil(u/vt));for(k=0;k<u;k+=N){let Y=this.getContext(k),K=a.setContext(Y),Ft=s.setContext(Y),ft=K.lineWidth,Me=K.color,De=Ft.dash||[],Bt=Ft.dashOffset,Pe=K.tickWidth,Nt=K.tickColor,Se=K.tickBorderDash||[],te=K.tickBorderDashOffset;C=Lm(this,k,c),C!==void 0&&(v=Be(e,C,ft),l?x=D=F=H=v:P=S=B=ot=v,f.push({tx1:x,ty1:P,tx2:D,ty2:S,x1:F,y1:B,x2:H,y2:ot,width:ft,color:Me,borderDash:De,borderDashOffset:Bt,tickWidth:Pe,tickColor:Nt,tickBorderDash:Se,tickBorderDashOffset:te}))}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:c,crossAlign:l,padding:d,mirror:u}=a,h=fn(e.grid),f=h+d,m=u?-d:f,p=-jt(this.labelRotation),g=[],b,_,k,C,v,x,P,D,S,F,B,H,ot="middle";if(r==="top")x=this.bottom-m,P=this._getXAxisLabelAlignment();else if(r==="bottom")x=this.top+m,P=this._getXAxisLabelAlignment();else if(r==="left"){let N=this._getYAxisLabelAlignment(h);P=N.textAlign,v=N.x}else if(r==="right"){let N=this._getYAxisLabelAlignment(h);P=N.textAlign,v=N.x}else if(t==="x"){if(r==="center")x=(n.top+n.bottom)/2+f;else if(U(r)){let N=Object.keys(r)[0],Y=r[N];x=this.chart.scales[N].getPixelForValue(Y)+f}P=this._getXAxisLabelAlignment()}else if(t==="y"){if(r==="center")v=(n.left+n.right)/2-f;else if(U(r)){let N=Object.keys(r)[0],Y=r[N];v=this.chart.scales[N].getPixelForValue(Y)}P=this._getYAxisLabelAlignment(h).textAlign}t==="y"&&(c==="start"?ot="top":c==="end"&&(ot="bottom"));let vt=this._getLabelSizes();for(b=0,_=s.length;b<_;++b){k=s[b],C=k.label;let N=a.setContext(this.getContext(b));D=this.getPixelForTick(b)+a.labelOffset,S=this._resolveTickFontOptions(b),F=S.lineHeight,B=it(C)?C.length:1;let Y=B/2,K=N.color,Ft=N.textStrokeColor,ft=N.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"?l==="near"||p!==0?H=-B*F+F/2:l==="center"?H=-vt.highest.height/2-Y*F+F:H=-vt.highest.height+F/2:l==="near"||p!==0?H=F/2:l==="center"?H=vt.highest.height/2-Y*F:H=vt.highest.height-B*F,u&&(H*=-1),p!==0&&!N.showLabelBackdrop&&(v+=F/2*Math.sin(p))):(x=D,H=(1-B)*F/2);let De;if(N.showLabelBackdrop){let Bt=wt(N.backdropPadding),Pe=vt.heights[b],Nt=vt.widths[b],Se=H-Bt.top,te=0-Bt.left;switch(ot){case"middle":Se-=Pe/2;break;case"bottom":Se-=Pe;break}switch(P){case"center":te-=Nt/2;break;case"right":te-=Nt;break;case"inner":b===_-1?te-=Nt:b>0&&(te-=Nt/2);break}De={left:te,top:Se,width:Nt+Bt.width,height:Pe+Bt.height,color:N.backdropColor}}g.push({label:C,font:S,textOffset:H,options:{rotation:p,color:K,strokeColor:Ft,strokeWidth:ft,textAlign:Me,textBaseline:ot,translation:[v,x],backdrop:De}})}return g}_getXAxisLabelAlignment(){let{position:n,ticks:t}=this.options;if(-jt(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,c=o.widest.width,l,d;return t==="left"?r?(d=this.right+a,e==="near"?l="left":e==="center"?(l="center",d+=c/2):(l="right",d+=c)):(d=this.right-s,e==="near"?l="right":e==="center"?(l="center",d-=c/2):(l="left",d=this.left)):t==="right"?r?(d=this.left+a,e==="near"?l="right":e==="center"?(l="center",d-=c/2):(l="left",d-=c)):(d=this.left+s,e==="near"?l="left":e==="center"?(l="center",d+=c/2):(l="right",d=this.right)):l="right",{textAlign:l,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=(c,l,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(c.x,c.y),e.lineTo(l.x,l.y),e.stroke(),e.restore())};if(t.display)for(a=0,o=r.length;a<o;++a){let c=r[a];t.drawOnChartArea&&s({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),t.drawTicks&&s({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.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,c=this._borderValue,l,d,u,h;this.isHorizontal()?(l=Be(n,this.left,o)-o/2,d=Be(n,this.right,s)+s/2,u=h=c):(u=Be(n,this.top,o)-o/2,h=Be(n,this.bottom,s)+s/2,l=d=c),t.save(),t.lineWidth=a.width,t.strokeStyle=a.color,t.beginPath(),t.moveTo(l,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&&cn(e,r);let a=this.getLabelItems(n);for(let o of a){let s=o.options,c=o.font,l=o.label,d=o.textOffset;Ne(e,l,0,d,c,s)}r&&ln(e)}drawTitle(){let{ctx:n,options:{position:t,title:e,reverse:r}}=this;if(!e.display)return;let a=ht(e.font),o=wt(e.padding),s=e.align,c=a.lineHeight/2;t==="bottom"||t==="center"||U(t)?(c+=o.bottom,it(e.text)&&(c+=a.lineHeight*(e.text.length-1))):c+=o.top;let{titleX:l,titleY:d,maxWidth:u,rotation:h}=Wm(this,c,t,s);Ne(n,e.text,0,0,a,{color:e.color,maxWidth:u,rotation:h,textAlign:Nm(s,t,r),textBaseline:"middle",translation:[l,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=W(n.grid&&n.grid.z,-1),r=W(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 ht(t.font)}_maxDigits(){let n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}},Ri=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;Ym(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,Hm(n,o,e),this.override&&at.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 at[r]&&(delete at[r][e],this.override&&delete ze[e])}};function Hm(i,n,t){let e=wi(Object.create(null),[t?at.get(t):{},at.get(n),i.defaults]);at.set(n,e),i.defaultRoutes&&Vm(n,i.defaultRoutes),i.descriptors&&at.describe(n,i.descriptors)}function Vm(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(),c=o.join(".");at.route(a,r,c,s)})}function Ym(i){return"id"in i&&"defaults"in i}var Io=class{constructor(){this.controllers=new Ri(Ye,"datasets",!0),this.elements=new Ri(Jt,"elements"),this.plugins=new Ri(Object,"plugins"),this.scales=new Ri(ni,"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):X(r,o=>{let s=e||this._getRegistryForType(o);this._exec(n,s,o)})})}_exec(n,t,e){let r=tr(n);tt(e["before"+r],[],e),t[n](e),tt(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}},ce=new Io,Oo=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],c=[t,r,a.options];if(tt(s,c,o)===!1&&r.cancelable)return!1}return!0}invalidate(){j(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=W(e.options&&e.options.plugins,{}),a=jm(e);return r===!1&&!t?[]:qm(n,a,r,t)}_notifyStateChanges(n){let t=this._oldCache||[],e=this._cache,r=(a,o)=>a.filter(s=>!o.some(c=>s.plugin.id===c.plugin.id));this._notify(r(t,e),n,"stop"),this._notify(r(e,t),n,"start")}};function jm(i){let n={},t=[],e=Object.keys(ce.plugins.items);for(let a=0;a<e.length;a++)t.push(ce.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 Um(i,n){return!n&&i===!1?null:i===!0?{}:i}function qm(i,{plugins:n,localIds:t},e,r){let a=[],o=i.getContext();for(let s of n){let c=s.id,l=Um(e[c],r);l!==null&&a.push({plugin:s,options:$m(i.config,{plugin:s,local:t[c]},l,o)})}return a}function $m(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 Ao(i,n){let t=at.datasets[i]||{};return((n.datasets||{})[i]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function Gm(i,n){let t=i;return i==="_index_"?t=n:i==="_value_"&&(t=n==="x"?"y":"x"),t}function Qm(i,n){return i===n?"_index_":"_value_"}function bl(i){if(i==="x"||i==="y"||i==="r")return i}function Xm(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Ro(i,...n){if(bl(i))return i;for(let t of n){let e=t.axis||Xm(t.position)||i.length>1&&bl(i[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function _l(i,n,t){if(t[n+"AxisID"]===i)return{axis:n}}function Km(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 _l(i,"x",t[0])||_l(i,"y",t[0])}return{}}function Zm(i,n){let t=ze[i.type]||{scales:{}},e=n.scales||{},r=Ao(i.type,n),a=Object.create(null);return Object.keys(e).forEach(o=>{let s=e[o];if(!U(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 c=Ro(o,s,Km(o,i),at.scales[s.type]),l=Qm(c,r),d=t.scales||{};a[o]=Ti(Object.create(null),[{axis:c},s,d[c],d[l]])}),i.data.datasets.forEach(o=>{let s=o.type||i.type,c=o.indexAxis||Ao(s,n),d=(ze[s]||{}).scales||{};Object.keys(d).forEach(u=>{let h=Gm(u,c),f=o[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),Ti(a[f],[{axis:h},e[f],d[u]])})}),Object.keys(a).forEach(o=>{let s=a[o];Ti(s,[at.scales[s.type],at.scale])}),a}function ad(i){let n=i.options||(i.options={});n.plugins=W(n.plugins,{}),n.scales=Zm(i,n)}function od(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Jm(i){return i=i||{},i.data=od(i.data),ad(i),i}var vl=new Map,sd=new Set;function fr(i,n){let t=vl.get(i);return t||(t=n(),vl.set(i,t),sd.add(t)),t}var mn=(i,n,t)=>{let e=xe(n,t);e!==void 0&&i.add(e)},Eo=class{constructor(n){this._config=Jm(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=od(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(),ad(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return fr(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return fr(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return fr(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){let t=n.id,e=this.type;return fr(`${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 c=new Set;t.forEach(d=>{n&&(c.add(n),d.forEach(u=>mn(c,n,u))),d.forEach(u=>mn(c,r,u)),d.forEach(u=>mn(c,ze[a]||{},u)),d.forEach(u=>mn(c,at,u)),d.forEach(u=>mn(c,rr,u))});let l=Array.from(c);return l.length===0&&l.push(Object.create(null)),sd.has(t)&&o.set(t,l),l}chartOptionScopes(){let{options:n,type:t}=this;return[n,ze[t]||{},at.datasets[t]||{},{type:t},at,rr]}resolveNamedOptions(n,t,e,r=[""]){let a={$shared:!0},{resolver:o,subPrefixes:s}=yl(this._resolverCache,n,r),c=o;if(ep(o,t)){a.$shared=!1,e=ve(e)?e():e;let l=this.createResolver(n,e,s);c=Ze(o,e,l)}for(let l of t)a[l]=c[l];return a}createResolver(n,t,e=[""],r){let{resolver:a}=yl(this._resolverCache,n,e);return U(t)?Ze(a,t,void 0,r):a}};function yl(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:sr(n,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},e.set(r,a)),a}var tp=i=>U(i)&&Object.getOwnPropertyNames(i).some(n=>ve(i[n]));function ep(i,n){let{isScriptable:t,isIndexable:e}=io(i);for(let r of n){let a=t(r),o=e(r),s=(o||a)&&i[r];if(a&&(ve(s)||tp(s))||o&&it(s))return!0}return!1}var ip="4.5.1",np=["top","bottom","left","right","chartArea"];function xl(i,n){return i==="top"||i==="bottom"||np.indexOf(i)===-1&&n==="x"}function kl(i,n){return function(t,e){return t[i]===e[i]?t[n]-e[n]:t[i]-e[i]}}function wl(i){let n=i.chart,t=n.options.animation;n.notifyPlugins("afterRender"),tt(t&&t.onComplete,[i],n)}function rp(i){let n=i.chart,t=n.options.animation;tt(t&&t.onProgress,[i],n)}function cd(i){return cr()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var _r={},Cl=i=>{let n=cd(i);return Object.values(_r).filter(t=>t.canvas===n).pop()};function ap(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 op(i,n,t,e){return!t||i.type==="mouseout"?null:e?n:i}var sp=(()=>{class i{static defaults=at;static instances=_r;static overrides=ze;static registry=ce;static version=ip;static getChart=Cl;static register(...t){ce.add(...t),Tl()}static unregister(...t){ce.remove(...t),Tl()}constructor(t,e){let r=this.config=new Eo(e),a=cd(t),o=Cl(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||Dm(a)),this.platform.updateConfig(r);let c=this.platform.acquireContext(a,s.aspectRatio),l=c&&c.canvas,d=l&&l.height,u=l&&l.width;if(this.id=wc(),this.ctx=c,this.canvas=l,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 Oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ec(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],_r[this.id]=this,!c||!l){console.error("Failed to create chart: can't acquire context from the given item");return}we.listen(this,"complete",wl),we.listen(this,"progress",rp),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:a,_aspectRatio:o}=this;return j(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 ce}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oo(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ja(this.canvas,this.ctx),this}stop(){return we.stop(this),this}resize(t,e){we.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),c=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,oo(this,c,!0)&&(this.notifyPlugins("resize",{size:s}),tt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};X(e,(r,a)=>{r.id=a})}buildOrUpdateScales(){let t=this.options,e=t.scales,r=this.scales,a=Object.keys(r).reduce((s,c)=>(s[c]=!1,s),{}),o=[];e&&(o=o.concat(Object.keys(e).map(s=>{let c=e[s],l=Ro(s,c),d=l==="r",u=l==="x";return{options:c,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),X(o,s=>{let c=s.options,l=c.id,d=Ro(l,c),u=W(c.type,s.dtype);(c.position===void 0||xl(c.position,d)!==xl(s.dposition))&&(c.position=s.dposition),a[l]=!0;let h=null;if(l in r&&r[l].type===u)h=r[l];else{let f=ce.getScale(u);h=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(c,t)}),X(a,(s,c)=>{s||delete r[c]}),X(r,s=>{St.configure(this,s,s.options),St.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(kl("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),c=o.type||this.config.type;if(s.type&&s.type!==c&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=c,s.indexAxis=o.indexAxis||Ao(c,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 l=ce.getController(c),{datasetElementType:d,dataElementType:u}=at.datasets[c];Object.assign(l,{dataElementType:ce.getElement(u),datasetElementType:d&&ce.getElement(d)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){X(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||X(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(kl("z","_idx"));let{_active:c,_lastEvent:l}=this;l?this._eventHandler(l,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){X(this.scales,t=>{St.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Wa(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;ap(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,c)=>c+","+s.splice(1).join(","))),a=r(0);for(let o=1;o<e;o++)if(!Wa(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;St.update(this,this.width,this.height,t);let e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],X(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,ve(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&&(we.has(this)?this.attached&&!we.running(this)&&we.start(this):(this.draw(),wl({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=fo(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&cn(e,a),t.controller.draw(),a&&ln(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return re(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,a){let o=cm.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=ke(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(c=>c.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(),we.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(),Ja(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete _r[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,c)=>{o.offsetX=s,o.offsetY=c,this._eventHandler(o)};X(this.options.events,o=>r(o,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,r=(l,d)=>{e.addEventListener(this,l,d),t[l]=d},a=(l,d)=>{t[l]&&(e.removeEventListener(this,l,d),delete t[l])},o=(l,d)=>{this.canvas&&this.resize(l,d)},s,c=()=>{a("attach",c),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",c)},e.isAttached(this.canvas)?c():s()}unbindEvents(){X(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},X(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,c,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+a+"DatasetHoverStyle"]()),c=0,l=t.length;c<l;++c){s=t[c];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 c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:c.data[s],index:s}});!on(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=(l,d)=>l.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),s=o(e,t),c=r?t:o(t,e);s.length&&this.updateHoverStyle(s,a.mode,!1),c.length&&a.mode&&this.updateHoverStyle(c,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,c=this._getActiveElements(t,a,r,s),l=Mc(t),d=op(t,this._lastEvent,r,l);r&&(this._lastEvent=null,tt(o.onHover,[t,c,this],this),l&&tt(o.onClick,[t,c,this],this));let u=!on(c,a);return(u||e)&&(this._active=c,this._updateHoverStyles(c,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 Tl(){return X(sp.instances,i=>i._plugins.invalidate())}function cp(i,n,t){let{startAngle:e,x:r,y:a,outerRadius:o,innerRadius:s,options:c}=n,{borderWidth:l,borderJoinStyle:d}=c,u=Math.min(l/o,xt(e-t));if(i.beginPath(),i.arc(r,a,o-l/2,e+u/2,t-u/2),s>0){let h=Math.min(l/s,xt(e-t));i.arc(r,a,s+l/2,t-h/2,e+h/2,!0)}else{let h=Math.min(l/2,o*xt(e-t));if(d==="round")i.arc(r,a,h,t-G/2,e+G/2,!0);else if(d==="bevel"){let f=2*h*h,m=-f*Math.cos(t+G/2)+r,p=-f*Math.sin(t+G/2)+a,g=f*Math.cos(e+G/2)+r,b=f*Math.sin(e+G/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 lp(i,n,t){let{startAngle:e,pixelMargin:r,x:a,y:o,outerRadius:s,innerRadius:c}=n,l=r/s;i.beginPath(),i.arc(a,o,s,e-l,t+l),c>r?(l=r/c,i.arc(a,o,c,t+l,e-l,!0)):i.arc(a,o,r,t+ut,e-ut),i.closePath(),i.clip()}function dp(i){return or(i,["outerStart","outerEnd","innerStart","innerEnd"])}function up(i,n,t,e){let r=dp(i.options.borderRadius),a=(t-n)/2,o=Math.min(a,e*n/2),s=c=>{let l=(t-Math.min(a,c))*e/2;return pt(c,0,Math.min(a,l))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:pt(r.innerStart,0,o),innerEnd:pt(r.innerEnd,0,o)}}function Ai(i,n,t,e){return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function kr(i,n,t,e,r,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:d}=n,u=Math.max(n.outerRadius+e+t-l,0),h=d>0?d+e+t+l:0,f=0,m=r-c;if(e){let N=d>0?d-e:0,Y=u>0?u-e:0,K=(N+Y)/2,Ft=K!==0?m*K/(K+e):m;f=(m-Ft)/2}let p=Math.max(.001,m*u-t/G)/u,g=(m-p)/2,b=c+g+f,_=r-g-f,{outerStart:k,outerEnd:C,innerStart:v,innerEnd:x}=up(n,h,u,_-b),P=u-k,D=u-C,S=b+k/P,F=_-C/D,B=h+v,H=h+x,ot=b+v/B,vt=_-x/H;if(i.beginPath(),a){let N=(S+F)/2;if(i.arc(o,s,u,S,N),i.arc(o,s,u,N,F),C>0){let ft=Ai(D,F,o,s);i.arc(ft.x,ft.y,C,F,_+ut)}let Y=Ai(H,_,o,s);if(i.lineTo(Y.x,Y.y),x>0){let ft=Ai(H,vt,o,s);i.arc(ft.x,ft.y,x,_+ut,vt+Math.PI)}let K=(_-x/h+(b+v/h))/2;if(i.arc(o,s,h,_-x/h,K,!0),i.arc(o,s,h,K,b+v/h,!0),v>0){let ft=Ai(B,ot,o,s);i.arc(ft.x,ft.y,v,ot+Math.PI,b-ut)}let Ft=Ai(P,b,o,s);if(i.lineTo(Ft.x,Ft.y),k>0){let ft=Ai(P,S,o,s);i.arc(ft.x,ft.y,k,b-ut,S)}}else{i.moveTo(o,s);let N=Math.cos(S)*u+o,Y=Math.sin(S)*u+s;i.lineTo(N,Y);let K=Math.cos(F)*u+o,Ft=Math.sin(F)*u+s;i.lineTo(K,Ft)}i.closePath()}function hp(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s}=n,c=n.endAngle;if(a){kr(i,n,t,e,c,r);for(let l=0;l<a;++l)i.fill();isNaN(s)||(c=o+(s%nt||nt))}return kr(i,n,t,e,c,r),i.fill(),c}function fp(i,n,t,e,r){let{fullCircles:a,startAngle:o,circumference:s,options:c}=n,{borderWidth:l,borderJoinStyle:d,borderDash:u,borderDashOffset:h,borderRadius:f}=c,m=c.borderAlign==="inner";if(!l)return;i.setLineDash(u||[]),i.lineDashOffset=h,m?(i.lineWidth=l*2,i.lineJoin=d||"round"):(i.lineWidth=l,i.lineJoin=d||"bevel");let p=n.endAngle;if(a){kr(i,n,t,e,p,r);for(let g=0;g<a;++g)i.stroke();isNaN(s)||(p=o+(s%nt||nt))}m&&lp(i,n,p),c.selfJoin&&p-o>=G&&f===0&&d!=="miter"&&cp(i,n,p),a||(kr(i,n,t,e,p,r),i.stroke())}var Lo=class extends Jt{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}=ja(r,{x:n,y:t}),{startAngle:s,endAngle:c,innerRadius:l,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e),h=(this.options.spacing+this.options.borderWidth)/2,f=W(u,c-s),m=Pi(a,s,c)&&s!==c,p=f>=nt||m,g=oe(o,l+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:c,spacing:l}=this.options,d=(r+a)/2,u=(o+s+l+c)/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>nt?Math.floor(e/nt):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 c=1-Math.sin(Math.min(G,e||0)),l=r*c;n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,hp(n,this,l,a,o),fp(n,this,l,a,o),n.restore()}};function ld(i,n,t=n){i.lineCap=W(t.borderCapStyle,n.borderCapStyle),i.setLineDash(W(t.borderDash,n.borderDash)),i.lineDashOffset=W(t.borderDashOffset,n.borderDashOffset),i.lineJoin=W(t.borderJoinStyle,n.borderJoinStyle),i.lineWidth=W(t.borderWidth,n.borderWidth),i.strokeStyle=W(t.borderColor,n.borderColor)}function mp(i,n,t){i.lineTo(t.x,t.y)}function pp(i){return i.stepped?Bc:i.tension||i.cubicInterpolationMode==="monotone"?Nc:mp}function dd(i,n,t={}){let e=i.length,{start:r=0,end:a=e-1}=t,{start:o,end:s}=n,c=Math.max(r,o),l=Math.min(a,s),d=r<o&&a<o||r>s&&a>s;return{count:e,start:c,loop:n.loop,ilen:l<c&&!d?e+l-c:l-c}}function gp(i,n,t,e){let{points:r,options:a}=n,{count:o,start:s,loop:c,ilen:l}=dd(r,t,e),d=pp(a),{move:u=!0,reverse:h}=e||{},f,m,p;for(f=0;f<=l;++f)m=r[(s+(h?l-f:f))%o],!m.skip&&(u?(i.moveTo(m.x,m.y),u=!1):d(i,p,m,h,a.stepped),p=m);return c&&(m=r[(s+(h?l:0))%o],d(i,p,m,h,a.stepped)),!!c}function bp(i,n,t,e){let r=n.points,{count:a,start:o,ilen:s}=dd(r,t,e),{move:c=!0,reverse:l}=e||{},d=0,u=0,h,f,m,p,g,b,_=C=>(o+(l?s-C:C))%a,k=()=>{p!==g&&(i.lineTo(d,g),i.lineTo(d,p),i.lineTo(d,b))};for(c&&(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,x=C|0;x===m?(v<p?p=v:v>g&&(g=v),d=(u*d+C)/++u):(k(),i.lineTo(C,v),m=x,u=0,p=g=v),b=v}k()}function Fo(i){let n=i.options,t=n.borderDash&&n.borderDash.length;return!i._decimated&&!i._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?bp:gp}function _p(i){return i.stepped?Gc:i.tension||i.cubicInterpolationMode==="monotone"?Qc:Le}function vp(i,n,t,e){let r=n._path;r||(r=n._path=new Path2D,n.path(r,t,e)&&r.closePath()),ld(i,n.options),i.stroke(r)}function yp(i,n,t,e){let{segments:r,options:a}=n,o=Fo(n);for(let s of r)ld(i,a,s.style),i.beginPath(),o(i,n,s,{start:t,end:t+e-1})&&i.closePath(),i.stroke()}var xp=typeof Path2D=="function";function kp(i,n,t,e){xp&&!n.options.segment?vp(i,n,t,e):yp(i,n,t,e)}var Tr=(()=>{class i extends Jt{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;Uc(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=Kc(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=ho(this,{property:e,start:a,end:a});if(!s.length)return;let c=[],l=_p(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){c.push(m);continue}let g=Math.abs((a-m[e])/(p[e]-m[e])),b=l(m,p,g,r.stepped);b[e]=t[e],c.push(b)}return c.length===1?c[0]:c}pathSegment(t,e,r){return Fo(this)(t,this,e,r)}path(t,e,r){let a=this.segments,o=Fo(this),s=this._loop;e=e||0,r=r||this.points.length-e;for(let c of a)s&=o(t,this,c,{start:e,end:e+r-1});return!!s}draw(t,e,r,a){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),kp(t,this,r,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}return i})();function Ml(i,n,t,e){let r=i.options,{[t]:a}=i.getProps([t],e);return Math.abs(n-a)<r.radius+r.hitRadius}var wp=(()=>{class i extends Jt{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 Ml(this,t,"x",e)}inYRange(t,e){return Ml(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||!re(this,e,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,ar(t,r,this.x,this.y))}getRange(){let t=this.options||{};return t.radius+t.hitRadius}}return i})();function ud(i,n){let{x:t,y:e,base:r,width:a,height:o}=i.getProps(["x","y","base","width","height"],n),s,c,l,d,u;return i.horizontal?(u=o/2,s=Math.min(t,r),c=Math.max(t,r),l=e-u,d=e+u):(u=a/2,s=t-u,c=t+u,l=Math.min(e,r),d=Math.max(e,r)),{left:s,top:l,right:c,bottom:d}}function Ve(i,n,t,e){return i?0:pt(n,t,e)}function Cp(i,n,t){let e=i.options.borderWidth,r=i.borderSkipped,a=eo(e);return{t:Ve(r.top,a.top,0,t),r:Ve(r.right,a.right,0,n),b:Ve(r.bottom,a.bottom,0,t),l:Ve(r.left,a.left,0,n)}}function Tp(i,n,t){let{enableBorderRadius:e}=i.getProps(["enableBorderRadius"]),r=i.options.borderRadius,a=We(r),o=Math.min(n,t),s=i.borderSkipped,c=e||U(r);return{topLeft:Ve(!c||s.top||s.left,a.topLeft,0,o),topRight:Ve(!c||s.top||s.right,a.topRight,0,o),bottomLeft:Ve(!c||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Ve(!c||s.bottom||s.right,a.bottomRight,0,o)}}function Mp(i){let n=ud(i),t=n.right-n.left,e=n.bottom-n.top,r=Cp(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 xo(i,n,t,e){let r=n===null,a=t===null,s=i&&!(r&&a)&&ud(i,e);return s&&(r||oe(n,s.left,s.right))&&(a||oe(t,s.top,s.bottom))}function Dp(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Pp(i,n){i.rect(n.x,n.y,n.w,n.h)}function ko(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 zo=class extends Jt{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}=Mp(this),s=Dp(o.radius)?Ii:Pp;n.save(),(o.w!==a.w||o.h!==a.h)&&(n.beginPath(),s(n,ko(o,t,a)),n.clip(),s(n,ko(a,-t,o)),n.fillStyle=e,n.fill("evenodd")),n.beginPath(),s(n,ko(a,t)),n.fillStyle=r,n.fill(),n.restore()}inRange(n,t,e){return xo(this,n,t,e)}inXRange(n,t){return xo(this,n,null,t)}inYRange(n,t){return xo(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}},Sp=Object.freeze({__proto__:null,ArcElement:Lo,BarElement:zo,LineElement:Tr,PointElement:wp}),Bo=["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)"],Dl=Bo.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function hd(i){return Bo[i%Bo.length]}function fd(i){return Dl[i%Dl.length]}function Ip(i,n){return i.borderColor=hd(n),i.backgroundColor=fd(n),++n}function Op(i,n){return i.backgroundColor=i.data.map(()=>hd(n++)),n}function Ap(i,n){return i.backgroundColor=i.data.map(()=>fd(n++)),n}function Rp(i){let n=0;return(t,e)=>{let r=i.getDatasetMeta(e).controller;r instanceof qo?n=Op(t,n):r instanceof td?n=Ap(t,n):r&&(n=Ip(t,n))}}function Pl(i){let n;for(n in i)if(i[n].borderColor||i[n].backgroundColor)return!0;return!1}function Ep(i){return i&&(i.borderColor||i.backgroundColor)}function Lp(){return at.borderColor!=="rgba(0,0,0,0.1)"||at.backgroundColor!=="rgba(0,0,0,0.1)"}var Fp={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=Pl(e)||Ep(r)||a&&Pl(a)||Lp();if(!t.forceOverride&&o)return;let s=Rp(i);e.forEach(s)}};function zp(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),c=0,l=n+t-1,d=n,u,h,f,m,p;for(o[c++]=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 x=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,_=x;_<P;_++)m=.5*Math.abs((D-g)*(i[_].y-S)-(D-i[_].x)*(b-S)),m>f&&(f=m,h=i[_],p=_);o[c++]=h,d=p}return o[c++]=i[l],o}function Bp(i,n,t,e){let r=0,a=0,o,s,c,l,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],c=(s.x-_)/C*e,l=s.y;let v=c|0;if(v===d)l<m?(m=l,u=o):l>p&&(p=l,h=o),r=(a*r+s.x)/++a;else{let x=o-1;if(!j(u)&&!j(h)){let P=Math.min(u,h),D=Math.max(u,h);P!==f&&P!==x&&g.push(Ht(bt({},i[P]),{x:r})),D!==f&&D!==x&&g.push(Ht(bt({},i[D]),{x:r}))}o>0&&x!==f&&g.push(i[x]),g.push(s),d=v,a=0,m=p=l,u=h=f=o}}return g}function md(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 Sl(i){i.data.datasets.forEach(n=>{md(n)})}function Np(i,n){let t=n.length,e=0,r,{iScale:a}=i,{min:o,max:s,minDefined:c,maxDefined:l}=a.getUserBounds();return c&&(e=pt(ne(n,a.axis,o).lo,0,t-1)),l?r=pt(ne(n,a.axis,s).hi+1,e,t)-e:r=t-e,{start:e,count:r}}var Wp={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,n,t)=>{if(!t.enabled){Sl(i);return}let e=i.width;i.data.datasets.forEach((r,a)=>{let{_data:o,indexAxis:s}=r,c=i.getDatasetMeta(a),l=o||r.data;if(Oi([s,i.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;let d=i.scales[c.xAxisID];if(d.type!=="linear"&&d.type!=="time"||i.options.parsing)return;let{start:u,count:h}=Np(c,l),f=t.threshold||4*e;if(h<=f){md(r);return}j(o)&&(r._data=l,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=zp(l,u,h,e,t);break;case"min-max":m=Bp(l,u,h,e);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=m})},destroy(i){Sl(i)}};function Hp(i,n,t){let e=i.segments,r=i.points,a=n.points,o=[];for(let s of e){let{start:c,end:l}=s;l=Mr(c,l,r);let d=No(t,r[c],r[l],s.loop);if(!n.segments){o.push({source:s,target:d,start:r[c],end:r[l]});continue}let u=ho(n,d);for(let h of u){let f=No(t,a[h.start],a[h.end],h.loop),m=uo(s,r,f);for(let p of m)o.push({source:p,target:h,start:{[t]:Il(d,f,"start",Math.max)},end:{[t]:Il(d,f,"end",Math.min)}})}}return o}function No(i,n,t,e){if(e)return;let r=n[i],a=t[i];return i==="angle"&&(r=xt(r),a=xt(a)),{property:i,start:r,end:a}}function Vp(i,n){let{x:t=null,y:e=null}=i||{},r=n.points,a=[];return n.segments.forEach(({start:o,end:s})=>{s=Mr(o,s,r);let c=r[o],l=r[s];e!==null?(a.push({x:c.x,y:e}),a.push({x:l.x,y:e})):t!==null&&(a.push({x:t,y:c.y}),a.push({x:t,y:l.y}))}),a}function Mr(i,n,t){for(;n>i;n--){let e=t[n];if(!isNaN(e.x)&&!isNaN(e.y))break}return n}function Il(i,n,t,e){return i&&n?e(i[t],n[t]):i?i[t]:n?n[t]:0}function pd(i,n){let t=[],e=!1;return it(i)?(e=!0,t=i):t=Vp(i,n),t.length?new Tr({points:t,options:{tension:0},_loop:e,_fullLoop:e}):null}function Ol(i){return i&&i.fill!==!1}function Yp(i,n,t){let r=i[n].fill,a=[n],o;if(!t)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!lt(r))return r;if(o=i[r],!o)return!1;if(o.visible)return r;a.push(r),r=o.fill}return!1}function jp(i,n,t){let e=Gp(i);if(U(e))return isNaN(e.value)?!1:e;let r=parseFloat(e);return lt(r)&&Math.floor(r)===r?Up(e[0],n,r,t):["origin","start","end","stack","shape"].indexOf(e)>=0&&e}function Up(i,n,t,e){return(i==="-"||i==="+")&&(t=n+t),t===n||t<0||t>=e?!1:t}function qp(i,n){let t=null;return i==="start"?t=n.bottom:i==="end"?t=n.top:U(i)?t=n.getPixelForValue(i.value):n.getBasePixel&&(t=n.getBasePixel()),t}function $p(i,n,t){let e;return i==="start"?e=t:i==="end"?e=n.options.reverse?n.min:n.max:U(i)?e=i.value:e=n.getBaseValue(),e}function Gp(i){let n=i.options,t=n.fill,e=W(t&&t.target,t);return e===void 0&&(e=!!n.backgroundColor),e===!1||e===null?!1:e===!0?"origin":e}function Qp(i){let{scale:n,index:t,line:e}=i,r=[],a=e.segments,o=e.points,s=Xp(n,t);s.push(pd({x:null,y:n.bottom},e));for(let c=0;c<a.length;c++){let l=a[c];for(let d=l.start;d<=l.end;d++)Kp(r,o[d],s)}return new Tr({points:r,options:{}})}function Xp(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 Kp(i,n,t){let e=[];for(let r=0;r<t.length;r++){let a=t[r],{first:o,last:s,point:c}=Zp(a,n,"x");if(!(!c||o&&s)){if(o)e.unshift(c);else if(i.push(c),!s)break}}i.push(...e)}function Zp(i,n,t){let e=i.interpolate(n,t);if(!e)return{};let r=e[t],a=i.segments,o=i.points,s=!1,c=!1;for(let l=0;l<a.length;l++){let d=a[l],u=o[d.start][t],h=o[d.end][t];if(oe(r,u,h)){s=r===u,c=r===h;break}}return{first:s,last:c,point:e}}var wr=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:nt},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 Jp(i){let{chart:n,fill:t,line:e}=i;if(lt(t))return tg(n,t);if(t==="stack")return Qp(i);if(t==="shape")return!0;let r=eg(i);return r instanceof wr?r:pd(r,e)}function tg(i,n){let t=i.getDatasetMeta(n);return t&&i.isDatasetVisible(n)?t.dataset:null}function eg(i){return(i.scale||{}).getPointPositionForValue?ng(i):ig(i)}function ig(i){let{scale:n={},fill:t}=i,e=qp(t,n);if(lt(e)){let r=n.isHorizontal();return{x:r?e:null,y:r?null:e}}return null}function ng(i){let{scale:n,fill:t}=i,e=n.options,r=n.getLabels().length,a=e.reverse?n.max:n.min,o=$p(t,n,a),s=[];if(e.grid.circular){let c=n.getPointPositionForValue(0,a);return new wr({x:c.x,y:c.y,radius:n.getDistanceFromCenterForValue(o)})}for(let c=0;c<r;++c)s.push(n.getPointPositionForValue(c,o));return s}function wo(i,n,t){let e=Jp(n),{chart:r,index:a,line:o,scale:s,axis:c}=n,l=o.options,d=l.fill,u=l.backgroundColor,{above:h=u,below:f=u}=d||{},m=r.getDatasetMeta(a),p=fo(r,m);e&&o.points.length&&(cn(i,t),rg(i,{line:o,target:e,above:h,below:f,area:t,scale:s,axis:c,clip:p}),ln(i))}function rg(i,n){let{line:t,target:e,above:r,below:a,area:o,scale:s,clip:c}=n,l=t._loop?"angle":n.axis;i.save();let d=a;a!==r&&(l==="x"?(Al(i,e,o.top),Co(i,{line:t,target:e,color:r,scale:s,property:l,clip:c}),i.restore(),i.save(),Al(i,e,o.bottom)):l==="y"&&(Rl(i,e,o.left),Co(i,{line:t,target:e,color:a,scale:s,property:l,clip:c}),i.restore(),i.save(),Rl(i,e,o.right),d=r)),Co(i,{line:t,target:e,color:d,scale:s,property:l,clip:c}),i.restore()}function Al(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:c,end:l}=s,d=r[c],u=r[Mr(c,l,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 Rl(i,n,t){let{segments:e,points:r}=n,a=!0,o=!1;i.beginPath();for(let s of e){let{start:c,end:l}=s,d=r[c],u=r[Mr(c,l,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 Co(i,n){let{line:t,target:e,property:r,color:a,scale:o,clip:s}=n,c=Hp(t,e,r);for(let{source:l,target:d,start:u,end:h}of c){let{style:{backgroundColor:f=a}={}}=l,m=e!==!0;i.save(),i.fillStyle=f,ag(i,o,s,m&&No(r,u,h)),i.beginPath();let p=!!t.pathSegment(i,l),g;if(m){p?i.closePath():El(i,e,h,r);let b=!!e.pathSegment(i,d,{move:p,reverse:!0});g=p&&b,g||El(i,e,u,r)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function ag(i,n,t,e){let r=n.chart.chartArea,{property:a,start:o,end:s}=e||{};if(a==="x"||a==="y"){let c,l,d,u;a==="x"?(c=o,l=r.top,d=s,u=r.bottom):(c=r.left,l=o,d=r.right,u=s),i.beginPath(),t&&(c=Math.max(c,t.left),d=Math.min(d,t.right),l=Math.max(l,t.top),u=Math.min(u,t.bottom)),i.rect(c,l,d-c,u-l),i.clip()}}function El(i,n,t,e){let r=n.interpolate(t,e);r&&i.lineTo(r.x,r.y)}var og={id:"filler",afterDatasetsUpdate(i,n,t){let e=(i.data.datasets||[]).length,r=[],a,o,s,c;for(o=0;o<e;++o)a=i.getDatasetMeta(o),s=a.dataset,c=null,s&&s.options&&s instanceof Tr&&(c={visible:i.isDatasetVisible(o),index:o,fill:jp(s,o,e),chart:i,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=c,r.push(c);for(o=0;o<e;++o)c=r[o],!(!c||c.fill===!1)&&(c.fill=Yp(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&&wo(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;Ol(a)&&wo(i.ctx,a,i.chartArea)}},beforeDatasetDraw(i,n,t){let e=n.meta.$filler;!Ol(e)||t.drawTime!=="beforeDatasetDraw"||wo(i.ctx,e,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Ll=(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)}},sg=(i,n)=>i!==null&&n!==null&&i.datasetIndex===n.datasetIndex&&i.index===n.index,Cr=class extends Jt{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=tt(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=ht(e.font),a=r.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:c}=Ll(e,a),l,d;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,d=this._fitRows(o,a,s,c)+10):(d=this.maxHeight,l=this._fitCols(o,r,s,c)+10),this.width=Math.min(l,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,c=this.legendHitBoxes=[],l=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||l[l.length-1]+g+2*s>o)&&(u+=d,l[l.length-(p>0?0:1)]=0,f+=d,h++),c[p]={left:0,top:f,row:h,width:g,height:r},l[l.length-1]+=g+s}),u}_fitCols(n,t,e,r){let{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,c=this.legendHitBoxes=[],l=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}=cg(e,t,a,g,r);b>0&&f+k+2*s>d&&(u+=h+s,l.push({width:h,height:f}),m+=h+s,p++,h=f=0),c[b]={left:m,top:f,col:p,width:_,height:k},h=Math.max(h,_),f+=k+s}),u+=h,l.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=ti(a,this.left,this.width);if(this.isHorizontal()){let s=0,c=kt(e,this.left+r,this.right-this.lineWidths[s]);for(let l of t)s!==l.row&&(s=l.row,c=kt(e,this.left+r,this.right-this.lineWidths[s])),l.top+=this.top+n+r,l.left=o.leftForLtr(o.x(c),l.width),c+=l.width+r}else{let s=0,c=kt(e,this.top+n+r,this.bottom-this.columnSizes[s].height);for(let l of t)l.col!==s&&(s=l.col,c=kt(e,this.top+n+r,this.bottom-this.columnSizes[s].height)),l.top=c,l.left+=this.left+r,l.left=o.leftForLtr(o.x(l.left),l.width),c+=l.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let n=this.ctx;cn(n,this),this._draw(),ln(n)}}_draw(){let{options:n,columnSizes:t,lineWidths:e,ctx:r}=this,{align:a,labels:o}=n,s=at.color,c=ti(n.rtl,this.left,this.width),l=ht(o.font),{padding:d}=o,u=l.size,h=u/2,f;this.drawTitle(),r.textAlign=c.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;let{boxWidth:m,boxHeight:p,itemHeight:g}=Ll(o,u),b=function(x,P,D){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;r.save();let S=W(D.lineWidth,1);if(r.fillStyle=W(D.fillStyle,s),r.lineCap=W(D.lineCap,"butt"),r.lineDashOffset=W(D.lineDashOffset,0),r.lineJoin=W(D.lineJoin,"miter"),r.lineWidth=S,r.strokeStyle=W(D.strokeStyle,s),r.setLineDash(W(D.lineDash,[])),o.usePointStyle){let F={radius:p*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:S},B=c.xPlus(x,m/2),H=P+h;to(r,F,B,H,o.pointStyleWidth&&m)}else{let F=P+Math.max((u-p)/2,0),B=c.leftForLtr(x,m),H=We(D.borderRadius);r.beginPath(),Object.values(H).some(ot=>ot!==0)?Ii(r,{x:B,y:F,w:m,h:p,radius:H}):r.rect(B,F,m,p),r.fill(),S!==0&&r.stroke()}r.restore()},_=function(x,P,D){Ne(r,D.text,x,P+g/2,l,{strikethrough:D.hidden,textAlign:c.textAlign(D.textAlign)})},k=this.isHorizontal(),C=this._computeTitleHeight();k?f={x:kt(a,this.left+d,this.right-e[0]),y:this.top+d+C,line:0}:f={x:this.left+d,y:kt(a,this.top+C+d,this.bottom-t[0].height),line:0},co(this.ctx,n.textDirection);let v=g+d;this.legendItems.forEach((x,P)=>{r.strokeStyle=x.fontColor,r.fillStyle=x.fontColor;let D=r.measureText(x.text).width,S=c.textAlign(x.textAlign||(x.textAlign=o.textAlign)),F=m+h+D,B=f.x,H=f.y;c.setWidth(this.width),k?P>0&&B+F+d>this.right&&(H=f.y+=v,f.line++,B=f.x=kt(a,this.left+d,this.right-e[f.line])):P>0&&H+v>this.bottom&&(B=f.x=B+t[f.line].width+d,f.line++,H=f.y=kt(a,this.top+C+d,this.bottom-t[f.line].height));let ot=c.x(B);if(b(ot,H,x),B=Lc(S,B+m+h,k?B+F:this.right,n.rtl),_(c.x(B),H,x),k)f.x+=F+d;else if(typeof x.text!="string"){let vt=l.lineHeight;f.y+=gd(x,vt)+d}else f.y+=v}),lo(this.ctx,n.textDirection)}drawTitle(){let n=this.options,t=n.title,e=ht(t.font),r=wt(t.padding);if(!t.display)return;let a=ti(n.rtl,this.left,this.width),o=this.ctx,s=t.position,c=e.size/2,l=r.top+c,d,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),d=this.top+l,u=kt(n.align,u,this.right-h);else{let m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);d=l+kt(n.align,this.top,this.bottom-m-n.labels.padding-this._computeTitleHeight())}let f=kt(s,u,u+h);o.textAlign=a.textAlign(nr(s)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=e.string,Ne(o,t.text,f,d,e)}_computeTitleHeight(){let n=this.options.title,t=ht(n.font),e=wt(n.padding);return n.display?t.lineHeight+e.height:0}_getLegendItemAt(n,t){let e,r,a;if(oe(n,this.left,this.right)&&oe(t,this.top,this.bottom)){for(a=this.legendHitBoxes,e=0;e<a.length;++e)if(r=a[e],oe(n,r.left,r.left+r.width)&&oe(t,r.top,r.top+r.height))return this.legendItems[e]}return null}handleEvent(n){let t=this.options;if(!ug(n.type,t))return;let e=this._getLegendItemAt(n.x,n.y);if(n.type==="mousemove"||n.type==="mouseout"){let r=this._hoveredItem,a=sg(r,e);r&&!a&&tt(t.onLeave,[n,r,this],this),this._hoveredItem=e,e&&!a&&tt(t.onHover,[n,e,this],this)}else e&&tt(t.onClick,[n,e,this],this)}};function cg(i,n,t,e,r){let a=lg(e,i,n,t),o=dg(r,e,n.lineHeight);return{itemWidth:a,itemHeight:o}}function lg(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 dg(i,n,t){let e=i;return typeof n.text!="string"&&(e=gd(n,t)),e}function gd(i,n){let t=i.text?i.text.length:0;return n*t}function ug(i,n){return!!((i==="mousemove"||i==="mouseout")&&(n.onHover||n.onLeave)||n.onClick&&(i==="click"||i==="mouseup"))}var hg={id:"legend",_element:Cr,start(i,n,t){let e=i.legend=new Cr({ctx:i.ctx,options:t,chart:i});St.configure(i,e,t),St.addBox(i,e)},stop(i){St.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,n,t){let e=i.legend;St.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(c=>{let l=c.controller.getStyle(t?0:void 0),d=wt(l.borderWidth);return{text:n[c.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:l.borderColor,pointStyle:e||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:o&&(s||l.borderRadius),datasetIndex:c.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)}}},_n=class extends Jt{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=it(e.text)?e.text.length:1;this._padding=wt(e.padding);let a=r*ht(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,c=0,l,d,u;return this.isHorizontal()?(d=kt(s,e,a),u=t+n,l=a-e):(o.position==="left"?(d=e+n,u=kt(s,r,t),c=G*-.5):(d=a-n,u=kt(s,t,r),c=G*.5),l=r-t),{titleX:d,titleY:u,maxWidth:l,rotation:c}}draw(){let n=this.ctx,t=this.options;if(!t.display)return;let e=ht(t.font),a=e.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:c,rotation:l}=this._drawArgs(a);Ne(n,t.text,0,0,e,{color:t.color,maxWidth:c,rotation:l,textAlign:nr(t.align),textBaseline:"middle",translation:[o,s]})}};function fg(i,n){let t=new _n({ctx:i.ctx,options:n,chart:i});St.configure(i,t,n),St.addBox(i,t),i.titleBlock=t}var mg={id:"title",_element:_n,start(i,n,t){fg(i,t)},stop(i){let n=i.titleBlock;St.removeBox(i,n),delete i.titleBlock},beforeUpdate(i,n,t){let e=i.titleBlock;St.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}},mr=new WeakMap,pg={id:"subtitle",start(i,n,t){let e=new _n({ctx:i.ctx,options:t,chart:i});St.configure(i,e,t),St.addBox(i,e),mr.set(i,e)},stop(i){St.removeBox(i,mr.get(i)),mr.delete(i)},beforeUpdate(i,n,t){let e=mr.get(i);St.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}},gn={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 c=s.tooltipPosition();e.add(c.x),r+=c.y,++a}}return a===0||e.size===0?!1:{x:[...e].reduce((s,c)=>s+c)/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 c=i[a].element;if(c&&c.hasValue()){let l=c.getCenterPoint(),d=Zn(n,l);d<r&&(r=d,s=c)}}if(s){let c=s.tooltipPosition();t=c.x,e=c.y}return{x:t,y:e}}};function se(i,n){return n&&(it(n)?Array.prototype.push.apply(i,n):i.push(n)),i}function Ce(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
7
7
  `)>-1?i.split(`
8
- `):i}function gg(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 Fl(i,n){let t=i.chart.ctx,{body:e,footer:r,title:a}=i,{boxWidth:o,boxHeight:s}=n,c=mt(n.bodyFont),l=mt(n.titleFont),d=mt(n.footerFont),u=a.length,h=r.length,f=e.length,m=Tt(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*l.lineHeight+(u-1)*n.titleSpacing+n.titleMarginBottom),b){let C=n.displayColors?Math.max(s,c.lineHeight):c.lineHeight;p+=f*C+(b-f)*c.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=l.string,X(i.title,k),t.font=c.string,X(i.beforeBody.concat(i.afterBody),k),_=n.displayColors?o+2+n.boxPadding:0,X(e,C=>{X(C.before,k),X(C.lines,k),X(C.after,k)}),_=0,t.font=d.string,X(i.footer,k),t.restore(),g+=m.width,{width:g,height:p}}function bg(i,n){let{y:t,height:e}=n;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}function _g(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 vg(i,n,t,e){let{x:r,width:a}=t,{width:o,chartArea:{left:s,right:c}}=i,l="center";return e==="center"?l=r<=(s+c)/2?"left":"right":r<=a/2?l="left":r>=o-a/2&&(l="right"),_g(l,i,n,t)&&(l="center"),l}function zl(i,n,t){let e=t.yAlign||n.yAlign||bg(i,t);return{xAlign:t.xAlign||n.xAlign||vg(i,n,t,e),yAlign:e}}function yg(i,n){let{x:t,width:e}=i;return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function xg(i,n,t){let{y:e,height:r}=i;return n==="top"?e+=t:n==="bottom"?e-=r+t:e-=r/2,e}function Bl(i,n,t,e){let{caretSize:r,caretPadding:a,cornerRadius:o}=i,{xAlign:s,yAlign:c}=t,l=r+a,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:f}=Ve(o),m=yg(n,s),p=xg(n,c,l);return c==="center"?s==="left"?m+=l:s==="right"&&(m-=l):s==="left"?m-=Math.max(d,h)+r:s==="right"&&(m+=Math.max(u,f)+r),{x:bt(m,0,e.width-n.width),y:bt(p,0,e.height-n.height)}}function pr(i,n,t){let e=Tt(t.padding);return n==="center"?i.x+i.width/2:n==="right"?i.x+i.width-e.right:i.x+e.left}function Nl(i){return se([],Te(i))}function kg(i,n,t){return we(i,{tooltip:n,tooltipItems:t,type:"tooltip"})}function Wl(i,n){let t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?i.override(t):i}var bd={beforeTitle:ae,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:ae,beforeBody:ae,beforeLabel:ae,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 j(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:ae,afterBody:ae,beforeFooter:ae,footer:ae,afterFooter:ae};function Et(i,n,t,e){let r=i[n].call(t,e);return typeof r>"u"?bd[n].call(t,e):r}var Vl=(()=>{class i extends Jt{static positioners=gn;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 vr(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=kg(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:r}=e,a=Et(r,"beforeTitle",this,t),o=Et(r,"title",this,t),s=Et(r,"afterTitle",this,t),c=[];return c=se(c,Te(a)),c=se(c,Te(o)),c=se(c,Te(s)),c}getBeforeBody(t,e){return Nl(Et(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:r}=e,a=[];return X(t,o=>{let s={before:[],lines:[],after:[]},c=Wl(r,o);se(s.before,Te(Et(c,"beforeLabel",this,o))),se(s.lines,Et(c,"label",this,o)),se(s.after,Te(Et(c,"afterLabel",this,o))),a.push(s)}),a}getAfterBody(t,e){return Nl(Et(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:r}=e,a=Et(r,"beforeFooter",this,t),o=Et(r,"footer",this,t),s=Et(r,"afterFooter",this,t),c=[];return c=se(c,Te(a)),c=se(c,Te(o)),c=se(c,Te(s)),c}_createItems(t){let e=this._active,r=this.chart.data,a=[],o=[],s=[],c=[],l,d;for(l=0,d=e.length;l<d;++l)c.push(gg(this.chart,e[l]));return t.filter&&(c=c.filter((u,h,f)=>t.filter(u,h,f,r))),t.itemSort&&(c=c.sort((u,h)=>t.itemSort(u,h,r))),X(c,u=>{let h=Wl(t.callbacks,u);a.push(Et(h,"labelColor",this,u)),o.push(Et(h,"labelPointStyle",this,u)),s.push(Et(h,"labelTextColor",this,u))}),this.labelColors=a,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=c,c}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 c=gn[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 l=this._size=Fl(this,r),d=Object.assign({},c,l),u=zl(this.chart,r,d),h=Bl(r,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:c.x,caretY:c.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:c}=r,{topLeft:l,topRight:d,bottomLeft:u,bottomRight:h}=Ve(c),{x:f,y:m}=t,{width:p,height:g}=e,b,_,k,C,v,x;return o==="center"?(v=m+g/2,a==="left"?(b=f,_=b-s,C=v+s,x=v-s):(b=f+p,_=b+s,C=v-s,x=v+s),k=b):(a==="left"?_=f+Math.max(l,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),x=C),{x1:b,x2:_,x3:k,y1:C,y2:v,y3:x}}drawTitle(t,e,r){let a=this.title,o=a.length,s,c,l;if(o){let d=ei(r.rtl,this.x,this.width);for(t.x=pr(this,r.titleAlign,r),e.textAlign=d.textAlign(r.titleAlign),e.textBaseline="middle",s=mt(r.titleFont),c=r.titleSpacing,e.fillStyle=r.titleColor,e.font=s.string,l=0;l<o;++l)e.fillText(a[l],d.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+c,l+1===o&&(t.y+=r.titleMarginBottom-c)}}_drawColorBox(t,e,r,a,o){let s=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:l,boxWidth:d}=o,u=mt(o.bodyFont),h=pr(this,"left",o),f=a.x(h),m=l<u.lineHeight?(u.lineHeight-l)/2:0,p=e.y+m;if(o.usePointStyle){let g={radius:Math.min(d,l)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},b=a.leftForLtr(f,d)+d/2,_=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,ar(t,g,b,_),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,ar(t,g,b,_)}else{t.lineWidth=U(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),_=Ve(s.borderRadius);Object.values(_).some(k=>k!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Oi(t,{x:g,y:p,w:d,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Oi(t,{x:b,y:p+1,w:d-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,d,l),t.strokeRect(g,p,d,l),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,d-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){let{body:a}=this,{bodySpacing:o,bodyAlign:s,displayColors:c,boxHeight:l,boxWidth:d,boxPadding:u}=r,h=mt(r.bodyFont),f=h.lineHeight,m=0,p=ei(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,x,P,D;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=pr(this,b,r),e.fillStyle=r.bodyColor,X(this.beforeBody,g),m=c&&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,X(_.before,g),C=_.lines,c&&C.length&&(this._drawColorBox(e,t,v,p,r),f=Math.max(h.lineHeight,l)),x=0,D=C.length;x<D;++x)g(C[x]),f=h.lineHeight;X(_.after,g)}m=0,f=h.lineHeight,X(this.afterBody,g),t.y-=o}drawFooter(t,e,r){let a=this.footer,o=a.length,s,c;if(o){let l=ei(r.rtl,this.x,this.width);for(t.x=pr(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=l.textAlign(r.footerAlign),e.textBaseline="middle",s=mt(r.footerFont),e.fillStyle=r.footerColor,e.font=s.string,c=0;c<o;++c)e.fillText(a[c],l.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:c,y:l}=t,{width:d,height:u}=r,{topLeft:h,topRight:f,bottomLeft:m,bottomRight:p}=Ve(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(c+h,l),s==="top"&&this.drawCaret(t,e,r,a),e.lineTo(c+d-f,l),e.quadraticCurveTo(c+d,l,c+d,l+f),s==="center"&&o==="right"&&this.drawCaret(t,e,r,a),e.lineTo(c+d,l+u-p),e.quadraticCurveTo(c+d,l+u,c+d-p,l+u),s==="bottom"&&this.drawCaret(t,e,r,a),e.lineTo(c+m,l+u),e.quadraticCurveTo(c,l+u,c,l+u-m),s==="center"&&o==="left"&&this.drawCaret(t,e,r,a),e.lineTo(c,l+h),e.quadraticCurveTo(c,l,c+h,l),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=gn[t.position].call(this,this._active,this._eventPosition);if(!s)return;let c=this._size=Fl(this,t),l=Object.assign({},s,this._size),d=zl(e,t,l),u=Bl(t,l,d,e);(a._to!==u.x||o._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.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=Tt(e.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&c&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,a,e),co(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),lo(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let r=this._active,a=t.map(({datasetIndex:c,index:l})=>{let d=this.chart.getDatasetMeta(c);if(!d)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:d.data[l],index:l}}),o=!on(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),c=this._positionChanged(s,t),l=e||!on(s,o)||c;return l&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,r,a){let o=this.options;if(t.type==="mouseout")return[];if(!a)return e.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.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=gn[o.position].call(this,t,e);return s!==!1&&(r!==s.x||a!==s.y)}}return i})(),wg={id:"tooltip",_element:Vl,positioners:gn,afterInit(i,n,t){t&&(i.tooltip=new Vl({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",Vt(vt({},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:bd},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"]},Cg=Object.freeze({__proto__:null,Colors:Fp,Decimation:Wp,Filler:og,Legend:hg,SubTitle:pg,Title:mg,Tooltip:wg}),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 Mg(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 Dg=(i,n)=>i===null?null:bt(Math.round(i),0,n);function Hl(i){let n=this.getLabels();return i>=0&&i<n.length?n[i]:i}var Pg=(()=>{class i extends ri{static id="category";static defaults={ticks:{callback:Hl}};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(j(t))return null;let r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:Mg(r,t,W(e,t),this._addedLabels),Dg(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 Hl.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 Sg(i,n){let t=[],{bounds:r,step:a,min:o,max:s,precision:c,count:l,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=a||1,m=d-1,{min:p,max:g}=n,b=!j(o),_=!j(s),k=!j(l),C=(g-p)/(u+1),v=Va((g-p)/m/f)*f,x,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=Va(S*v/m/f)*f),j(c)||(x=Math.pow(10,c),v=Math.ceil(v*x)/x),r==="ticks"?(P=Math.floor(p/v)*v,D=Math.ceil(g/v)*v):(P=p,D=g),b&&_&&a&&Pc((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=l-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 F=Math.max(Ya(v),Ya(P));x=Math.pow(10,j(c)?F:c),P=Math.round(P*x)/x,D=Math.round(D*x)/x;let B=0;for(b&&(h&&P!==o?(t.push({value:o}),P<o&&B++,Pi(Math.round((P+B*v)*x)/x,o,Yl(o,C,i))&&B++):P<o&&B++);B<S;++B){let V=Math.round((P+B*v)*x)/x;if(_&&V>s)break;t.push({value:V})}return _&&h&&D!==s?t.length&&Pi(t[t.length-1].value,s,Yl(s,C,i))?t[t.length-1].value=s:t.push({value:s}):(!_||D===s)&&t.push({value:D}),t}function Yl(i,n,{horizontal:t,minRotation:e}){let r=jt(e),a=(t?Math.sin(r):Math.cos(r))||.001,o=.75*n*(""+i).length;return Math.min(n/a,o)}var Li=class extends ri{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 j(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=c=>r=t?r:c,s=c=>a=e?a:c;if(n){let c=Zt(r),l=Zt(a);c<0&&l<0?s(0):c>0&&l>0&&o(0)}if(r===a){let c=a===0?1:Math.abs(a*.05);s(a+c),n||o(r-c)}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=Sg(r,a);return n.bounds==="ticks"&&Ha(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 Ii(n,this.chart.options.locale,this.options.ticks.format)}},Wo=class extends Li{static id="linear";static defaults={ticks:{callback:sn.formatters.numeric}};determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=ut(n)?n:0,this.max=ut(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let n=this.isHorizontal(),t=n?this.width:this.height,e=jt(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}},vn=i=>Math.floor(xe(i)),ni=(i,n)=>Math.pow(10,vn(i)+n);function jl(i){return i/Math.pow(10,vn(i))===1}function Ul(i,n,t){let e=Math.pow(10,t),r=Math.floor(i/e);return Math.ceil(n/e)-r}function Ig(i,n){let t=n-i,e=vn(t);for(;Ul(i,n,e)>10;)e++;for(;Ul(i,n,e)<10;)e--;return Math.min(e,vn(i))}function Og(i,{min:n,max:t}){n=Rt(i.min,n);let e=[],r=vn(n),a=Ig(n,t),o=a<0?Math.pow(10,Math.abs(a)):1,s=Math.pow(10,a),c=r>a?Math.pow(10,r):0,l=Math.round((n-c)*o)/o,d=Math.floor((n-c)/s/10)*s*10,u=Math.floor((l-d)/Math.pow(10,a)),h=Rt(i.min,Math.round((c+d+u*Math.pow(10,a))*o)/o);for(;h<t;)e.push({value:h,major:jl(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(a++,u=2,o=a>=0?1:o),h=Math.round((c+d+u*Math.pow(10,a))*o)/o;let f=Rt(i.max,h);return e.push({value:f,major:jl(f),significand:u}),e}var Vo=class extends ri{static id="logarithmic";static defaults={ticks:{callback:sn.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=Li.prototype.parse.apply(this,[n,t]);if(e===0){this._zero=!0;return}return ut(e)&&e>0?e:null}determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=ut(n)?Math.max(0,n):null,this.max=ut(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ut(this._userMin)&&(this.min=n===ni(this.min,0)?ni(this.min,-1):ni(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(ni(e,-1)),o(ni(r,1)))),e<=0&&a(ni(r,-1)),r<=0&&o(ni(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"&&Ha(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":Ii(n,this.chart.options.locale,this.options.ticks.format)}configure(){let n=this.min;super.configure(),this._startValue=xe(n),this._valueRange=xe(this.max)-xe(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(xe(n)-this._startValue)/this._valueRange)}getValueForPixel(n){let t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}};function Ho(i){let n=i.ticks;if(n.display&&i.display){let t=Tt(n.backdropPadding);return W(n.font&&n.font.size,st.font.size)+t.height}return 0}function Ag(i,n,t){return t=it(t)?t:[t],{w:zc(i,n.string,t),h:t.length*n.lineHeight}}function ql(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 Rg(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?G/a:0;for(let c=0;c<a;c++){let l=o.setContext(i.getPointLabelContext(c));r[c]=l.padding;let d=i.getPointPosition(c,i.drawingArea+r[c],s),u=mt(l.font),h=Ag(i.ctx,u,i._pointLabels[c]);e[c]=h;let f=wt(i.getIndexAngle(c)+s),m=Math.round(er(f)),p=ql(m,d.x,h.w,0,180),g=ql(m,d.y,h.h,90,270);Eg(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=zg(i,e,r)}function Eg(i,n,t,e,r){let a=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t)),s=0,c=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?(c=(n.t-r.start)/o,i.t=Math.min(i.t,n.t-c)):r.end>n.b&&(c=(r.end-n.b)/o,i.b=Math.max(i.b,n.b+c))}function Lg(i,n,t){let e=i.drawingArea,{extra:r,additionalAngle:a,padding:o,size:s}=t,c=i.getPointPosition(n,e+r+o,a),l=Math.round(er(wt(c.angle+ft))),d=Wg(c.y,s.h,l),u=Bg(l),h=Ng(c.x,s.w,u);return{visible:!0,x:c.x,y:d,textAlign:u,left:h,top:d,right:h+s.w,bottom:d+s.h}}function Fg(i,n){if(!n)return!0;let{left:t,top:e,right:r,bottom:a}=i;return!(re({x:t,y:e},n)||re({x:t,y:a},n)||re({x:r,y:e},n)||re({x:r,y:a},n))}function zg(i,n,t){let e=[],r=i._pointLabels.length,a=i.options,{centerPointLabels:o,display:s}=a.pointLabels,c={extra:Ho(a)/2,additionalAngle:o?G/r:0},l;for(let d=0;d<r;d++){c.padding=t[d],c.size=n[d];let u=Lg(i,d,c);e.push(u),s==="auto"&&(u.visible=Fg(u,l),u.visible&&(l=u))}return e}function Bg(i){return i===0||i===180?"center":i<180?"left":"right"}function Ng(i,n,t){return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function Wg(i,n,t){return t===90||t===270?i-=n/2:(t>270||t<90)&&(i-=n),i}function Vg(i,n,t){let{left:e,top:r,right:a,bottom:o}=t,{backdropColor:s}=n;if(!j(s)){let c=Ve(n.borderRadius),l=Tt(n.backdropPadding);i.fillStyle=s;let d=e-l.left,u=r-l.top,h=a-e+l.width,f=o-r+l.height;Object.values(c).some(m=>m!==0)?(i.beginPath(),Oi(i,{x:d,y:u,w:h,h:f,radius:c}),i.fill()):i.fillRect(d,u,h,f)}}function Hg(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));Vg(t,o,a);let s=mt(o.font),{x:c,y:l,textAlign:d}=a;We(t,i._pointLabels[r],c,l+s.lineHeight/2,s,{color:o.color,textAlign:d,textBaseline:"middle"})}}function _d(i,n,t,e){let{ctx:r}=i;if(t)r.arc(i.xCenter,i.yCenter,n,0,nt);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 Yg(i,n,t,e,r){let a=i.ctx,o=n.circular,{color:s,lineWidth:c}=n;!o&&!e||!s||!c||t<0||(a.save(),a.strokeStyle=s,a.lineWidth=c,a.setLineDash(r.dash||[]),a.lineDashOffset=r.dashOffset,a.beginPath(),_d(i,t,o,e),a.closePath(),a.stroke(),a.restore())}function jg(i,n,t){return we(i,{label:t,index:n,type:"pointLabel"})}var Yo=class extends Li{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:sn.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=Tt(Ho(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=ut(n)&&!isNaN(n)?n:0,this.max=ut(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ho(this.options))}generateTickLabels(n){Li.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,e)=>{let r=tt(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?Rg(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=nt/(this._pointLabels.length||1),e=this.options.startAngle||0;return wt(n*t+jt(e))}getDistanceFromCenterForValue(n){if(j(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(j(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 jg(this.getContext(),n,e)}}getPointPosition(n,t,e=0){let r=this.getIndexAngle(n)-ft+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(),_d(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,c,l;if(t.pointLabels.display&&Hg(this,o),r.display&&this.ticks.forEach((d,u)=>{if(u!==0||u===0&&this.min<0){c=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=r.setContext(h),m=a.setContext(h);Yg(this,f,c,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,c=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),l=this.getPointPosition(s,c),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.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,c)=>{if(c===0&&this.min>=0&&!t.reverse)return;let l=e.setContext(this.getContext(c)),d=mt(l.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),l.showLabelBackdrop){n.font=d.string,o=n.measureText(s.label).width,n.fillStyle=l.backdropColor;let u=Tt(l.backdropPadding);n.fillRect(-o/2-u.left,-a-d.size/2-u.top,o+u.width,d.size+u.height)}We(n,s.label,0,-a,d,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}),n.restore()}drawTitle(){}},Dr={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}},Lt=Object.keys(Dr);function $l(i,n){return i-n}function Gl(i,n){if(j(n))return null;let t=i._adapter,{parser:e,round:r,isoWeekday:a}=i._parseOpts,o=n;return typeof e=="function"&&(o=e(o)),ut(o)||(o=typeof e=="string"?t.parse(o,e):t.parse(o)),o===null?null:(r&&(o=r==="week"&&(ti(a)||a===!0)?t.startOf(o,"isoWeek",a):t.startOf(o,r)),+o)}function Ql(i,n,t,e){let r=Lt.length;for(let a=Lt.indexOf(i);a<r-1;++a){let o=Dr[Lt[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((t-n)/(s*o.size))<=e)return Lt[a]}return Lt[r-1]}function Ug(i,n,t,e,r){for(let a=Lt.length-1;a>=Lt.indexOf(t);a--){let o=Lt[a];if(Dr[o].common&&i._adapter.diff(r,e,o)>=n-1)return o}return Lt[t?Lt.indexOf(t):0]}function qg(i){for(let n=Lt.indexOf(i)+1,t=Lt.length;n<t;++n)if(Dr[Lt[n]].common)return Lt[n]}function Xl(i,n,t){if(!t)i[n]=!0;else if(t.length){let{lo:e,hi:r}=ir(t,n),a=t[e]>=n?t[e]:t[r];i[a]=!0}}function $g(i,n,t,e){let r=i._adapter,a=+r.startOf(n[0].value,e),o=n[n.length-1].value,s,c;for(s=a;s<=o;s=+r.add(s,1,e))c=t[s],c>=0&&(n[c].major=!0);return n}function Kl(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:$g(i,e,r,t)}var jo=(()=>{class i extends ri{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 $o._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:Gl(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:c}=this.getUserBounds();function l(d){!s&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!c&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!s||!c)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),a=ut(a)&&!isNaN(a)?a:+e.startOf(Date.now(),r),o=ut(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,c=Oc(a,o,s);return this._unit=e.unit||(r.autoSkip?Ql(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Ug(this,c.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:qg(this._unit),this.initOffsets(a),t.reverse&&c.reverse(),Kl(this,c,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=bt(e,0,s),r=bt(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||Ql(o.minUnit,e,r,this._getLabelCapacity(e)),c=W(a.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,d=ti(l)||l===!0,u={},h=e,f,m;if(d&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,d?"day":s),t.diff(r,e,s)>1e5*c)throw new Error(e+" and "+r+" are too far apart with stepSize of "+c+" "+s);let p=a.ticks.source==="data"&&this.getDataTimestamps();for(f=h,m=0;f<r;f=+t.add(f,c,s),m++)Xl(u,f,p);return(f===r||a.bounds==="ticks"||m===1)&&Xl(u,f,p),Object.keys(u).sort($l).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 tt(s,[t,e,r],this);let c=o.time.displayFormats,l=this._unit,d=this._majorUnit,u=l&&c[l],h=d&&c[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=jt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(a),s=Math.sin(a),c=this._resolveTickFontOptions(0).size;return{w:r*o+c*s,h:r*s+c*o}}_getLabelCapacity(t){let e=this.options.time,r=e.displayFormats,a=r[e.unit]||r.millisecond,o=this._tickFormatFunction(t,0,Kl(this,[t],this._majorUnit),a),s=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return c>0?c: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(Gl(this,a[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return qa(t.sort($l))}}return i})();function gr(i,n,t){let e=0,r=i.length-1,a,o,s,c;t?(n>=i[e].pos&&n<=i[r].pos&&({lo:e,hi:r}=ne(i,"pos",n)),{pos:a,time:s}=i[e],{pos:o,time:c}=i[r]):(n>=i[e].time&&n<=i[r].time&&({lo:e,hi:r}=ne(i,"time",n)),{time:a,pos:s}=i[e],{time:o,pos:c}=i[r]);let l=o-a;return l?s+(c-s)*(n-a)/l:s}var Uo=class extends jo{static id="timeseries";static defaults=jo.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=gr(t,this.min),this._tableRange=gr(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){let{min:t,max:e}=this,r=[],a=[],o,s,c,l,d;for(o=0,s=n.length;o<s;++o)l=n[o],l>=t&&l<=e&&r.push(l);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],c=r[o-1],l=r[o],Math.round((d+c)/2)!==l&&a.push({time:l,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(gr(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){let t=this._offsets,e=this.getDecimalForPixel(n)/t.factor-t.end;return gr(this._table,e*this._tableRange+this._minPos,!0)}},Gg=Object.freeze({__proto__:null,CategoryScale:Pg,LinearScale:Wo,LogarithmicScale:Vo,RadialLinearScale:Yo,TimeScale:jo,TimeSeriesScale:Uo}),p0=[nm,Sp,Cg,Gg];function Ot(i){"@babel/helpers - typeof";return Ot=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},Ot(i)}function z(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 y(i,n){if(n.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+n.length+" present")}function M(i){y(1,arguments);var n=Object.prototype.toString.call(i);return i instanceof Date||Ot(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 Fi(i,n){y(2,arguments);var t=M(i),e=z(n);return isNaN(e)?new Date(NaN):(e&&t.setDate(t.getDate()+e),t)}function Ue(i,n){y(2,arguments);var t=M(i),e=z(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 Ut(i,n){y(2,arguments);var t=M(i).getTime(),e=z(n);return new Date(t+e)}var Qg=36e5;function Pr(i,n){y(2,arguments);var t=z(n);return Ut(i,t*Qg)}var Xg={};function It(){return Xg}function xn(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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 qe(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 ai(i){y(1,arguments);var n=M(i);return n.setHours(0,0,0,0),n}var Kg=864e5;function Go(i,n){y(2,arguments);var t=ai(i),e=ai(n),r=t.getTime()-qe(t),a=e.getTime()-qe(e);return Math.round((r-a)/Kg)}var Zg=6e4;function Sr(i,n){y(2,arguments);var t=z(n);return Ut(i,t*Zg)}function Ir(i,n){y(2,arguments);var t=z(n),e=t*3;return Ue(i,e)}function Or(i,n){y(2,arguments);var t=z(n);return Ut(i,t*1e3)}function Ar(i,n){y(2,arguments);var t=z(n),e=t*7;return Fi(i,e)}function Rr(i,n){y(2,arguments);var t=z(n);return Ue(i,t*12)}function $e(i,n){y(2,arguments);var t=M(i),e=M(n),r=t.getTime()-e.getTime();return r<0?-1:r>0?1:r}var Jg=365.2425,tb=Math.pow(10,8)*24*60*60*1e3,oi=6e4,si=36e5,vd=1e3,wy=-tb;var eb=3600;var yd=eb*24,Cy=yd*7,ib=yd*Jg,nb=ib/12,Ty=nb*3;function Qo(i){return y(1,arguments),i instanceof Date||Ot(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function zi(i){if(y(1,arguments),!Qo(i)&&typeof i!="number")return!1;var n=M(i);return!isNaN(Number(n))}function Xo(i,n){y(2,arguments);var t=M(i),e=M(n),r=t.getFullYear()-e.getFullYear(),a=t.getMonth()-e.getMonth();return r*12+a}function Ko(i,n){y(2,arguments);var t=M(i),e=M(n);return t.getFullYear()-e.getFullYear()}function xd(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 Bi(i,n){y(2,arguments);var t=M(i),e=M(n),r=xd(t,e),a=Math.abs(Go(t,e));t.setDate(t.getDate()-r*a);var o=+(xd(t,e)===-r),s=r*(a-o);return s===0?0:s}function le(i,n){return y(2,arguments),M(i).getTime()-M(n).getTime()}var kd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(n){return n<0?Math.ceil(n):Math.floor(n)}},rb="trunc";function de(i){return i?kd[i]:kd[rb]}function Er(i,n,t){y(2,arguments);var e=le(i,n)/si;return de(t?.roundingMethod)(e)}function Lr(i,n,t){y(2,arguments);var e=le(i,n)/oi;return de(t?.roundingMethod)(e)}function Ni(i){y(1,arguments);var n=M(i);return n.setHours(23,59,59,999),n}function Wi(i){y(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 Zo(i){y(1,arguments);var n=M(i);return Ni(n).getTime()===Wi(n).getTime()}function Vi(i,n){y(2,arguments);var t=M(i),e=M(n),r=$e(t,e),a=Math.abs(Xo(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=$e(t,e)===-r;Zo(M(i))&&a===1&&$e(i,e)===1&&(s=!1),o=r*(a-Number(s))}return o===0?0:o}function Fr(i,n,t){y(2,arguments);var e=Vi(i,n)/3;return de(t?.roundingMethod)(e)}function zr(i,n,t){y(2,arguments);var e=le(i,n)/1e3;return de(t?.roundingMethod)(e)}function Br(i,n,t){y(2,arguments);var e=Bi(i,n)/7;return de(t?.roundingMethod)(e)}function Nr(i,n){y(2,arguments);var t=M(i),e=M(n),r=$e(t,e),a=Math.abs(Ko(t,e));t.setFullYear(1584),e.setFullYear(1584);var o=$e(t,e)===-r,s=r*(a-Number(o));return s===0?0:s}function Wr(i){y(1,arguments);var n=M(i);return n.setSeconds(0,0),n}function Vr(i){y(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 Hr(i){y(1,arguments);var n=M(i);return n.setDate(1),n.setHours(0,0,0,0),n}function Yr(i){y(1,arguments);var n=M(i),t=n.getFullYear();return n.setFullYear(t+1,0,0),n.setHours(23,59,59,999),n}function jr(i){y(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 Ur(i){y(1,arguments);var n=M(i);return n.setMinutes(59,59,999),n}function qr(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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 $r(i){y(1,arguments);var n=M(i);return n.setSeconds(59,999),n}function Gr(i){y(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 Qr(i){y(1,arguments);var n=M(i);return n.setMilliseconds(999),n}function kn(i,n){y(2,arguments);var t=z(n);return Ut(i,-t)}var ab=864e5;function Jo(i){y(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/ab)+1}function qt(i){y(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 wn(i){y(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=qt(e),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var o=qt(a);return n.getTime()>=r.getTime()?t+1:n.getTime()>=o.getTime()?t:t-1}function ts(i){y(1,arguments);var n=wn(i),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var e=qt(t);return e}var ob=6048e5;function Cn(i){y(1,arguments);var n=M(i),t=qt(n).getTime()-ts(n).getTime();return Math.round(t/ob)+1}function zt(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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 ci(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=M(i),u=d.getUTCFullYear(),h=It(),f=z((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:(c=h.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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=zt(m,n),g=new Date(0);g.setUTCFullYear(u,0,f),g.setUTCHours(0,0,0,0);var b=zt(g,n);return d.getTime()>=p.getTime()?u+1:d.getTime()>=b.getTime()?u:u-1}function es(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=ci(i,n),f=new Date(0);f.setUTCFullYear(h,0,u),f.setUTCHours(0,0,0,0);var m=zt(f,n);return m}var sb=6048e5;function Tn(i,n){y(1,arguments);var t=M(i),e=zt(t,n).getTime()-es(t,n).getTime();return Math.round(e/sb)+1}function Q(i,n){for(var t=i<0?"-":"",e=Math.abs(i).toString();e.length<n;)e="0"+e;return t+e}var cb={y:function(n,t){var e=n.getUTCFullYear(),r=e>0?e:1-e;return Q(t==="yy"?r%100:r,t.length)},M:function(n,t){var e=n.getUTCMonth();return t==="M"?String(e+1):Q(e+1,2)},d:function(n,t){return Q(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];default:return e==="am"?"a.m.":"p.m."}},h:function(n,t){return Q(n.getUTCHours()%12||12,t.length)},H:function(n,t){return Q(n.getUTCHours(),t.length)},m:function(n,t){return Q(n.getUTCMinutes(),t.length)},s:function(n,t){return Q(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 Q(a,t.length)}},Me=cb;var Hi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},lb={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"});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 Me.y(n,t)},Y:function(n,t,e,r){var a=ci(n,r),o=a>0?a:1-a;if(t==="YY"){var s=o%100;return Q(s,2)}return t==="Yo"?e.ordinalNumber(o,{unit:"year"}):Q(o,t.length)},R:function(n,t){var e=wn(n);return Q(e,t.length)},u:function(n,t){var e=n.getUTCFullYear();return Q(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 Q(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"});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 Q(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"});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 Me.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"});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 Q(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"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){var a=Tn(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):Q(a,t.length)},I:function(n,t,e){var r=Cn(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):Q(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getUTCDate(),{unit:"date"}):Me.d(n,t)},D:function(n,t,e){var r=Jo(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):Q(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"});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 Q(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"});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 Q(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"});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 Q(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"});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"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){var r=n.getUTCHours(),a;switch(r===12?a=Hi.noon:r===0?a=Hi.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"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){var r=n.getUTCHours(),a;switch(r>=17?a=Hi.evening:r>=12?a=Hi.afternoon:r>=4?a=Hi.morning:a=Hi.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"});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 Me.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getUTCHours(),{unit:"hour"}):Me.H(n,t)},K:function(n,t,e){var r=n.getUTCHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},k:function(n,t,e){var r=n.getUTCHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):Me.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):Me.s(n,t)},S:function(n,t){return Me.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 Cd(o);case"XXXX":case"XX":return li(o);default:return li(o,":")}},x:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"x":return Cd(o);case"xxxx":case"xx":return li(o);default:return li(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"+wd(o,":");default:return"GMT"+li(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"+wd(o,":");default:return"GMT"+li(o,":")}},t:function(n,t,e,r){var a=r._originalDate||n,o=Math.floor(a.getTime()/1e3);return Q(o,t.length)},T:function(n,t,e,r){var a=r._originalDate||n,o=a.getTime();return Q(o,t.length)}};function wd(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+Q(a,2)}function Cd(i,n){if(i%60===0){var t=i>0?"-":"+";return t+Q(Math.abs(i)/60,2)}return li(i,n)}function li(i,n){var t=n||"",e=i>0?"-":"+",r=Math.abs(i),a=Q(Math.floor(r/60),2),o=Q(r%60,2);return e+a+t+o}var Td=lb;var Md=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"});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"});default:return t.time({width:"full"})}},db=function(n,t){var e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return Md(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;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Md(r,t)).replace("{{time}}",Dd(a,t))},ub={p:Dd,P:db},Mn=ub;var hb=["D","DD"],fb=["YY","YYYY"];function Xr(i){return hb.indexOf(i)!==-1}function Kr(i){return fb.indexOf(i)!==-1}function Yi(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 mb={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"}},pb=function(n,t,e){var r,a=mb[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},Pd=pb;function Dn(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 gb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_b={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vb={date:Dn({formats:gb,defaultWidth:"full"}),time:Dn({formats:bb,defaultWidth:"full"}),dateTime:Dn({formats:_b,defaultWidth:"full"})},Sd=vb;var yb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xb=function(n,t,e,r){return yb[n]},Id=xb;function di(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,c=t!=null&&t.width?String(t.width):i.defaultWidth;r=i.values[c]||i.values[s]}var l=i.argumentCallback?i.argumentCallback(n):n;return r[l]}}var kb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Cb={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"]},Mb={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"}},Db={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"}},Pb=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"},Sb={ordinalNumber:Pb,era:di({values:kb,defaultWidth:"wide"}),quarter:di({values:wb,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:di({values:Cb,defaultWidth:"wide"}),day:di({values:Tb,defaultWidth:"wide"}),dayPeriod:di({values:Mb,defaultWidth:"wide",formattingValues:Db,defaultFormattingWidth:"wide"})},Od=Sb;function ui(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],c=Array.isArray(s)?Ob(s,function(u){return u.test(o)}):Ib(s,function(u){return u.test(o)}),l;l=i.valueCallback?i.valueCallback(c):c,l=t.valueCallback?t.valueCallback(l):l;var d=n.slice(o.length);return{value:l,rest:d}}}function Ib(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 is(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 Ab=/^(\d+)(th|st|nd|rd)?/i,Rb=/\d+/i,Eb={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},Lb={any:[/^b/i,/^(a|c)/i]},Fb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zb={any:[/1/i,/2/i,/3/i,/4/i]},Bb={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},Nb={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]},Wb={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},Vb={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]},Hb={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},Yb={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}},jb={ordinalNumber:is({matchPattern:Ab,parsePattern:Rb,valueCallback:function(n){return parseInt(n,10)}}),era:ui({matchPatterns:Eb,defaultMatchWidth:"wide",parsePatterns:Lb,defaultParseWidth:"any"}),quarter:ui({matchPatterns:Fb,defaultMatchWidth:"wide",parsePatterns:zb,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:ui({matchPatterns:Bb,defaultMatchWidth:"wide",parsePatterns:Nb,defaultParseWidth:"any"}),day:ui({matchPatterns:Wb,defaultMatchWidth:"wide",parsePatterns:Vb,defaultParseWidth:"any"}),dayPeriod:ui({matchPatterns:Hb,defaultMatchWidth:"any",parsePatterns:Yb,defaultParseWidth:"any"})},Ad=jb;var Ub={code:"en-US",formatDistance:Pd,formatLong:Sd,formatRelative:Id,localize:Od,match:Ad,options:{weekStartsOn:0,firstWeekContainsDate:1}},Rd=Ub;var Zr=Rd;var qb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$b=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gb=/^'([^]*?)'?$/,Qb=/''/g,Xb=/[a-zA-Z]/;function Jr(i,n,t){var e,r,a,o,s,c,l,d,u,h,f,m,p,g,b,_,k,C;y(2,arguments);var v=String(n),x=It(),P=(e=(r=t?.locale)!==null&&r!==void 0?r:x.locale)!==null&&e!==void 0?e:Zr,D=z((a=(o=(s=(c=t?.firstWeekContainsDate)!==null&&c!==void 0?c:t==null||(l=t.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:x.firstWeekContainsDate)!==null&&o!==void 0?o:(u=x.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=z((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:x.weekStartsOn)!==null&&m!==void 0?m:(k=x.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 F=M(i);if(!zi(F))throw new RangeError("Invalid time value");var B=qe(F),V=kn(F,B),ct={firstWeekContainsDate:D,weekStartsOn:S,locale:P,_originalDate:F},xt=v.match($b).map(function(N){var Y=N[0];if(Y==="p"||Y==="P"){var K=Mn[Y];return K(N,P.formatLong)}return N}).join("").match(qb).map(function(N){if(N==="''")return"'";var Y=N[0];if(Y==="'")return Kb(N);var K=Td[Y];if(K)return!(t!=null&&t.useAdditionalWeekYearTokens)&&Kr(N)&&Yi(N,n,String(i)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Xr(N)&&Yi(N,n,String(i)),K(V,N,P.localize,ct);if(Y.match(Xb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return N}).join("");return xt}function Kb(i){var n=i.match(Gb);return n?n[1].replace(Qb,"'"):i}function ns(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 rs(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 Ed(i,n){if(i){if(typeof i=="string")return rs(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)?rs(i,n):void 0}}function as(i,n){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=Ed(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(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
9
- 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 l=t.next();return o=l.done,l},e:function(l){s=!0,a=l},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 ta(i,n){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ta(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&&ta(i,n)}function Pn(i){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pn(i)}function os(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(os=function(){return!!i})()}function Ld(i,n){if(n&&(Ot(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=os();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 Ld(this,t)}}function I(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function Fd(i,n){if(Ot(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var e=t.call(i,n||"default");if(Ot(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function ea(i){var n=Fd(i,"string");return Ot(n)=="symbol"?n:n+""}function zd(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,ea(e.key),e)}}function O(i,n,t){return n&&zd(i.prototype,n),t&&zd(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function w(i,n,t){return(n=ea(n))in i?Object.defineProperty(i,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[n]=t,i}var Zb=10,Bd=(function(){function i(){I(this,i),w(this,"priority",void 0),w(this,"subPriority",0)}return O(i,[{key:"validate",value:function(t,e){return!0}}]),i})(),Nd=(function(i){A(t,i);var n=R(t);function t(e,r,a,o,s){var c;return I(this,t),c=n.call(this),c.value=e,c.validateValue=r,c.setValue=a,c.priority=o,s&&(c.subPriority=s),c}return O(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})(Bd),Wd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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",Zb),w(T(e),"subPriority",-1),e}return O(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})(Bd);var L=(function(){function i(){I(this,i),w(this,"incompatibleTokens",void 0),w(this,"priority",void 0),w(this,"subPriority",void 0)}return O(i,[{key:"run",value:function(t,e,r,a){var o=this.parse(t,e,r,a);return o?{setter:new Nd(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 Vd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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})(L);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}/},$t={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 J(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 Gt(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*si+a*oi+o*vd),rest:n.slice(t[0].length)}}function ia(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 ji(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 Ui(i){switch(i){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function na(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 ra(i){return i%400===0||i%4===0&&i%100!==0}var Hd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return{year:l,isTwoDigitYear:a==="yy"}};switch(a){case"y":return J(H(4,r),s);case"yo":return J(o.ordinalNumber(r,{unit:"year"}),s);default:return J(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 c=na(o.year,s);return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}var l=!("era"in a)||a.era===1?o.year:1-o.year;return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(L);var Yd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return{year:l,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return J(H(4,r),s);case"Yo":return J(o.ordinalNumber(r,{unit:"year"}),s);default:return J(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 c=ci(r,s);if(o.isTwoDigitYear){var l=na(o.year,c);return r.setUTCFullYear(l,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),zt(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),zt(r,s)}}]),t})(L);var jd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){return a==="R"?ji(4,r):ji(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),qt(s)}}]),t})(L);var Ud=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){return a==="u"?ji(4,r):ji(a.length,r)}},{key:"set",value:function(r,a,o){return r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(L);var qd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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})(L);var $d=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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})(L);var Gd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return l-1};switch(a){case"M":return J(q($.month,r),s);case"MM":return J(H(2,r),s);case"Mo":return J(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"});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})(L);var Qd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return l-1};switch(a){case"L":return J(q($.month,r),s);case"LL":return J(H(2,r),s);case"Lo":return J(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"});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})(L);function ss(i,n,t){y(2,arguments);var e=M(i),r=z(n),a=Tn(e,t)-r;return e.setUTCDate(e.getUTCDate()-a*7),e}var Xd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 zt(ss(r,o,s),s)}}]),t})(L);function cs(i,n){y(2,arguments);var t=M(i),e=z(n),r=Cn(t)-e;return t.setUTCDate(t.getUTCDate()-r*7),t}var Kd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 qt(cs(r,o))}}]),t})(L);var Jb=[31,28,31,30,31,30,31,31,30,31,30,31],t_=[31,29,31,30,31,30,31,31,30,31,30,31],Zd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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=ra(o),c=r.getUTCMonth();return s?a>=1&&a<=t_[c]:a>=1&&a<=Jb[c]}},{key:"set",value:function(r,a,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),t})(L);var Jd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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=ra(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})(L);function hi(i,n,t){var e,r,a,o,s,c,l,d;y(2,arguments);var u=It(),h=z((e=(r=(a=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(d=l.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=z(n),p=f.getUTCDay(),g=m%7,b=(g+7)%7,_=(b<h?7:0)+m-p;return f.setUTCDate(f.getUTCDate()+_),f}var tu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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=hi(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(L);var eu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return J(H(a.length,r),c);case"eo":return J(o.ordinalNumber(r,{unit:"day"}),c);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"});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=hi(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(L);var iu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return J(H(a.length,r),c);case"co":return J(o.ordinalNumber(r,{unit:"day"}),c);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"});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=hi(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(L);function ls(i,n){y(2,arguments);var t=z(n);t%7===0&&(t=t-7);var e=1,r=M(i),a=r.getUTCDay(),o=t%7,s=(o+7)%7,c=(s<e?7:0)+t-a;return r.setUTCDate(r.getUTCDate()+c),r}var nu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return l===0?7:l};switch(a){case"i":case"ii":return H(a.length,r);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return J(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 J(o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return J(o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);default:return J(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=ls(r,o),r.setUTCHours(0,0,0,0),r}}]),t})(L);var ru=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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(Ui(o),0,0,0),r}}]),t})(L);var au=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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(Ui(o),0,0,0),r}}]),t})(L);var ou=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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(Ui(o),0,0,0),r}}]),t})(L);var su=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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})(L);var cu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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})(L);var lu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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})(L);var du=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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})(L);var uu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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})(L);var hu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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})(L);var fu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){var o=function(c){return Math.floor(c*Math.pow(10,-a.length+3))};return J(H(a.length,r),o)}},{key:"set",value:function(r,a,o){return r.setUTCMilliseconds(o),r}}]),t})(L);var mu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){switch(a){case"X":return Gt($t.basicOptionalMinutes,r);case"XX":return Gt($t.basic,r);case"XXXX":return Gt($t.basicOptionalSeconds,r);case"XXXXX":return Gt($t.extendedOptionalSeconds,r);default:return Gt($t.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(L);var pu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){switch(a){case"x":return Gt($t.basicOptionalMinutes,r);case"xx":return Gt($t.basic,r);case"xxxx":return Gt($t.basicOptionalSeconds,r);case"xxxxx":return Gt($t.extendedOptionalSeconds,r);default:return Gt($t.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(L);var gu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r){return ia(r)}},{key:"set",value:function(r,a,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),t})(L);var bu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r){return ia(r)}},{key:"set",value:function(r,a,o){return[new Date(o),{timestampIsSet:!0}]}}]),t})(L);var _u={G:new Vd,y:new Hd,Y:new Yd,R:new jd,u:new Ud,Q:new qd,q:new $d,M:new Gd,L:new Qd,w:new Xd,I:new Kd,d:new Zd,D:new Jd,E:new tu,e:new eu,c:new iu,i:new nu,a:new ru,b:new au,B:new ou,h:new su,H:new cu,K:new lu,k:new du,m:new uu,s:new hu,S:new fu,X:new mu,x:new pu,t:new gu,T:new bu};var e_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,i_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,n_=/^'([^]*?)'?$/,r_=/''/g,a_=/\S/,o_=/[a-zA-Z]/;function aa(i,n,t,e){var r,a,o,s,c,l,d,u,h,f,m,p,g,b,_,k,C,v;y(3,arguments);var x=String(i),P=String(n),D=It(),S=(r=(a=e?.locale)!==null&&a!==void 0?a:D.locale)!==null&&r!==void 0?r:Zr;if(!S.match)throw new RangeError("locale must contain match property");var F=z((o=(s=(c=(l=e?.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(d=e.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&c!==void 0?c: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(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=z((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 x===""?M(t):new Date(NaN);var V={firstWeekContainsDate:F,weekStartsOn:B,locale:S},ct=[new Wd],xt=P.match(i_).map(function(_t){var et=_t[0];if(et in Mn){var Wt=Mn[et];return Wt(_t,S.formatLong)}return _t}).join("").match(e_),N=[],Y=as(xt),K;try{var Ft=function(){var et=K.value;!(e!=null&&e.useAdditionalWeekYearTokens)&&Kr(et)&&Yi(et,P,i),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Xr(et)&&Yi(et,P,i);var Wt=et[0],On=_u[Wt];if(On){var us=On.incompatibleTokens;if(Array.isArray(us)){var hs=N.find(function(fs){return us.includes(fs.token)||fs.token===Wt});if(hs)throw new RangeError("The format string mustn't contain `".concat(hs.fullToken,"` and `").concat(et,"` at the same time"))}else if(On.incompatibleTokens==="*"&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(et,"` and any other token at the same time"));N.push({token:Wt,fullToken:et});var da=On.run(x,et,S.match,V);if(!da)return{v:new Date(NaN)};ct.push(da.setter),x=da.rest}else{if(Wt.match(o_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Wt+"`");if(et==="''"?et="'":Wt==="'"&&(et=s_(et)),x.indexOf(et)===0)x=x.slice(et.length);else return{v:new Date(NaN)}}};for(Y.s();!(K=Y.n()).done;){var pt=Ft();if(Ot(pt)==="object")return pt.v}}catch(_t){Y.e(_t)}finally{Y.f()}if(x.length>0&&a_.test(x))return new Date(NaN);var De=ct.map(function(_t){return _t.priority}).sort(function(_t,et){return et-_t}).filter(function(_t,et,Wt){return Wt.indexOf(_t)===et}).map(function(_t){return ct.filter(function(et){return et.priority===_t}).sort(function(et,Wt){return Wt.subPriority-et.subPriority})}).map(function(_t){return _t[0]}),Pe=M(t);if(isNaN(Pe.getTime()))return new Date(NaN);var Bt=kn(Pe,qe(Pe)),Se={},Nt=as(De),Ie;try{for(Nt.s();!(Ie=Nt.n()).done;){var te=Ie.value;if(!te.validate(Bt,V))return new Date(NaN);var In=te.set(Bt,Se,V);Array.isArray(In)?(Bt=In[0],ns(Se,In[1])):Bt=In}}catch(_t){Nt.e(_t)}finally{Nt.f()}return Bt}function s_(i){return i.match(n_)[1].replace(r_,"'")}function oa(i){y(1,arguments);var n=M(i);return n.setMinutes(0,0,0),n}function sa(i){y(1,arguments);var n=M(i);return n.setMilliseconds(0),n}function la(i,n){var t;y(1,arguments);var e=z((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=u_(i),a;if(r.date){var o=h_(r.date,e);a=f_(o.restDateString,o.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s=a.getTime(),c=0,l;if(r.time&&(c=m_(r.time),isNaN(c)))return new Date(NaN);if(r.timezone){if(l=p_(r.timezone),isNaN(l))return new Date(NaN)}else{var d=new Date(s+c),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+c+l)}var ca={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},c_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,l_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,d_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u_(i){var n={},t=i.split(ca.dateTimeDelimiter),e;if(t.length>2)return n;if(/:/.test(t[0])?e=t[0]:(n.date=t[0],e=t[1],ca.timeZoneDelimiter.test(n.date)&&(n.date=i.split(ca.timeZoneDelimiter)[0],e=i.substr(n.date.length,i.length))),e){var r=ca.timezone.exec(e);r?(n.time=e.replace(r[1],""),n.timezone=r[1]):n.time=e}return n}function h_(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 f_(i,n){if(n===null)return new Date(NaN);var t=i.match(c_);if(!t)return new Date(NaN);var e=!!t[4],r=Sn(t[1]),a=Sn(t[2])-1,o=Sn(t[3]),s=Sn(t[4]),c=Sn(t[5])-1;if(e)return y_(n,s,c)?g_(n,s,c):new Date(NaN);var l=new Date(0);return!__(n,a,o)||!v_(n,r)?new Date(NaN):(l.setUTCFullYear(n,a,Math.max(r,o)),l)}function Sn(i){return i?parseInt(i):1}function m_(i){var n=i.match(l_);if(!n)return NaN;var t=ds(n[1]),e=ds(n[2]),r=ds(n[3]);return x_(t,e,r)?t*si+e*oi+r*1e3:NaN}function ds(i){return i&&parseFloat(i.replace(",","."))||0}function p_(i){if(i==="Z")return 0;var n=i.match(d_);if(!n)return 0;var t=n[1]==="+"?-1:1,e=parseInt(n[2]),r=n[3]&&parseInt(n[3])||0;return k_(e,r)?t*(e*si+r*oi):NaN}function g_(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 b_=[31,null,31,30,31,30,31,31,30,31,30,31];function vu(i){return i%400===0||i%4===0&&i%100!==0}function __(i,n,t){return n>=0&&n<=11&&t>=1&&t<=(b_[n]||(vu(i)?29:28))}function v_(i,n){return n>=1&&n<=(vu(i)?366:365)}function y_(i,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function x_(i,n,t){return i===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&i>=0&&i<25}function k_(i,n){return n>=0&&n<=59}var w_={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"};$o._date.override({_id:"date-fns",formats:function(){return w_},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=aa(i,n,new Date,this.options):i=la(i,this.options)),zi(i)?i.getTime():null},format:function(i,n){return Jr(i,n,this.options)},add:function(i,n,t){switch(t){case"millisecond":return Ut(i,n);case"second":return Or(i,n);case"minute":return Sr(i,n);case"hour":return Pr(i,n);case"day":return Fi(i,n);case"week":return Ar(i,n);case"month":return Ue(i,n);case"quarter":return Ir(i,n);case"year":return Rr(i,n);default:return i}},diff:function(i,n,t){switch(t){case"millisecond":return le(i,n);case"second":return zr(i,n);case"minute":return Lr(i,n);case"hour":return Er(i,n);case"day":return Bi(i,n);case"week":return Br(i,n);case"month":return Vi(i,n);case"quarter":return Fr(i,n);case"year":return Nr(i,n);default:return 0}},startOf:function(i,n,t){switch(n){case"second":return sa(i);case"minute":return Wr(i);case"hour":return oa(i);case"day":return ai(i);case"week":return xn(i);case"isoWeek":return xn(i,{weekStartsOn:+t});case"month":return Hr(i);case"quarter":return Vr(i);case"year":return jr(i);default:return i}},endOf:function(i,n){switch(n){case"second":return Qr(i);case"minute":return $r(i);case"hour":return Ur(i);case"day":return Ni(i);case"week":return qr(i);case"month":return Wi(i);case"quarter":return Gr(i);case"year":return Yr(i);default:return i}}});export{th as a,Iv as b,E_ as c,oh as d,rc as e,Zv as f,a0 as g,Hu as h,Yu as i,uv as j,hv as k,c0 as l,ae as m,it as n,U as o,ut as p,W as q,tt as r,X as s,Di as t,ye as u,G as v,nt as w,Lh as x,ft as y,Ke as z,mc as A,ti as B,jt as C,er as D,ja as E,Zn as F,ir as G,$a as H,st as I,cn as J,ln as K,Oi as L,Ve as M,Tt as N,mt as O,He as P,vr as Q,je as R,qo as S,Jf as T,Jt as U,ce as V,sp as W,Tr as X,wp as Y,og as Z,hg as _,mg as $,pg as aa,wg as ba,Pg as ca,Wo as da,jo as ea,p0 as fa};
8
+ `):i}function gg(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 Fl(i,n){let t=i.chart.ctx,{body:e,footer:r,title:a}=i,{boxWidth:o,boxHeight:s}=n,c=ht(n.bodyFont),l=ht(n.titleFont),d=ht(n.footerFont),u=a.length,h=r.length,f=e.length,m=wt(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*l.lineHeight+(u-1)*n.titleSpacing+n.titleMarginBottom),b){let C=n.displayColors?Math.max(s,c.lineHeight):c.lineHeight;p+=f*C+(b-f)*c.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=l.string,X(i.title,k),t.font=c.string,X(i.beforeBody.concat(i.afterBody),k),_=n.displayColors?o+2+n.boxPadding:0,X(e,C=>{X(C.before,k),X(C.lines,k),X(C.after,k)}),_=0,t.font=d.string,X(i.footer,k),t.restore(),g+=m.width,{width:g,height:p}}function bg(i,n){let{y:t,height:e}=n;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}function _g(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 vg(i,n,t,e){let{x:r,width:a}=t,{width:o,chartArea:{left:s,right:c}}=i,l="center";return e==="center"?l=r<=(s+c)/2?"left":"right":r<=a/2?l="left":r>=o-a/2&&(l="right"),_g(l,i,n,t)&&(l="center"),l}function zl(i,n,t){let e=t.yAlign||n.yAlign||bg(i,t);return{xAlign:t.xAlign||n.xAlign||vg(i,n,t,e),yAlign:e}}function yg(i,n){let{x:t,width:e}=i;return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function xg(i,n,t){let{y:e,height:r}=i;return n==="top"?e+=t:n==="bottom"?e-=r+t:e-=r/2,e}function Bl(i,n,t,e){let{caretSize:r,caretPadding:a,cornerRadius:o}=i,{xAlign:s,yAlign:c}=t,l=r+a,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:f}=We(o),m=yg(n,s),p=xg(n,c,l);return c==="center"?s==="left"?m+=l:s==="right"&&(m-=l):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 pr(i,n,t){let e=wt(t.padding);return n==="center"?i.x+i.width/2:n==="right"?i.x+i.width-e.right:i.x+e.left}function Nl(i){return se([],Ce(i))}function kg(i,n,t){return ke(i,{tooltip:n,tooltipItems:t,type:"tooltip"})}function Wl(i,n){let t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?i.override(t):i}var bd={beforeTitle:ae,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:ae,beforeBody:ae,beforeLabel:ae,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 j(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:ae,afterBody:ae,beforeFooter:ae,footer:ae,afterFooter:ae};function Et(i,n,t,e){let r=i[n].call(t,e);return typeof r>"u"?bd[n].call(t,e):r}var Hl=(()=>{class i extends Jt{static positioners=gn;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 vr(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=kg(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:r}=e,a=Et(r,"beforeTitle",this,t),o=Et(r,"title",this,t),s=Et(r,"afterTitle",this,t),c=[];return c=se(c,Ce(a)),c=se(c,Ce(o)),c=se(c,Ce(s)),c}getBeforeBody(t,e){return Nl(Et(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:r}=e,a=[];return X(t,o=>{let s={before:[],lines:[],after:[]},c=Wl(r,o);se(s.before,Ce(Et(c,"beforeLabel",this,o))),se(s.lines,Et(c,"label",this,o)),se(s.after,Ce(Et(c,"afterLabel",this,o))),a.push(s)}),a}getAfterBody(t,e){return Nl(Et(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:r}=e,a=Et(r,"beforeFooter",this,t),o=Et(r,"footer",this,t),s=Et(r,"afterFooter",this,t),c=[];return c=se(c,Ce(a)),c=se(c,Ce(o)),c=se(c,Ce(s)),c}_createItems(t){let e=this._active,r=this.chart.data,a=[],o=[],s=[],c=[],l,d;for(l=0,d=e.length;l<d;++l)c.push(gg(this.chart,e[l]));return t.filter&&(c=c.filter((u,h,f)=>t.filter(u,h,f,r))),t.itemSort&&(c=c.sort((u,h)=>t.itemSort(u,h,r))),X(c,u=>{let h=Wl(t.callbacks,u);a.push(Et(h,"labelColor",this,u)),o.push(Et(h,"labelPointStyle",this,u)),s.push(Et(h,"labelTextColor",this,u))}),this.labelColors=a,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=c,c}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 c=gn[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 l=this._size=Fl(this,r),d=Object.assign({},c,l),u=zl(this.chart,r,d),h=Bl(r,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:c.x,caretY:c.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:c}=r,{topLeft:l,topRight:d,bottomLeft:u,bottomRight:h}=We(c),{x:f,y:m}=t,{width:p,height:g}=e,b,_,k,C,v,x;return o==="center"?(v=m+g/2,a==="left"?(b=f,_=b-s,C=v+s,x=v-s):(b=f+p,_=b+s,C=v-s,x=v+s),k=b):(a==="left"?_=f+Math.max(l,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),x=C),{x1:b,x2:_,x3:k,y1:C,y2:v,y3:x}}drawTitle(t,e,r){let a=this.title,o=a.length,s,c,l;if(o){let d=ti(r.rtl,this.x,this.width);for(t.x=pr(this,r.titleAlign,r),e.textAlign=d.textAlign(r.titleAlign),e.textBaseline="middle",s=ht(r.titleFont),c=r.titleSpacing,e.fillStyle=r.titleColor,e.font=s.string,l=0;l<o;++l)e.fillText(a[l],d.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+c,l+1===o&&(t.y+=r.titleMarginBottom-c)}}_drawColorBox(t,e,r,a,o){let s=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:l,boxWidth:d}=o,u=ht(o.bodyFont),h=pr(this,"left",o),f=a.x(h),m=l<u.lineHeight?(u.lineHeight-l)/2:0,p=e.y+m;if(o.usePointStyle){let g={radius:Math.min(d,l)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},b=a.leftForLtr(f,d)+d/2,_=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,ar(t,g,b,_),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,ar(t,g,b,_)}else{t.lineWidth=U(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),_=We(s.borderRadius);Object.values(_).some(k=>k!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ii(t,{x:g,y:p,w:d,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Ii(t,{x:b,y:p+1,w:d-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,d,l),t.strokeRect(g,p,d,l),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,d-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){let{body:a}=this,{bodySpacing:o,bodyAlign:s,displayColors:c,boxHeight:l,boxWidth:d,boxPadding:u}=r,h=ht(r.bodyFont),f=h.lineHeight,m=0,p=ti(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,x,P,D;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=pr(this,b,r),e.fillStyle=r.bodyColor,X(this.beforeBody,g),m=c&&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,X(_.before,g),C=_.lines,c&&C.length&&(this._drawColorBox(e,t,v,p,r),f=Math.max(h.lineHeight,l)),x=0,D=C.length;x<D;++x)g(C[x]),f=h.lineHeight;X(_.after,g)}m=0,f=h.lineHeight,X(this.afterBody,g),t.y-=o}drawFooter(t,e,r){let a=this.footer,o=a.length,s,c;if(o){let l=ti(r.rtl,this.x,this.width);for(t.x=pr(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=l.textAlign(r.footerAlign),e.textBaseline="middle",s=ht(r.footerFont),e.fillStyle=r.footerColor,e.font=s.string,c=0;c<o;++c)e.fillText(a[c],l.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:c,y:l}=t,{width:d,height:u}=r,{topLeft:h,topRight:f,bottomLeft:m,bottomRight:p}=We(a.cornerRadius);e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(c+h,l),s==="top"&&this.drawCaret(t,e,r,a),e.lineTo(c+d-f,l),e.quadraticCurveTo(c+d,l,c+d,l+f),s==="center"&&o==="right"&&this.drawCaret(t,e,r,a),e.lineTo(c+d,l+u-p),e.quadraticCurveTo(c+d,l+u,c+d-p,l+u),s==="bottom"&&this.drawCaret(t,e,r,a),e.lineTo(c+m,l+u),e.quadraticCurveTo(c,l+u,c,l+u-m),s==="center"&&o==="left"&&this.drawCaret(t,e,r,a),e.lineTo(c,l+h),e.quadraticCurveTo(c,l,c+h,l),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=gn[t.position].call(this,this._active,this._eventPosition);if(!s)return;let c=this._size=Fl(this,t),l=Object.assign({},s,this._size),d=zl(e,t,l),u=Bl(t,l,d,e);(a._to!==u.x||o._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.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=wt(e.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&c&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,a,e),co(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),lo(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let r=this._active,a=t.map(({datasetIndex:c,index:l})=>{let d=this.chart.getDatasetMeta(c);if(!d)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:d.data[l],index:l}}),o=!on(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),c=this._positionChanged(s,t),l=e||!on(s,o)||c;return l&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,r,a){let o=this.options;if(t.type==="mouseout")return[];if(!a)return e.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.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=gn[o.position].call(this,t,e);return s!==!1&&(r!==s.x||a!==s.y)}}return i})(),wg={id:"tooltip",_element:Hl,positioners:gn,afterInit(i,n,t){t&&(i.tooltip=new Hl({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",Ht(bt({},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:bd},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"]},Cg=Object.freeze({__proto__:null,Colors:Fp,Decimation:Wp,Filler:og,Legend:hg,SubTitle:pg,Title:mg,Tooltip:wg}),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 Mg(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 Dg=(i,n)=>i===null?null:pt(Math.round(i),0,n);function Vl(i){let n=this.getLabels();return i>=0&&i<n.length?n[i]:i}var Pg=(()=>{class i extends ni{static id="category";static defaults={ticks:{callback:Vl}};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(j(t))return null;let r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:Mg(r,t,W(e,t),this._addedLabels),Dg(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 Vl.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 Sg(i,n){let t=[],{bounds:r,step:a,min:o,max:s,precision:c,count:l,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=a||1,m=d-1,{min:p,max:g}=n,b=!j(o),_=!j(s),k=!j(l),C=(g-p)/(u+1),v=Ha((g-p)/m/f)*f,x,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=Ha(S*v/m/f)*f),j(c)||(x=Math.pow(10,c),v=Math.ceil(v*x)/x),r==="ticks"?(P=Math.floor(p/v)*v,D=Math.ceil(g/v)*v):(P=p,D=g),b&&_&&a&&Pc((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=l-1,v=(D-P)/S):(S=(D-P)/v,Di(S,Math.round(S),v/1e3)?S=Math.round(S):S=Math.ceil(S));let F=Math.max(Ya(v),Ya(P));x=Math.pow(10,j(c)?F:c),P=Math.round(P*x)/x,D=Math.round(D*x)/x;let B=0;for(b&&(h&&P!==o?(t.push({value:o}),P<o&&B++,Di(Math.round((P+B*v)*x)/x,o,Yl(o,C,i))&&B++):P<o&&B++);B<S;++B){let H=Math.round((P+B*v)*x)/x;if(_&&H>s)break;t.push({value:H})}return _&&h&&D!==s?t.length&&Di(t[t.length-1].value,s,Yl(s,C,i))?t[t.length-1].value=s:t.push({value:s}):(!_||D===s)&&t.push({value:D}),t}function Yl(i,n,{horizontal:t,minRotation:e}){let r=jt(e),a=(t?Math.sin(r):Math.cos(r))||.001,o=.75*n*(""+i).length;return Math.min(n/a,o)}var Ei=class extends ni{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 j(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=c=>r=t?r:c,s=c=>a=e?a:c;if(n){let c=Zt(r),l=Zt(a);c<0&&l<0?s(0):c>0&&l>0&&o(0)}if(r===a){let c=a===0?1:Math.abs(a*.05);s(a+c),n||o(r-c)}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=Sg(r,a);return n.bounds==="ticks"&&Va(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 Si(n,this.chart.options.locale,this.options.ticks.format)}},Wo=class extends Ei{static id="linear";static defaults={ticks:{callback:sn.formatters.numeric}};determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=lt(n)?n:0,this.max=lt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let n=this.isHorizontal(),t=n?this.width:this.height,e=jt(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}},vn=i=>Math.floor(ye(i)),ii=(i,n)=>Math.pow(10,vn(i)+n);function jl(i){return i/Math.pow(10,vn(i))===1}function Ul(i,n,t){let e=Math.pow(10,t),r=Math.floor(i/e);return Math.ceil(n/e)-r}function Ig(i,n){let t=n-i,e=vn(t);for(;Ul(i,n,e)>10;)e++;for(;Ul(i,n,e)<10;)e--;return Math.min(e,vn(i))}function Og(i,{min:n,max:t}){n=Rt(i.min,n);let e=[],r=vn(n),a=Ig(n,t),o=a<0?Math.pow(10,Math.abs(a)):1,s=Math.pow(10,a),c=r>a?Math.pow(10,r):0,l=Math.round((n-c)*o)/o,d=Math.floor((n-c)/s/10)*s*10,u=Math.floor((l-d)/Math.pow(10,a)),h=Rt(i.min,Math.round((c+d+u*Math.pow(10,a))*o)/o);for(;h<t;)e.push({value:h,major:jl(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(a++,u=2,o=a>=0?1:o),h=Math.round((c+d+u*Math.pow(10,a))*o)/o;let f=Rt(i.max,h);return e.push({value:f,major:jl(f),significand:u}),e}var Ho=class extends ni{static id="logarithmic";static defaults={ticks:{callback:sn.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=Ei.prototype.parse.apply(this,[n,t]);if(e===0){this._zero=!0;return}return lt(e)&&e>0?e:null}determineDataLimits(){let{min:n,max:t}=this.getMinMax(!0);this.min=lt(n)?Math.max(0,n):null,this.max=lt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!lt(this._userMin)&&(this.min=n===ii(this.min,0)?ii(this.min,-1):ii(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(ii(e,-1)),o(ii(r,1)))),e<=0&&a(ii(r,-1)),r<=0&&o(ii(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"&&Va(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":Si(n,this.chart.options.locale,this.options.ticks.format)}configure(){let n=this.min;super.configure(),this._startValue=ye(n),this._valueRange=ye(this.max)-ye(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(ye(n)-this._startValue)/this._valueRange)}getValueForPixel(n){let t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}};function Vo(i){let n=i.ticks;if(n.display&&i.display){let t=wt(n.backdropPadding);return W(n.font&&n.font.size,at.font.size)+t.height}return 0}function Ag(i,n,t){return t=it(t)?t:[t],{w:zc(i,n.string,t),h:t.length*n.lineHeight}}function ql(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 Rg(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?G/a:0;for(let c=0;c<a;c++){let l=o.setContext(i.getPointLabelContext(c));r[c]=l.padding;let d=i.getPointPosition(c,i.drawingArea+r[c],s),u=ht(l.font),h=Ag(i.ctx,u,i._pointLabels[c]);e[c]=h;let f=xt(i.getIndexAngle(c)+s),m=Math.round(er(f)),p=ql(m,d.x,h.w,0,180),g=ql(m,d.y,h.h,90,270);Eg(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=zg(i,e,r)}function Eg(i,n,t,e,r){let a=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t)),s=0,c=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?(c=(n.t-r.start)/o,i.t=Math.min(i.t,n.t-c)):r.end>n.b&&(c=(r.end-n.b)/o,i.b=Math.max(i.b,n.b+c))}function Lg(i,n,t){let e=i.drawingArea,{extra:r,additionalAngle:a,padding:o,size:s}=t,c=i.getPointPosition(n,e+r+o,a),l=Math.round(er(xt(c.angle+ut))),d=Wg(c.y,s.h,l),u=Bg(l),h=Ng(c.x,s.w,u);return{visible:!0,x:c.x,y:d,textAlign:u,left:h,top:d,right:h+s.w,bottom:d+s.h}}function Fg(i,n){if(!n)return!0;let{left:t,top:e,right:r,bottom:a}=i;return!(re({x:t,y:e},n)||re({x:t,y:a},n)||re({x:r,y:e},n)||re({x:r,y:a},n))}function zg(i,n,t){let e=[],r=i._pointLabels.length,a=i.options,{centerPointLabels:o,display:s}=a.pointLabels,c={extra:Vo(a)/2,additionalAngle:o?G/r:0},l;for(let d=0;d<r;d++){c.padding=t[d],c.size=n[d];let u=Lg(i,d,c);e.push(u),s==="auto"&&(u.visible=Fg(u,l),u.visible&&(l=u))}return e}function Bg(i){return i===0||i===180?"center":i<180?"left":"right"}function Ng(i,n,t){return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function Wg(i,n,t){return t===90||t===270?i-=n/2:(t>270||t<90)&&(i-=n),i}function Hg(i,n,t){let{left:e,top:r,right:a,bottom:o}=t,{backdropColor:s}=n;if(!j(s)){let c=We(n.borderRadius),l=wt(n.backdropPadding);i.fillStyle=s;let d=e-l.left,u=r-l.top,h=a-e+l.width,f=o-r+l.height;Object.values(c).some(m=>m!==0)?(i.beginPath(),Ii(i,{x:d,y:u,w:h,h:f,radius:c}),i.fill()):i.fillRect(d,u,h,f)}}function Vg(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));Hg(t,o,a);let s=ht(o.font),{x:c,y:l,textAlign:d}=a;Ne(t,i._pointLabels[r],c,l+s.lineHeight/2,s,{color:o.color,textAlign:d,textBaseline:"middle"})}}function _d(i,n,t,e){let{ctx:r}=i;if(t)r.arc(i.xCenter,i.yCenter,n,0,nt);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 Yg(i,n,t,e,r){let a=i.ctx,o=n.circular,{color:s,lineWidth:c}=n;!o&&!e||!s||!c||t<0||(a.save(),a.strokeStyle=s,a.lineWidth=c,a.setLineDash(r.dash||[]),a.lineDashOffset=r.dashOffset,a.beginPath(),_d(i,t,o,e),a.closePath(),a.stroke(),a.restore())}function jg(i,n,t){return ke(i,{label:t,index:n,type:"pointLabel"})}var Yo=class extends Ei{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:sn.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=wt(Vo(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=lt(n)&&!isNaN(n)?n:0,this.max=lt(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Vo(this.options))}generateTickLabels(n){Ei.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,e)=>{let r=tt(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?Rg(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=nt/(this._pointLabels.length||1),e=this.options.startAngle||0;return xt(n*t+jt(e))}getDistanceFromCenterForValue(n){if(j(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(j(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 jg(this.getContext(),n,e)}}getPointPosition(n,t,e=0){let r=this.getIndexAngle(n)-ut+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(),_d(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,c,l;if(t.pointLabels.display&&Vg(this,o),r.display&&this.ticks.forEach((d,u)=>{if(u!==0||u===0&&this.min<0){c=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=r.setContext(h),m=a.setContext(h);Yg(this,f,c,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,c=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),l=this.getPointPosition(s,c),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.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,c)=>{if(c===0&&this.min>=0&&!t.reverse)return;let l=e.setContext(this.getContext(c)),d=ht(l.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),l.showLabelBackdrop){n.font=d.string,o=n.measureText(s.label).width,n.fillStyle=l.backdropColor;let u=wt(l.backdropPadding);n.fillRect(-o/2-u.left,-a-d.size/2-u.top,o+u.width,d.size+u.height)}Ne(n,s.label,0,-a,d,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}),n.restore()}drawTitle(){}},Dr={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}},Lt=Object.keys(Dr);function $l(i,n){return i-n}function Gl(i,n){if(j(n))return null;let t=i._adapter,{parser:e,round:r,isoWeekday:a}=i._parseOpts,o=n;return typeof e=="function"&&(o=e(o)),lt(o)||(o=typeof e=="string"?t.parse(o,e):t.parse(o)),o===null?null:(r&&(o=r==="week"&&(Je(a)||a===!0)?t.startOf(o,"isoWeek",a):t.startOf(o,r)),+o)}function Ql(i,n,t,e){let r=Lt.length;for(let a=Lt.indexOf(i);a<r-1;++a){let o=Dr[Lt[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((t-n)/(s*o.size))<=e)return Lt[a]}return Lt[r-1]}function Ug(i,n,t,e,r){for(let a=Lt.length-1;a>=Lt.indexOf(t);a--){let o=Lt[a];if(Dr[o].common&&i._adapter.diff(r,e,o)>=n-1)return o}return Lt[t?Lt.indexOf(t):0]}function qg(i){for(let n=Lt.indexOf(i)+1,t=Lt.length;n<t;++n)if(Dr[Lt[n]].common)return Lt[n]}function Xl(i,n,t){if(!t)i[n]=!0;else if(t.length){let{lo:e,hi:r}=ir(t,n),a=t[e]>=n?t[e]:t[r];i[a]=!0}}function $g(i,n,t,e){let r=i._adapter,a=+r.startOf(n[0].value,e),o=n[n.length-1].value,s,c;for(s=a;s<=o;s=+r.add(s,1,e))c=t[s],c>=0&&(n[c].major=!0);return n}function Kl(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:$g(i,e,r,t)}var jo=(()=>{class i extends ni{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 $o._date(t.adapters.date);a.init(e),Ti(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:Gl(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:c}=this.getUserBounds();function l(d){!s&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!c&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!s||!c)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),a=lt(a)&&!isNaN(a)?a:+e.startOf(Date.now(),r),o=lt(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,c=Oc(a,o,s);return this._unit=e.unit||(r.autoSkip?Ql(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Ug(this,c.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:qg(this._unit),this.initOffsets(a),t.reverse&&c.reverse(),Kl(this,c,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||Ql(o.minUnit,e,r,this._getLabelCapacity(e)),c=W(a.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,d=Je(l)||l===!0,u={},h=e,f,m;if(d&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,d?"day":s),t.diff(r,e,s)>1e5*c)throw new Error(e+" and "+r+" are too far apart with stepSize of "+c+" "+s);let p=a.ticks.source==="data"&&this.getDataTimestamps();for(f=h,m=0;f<r;f=+t.add(f,c,s),m++)Xl(u,f,p);return(f===r||a.bounds==="ticks"||m===1)&&Xl(u,f,p),Object.keys(u).sort($l).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 tt(s,[t,e,r],this);let c=o.time.displayFormats,l=this._unit,d=this._majorUnit,u=l&&c[l],h=d&&c[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=jt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(a),s=Math.sin(a),c=this._resolveTickFontOptions(0).size;return{w:r*o+c*s,h:r*s+c*o}}_getLabelCapacity(t){let e=this.options.time,r=e.displayFormats,a=r[e.unit]||r.millisecond,o=this._tickFormatFunction(t,0,Kl(this,[t],this._majorUnit),a),s=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return c>0?c: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(Gl(this,a[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return qa(t.sort($l))}}return i})();function gr(i,n,t){let e=0,r=i.length-1,a,o,s,c;t?(n>=i[e].pos&&n<=i[r].pos&&({lo:e,hi:r}=ne(i,"pos",n)),{pos:a,time:s}=i[e],{pos:o,time:c}=i[r]):(n>=i[e].time&&n<=i[r].time&&({lo:e,hi:r}=ne(i,"time",n)),{time:a,pos:s}=i[e],{time:o,pos:c}=i[r]);let l=o-a;return l?s+(c-s)*(n-a)/l:s}var Uo=class extends jo{static id="timeseries";static defaults=jo.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=gr(t,this.min),this._tableRange=gr(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){let{min:t,max:e}=this,r=[],a=[],o,s,c,l,d;for(o=0,s=n.length;o<s;++o)l=n[o],l>=t&&l<=e&&r.push(l);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],c=r[o-1],l=r[o],Math.round((d+c)/2)!==l&&a.push({time:l,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(gr(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){let t=this._offsets,e=this.getDecimalForPixel(n)/t.factor-t.end;return gr(this._table,e*this._tableRange+this._minPos,!0)}},Gg=Object.freeze({__proto__:null,CategoryScale:Pg,LinearScale:Wo,LogarithmicScale:Ho,RadialLinearScale:Yo,TimeScale:jo,TimeSeriesScale:Uo}),p0=[nm,Sp,Cg,Gg];function Ot(i){"@babel/helpers - typeof";return Ot=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},Ot(i)}function z(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 y(i,n){if(n.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+n.length+" present")}function M(i){y(1,arguments);var n=Object.prototype.toString.call(i);return i instanceof Date||Ot(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 Li(i,n){y(2,arguments);var t=M(i),e=z(n);return isNaN(e)?new Date(NaN):(e&&t.setDate(t.getDate()+e),t)}function je(i,n){y(2,arguments);var t=M(i),e=z(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 Ut(i,n){y(2,arguments);var t=M(i).getTime(),e=z(n);return new Date(t+e)}var Qg=36e5;function Pr(i,n){y(2,arguments);var t=z(n);return Ut(i,t*Qg)}var Xg={};function It(){return Xg}function xn(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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 Ue(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 ri(i){y(1,arguments);var n=M(i);return n.setHours(0,0,0,0),n}var Kg=864e5;function Go(i,n){y(2,arguments);var t=ri(i),e=ri(n),r=t.getTime()-Ue(t),a=e.getTime()-Ue(e);return Math.round((r-a)/Kg)}var Zg=6e4;function Sr(i,n){y(2,arguments);var t=z(n);return Ut(i,t*Zg)}function Ir(i,n){y(2,arguments);var t=z(n),e=t*3;return je(i,e)}function Or(i,n){y(2,arguments);var t=z(n);return Ut(i,t*1e3)}function Ar(i,n){y(2,arguments);var t=z(n),e=t*7;return Li(i,e)}function Rr(i,n){y(2,arguments);var t=z(n);return je(i,t*12)}function qe(i,n){y(2,arguments);var t=M(i),e=M(n),r=t.getTime()-e.getTime();return r<0?-1:r>0?1:r}var Jg=365.2425,tb=Math.pow(10,8)*24*60*60*1e3,ai=6e4,oi=36e5,vd=1e3,wy=-tb;var eb=3600;var yd=eb*24,Cy=yd*7,ib=yd*Jg,nb=ib/12,Ty=nb*3;function Qo(i){return y(1,arguments),i instanceof Date||Ot(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function Fi(i){if(y(1,arguments),!Qo(i)&&typeof i!="number")return!1;var n=M(i);return!isNaN(Number(n))}function Xo(i,n){y(2,arguments);var t=M(i),e=M(n),r=t.getFullYear()-e.getFullYear(),a=t.getMonth()-e.getMonth();return r*12+a}function Ko(i,n){y(2,arguments);var t=M(i),e=M(n);return t.getFullYear()-e.getFullYear()}function xd(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 zi(i,n){y(2,arguments);var t=M(i),e=M(n),r=xd(t,e),a=Math.abs(Go(t,e));t.setDate(t.getDate()-r*a);var o=+(xd(t,e)===-r),s=r*(a-o);return s===0?0:s}function le(i,n){return y(2,arguments),M(i).getTime()-M(n).getTime()}var kd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(n){return n<0?Math.ceil(n):Math.floor(n)}},rb="trunc";function de(i){return i?kd[i]:kd[rb]}function Er(i,n,t){y(2,arguments);var e=le(i,n)/oi;return de(t?.roundingMethod)(e)}function Lr(i,n,t){y(2,arguments);var e=le(i,n)/ai;return de(t?.roundingMethod)(e)}function Bi(i){y(1,arguments);var n=M(i);return n.setHours(23,59,59,999),n}function Ni(i){y(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 Zo(i){y(1,arguments);var n=M(i);return Bi(n).getTime()===Ni(n).getTime()}function Wi(i,n){y(2,arguments);var t=M(i),e=M(n),r=qe(t,e),a=Math.abs(Xo(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=qe(t,e)===-r;Zo(M(i))&&a===1&&qe(i,e)===1&&(s=!1),o=r*(a-Number(s))}return o===0?0:o}function Fr(i,n,t){y(2,arguments);var e=Wi(i,n)/3;return de(t?.roundingMethod)(e)}function zr(i,n,t){y(2,arguments);var e=le(i,n)/1e3;return de(t?.roundingMethod)(e)}function Br(i,n,t){y(2,arguments);var e=zi(i,n)/7;return de(t?.roundingMethod)(e)}function Nr(i,n){y(2,arguments);var t=M(i),e=M(n),r=qe(t,e),a=Math.abs(Ko(t,e));t.setFullYear(1584),e.setFullYear(1584);var o=qe(t,e)===-r,s=r*(a-Number(o));return s===0?0:s}function Wr(i){y(1,arguments);var n=M(i);return n.setSeconds(0,0),n}function Hr(i){y(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 Vr(i){y(1,arguments);var n=M(i);return n.setDate(1),n.setHours(0,0,0,0),n}function Yr(i){y(1,arguments);var n=M(i),t=n.getFullYear();return n.setFullYear(t+1,0,0),n.setHours(23,59,59,999),n}function jr(i){y(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 Ur(i){y(1,arguments);var n=M(i);return n.setMinutes(59,59,999),n}function qr(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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 $r(i){y(1,arguments);var n=M(i);return n.setSeconds(59,999),n}function Gr(i){y(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 Qr(i){y(1,arguments);var n=M(i);return n.setMilliseconds(999),n}function kn(i,n){y(2,arguments);var t=z(n);return Ut(i,-t)}var ab=864e5;function Jo(i){y(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/ab)+1}function qt(i){y(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 wn(i){y(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=qt(e),a=new Date(0);a.setUTCFullYear(t,0,4),a.setUTCHours(0,0,0,0);var o=qt(a);return n.getTime()>=r.getTime()?t+1:n.getTime()>=o.getTime()?t:t-1}function ts(i){y(1,arguments);var n=wn(i),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var e=qt(t);return e}var ob=6048e5;function Cn(i){y(1,arguments);var n=M(i),t=qt(n).getTime()-ts(n).getTime();return Math.round(t/ob)+1}function zt(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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 si(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=M(i),u=d.getUTCFullYear(),h=It(),f=z((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:(c=h.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.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=zt(m,n),g=new Date(0);g.setUTCFullYear(u,0,f),g.setUTCHours(0,0,0,0);var b=zt(g,n);return d.getTime()>=p.getTime()?u+1:d.getTime()>=b.getTime()?u:u-1}function es(i,n){var t,e,r,a,o,s,c,l;y(1,arguments);var d=It(),u=z((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:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=si(i,n),f=new Date(0);f.setUTCFullYear(h,0,u),f.setUTCHours(0,0,0,0);var m=zt(f,n);return m}var sb=6048e5;function Tn(i,n){y(1,arguments);var t=M(i),e=zt(t,n).getTime()-es(t,n).getTime();return Math.round(e/sb)+1}function Q(i,n){for(var t=i<0?"-":"",e=Math.abs(i).toString();e.length<n;)e="0"+e;return t+e}var cb={y:function(n,t){var e=n.getUTCFullYear(),r=e>0?e:1-e;return Q(t==="yy"?r%100:r,t.length)},M:function(n,t){var e=n.getUTCMonth();return t==="M"?String(e+1):Q(e+1,2)},d:function(n,t){return Q(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];default:return e==="am"?"a.m.":"p.m."}},h:function(n,t){return Q(n.getUTCHours()%12||12,t.length)},H:function(n,t){return Q(n.getUTCHours(),t.length)},m:function(n,t){return Q(n.getUTCMinutes(),t.length)},s:function(n,t){return Q(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 Q(a,t.length)}},Te=cb;var Hi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},lb={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"});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 Te.y(n,t)},Y:function(n,t,e,r){var a=si(n,r),o=a>0?a:1-a;if(t==="YY"){var s=o%100;return Q(s,2)}return t==="Yo"?e.ordinalNumber(o,{unit:"year"}):Q(o,t.length)},R:function(n,t){var e=wn(n);return Q(e,t.length)},u:function(n,t){var e=n.getUTCFullYear();return Q(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 Q(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"});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 Q(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"});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 Te.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"});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 Q(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"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){var a=Tn(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):Q(a,t.length)},I:function(n,t,e){var r=Cn(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):Q(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getUTCDate(),{unit:"date"}):Te.d(n,t)},D:function(n,t,e){var r=Jo(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):Q(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"});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 Q(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"});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 Q(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"});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 Q(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"});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"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){var r=n.getUTCHours(),a;switch(r===12?a=Hi.noon:r===0?a=Hi.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"});default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){var r=n.getUTCHours(),a;switch(r>=17?a=Hi.evening:r>=12?a=Hi.afternoon:r>=4?a=Hi.morning:a=Hi.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"});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 Te.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getUTCHours(),{unit:"hour"}):Te.H(n,t)},K:function(n,t,e){var r=n.getUTCHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},k:function(n,t,e){var r=n.getUTCHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):Te.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):Te.s(n,t)},S:function(n,t){return Te.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 Cd(o);case"XXXX":case"XX":return ci(o);default:return ci(o,":")}},x:function(n,t,e,r){var a=r._originalDate||n,o=a.getTimezoneOffset();switch(t){case"x":return Cd(o);case"xxxx":case"xx":return ci(o);default:return ci(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"+wd(o,":");default:return"GMT"+ci(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"+wd(o,":");default:return"GMT"+ci(o,":")}},t:function(n,t,e,r){var a=r._originalDate||n,o=Math.floor(a.getTime()/1e3);return Q(o,t.length)},T:function(n,t,e,r){var a=r._originalDate||n,o=a.getTime();return Q(o,t.length)}};function wd(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+Q(a,2)}function Cd(i,n){if(i%60===0){var t=i>0?"-":"+";return t+Q(Math.abs(i)/60,2)}return ci(i,n)}function ci(i,n){var t=n||"",e=i>0?"-":"+",r=Math.abs(i),a=Q(Math.floor(r/60),2),o=Q(r%60,2);return e+a+t+o}var Td=lb;var Md=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"});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"});default:return t.time({width:"full"})}},db=function(n,t){var e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return Md(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;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Md(r,t)).replace("{{time}}",Dd(a,t))},ub={p:Dd,P:db},Mn=ub;var hb=["D","DD"],fb=["YY","YYYY"];function Xr(i){return hb.indexOf(i)!==-1}function Kr(i){return fb.indexOf(i)!==-1}function Vi(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 mb={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"}},pb=function(n,t,e){var r,a=mb[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},Pd=pb;function Dn(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 gb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_b={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vb={date:Dn({formats:gb,defaultWidth:"full"}),time:Dn({formats:bb,defaultWidth:"full"}),dateTime:Dn({formats:_b,defaultWidth:"full"})},Sd=vb;var yb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xb=function(n,t,e,r){return yb[n]},Id=xb;function li(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,c=t!=null&&t.width?String(t.width):i.defaultWidth;r=i.values[c]||i.values[s]}var l=i.argumentCallback?i.argumentCallback(n):n;return r[l]}}var kb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Cb={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"]},Mb={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"}},Db={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"}},Pb=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"},Sb={ordinalNumber:Pb,era:li({values:kb,defaultWidth:"wide"}),quarter:li({values:wb,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:li({values:Cb,defaultWidth:"wide"}),day:li({values:Tb,defaultWidth:"wide"}),dayPeriod:li({values:Mb,defaultWidth:"wide",formattingValues:Db,defaultFormattingWidth:"wide"})},Od=Sb;function di(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],c=Array.isArray(s)?Ob(s,function(u){return u.test(o)}):Ib(s,function(u){return u.test(o)}),l;l=i.valueCallback?i.valueCallback(c):c,l=t.valueCallback?t.valueCallback(l):l;var d=n.slice(o.length);return{value:l,rest:d}}}function Ib(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 is(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 Ab=/^(\d+)(th|st|nd|rd)?/i,Rb=/\d+/i,Eb={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},Lb={any:[/^b/i,/^(a|c)/i]},Fb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zb={any:[/1/i,/2/i,/3/i,/4/i]},Bb={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},Nb={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]},Wb={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},Hb={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]},Vb={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},Yb={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}},jb={ordinalNumber:is({matchPattern:Ab,parsePattern:Rb,valueCallback:function(n){return parseInt(n,10)}}),era:di({matchPatterns:Eb,defaultMatchWidth:"wide",parsePatterns:Lb,defaultParseWidth:"any"}),quarter:di({matchPatterns:Fb,defaultMatchWidth:"wide",parsePatterns:zb,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:di({matchPatterns:Bb,defaultMatchWidth:"wide",parsePatterns:Nb,defaultParseWidth:"any"}),day:di({matchPatterns:Wb,defaultMatchWidth:"wide",parsePatterns:Hb,defaultParseWidth:"any"}),dayPeriod:di({matchPatterns:Vb,defaultMatchWidth:"any",parsePatterns:Yb,defaultParseWidth:"any"})},Ad=jb;var Ub={code:"en-US",formatDistance:Pd,formatLong:Sd,formatRelative:Id,localize:Od,match:Ad,options:{weekStartsOn:0,firstWeekContainsDate:1}},Rd=Ub;var Zr=Rd;var qb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$b=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gb=/^'([^]*?)'?$/,Qb=/''/g,Xb=/[a-zA-Z]/;function Jr(i,n,t){var e,r,a,o,s,c,l,d,u,h,f,m,p,g,b,_,k,C;y(2,arguments);var v=String(n),x=It(),P=(e=(r=t?.locale)!==null&&r!==void 0?r:x.locale)!==null&&e!==void 0?e:Zr,D=z((a=(o=(s=(c=t?.firstWeekContainsDate)!==null&&c!==void 0?c:t==null||(l=t.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:x.firstWeekContainsDate)!==null&&o!==void 0?o:(u=x.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=z((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:x.weekStartsOn)!==null&&m!==void 0?m:(k=x.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 F=M(i);if(!Fi(F))throw new RangeError("Invalid time value");var B=Ue(F),H=kn(F,B),ot={firstWeekContainsDate:D,weekStartsOn:S,locale:P,_originalDate:F},vt=v.match($b).map(function(N){var Y=N[0];if(Y==="p"||Y==="P"){var K=Mn[Y];return K(N,P.formatLong)}return N}).join("").match(qb).map(function(N){if(N==="''")return"'";var Y=N[0];if(Y==="'")return Kb(N);var K=Td[Y];if(K)return!(t!=null&&t.useAdditionalWeekYearTokens)&&Kr(N)&&Vi(N,n,String(i)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Xr(N)&&Vi(N,n,String(i)),K(H,N,P.localize,ot);if(Y.match(Xb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return N}).join("");return vt}function Kb(i){var n=i.match(Gb);return n?n[1].replace(Qb,"'"):i}function ns(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 rs(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 Ed(i,n){if(i){if(typeof i=="string")return rs(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)?rs(i,n):void 0}}function as(i,n){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=Ed(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(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
9
+ 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 l=t.next();return o=l.done,l},e:function(l){s=!0,a=l},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 ta(i,n){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ta(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&&ta(i,n)}function Pn(i){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pn(i)}function os(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(os=function(){return!!i})()}function Ld(i,n){if(n&&(Ot(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=os();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 Ld(this,t)}}function I(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function Fd(i,n){if(Ot(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var e=t.call(i,n||"default");if(Ot(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function ea(i){var n=Fd(i,"string");return Ot(n)=="symbol"?n:n+""}function zd(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,ea(e.key),e)}}function O(i,n,t){return n&&zd(i.prototype,n),t&&zd(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function w(i,n,t){return(n=ea(n))in i?Object.defineProperty(i,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[n]=t,i}var Zb=10,Bd=(function(){function i(){I(this,i),w(this,"priority",void 0),w(this,"subPriority",0)}return O(i,[{key:"validate",value:function(t,e){return!0}}]),i})(),Nd=(function(i){A(t,i);var n=R(t);function t(e,r,a,o,s){var c;return I(this,t),c=n.call(this),c.value=e,c.validateValue=r,c.setValue=a,c.priority=o,s&&(c.subPriority=s),c}return O(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})(Bd),Wd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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",Zb),w(T(e),"subPriority",-1),e}return O(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})(Bd);var L=(function(){function i(){I(this,i),w(this,"incompatibleTokens",void 0),w(this,"priority",void 0),w(this,"subPriority",void 0)}return O(i,[{key:"run",value:function(t,e,r,a){var o=this.parse(t,e,r,a);return o?{setter:new Nd(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 Hd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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})(L);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}/},$t={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 J(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 Gt(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*oi+a*ai+o*vd),rest:n.slice(t[0].length)}}function ia(i){return q($.anyDigitsSigned,i)}function V(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 Yi(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 ji(i){switch(i){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function na(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 ra(i){return i%400===0||i%4===0&&i%100!==0}var Vd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return{year:l,isTwoDigitYear:a==="yy"}};switch(a){case"y":return J(V(4,r),s);case"yo":return J(o.ordinalNumber(r,{unit:"year"}),s);default:return J(V(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 c=na(o.year,s);return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}var l=!("era"in a)||a.era===1?o.year:1-o.year;return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(L);var Yd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return{year:l,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return J(V(4,r),s);case"Yo":return J(o.ordinalNumber(r,{unit:"year"}),s);default:return J(V(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 c=si(r,s);if(o.isTwoDigitYear){var l=na(o.year,c);return r.setUTCFullYear(l,0,s.firstWeekContainsDate),r.setUTCHours(0,0,0,0),zt(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),zt(r,s)}}]),t})(L);var jd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){return a==="R"?Yi(4,r):Yi(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),qt(s)}}]),t})(L);var Ud=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){return a==="u"?Yi(4,r):Yi(a.length,r)}},{key:"set",value:function(r,a,o){return r.setUTCFullYear(o,0,1),r.setUTCHours(0,0,0,0),r}}]),t})(L);var qd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){switch(a){case"Q":case"QQ":return V(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"});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})(L);var $d=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){switch(a){case"q":case"qq":return V(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"});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})(L);var Gd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return l-1};switch(a){case"M":return J(q($.month,r),s);case"MM":return J(V(2,r),s);case"Mo":return J(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"});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})(L);var Qd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return l-1};switch(a){case"L":return J(q($.month,r),s);case"LL":return J(V(2,r),s);case"Lo":return J(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"});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})(L);function ss(i,n,t){y(2,arguments);var e=M(i),r=z(n),a=Tn(e,t)-r;return e.setUTCDate(e.getUTCDate()-a*7),e}var Xd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,o,s){return zt(ss(r,o,s),s)}}]),t})(L);function cs(i,n){y(2,arguments);var t=M(i),e=z(n),r=Cn(t)-e;return t.setUTCDate(t.getUTCDate()-r*7),t}var Kd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,o){return qt(cs(r,o))}}]),t})(L);var Jb=[31,28,31,30,31,30,31,31,30,31,30,31],t_=[31,29,31,30,31,30,31,31,30,31,30,31],Zd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(a.length,r)}}},{key:"validate",value:function(r,a){var o=r.getUTCFullYear(),s=ra(o),c=r.getUTCMonth();return s?a>=1&&a<=t_[c]:a>=1&&a<=Jb[c]}},{key:"set",value:function(r,a,o){return r.setUTCDate(o),r.setUTCHours(0,0,0,0),r}}]),t})(L);var Jd=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(a.length,r)}}},{key:"validate",value:function(r,a){var o=r.getUTCFullYear(),s=ra(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})(L);function ui(i,n,t){var e,r,a,o,s,c,l,d;y(2,arguments);var u=It(),h=z((e=(r=(a=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(d=l.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=z(n),p=f.getUTCDay(),g=m%7,b=(g+7)%7,_=(b<h?7:0)+m-p;return f.setUTCDate(f.getUTCDate()+_),f}var tu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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=ui(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(L);var eu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return J(V(a.length,r),c);case"eo":return J(o.ordinalNumber(r,{unit:"day"}),c);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"});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=ui(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(L);var iu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return J(V(a.length,r),c);case"co":return J(o.ordinalNumber(r,{unit:"day"}),c);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"});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=ui(r,o,s),r.setUTCHours(0,0,0,0),r}}]),t})(L);function ls(i,n){y(2,arguments);var t=z(n);t%7===0&&(t=t-7);var e=1,r=M(i),a=r.getUTCDay(),o=t%7,s=(o+7)%7,c=(s<e?7:0)+t-a;return r.setUTCDate(r.getUTCDate()+c),r}var nu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a,o){var s=function(l){return l===0?7:l};switch(a){case"i":case"ii":return V(a.length,r);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return J(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 J(o.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return J(o.day(r,{width:"short",context:"formatting"})||o.day(r,{width:"narrow",context:"formatting"}),s);default:return J(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=ls(r,o),r.setUTCHours(0,0,0,0),r}}]),t})(L);var ru=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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(ji(o),0,0,0),r}}]),t})(L);var au=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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(ji(o),0,0,0),r}}]),t})(L);var ou=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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"});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(ji(o),0,0,0),r}}]),t})(L);var su=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(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})(L);var cu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(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})(L);var lu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(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})(L);var du=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(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})(L);var uu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(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})(L);var hu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(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 V(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})(L);var fu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){var o=function(c){return Math.floor(c*Math.pow(10,-a.length+3))};return J(V(a.length,r),o)}},{key:"set",value:function(r,a,o){return r.setUTCMilliseconds(o),r}}]),t})(L);var mu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){switch(a){case"X":return Gt($t.basicOptionalMinutes,r);case"XX":return Gt($t.basic,r);case"XXXX":return Gt($t.basicOptionalSeconds,r);case"XXXXX":return Gt($t.extendedOptionalSeconds,r);default:return Gt($t.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(L);var pu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r,a){switch(a){case"x":return Gt($t.basicOptionalMinutes,r);case"xx":return Gt($t.basic,r);case"xxxx":return Gt($t.basicOptionalSeconds,r);case"xxxxx":return Gt($t.extendedOptionalSeconds,r);default:return Gt($t.extended,r)}}},{key:"set",value:function(r,a,o){return a.timestampIsSet?r:new Date(r.getTime()-o)}}]),t})(L);var gu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r){return ia(r)}},{key:"set",value:function(r,a,o){return[new Date(o*1e3),{timestampIsSet:!0}]}}]),t})(L);var bu=(function(i){A(t,i);var n=R(t);function t(){var e;I(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 O(t,[{key:"parse",value:function(r){return ia(r)}},{key:"set",value:function(r,a,o){return[new Date(o),{timestampIsSet:!0}]}}]),t})(L);var _u={G:new Hd,y:new Vd,Y:new Yd,R:new jd,u:new Ud,Q:new qd,q:new $d,M:new Gd,L:new Qd,w:new Xd,I:new Kd,d:new Zd,D:new Jd,E:new tu,e:new eu,c:new iu,i:new nu,a:new ru,b:new au,B:new ou,h:new su,H:new cu,K:new lu,k:new du,m:new uu,s:new hu,S:new fu,X:new mu,x:new pu,t:new gu,T:new bu};var e_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,i_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,n_=/^'([^]*?)'?$/,r_=/''/g,a_=/\S/,o_=/[a-zA-Z]/;function aa(i,n,t,e){var r,a,o,s,c,l,d,u,h,f,m,p,g,b,_,k,C,v;y(3,arguments);var x=String(i),P=String(n),D=It(),S=(r=(a=e?.locale)!==null&&a!==void 0?a:D.locale)!==null&&r!==void 0?r:Zr;if(!S.match)throw new RangeError("locale must contain match property");var F=z((o=(s=(c=(l=e?.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(d=e.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&c!==void 0?c: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(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=z((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 x===""?M(t):new Date(NaN);var H={firstWeekContainsDate:F,weekStartsOn:B,locale:S},ot=[new Wd],vt=P.match(i_).map(function(gt){var et=gt[0];if(et in Mn){var Wt=Mn[et];return Wt(gt,S.formatLong)}return gt}).join("").match(e_),N=[],Y=as(vt),K;try{var Ft=function(){var et=K.value;!(e!=null&&e.useAdditionalWeekYearTokens)&&Kr(et)&&Vi(et,P,i),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Xr(et)&&Vi(et,P,i);var Wt=et[0],On=_u[Wt];if(On){var us=On.incompatibleTokens;if(Array.isArray(us)){var hs=N.find(function(fs){return us.includes(fs.token)||fs.token===Wt});if(hs)throw new RangeError("The format string mustn't contain `".concat(hs.fullToken,"` and `").concat(et,"` at the same time"))}else if(On.incompatibleTokens==="*"&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(et,"` and any other token at the same time"));N.push({token:Wt,fullToken:et});var da=On.run(x,et,S.match,H);if(!da)return{v:new Date(NaN)};ot.push(da.setter),x=da.rest}else{if(Wt.match(o_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Wt+"`");if(et==="''"?et="'":Wt==="'"&&(et=s_(et)),x.indexOf(et)===0)x=x.slice(et.length);else return{v:new Date(NaN)}}};for(Y.s();!(K=Y.n()).done;){var ft=Ft();if(Ot(ft)==="object")return ft.v}}catch(gt){Y.e(gt)}finally{Y.f()}if(x.length>0&&a_.test(x))return new Date(NaN);var Me=ot.map(function(gt){return gt.priority}).sort(function(gt,et){return et-gt}).filter(function(gt,et,Wt){return Wt.indexOf(gt)===et}).map(function(gt){return ot.filter(function(et){return et.priority===gt}).sort(function(et,Wt){return Wt.subPriority-et.subPriority})}).map(function(gt){return gt[0]}),De=M(t);if(isNaN(De.getTime()))return new Date(NaN);var Bt=kn(De,Ue(De)),Pe={},Nt=as(Me),Se;try{for(Nt.s();!(Se=Nt.n()).done;){var te=Se.value;if(!te.validate(Bt,H))return new Date(NaN);var In=te.set(Bt,Pe,H);Array.isArray(In)?(Bt=In[0],ns(Pe,In[1])):Bt=In}}catch(gt){Nt.e(gt)}finally{Nt.f()}return Bt}function s_(i){return i.match(n_)[1].replace(r_,"'")}function oa(i){y(1,arguments);var n=M(i);return n.setMinutes(0,0,0),n}function sa(i){y(1,arguments);var n=M(i);return n.setMilliseconds(0),n}function la(i,n){var t;y(1,arguments);var e=z((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=u_(i),a;if(r.date){var o=h_(r.date,e);a=f_(o.restDateString,o.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var s=a.getTime(),c=0,l;if(r.time&&(c=m_(r.time),isNaN(c)))return new Date(NaN);if(r.timezone){if(l=p_(r.timezone),isNaN(l))return new Date(NaN)}else{var d=new Date(s+c),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+c+l)}var ca={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},c_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,l_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,d_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u_(i){var n={},t=i.split(ca.dateTimeDelimiter),e;if(t.length>2)return n;if(/:/.test(t[0])?e=t[0]:(n.date=t[0],e=t[1],ca.timeZoneDelimiter.test(n.date)&&(n.date=i.split(ca.timeZoneDelimiter)[0],e=i.substr(n.date.length,i.length))),e){var r=ca.timezone.exec(e);r?(n.time=e.replace(r[1],""),n.timezone=r[1]):n.time=e}return n}function h_(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 f_(i,n){if(n===null)return new Date(NaN);var t=i.match(c_);if(!t)return new Date(NaN);var e=!!t[4],r=Sn(t[1]),a=Sn(t[2])-1,o=Sn(t[3]),s=Sn(t[4]),c=Sn(t[5])-1;if(e)return y_(n,s,c)?g_(n,s,c):new Date(NaN);var l=new Date(0);return!__(n,a,o)||!v_(n,r)?new Date(NaN):(l.setUTCFullYear(n,a,Math.max(r,o)),l)}function Sn(i){return i?parseInt(i):1}function m_(i){var n=i.match(l_);if(!n)return NaN;var t=ds(n[1]),e=ds(n[2]),r=ds(n[3]);return x_(t,e,r)?t*oi+e*ai+r*1e3:NaN}function ds(i){return i&&parseFloat(i.replace(",","."))||0}function p_(i){if(i==="Z")return 0;var n=i.match(d_);if(!n)return 0;var t=n[1]==="+"?-1:1,e=parseInt(n[2]),r=n[3]&&parseInt(n[3])||0;return k_(e,r)?t*(e*oi+r*ai):NaN}function g_(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 b_=[31,null,31,30,31,30,31,31,30,31,30,31];function vu(i){return i%400===0||i%4===0&&i%100!==0}function __(i,n,t){return n>=0&&n<=11&&t>=1&&t<=(b_[n]||(vu(i)?29:28))}function v_(i,n){return n>=1&&n<=(vu(i)?366:365)}function y_(i,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function x_(i,n,t){return i===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&i>=0&&i<25}function k_(i,n){return n>=0&&n<=59}var w_={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"};$o._date.override({_id:"date-fns",formats:function(){return w_},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=aa(i,n,new Date,this.options):i=la(i,this.options)),Fi(i)?i.getTime():null},format:function(i,n){return Jr(i,n,this.options)},add:function(i,n,t){switch(t){case"millisecond":return Ut(i,n);case"second":return Or(i,n);case"minute":return Sr(i,n);case"hour":return Pr(i,n);case"day":return Li(i,n);case"week":return Ar(i,n);case"month":return je(i,n);case"quarter":return Ir(i,n);case"year":return Rr(i,n);default:return i}},diff:function(i,n,t){switch(t){case"millisecond":return le(i,n);case"second":return zr(i,n);case"minute":return Lr(i,n);case"hour":return Er(i,n);case"day":return zi(i,n);case"week":return Br(i,n);case"month":return Wi(i,n);case"quarter":return Fr(i,n);case"year":return Nr(i,n);default:return 0}},startOf:function(i,n,t){switch(n){case"second":return sa(i);case"minute":return Wr(i);case"hour":return oa(i);case"day":return ri(i);case"week":return xn(i);case"isoWeek":return xn(i,{weekStartsOn:+t});case"month":return Vr(i);case"quarter":return Hr(i);case"year":return jr(i);default:return i}},endOf:function(i,n){switch(n){case"second":return Qr(i);case"minute":return $r(i);case"hour":return Ur(i);case"day":return Bi(i);case"week":return qr(i);case"month":return Ni(i);case"quarter":return Gr(i);case"year":return Yr(i);default:return i}}});export{th as a,Iv as b,E_ as c,oh as d,rc as e,Zv as f,a0 as g,Vu as h,Yu as i,uv as j,hv as k,c0 as l,ae as m,it as n,U as o,lt as p,W as q,tt as r,X as s,Mi as t,ve as u,G as v,nt as w,Lh as x,ut as y,Xe as z,mc as A,Je as B,jt as C,er as D,ja as E,Zn as F,ir as G,$a as H,at as I,cn as J,ln as K,Ii as L,We as M,wt as N,ht as O,He as P,vr as Q,Ye as R,qo as S,Jf as T,Jt as U,ce as V,sp as W,Tr as X,wp as Y,og as Z,hg as _,mg as $,pg as aa,wg as ba,Pg as ca,Wo as da,jo as ea,p0 as fa};