@feedmepos/ui-library 0.0.1-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/dist/components/breadcrumb/FmBreadcrumb.vue.d.ts +20 -0
- package/dist/components/button/FmButton.vue.d.ts +61 -0
- package/dist/components/card/FmCard.vue.d.ts +48 -0
- package/dist/components/card/FmCardActions.vue.d.ts +22 -0
- package/dist/components/card/FmCardSection.vue.d.ts +21 -0
- package/dist/components/card/FmCardTitle.vue.d.ts +10 -0
- package/dist/components/chart/line/FmLine.vue.d.ts +42 -0
- package/dist/components/date-picker/FmDatePicker.vue.d.ts +35 -0
- package/dist/components/date-range-picker/FmDateRangePicker.vue.d.ts +35 -0
- package/dist/components/form/checkbox/FmCheckbox.vue.d.ts +66 -0
- package/dist/components/form/input/base-input/FmField.vue.d.ts +64 -0
- package/dist/components/form/radio/FmRadio.vue.d.ts +66 -0
- package/dist/components/form/select/FmSelect.vue.d.ts +90 -0
- package/dist/components/form/stepper-field/FmStepperField.vue.d.ts +168 -0
- package/dist/components/form/switch/FmSwitch.vue.d.ts +86 -0
- package/dist/components/form/text-field/FmTextField.vue.d.ts +210 -0
- package/dist/components/form/textarea/FmTextarea.vue.d.ts +131 -0
- package/dist/components/icon/FmIcon.vue.d.ts +41 -0
- package/dist/components/list/FmList.vue.d.ts +41 -0
- package/dist/components/list/FmListItem.vue.d.ts +54 -0
- package/dist/components/menu/dropdown/FmDropdown.vue.d.ts +49 -0
- package/dist/components/menu/menu-container/FmMenu.vue.d.ts +9 -0
- package/dist/components/menu/menu-item/FmMenuItem.vue.d.ts +99 -0
- package/dist/components/progress-indicator/FmProgressIndicator.vue.d.ts +46 -0
- package/dist/components/progress-indicator/FmProgressIndicatorGroup.vue.d.ts +72 -0
- package/dist/components/snackbar/FmSnackbar.vue.d.ts +83 -0
- package/dist/components/tooltip/FmTooltip.vue.d.ts +65 -0
- package/dist/composables/validation.d.ts +6 -0
- package/dist/favicon.ico +0 -0
- package/dist/federation/FmBreadcrumb-7a206e9b.css +1 -0
- package/dist/federation/FmBreadcrumb.vue_vue_type_style_index_0_lang-4abc649e.js +1 -0
- package/dist/federation/FmButton-bd6d2e4b.css +1 -0
- package/dist/federation/FmCheckbox-53f405a9.css +1 -0
- package/dist/federation/FmCheckbox.vue_vue_type_style_index_0_lang-fcb61ef1.js +1 -0
- package/dist/federation/FmDatePicker-750315ee.css +1 -0
- package/dist/federation/FmDateRangePicker-fbfec16c.css +1 -0
- package/dist/federation/FmDropdown-7ce00217.css +1 -0
- package/dist/federation/FmIcon-99d8fba2.css +1 -0
- package/dist/federation/FmLine.vue_vue_type_script_setup_true_lang-2809cd69.js +3 -0
- package/dist/federation/FmMenu-a00148e7.css +1 -0
- package/dist/federation/FmMenuItem-e8678045.css +1 -0
- package/dist/federation/FmProgressIndicator-298ef84b.css +1 -0
- package/dist/federation/FmProgressIndicatorGroup-58d5cb90.css +1 -0
- package/dist/federation/FmProgressIndicatorGroup.vue_vue_type_style_index_0_lang-243ecd13.js +1 -0
- package/dist/federation/FmRadio-b168530f.css +1 -0
- package/dist/federation/FmSelect-a6d7df4f.css +1 -0
- package/dist/federation/FmSnackbar-1bbe14e3.css +1 -0
- package/dist/federation/FmSwitch-7605f854.css +1 -0
- package/dist/federation/FmTextField-fc9b77ba.css +1 -0
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-473d3f81.js +1 -0
- package/dist/federation/FmTextarea-57fcf19a.css +1 -0
- package/dist/federation/FmTextarea.vue_vue_type_style_index_0_lang-5db78d57.js +1 -0
- package/dist/federation/FmTooltip.vue_vue_type_script_setup_true_lang-7b39efc3.js +1 -0
- package/dist/federation/__federation_expose_FmBreadcrumb-3527b347.js +1 -0
- package/dist/federation/__federation_expose_FmButton-71bb9d18.js +8 -0
- package/dist/federation/__federation_expose_FmCheckbox-08a0fd35.js +1 -0
- package/dist/federation/__federation_expose_FmDatePicker-d996afce.js +1 -0
- package/dist/federation/__federation_expose_FmDateRangePicker-1d6f07d7.js +1 -0
- package/dist/federation/__federation_expose_FmDropdown-604d6b6a.js +1 -0
- package/dist/federation/__federation_expose_FmIcon-e5ab92a8.js +1 -0
- package/dist/federation/__federation_expose_FmLineChart-443455d3.js +1 -0
- package/dist/federation/__federation_expose_FmMenu-ed4b43e0.js +1 -0
- package/dist/federation/__federation_expose_FmMenuItem-bcffecb3.js +1 -0
- package/dist/federation/__federation_expose_FmProgressIndicator-07af3c15.js +1 -0
- package/dist/federation/__federation_expose_FmProgressIndicatorGroup-c3359ab1.js +1 -0
- package/dist/federation/__federation_expose_FmRadio-b90999bf.js +1 -0
- package/dist/federation/__federation_expose_FmSelect-1855f320.js +1 -0
- package/dist/federation/__federation_expose_FmSnackbar-7af29a69.js +1 -0
- package/dist/federation/__federation_expose_FmSwitch-f75dd36e.js +1 -0
- package/dist/federation/__federation_expose_FmTextField-48c256e7.js +1 -0
- package/dist/federation/__federation_expose_FmTextarea-901d18eb.js +1 -0
- package/dist/federation/__federation_expose_FmTooltip-61035ccf.js +1 -0
- package/dist/federation/__federation_fn_import.js +1 -0
- package/dist/federation/__federation_shared_vue-7b8990b1.js +1 -0
- package/dist/federation/_plugin-vue_export-helper-c27b6911.js +1 -0
- package/dist/federation/dayjs.min-5433e12a.js +1 -0
- package/dist/federation/feedmepos-ui-components.js +1 -0
- package/dist/federation/index-0fb0d627.css +1 -0
- package/dist/federation/index-13778968.js +11 -0
- package/dist/federation/preload-helper-cf010ec4.js +1 -0
- package/dist/feedmepos-ui-library.es.js +11225 -0
- package/dist/feedmepos-ui-library.umd.js +29 -0
- package/dist/index.d.ts +23 -0
- package/dist/style.css +1 -0
- package/dist/tailwind-plugin.js +230 -0
- package/dist/utils/util-color.d.ts +4 -0
- package/package.json +74 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var Bc=Object.defineProperty;var Wc=(nt,Y,ot)=>Y in nt?Bc(nt,Y,{enumerable:!0,configurable:!0,writable:!0,value:ot}):nt[Y]=ot;var M=(nt,Y,ot)=>(Wc(nt,typeof Y!="symbol"?Y+"":Y,ot),ot);import{importShared as Js,__tla as Nc}from"./__federation_fn_import.js";let Eo,Hc=Promise.all([(()=>{try{return Nc}catch{}})()]).then(async()=>{function nt(s){return s+.5|0}const Y=(s,t,e)=>Math.max(Math.min(s,e),t);function ot(s){return Y(nt(s*2.55),0,255)}function vt(s){return Y(nt(s*255),0,255)}function ft(s){return Y(nt(s/2.55)/100,0,1)}function Qs(s){return Y(nt(s*100),0,100)}const it={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},as=[..."0123456789ABCDEF"],Ro=s=>as[s&15],Io=s=>as[(s&240)>>4]+as[s&15],we=s=>(s&240)>>4===(s&15),Fo=s=>we(s.r)&&we(s.g)&&we(s.b)&&we(s.a);function zo(s){var t=s.length,e;return s[0]==="#"&&(t===4||t===5?e={r:255&it[s[1]]*17,g:255&it[s[2]]*17,b:255&it[s[3]]*17,a:t===5?it[s[4]]*17:255}:(t===7||t===9)&&(e={r:it[s[1]]<<4|it[s[2]],g:it[s[3]]<<4|it[s[4]],b:it[s[5]]<<4|it[s[6]],a:t===9?it[s[7]]<<4|it[s[8]]:255})),e}const Vo=(s,t)=>s<255?t(s):"";function Bo(s){var t=Fo(s)?Ro:Io;return s?"#"+t(s.r)+t(s.g)+t(s.b)+Vo(s.a,t):void 0}const Wo=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ti(s,t,e){const i=t*Math.min(e,1-e),n=(o,a=(o+s/30)%12)=>e-i*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function No(s,t,e){const i=(n,o=(n+s/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function Ho(s,t,e){const i=ti(s,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function jo(s,t,e,i,n){return s===n?(t-e)/i+(t<e?6:0):t===n?(e-s)/i+2:(s-t)/i+4}function rs(s){const t=s.r/255,e=s.g/255,i=s.b/255,n=Math.max(t,e,i),o=Math.min(t,e,i),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=jo(t,e,i,h,n),r=r*60+.5),[r|0,l||0,a]}function ls(s,t,e,i){return(Array.isArray(t)?s(t[0],t[1],t[2]):s(t,e,i)).map(vt)}function hs(s,t,e){return ls(ti,s,t,e)}function $o(s,t,e){return ls(Ho,s,t,e)}function Yo(s,t,e){return ls(No,s,t,e)}function ei(s){return(s%360+360)%360}function Uo(s){const t=Wo.exec(s);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?ot(+t[5]):vt(+t[5]));const n=ei(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=$o(n,o,a):t[1]==="hsv"?i=Yo(n,o,a):i=hs(n,o,a),{r:i[0],g:i[1],b:i[2],a:e}}function Xo(s,t){var e=rs(s);e[0]=ei(e[0]+t),e=hs(e),s.r=e[0],s.g=e[1],s.b=e[2]}function qo(s){if(!s)return;const t=rs(s),e=t[0],i=Qs(t[1]),n=Qs(t[2]);return s.a<255?`hsla(${e}, ${i}%, ${n}%, ${ft(s.a)})`:`hsl(${e}, ${i}%, ${n}%)`}const si={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"},ii={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 Ko(){const s={},t=Object.keys(ii),e=Object.keys(si);let i,n,o,a,r;for(i=0;i<t.length;i++){for(a=r=t[i],n=0;n<e.length;n++)o=e[n],r=r.replace(o,si[o]);o=parseInt(ii[a],16),s[r]=[o>>16&255,o>>8&255,o&255]}return s}let ke;function Go(s){ke||(ke=Ko(),ke.transparent=[0,0,0,0]);const t=ke[s.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Zo=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Jo(s){const t=Zo.exec(s);let e=255,i,n,o;if(t){if(t[7]!==i){const a=+t[7];e=t[8]?ot(a):Y(a*255,0,255)}return i=+t[1],n=+t[3],o=+t[5],i=255&(t[2]?ot(i):Y(i,0,255)),n=255&(t[4]?ot(n):Y(n,0,255)),o=255&(t[6]?ot(o):Y(o,0,255)),{r:i,g:n,b:o,a:e}}}function Qo(s){return s&&(s.a<255?`rgba(${s.r}, ${s.g}, ${s.b}, ${ft(s.a)})`:`rgb(${s.r}, ${s.g}, ${s.b})`)}const cs=s=>s<=.0031308?s*12.92:Math.pow(s,1/2.4)*1.055-.055,Wt=s=>s<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4);function ta(s,t,e){const i=Wt(ft(s.r)),n=Wt(ft(s.g)),o=Wt(ft(s.b));return{r:vt(cs(i+e*(Wt(ft(t.r))-i))),g:vt(cs(n+e*(Wt(ft(t.g))-n))),b:vt(cs(o+e*(Wt(ft(t.b))-o))),a:s.a+e*(t.a-s.a)}}function Se(s,t,e){if(s){let i=rs(s);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=hs(i),s.r=i[0],s.g=i[1],s.b=i[2]}}function ni(s,t){return s&&Object.assign(t||{},s)}function oi(s){var t={r:0,g:0,b:0,a:255};return Array.isArray(s)?s.length>=3&&(t={r:s[0],g:s[1],b:s[2],a:255},s.length>3&&(t.a=vt(s[3]))):(t=ni(s,{r:0,g:0,b:0,a:1}),t.a=vt(t.a)),t}function ea(s){return s.charAt(0)==="r"?Jo(s):Uo(s)}class Kt{constructor(t){if(t instanceof Kt)return t;const e=typeof t;let i;e==="object"?i=oi(t):e==="string"&&(i=zo(t)||Go(t)||ea(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=ni(this._rgb);return t&&(t.a=ft(t.a)),t}set rgb(t){this._rgb=oi(t)}rgbString(){return this._valid?Qo(this._rgb):void 0}hexString(){return this._valid?Bo(this._rgb):void 0}hslString(){return this._valid?qo(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=i.a-n.a,h=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-h,i.r=255&h*i.r+o*n.r+.5,i.g=255&h*i.g+o*n.g+.5,i.b=255&h*i.b+o*n.b+.5,i.a=a*i.a+(1-a)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=ta(this._rgb,t._rgb,e)),this}clone(){return new Kt(this.rgb)}alpha(t){return this._rgb.a=vt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=nt(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Se(this._rgb,2,t),this}darken(t){return Se(this._rgb,2,-t),this}saturate(t){return Se(this._rgb,1,t),this}desaturate(t){return Se(this._rgb,1,-t),this}rotate(t){return Xo(this._rgb,t),this}}function gt(){}const sa=(()=>{let s=0;return()=>s++})();function L(s){return s===null||typeof s>"u"}function F(s){if(Array.isArray&&Array.isArray(s))return!0;const t=Object.prototype.toString.call(s);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}function W(s){return(typeof s=="number"||s instanceof Number)&&isFinite(+s)}function J(s,t){return W(s)?s:t}function D(s,t){return typeof s>"u"?t:s}const ia=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100:+s/t,ai=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*t:+s;function I(s,t,e){if(s&&typeof s.call=="function")return s.apply(e,t)}function R(s,t,e,i){let n,o,a;if(F(s))if(o=s.length,i)for(n=o-1;n>=0;n--)t.call(e,s[n],n);else for(n=0;n<o;n++)t.call(e,s[n],n);else if(A(s))for(a=Object.keys(s),o=a.length,n=0;n<o;n++)t.call(e,s[a[n]],a[n])}function Pe(s,t){let e,i,n,o;if(!s||!t||s.length!==t.length)return!1;for(e=0,i=s.length;e<i;++e)if(n=s[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function De(s){if(F(s))return s.map(De);if(A(s)){const t=Object.create(null),e=Object.keys(s),i=e.length;let n=0;for(;n<i;++n)t[e[n]]=De(s[e[n]]);return t}return s}function ri(s){return["__proto__","prototype","constructor"].indexOf(s)===-1}function na(s,t,e,i){if(!ri(s))return;const n=t[s],o=e[s];A(n)&&A(o)?Gt(n,o,i):t[s]=De(o)}function Gt(s,t,e){const i=F(t)?t:[t],n=i.length;if(!A(s))return s;e=e||{};const o=e.merger||na;let a;for(let r=0;r<n;++r){if(a=i[r],!A(a))continue;const l=Object.keys(a);for(let h=0,c=l.length;h<c;++h)o(l[h],s,a,e)}return s}function Zt(s,t){return Gt(s,t,{merger:oa})}function oa(s,t,e){if(!ri(s))return;const i=t[s],n=e[s];A(i)&&A(n)?Zt(i,n):Object.prototype.hasOwnProperty.call(t,s)||(t[s]=De(n))}const li={"":s=>s,x:s=>s.x,y:s=>s.y};function aa(s){const t=s.split("."),e=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function ra(s){const t=aa(s);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Mt(s,t){return(li[t]||(li[t]=ra(t)))(s)}function ds(s){return s.charAt(0).toUpperCase()+s.slice(1)}const Jt=s=>typeof s<"u",wt=s=>typeof s=="function",hi=(s,t)=>{if(s.size!==t.size)return!1;for(const e of s)if(!t.has(e))return!1;return!0};function la(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}const z=Math.PI,V=2*z,ha=V+z,Ce=Number.POSITIVE_INFINITY,ca=z/180,H=z/2,Ct=z/4,ci=z*2/3,kt=Math.log10,ct=Math.sign;function Qt(s,t,e){return Math.abs(s-t)<e}function di(s){const t=Math.round(s);s=Qt(s,t,s/1e3)?t:s;const e=Math.pow(10,Math.floor(kt(s))),i=s/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function da(s){const t=[],e=Math.sqrt(s);let i;for(i=1;i<e;i++)s%i===0&&(t.push(i),t.push(s/i));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function Nt(s){return!isNaN(parseFloat(s))&&isFinite(s)}function ua(s,t){const e=Math.round(s);return e-t<=s&&e+t>=s}function ui(s,t,e){let i,n,o;for(i=0,n=s.length;i<n;i++)o=s[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function at(s){return s*(z/180)}function us(s){return s*(180/z)}function fi(s){if(!W(s))return;let t=1,e=0;for(;Math.round(s*t)/t!==s;)t*=10,e++;return e}function gi(s,t){const e=t.x-s.x,i=t.y-s.y,n=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*z&&(o+=V),{angle:o,distance:n}}function fs(s,t){return Math.sqrt(Math.pow(t.x-s.x,2)+Math.pow(t.y-s.y,2))}function fa(s,t){return(s-t+ha)%V-z}function Q(s){return(s%V+V)%V}function te(s,t,e,i){const n=Q(s),o=Q(t),a=Q(e),r=Q(o-n),l=Q(a-n),h=Q(n-o),c=Q(n-a);return n===o||n===a||i&&o===a||r>l&&h<c}function $(s,t,e){return Math.max(t,Math.min(e,s))}function ga(s){return $(s,-32768,32767)}function pt(s,t,e,i=1e-6){return s>=Math.min(t,e)-i&&s<=Math.max(t,e)+i}function gs(s,t,e){e=e||(a=>s[a]<t);let i=s.length-1,n=0,o;for(;i-n>1;)o=n+i>>1,e(o)?n=o:i=o;return{lo:n,hi:i}}const mt=(s,t,e,i)=>gs(s,e,i?n=>{const o=s[n][t];return o<e||o===e&&s[n+1][t]===e}:n=>s[n][t]<e),pa=(s,t,e)=>gs(s,e,i=>s[i][t]>=e);function ma(s,t,e){let i=0,n=s.length;for(;i<n&&s[i]<t;)i++;for(;n>i&&s[n-1]>e;)n--;return i>0||n<s.length?s.slice(i,n):s}const pi=["push","pop","shift","splice","unshift"];function ba(s,t){if(s._chartjs){s._chartjs.listeners.push(t);return}Object.defineProperty(s,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),pi.forEach(e=>{const i="_onData"+ds(e),n=s[e];Object.defineProperty(s,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return s._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...o)}),a}})})}function mi(s,t){const e=s._chartjs;if(!e)return;const i=e.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(pi.forEach(o=>{delete s[o]}),delete s._chartjs)}function bi(s){const t=new Set(s);return t.size===s.length?s:Array.from(t)}const xi=function(){return typeof window>"u"?function(s){return s()}:window.requestAnimationFrame}();function _i(s,t){let e=[],i=!1;return function(...n){e=n,i||(i=!0,xi.call(window,()=>{i=!1,s.apply(t,e)}))}}function xa(s,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(s,t,i)):s.apply(this,i),t}}const ps=s=>s==="start"?"left":s==="end"?"right":"center",U=(s,t,e)=>s==="start"?t:s==="end"?e:(t+e)/2,_a=(s,t,e,i)=>s===(i?"left":"right")?e:s==="center"?(t+e)/2:t;function yi(s,t,e){const i=t.length;let n=0,o=i;if(s._sorted){const{iScale:a,_parsed:r}=s,l=a.axis,{min:h,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=$(Math.min(mt(r,l,h).lo,e?i:mt(t,l,a.getPixelForValue(h)).lo),0,i-1)),u?o=$(Math.max(mt(r,a.axis,c,!0).hi+1,e?0:mt(t,l,a.getPixelForValue(c),!0).hi+1),n,i)-n:o=i-n}return{start:n,count:o}}function vi(s){const{xScale:t,yScale:e,_scaleRanges:i}=s,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return s._scaleRanges=n,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,n),o}const Oe=s=>s===0||s===1,Mi=(s,t,e)=>-(Math.pow(2,10*(s-=1))*Math.sin((s-t)*V/e)),wi=(s,t,e)=>Math.pow(2,-10*s)*Math.sin((s-t)*V/e)+1,ee={linear:s=>s,easeInQuad:s=>s*s,easeOutQuad:s=>-s*(s-2),easeInOutQuad:s=>(s/=.5)<1?.5*s*s:-.5*(--s*(s-2)-1),easeInCubic:s=>s*s*s,easeOutCubic:s=>(s-=1)*s*s+1,easeInOutCubic:s=>(s/=.5)<1?.5*s*s*s:.5*((s-=2)*s*s+2),easeInQuart:s=>s*s*s*s,easeOutQuart:s=>-((s-=1)*s*s*s-1),easeInOutQuart:s=>(s/=.5)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2),easeInQuint:s=>s*s*s*s*s,easeOutQuint:s=>(s-=1)*s*s*s*s+1,easeInOutQuint:s=>(s/=.5)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2),easeInSine:s=>-Math.cos(s*H)+1,easeOutSine:s=>Math.sin(s*H),easeInOutSine:s=>-.5*(Math.cos(z*s)-1),easeInExpo:s=>s===0?0:Math.pow(2,10*(s-1)),easeOutExpo:s=>s===1?1:-Math.pow(2,-10*s)+1,easeInOutExpo:s=>Oe(s)?s:s<.5?.5*Math.pow(2,10*(s*2-1)):.5*(-Math.pow(2,-10*(s*2-1))+2),easeInCirc:s=>s>=1?s:-(Math.sqrt(1-s*s)-1),easeOutCirc:s=>Math.sqrt(1-(s-=1)*s),easeInOutCirc:s=>(s/=.5)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1),easeInElastic:s=>Oe(s)?s:Mi(s,.075,.3),easeOutElastic:s=>Oe(s)?s:wi(s,.075,.3),easeInOutElastic(s){return Oe(s)?s:s<.5?.5*Mi(s*2,.1125,.45):.5+.5*wi(s*2-1,.1125,.45)},easeInBack(s){return s*s*((1.70158+1)*s-1.70158)},easeOutBack(s){return(s-=1)*s*((1.70158+1)*s+1.70158)+1},easeInOutBack(s){let t=1.70158;return(s/=.5)<1?.5*(s*s*(((t*=1.525)+1)*s-t)):.5*((s-=2)*s*(((t*=1.525)+1)*s+t)+2)},easeInBounce:s=>1-ee.easeOutBounce(1-s),easeOutBounce(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},easeInOutBounce:s=>s<.5?ee.easeInBounce(s*2)*.5:ee.easeOutBounce(s*2-1)*.5+.5};function ms(s){if(s&&typeof s=="object"){const t=s.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ki(s){return ms(s)?s:new Kt(s)}function bs(s){return ms(s)?s:new Kt(s).saturate(.5).darken(.1).hexString()}const ya=["x","y","borderWidth","radius","tension"],va=["color","borderColor","backgroundColor"];function Ma(s){s.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),s.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),s.set("animations",{colors:{type:"color",properties:va},numbers:{type:"number",properties:ya}}),s.describe("animations",{_fallback:"animation"}),s.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:t=>t|0}}}})}function wa(s){s.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Si=new Map;function ka(s,t){t=t||{};const e=s+JSON.stringify(t);let i=Si.get(e);return i||(i=new Intl.NumberFormat(s,t),Si.set(e,i)),i}function se(s,t,e){return ka(t,e).format(s)}const Pi={values(s){return F(s)?s:""+s},numeric(s,t,e){if(s===0)return"0";const i=this.chart.options.locale;let n,o=s;if(e.length>1){const h=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(h<1e-4||h>1e15)&&(n="scientific"),o=Sa(s,e)}const a=kt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),se(s,i,l)},logarithmic(s,t,e){if(s===0)return"0";const i=e[t].significand||s/Math.pow(10,Math.floor(kt(s)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Pi.numeric.call(this,s,t,e):""}};function Sa(s,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&s!==Math.floor(s)&&(e=s-Math.floor(s)),e}var Ae={formatters:Pi};function Pa(s){s.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:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.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:Ae.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),s.route("scale.ticks","color","","color"),s.route("scale.grid","color","","borderColor"),s.route("scale.border","color","","borderColor"),s.route("scale.title","color","","color"),s.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),s.describe("scales",{_fallback:"scale"}),s.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ot=Object.create(null),xs=Object.create(null);function ie(s,t){if(!t)return s;const e=t.split(".");for(let i=0,n=e.length;i<n;++i){const o=e[i];s=s[o]||(s[o]=Object.create(null))}return s}function _s(s,t,e){return typeof t=="string"?Gt(ie(s,t),e):Gt(ie(s,""),t)}class Da{constructor(t,e){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=i=>i.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=(i,n)=>bs(n.backgroundColor),this.hoverBorderColor=(i,n)=>bs(n.borderColor),this.hoverColor=(i,n)=>bs(n.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(t),this.apply(e)}set(t,e){return _s(this,t,e)}get(t){return ie(this,t)}describe(t,e){return _s(xs,t,e)}override(t,e){return _s(Ot,t,e)}route(t,e,i,n){const o=ie(this,t),a=ie(this,i),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],h=a[n];return A(l)?Object.assign({},h,l):D(l,h)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var N=new Da({_scriptable:s=>!s.startsWith("on"),_indexable:s=>s!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Ma,wa,Pa]);function Ca(s){return!s||L(s.size)||L(s.family)?null:(s.style?s.style+" ":"")+(s.weight?s.weight+" ":"")+s.size+"px "+s.family}function Te(s,t,e,i,n){let o=t[n];return o||(o=t[n]=s.measureText(n).width,e.push(n)),o>i&&(i=o),i}function Oa(s,t,e,i){i=i||{};let n=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(n=i.data={},o=i.garbageCollect=[],i.font=t),s.save(),s.font=t;let a=0;const r=e.length;let l,h,c,d,u;for(l=0;l<r;l++)if(d=e[l],d!=null&&!F(d))a=Te(s,n,o,a,d);else if(F(d))for(h=0,c=d.length;h<c;h++)u=d[h],u!=null&&!F(u)&&(a=Te(s,n,o,a,u));s.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete n[o[l]];o.splice(0,f)}return a}function At(s,t,e){const i=s.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*i)/i+n}function Di(s,t){t=t||s.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,s.width,s.height),t.restore()}function ys(s,t,e,i){Ci(s,t,e,i,null)}function Ci(s,t,e,i,n){let o,a,r,l,h,c,d,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*ca;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){s.save(),s.translate(e,i),s.rotate(m),s.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),s.restore();return}if(!(isNaN(g)||g<=0)){switch(s.beginPath(),f){default:n?s.ellipse(e,i,n/2,g,0,0,V):s.arc(e,i,g,0,V),s.closePath();break;case"triangle":c=n?n/2:g,s.moveTo(e+Math.sin(m)*c,i-Math.cos(m)*g),m+=ci,s.lineTo(e+Math.sin(m)*c,i-Math.cos(m)*g),m+=ci,s.lineTo(e+Math.sin(m)*c,i-Math.cos(m)*g),s.closePath();break;case"rectRounded":h=g*.516,l=g-h,a=Math.cos(m+Ct)*l,d=Math.cos(m+Ct)*(n?n/2-h:l),r=Math.sin(m+Ct)*l,u=Math.sin(m+Ct)*(n?n/2-h:l),s.arc(e-d,i-r,h,m-z,m-H),s.arc(e+u,i-a,h,m-H,m),s.arc(e+d,i+r,h,m,m+H),s.arc(e-u,i+a,h,m+H,m+z),s.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,c=n?n/2:l,s.rect(e-c,i-l,2*c,2*l);break}m+=Ct;case"rectRot":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),s.moveTo(e-d,i-r),s.lineTo(e+u,i-a),s.lineTo(e+d,i+r),s.lineTo(e-u,i+a),s.closePath();break;case"crossRot":m+=Ct;case"cross":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),s.moveTo(e-d,i-r),s.lineTo(e+d,i+r),s.moveTo(e+u,i-a),s.lineTo(e-u,i+a);break;case"star":d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),s.moveTo(e-d,i-r),s.lineTo(e+d,i+r),s.moveTo(e+u,i-a),s.lineTo(e-u,i+a),m+=Ct,d=Math.cos(m)*(n?n/2:g),a=Math.cos(m)*g,r=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),s.moveTo(e-d,i-r),s.lineTo(e+d,i+r),s.moveTo(e+u,i-a),s.lineTo(e-u,i+a);break;case"line":a=n?n/2:Math.cos(m)*g,r=Math.sin(m)*g,s.moveTo(e-a,i-r),s.lineTo(e+a,i+r);break;case"dash":s.moveTo(e,i),s.lineTo(e+Math.cos(m)*(n?n/2:g),i+Math.sin(m)*g);break;case!1:s.closePath();break}s.fill(),t.borderWidth>0&&s.stroke()}}function bt(s,t,e){return e=e||.5,!t||s&&s.x>t.left-e&&s.x<t.right+e&&s.y>t.top-e&&s.y<t.bottom+e}function Le(s,t){s.save(),s.beginPath(),s.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),s.clip()}function Ee(s){s.restore()}function Aa(s,t,e,i,n){if(!t)return s.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;s.lineTo(o,t.y),s.lineTo(o,e.y)}else n==="after"!=!!i?s.lineTo(t.x,e.y):s.lineTo(e.x,t.y);s.lineTo(e.x,e.y)}function Ta(s,t,e,i){if(!t)return s.lineTo(e.x,e.y);s.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function La(s,t){t.translation&&s.translate(t.translation[0],t.translation[1]),L(t.rotation)||s.rotate(t.rotation),t.color&&(s.fillStyle=t.color),t.textAlign&&(s.textAlign=t.textAlign),t.textBaseline&&(s.textBaseline=t.textBaseline)}function Ea(s,t,e,i,n){if(n.strikethrough||n.underline){const o=s.measureText(i),a=t-o.actualBoundingBoxLeft,r=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,h=e+o.actualBoundingBoxDescent,c=n.strikethrough?(l+h)/2:h;s.strokeStyle=s.fillStyle,s.beginPath(),s.lineWidth=n.decorationWidth||2,s.moveTo(a,c),s.lineTo(r,c),s.stroke()}}function Ra(s,t){const e=s.fillStyle;s.fillStyle=t.color,s.fillRect(t.left,t.top,t.width,t.height),s.fillStyle=e}function Tt(s,t,e,i,n,o={}){const a=F(t)?t:[t],r=o.strokeWidth>0&&o.strokeColor!=="";let l,h;for(s.save(),s.font=n.string,La(s,o),l=0;l<a.length;++l)h=a[l],o.backdrop&&Ra(s,o.backdrop),r&&(o.strokeColor&&(s.strokeStyle=o.strokeColor),L(o.strokeWidth)||(s.lineWidth=o.strokeWidth),s.strokeText(h,e,i,o.maxWidth)),s.fillText(h,e,i,o.maxWidth),Ea(s,e,i,h,o),i+=Number(n.lineHeight);s.restore()}function ne(s,t){const{x:e,y:i,w:n,h:o,radius:a}=t;s.arc(e+a.topLeft,i+a.topLeft,a.topLeft,1.5*z,z,!0),s.lineTo(e,i+o-a.bottomLeft),s.arc(e+a.bottomLeft,i+o-a.bottomLeft,a.bottomLeft,z,H,!0),s.lineTo(e+n-a.bottomRight,i+o),s.arc(e+n-a.bottomRight,i+o-a.bottomRight,a.bottomRight,H,0,!0),s.lineTo(e+n,i+a.topRight),s.arc(e+n-a.topRight,i+a.topRight,a.topRight,0,-H,!0),s.lineTo(e+a.topLeft,i)}const Ia=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Fa=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function za(s,t){const e=(""+s).match(Ia);if(!e||e[1]==="normal")return t*1.2;switch(s=+e[2],e[3]){case"px":return s;case"%":s/=100;break}return t*s}const Va=s=>+s||0;function vs(s,t){const e={},i=A(t),n=i?Object.keys(t):t,o=A(s)?i?a=>D(s[a],s[t[a]]):a=>s[a]:()=>s;for(const a of n)e[a]=Va(o(a));return e}function Oi(s){return vs(s,{top:"y",right:"x",bottom:"y",left:"x"})}function Lt(s){return vs(s,["topLeft","topRight","bottomLeft","bottomRight"])}function X(s){const t=Oi(s);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function j(s,t){s=s||{},t=t||N.font;let e=D(s.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=D(s.style,t.style);i&&!(""+i).match(Fa)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:D(s.family,t.family),lineHeight:za(D(s.lineHeight,t.lineHeight),e),size:e,style:i,weight:D(s.weight,t.weight),string:""};return n.string=Ca(n),n}function oe(s,t,e,i){let n=!0,o,a,r;for(o=0,a=s.length;o<a;++o)if(r=s[o],r!==void 0&&(t!==void 0&&typeof r=="function"&&(r=r(t),n=!1),e!==void 0&&F(r)&&(r=r[e%r.length],n=!1),r!==void 0))return i&&!n&&(i.cacheable=!1),r}function Ba(s,t,e){const{min:i,max:n}=s,o=ai(t,(n-i)/2),a=(r,l)=>e&&r===0?0:r+l;return{min:a(i,-Math.abs(o)),max:a(n,o)}}function St(s,t){return Object.assign(Object.create(s),t)}function Ms(s,t=[""],e,i,n=()=>s[0]){const o=e||s;typeof i>"u"&&(i=Ri("_fallback",s));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:s,_rootScopes:o,_fallback:i,_getTarget:n,override:r=>Ms([r,...s],t,o,i)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete s[0][l],!0},get(r,l){return Ti(r,l,()=>Xa(l,t,s,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(s[0])},has(r,l){return Ii(r).includes(l)},ownKeys(r){return Ii(r)},set(r,l,h){const c=r._storage||(r._storage=n());return r[l]=c[l]=h,delete r._keys,!0}})}function Ht(s,t,e,i){const n={_cacheable:!1,_proxy:s,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ai(s,i),setContext:o=>Ht(s,o,e,i),override:o=>Ht(s.override(o),t,e,i)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete s[a],!0},get(o,a,r){return Ti(o,a,()=>Na(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(s,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,a)},getPrototypeOf(){return Reflect.getPrototypeOf(s)},has(o,a){return Reflect.has(s,a)},ownKeys(){return Reflect.ownKeys(s)},set(o,a,r){return s[a]=r,delete o[a],!0}})}function Ai(s,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=s;return{allKeys:n,scriptable:e,indexable:i,isScriptable:wt(e)?e:()=>e,isIndexable:wt(i)?i:()=>i}}const Wa=(s,t)=>s?s+ds(t):t,ws=(s,t)=>A(t)&&s!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ti(s,t,e){if(Object.prototype.hasOwnProperty.call(s,t))return s[t];const i=e();return s[t]=i,i}function Na(s,t,e){const{_proxy:i,_context:n,_subProxy:o,_descriptors:a}=s;let r=i[t];return wt(r)&&a.isScriptable(t)&&(r=Ha(t,r,s,e)),F(r)&&r.length&&(r=ja(t,r,s,a.isIndexable)),ws(t,r)&&(r=Ht(r,n,o&&o[t],a)),r}function Ha(s,t,e,i){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(s))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+s);r.add(s);let l=t(o,a||i);return r.delete(s),ws(s,l)&&(l=ks(n._scopes,n,s,l)),l}function ja(s,t,e,i){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&i(s))return t[o.index%t.length];if(A(t[0])){const l=t,h=n._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=ks(h,n,s,c);t.push(Ht(d,o,a&&a[s],r))}}return t}function Li(s,t,e){return wt(s)?s(t,e):s}const $a=(s,t)=>s===!0?t:typeof s=="string"?Mt(t,s):void 0;function Ya(s,t,e,i,n){for(const o of t){const a=$a(e,o);if(a){s.add(a);const r=Li(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==i)return r}else if(a===!1&&typeof i<"u"&&e!==i)return null}return!1}function ks(s,t,e,i){const n=t._rootScopes,o=Li(t._fallback,e,i),a=[...s,...n],r=new Set;r.add(i);let l=Ei(r,a,e,o||e,i);return l===null||typeof o<"u"&&o!==e&&(l=Ei(r,a,o,l,i),l===null)?!1:Ms(Array.from(r),[""],n,o,()=>Ua(t,e,i))}function Ei(s,t,e,i,n){for(;e;)e=Ya(s,t,e,i,n);return e}function Ua(s,t,e){const i=s._getTarget();t in i||(i[t]={});const n=i[t];return F(n)&&A(e)?e:n||{}}function Xa(s,t,e,i){let n;for(const o of t)if(n=Ri(Wa(o,s),e),typeof n<"u")return ws(s,n)?ks(e,i,s,n):n}function Ri(s,t){for(const e of t){if(!e)continue;const i=e[s];if(typeof i<"u")return i}}function Ii(s){let t=s._keys;return t||(t=s._keys=qa(s._scopes)),t}function qa(s){const t=new Set;for(const e of s)for(const i of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}function Fi(s,t,e,i){const{iScale:n}=s,{key:o="r"}=this._parsing,a=new Array(i);let r,l,h,c;for(r=0,l=i;r<l;++r)h=r+e,c=t[h],a[r]={r:n.parse(Mt(c,o),h)};return a}const Ka=Number.EPSILON||1e-14,jt=(s,t)=>t<s.length&&!s[t].skip&&s[t],zi=s=>s==="x"?"y":"x";function Ga(s,t,e,i){const n=s.skip?t:s,o=t,a=e.skip?t:e,r=fs(o,n),l=fs(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=i*h,u=i*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function Za(s,t,e){const i=s.length;let n,o,a,r,l,h=jt(s,0);for(let c=0;c<i-1;++c)if(l=h,h=jt(s,c+1),!(!l||!h)){if(Qt(t[c],0,Ka)){e[c]=e[c+1]=0;continue}n=e[c]/t[c],o=e[c+1]/t[c],r=Math.pow(n,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),e[c]=n*a*t[c],e[c+1]=o*a*t[c])}}function Ja(s,t,e="x"){const i=zi(e),n=s.length;let o,a,r,l=jt(s,0);for(let h=0;h<n;++h){if(a=r,r=l,l=jt(s,h+1),!r)continue;const c=r[e],d=r[i];a&&(o=(c-a[e])/3,r[`cp1${e}`]=c-o,r[`cp1${i}`]=d-o*t[h]),l&&(o=(l[e]-c)/3,r[`cp2${e}`]=c+o,r[`cp2${i}`]=d+o*t[h])}}function Qa(s,t="x"){const e=zi(t),i=s.length,n=Array(i).fill(0),o=Array(i);let a,r,l,h=jt(s,0);for(a=0;a<i;++a)if(r=l,l=h,h=jt(s,a+1),!!l){if(h){const c=h[t]-l[t];n[a]=c!==0?(h[e]-l[e])/c:0}o[a]=r?h?ct(n[a-1])!==ct(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}Za(s,n,o),Ja(s,o,t)}function Re(s,t,e){return Math.max(Math.min(s,e),t)}function tr(s,t){let e,i,n,o,a,r=bt(s[0],t);for(e=0,i=s.length;e<i;++e)a=o,o=r,r=e<i-1&&bt(s[e+1],t),o&&(n=s[e],a&&(n.cp1x=Re(n.cp1x,t.left,t.right),n.cp1y=Re(n.cp1y,t.top,t.bottom)),r&&(n.cp2x=Re(n.cp2x,t.left,t.right),n.cp2y=Re(n.cp2y,t.top,t.bottom)))}function er(s,t,e,i,n){let o,a,r,l;if(t.spanGaps&&(s=s.filter(h=>!h.skip)),t.cubicInterpolationMode==="monotone")Qa(s,n);else{let h=i?s[s.length-1]:s[0];for(o=0,a=s.length;o<a;++o)r=s[o],l=Ga(h,r,s[Math.min(o+1,a-(i?0:1))%a],t.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,h=r}t.capBezierPoints&&tr(s,e)}function Vi(){return typeof window<"u"&&typeof document<"u"}function Ss(s){let t=s.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ie(s,t,e){let i;return typeof s=="string"?(i=parseInt(s,10),s.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=s,i}const Fe=s=>s.ownerDocument.defaultView.getComputedStyle(s,null);function sr(s,t){return Fe(s).getPropertyValue(t)}const ir=["top","right","bottom","left"];function Et(s,t,e){const i={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=ir[n];i[o]=parseFloat(s[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const nr=(s,t,e)=>(s>0||t>0)&&(!e||!e.shadowRoot);function or(s,t){const e=s.touches,i=e&&e.length?e[0]:s,{offsetX:n,offsetY:o}=i;let a=!1,r,l;if(nr(n,o,s.target))r=n,l=o;else{const h=t.getBoundingClientRect();r=i.clientX-h.left,l=i.clientY-h.top,a=!0}return{x:r,y:l,box:a}}function Rt(s,t){if("native"in s)return s;const{canvas:e,currentDevicePixelRatio:i}=t,n=Fe(e),o=n.boxSizing==="border-box",a=Et(n,"padding"),r=Et(n,"border","width"),{x:l,y:h,box:c}=or(s,e),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:f,height:p}=t;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/f*e.width/i),y:Math.round((h-u)/p*e.height/i)}}function ar(s,t,e){let i,n;if(t===void 0||e===void 0){const o=Ss(s);if(!o)t=s.clientWidth,e=s.clientHeight;else{const a=o.getBoundingClientRect(),r=Fe(o),l=Et(r,"border","width"),h=Et(r,"padding");t=a.width-h.width-l.width,e=a.height-h.height-l.height,i=Ie(r.maxWidth,o,"clientWidth"),n=Ie(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||Ce,maxHeight:n||Ce}}const ze=s=>Math.round(s*10)/10;function rr(s,t,e,i){const n=Fe(s),o=Et(n,"margin"),a=Ie(n.maxWidth,s,"clientWidth")||Ce,r=Ie(n.maxHeight,s,"clientHeight")||Ce,l=ar(s,t,e);let{width:h,height:c}=l;if(n.boxSizing==="content-box"){const d=Et(n,"border","width"),u=Et(n,"padding");h-=u.width+d.width,c-=u.height+d.height}return h=Math.max(0,h-o.width),c=Math.max(0,i?h/i:c-o.height),h=ze(Math.min(h,a,l.maxWidth)),c=ze(Math.min(c,r,l.maxHeight)),h&&!c&&(c=ze(h/2)),(t!==void 0||e!==void 0)&&i&&l.height&&c>l.height&&(c=l.height,h=ze(Math.floor(c*i))),{width:h,height:c}}function Bi(s,t,e){const i=t||1,n=Math.floor(s.height*i),o=Math.floor(s.width*i);s.height=Math.floor(s.height),s.width=Math.floor(s.width);const a=s.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${s.height}px`,a.style.width=`${s.width}px`),s.currentDevicePixelRatio!==i||a.height!==n||a.width!==o?(s.currentDevicePixelRatio=i,a.height=n,a.width=o,s.ctx.setTransform(i,0,0,i,0,0),!0):!1}const lr=function(){let s=!1;try{const t={get passive(){return s=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return s}();function Wi(s,t){const e=sr(s,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function It(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:s.y+e*(t.y-s.y)}}function hr(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:i==="middle"?e<.5?s.y:t.y:i==="after"?e<1?s.y:t.y:e>0?t.y:s.y}}function cr(s,t,e,i){const n={x:s.cp2x,y:s.cp2y},o={x:t.cp1x,y:t.cp1y},a=It(s,n,e),r=It(n,o,e),l=It(o,t,e),h=It(a,r,e),c=It(r,l,e);return It(h,c,e)}const dr=function(s,t){return{x(e){return s+s+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},ur=function(){return{x(s){return s},setWidth(s){},textAlign(s){return s},xPlus(s,t){return s+t},leftForLtr(s,t){return s}}};function $t(s,t,e){return s?dr(t,e):ur()}function Ni(s,t){let e,i;(t==="ltr"||t==="rtl")&&(e=s.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),s.prevTextDirection=i)}function Hi(s,t){t!==void 0&&(delete s.prevTextDirection,s.canvas.style.setProperty("direction",t[0],t[1]))}function ji(s){return s==="angle"?{between:te,compare:fa,normalize:Q}:{between:pt,compare:(t,e)=>t-e,normalize:t=>t}}function $i({start:s,end:t,count:e,loop:i,style:n}){return{start:s%e,end:t%e,loop:i&&(t-s+1)%e===0,style:n}}function fr(s,t,e){const{property:i,start:n,end:o}=e,{between:a,normalize:r}=ji(i),l=t.length;let{start:h,end:c,loop:d}=s,u,f;if(d){for(h+=l,c+=l,u=0,f=l;u<f&&a(r(t[h%l][i]),n,o);++u)h--,c--;h%=l,c%=l}return c<h&&(c+=l),{start:h,end:c,loop:d,style:s.style}}function Yi(s,t,e){if(!e)return[s];const{property:i,start:n,end:o}=e,a=t.length,{compare:r,between:l,normalize:h}=ji(i),{start:c,end:d,loop:u,style:f}=fr(s,t,e),p=[];let g=!1,m=null,b,_,v;const x=()=>l(n,v,b)&&r(n,v)!==0,y=()=>r(o,b)===0||l(o,v,b),w=()=>g||x(),S=()=>!g||y();for(let k=c,C=c;k<=d;++k)_=t[k%a],!_.skip&&(b=h(_[i]),b!==v&&(g=l(b,n,o),m===null&&w()&&(m=r(b,n)===0?k:C),m!==null&&S()&&(p.push($i({start:m,end:k,loop:u,count:a,style:f})),m=null),C=k,v=b));return m!==null&&p.push($i({start:m,end:d,loop:u,count:a,style:f})),p}function Ui(s,t){const e=[],i=s.segments;for(let n=0;n<i.length;n++){const o=Yi(i[n],s.points,t);o.length&&e.push(...o)}return e}function gr(s,t,e,i){let n=0,o=t-1;if(e&&!i)for(;n<t&&!s[n].skip;)n++;for(;n<t&&s[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&s[o%t].skip;)o--;return o%=t,{start:n,end:o}}function pr(s,t,e,i){const n=s.length,o=[];let a=t,r=s[t],l;for(l=t+1;l<=e;++l){const h=s[l%n];h.skip||h.stop?r.skip||(i=!1,o.push({start:t%n,end:(l-1)%n,loop:i}),t=a=h.stop?l:null):(a=l,r.skip&&(t=l)),r=h}return a!==null&&o.push({start:t%n,end:a%n,loop:i}),o}function mr(s,t){const e=s.points,i=s.options.spanGaps,n=e.length;if(!n)return[];const o=!!s._loop,{start:a,end:r}=gr(e,n,o,i);if(i===!0)return Xi(s,[{start:a,end:r,loop:o}],e,t);const l=r<a?r+n:r,h=!!s._fullLoop&&a===0&&r===n-1;return Xi(s,pr(e,a,l,h),e,t)}function Xi(s,t,e,i){return!i||!i.setContext||!e?t:br(s,t,e,i)}function br(s,t,e,i){const n=s._chart.getContext(),o=qi(s.options),{_datasetIndex:a,options:{spanGaps:r}}=s,l=e.length,h=[];let c=o,d=t[0].start,u=d;function f(p,g,m,b){const _=r?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=_;for(;e[g%l].skip;)g+=_;p%l!==g%l&&(h.push({start:p%l,end:g%l,loop:m,style:b}),c=b,d=g%l)}}for(const p of t){d=r?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const b=e[u%l];m=qi(i.setContext(St(n,{type:"segment",p0:g,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),xr(m,c)&&f(d,u-1,p.loop,c),g=b,c=m}d<u-1&&f(d,u-1,p.loop,c)}return h}function qi(s){return{backgroundColor:s.backgroundColor,borderCapStyle:s.borderCapStyle,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderJoinStyle:s.borderJoinStyle,borderWidth:s.borderWidth,borderColor:s.borderColor}}function xr(s,t){if(!t)return!1;const e=[],i=function(n,o){return ms(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(s,i)!==JSON.stringify(t,i)}class _r{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=xi.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const o=i.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,i,t,"progress")),o.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var xt=new _r;const Ki="transparent",yr={boolean(s,t,e){return e>.5?t:s},color(s,t,e){const i=ki(s||Ki),n=i.valid&&ki(t||Ki);return n&&n.valid?n.mix(i,e).hexString():t},number(s,t,e){return s+(t-s)*e}};class vr{constructor(t,e,i,n){const o=e[i];n=oe([t.to,n,o,t.from]);const a=oe([t.from,o,n]);this._active=!0,this._fn=t.fn||yr[t.type||typeof a],this._easing=ee[t.easing]||ee.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,a=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=oe([t.to,e,n,t.from]),this._from=oe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e<i),!this._active){this._target[n]=r,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/i%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][e]()}}class Gi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;const e=Object.keys(N.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!A(o))return;const a={};for(const r of e)a[r]=o[r];(F(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!i.has(r))&&i.set(r,a)})})}_animateOptions(t,e){const i=e.options,n=wr(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&Mr(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const h=a[l];if(h.charAt(0)==="$")continue;if(h==="options"){n.push(...this._animateOptions(t,e));continue}const c=e[h];let d=o[h];const u=i.get(h);if(d)if(u&&d.active()){d.update(u,c,r);continue}else d.cancel();if(!u||!u.duration){t[h]=c;continue}o[h]=d=new vr(u,t,h,c),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return xt.add(this._chart,i),!0}}function Mr(s,t){const e=[],i=Object.keys(t);for(let n=0;n<i.length;n++){const o=s[i[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function wr(s,t){if(!t)return;let e=s.options;if(!e){s.options=t;return}return e.$shared&&(s.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Zi(s,t){const e=s&&s.options||{},i=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:n,end:i?n:o}}function kr(s,t,e){if(e===!1)return!1;const i=Zi(s,e),n=Zi(t,e);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function Sr(s){let t,e,i,n;return A(s)?(t=s.top,e=s.right,i=s.bottom,n=s.left):t=e=i=n=s,{top:t,right:e,bottom:i,left:n,disabled:s===!1}}function Ji(s,t){const e=[],i=s._getSortedDatasetMetas(t);let n,o;for(n=0,o=i.length;n<o;++n)e.push(i[n].index);return e}function Qi(s,t,e,i={}){const n=s.keys,o=i.mode==="single";let a,r,l,h;if(t!==null){for(a=0,r=n.length;a<r;++a){if(l=+n[a],l===e){if(i.all)continue;break}h=s.values[l],W(h)&&(o||t===0||ct(t)===ct(h))&&(t+=h)}return t}}function Pr(s){const t=Object.keys(s),e=new Array(t.length);let i,n,o;for(i=0,n=t.length;i<n;++i)o=t[i],e[i]={x:o,y:s[o]};return e}function tn(s,t){const e=s&&s.options.stacked;return e||e===void 0&&t.stack!==void 0}function Dr(s,t,e){return`${s.id}.${t.id}.${e.stack||e.type}`}function Cr(s){const{min:t,max:e,minDefined:i,maxDefined:n}=s.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function Or(s,t,e){const i=s[t]||(s[t]={});return i[e]||(i[e]={})}function en(s,t,e,i){for(const n of t.getMatchingVisibleMetas(i).reverse()){const o=s[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function sn(s,t){const{chart:e,_cachedMeta:i}=s,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=i,l=o.axis,h=a.axis,c=Dr(o,a,i),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[h]:m}=p,b=p._stacks||(p._stacks={});u=b[h]=Or(n,c,g),u[r]=m,u._top=en(u,a,!0,i.type),u._bottom=en(u,a,!1,i.type);const _=u._visualValues||(u._visualValues={});_[r]=m}}function Ps(s,t){const e=s.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function Ar(s,t){return St(s,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Tr(s,t,e){return St(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ae(s,t){const e=s.controller.index,i=s.vScale&&s.vScale.axis;if(i){t=t||s._parsed;for(const n of t){const o=n._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const Ds=s=>s==="reset"||s==="none",nn=(s,t)=>t?s:Object.assign({},s),Lr=(s,t,e)=>s&&!t.hidden&&t._stacked&&{keys:Ji(e,!0),values:null};class rt{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(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=tn(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&&ae(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=D(i.xAxisID,Ps(t,"x")),a=e.yAxisID=D(i.yAxisID,Ps(t,"y")),r=e.rAxisID=D(i.rAxisID,Ps(t,"r")),l=e.indexAxis,h=e.iAxisID=n(l,o,a,r),c=e.vAxisID=n(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(h),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&mi(this._data,this),t._stacked&&ae(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(A(e))this._data=Pr(e);else if(i!==e){if(i){mi(i,this);const n=this._cachedMeta;ae(n),n._parsed=[]}e&&Object.isExtensible(e)&&ba(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=tn(e.vScale,e),e.stack!==i.stack&&(n=!0,ae(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&sn(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:o,_stacked:a}=i,r=o.axis;let l=t===0&&e===n.length?!0:i._sorted,h=t>0&&i._parsed[t-1],c,d,u;if(this._parsing===!1)i._parsed=n,i._sorted=!0,u=n;else{F(n[t])?u=this.parseArrayData(i,n,t,e):A(n[t])?u=this.parseObjectData(i,n,t,e):u=this.parsePrimitiveData(i,n,t,e);const f=()=>d[r]===null||h&&d[r]<h[r];for(c=0;c<e;++c)i._parsed[c+t]=d=u[c],l&&(f()&&(l=!1),h=d);i._sorted=l}a&&sn(this,u)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:a}=t,r=o.axis,l=a.axis,h=o.getLabels(),c=o===a,d=new Array(n);let u,f,p;for(u=0,f=n;u<f;++u)p=u+i,d[u]={[r]:c||o.parse(h[p],p),[l]:a.parse(e[p],p)};return d}parseArrayData(t,e,i,n){const{xScale:o,yScale:a}=t,r=new Array(n);let l,h,c,d;for(l=0,h=n;l<h;++l)c=l+i,d=e[c],r[l]={x:o.parse(d[0],c),y:a.parse(d[1],c)};return r}parseObjectData(t,e,i,n){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,h=new Array(n);let c,d,u,f;for(c=0,d=n;c<d;++c)u=c+i,f=e[u],h[c]={x:o.parse(Mt(f,r),u),y:a.parse(Mt(f,l),u)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,a=e[t.axis],r={keys:Ji(n,!0),values:e._stacks[t.axis]._visualValues};return Qi(r,a,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let a=o===null?NaN:o;const r=n&&i._stacks[e.axis];n&&r&&(n.values=r,a=Qi(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,o=i._sorted&&t===i.iScale,a=n.length,r=this._getOtherScale(t),l=Lr(e,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=Cr(r);let u,f;function p(){f=n[u];const g=f[r.axis];return!W(f[t.axis])||c>g||d<g}for(u=0;u<a&&!(!p()&&(this.updateRangeFromParsed(h,t,f,l),o));++u);if(o){for(u=a-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(h,t,f,l);break}}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,a;for(n=0,o=e.length;n<o;++n)a=e[n][t.axis],W(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Sr(D(this.options.clip,kr(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],o=e.chartArea,a=[],r=this._drawStart||0,l=this._drawCount||n.length-r,h=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,o,r,l),c=r;c<r+l;++c){const d=n[c];d.hidden||(d.active&&h?a.push(d):d.draw(t,o))}for(c=0;c<a.length;++c)a[c].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Tr(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Ar(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,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",i){const n=e==="active",o=this._cachedDataOpts,a=t+"-"+e,r=o[a],l=this.enableOptionSharing&&Jt(i);if(r)return nn(r,l);const h=this.chart.config,c=h.datasetElementScopeKeys(this._type,t),d=n?[`${t}Hover`,"hover",t,""]:[t,""],u=h.getOptionScopes(this.getDataset(),c),f=Object.keys(N.elements[t]),p=()=>this.getContext(i,n,e),g=h.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[a]=Object.freeze(nn(g,l))),g}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(n.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,e),u=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(u,this.getContext(t,i,e))}const h=new Gi(n,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ds(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:a}}updateElement(t,e,i,n){Ds(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Ds(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[r,l,h]of this._syncList)this[r](l,h);this._syncList=[];const n=i.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,i=!0){const n=this._cachedMeta,o=n.data,a=t+e;let r;const l=h=>{for(h.length+=e,r=h.length-1;r>=a;r--)h[r]=h[r-e]};for(l(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&ae(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const 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]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}M(rt,"defaults",{}),M(rt,"datasetElementType",null),M(rt,"dataElementType",null);function Er(s,t){if(!s._cache.$bar){const e=s.getMatchingVisibleMetas(t);let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(s));s._cache.$bar=bi(i.sort((n,o)=>n-o))}return s._cache.$bar}function Rr(s){const t=s.iScale,e=Er(t,s.type);let i=t._length,n,o,a,r;const l=()=>{a===32767||a===-32768||(Jt(r)&&(i=Math.min(i,Math.abs(a-r)||i)),r=a)};for(n=0,o=e.length;n<o;++n)a=t.getPixelForValue(e[n]),l();for(r=void 0,n=0,o=t.ticks.length;n<o;++n)a=t.getPixelForTick(n),l();return i}function Ir(s,t,e,i){const n=e.barThickness;let o,a;return L(n)?(o=t.min*e.categoryPercentage,a=e.barPercentage):(o=n*i,a=1),{chunk:o/i,ratio:a,start:t.pixels[s]-o/2}}function Fr(s,t,e,i){const n=t.pixels,o=n[s];let a=s>0?n[s-1]:null,r=s<n.length-1?n[s+1]:null;const l=e.categoryPercentage;a===null&&(a=o-(r===null?t.end-t.start:r-o)),r===null&&(r=o+o-a);const h=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/i,ratio:e.barPercentage,start:h}}function zr(s,t,e,i){const n=e.parse(s[0],i),o=e.parse(s[1],i),a=Math.min(n,o),r=Math.max(n,o);let l=a,h=r;Math.abs(a)>Math.abs(r)&&(l=r,h=a),t[e.axis]=h,t._custom={barStart:l,barEnd:h,start:n,end:o,min:a,max:r}}function on(s,t,e,i){return F(s)?zr(s,t,e,i):t[e.axis]=e.parse(s,i),t}function an(s,t,e,i){const n=s.iScale,o=s.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=e,c=e+i;h<c;++h)u=t[h],d={},d[n.axis]=r||n.parse(a[h],h),l.push(on(u,d,o,h));return l}function Cs(s){return s&&s.barStart!==void 0&&s.barEnd!==void 0}function Vr(s,t,e){return s!==0?ct(s):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Br(s){let t,e,i,n,o;return s.horizontal?(t=s.base>s.x,e="left",i="right"):(t=s.base<s.y,e="bottom",i="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:i,reverse:t,top:n,bottom:o}}function Wr(s,t,e,i){let n=t.borderSkipped;const o={};if(!n){s.borderSkipped=o;return}if(n===!0){s.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:r,reverse:l,top:h,bottom:c}=Br(s);n==="middle"&&e&&(s.enableBorderRadius=!0,(e._top||0)===i?n=h:(e._bottom||0)===i?n=c:(o[rn(c,a,r,l)]=!0,n=h)),o[rn(n,a,r,l)]=!0,s.borderSkipped=o}function rn(s,t,e,i){return i?(s=Nr(s,t,e),s=ln(s,e,t)):s=ln(s,t,e),s}function Nr(s,t,e){return s===t?e:s===e?t:s}function ln(s,t,e){return s==="start"?t:s==="end"?e:s}function Hr(s,{inflateAmount:t},e){s.inflateAmount=t==="auto"?e===1?.33:0:t}class Ve extends rt{parsePrimitiveData(t,e,i,n){return an(t,e,i,n)}parseArrayData(t,e,i,n){return an(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:l="y"}=this._parsing,h=o.axis==="x"?r:l,c=a.axis==="x"?r:l,d=[];let u,f,p,g;for(u=i,f=i+n;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(Mt(g,h),u),d.push(on(Mt(g,c),p,a,u));return d}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._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){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),a=o._custom,r=Cs(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=n==="reset",{index:a,_cachedMeta:{vScale:r}}=this,l=r.getBasePixel(),h=r.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+i;f++){const p=this.getParsed(f),g=o||L(p[r.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,c),b=(p._stacks||{})[r.axis],_={horizontal:h,base:g.base,enableBorderRadius:!b||Cs(p._custom)||a===b._top||a===b._bottom,x:h?g.head:m.center,y:h?m.center:g.head,height:h?m.size:Math.abs(g.size),width:h?Math.abs(g.size):m.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const v=_.options||t[f].options;Wr(_,v,b,a),Hr(_,v,c.ratio),this.updateElement(t[f],f,_,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=i.options.stacked,a=[],r=l=>{const h=l.controller.getParsed(e),c=h&&h[l.vScale.axis];if(L(c)||isNaN(c))return!0};for(const l of n)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;o<a;++o)n.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const r=t.barThickness;return{min:r||Rr(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:o,minBarLength:a}}=this,r=o||0,l=this.getParsed(t),h=l._custom,c=Cs(h);let d=l[e.axis],u=0,f=i?this.applyStack(e,l,i):d,p,g;f!==d&&(u=f-d,f=d),c&&(d=h.barStart,f=h.barEnd-h.barStart,d!==0&&ct(d)!==ct(h.barEnd)&&(u=0),u+=d);const m=!L(o)&&!c?o:u;let b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+f):p=b,g=p-b,Math.abs(g)<a){g=Vr(g,e,r)*a,d===r&&(b-=g/2);const _=e.getPixelForDecimal(0),v=e.getPixelForDecimal(1),x=Math.min(_,v),y=Math.max(_,v);b=Math.max(Math.min(b,y),x),p=b+g,i&&!c&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(r)){const _=ct(g)*e.getLineWidthForValue(r)/2;b+=_,g-=_}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,a=D(n.maxBarThickness,1/0);let r,l;if(e.grouped){const h=o?this._getStackCount(t):e.stackCount,c=n.barThickness==="flex"?Fr(t,e,n,h):Ir(t,e,n,h),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=c.start+c.chunk*d+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&i[o].draw(this._ctx)}}M(Ve,"id","bar"),M(Ve,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),M(Ve,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Be extends rt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const o=super.parsePrimitiveData(t,e,i,n);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+i).radius;return o}parseArrayData(t,e,i,n){const o=super.parseArrayData(t,e,i,n);for(let a=0;a<o.length;a++){const r=e[i+a];o[a]._custom=D(r[2],this.resolveDataElementOptions(a+i).radius)}return o}parseObjectData(t,e,i,n){const o=super.parseObjectData(t,e,i,n);for(let a=0;a<o.length;a++){const r=e[i+a];o[a]._custom=D(r&&r.r&&+r.r,this.resolveDataElementOptions(a+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y),h=a._custom;return{label:i[t]||"",value:"("+r+", "+l+(h?", "+h:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=n==="reset",{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:l,includeOptions:h}=this._getSharedOptions(e,n),c=a.axis,d=r.axis;for(let u=e;u<e+i;u++){const f=t[u],p=!o&&this.getParsed(u),g={},m=g[c]=o?a.getPixelForDecimal(.5):a.getPixelForValue(p[c]),b=g[d]=o?r.getBasePixel():r.getPixelForValue(p[d]);g.skip=isNaN(m)||isNaN(b),h&&(g.options=l||this.resolveDataElementOptions(u,f.active?"active":n),o&&(g.options.radius=0)),this.updateElement(f,u,g,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return e!=="active"&&(n.radius=0),n.radius+=D(i&&i._custom,o),n}}M(Be,"id","bubble"),M(Be,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),M(Be,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function jr(s,t,e){let i=1,n=1,o=0,a=0;if(t<V){const r=s,l=r+t,h=Math.cos(r),c=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(v,x,y)=>te(v,r,l,!0)?1:Math.max(x,x*e,y,y*e),p=(v,x,y)=>te(v,r,l,!0)?-1:Math.min(x,x*e,y,y*e),g=f(0,h,d),m=f(H,c,u),b=p(z,h,d),_=p(z+H,c,u);i=(g-b)/2,n=(m-_)/2,o=-(g+b)/2,a=-(m+_)/2}return{ratioX:i,ratioY:n,offsetX:o,offsetY:a}}class Ft extends rt{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){const i=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=i;else{let o=l=>+i[l];if(A(i[t])){const{key:l="value"}=this._parsing;o=h=>+Mt(i[h],l)}let a,r;for(a=t,r=t+e;a<r;++a)n._parsed[a]=o(a)}}_getRotation(){return at(this.options.rotation-90)}_getCircumference(){return at(this.options.circumference)}_getRotationExtents(){let t=V,e=-V;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,o=n._getRotation(),a=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,o=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-a)/2,0),l=Math.min(ia(this.options.cutout,r),1),h=this._getRingWeight(this.index),{circumference:c,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=jr(d,c,l),m=(i.width-a)/u,b=(i.height-a)/f,_=Math.max(Math.min(m,b)/2,0),v=ai(this.options.radius,_),x=Math.max(v*l,0),y=(v-x)/this._getVisibleDatasetWeightTotal();this.offsetX=p*v,this.offsetY=g*v,n.total=this.calculateTotal(),this.outerRadius=v-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*h,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/V)}updateElements(t,e,i,n){const o=n==="reset",a=this.chart,r=a.chartArea,l=a.options.animation,h=(r.left+r.right)/2,c=(r.top+r.bottom)/2,d=o&&l.animateScale,u=d?0:this.innerRadius,f=d?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(e,n);let m=this._getRotation(),b;for(b=0;b<e;++b)m+=this._circumference(b,o);for(b=e;b<e+i;++b){const _=this._circumference(b,o),v=t[b],x={x:h+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+_,circumference:_,outerRadius:f,innerRadius:u};g&&(x.options=p||this.resolveDataElementOptions(b,v.active?"active":n)),m+=_,this.updateElement(v,b,x,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?V*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=se(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,o,a,r,l;if(!t){for(n=0,o=i.data.datasets.length;n<o;++n)if(i.isDatasetVisible(n)){a=i.getDatasetMeta(n),t=a.data,r=a.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=r.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(D(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}M(Ft,"id","doughnut"),M(Ft,"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"}),M(Ft,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),M(Ft,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((o,a)=>{const r=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class We extends rt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:l}=yi(e,n,a);this._drawStart=r,this._drawCount=l,vi(e)&&(r=0,l=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:h},t),this.updateElements(n,r,l,t)}updateElements(t,e,i,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,n),u=a.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=Nt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e+i,v=t.length;let x=e>0&&this.getParsed(e-1);for(let y=0;y<v;++y){const w=t[y],S=b?w:{};if(y<e||y>=_){S.skip=!0;continue}const k=this.getParsed(y),C=L(k[f]),P=S[u]=a.getPixelForValue(k[u],y),T=S[f]=o||C?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,k,l):k[f],y);S.skip=isNaN(P)||isNaN(T)||C,S.stop=y>0&&Math.abs(k[u]-x[u])>m,g&&(S.parsed=k,S.raw=h.data[y]),d&&(S.options=c||this.resolveDataElementOptions(y,w.active?"active":n)),b||this.updateElement(w,y,S,n),x=k}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}M(We,"id","line"),M(We,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),M(We,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class re extends rt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=se(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return Fi.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,n){const o=n==="reset",a=this.chart,r=a.options.animation,l=this._cachedMeta.rScale,h=l.xCenter,c=l.yCenter,d=l.getIndexAngle(0)-.5*z;let u=d,f;const p=360/this.countVisibleElements();for(f=0;f<e;++f)u+=this._computeAngle(f,n,p);for(f=e;f<e+i;f++){const g=t[f];let m=u,b=u+this._computeAngle(f,n,p),_=a.getDataVisibility(f)?l.getDistanceFromCenterForValue(this.getParsed(f).r):0;u=b,o&&(r.animateScale&&(_=0),r.animateRotate&&(m=b=d));const v={x:h,y:c,innerRadius:0,outerRadius:_,startAngle:m,endAngle:b,options:this.resolveDataElementOptions(f,g.active?"active":n)};this.updateElement(g,f,v,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?at(this.resolveDataElementOptions(t,e).angle||i):0}}M(re,"id","polarArea"),M(re,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),M(re,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((o,a)=>{const r=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:n,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Os extends Ft{}M(Os,"id","pie"),M(Os,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Ne extends rt{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return Fi.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(i.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const r={_loop:!0,_fullLoop:o.length===n.length,options:a};this.updateElement(i,void 0,r,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const o=this._cachedMeta.rScale,a=n==="reset";for(let r=e;r<e+i;r++){const l=t[r],h=this.resolveDataElementOptions(r,l.active?"active":n),c=o.getPointPositionForValue(r,this.getParsed(r).r),d=a?o.xCenter:c.x,u=a?o.yCenter:c.y,f={x:d,y:u,angle:c.angle,skip:isNaN(d)||isNaN(u),options:h};this.updateElement(l,r,f,n)}}}M(Ne,"id","radar"),M(Ne,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),M(Ne,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class He extends rt{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:o}=e,a=this.getParsed(t),r=n.getLabelForValue(a.x),l=o.getLabelForValue(a.y);return{label:i[t]||"",value:"("+r+", "+l+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:o,count:a}=yi(e,i,n);if(this._drawStart=o,this._drawCount=a,vi(e)&&(o=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:r,_dataset:l}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!l._decimated,r.points=i;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:h},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const o=n==="reset",{iScale:a,vScale:r,_stacked:l,_dataset:h}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(c),u=this.includeOptions(n,d),f=a.axis,p=r.axis,{spanGaps:g,segment:m}=this.options,b=Nt(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||n==="none";let v=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const y=t[x],w=this.getParsed(x),S=_?y:{},k=L(w[p]),C=S[f]=a.getPixelForValue(w[f],x),P=S[p]=o||k?r.getBasePixel():r.getPixelForValue(l?this.applyStack(r,w,l):w[p],x);S.skip=isNaN(C)||isNaN(P)||k,S.stop=x>0&&Math.abs(w[f]-v[f])>b,m&&(S.parsed=w,S.raw=h.data[x]),u&&(S.options=d||this.resolveDataElementOptions(x,y.active?"active":n)),_||this.updateElement(y,x,S,n),v=w}this.updateSharedOptions(d,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let r=0;for(let l=e.length-1;l>=0;--l)r=Math.max(r,e[l].size(this.resolveDataElementOptions(l))/2);return r>0&&r}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,o,a)/2}}M(He,"id","scatter"),M(He,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),M(He,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var $r=Object.freeze({__proto__:null,BarController:Ve,BubbleController:Be,DoughnutController:Ft,LineController:We,PieController:Os,PolarAreaController:re,RadarController:Ne,ScatterController:He});function zt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class As{constructor(t){M(this,"options");this.options=t||{}}static override(t){Object.assign(As.prototype,t)}init(){}formats(){return zt()}parse(){return zt()}format(){return zt()}add(){return zt()}diff(){return zt()}startOf(){return zt()}endOf(){return zt()}}var Yr={_date:As};function Ur(s,t,e,i){const{controller:n,data:o,_sorted:a}=s,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?pa:mt;if(i){if(n._sharedOptions){const h=o[0],c=typeof h.getRange=="function"&&h.getRange(t);if(c){const d=l(o,t,e-c),u=l(o,t,e+c);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function le(s,t,e,i,n){const o=s.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r<l;++r){const{index:h,data:c}=o[r],{lo:d,hi:u}=Ur(o[r],t,a,n);for(let f=d;f<=u;++f){const p=c[f];p.skip||i(p,h,f)}}}function Xr(s){const t=s.indexOf("x")!==-1,e=s.indexOf("y")!==-1;return function(i,n){const o=t?Math.abs(i.x-n.x):0,a=e?Math.abs(i.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function Ts(s,t,e,i,n){const o=[];return!n&&!s.isPointInArea(t)||le(s,e,t,function(a,r,l){!n&&!bt(a,s.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:r,index:l})},!0),o}function qr(s,t,e,i){let n=[];function o(a,r,l){const{startAngle:h,endAngle:c}=a.getProps(["startAngle","endAngle"],i),{angle:d}=gi(a,{x:t.x,y:t.y});te(d,h,c)&&n.push({element:a,datasetIndex:r,index:l})}return le(s,e,t,o),n}function Kr(s,t,e,i,n,o){let a=[];const r=Xr(e);let l=Number.POSITIVE_INFINITY;function h(c,d,u){const f=c.inRange(t.x,t.y,n);if(i&&!f)return;const p=c.getCenterPoint(n);if(!(o||s.isPointInArea(p))&&!f)return;const g=r(t,p);g<l?(a=[{element:c,datasetIndex:d,index:u}],l=g):g===l&&a.push({element:c,datasetIndex:d,index:u})}return le(s,e,t,h),a}function Ls(s,t,e,i,n,o){return!o&&!s.isPointInArea(t)?[]:e==="r"&&!i?qr(s,t,e,n):Kr(s,t,e,i,n,o)}function hn(s,t,e,i,n){const o=[],a=e==="x"?"inXRange":"inYRange";let r=!1;return le(s,e,t,(l,h,c)=>{l[a](t[e],n)&&(o.push({element:l,datasetIndex:h,index:c}),r=r||l.inRange(t.x,t.y,n))}),i&&!r?[]:o}var Gr={evaluateInteractionItems:le,modes:{index(s,t,e,i){const n=Rt(t,s),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?Ts(s,n,o,i,a):Ls(s,n,o,!1,i,a),l=[];return r.length?(s.getSortedVisibleDatasetMetas().forEach(h=>{const c=r[0].index,d=h.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:h.index,index:c})}),l):[]},dataset(s,t,e,i){const n=Rt(t,s),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?Ts(s,n,o,i,a):Ls(s,n,o,!1,i,a);if(r.length>0){const l=r[0].datasetIndex,h=s.getDatasetMeta(l).data;r=[];for(let c=0;c<h.length;++c)r.push({element:h[c],datasetIndex:l,index:c})}return r},point(s,t,e,i){const n=Rt(t,s),o=e.axis||"xy",a=e.includeInvisible||!1;return Ts(s,n,o,i,a)},nearest(s,t,e,i){const n=Rt(t,s),o=e.axis||"xy",a=e.includeInvisible||!1;return Ls(s,n,o,e.intersect,i,a)},x(s,t,e,i){const n=Rt(t,s);return hn(s,n,"x",e.intersect,i)},y(s,t,e,i){const n=Rt(t,s);return hn(s,n,"y",e.intersect,i)}}};const cn=["left","top","right","bottom"];function he(s,t){return s.filter(e=>e.pos===t)}function dn(s,t){return s.filter(e=>cn.indexOf(e.pos)===-1&&e.box.axis===t)}function ce(s,t){return s.sort((e,i)=>{const n=t?i:e,o=t?e:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Zr(s){const t=[];let e,i,n,o,a,r;for(e=0,i=(s||[]).length;e<i;++e)n=s[e],{position:o,options:{stack:a,stackWeight:r=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&o+a,stackWeight:r});return t}function Jr(s){const t={};for(const e of s){const{stack:i,pos:n,stackWeight:o}=e;if(!i||!cn.includes(n))continue;const a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Qr(s,t){const e=Jr(s),{vBoxMaxWidth:i,hBoxMaxHeight:n}=t;let o,a,r;for(o=0,a=s.length;o<a;++o){r=s[o];const{fullSize:l}=r.box,h=e[r.stack],c=h&&r.stackWeight/h.weight;r.horizontal?(r.width=c?c*i:l&&t.availableWidth,r.height=n):(r.width=i,r.height=c?c*n:l&&t.availableHeight)}return e}function tl(s){const t=Zr(s),e=ce(t.filter(h=>h.box.fullSize),!0),i=ce(he(t,"left"),!0),n=ce(he(t,"right")),o=ce(he(t,"top"),!0),a=ce(he(t,"bottom")),r=dn(t,"x"),l=dn(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:he(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function un(s,t,e,i){return Math.max(s[e],t[e])+Math.max(s[i],t[i])}function fn(s,t){s.top=Math.max(s.top,t.top),s.left=Math.max(s.left,t.left),s.bottom=Math.max(s.bottom,t.bottom),s.right=Math.max(s.right,t.right)}function el(s,t,e,i){const{pos:n,box:o}=e,a=s.maxPadding;if(!A(n)){e.size&&(s[n]-=e.size);const d=i[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,s[n]+=e.size}o.getPadding&&fn(a,o.getPadding());const r=Math.max(0,t.outerWidth-un(a,s,"left","right")),l=Math.max(0,t.outerHeight-un(a,s,"top","bottom")),h=r!==s.w,c=l!==s.h;return s.w=r,s.h=l,e.horizontal?{same:h,other:c}:{same:c,other:h}}function sl(s){const t=s.maxPadding;function e(i){const n=Math.max(t[i]-s[i],0);return s[i]+=n,n}s.y+=e("top"),s.x+=e("left"),e("right"),e("bottom")}function il(s,t){const e=t.maxPadding;function i(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return i(s?["left","right"]:["top","bottom"])}function de(s,t,e,i){const n=[];let o,a,r,l,h,c;for(o=0,a=s.length,h=0;o<a;++o){r=s[o],l=r.box,l.update(r.width||t.w,r.height||t.h,il(r.horizontal,t));const{same:d,other:u}=el(t,e,r,i);h|=d&&n.length,c=c||u,l.fullSize||n.push(r)}return h&&de(n,t,e,i)||c}function je(s,t,e,i,n){s.top=e,s.left=t,s.right=t+i,s.bottom=e+n,s.width=i,s.height=n}function gn(s,t,e,i){const n=e.padding;let{x:o,y:a}=t;for(const r of s){const l=r.box,h=i[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/h.weight||1;if(r.horizontal){const d=t.w*c,u=h.size||l.height;Jt(h.start)&&(a=h.start),l.fullSize?je(l,n.left,a,e.outerWidth-n.right-n.left,u):je(l,t.left+h.placed,a,d,u),h.start=a,h.placed+=d,a=l.bottom}else{const d=t.h*c,u=h.size||l.width;Jt(h.start)&&(o=h.start),l.fullSize?je(l,o,n.top,u,e.outerHeight-n.bottom-n.top):je(l,o,t.top+h.placed,u,d),h.start=o,h.placed+=d,o=l.right}}t.x=o,t.y=a}var q={addBox(s,t){s.boxes||(s.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},s.boxes.push(t)},removeBox(s,t){const e=s.boxes?s.boxes.indexOf(t):-1;e!==-1&&s.boxes.splice(e,1)},configure(s,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(s,t,e,i){if(!s)return;const n=X(s.options.layout.padding),o=Math.max(t-n.width,0),a=Math.max(e-n.height,0),r=tl(s.boxes),l=r.vertical,h=r.horizontal;R(s.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const c=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);fn(u,X(i));const f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),p=Qr(l.concat(h),d);de(r.fullSize,f,d,p),de(l,f,d,p),de(h,f,d,p)&&de(l,f,d,p),sl(f),gn(r.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,gn(r.rightAndBottom,f,d,p),s.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},R(r.chartArea,g=>{const m=g.box;Object.assign(m,s.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class pn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class nl extends pn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const $e="$chartjs",ol={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mn=s=>s===null||s==="";function al(s,t){const e=s.style,i=s.getAttribute("height"),n=s.getAttribute("width");if(s[$e]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",mn(n)){const o=Wi(s,"width");o!==void 0&&(s.width=o)}if(mn(i))if(s.style.height==="")s.height=s.width/(t||2);else{const o=Wi(s,"height");o!==void 0&&(s.height=o)}return s}const bn=lr?{passive:!0}:!1;function rl(s,t,e){s.addEventListener(t,e,bn)}function ll(s,t,e){s.canvas.removeEventListener(t,e,bn)}function hl(s,t){const e=ol[s.type]||s.type,{x:i,y:n}=Rt(s,t);return{type:e,chart:t,native:s,x:i!==void 0?i:null,y:n!==void 0?n:null}}function Ye(s,t){for(const e of s)if(e===t||e.contains(t))return!0}function cl(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Ye(r.addedNodes,i),a=a&&!Ye(r.removedNodes,i);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function dl(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Ye(r.removedNodes,i),a=a&&!Ye(r.addedNodes,i);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ue=new Map;let xn=0;function _n(){const s=window.devicePixelRatio;s!==xn&&(xn=s,ue.forEach((t,e)=>{e.currentDevicePixelRatio!==s&&t()}))}function ul(s,t){ue.size||window.addEventListener("resize",_n),ue.set(s,t)}function fl(s){ue.delete(s),ue.size||window.removeEventListener("resize",_n)}function gl(s,t,e){const i=s.canvas,n=i&&Ss(i);if(!n)return;const o=_i((r,l)=>{const h=n.clientWidth;e(r,l),h<n.clientWidth&&e()},window),a=new ResizeObserver(r=>{const l=r[0],h=l.contentRect.width,c=l.contentRect.height;h===0&&c===0||o(h,c)});return a.observe(n),ul(s,o),a}function Es(s,t,e){e&&e.disconnect(),t==="resize"&&fl(s)}function pl(s,t,e){const i=s.canvas,n=_i(o=>{s.ctx!==null&&e(hl(o,s))},s);return rl(i,t,n),n}class ml extends pn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(al(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[$e])return!1;const i=e[$e].initial;["height","width"].forEach(o=>{const a=i[o];L(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=i.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[$e],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:cl,detach:dl,resize:gl}[e]||pl;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Es,detach:Es,resize:Es}[e]||ll)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return rr(t,e,i,n)}isAttached(t){const e=Ss(t);return!!(e&&e.isConnected)}}function bl(s){return!Vi()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?nl:ml}class lt{constructor(){M(this,"x");M(this,"y");M(this,"active",!1);M(this,"options");M(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Nt(this.x)&&Nt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(o=>{n[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),n}}M(lt,"defaults",{}),M(lt,"defaultRoutes");function xl(s,t){const e=s.options.ticks,i=_l(s),n=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?vl(t):[],a=o.length,r=o[0],l=o[a-1],h=[];if(a>n)return Ml(t,h,o,a/n),h;const c=yl(o,t,n);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(Ue(t,h,c,L(f)?0:r-f,r),d=0,u=a-1;d<u;d++)Ue(t,h,c,o[d],o[d+1]);return Ue(t,h,c,l,L(f)?t.length:l+f),h}return Ue(t,h,c),h}function _l(s){const t=s.options.offset,e=s._tickSize(),i=s._length/e+(t?0:1),n=s._maxLength/e;return Math.floor(Math.min(i,n))}function yl(s,t,e){const i=wl(s),n=t.length/e;if(!i)return Math.max(n,1);const o=da(i);for(let a=0,r=o.length-1;a<r;a++){const l=o[a];if(l>n)return l}return Math.max(n,1)}function vl(s){const t=[];let e,i;for(e=0,i=s.length;e<i;e++)s[e].major&&t.push(e);return t}function Ml(s,t,e,i){let n=0,o=e[0],a;for(i=Math.ceil(i),a=0;a<s.length;a++)a===o&&(t.push(s[a]),n++,o=e[n*i])}function Ue(s,t,e,i,n){const o=D(i,0),a=Math.min(D(n,s.length),s.length);let r=0,l,h,c;for(e=Math.ceil(e),n&&(l=n-i,e=l/Math.floor(l/e)),c=o;c<0;)r++,c=Math.round(o+r*e);for(h=Math.max(o,0);h<a;h++)h===c&&(t.push(s[h]),r++,c=Math.round(o+r*e))}function wl(s){const t=s.length;let e,i;if(t<2)return!1;for(i=s[0],e=1;e<t;++e)if(s[e]-s[e-1]!==i)return!1;return i}const kl=s=>s==="left"?"right":s==="right"?"left":s,yn=(s,t,e)=>t==="top"||t==="left"?s[t]+e:s[t]-e,vn=(s,t)=>Math.min(t||s,s);function Mn(s,t){const e=[],i=s.length/t,n=s.length;let o=0;for(;o<n;o+=i)e.push(s[Math.floor(o)]);return e}function Sl(s,t,e){const i=s.ticks.length,n=Math.min(t,i-1),o=s._startPixel,a=s._endPixel,r=1e-6;let l=s.getPixelForTick(n),h;if(!(e&&(i===1?h=Math.max(l-o,a-l):t===0?h=(s.getPixelForTick(1)-l)/2:h=(l-s.getPixelForTick(n-1))/2,l+=n<t?h:-h,l<o-r||l>a+r)))return l}function Pl(s,t){R(s,e=>{const i=e.gc,n=i.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[i[o]];i.splice(0,n)}})}function fe(s){return s.drawTicks?s.tickLength:0}function wn(s,t){if(!s.display)return 0;const e=j(s.font,t),i=X(s.padding);return(F(s.text)?s.text.length:1)*e.lineHeight+i.height}function Dl(s,t){return St(s,{scale:t,type:"scale"})}function Cl(s,t,e){return St(s,{tick:e,index:t,type:"tick"})}function Ol(s,t,e){let i=ps(s);return(e&&t!=="right"||!e&&t==="right")&&(i=kl(i)),i}function Al(s,t,e,i){const{top:n,left:o,bottom:a,right:r,chart:l}=s,{chartArea:h,scales:c}=l;let d=0,u,f,p;const g=a-n,m=r-o;if(s.isHorizontal()){if(f=U(i,o,r),A(e)){const b=Object.keys(e)[0],_=e[b];p=c[b].getPixelForValue(_)+g-t}else e==="center"?p=(h.bottom+h.top)/2+g-t:p=yn(s,e,t);u=r-o}else{if(A(e)){const b=Object.keys(e)[0],_=e[b];f=c[b].getPixelForValue(_)-m+t}else e==="center"?f=(h.left+h.right)/2-m+t:f=yn(s,e,t);p=U(i,a,n),d=e==="left"?-H:H}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Vt extends lt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.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(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=J(t,Number.POSITIVE_INFINITY),e=J(e,Number.NEGATIVE_INFINITY),i=J(i,Number.POSITIVE_INFINITY),n=J(n,Number.NEGATIVE_INFINITY),{min:J(t,i),max:J(e,n),minDefined:W(t),maxDefined:W(e)}}getMinMax(t){let{min:e,max:i,minDefined:n,maxDefined:o}=this.getUserBounds(),a;if(n&&o)return{min:e,max:i};const r=this.getMatchingVisibleMetas();for(let l=0,h=r.length;l<h;++l)a=r[l].controller.getMinMax(this,t),n||(e=Math.min(e,a.min)),o||(i=Math.max(i,a.max));return e=o&&e>i?i:e,i=n&&e>i?e:i,{min:J(e,J(i,e)),max:J(i,J(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ba(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r<this.ticks.length;this._convertTicksToLabels(l?Mn(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=xl(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){I(this.options.afterUpdate,[this])}beforeSetDimensions(){I(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(){I(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),I(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){I(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,o;for(i=0,n=t.length;i<n;i++)o=t[i],o.label=I(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){I(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){I(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=vn(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let a=n,r,l,h;if(!this._isVisible()||!e.display||n>=o||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const c=this._getLabelSizes(),d=c.widest.width,u=c.highest.height,f=$(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/i:f/(i-1),d+6>r&&(r=f/(i-(t.offset?.5:1)),l=this.maxHeight-fe(t.grid)-e.padding-wn(t.title,this.chart.options.font),h=Math.sqrt(d*d+u*u),a=us(Math.min(Math.asin($((c.highest.height+6)/r,-1,1)),Math.asin($(l/h,-1,1))-Math.asin($(u/h,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=wn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=fe(o)+l):(t.height=this.maxHeight,t.width=fe(o)+l),i.display&&this.ticks.length){const{first:h,last:c,widest:d,highest:u}=this._getLabelSizes(),f=i.padding*2,p=at(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){const b=i.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=i.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(h,c,m,g)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,h=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?h?(u=n*t.width,f=i*e.height):(u=i*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-c+a)*this.width/(this.width-c),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let c=e.height/2,d=t.height/2;o==="start"?(c=0,d=t.height):o==="end"&&(c=e.height,d=0),this.paddingTop=c+a,this.paddingBottom=d+a}}_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(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)L(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Mn(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(e/vn(e,i));let h=0,c=0,d,u,f,p,g,m,b,_,v,x,y;for(d=0;d<e;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),n.font=m=g.string,b=o[m]=o[m]||{data:{},gc:[]},_=g.lineHeight,v=x=0,!L(p)&&!F(p))v=Te(n,b.data,b.gc,v,p),x=_;else if(F(p))for(u=0,f=p.length;u<f;++u)y=p[u],!L(y)&&!F(y)&&(v=Te(n,b.data,b.gc,v,y),x+=_);a.push(v),r.push(x),h=Math.max(v,h),c=Math.max(x,c)}Pl(o,e);const w=a.indexOf(h),S=r.indexOf(c),k=C=>({width:a[C]||0,height:r[C]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(S),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ga(this._alignToPixels?At(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=Cl(this.getContext(),t,i))}return this.$context||(this.$context=Dl(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=at(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*i>r*n?r/i:l/n:l*n<r*i?l/i:r/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,h=this.isHorizontal(),c=this.ticks.length+(l?1:0),d=fe(o),u=[],f=r.setContext(this.getContext()),p=f.display?f.width:0,g=p/2,m=function(O){return At(i,O,p)};let b,_,v,x,y,w,S,k,C,P,T,E;if(a==="top")b=m(this.bottom),w=this.bottom-d,k=b-g,P=m(t.top)+g,E=t.bottom;else if(a==="bottom")b=m(this.top),P=t.top,E=m(t.bottom)-g,w=b+g,k=this.top+d;else if(a==="left")b=m(this.right),y=this.right-d,S=b-g,C=m(t.left)+g,T=t.right;else if(a==="right")b=m(this.left),C=t.left,T=m(t.right)-g,y=b+g,S=this.left+d;else if(e==="x"){if(a==="center")b=m((t.top+t.bottom)/2+.5);else if(A(a)){const O=Object.keys(a)[0],B=a[O];b=m(this.chart.scales[O].getPixelForValue(B))}P=t.top,E=t.bottom,w=b+g,k=w+d}else if(e==="y"){if(a==="center")b=m((t.left+t.right)/2);else if(A(a)){const O=Object.keys(a)[0],B=a[O];b=m(this.chart.scales[O].getPixelForValue(B))}y=b-g,S=y-d,C=t.left,T=t.right}const tt=D(n.ticks.maxTicksLimit,c),et=Math.max(1,Math.ceil(c/tt));for(_=0;_<c;_+=et){const O=this.getContext(_),B=o.setContext(O),st=r.setContext(O),ht=B.lineWidth,K=B.color,Xt=st.dash||[],os=st.dashOffset,qt=B.tickWidth,ye=B.tickColor,ve=B.tickBorderDash||[],Me=B.tickBorderDashOffset;v=Sl(this,_,l),v!==void 0&&(x=At(i,v,ht),h?y=S=C=T=x:w=k=P=E=x,u.push({tx1:y,ty1:w,tx2:S,ty2:k,x1:C,y1:P,x2:T,y2:E,width:ht,color:K,borderDash:Xt,borderDashOffset:os,tickWidth:qt,tickColor:ye,tickBorderDash:ve,tickBorderDashOffset:Me}))}return this._ticksLength=c,this._borderValue=b,u}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:o}=i,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:h,padding:c,mirror:d}=o,u=fe(i.grid),f=u+c,p=d?-c:f,g=-at(this.labelRotation),m=[];let b,_,v,x,y,w,S,k,C,P,T,E,tt="middle";if(n==="top")w=this.bottom-p,S=this._getXAxisLabelAlignment();else if(n==="bottom")w=this.top+p,S=this._getXAxisLabelAlignment();else if(n==="left"){const O=this._getYAxisLabelAlignment(u);S=O.textAlign,y=O.x}else if(n==="right"){const O=this._getYAxisLabelAlignment(u);S=O.textAlign,y=O.x}else if(e==="x"){if(n==="center")w=(t.top+t.bottom)/2+f;else if(A(n)){const O=Object.keys(n)[0],B=n[O];w=this.chart.scales[O].getPixelForValue(B)+f}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")y=(t.left+t.right)/2-f;else if(A(n)){const O=Object.keys(n)[0],B=n[O];y=this.chart.scales[O].getPixelForValue(B)}S=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?tt="top":l==="end"&&(tt="bottom"));const et=this._getLabelSizes();for(b=0,_=r.length;b<_;++b){v=r[b],x=v.label;const O=o.setContext(this.getContext(b));k=this.getPixelForTick(b)+o.labelOffset,C=this._resolveTickFontOptions(b),P=C.lineHeight,T=F(x)?x.length:1;const B=T/2,st=O.color,ht=O.textStrokeColor,K=O.textStrokeWidth;let Xt=S;a?(y=k,S==="inner"&&(b===_-1?Xt=this.options.reverse?"left":"right":b===0?Xt=this.options.reverse?"right":"left":Xt="center"),n==="top"?h==="near"||g!==0?E=-T*P+P/2:h==="center"?E=-et.highest.height/2-B*P+P:E=-et.highest.height+P/2:h==="near"||g!==0?E=P/2:h==="center"?E=et.highest.height/2-B*P:E=et.highest.height-T*P,d&&(E*=-1),g!==0&&!O.showLabelBackdrop&&(y+=P/2*Math.sin(g))):(w=k,E=(1-T)*P/2);let os;if(O.showLabelBackdrop){const qt=X(O.backdropPadding),ye=et.heights[b],ve=et.widths[b];let Me=E-qt.top,Zs=0-qt.left;switch(tt){case"middle":Me-=ye/2;break;case"bottom":Me-=ye;break}switch(S){case"center":Zs-=ve/2;break;case"right":Zs-=ve;break}os={left:Zs,top:Me,width:ve+qt.width,height:ye+qt.height,color:O.backdropColor}}m.push({label:x,font:C,textOffset:E,options:{rotation:g,color:st,strokeColor:ht,strokeWidth:K,textAlign:Xt,textBaseline:tt,translation:[y,w],backdrop:os}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-at(this.labelRotation))return t==="top"?"left":"right";let i="center";return e.align==="start"?i="left":e.align==="end"?i="right":e.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=t+o,l=a.widest.width;let h,c;return e==="left"?n?(c=this.right+o,i==="near"?h="left":i==="center"?(h="center",c+=l/2):(h="right",c+=l)):(c=this.right-r,i==="near"?h="right":i==="center"?(h="center",c-=l/2):(h="left",c=this.left)):e==="right"?n?(c=this.left+o,i==="near"?h="right":i==="center"?(h="center",c-=l/2):(h="left",c-=l)):(c=this.left+r,i==="near"?h="left":i==="center"?(h="center",c+=l/2):(h="right",c=this.right)):h="right",{textAlign:h,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(n=>n.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,h,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(h.x,h.y),i.stroke(),i.restore())};if(e.display)for(o=0,a=n.length;o<a;++o){const l=n[o];e.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,o=i.setContext(this.getContext()),a=i.display?o.width:0;if(!a)return;const r=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let h,c,d,u;this.isHorizontal()?(h=At(t,this.left,a)-a/2,c=At(t,this.right,r)+r/2,d=u=l):(d=At(t,this.top,a)-a/2,u=At(t,this.bottom,r)+r/2,h=c=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(h,d),e.lineTo(c,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Le(e,i);const n=this.getLabelItems(t);for(const o of n){const a=o.options,r=o.font,l=o.label,h=o.textOffset;Tt(e,l,0,h,r,a)}i&&Ee(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const o=j(i.font),a=X(i.padding),r=i.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||A(e)?(l+=a.bottom,F(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:h,titleY:c,maxWidth:d,rotation:u}=Al(this,l,e,r);Tt(t,i.text,0,0,o,{color:i.color,maxWidth:d,rotation:u,textAlign:Ol(r,e,n),textBaseline:"middle",translation:[h,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=D(t.grid&&t.grid.z,-1),n=D(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Vt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o<a;++o){const r=e[o];r[i]===this.id&&(!t||r.type===t)&&n.push(r)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return j(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Xe{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;El(e)&&(i=this.register(e));const n=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Tl(t,a,i),this.override&&N.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in N[n]&&(delete N[n][i],this.override&&delete Ot[i])}}function Tl(s,t,e){const i=Gt(Object.create(null),[e?N.get(e):{},N.get(t),s.defaults]);N.set(t,i),s.defaultRoutes&&Ll(t,s.defaultRoutes),s.descriptors&&N.describe(t,s.descriptors)}function Ll(s,t){Object.keys(t).forEach(e=>{const i=e.split("."),n=i.pop(),o=[s].concat(i).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");N.route(o,n,l,r)})}function El(s){return"id"in s&&"defaults"in s}class Rl{constructor(){this.controllers=new Xe(rt,"datasets",!0),this.elements=new Xe(lt,"elements"),this.plugins=new Xe(Object,"plugins"),this.scales=new Xe(Vt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(n=>{const o=i||this._getRegistryForType(n);i||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):R(n,a=>{const r=i||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,i){const n=ds(t);I(i["before"+n],[],i),e[t](i),I(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var dt=new Rl;class Il{constructor(){this._init=[]}notify(t,e,i,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const a=o.plugin,r=a[i],l=[e,n,o.options];if(I(r,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){L(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=D(i.options&&i.options.plugins,{}),o=Fl(i);return n===!1&&!e?[]:Vl(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Fl(s){const t={},e=[],i=Object.keys(dt.plugins.items);for(let o=0;o<i.length;o++)e.push(dt.getPlugin(i[o]));const n=s.plugins||[];for(let o=0;o<n.length;o++){const a=n[o];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function zl(s,t){return!t&&s===!1?null:s===!0?{}:s}function Vl(s,{plugins:t,localIds:e},i,n){const o=[],a=s.getContext();for(const r of t){const l=r.id,h=zl(i[l],n);h!==null&&o.push({plugin:r,options:Bl(s.config,{plugin:r,local:e[l]},h,a)})}return o}function Bl(s,{plugin:t,local:e},i,n){const o=s.pluginScopeKeys(t),a=s.getOptionScopes(i,o);return e&&t.defaults&&a.push(t.defaults),s.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Rs(s,t){const e=N.datasets[s]||{};return((t.datasets||{})[s]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Wl(s,t){let e=s;return s==="_index_"?e=t:s==="_value_"&&(e=t==="x"?"y":"x"),e}function Nl(s,t){return s===t?"_index_":"_value_"}function kn(s){if(s==="x"||s==="y"||s==="r")return s}function Hl(s){if(s==="top"||s==="bottom")return"x";if(s==="left"||s==="right")return"y"}function Is(s,...t){if(kn(s))return s;for(const e of t){const i=e.axis||Hl(e.position)||s.length>1&&kn(s[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${s}' axis. Please provide 'axis' or 'position' option.`)}function Sn(s,t,e){if(e[t+"AxisID"]===s)return{axis:t}}function jl(s,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===s||i.yAxisID===s);if(e.length)return Sn(s,"x",e[0])||Sn(s,"y",e[0])}return{}}function $l(s,t){const e=Ot[s.type]||{scales:{}},i=t.scales||{},n=Rs(s.type,t),o=Object.create(null);return Object.keys(i).forEach(a=>{const r=i[a];if(!A(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Is(a,r,jl(a,s),N.scales[r.type]),h=Nl(l,n),c=e.scales||{};o[a]=Zt(Object.create(null),[{axis:l},r,c[l],c[h]])}),s.data.datasets.forEach(a=>{const r=a.type||s.type,l=a.indexAxis||Rs(r,t),h=(Ot[r]||{}).scales||{};Object.keys(h).forEach(c=>{const d=Wl(c,l),u=a[d+"AxisID"]||d;o[u]=o[u]||Object.create(null),Zt(o[u],[{axis:d},i[u],h[c]])})}),Object.keys(o).forEach(a=>{const r=o[a];Zt(r,[N.scales[r.type],N.scale])}),o}function Pn(s){const t=s.options||(s.options={});t.plugins=D(t.plugins,{}),t.scales=$l(s,t)}function Dn(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function Yl(s){return s=s||{},s.data=Dn(s.data),Pn(s),s}const Cn=new Map,On=new Set;function qe(s,t){let e=Cn.get(s);return e||(e=t(),Cn.set(s,e),On.add(e)),e}const ge=(s,t,e)=>{const i=Mt(t,e);i!==void 0&&s.add(i)};class Ul{constructor(t){this._config=Yl(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Dn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Pn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qe(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return qe(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return qe(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return qe(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,a=this._cachedScopes(t,i),r=a.get(e);if(r)return r;const l=new Set;e.forEach(c=>{t&&(l.add(t),c.forEach(d=>ge(l,t,d))),c.forEach(d=>ge(l,n,d)),c.forEach(d=>ge(l,Ot[o]||{},d)),c.forEach(d=>ge(l,N,d)),c.forEach(d=>ge(l,xs,d))});const h=Array.from(l);return h.length===0&&h.push(Object.create(null)),On.has(e)&&a.set(e,h),h}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ot[e]||{},N.datasets[e]||{},{type:e},N,xs]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=An(this._resolverCache,t,n);let l=a;if(ql(a,e)){o.$shared=!1,i=wt(i)?i():i;const h=this.createResolver(t,i,r);l=Ht(a,i,h)}for(const h of e)o[h]=l[h];return o}createResolver(t,e,i=[""],n){const{resolver:o}=An(this._resolverCache,t,i);return A(e)?Ht(o,e,void 0,n):o}}function An(s,t,e){let i=s.get(t);i||(i=new Map,s.set(t,i));const n=e.join();let o=i.get(n);return o||(o={resolver:Ms(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(n,o)),o}const Xl=s=>A(s)&&Object.getOwnPropertyNames(s).reduce((t,e)=>t||wt(s[e]),!1);function ql(s,t){const{isScriptable:e,isIndexable:i}=Ai(s);for(const n of t){const o=e(n),a=i(n),r=(a||o)&&s[n];if(o&&(wt(r)||Xl(r))||a&&F(r))return!0}return!1}var Kl="4.4.0";const Gl=["top","bottom","left","right","chartArea"];function Tn(s,t){return s==="top"||s==="bottom"||Gl.indexOf(s)===-1&&t==="x"}function Ln(s,t){return function(e,i){return e[s]===i[s]?e[t]-i[t]:e[s]-i[s]}}function En(s){const t=s.chart,e=t.options.animation;t.notifyPlugins("afterRender"),I(e&&e.onComplete,[s],t)}function Zl(s){const t=s.chart,e=t.options.animation;I(e&&e.onProgress,[s],t)}function Rn(s){return Vi()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}const Ke={},In=s=>{const t=Rn(s);return Object.values(Ke).filter(e=>e.canvas===t).pop()};function Jl(s,t,e){const i=Object.keys(s);for(const n of i){const o=+n;if(o>=t){const a=s[n];delete s[n],(e>0||o>t)&&(s[o+e]=a)}}}function Ql(s,t,e,i){return!e||s.type==="mouseout"?null:i?t:s}function Ge(s,t,e){return s.options.clip?s[e]:t[e]}function th(s,t){const{xScale:e,yScale:i}=s;return e&&i?{left:Ge(e,t,"left"),right:Ge(e,t,"right"),top:Ge(i,t,"top"),bottom:Ge(i,t,"bottom")}:t}class _t{static register(...t){dt.add(...t),Fn()}static unregister(...t){dt.remove(...t),Fn()}constructor(t,e){const i=this.config=new Ul(e),n=Rn(t),o=In(n);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.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||bl(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,a.aspectRatio),l=r&&r.canvas,h=l&&l.height,c=l&&l.width;if(this.id=sa(),this.ctx=r,this.canvas=l,this.width=c,this.height=h,this._options=a,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 Il,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=xa(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Ke[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}xt.listen(this,"complete",En),xt.listen(this,"progress",Zl),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return L(t)?e&&o?o:n?i/n: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 dt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Bi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Di(this.canvas,this.ctx),this}stop(){return xt.stop(this),this}resize(t,e){xt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Bi(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),I(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};R(t,(e,i)=>{e.id=i})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=Is(a,r),h=l==="r",c=l==="x";return{options:r,dposition:h?"chartArea":c?"bottom":"left",dtype:h?"radialLinear":c?"category":"linear"}}))),R(o,a=>{const r=a.options,l=r.id,h=Is(l,r),c=D(r.type,a.dtype);(r.position===void 0||Tn(r.position,h)!==Tn(a.dposition))&&(r.position=a.dposition),n[l]=!0;let d=null;if(l in i&&i[l].type===c)d=i[l];else{const u=dt.getScale(c);d=new u({id:l,type:c,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(r,t)}),R(n,(a,r)=>{a||delete i[r]}),R(i,a=>{q.configure(this,a,a.options),q.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,o)=>n.index-o.index),i>e){for(let n=e;n<i;++n)this._destroyDatasetMeta(n);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Ln("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const o=e[i];let a=this.getDatasetMeta(i);const r=o.type||this.config.type;if(a.type&&a.type!==r&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=r,a.indexAxis=o.indexAxis||Rs(r,this.options),a.order=o.order||0,a.index=i,a.label=""+o.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const l=dt.getController(r),{datasetElementType:h,dataElementType:c}=N.datasets[r];Object.assign(l,{dataElementType:dt.getElement(c),datasetElementType:h&&dt.getElement(h)}),a.controller=new l(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){R(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let h=0,c=this.data.datasets.length;h<c;h++){const{controller:d}=this.getDatasetMeta(h),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),n||R(o,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ln("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){R(this.scales,t=>{q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!hi(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:o}of e){const a=i==="_removeElements"?-o:o;Jl(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=i(0);for(let o=1;o<e;o++)if(!hi(n,i(o)))return;return Array.from(n).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;q.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],R(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,wt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(xt.has(this)?this.attached&&!xt.running(this)&&xt.start(this):(this.draw(),En({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:n}=this._resizeBeforeDraw;this._resize(i,n),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const 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){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const a=e[n];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,o=th(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&Le(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&Ee(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return bt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=Gr.modes[e];return typeof o=="function"?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(o=>o&&o._dataset===e).pop();return n||(n={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},i.push(n)),n}getContext(){return this.$context||(this.$context=St(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);Jt(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(o,{visible:i}),this.update(r=>r.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),xt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Di(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ke[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};R(this.options.events,o=>i(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,h)=>{e.addEventListener(this,l,h),t[l]=h},n=(l,h)=>{t[l]&&(e.removeEventListener(this,l,h),delete t[l])},o=(l,h)=>{this.canvas&&this.resize(l,h)};let a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",o),i("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){R(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},R(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,l=t.length;r<l;++r){a=t[r];const h=a&&this.getDatasetMeta(a.datasetIndex).controller;h&&h[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:n,index:o})=>{const a=this.getDatasetMeta(n);if(!a)throw new Error("No dataset found at index "+n);return{datasetIndex:n,element:a.data[o],index:o}});!Pe(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(l,h)=>l.filter(c=>!h.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),a=o(e,t),r=i?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,i,a),l=la(t),h=Ql(t,this._lastEvent,i,l);i&&(this._lastEvent=null,I(o.onHover,[t,r,this],this),l&&I(o.onClick,[t,r,this],this));const c=!Pe(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=h,c}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}M(_t,"defaults",N),M(_t,"instances",Ke),M(_t,"overrides",Ot),M(_t,"registry",dt),M(_t,"version",Kl),M(_t,"getChart",In);function Fn(){return R(_t.instances,s=>s._plugins.invalidate())}function eh(s,t,e){const{startAngle:i,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=t;let h=n/r;s.beginPath(),s.arc(o,a,r,i-h,e+h),l>n?(h=n/l,s.arc(o,a,l,e+h,i-h,!0)):s.arc(o,a,n,e+H,i-H),s.closePath(),s.clip()}function sh(s){return vs(s,["outerStart","outerEnd","innerStart","innerEnd"])}function ih(s,t,e,i){const n=sh(s.options.borderRadius),o=(e-t)/2,a=Math.min(o,i*t/2),r=l=>{const h=(e-Math.min(o,l))*i/2;return $(l,0,Math.min(o,h))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:$(n.innerStart,0,a),innerEnd:$(n.innerEnd,0,a)}}function Yt(s,t,e,i){return{x:e+s*Math.cos(t),y:i+s*Math.sin(t)}}function Ze(s,t,e,i,n,o){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=t,d=Math.max(t.outerRadius+i+e-h,0),u=c>0?c+i+e+h:0;let f=0;const p=n-l;if(i){const O=c>0?c-i:0,B=d>0?d-i:0,st=(O+B)/2,ht=st!==0?p*st/(st+i):p;f=(p-ht)/2}const g=Math.max(.001,p*d-e/z)/d,m=(p-g)/2,b=l+m+f,_=n-m-f,{outerStart:v,outerEnd:x,innerStart:y,innerEnd:w}=ih(t,u,d,_-b),S=d-v,k=d-x,C=b+v/S,P=_-x/k,T=u+y,E=u+w,tt=b+y/T,et=_-w/E;if(s.beginPath(),o){const O=(C+P)/2;if(s.arc(a,r,d,C,O),s.arc(a,r,d,O,P),x>0){const K=Yt(k,P,a,r);s.arc(K.x,K.y,x,P,_+H)}const B=Yt(E,_,a,r);if(s.lineTo(B.x,B.y),w>0){const K=Yt(E,et,a,r);s.arc(K.x,K.y,w,_+H,et+Math.PI)}const st=(_-w/u+(b+y/u))/2;if(s.arc(a,r,u,_-w/u,st,!0),s.arc(a,r,u,st,b+y/u,!0),y>0){const K=Yt(T,tt,a,r);s.arc(K.x,K.y,y,tt+Math.PI,b-H)}const ht=Yt(S,b,a,r);if(s.lineTo(ht.x,ht.y),v>0){const K=Yt(S,C,a,r);s.arc(K.x,K.y,v,b-H,C)}}else{s.moveTo(a,r);const O=Math.cos(C)*d+a,B=Math.sin(C)*d+r;s.lineTo(O,B);const st=Math.cos(P)*d+a,ht=Math.sin(P)*d+r;s.lineTo(st,ht)}s.closePath()}function nh(s,t,e,i,n){const{fullCircles:o,startAngle:a,circumference:r}=t;let l=t.endAngle;if(o){Ze(s,t,e,i,l,n);for(let h=0;h<o;++h)s.fill();isNaN(r)||(l=a+(r%V||V))}return Ze(s,t,e,i,l,n),s.fill(),l}function oh(s,t,e,i,n){const{fullCircles:o,startAngle:a,circumference:r,options:l}=t,{borderWidth:h,borderJoinStyle:c,borderDash:d,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!h)return;s.setLineDash(d||[]),s.lineDashOffset=u,f?(s.lineWidth=h*2,s.lineJoin=c||"round"):(s.lineWidth=h,s.lineJoin=c||"bevel");let p=t.endAngle;if(o){Ze(s,t,e,i,p,n);for(let g=0;g<o;++g)s.stroke();isNaN(r)||(p=a+(r%V||V))}f&&eh(s,t,p),o||(Ze(s,t,e,i,p,n),s.stroke())}class pe extends lt{constructor(e){super();M(this,"circumference");M(this,"endAngle");M(this,"fullCircles");M(this,"innerRadius");M(this,"outerRadius");M(this,"pixelMargin");M(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,n){const o=this.getProps(["x","y"],n),{angle:a,distance:r}=gi(o,{x:e,y:i}),{startAngle:l,endAngle:h,innerRadius:c,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),f=(this.options.spacing+this.options.borderWidth)/2,p=D(u,h-l)>=V||te(a,l,h),g=pt(r,c+f,d+f);return p&&g}getCenterPoint(e){const{x:i,y:n,startAngle:o,endAngle:a,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:h,spacing:c}=this.options,d=(o+a)/2,u=(r+l+c+h)/2;return{x:i+Math.cos(d)*u,y:n+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:n}=this,o=(i.offset||0)/4,a=(i.spacing||0)/2,r=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=n>V?Math.floor(n/V):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const h=1-Math.sin(Math.min(z,n||0)),c=o*h;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,nh(e,this,c,a,r),oh(e,this,c,a,r),e.restore()}}M(pe,"id","arc"),M(pe,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),M(pe,"defaultRoutes",{backgroundColor:"backgroundColor"}),M(pe,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function zn(s,t,e=t){s.lineCap=D(e.borderCapStyle,t.borderCapStyle),s.setLineDash(D(e.borderDash,t.borderDash)),s.lineDashOffset=D(e.borderDashOffset,t.borderDashOffset),s.lineJoin=D(e.borderJoinStyle,t.borderJoinStyle),s.lineWidth=D(e.borderWidth,t.borderWidth),s.strokeStyle=D(e.borderColor,t.borderColor)}function ah(s,t,e){s.lineTo(e.x,e.y)}function rh(s){return s.stepped?Aa:s.tension||s.cubicInterpolationMode==="monotone"?Ta:ah}function Vn(s,t,e={}){const i=s.length,{start:n=0,end:o=i-1}=e,{start:a,end:r}=t,l=Math.max(n,a),h=Math.min(o,r),c=n<a&&o<a||n>r&&o>r;return{count:i,start:l,loop:t.loop,ilen:h<l&&!c?i+h-l:h-l}}function lh(s,t,e,i){const{points:n,options:o}=t,{count:a,start:r,loop:l,ilen:h}=Vn(n,e,i),c=rh(o);let{move:d=!0,reverse:u}=i||{},f,p,g;for(f=0;f<=h;++f)p=n[(r+(u?h-f:f))%a],!p.skip&&(d?(s.moveTo(p.x,p.y),d=!1):c(s,g,p,u,o.stepped),g=p);return l&&(p=n[(r+(u?h:0))%a],c(s,g,p,u,o.stepped)),!!l}function hh(s,t,e,i){const n=t.points,{count:o,start:a,ilen:r}=Vn(n,e,i),{move:l=!0,reverse:h}=i||{};let c=0,d=0,u,f,p,g,m,b;const _=x=>(a+(h?r-x:x))%o,v=()=>{g!==m&&(s.lineTo(c,m),s.lineTo(c,g),s.lineTo(c,b))};for(l&&(f=n[_(0)],s.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[_(u)],f.skip)continue;const x=f.x,y=f.y,w=x|0;w===p?(y<g?g=y:y>m&&(m=y),c=(d*c+x)/++d):(v(),s.lineTo(x,y),p=w,d=0,g=m=y),b=y}v()}function Fs(s){const t=s.options,e=t.borderDash&&t.borderDash.length;return!s._decimated&&!s._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?hh:lh}function ch(s){return s.stepped?hr:s.tension||s.cubicInterpolationMode==="monotone"?cr:It}function dh(s,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),zn(s,t.options),s.stroke(n)}function uh(s,t,e,i){const{segments:n,options:o}=t,a=Fs(t);for(const r of n)zn(s,o,r.style),s.beginPath(),a(s,t,r,{start:e,end:e+i-1})&&s.closePath(),s.stroke()}const fh=typeof Path2D=="function";function gh(s,t,e,i){fh&&!t.options.segment?dh(s,t,e,i):uh(s,t,e,i)}class Pt extends lt{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){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;er(this._points,i,t,n,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=mr(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],o=this.points,a=Ui(this,{property:e,start:n,end:n});if(!a.length)return;const r=[],l=ch(i);let h,c;for(h=0,c=a.length;h<c;++h){const{start:d,end:u}=a[h],f=o[d],p=o[u];if(f===p){r.push(f);continue}const g=Math.abs((n-f[e])/(p[e]-f[e])),m=l(f,p,g,i.stepped);m[e]=t[e],r.push(m)}return r.length===1?r[0]:r}pathSegment(t,e,i){return Fs(this)(t,this,e,i)}path(t,e,i){const n=this.segments,o=Fs(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const r of n)a&=o(t,this,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),gh(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}M(Pt,"id","line"),M(Pt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),M(Pt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),M(Pt,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Bn(s,t,e,i){const n=s.options,{[e]:o}=s.getProps([e],i);return Math.abs(t-o)<n.radius+n.hitRadius}class Je extends lt{constructor(e){super();M(this,"parsed");M(this,"skip");M(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,n){const o=this.options,{x:a,y:r}=this.getProps(["x","y"],n);return Math.pow(e-a,2)+Math.pow(i-r,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return Bn(this,e,"x",i)}inYRange(e,i){return Bn(this,e,"y",i)}getCenterPoint(e){const{x:i,y:n}=this.getProps(["x","y"],e);return{x:i,y:n}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const n=i&&e.borderWidth||0;return(i+n)*2}draw(e,i){const n=this.options;this.skip||n.radius<.1||!bt(this,i,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,ys(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}M(Je,"id","point"),M(Je,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),M(Je,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Wn(s,t){const{x:e,y:i,base:n,width:o,height:a}=s.getProps(["x","y","base","width","height"],t);let r,l,h,c,d;return s.horizontal?(d=a/2,r=Math.min(e,n),l=Math.max(e,n),h=i-d,c=i+d):(d=o/2,r=e-d,l=e+d,h=Math.min(i,n),c=Math.max(i,n)),{left:r,top:h,right:l,bottom:c}}function Dt(s,t,e,i){return s?0:$(t,e,i)}function ph(s,t,e){const i=s.options.borderWidth,n=s.borderSkipped,o=Oi(i);return{t:Dt(n.top,o.top,0,e),r:Dt(n.right,o.right,0,t),b:Dt(n.bottom,o.bottom,0,e),l:Dt(n.left,o.left,0,t)}}function mh(s,t,e){const{enableBorderRadius:i}=s.getProps(["enableBorderRadius"]),n=s.options.borderRadius,o=Lt(n),a=Math.min(t,e),r=s.borderSkipped,l=i||A(n);return{topLeft:Dt(!l||r.top||r.left,o.topLeft,0,a),topRight:Dt(!l||r.top||r.right,o.topRight,0,a),bottomLeft:Dt(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:Dt(!l||r.bottom||r.right,o.bottomRight,0,a)}}function bh(s){const t=Wn(s),e=t.right-t.left,i=t.bottom-t.top,n=ph(s,e/2,i/2),o=mh(s,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:i-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function zs(s,t,e,i){const n=t===null,o=e===null,a=s&&!(n&&o)&&Wn(s,i);return a&&(n||pt(t,a.left,a.right))&&(o||pt(e,a.top,a.bottom))}function xh(s){return s.topLeft||s.topRight||s.bottomLeft||s.bottomRight}function _h(s,t){s.rect(t.x,t.y,t.w,t.h)}function Vs(s,t,e={}){const i=s.x!==e.x?-t:0,n=s.y!==e.y?-t:0,o=(s.x+s.w!==e.x+e.w?t:0)-i,a=(s.y+s.h!==e.y+e.h?t:0)-n;return{x:s.x+i,y:s.y+n,w:s.w+o,h:s.h+a,radius:s.radius}}class Qe extends lt{constructor(t){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,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:o,outer:a}=bh(this),r=xh(a.radius)?ne:_h;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,Vs(a,e,o)),t.clip(),r(t,Vs(o,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Vs(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return zs(this,t,e,i)}inXRange(t,e){return zs(this,t,null,e)}inYRange(t,e){return zs(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}M(Qe,"id","bar"),M(Qe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),M(Qe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var yh=Object.freeze({__proto__:null,ArcElement:pe,BarElement:Qe,LineElement:Pt,PointElement:Je});const Bs=["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)"],Nn=Bs.map(s=>s.replace("rgb(","rgba(").replace(")",", 0.5)"));function Hn(s){return Bs[s%Bs.length]}function jn(s){return Nn[s%Nn.length]}function vh(s,t){return s.borderColor=Hn(t),s.backgroundColor=jn(t),++t}function Mh(s,t){return s.backgroundColor=s.data.map(()=>Hn(t++)),t}function wh(s,t){return s.backgroundColor=s.data.map(()=>jn(t++)),t}function kh(s){let t=0;return(e,i)=>{const n=s.getDatasetMeta(i).controller;n instanceof Ft?t=Mh(e,t):n instanceof re?t=wh(e,t):n&&(t=vh(e,t))}}function $n(s){let t;for(t in s)if(s[t].borderColor||s[t].backgroundColor)return!0;return!1}function Sh(s){return s&&(s.borderColor||s.backgroundColor)}var Ph={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(s,t,e){if(!e.enabled)return;const{data:{datasets:i},options:n}=s.config,{elements:o}=n;if(!e.forceOverride&&($n(i)||Sh(n)||o&&$n(o)))return;const a=kh(s);i.forEach(a)}};function Dh(s,t,e,i,n){const o=n.samples||i;if(o>=e)return s.slice(t,t+e);const a=[],r=(e-2)/(o-2);let l=0;const h=t+e-1;let c=t,d,u,f,p,g;for(a[l++]=s[c],d=0;d<o-2;d++){let m=0,b=0,_;const v=Math.floor((d+1)*r)+1+t,x=Math.min(Math.floor((d+2)*r)+1,e)+t,y=x-v;for(_=v;_<x;_++)m+=s[_].x,b+=s[_].y;m/=y,b/=y;const w=Math.floor(d*r)+1+t,S=Math.min(Math.floor((d+1)*r)+1,e)+t,{x:k,y:C}=s[c];for(f=p=-1,_=w;_<S;_++)p=.5*Math.abs((k-m)*(s[_].y-C)-(k-s[_].x)*(b-C)),p>f&&(f=p,u=s[_],g=_);a[l++]=u,c=g}return a[l++]=s[h],a}function Ch(s,t,e,i){let n=0,o=0,a,r,l,h,c,d,u,f,p,g;const m=[],b=t+e-1,_=s[t].x,v=s[b].x-_;for(a=t;a<t+e;++a){r=s[a],l=(r.x-_)/v*i,h=r.y;const x=l|0;if(x===c)h<p?(p=h,d=a):h>g&&(g=h,u=a),n=(o*n+r.x)/++o;else{const y=a-1;if(!L(d)&&!L(u)){const w=Math.min(d,u),S=Math.max(d,u);w!==f&&w!==y&&m.push({...s[w],x:n}),S!==f&&S!==y&&m.push({...s[S],x:n})}a>0&&y!==f&&m.push(s[y]),m.push(r),c=x,o=0,p=g=h,d=u=f=a}}return m}function Yn(s){if(s._decimated){const t=s._data;delete s._decimated,delete s._data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Un(s){s.data.datasets.forEach(t=>{Yn(t)})}function Oh(s,t){const e=t.length;let i=0,n;const{iScale:o}=s,{min:a,max:r,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(i=$(mt(t,o.axis,a).lo,0,e-1)),h?n=$(mt(t,o.axis,r).hi+1,i,e)-i:n=e-i,{start:i,count:n}}var Ah={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(s,t,e)=>{if(!e.enabled){Un(s);return}const i=s.width;s.data.datasets.forEach((n,o)=>{const{_data:a,indexAxis:r}=n,l=s.getDatasetMeta(o),h=a||n.data;if(oe([r,s.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const c=s.scales[l.xAxisID];if(c.type!=="linear"&&c.type!=="time"||s.options.parsing)return;let{start:d,count:u}=Oh(l,h);const f=e.threshold||4*i;if(u<=f){Yn(n);return}L(a)&&(n._data=h,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(e.algorithm){case"lttb":p=Dh(h,d,u,i,e);break;case"min-max":p=Ch(h,d,u,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=p})},destroy(s){Un(s)}};function Th(s,t,e){const i=s.segments,n=s.points,o=t.points,a=[];for(const r of i){let{start:l,end:h}=r;h=Ns(l,h,n);const c=Ws(e,n[l],n[h],r.loop);if(!t.segments){a.push({source:r,target:c,start:n[l],end:n[h]});continue}const d=Ui(t,c);for(const u of d){const f=Ws(e,o[u.start],o[u.end],u.loop),p=Yi(r,n,f);for(const g of p)a.push({source:g,target:u,start:{[e]:Xn(c,f,"start",Math.max)},end:{[e]:Xn(c,f,"end",Math.min)}})}}return a}function Ws(s,t,e,i){if(i)return;let n=t[s],o=e[s];return s==="angle"&&(n=Q(n),o=Q(o)),{property:s,start:n,end:o}}function Lh(s,t){const{x:e=null,y:i=null}=s||{},n=t.points,o=[];return t.segments.forEach(({start:a,end:r})=>{r=Ns(a,r,n);const l=n[a],h=n[r];i!==null?(o.push({x:l.x,y:i}),o.push({x:h.x,y:i})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:h.y}))}),o}function Ns(s,t,e){for(;t>s;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Xn(s,t,e,i){return s&&t?i(s[e],t[e]):s?s[e]:t?t[e]:0}function qn(s,t){let e=[],i=!1;return F(s)?(i=!0,e=s):e=Lh(s,t),e.length?new Pt({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Kn(s){return s&&s.fill!==!1}function Eh(s,t,e){let i=s[t].fill;const n=[t];let o;if(!e)return i;for(;i!==!1&&n.indexOf(i)===-1;){if(!W(i))return i;if(o=s[i],!o)return!1;if(o.visible)return i;n.push(i),i=o.fill}return!1}function Rh(s,t,e){const i=Vh(s);if(A(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return W(n)&&Math.floor(n)===n?Ih(i[0],t,n,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Ih(s,t,e,i){return(s==="-"||s==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function Fh(s,t){let e=null;return s==="start"?e=t.bottom:s==="end"?e=t.top:A(s)?e=t.getPixelForValue(s.value):t.getBasePixel&&(e=t.getBasePixel()),e}function zh(s,t,e){let i;return s==="start"?i=e:s==="end"?i=t.options.reverse?t.min:t.max:A(s)?i=s.value:i=t.getBaseValue(),i}function Vh(s){const t=s.options,e=t.fill;let i=D(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Bh(s){const{scale:t,index:e,line:i}=s,n=[],o=i.segments,a=i.points,r=Wh(t,e);r.push(qn({x:null,y:t.bottom},i));for(let l=0;l<o.length;l++){const h=o[l];for(let c=h.start;c<=h.end;c++)Nh(n,a[c],r)}return new Pt({points:n,options:{}})}function Wh(s,t){const e=[],i=s.getMatchingVisibleMetas("line");for(let n=0;n<i.length;n++){const o=i[n];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Nh(s,t,e){const i=[];for(let n=0;n<e.length;n++){const o=e[n],{first:a,last:r,point:l}=Hh(o,t,"x");if(!(!l||a&&r)){if(a)i.unshift(l);else if(s.push(l),!r)break}}s.push(...i)}function Hh(s,t,e){const i=s.interpolate(t,e);if(!i)return{};const n=i[e],o=s.segments,a=s.points;let r=!1,l=!1;for(let h=0;h<o.length;h++){const c=o[h],d=a[c.start][e],u=a[c.end][e];if(pt(n,d,u)){r=n===d,l=n===u;break}}return{first:r,last:l,point:i}}class Gn{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:a}=this;return e=e||{start:0,end:V},t.arc(n,o,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function jh(s){const{chart:t,fill:e,line:i}=s;if(W(e))return $h(t,e);if(e==="stack")return Bh(s);if(e==="shape")return!0;const n=Yh(s);return n instanceof Gn?n:qn(n,i)}function $h(s,t){const e=s.getDatasetMeta(t);return e&&s.isDatasetVisible(t)?e.dataset:null}function Yh(s){return(s.scale||{}).getPointPositionForValue?Xh(s):Uh(s)}function Uh(s){const{scale:t={},fill:e}=s,i=Fh(e,t);if(W(i)){const n=t.isHorizontal();return{x:n?i:null,y:n?null:i}}return null}function Xh(s){const{scale:t,fill:e}=s,i=t.options,n=t.getLabels().length,o=i.reverse?t.max:t.min,a=zh(e,t,o),r=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,o);return new Gn({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<n;++l)r.push(t.getPointPositionForValue(l,a));return r}function Hs(s,t,e){const i=jh(t),{line:n,scale:o,axis:a}=t,r=n.options,l=r.fill,h=r.backgroundColor,{above:c=h,below:d=h}=l||{};i&&n.points.length&&(Le(s,e),qh(s,{line:n,target:i,above:c,below:d,area:e,scale:o,axis:a}),Ee(s))}function qh(s,t){const{line:e,target:i,above:n,below:o,area:a,scale:r}=t,l=e._loop?"angle":t.axis;s.save(),l==="x"&&o!==n&&(Zn(s,i,a.top),Jn(s,{line:e,target:i,color:n,scale:r,property:l}),s.restore(),s.save(),Zn(s,i,a.bottom)),Jn(s,{line:e,target:i,color:o,scale:r,property:l}),s.restore()}function Zn(s,t,e){const{segments:i,points:n}=t;let o=!0,a=!1;s.beginPath();for(const r of i){const{start:l,end:h}=r,c=n[l],d=n[Ns(l,h,n)];o?(s.moveTo(c.x,c.y),o=!1):(s.lineTo(c.x,e),s.lineTo(c.x,c.y)),a=!!t.pathSegment(s,r,{move:a}),a?s.closePath():s.lineTo(d.x,e)}s.lineTo(t.first().x,e),s.closePath(),s.clip()}function Jn(s,t){const{line:e,target:i,property:n,color:o,scale:a}=t,r=Th(e,i,n);for(const{source:l,target:h,start:c,end:d}of r){const{style:{backgroundColor:u=o}={}}=l,f=i!==!0;s.save(),s.fillStyle=u,Kh(s,a,f&&Ws(n,c,d)),s.beginPath();const p=!!e.pathSegment(s,l);let g;if(f){p?s.closePath():Qn(s,i,d,n);const m=!!i.pathSegment(s,h,{move:p,reverse:!0});g=p&&m,g||Qn(s,i,c,n)}s.closePath(),s.fill(g?"evenodd":"nonzero"),s.restore()}}function Kh(s,t,e){const{top:i,bottom:n}=t.chart.chartArea,{property:o,start:a,end:r}=e||{};o==="x"&&(s.beginPath(),s.rect(a,i,r-a,n-i),s.clip())}function Qn(s,t,e,i){const n=t.interpolate(e,i);n&&s.lineTo(n.x,n.y)}var Gh={id:"filler",afterDatasetsUpdate(s,t,e){const i=(s.data.datasets||[]).length,n=[];let o,a,r,l;for(a=0;a<i;++a)o=s.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof Pt&&(l={visible:s.isDatasetVisible(a),index:a,fill:Rh(r,a,i),chart:s,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,n.push(l);for(a=0;a<i;++a)l=n[a],!(!l||l.fill===!1)&&(l.fill=Eh(n,a,e.propagate))},beforeDraw(s,t,e){const i=e.drawTime==="beforeDraw",n=s.getSortedVisibleDatasetMetas(),o=s.chartArea;for(let a=n.length-1;a>=0;--a){const r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),i&&r.fill&&Hs(s.ctx,r,o))}},beforeDatasetsDraw(s,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=s.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const o=i[n].$filler;Kn(o)&&Hs(s.ctx,o,s.chartArea)}},beforeDatasetDraw(s,t,e){const i=t.meta.$filler;!Kn(i)||e.drawTime!=="beforeDatasetDraw"||Hs(s.ctx,i,s.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const to=(s,t)=>{let{boxHeight:e=t,boxWidth:i=t}=s;return s.usePointStyle&&(e=Math.min(e,t),i=s.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},Zh=(s,t)=>s!==null&&t!==null&&s.datasetIndex===t.datasetIndex&&s.index===t.index;class eo extends lt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=I(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,n)=>t.sort(i,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,n=j(i.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=to(i,o);let h,c;e.font=n.string,this.isHorizontal()?(h=this.maxWidth,c=this._fitRows(a,o,r,l)+10):(c=this.maxHeight,h=this._fitCols(a,n,r,l)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],h=this.lineWidths=[0],c=n+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-c;return this.legendItems.forEach((p,g)=>{const m=i+e/2+o.measureText(p.text).width;(g===0||h[h.length-1]+m+2*r>a)&&(d+=c,h[h.length-(g>0?0:1)]=0,f+=c,u++),l[g]={left:0,top:f,row:u,width:m,height:n},h[h.length-1]+=m+r}),d}_fitCols(t,e,i,n){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],h=this.columnSizes=[],c=a-t;let d=r,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:_,itemHeight:v}=Jh(i,e,o,m,n);b>0&&f+v+2*r>c&&(d+=u+r,h.push({width:u,height:f}),p+=u+r,g++,u=f=0),l[b]={left:p,top:f,col:g,width:_,height:v},u=Math.max(u,_),f+=v+r}),d+=u,h.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,a=$t(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=U(i,this.left+n,this.right-this.lineWidths[r]);for(const h of e)r!==h.row&&(r=h.row,l=U(i,this.left+n,this.right-this.lineWidths[r])),h.top+=this.top+t+n,h.left=a.leftForLtr(a.x(l),h.width),l+=h.width+n}else{let r=0,l=U(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const h of e)h.col!==r&&(r=h.col,l=U(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),h.top=l,h.left+=this.left+n,h.left=a.leftForLtr(a.x(h.left),h.width),l+=h.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Le(t,this),this._draw(),Ee(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:a}=t,r=N.color,l=$t(t.rtl,this.left,this.width),h=j(a.font),{padding:c}=a,d=h.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=h.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=to(a,d),b=function(w,S,k){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const C=D(k.lineWidth,1);if(n.fillStyle=D(k.fillStyle,r),n.lineCap=D(k.lineCap,"butt"),n.lineDashOffset=D(k.lineDashOffset,0),n.lineJoin=D(k.lineJoin,"miter"),n.lineWidth=C,n.strokeStyle=D(k.strokeStyle,r),n.setLineDash(D(k.lineDash,[])),a.usePointStyle){const P={radius:g*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:C},T=l.xPlus(w,p/2),E=S+u;Ci(n,P,T,E,a.pointStyleWidth&&p)}else{const P=S+Math.max((d-g)/2,0),T=l.leftForLtr(w,p),E=Lt(k.borderRadius);n.beginPath(),Object.values(E).some(tt=>tt!==0)?ne(n,{x:T,y:P,w:p,h:g,radius:E}):n.rect(T,P,p,g),n.fill(),C!==0&&n.stroke()}n.restore()},_=function(w,S,k){Tt(n,k.text,w,S+m/2,h,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},v=this.isHorizontal(),x=this._computeTitleHeight();v?f={x:U(o,this.left+c,this.right-i[0]),y:this.top+c+x,line:0}:f={x:this.left+c,y:U(o,this.top+x+c,this.bottom-e[0].height),line:0},Ni(this.ctx,t.textDirection);const y=m+c;this.legendItems.forEach((w,S)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const k=n.measureText(w.text).width,C=l.textAlign(w.textAlign||(w.textAlign=a.textAlign)),P=p+u+k;let T=f.x,E=f.y;l.setWidth(this.width),v?S>0&&T+P+c>this.right&&(E=f.y+=y,f.line++,T=f.x=U(o,this.left+c,this.right-i[f.line])):S>0&&E+y>this.bottom&&(T=f.x=T+e[f.line].width+c,f.line++,E=f.y=U(o,this.top+x+c,this.bottom-e[f.line].height));const tt=l.x(T);if(b(tt,E,w),T=_a(C,T+p+u,v?T+P:this.right,t.rtl),_(l.x(T),E,w),v)f.x+=P+c;else if(typeof w.text!="string"){const et=h.lineHeight;f.y+=so(w,et)+c}else f.y+=y}),Hi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=j(e.font),n=X(e.padding);if(!e.display)return;const o=$t(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=i.size/2,h=n.top+l;let c,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+h,d=U(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);c=h+U(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=U(r,d,d+u);a.textAlign=o.textAlign(ps(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,Tt(a,e.text,f,c,i)}_computeTitleHeight(){const t=this.options.title,e=j(t.font),i=X(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if(pt(t,this.left,this.right)&&pt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(n=o[i],pt(t,n.left,n.left+n.width)&&pt(e,n.top,n.top+n.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!ec(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=Zh(n,i);n&&!o&&I(e.onLeave,[t,n,this],this),this._hoveredItem=i,i&&!o&&I(e.onHover,[t,i,this],this)}else i&&I(e.onClick,[t,i,this],this)}}function Jh(s,t,e,i,n){const o=Qh(i,s,t,e),a=tc(n,i,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Qh(s,t,e,i){let n=s.text;return n&&typeof n!="string"&&(n=n.reduce((o,a)=>o.length>a.length?o:a)),t+e.size/2+i.measureText(n).width}function tc(s,t,e){let i=s;return typeof t.text!="string"&&(i=so(t,e)),i}function so(s,t){const e=s.text?s.text.length:0;return t*e}function ec(s,t){return!!((s==="mousemove"||s==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(s==="click"||s==="mouseup"))}var sc={id:"legend",_element:eo,start(s,t,e){const i=s.legend=new eo({ctx:s.ctx,options:e,chart:s});q.configure(s,i,e),q.addBox(s,i)},stop(s){q.removeBox(s,s.legend),delete s.legend},beforeUpdate(s,t,e){const i=s.legend;q.configure(s,i,e),i.options=e},afterUpdate(s){const t=s.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(s,t){t.replay||s.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(s,t,e){const i=t.datasetIndex,n=e.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:s=>s.chart.options.color,boxWidth:40,padding:10,generateLabels(s){const t=s.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=s.legend.options;return s._getSortedDatasetMetas().map(l=>{const h=l.controller.getStyle(e?0:void 0),c=X(h.borderWidth);return{text:t[l.index].label,fillStyle:h.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:h.borderColor,pointStyle:i||h.pointStyle,rotation:h.rotation,textAlign:n||h.textAlign,borderRadius:a&&(r||h.borderRadius),datasetIndex:l.index}},this)}},title:{color:s=>s.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:s=>!s.startsWith("on"),labels:{_scriptable:s=>!["generateLabels","filter","sort"].includes(s)}}};class js extends lt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=F(i.text)?i.text.length:1;this._padding=X(i.padding);const o=n*j(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:n,right:o,options:a}=this,r=a.align;let l=0,h,c,d;return this.isHorizontal()?(c=U(r,i,o),d=e+t,h=o-i):(a.position==="left"?(c=i+t,d=U(r,n,e),l=z*-.5):(c=o-t,d=U(r,e,n),l=z*.5),h=n-e),{titleX:c,titleY:d,maxWidth:h,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=j(e.font),n=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:r,rotation:l}=this._drawArgs(n);Tt(t,e.text,0,0,i,{color:e.color,maxWidth:r,rotation:l,textAlign:ps(e.align),textBaseline:"middle",translation:[o,a]})}}function ic(s,t){const e=new js({ctx:s.ctx,options:t,chart:s});q.configure(s,e,t),q.addBox(s,e),s.titleBlock=e}var nc={id:"title",_element:js,start(s,t,e){ic(s,e)},stop(s){const t=s.titleBlock;q.removeBox(s,t),delete s.titleBlock},beforeUpdate(s,t,e){const i=s.titleBlock;q.configure(s,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ts=new WeakMap;var oc={id:"subtitle",start(s,t,e){const i=new js({ctx:s.ctx,options:e,chart:s});q.configure(s,i,e),q.addBox(s,i),ts.set(s,i)},stop(s){q.removeBox(s,ts.get(s)),ts.delete(s)},beforeUpdate(s,t,e){const i=ts.get(s);q.configure(s,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const me={average(s){if(!s.length)return!1;let t,e,i=0,n=0,o=0;for(t=0,e=s.length;t<e;++t){const a=s[t].element;if(a&&a.hasValue()){const r=a.tooltipPosition();i+=r.x,n+=r.y,++o}}return{x:i/o,y:n/o}},nearest(s,t){if(!s.length)return!1;let e=t.x,i=t.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=s.length;o<a;++o){const l=s[o].element;if(l&&l.hasValue()){const h=l.getCenterPoint(),c=fs(t,h);c<n&&(n=c,r=l)}}if(r){const l=r.tooltipPosition();e=l.x,i=l.y}return{x:e,y:i}}};function ut(s,t){return t&&(F(t)?Array.prototype.push.apply(s,t):s.push(t)),s}function yt(s){return(typeof s=="string"||s instanceof String)&&s.indexOf(`
|
|
2
|
+
`)>-1?s.split(`
|
|
3
|
+
`):s}function ac(s,t){const{element:e,datasetIndex:i,index:n}=t,o=s.getDatasetMeta(i).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:s,label:a,parsed:o.getParsed(n),raw:s.data.datasets[i].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function io(s,t){const e=s.chart.ctx,{body:i,footer:n,title:o}=s,{boxWidth:a,boxHeight:r}=t,l=j(t.bodyFont),h=j(t.titleFont),c=j(t.footerFont),d=o.length,u=n.length,f=i.length,p=X(t.padding);let g=p.height,m=0,b=i.reduce((x,y)=>x+y.before.length+y.lines.length+y.after.length,0);if(b+=s.beforeBody.length+s.afterBody.length,d&&(g+=d*h.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=f*x+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*c.lineHeight+(u-1)*t.footerSpacing);let _=0;const v=function(x){m=Math.max(m,e.measureText(x).width+_)};return e.save(),e.font=h.string,R(s.title,v),e.font=l.string,R(s.beforeBody.concat(s.afterBody),v),_=t.displayColors?a+2+t.boxPadding:0,R(i,x=>{R(x.before,v),R(x.lines,v),R(x.after,v)}),_=0,e.font=c.string,R(s.footer,v),e.restore(),m+=p.width,{width:m,height:g}}function rc(s,t){const{y:e,height:i}=t;return e<i/2?"top":e>s.height-i/2?"bottom":"center"}function lc(s,t,e,i){const{x:n,width:o}=i,a=e.caretSize+e.caretPadding;if(s==="left"&&n+o+a>t.width||s==="right"&&n-o-a<0)return!0}function hc(s,t,e,i){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:l}}=s;let h="center";return i==="center"?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),lc(h,s,t,e)&&(h="center"),h}function no(s,t,e){const i=e.yAlign||t.yAlign||rc(s,e);return{xAlign:e.xAlign||t.xAlign||hc(s,t,e,i),yAlign:i}}function cc(s,t){let{x:e,width:i}=s;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function dc(s,t,e){let{y:i,height:n}=s;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function oo(s,t,e,i){const{caretSize:n,caretPadding:o,cornerRadius:a}=s,{xAlign:r,yAlign:l}=e,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Lt(a);let p=cc(t,r);const g=dc(t,l,h);return l==="center"?r==="left"?p+=h:r==="right"&&(p-=h):r==="left"?p-=Math.max(c,u)+n:r==="right"&&(p+=Math.max(d,f)+n),{x:$(p,0,i.width-t.width),y:$(g,0,i.height-t.height)}}function es(s,t,e){const i=X(e.padding);return t==="center"?s.x+s.width/2:t==="right"?s.x+s.width-i.right:s.x+i.left}function ao(s){return ut([],yt(s))}function uc(s,t,e){return St(s,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ro(s,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?s.override(e):s}const lo={beforeTitle:gt,title(s){if(s.length>0){const t=s[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:gt,beforeBody:gt,beforeLabel:gt,label(s){if(this&&this.options&&this.options.mode==="dataset")return s.label+": "+s.formattedValue||s.formattedValue;let t=s.dataset.label||"";t&&(t+=": ");const e=s.formattedValue;return L(e)||(t+=e),t},labelColor(s){const t=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.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(s){const t=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:gt,afterBody:gt,beforeFooter:gt,footer:gt,afterFooter:gt};function G(s,t,e,i){const n=s[t].call(e,i);return typeof n>"u"?lo[t].call(e,i):n}class $s extends lt{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(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,o=new Gi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=uc(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,n=G(i,"beforeTitle",this,t),o=G(i,"title",this,t),a=G(i,"afterTitle",this,t);let r=[];return r=ut(r,yt(n)),r=ut(r,yt(o)),r=ut(r,yt(a)),r}getBeforeBody(t,e){return ao(G(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return R(t,o=>{const a={before:[],lines:[],after:[]},r=ro(i,o);ut(a.before,yt(G(r,"beforeLabel",this,o))),ut(a.lines,G(r,"label",this,o)),ut(a.after,yt(G(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return ao(G(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=G(i,"beforeFooter",this,t),o=G(i,"footer",this,t),a=G(i,"afterFooter",this,t);let r=[];return r=ut(r,yt(n)),r=ut(r,yt(o)),r=ut(r,yt(a)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],a=[];let r=[],l,h;for(l=0,h=e.length;l<h;++l)r.push(ac(this.chart,e[l]));return t.filter&&(r=r.filter((c,d,u)=>t.filter(c,d,u,i))),t.itemSort&&(r=r.sort((c,d)=>t.itemSort(c,d,i))),R(r,c=>{const d=ro(t.callbacks,c);n.push(G(d,"labelColor",this,c)),o.push(G(d,"labelPointStyle",this,c)),a.push(G(d,"labelTextColor",this,c))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=me[i.position].call(this,n,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const l=this._size=io(this,i),h=Object.assign({},r,l),c=no(this.chart,i,h),d=oo(i,h,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=i,{topLeft:l,topRight:h,bottomLeft:c,bottomRight:d}=Lt(r),{x:u,y:f}=t,{width:p,height:g}=e;let m,b,_,v,x,y;return o==="center"?(x=f+g/2,n==="left"?(m=u,b=m-a,v=x+a,y=x-a):(m=u+p,b=m+a,v=x-a,y=x+a),_=m):(n==="left"?b=u+Math.max(l,c)+a:n==="right"?b=u+p-Math.max(h,d)-a:b=this.caretX,o==="top"?(v=f,x=v-a,m=b-a,_=b+a):(v=f+g,x=v+a,m=b+a,_=b-a),y=v),{x1:m,x2:b,x3:_,y1:v,y2:x,y3:y}}drawTitle(t,e,i){const n=this.title,o=n.length;let a,r,l;if(o){const h=$t(i.rtl,this.x,this.width);for(t.x=es(this,i.titleAlign,i),e.textAlign=h.textAlign(i.titleAlign),e.textBaseline="middle",a=j(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<o;++l)e.fillText(n[l],h.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===o&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const a=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:l,boxWidth:h}=o,c=j(o.bodyFont),d=es(this,"left",o),u=n.x(d),f=l<c.lineHeight?(c.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(h,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},m=n.leftForLtr(u,h)+h/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,ys(t,g,m,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,ys(t,g,m,b)}else{t.lineWidth=A(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const g=n.leftForLtr(u,h),m=n.leftForLtr(n.xPlus(u,1),h-2),b=Lt(a.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ne(t,{x:g,y:p,w:h,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ne(t,{x:m,y:p+1,w:h-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,h,l),t.strokeRect(g,p,h,l),t.fillStyle=a.backgroundColor,t.fillRect(m,p+1,h-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:h,boxPadding:c}=i,d=j(i.bodyFont);let u=d.lineHeight,f=0;const p=$t(i.rtl,this.x,this.width),g=function(k){e.fillText(k,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(a);let b,_,v,x,y,w,S;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=es(this,m,i),e.fillStyle=i.bodyColor,R(this.beforeBody,g),f=r&&m!=="right"?a==="center"?h/2+c:h+2+c:0,x=0,w=n.length;x<w;++x){for(b=n[x],_=this.labelTextColors[x],e.fillStyle=_,R(b.before,g),v=b.lines,r&&v.length&&(this._drawColorBox(e,t,x,p,i),u=Math.max(d.lineHeight,l)),y=0,S=v.length;y<S;++y)g(v[y]),u=d.lineHeight;R(b.after,g)}f=0,u=d.lineHeight,R(this.afterBody,g),t.y-=o}drawFooter(t,e,i){const n=this.footer,o=n.length;let a,r;if(o){const l=$t(i.rtl,this.x,this.width);for(t.x=es(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=j(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(n[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:a}=this,{x:r,y:l}=t,{width:h,height:c}=i,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Lt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+d,l),a==="top"&&this.drawCaret(t,e,i,n),e.lineTo(r+h-u,l),e.quadraticCurveTo(r+h,l,r+h,l+u),a==="center"&&o==="right"&&this.drawCaret(t,e,i,n),e.lineTo(r+h,l+c-p),e.quadraticCurveTo(r+h,l+c,r+h-p,l+c),a==="bottom"&&this.drawCaret(t,e,i,n),e.lineTo(r+f,l+c),e.quadraticCurveTo(r,l+c,r,l+c-f),a==="center"&&o==="left"&&this.drawCaret(t,e,i,n),e.lineTo(r,l+d),e.quadraticCurveTo(r,l,r+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,o=i&&i.y;if(n||o){const a=me[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=io(this,t),l=Object.assign({},a,this._size),h=no(e,t,l),c=oo(t,l,h,e);(n._to!==c.x||o._to!==c.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=X(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),Ni(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Hi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:r,index:l})=>{const h=this.chart.getDatasetMeta(r);if(!h)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:h.data[l],index:l}}),o=!Pe(i,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,i),r=this._positionChanged(a,t),l=e||!Pe(a,o)||r;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,a=me[o.position].call(this,t,e);return a!==!1&&(i!==a.x||n!==a.y)}}M($s,"positioners",me);var fc={id:"tooltip",_element:$s,positioners:me,afterInit(s,t,e){e&&(s.tooltip=new $s({chart:s,options:e}))},beforeUpdate(s,t,e){s.tooltip&&s.tooltip.initialize(e)},reset(s,t,e){s.tooltip&&s.tooltip.initialize(e)},afterDraw(s){const t=s.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(s.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(s.ctx),s.notifyPlugins("afterTooltipDraw",e)}},afterEvent(s,t){if(s.tooltip){const e=t.replay;s.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.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:(s,t)=>t.bodyFont.size,boxWidth:(s,t)=>t.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:lo},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:s=>s!=="filter"&&s!=="itemSort"&&s!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},gc=Object.freeze({__proto__:null,Colors:Ph,Decimation:Ah,Filler:Gh,Legend:sc,SubTitle:oc,Title:nc,Tooltip:fc});const pc=(s,t,e,i)=>(typeof t=="string"?(e=s.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function mc(s,t,e,i){const n=s.indexOf(t);if(n===-1)return pc(s,t,e,i);const o=s.lastIndexOf(t);return n!==o?e:n}const bc=(s,t)=>s===null?null:$(Math.round(s),0,t);function ho(s){const t=this.getLabels();return s>=0&&s<t.length?t[s]:s}class Ys extends Vt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:n,label:o}of e)i[n]===o&&i.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(L(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:mc(i,t,D(e,t),this._addedLabels),bc(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=e;a++)n.push({value:a});return n}getLabelForValue(t){return ho.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){const 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}}M(Ys,"id","category"),M(Ys,"defaults",{ticks:{callback:ho}});function xc(s,t){const e=[],{bounds:i,step:n,min:o,max:a,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=s,u=n||1,f=h-1,{min:p,max:g}=t,m=!L(o),b=!L(a),_=!L(l),v=(g-p)/(c+1);let x=di((g-p)/f/u)*u,y,w,S,k;if(x<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/x)-Math.floor(p/x),k>f&&(x=di(k*x/f/u)*u),L(r)||(y=Math.pow(10,r),x=Math.ceil(x*y)/y),i==="ticks"?(w=Math.floor(p/x)*x,S=Math.ceil(g/x)*x):(w=p,S=g),m&&b&&n&&ua((a-o)/n,x/1e3)?(k=Math.round(Math.min((a-o)/x,h)),x=(a-o)/k,w=o,S=a):_?(w=m?o:w,S=b?a:S,k=l-1,x=(S-w)/k):(k=(S-w)/x,Qt(k,Math.round(k),x/1e3)?k=Math.round(k):k=Math.ceil(k));const C=Math.max(fi(x),fi(w));y=Math.pow(10,L(r)?C:r),w=Math.round(w*y)/y,S=Math.round(S*y)/y;let P=0;for(m&&(d&&w!==o?(e.push({value:o}),w<o&&P++,Qt(Math.round((w+P*x)*y)/y,o,co(o,v,s))&&P++):w<o&&P++);P<k;++P){const T=Math.round((w+P*x)*y)/y;if(b&&T>a)break;e.push({value:T})}return b&&d&&S!==a?e.length&&Qt(e[e.length-1].value,a,co(a,v,s))?e[e.length-1].value=a:e.push({value:a}):(!b||S===a)&&e.push({value:S}),e}function co(s,t,{horizontal:e,minRotation:i}){const n=at(i),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+s).length;return Math.min(t/o,a)}class ss extends Vt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return L(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const a=l=>n=e?n:l,r=l=>o=i?o:l;if(t){const l=ct(n),h=ct(o);l<0&&h<0?r(0):l>0&&h>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=xc(n,o);return t.bounds==="ticks"&&ui(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return se(t,this.chart.options.locale,this.options.ticks.format)}}class Us extends ss{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=at(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}M(Us,"id","linear"),M(Us,"defaults",{ticks:{callback:Ae.formatters.numeric}});const be=s=>Math.floor(kt(s)),Bt=(s,t)=>Math.pow(10,be(s)+t);function uo(s){return s/Math.pow(10,be(s))===1}function fo(s,t,e){const i=Math.pow(10,e),n=Math.floor(s/i);return Math.ceil(t/i)-n}function _c(s,t){const e=t-s;let i=be(e);for(;fo(s,t,i)>10;)i++;for(;fo(s,t,i)<10;)i--;return Math.min(i,be(s))}function yc(s,{min:t,max:e}){t=J(s.min,t);const i=[],n=be(t);let o=_c(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=n>o?Math.pow(10,n):0,h=Math.round((t-l)*a)/a,c=Math.floor((t-l)/r/10)*r*10;let d=Math.floor((h-c)/Math.pow(10,o)),u=J(s.min,Math.round((l+c+d*Math.pow(10,o))*a)/a);for(;u<e;)i.push({value:u,major:uo(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+c+d*Math.pow(10,o))*a)/a;const f=J(s.max,u);return i.push({value:f,major:uo(f),significand:d}),i}class Xs extends Vt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ss.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return W(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?Math.max(0,t):null,this.max=W(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!W(this._userMin)&&(this.min=t===Bt(this.min,0)?Bt(this.min,-1):Bt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const o=r=>i=t?i:r,a=r=>n=e?n:r;i===n&&(i<=0?(o(1),a(10)):(o(Bt(i,-1)),a(Bt(n,1)))),i<=0&&o(Bt(n,-1)),n<=0&&a(Bt(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=yc(e,this);return t.bounds==="ticks"&&ui(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":se(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=kt(t),this._valueRange=kt(this.max)-kt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(kt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}M(Xs,"id","logarithmic"),M(Xs,"defaults",{ticks:{callback:Ae.formatters.logarithmic,major:{enabled:!0}}});function qs(s){const t=s.ticks;if(t.display&&s.display){const e=X(t.backdropPadding);return D(t.font&&t.font.size,N.font.size)+e.height}return 0}function vc(s,t,e){return e=F(e)?e:[e],{w:Oa(s,t.string,e),h:e.length*t.lineHeight}}function go(s,t,e,i,n){return s===i||s===n?{start:t-e/2,end:t+e/2}:s<i||s>n?{start:t-e,end:t}:{start:t,end:t+e}}function Mc(s){const t={l:s.left+s._padding.left,r:s.right-s._padding.right,t:s.top+s._padding.top,b:s.bottom-s._padding.bottom},e=Object.assign({},t),i=[],n=[],o=s._pointLabels.length,a=s.options.pointLabels,r=a.centerPointLabels?z/o:0;for(let l=0;l<o;l++){const h=a.setContext(s.getPointLabelContext(l));n[l]=h.padding;const c=s.getPointPosition(l,s.drawingArea+n[l],r),d=j(h.font),u=vc(s.ctx,d,s._pointLabels[l]);i[l]=u;const f=Q(s.getIndexAngle(l)+r),p=Math.round(us(f)),g=go(p,c.x,u.w,0,180),m=go(p,c.y,u.h,90,270);wc(e,t,f,g,m)}s.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),s._pointLabelItems=Pc(s,i,n)}function wc(s,t,e,i,n){const o=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e));let r=0,l=0;i.start<t.l?(r=(t.l-i.start)/o,s.l=Math.min(s.l,t.l-r)):i.end>t.r&&(r=(i.end-t.r)/o,s.r=Math.max(s.r,t.r+r)),n.start<t.t?(l=(t.t-n.start)/a,s.t=Math.min(s.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/a,s.b=Math.max(s.b,t.b+l))}function kc(s,t,e){const i=s.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,l=s.getPointPosition(t,i+n+a,o),h=Math.round(us(Q(l.angle+H))),c=Oc(l.y,r.h,h),d=Dc(h),u=Cc(l.x,r.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:u,top:c,right:u+r.w,bottom:c+r.h}}function Sc(s,t){if(!t)return!0;const{left:e,top:i,right:n,bottom:o}=s;return!(bt({x:e,y:i},t)||bt({x:e,y:o},t)||bt({x:n,y:i},t)||bt({x:n,y:o},t))}function Pc(s,t,e){const i=[],n=s._pointLabels.length,o=s.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:qs(o)/2,additionalAngle:a?z/n:0};let h;for(let c=0;c<n;c++){l.padding=e[c],l.size=t[c];const d=kc(s,c,l);i.push(d),r==="auto"&&(d.visible=Sc(d,h),d.visible&&(h=d))}return i}function Dc(s){return s===0||s===180?"center":s<180?"left":"right"}function Cc(s,t,e){return e==="right"?s-=t:e==="center"&&(s-=t/2),s}function Oc(s,t,e){return e===90||e===270?s-=t/2:(e>270||e<90)&&(s-=t),s}function Ac(s,t,e){const{left:i,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!L(r)){const l=Lt(t.borderRadius),h=X(t.backdropPadding);s.fillStyle=r;const c=i-h.left,d=n-h.top,u=o-i+h.width,f=a-n+h.height;Object.values(l).some(p=>p!==0)?(s.beginPath(),ne(s,{x:c,y:d,w:u,h:f,radius:l}),s.fill()):s.fillRect(c,d,u,f)}}function Tc(s,t){const{ctx:e,options:{pointLabels:i}}=s;for(let n=t-1;n>=0;n--){const o=s._pointLabelItems[n];if(!o.visible)continue;const a=i.setContext(s.getPointLabelContext(n));Ac(e,a,o);const r=j(a.font),{x:l,y:h,textAlign:c}=o;Tt(e,s._pointLabels[n],l,h+r.lineHeight/2,r,{color:a.color,textAlign:c,textBaseline:"middle"})}}function po(s,t,e,i){const{ctx:n}=s;if(e)n.arc(s.xCenter,s.yCenter,t,0,V);else{let o=s.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a<i;a++)o=s.getPointPosition(a,t),n.lineTo(o.x,o.y)}}function Lc(s,t,e,i,n){const o=s.ctx,a=t.circular,{color:r,lineWidth:l}=t;!a&&!i||!r||!l||e<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(n.dash),o.lineDashOffset=n.dashOffset,o.beginPath(),po(s,e,a,i),o.closePath(),o.stroke(),o.restore())}function Ec(s,t,e){return St(s,{label:e,index:t,type:"pointLabel"})}class xe extends ss{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=X(qs(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=W(t)&&!isNaN(t)?t:0,this.max=W(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/qs(this.options))}generateTickLabels(t){ss.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const n=I(this.options.pointLabels.callback,[e,i],this);return n||n===0?n:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Mc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){const e=V/(this._pointLabels.length||1),i=this.options.startAngle||0;return Q(t*e+at(i))}getDistanceFromCenterForValue(t){if(L(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(L(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return Ec(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-H+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),po(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:o}=e,a=this._pointLabels.length;let r,l,h;if(e.pointLabels.display&&Tc(this,a),n.display&&this.ticks.forEach((c,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(c.value);const u=this.getContext(d),f=n.setContext(u),p=o.setContext(u);Lc(this,f,l,a,p)}}),i.display){for(t.save(),r=a-1;r>=0;r--){const c=i.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=c;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),h=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(h.x,h.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const h=i.setContext(this.getContext(l)),c=j(h.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),h.showLabelBackdrop){t.font=c.string,a=t.measureText(r.label).width,t.fillStyle=h.backdropColor;const d=X(h.backdropPadding);t.fillRect(-a/2-d.left,-o-c.size/2-d.top,a+d.width,c.size+d.height)}Tt(t,r.label,0,-o,c,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),t.restore()}drawTitle(){}}M(xe,"id","radialLinear"),M(xe,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ae.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),M(xe,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),M(xe,"descriptors",{angleLines:{_fallback:"grid"}});const is={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}},Z=Object.keys(is);function mo(s,t){return s-t}function bo(s,t){if(L(t))return null;const e=s._adapter,{parser:i,round:n,isoWeekday:o}=s._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),W(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(Nt(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function xo(s,t,e,i){const n=Z.length;for(let o=Z.indexOf(s);o<n-1;++o){const a=is[Z[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(r*a.size))<=i)return Z[o]}return Z[n-1]}function Rc(s,t,e,i,n){for(let o=Z.length-1;o>=Z.indexOf(e);o--){const a=Z[o];if(is[a].common&&s._adapter.diff(n,i,a)>=t-1)return a}return Z[e?Z.indexOf(e):0]}function Ic(s){for(let t=Z.indexOf(s)+1,e=Z.length;t<e;++t)if(is[Z[t]].common)return Z[t]}function _o(s,t,e){if(!e)s[t]=!0;else if(e.length){const{lo:i,hi:n}=gs(e,t),o=e[i]>=t?e[i]:e[n];s[o]=!0}}function Fc(s,t,e,i){const n=s._adapter,o=+n.startOf(t[0].value,i),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+n.add(r,1,i))l=e[r],l>=0&&(t[l].major=!0);return t}function yo(s,t,e){const i=[],n={},o=t.length;let a,r;for(a=0;a<o;++a)r=t[a],n[r]=a,i.push({value:r,major:!1});return o===0||!e?i:Fc(s,i,n,e)}class _e extends Vt{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={}){const i=t.time||(t.time={}),n=this._adapter=new Yr._date(t.adapters.date);n.init(e),Zt(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:bo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function l(h){!a&&!isNaN(h.min)&&(n=Math.min(n,h.min)),!r&&!isNaN(h.max)&&(o=Math.max(o,h.max))}(!a||!r)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=W(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),o=W(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,a=this.max,r=ma(n,o,a);return this._unit=e.unit||(i.autoSkip?xo(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Rc(this,r.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Ic(this._unit),this.initOffsets(n),t.reverse&&r.reverse(),yo(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=$(e,0,a),i=$(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,a=o.unit||xo(o.minUnit,e,i,this._getLabelCapacity(e)),r=D(n.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,h=Nt(l)||l===!0,c={};let d=e,u,f;if(h&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,h?"day":a),t.diff(i,e,a)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+a);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<i;u=+t.add(u,r,a),f++)_o(c,u,p);return(u===i||n.bounds==="ticks"||f===1)&&_o(c,u,p),Object.keys(c).sort(mo).map(g=>+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,n=this._unit,o=e||i[n];return this._adapter.format(t,o)}_tickFormatFunction(t,e,i,n){const o=this.options,a=o.ticks.callback;if(a)return I(a,[t,e,i],this);const r=o.time.displayFormats,l=this._unit,h=this._majorUnit,c=l&&r[l],d=h&&r[h],u=i[e],f=h&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:c))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=at(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),a=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:i*o+r*a,h:i*a+r*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,yo(this,[t],this._majorUnit),n),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,i=n.length;e<i;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(bo(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return bi(t.sort(mo))}}M(_e,"id","time"),M(_e,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ns(s,t,e){let i=0,n=s.length-1,o,a,r,l;e?(t>=s[i].pos&&t<=s[n].pos&&({lo:i,hi:n}=mt(s,"pos",t)),{pos:o,time:r}=s[i],{pos:a,time:l}=s[n]):(t>=s[i].time&&t<=s[n].time&&({lo:i,hi:n}=mt(s,"time",t)),{time:o,pos:r}=s[i],{time:a,pos:l}=s[n]);const h=a-o;return h?r+(l-r)*(t-o)/h:r}class Ks extends _e{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ns(e,this.min),this._tableRange=ns(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let a,r,l,h,c;for(a=0,r=t.length;a<r;++a)h=t[a],h>=e&&h<=i&&n.push(h);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,r=n.length;a<r;++a)c=n[a+1],l=n[a-1],h=n[a],Math.round((c+l)/2)!==h&&o.push({time:h,pos:a/(r-1)});return o}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ns(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ns(this._table,i*this._tableRange+this._minPos,!0)}}M(Ks,"id","timeseries"),M(Ks,"defaults",_e.defaults);var zc=Object.freeze({__proto__:null,CategoryScale:Ys,LinearScale:Us,LogarithmicScale:Xs,RadialLinearScale:xe,TimeScale:_e,TimeSeriesScale:Ks});const Vc=[$r,yh,gc,zc];_t.register(...Vc);let vo,Gs,Ut,Mo,wo,ko,So,Po,Do,Co,Oo,Ao,To,Lo;({defineComponent:vo}=await Js("vue")),{toDisplayString:Gs,createElementVNode:Ut,openBlock:Mo,createElementBlock:wo}=await Js("vue"),ko={class:"px-24 py-16"},So={class:"flex flex-col gap-8"},Po={class:"fm-color-typo-primary fm-typo-body-lg-400"},Do={class:"fm-color-typo-secondary fm-typo-body-md-400"},Co={class:"px-6"},{computed:Oo,onMounted:Ao,ref:To,watch:Lo}=await Js("vue"),Eo=vo({__name:"FmLine",props:{name:{},paragraph:{},datasets:{},xAxis:{}},setup(s){const t=s,e=To(null);let i=null;Lo([()=>t.xAxis,()=>t.datasets],()=>{i&&(i.data.datasets=t.datasets,i.data.labels=t.xAxis.categories,i.update())});function n(h,c){const d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);if(d)return`rgba(${parseInt(d[1],16)},${parseInt(d[2],16)},${parseInt(d[3],16)},${c})`;if(h.startsWith("rgb")){const u=h.split(",");if(u.length===3)return[...u.slice(0,2),u[2].replace(")",`,${c})`)].join(",");if(u.length===4)return[...u.slice(0,3),`${c})`].join(",")}return""}function o(h){const c=getComputedStyle(document.documentElement).getPropertyValue(`--${h}`)||h;return c.startsWith("rgb")||c.startsWith("#")?c:null}function a({context:h,color:c}){const{ctx:d,chartArea:u}=h.chart;if(!u)return;const f=d==null?void 0:d.createLinearGradient(0,0,0,u.height);return f.addColorStop(0,n(c,.5)),f.addColorStop(1,n(c,0)),f}const r=Oo(()=>({labels:t.xAxis.categories,datasets:t.datasets.map(h=>{const c=o(h.color)??"";return{...h,backgroundColor:c?d=>a({context:d,color:c}):"",borderColor:c,borderDash:h.dash?[5,5]:void 0,tension:.1}})}));function l(){e.value&&(i=new _t(e.value,{type:"line",data:r.value,options:{plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},beginAtZero:!0},y:{grid:{display:!0},beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return Ao(()=>{l()}),(h,c)=>(Mo(),wo("div",ko,[Ut("div",So,[Ut("div",Po,Gs(h.name),1),Ut("div",Do,Gs(h.paragraph),1)]),Ut("div",Co,[Ut("canvas",{ref_key:"canvas",ref:e},null,512)])]))}})});export{Eo as _,Hc as __tla};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-menu[data-v-46812801]{min-width:112px;max-width:280px;max-height:408px;padding:12px 4px;display:block;display:flex;flex-direction:column;overflow-y:scroll;background-color:var(--fm-color-neutral-white);border-radius:8px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-menu-item[data-v-2c63be46]{width:100%;border-radius:4px;padding:12px;display:flex;align-items:center;justify-content:space-between;max-height:78px;min-height:48px;cursor:pointer}.fm-menu-item[data-v-2c63be46]:not(.fm-menu-item--disabled):not(.fm-menu-item--selected):hover{background-color:var(--fm-color-opacity-sm)}.fm-menu-item--disabled[data-v-2c63be46]{cursor:not-allowed}.fm-menu-item--selected[data-v-2c63be46]{background-color:var(--fm-color-system-orange-100)}.fm-menu-item--left[data-v-2c63be46]{display:flex;align-items:center;gap:8px}[data-v-2c63be46] .fm-checkbox__input--container{height:unset;width:unset;padding:unset}[data-v-2c63be46] .fm-checkbox__input--container:hover{background-color:unset}[data-v-2c63be46] .fm-checkbox{min-width:24px;min-height:24px;display:flex;justify-content:center;align-items:center}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-pi-item-line[data-v-a720221d]{border-radius:4px 0 0 4px}.fm-pi-item-line--vertical[data-v-a720221d]{width:2px;height:100%;min-height:70px}.fm-pi-item-line--horizontal[data-v-a720221d]{height:2px;flex-shrink:0}.fm-pi-item-container--vertical[data-v-a720221d]{min-width:200px;padding:var(--fm-spacing-system-spacing-none, 0px);align-items:center}.fm-pi-item-container--horizontal[data-v-a720221d]{flex-direction:column;align-items:flex-start;flex:1 0 0}.fm-pi-item-container[data-v-a720221d]:hover{background:var(--fm-color-opacity-sm, rgba(67, 67, 69, .08))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.container--vertical{display:flex;align-items:flex-start}.fm-pi-container--vertical{padding:var(--fm-spacing-system-spacing-none, 0px) var(--fm-spacing-system-spacing-24, 24px);flex-direction:column;gap:var(--fm-spacing-system-spacing-none, 0px);width:50%}.fm-pi-container--horizontal{padding:var(--fm-spacing-system-spacing-12, 12px) var(--fm-spacing-system-spacing-24, 24px) var(--fm-spacing-system-spacing-24, 24px) var(--fm-spacing-system-spacing-24, 24px);width:100%}.fm-pi-form--horizontal{margin:5%}.fm-pi-form--vertical{margin:0 3%;width:100%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as S,__tla as M}from"./__federation_fn_import.js";import A,{__tla as P}from"./__federation_expose_FmProgressIndicator-07af3c15.js";import C,{__tla as T}from"./__federation_expose_FmButton-71bb9d18.js";let N,q=Promise.all([(()=>{try{return M}catch{}})(),(()=>{try{return P}catch{}})(),(()=>{try{return T}catch{}})()]).then(async()=>{let k,m,d,a,o,y,c,v,b,_,f,w,B,$,u,L,g,V;({defineComponent:k}=await S("vue")),{renderList:m,Fragment:d,openBlock:a,createElementBlock:o,createBlock:y,normalizeClass:c,createElementVNode:v,renderSlot:b,withModifiers:_,createCommentVNode:f,createVNode:w}=await S("vue"),B={class:"flex gap-2 items-start justify-end p-0 self-stretch"},$={key:0,class:"bg-white flex flex-col gap-5 p-6 w-1/3"},{computed:u,onMounted:L,ref:g,watch:V}=await S("vue"),N=k({__name:"FmProgressIndicatorGroup",props:{orientation:{type:String,default:"horizontal"},steps:{type:Array,required:!0},nextButtonLabel:{type:String,default:"Next"},previousButtonLabel:{type:String,default:"Back"},submitButtonLabel:{type:String,default:"Submit"}},setup(s){const r=g([...s.steps]),x=u(()=>r.value.length),l=g(0),n=u(()=>r.value[l.value]);L(()=>{for(let t=0;t<x.value;t++)r.value[t].status=t===0?"active":"default"}),V(l,async(t,i)=>{if(i!=x.value)if(t<x.value)r.value[t].status="active";else{const e=r.value[i].submitForm;e&&r.value.filter(p=>p.status==="error").length===0&&(l.value=0,e())}});const j=u(()=>n.value.validateStep),F=u(()=>{const t=n.value.validateStep;return t?t():!0}),h=t=>{j.value?F.value?(n.value.status="completed",l.value=t):n.value.status="error":z(t)},z=t=>{n.value.status="completed",l.value=t},E=u(()=>{const t=n.value.validateStep;return t?!t():!1});return(t,i)=>(a(),o("div",{class:c(`container--${s.orientation}`)},[v("div",{class:c(`flex justify-start fm-pi-container--${s.orientation}`)},[(a(!0),o(d,null,m(r.value,(e,p)=>(a(),y(A,{key:p,orientation:s.orientation,"title-text":e.titleText,"supporting-text":e.supportingText,status:e.status,onValidateStep:G=>h(p)},null,8,["orientation","title-text","supporting-text","status","onValidateStep"]))),128))],2),(a(!0),o(d,null,m(Object.keys(t.$slots),e=>(a(),o(d,{key:e},[`step${l.value+1}`===e?(a(),o("div",{key:0,class:c(`flex fm-pi-form--${s.orientation}`)},[v("div",{class:c(`bg-white flex flex-col gap-10 p-6 ${t.$slots.card?"w-2/3":"w-full"}`)},[v("form",{class:"flex flex-col gap-2 p-0 self-stretch",onSubmit:i[1]||(i[1]=_(p=>h(l.value+1),["prevent"]))},[b(t.$slots,e,{class:"gap-0 items-start p-0 self-stretch"}),v("div",B,[e!="step1"?(a(),y(C,{key:0,type:"button",label:s.previousButtonLabel,variant:"tertiary",onClick:i[0]||(i[0]=_(p=>h(l.value-1),["stop"]))},null,8,["label"])):f("",!0),w(C,{variant:"primary",disabled:E.value,label:l.value!=r.value.length-1?s.nextButtonLabel:s.submitButtonLabel,type:"submit"},null,8,["disabled","label"])])],32)],2),t.$slots.card?(a(),o("div",$,[b(t.$slots,"card")])):f("",!0)],2)):f("",!0)],64))),128))],2))}})});export{N as _,q as __tla};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-radio-btn[data-v-f55cf769]{display:block;width:100%}.fm-radio-btn--wrapper[data-v-f55cf769]{display:flex;gap:8px}.fm-radio-btn--wrapper:hover>.fm-radio-btn__input--container[data-v-f55cf769]{background-color:var(--fm-color-opacity-sm)}.fm-radio-btn__input--container[data-v-f55cf769]{border-radius:50%;height:40px;width:40px;padding:8px;display:flex;align-items:center;justify-content:center}.fm-radio-btn__input--container[data-v-f55cf769]:hover{background-color:var(--fm-color-opacity-sm)}.fm-radio-btn__input--btn[data-v-f55cf769]{flex-shrink:0;height:20px;width:20px;margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid var(--fm-color-neutral-gray-400);border-radius:50%;display:flex;justify-content:center;align-items:center}.fm-radio-btn__input--btn[data-v-f55cf769]:before{content:"";display:block;width:10px;height:10px;border-radius:50%}.fm-radio-btn__input--btn[data-v-f55cf769]:checked{border-color:var(--fm-color-primary)}.fm-radio-btn__input--btn[data-v-f55cf769]:checked:before{background-color:var(--fm-color-primary)}.fm-radio-btn__input--btn[data-v-f55cf769]:disabled{cursor:not-allowed;border-color:var(--fm-color-neutral-gray-200)}.fm-radio-btn__input--btn[data-v-f55cf769]:disabled:checked:before{background-color:var(--fm-color-neutral-gray-200)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-select[data-v-fbd57494]{display:flex;flex-direction:column;gap:4px}.fm-select__container[data-v-fbd57494]{height:48px;width:100%;display:flex;gap:8px;align-items:center;justify-content:space-between;padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-300);border-radius:8px;background-color:var(--fm-color-neutral-white);cursor:pointer;position:relative}.fm-select__container--expanded[data-v-fbd57494]:not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-primary);padding:10px 6px}.fm-select__container--invalid[data-v-fbd57494]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-red-300);padding:10px 6px}.fm-select__container--valid[data-v-fbd57494]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-green-300);padding:10px 6px}.fm-select__container--warning[data-v-fbd57494]:not(.fm-select__container--expanded):not(.fm-select__container--disabled){outline:none;border:2px solid var(--fm-color-system-orange-300);padding:10px 6px}.fm-select__container[data-v-fbd57494]:hover:not(.fm-select__container--expanded):not(.fm-select__container--disabled){padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-400)}.fm-select__container--disabled[data-v-fbd57494]{padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-200);cursor:not-allowed}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-snackbar[data-v-b6db34bb]{max-width:600px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-switch__container[data-v-77ad1e00]{min-height:52px;min-width:32px;display:flex;align-items:center;gap:16px;position:relative}.fm-switch__input--container[data-v-77ad1e00]{position:relative;display:flex;align-items:center;transition:.3s}.fm-switch__input--knob[data-v-77ad1e00]{background-color:var(--fm-color-neutral-gray-400);position:absolute;left:8px;width:16px;height:16px;border-radius:50%;transition:.3s;display:flex;padding:4px}.fm-switch__input--knob--show-icon[data-v-77ad1e00]{width:24px;height:24px;left:4px}.fm-switch__input--btn[data-v-77ad1e00]{flex-shrink:0;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:52px;height:32px;border:2px solid var(--fm-color-neutral-gray-400);border-radius:100px;position:relative;cursor:pointer}.fm-switch__input--btn[data-v-77ad1e00]:checked{background-color:var(--fm-color-primary);border-color:var(--fm-color-primary)}.fm-switch__input--btn:checked:disabled~.fm-switch__input--knob[data-v-77ad1e00]{background-color:var(--fm-color-neutral-white)}.fm-switch__input--btn:checked~.fm-switch__input--knob[data-v-77ad1e00]{position:absolute;left:24px;width:24px;height:24px;background-color:var(--fm-color-neutral-white)}.fm-switch__input--btn[data-v-77ad1e00]:disabled{background-color:var(--fm-color-neutral-gray-200);border:2px solid var(--fm-color-neutral-gray-300);cursor:not-allowed}.fm-switch__input--btn:disabled~.fm-switch__input--knob[data-v-77ad1e00]{background-color:var(--fm-color-neutral-gray-300)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fm-text-field{display:flex;flex-direction:column;gap:4px}.fm-text-field__container{height:48px;width:100%;display:flex;gap:8px;align-items:center;padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-300);border-radius:8px;background-color:var(--fm-color-neutral-white);cursor:text;position:relative}.fm-text-field__container--focused:not(.fm-text-field__container--disabled){outline:none;border:2px solid var(--fm-color-primary);padding:10px 6px}.fm-text-field__container--invalid:not(.fm-text-field__container--focused):not(.fm-text-field__container--disabled){outline:none;border:2px solid var(--fm-color-system-red-300);padding:10px 6px}.fm-text-field__container--valid:not(.fm-text-field__container--focused):not(.fm-text-field__container--disabled){outline:none;border:2px solid var(--fm-color-system-green-300);padding:10px 6px}.fm-text-field__container--warning:not(.fm-text-field__container--focused):not(.fm-text-field__container--disabled){outline:none;border:2px solid var(--fm-color-system-orange-300);padding:10px 6px}.fm-text-field__container:hover:not(.fm-text-field__container--focused):not(.fm-text-field__container--disabled){padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-400)}.fm-text-field__container--disabled{padding:11px 7px;border:1px solid var(--fm-color-neutral-gray-200);cursor:not-allowed}.fm-text-field--label{display:flex;gap:4px}.fm-text-field--input{height:100%;width:100%;border:none;outline:none;padding:0}.fm-text-field--input:focus{outline:none}.fm-text-field--input:disabled{cursor:not-allowed}.fm-text-field__helper-container{height:20px;display:flex;justify-content:space-between;align-items:center;gap:16px}.fm-text-field__helper__icon{display:flex;justify-content:space-between;align-items:center;gap:4px}
|