![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /opt/mattermost/client/ |
Upload File : |
/*! For license information please see 895.b86d062dedb179e1af3a.js.LICENSE.txt */ (self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[895],{81266:(t,e,i)=>{"use strict";i.d(e,{A:()=>qs});const n="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function o(t,e,i){const o=i||(t=>Array.prototype.slice.call(t));let s=!1,r=[];return function(...i){r=o(i),s||(s=!0,n.call(window,(()=>{s=!1,t.apply(e,r)})))}}const s=t=>"start"===t?"left":"end"===t?"right":"center",r=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function a(){}const l=function(){let t=0;return function(){return t++}}();function h(t){return null==t}function c(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function u(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const d=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function g(t,e){return d(t)?t:e}function f(t,e){return void 0===t?e:t}const p=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function m(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function b(t,e,i,n){let o,s,r;if(c(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(u(t))for(r=Object.keys(t),s=r.length,o=0;o<s;o++)e.call(i,t[r[o]],r[o])}function v(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function x(t){if(c(t))return t.map(x);if(u(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=x(t[i[o]]);return e}return t}function y(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function _(t,e,i,n){if(!y(t))return;const o=e[t],s=i[t];u(o)&&u(s)?w(o,s,n):e[t]=x(s)}function w(t,e,i){const n=c(e)?e:[e],o=n.length;if(!u(t))return t;const s=(i=i||{}).merger||_;for(let r=0;r<o;++r){if(!u(e=n[r]))continue;const o=Object.keys(e);for(let n=0,r=o.length;n<r;++n)s(o[n],t,e,i)}return t}function S(t,e){return w(t,e,{merger:M})}function M(t,e,i){if(!y(t))return;const n=e[t],o=i[t];u(n)&&u(o)?S(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=x(o))}function C(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function k(t,e){if(""===e)return t;let i=0,n=C(e,i);for(;t&&n>i;)t=t[e.slice(i,n)],i=n+1,n=C(e,i);return t}function R(t){return t.charAt(0).toUpperCase()+t.slice(1)}const P=t=>void 0!==t,I=t=>"function"==typeof t,A=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},E=Math.PI,O=2*E,D=O+E,F=Number.POSITIVE_INFINITY,T=E/180,L=E/2,V=E/4,z=2*E/3,N=Math.log10,B=Math.sign;function H(t){const e=Math.round(t);t=W(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(N(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function j(t){return!isNaN(parseFloat(t))&&isFinite(t)}function W(t,e,i){return Math.abs(t-e)<i}function $(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function G(t){return t*(E/180)}function U(t){return t*(180/E)}function Y(t){if(!d(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function q(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*E&&(s+=O),{angle:s,distance:o}}function X(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function J(t,e){return(t-e+D)%O-E}function K(t){return(t%O+O)%O}function Z(t,e,i,n){const o=K(t),s=K(e),r=K(i),a=K(s-o),l=K(r-o),h=K(o-s),c=K(o-r);return o===s||o===r||n&&s===r||a>l&&h<c}function Q(t,e,i){return Math.max(e,Math.min(i,t))}function tt(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}const et=t=>0===t||1===t,it=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*O/i),nt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*O/i)+1,ot={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*L),easeOutSine:t=>Math.sin(t*L),easeInOutSine:t=>-.5*(Math.cos(E*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>et(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>et(t)?t:it(t,.075,.3),easeOutElastic:t=>et(t)?t:nt(t,.075,.3),easeInOutElastic(t){const e=.1125;return et(t)?t:t<.5?.5*it(2*t,e,.45):.5+.5*nt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ot.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ot.easeInBounce(2*t):.5*ot.easeOutBounce(2*t-1)+.5};function st(t){return t+.5|0}const rt=(t,e,i)=>Math.max(Math.min(t,i),e);function at(t){return rt(st(2.55*t),0,255)}function lt(t){return rt(st(255*t),0,255)}function ht(t){return rt(st(t/2.55)/100,0,1)}function ct(t){return rt(st(100*t),0,100)}const ut={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},dt=[..."0123456789ABCDEF"],gt=t=>dt[15&t],ft=t=>dt[(240&t)>>4]+dt[15&t],pt=t=>(240&t)>>4==(15&t);const mt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function bt(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function vt(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function xt(t,e,i){const n=bt(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function yt(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),r=(o+s)/2;let a,l,h;return o!==s&&(h=o-s,l=r>.5?h/(2-o-s):h/(o+s),a=function(t,e,i,n,o){return t===o?(e-i)/n+(e<i?6:0):e===o?(i-t)/n+2:(t-e)/n+4}(e,i,n,h,o),a=60*a+.5),[0|a,l||0,r]}function _t(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(lt)}function wt(t,e,i){return _t(bt,t,e,i)}function St(t){return(t%360+360)%360}const Mt={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"},Ct={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"};let kt;const Rt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Pt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,It=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function At(t,e,i){if(t){let n=yt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=wt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Et(t,e){return t?Object.assign(e||{},t):t}function Ot(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=lt(t[3]))):(e=Et(t,{r:0,g:0,b:0,a:1})).a=lt(e.a),e}function Dt(t){return"r"===t.charAt(0)?function(t){const e=Rt.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=e[8]?at(t):rt(255*t,0,255)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?at(i):rt(i,0,255)),n=255&(e[4]?at(n):rt(n,0,255)),o=255&(e[6]?at(o):rt(o,0,255)),{r:i,g:n,b:o,a:s}}}(t):function(t){const e=mt.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?at(+e[5]):lt(+e[5]));const o=St(+e[2]),s=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return _t(xt,t,e,i)}(o,s,r):"hsv"===e[1]?function(t,e,i){return _t(vt,t,e,i)}(o,s,r):wt(o,s,r),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class Ft{constructor(t){if(t instanceof Ft)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=Ot(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*ut[n[1]],g:255&17*ut[n[2]],b:255&17*ut[n[3]],a:5===s?17*ut[n[4]]:255}:7!==s&&9!==s||(o={r:ut[n[1]]<<4|ut[n[2]],g:ut[n[3]]<<4|ut[n[4]],b:ut[n[5]]<<4|ut[n[6]],a:9===s?ut[n[7]]<<4|ut[n[8]]:255})),i=o||function(t){kt||(kt=function(){const t={},e=Object.keys(Ct),i=Object.keys(Mt);let n,o,s,r,a;for(n=0;n<e.length;n++){for(r=a=e[n],o=0;o<i.length;o++)s=i[o],a=a.replace(s,Mt[s]);s=parseInt(Ct[r],16),t[a]=[s>>16&255,s>>8&255,255&s]}return t}(),kt.transparent=[0,0,0,0]);const e=kt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Dt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Et(this._rgb);return t&&(t.a=ht(t.a)),t}set rgb(t){this._rgb=Ot(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ht(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>pt(t.r)&&pt(t.g)&&pt(t.b)&&pt(t.a))(t)?gt:ft,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=yt(t),i=e[0],n=ct(e[1]),o=ct(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${ht(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const s=e===o?.5:e,r=2*s-1,a=i.a-n.a,l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2;o=1-l,i.r=255&l*i.r+o*n.r+.5,i.g=255&l*i.g+o*n.g+.5,i.b=255&l*i.b+o*n.b+.5,i.a=s*i.a+(1-s)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=It(ht(t.r)),o=It(ht(t.g)),s=It(ht(t.b));return{r:lt(Pt(n+i*(It(ht(e.r))-n))),g:lt(Pt(o+i*(It(ht(e.g))-o))),b:lt(Pt(s+i*(It(ht(e.b))-s))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Ft(this.rgb)}alpha(t){return this._rgb.a=lt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=st(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.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 At(this._rgb,2,t),this}darken(t){return At(this._rgb,2,-t),this}saturate(t){return At(this._rgb,1,t),this}desaturate(t){return At(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=yt(t);i[0]=St(i[0]+e),i=wt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Tt(t){return new Ft(t)}function Lt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Vt(t){return Lt(t)?t:Tt(t)}function zt(t){return Lt(t)?t:Tt(t).saturate(.5).darken(.1).hexString()}const Nt=Object.create(null),Bt=Object.create(null);function Ht(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function jt(t,e,i){return"string"==typeof e?w(Ht(t,e),i):w(Ht(t,""),e)}var Wt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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=(t,e)=>zt(e.backgroundColor),this.hoverBorderColor=(t,e)=>zt(e.borderColor),this.hoverColor=(t,e)=>zt(e.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)}set(t,e){return jt(this,t,e)}get(t){return Ht(this,t)}describe(t,e){return jt(Bt,t,e)}override(t,e){return jt(Nt,t,e)}route(t,e,i,n){const o=Ht(this,t),s=Ht(this,i),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=s[n];return u(t)?Object.assign({},e,t):f(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function $t(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Gt(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const a=i.length;let l,h,u,d,g;for(l=0;l<a;l++)if(d=i[l],null!=d&&!0!==c(d))r=$t(t,o,s,r,d);else if(c(d))for(h=0,u=d.length;h<u;h++)g=d[h],null==g||c(g)||(r=$t(t,o,s,r,g));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return r}function Ut(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function Yt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function qt(t,e,i,n){Xt(t,e,i,n,null)}function Xt(t,e,i,n,o){let s,r,a,l,h,c;const u=e.pointStyle,d=e.rotation,g=e.radius;let f=(d||0)*T;if(u&&"object"==typeof u&&(s=u.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(i,n),t.rotate(f),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),u){default:o?t.ellipse(i,n,o/2,g,0,0,O):t.arc(i,n,g,0,O),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(f)*g,n-Math.cos(f)*g),f+=z,t.lineTo(i+Math.sin(f)*g,n-Math.cos(f)*g),f+=z,t.lineTo(i+Math.sin(f)*g,n-Math.cos(f)*g),t.closePath();break;case"rectRounded":h=.516*g,l=g-h,r=Math.cos(f+V)*l,a=Math.sin(f+V)*l,t.arc(i-r,n-a,h,f-E,f-L),t.arc(i+a,n-r,h,f-L,f),t.arc(i+r,n+a,h,f,f+L),t.arc(i-a,n+r,h,f+L,f+E),t.closePath();break;case"rect":if(!d){l=Math.SQRT1_2*g,c=o?o/2:l,t.rect(i-c,n-l,2*c,2*l);break}f+=V;case"rectRot":r=Math.cos(f)*g,a=Math.sin(f)*g,t.moveTo(i-r,n-a),t.lineTo(i+a,n-r),t.lineTo(i+r,n+a),t.lineTo(i-a,n+r),t.closePath();break;case"crossRot":f+=V;case"cross":r=Math.cos(f)*g,a=Math.sin(f)*g,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r);break;case"star":r=Math.cos(f)*g,a=Math.sin(f)*g,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r),f+=V,r=Math.cos(f)*g,a=Math.sin(f)*g,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r);break;case"line":r=o?o/2:Math.cos(f)*g,a=Math.sin(f)*g,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(f)*g,n+Math.sin(f)*g)}t.fill(),e.borderWidth>0&&t.stroke()}}function Jt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Kt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Zt(t){t.restore()}function Qt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function te(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ee(t,e,i,n,o,s={}){const r=c(e)?e:[e],a=s.strokeWidth>0&&""!==s.strokeColor;let l,u;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),h(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<r.length;++l)u=r[l],a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),h(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,i,n,s.maxWidth)),t.fillText(u,i,n,s.maxWidth),ie(t,i,n,u,s),n+=o.lineHeight;t.restore()}function ie(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),r=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,h=i+s.actualBoundingBoxDescent,c=o.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(r,c),t.lineTo(a,c),t.stroke()}}function ne(t,e){const{x:i,y:n,w:o,h:s,radius:r}=e;t.arc(i+r.topLeft,n+r.topLeft,r.topLeft,-L,E,!0),t.lineTo(i,n+s-r.bottomLeft),t.arc(i+r.bottomLeft,n+s-r.bottomLeft,r.bottomLeft,E,L,!0),t.lineTo(i+o-r.bottomRight,n+s),t.arc(i+o-r.bottomRight,n+s-r.bottomRight,r.bottomRight,L,0,!0),t.lineTo(i+o,n+r.topRight),t.arc(i+o-r.topRight,n+r.topRight,r.topRight,0,-L,!0),t.lineTo(i+r.topLeft,n)}const oe=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),se=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function re(t,e){const i=(""+t).match(oe);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function ae(t,e){const i={},n=u(e),o=n?Object.keys(e):e,s=u(t)?n?i=>f(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function le(t){return ae(t,{top:"y",right:"x",bottom:"y",left:"x"})}function he(t){return ae(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ce(t){const e=le(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ue(t,e){t=t||{},e=e||Wt.font;let i=f(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=f(t.style,e.style);n&&!(""+n).match(se)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:f(t.family,e.family),lineHeight:re(f(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:f(t.weight,e.weight),string:""};return o.string=function(t){return!t||h(t.size)||h(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o}function de(t,e,i,n){let o,s,r,a=!0;for(o=0,s=t.length;o<s;++o)if(r=t[o],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==i&&c(r)&&(r=r[i%r.length],a=!1),void 0!==r))return n&&!a&&(n.cacheable=!1),r}function ge(t,e){return Object.assign(Object.create(t),e)}function fe(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const pe=(t,e,i)=>fe(t,i,(n=>t[n][e]<i)),me=(t,e,i)=>fe(t,i,(n=>t[n][e]>=i)),be=["push","pop","shift","splice","unshift"];function ve(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(be.forEach((e=>{delete t[e]})),delete t._chartjs)}function xe(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}function ye(t,e=[""],i=t,n,o=()=>t[0]){P(n)||(n=Ee("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>ye([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ce(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=Ee(Se(s,t),i),P(o))return Me(t,o)?Ie(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Oe(t).includes(e),ownKeys:t=>Oe(t),set(t,e,i){const n=t._storage||(t._storage=o());return t[e]=n[e]=i,delete t._keys,!0}})}function _e(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:we(t,n),setContext:e=>_e(t,e,i,n),override:o=>_e(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ce(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:r}=t;let a=n[e];return I(a)&&r.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);return a.add(t),e=e(s,r||n),a.delete(t),Me(t,e)&&(e=Ie(o._scopes,o,t,e)),e}(e,a,t,i)),c(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:r,_descriptors:a}=i;if(P(s.index)&&n(t))e=e[s.index%e.length];else if(u(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ie(n,o,t,l);e.push(_e(i,s,r&&r[t],a))}}return e}(e,a,t,r.isIndexable)),Me(e,a)&&(a=_e(a,o,s&&s[e],r)),a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function we(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:I(i)?i:()=>i,isIndexable:I(n)?n:()=>n}}const Se=(t,e)=>t?t+R(e):e,Me=(t,e)=>u(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ce(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function ke(t,e,i){return I(t)?t(e,i):t}const Re=(t,e)=>!0===t?e:"string"==typeof t?k(e,t):void 0;function Pe(t,e,i,n,o){for(const s of e){const e=Re(i,s);if(e){t.add(e);const s=ke(e._fallback,i,o);if(P(s)&&s!==i&&s!==n)return s}else if(!1===e&&P(n)&&i!==n)return null}return!1}function Ie(t,e,i,n){const o=e._rootScopes,s=ke(e._fallback,i,n),r=[...t,...o],a=new Set;a.add(n);let l=Ae(a,r,i,s||i,n);return null!==l&&(!P(s)||s===i||(l=Ae(a,r,s,l,n),null!==l))&&ye(Array.from(a),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];return c(o)&&u(i)?i:o}(e,i,n)))}function Ae(t,e,i,n,o){for(;i;)i=Pe(t,e,i,n,o);return i}function Ee(t,e){for(const i of e){if(!i)continue;const e=i[t];if(P(e))return e}}function Oe(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function De(t,e,i,n){const{iScale:o}=t,{key:s="r"}=this._parsing,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={r:o.parse(k(c,s),h)};return r}const Fe=Number.EPSILON||1e-14,Te=(t,e)=>e<t.length&&!t[e].skip&&t[e],Le=t=>"x"===t?"y":"x";function Ve(t,e,i,n){const o=t.skip?e:t,s=e,r=i.skip?e:i,a=X(s,o),l=X(r,s);let h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=n*h,d=n*c;return{previous:{x:s.x-u*(r.x-o.x),y:s.y-u*(r.y-o.y)},next:{x:s.x+d*(r.x-o.x),y:s.y+d*(r.y-o.y)}}}function ze(t,e,i){return Math.max(Math.min(t,i),e)}function Ne(t,e,i,n,o){let s,r,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Le(e),n=t.length,o=Array(n).fill(0),s=Array(n);let r,a,l,h=Te(t,0);for(r=0;r<n;++r)if(a=l,l=h,h=Te(t,r+1),l){if(h){const t=h[e]-l[e];o[r]=0!==t?(h[i]-l[i])/t:0}s[r]=a?h?B(o[r-1])!==B(o[r])?0:(o[r-1]+o[r])/2:o[r-1]:o[r]}!function(t,e,i){const n=t.length;let o,s,r,a,l,h=Te(t,0);for(let c=0;c<n-1;++c)l=h,h=Te(t,c+1),l&&h&&(W(e[c],0,Fe)?i[c]=i[c+1]=0:(o=i[c]/e[c],s=i[c+1]/e[c],a=Math.pow(o,2)+Math.pow(s,2),a<=9||(r=3/Math.sqrt(a),i[c]=o*r*e[c],i[c+1]=s*r*e[c])))}(t,o,s),function(t,e,i="x"){const n=Le(i),o=t.length;let s,r,a,l=Te(t,0);for(let h=0;h<o;++h){if(r=a,a=l,l=Te(t,h+1),!a)continue;const o=a[i],c=a[n];r&&(s=(o-r[i])/3,a[`cp1${i}`]=o-s,a[`cp1${n}`]=c-s*e[h]),l&&(s=(l[i]-o)/3,a[`cp2${i}`]=o+s,a[`cp2${n}`]=c+s*e[h])}}(t,s,e)}(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,r=t.length;s<r;++s)a=t[s],l=Ve(i,a,t[Math.min(s+1,r-(n?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,o,s,r,a=Jt(t[0],e);for(i=0,n=t.length;i<n;++i)r=s,s=a,a=i<n-1&&Jt(t[i+1],e),s&&(o=t[i],r&&(o.cp1x=ze(o.cp1x,e.left,e.right),o.cp1y=ze(o.cp1y,e.top,e.bottom)),a&&(o.cp2x=ze(o.cp2x,e.left,e.right),o.cp2y=ze(o.cp2y,e.top,e.bottom)))}(t,i)}function Be(){return"undefined"!=typeof window&&"undefined"!=typeof document}function He(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function je(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const We=t=>window.getComputedStyle(t,null),$e=["top","right","bottom","left"];function Ge(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=$e[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Ue(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,o=We(i),s="border-box"===o.boxSizing,r=Ge(o,"padding"),a=Ge(o,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:o,offsetY:s}=n;let r,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,t.target))r=o,a=s;else{const t=e.getBoundingClientRect();r=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),u=r.left+(c&&a.left),d=r.top+(c&&a.top);let{width:g,height:f}=e;return s&&(g-=r.width+a.width,f-=r.height+a.height),{x:Math.round((l-u)/g*i.width/n),y:Math.round((h-d)/f*i.height/n)}}const Ye=t=>Math.round(10*t)/10;function qe(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||r.height!==o||r.width!==s)&&(t.currentDevicePixelRatio=n,r.height=o,r.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Xe=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Je(t,e){const i=function(t,e){return We(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ke(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ze(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Qe(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=Ke(t,o,i),a=Ke(o,s,i),l=Ke(s,e,i),h=Ke(r,a,i),c=Ke(a,l,i);return Ke(h,c,i)}const ti=new Map;function ei(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ti.get(i);return n||(n=new Intl.NumberFormat(t,e),ti.set(i,n)),n}(e,i).format(t)}function ii(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ni(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function oi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function si(t){return"angle"===t?{between:Z,compare:J,normalize:K}:{between:tt,compare:(t,e)=>t-e,normalize:t=>t}}function ri({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function ai(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,r=e.length,{compare:a,between:l,normalize:h}=si(n),{start:c,end:u,loop:d,style:g}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:r,normalize:a}=si(n),l=e.length;let h,c,{start:u,end:d,loop:g}=t;if(g){for(u+=l,d+=l,h=0,c=l;h<c&&r(a(e[u%l][n]),o,s);++h)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:g,style:t.style}}(t,e,i),f=[];let p,m,b,v=!1,x=null;for(let t=c,i=c;t<=u;++t)m=e[t%r],m.skip||(p=h(m[n]),p!==b&&(v=l(p,o,s),null===x&&(v||l(o,b,p)&&0!==a(o,b))&&(x=0===a(p,o)?t:i),null!==x&&(!v||0===a(s,p)||l(s,b,p))&&(f.push(ri({start:x,end:t,loop:d,count:r,style:g})),x=null),i=t,b=p));return null!==x&&f.push(ri({start:x,end:u,loop:d,count:r,style:g})),f}function li(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=ai(n[o],t.points,e);s.length&&i.push(...s)}return i}function hi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function ci(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var ui=new class{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],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=n.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 s,r=o.length-1,a=!1;for(;r>=0;--r)s=o[r],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(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,0===e&&(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(((t,e)=>Math.max(t,e._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)}};const di="transparent",gi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Vt(t||di),o=n.valid&&Vt(e||di);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class fi{constructor(t,e,i,n){const o=e[i];n=de([t.to,n,o,t.from]);const s=de([t.from,o,n]);this._active=!0,this._fn=t.fn||gi[t.type||typeof s],this._easing=ot[t.easing]||ot.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=s,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,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=de([t.to,e,n,t.from]),this._from=de([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,s=this._loop,r=this._to;let a;if(this._active=o!==r&&(s||e<i),!this._active)return this._target[n]=r,void this._notify(!0);e<0?this._target[n]=o:(a=e/i%2,a=s&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(o,r,a))}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 t=0;t<i.length;t++)i[t][e]()}}Wt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const pi=Object.keys(Wt.animation);Wt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Wt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Wt.describe("animations",{_fallback:"animation"}),Wt.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=>0|t}}}});class mi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!u(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!u(n))return;const o={};for(const t of pi)o[t]=n[t];(c(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),r=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=o[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,r);continue}c.cancel()}u&&u.duration?(o[l]=c=new fi(u,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ui.add(this._chart,i),!0):void 0}}function bi(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function vi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function xi(t,e,i,n={}){const o=t.keys,s="single"===n.mode;let r,a,l,h;if(null!==e){for(r=0,a=o.length;r<a;++r){if(l=+o[r],l===i){if(n.all)continue;break}h=t.values[l],d(h)&&(s||0===e||B(e)===B(h))&&(e+=h)}return e}}function yi(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function _i(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function wi(t,e,i,n){for(const o of e.getMatchingVisibleMetas(n).reverse()){const e=t[o.index];if(i&&e>0||!i&&e<0)return o.index}return null}function Si(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:r,index:a}=n,l=s.axis,h=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,r,n),u=e.length;let d;for(let t=0;t<u;++t){const i=e[t],{[l]:s,[h]:u}=i;d=(i._stacks||(i._stacks={}))[h]=_i(o,c,s),d[a]=u,d._top=wi(d,r,!0,n.type),d._bottom=wi(d,r,!1,n.type)}}function Mi(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Ci(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ki=t=>"reset"===t||"none"===t,Ri=(t,e)=>e?t:Object.assign({},t);class Pi{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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=yi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Ci(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,o=e.xAxisID=f(i.xAxisID,Mi(t,"x")),s=e.yAxisID=f(i.yAxisID,Mi(t,"y")),r=e.rAxisID=f(i.rAxisID,Mi(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,o,s,r),h=e.vAxisID=n(a,s,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}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&&ve(this._data,this),t._stacked&&Ci(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(u(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(e);else if(i!==e){if(i){ve(i,this);const t=this._cachedMeta;Ci(t),t._parsed=[]}e&&Object.isExtensible(e)&&((n=e)._chartjs?n._chartjs.listeners.push(this):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),be.forEach((t=>{const e="_onData"+R(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const o=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),o}})})))),this._syncList=[],this._data=e}var n}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=yi(e.vScale,e),e.stack!==i.stack&&(n=!0,Ci(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&Si(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:s}=i,r=o.axis;let a,l,h,d=0===t&&e===n.length||i._sorted,g=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=c(n[t])?this.parseArrayData(i,n,t,e):u(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const o=()=>null===l[r]||g&&l[r]<g[r];for(a=0;a<e;++a)i._parsed[a+t]=l=h[a],d&&(o()&&(d=!1),g=l);i._sorted=d}s&&Si(this,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,r=o.axis,a=s.axis,l=o.getLabels(),h=o===s,c=new Array(n);let u,d,g;for(u=0,d=n;u<d;++u)g=u+i,c[u]={[r]:h||o.parse(l[g],g),[a]:s.parse(e[g],g)};return c}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={x:o.parse(c[0],h),y:s.parse(c[1],h)};return r}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let h,c,u,d;for(h=0,c=n;h<c;++h)u=h+i,d=e[u],l[h]={x:o.parse(k(d,r),u),y:s.parse(k(d,a),u)};return l}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,s=e[t.axis];return xi({keys:vi(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const r=n&&i._stacks[e.axis];n&&r&&(n.values=r,s=xi(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,o=i._sorted&&t===i.iScale,s=n.length,r=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:vi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,g;function f(){g=n[u];const e=g[r.axis];return!d(g[t.axis])||h>e||c<e}for(u=0;u<s&&(f()||(this.updateRangeFromParsed(l,t,g,a),!o));++u);if(o)for(u=s-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(l,t,g,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],d(s)&&i.push(s);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=function(t){let e,i,n,o;return u(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}(f(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=bi(t,i),o=bi(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(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,s=[],r=this._drawStart||0,a=this._drawCount||n.length-r,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,o,r,a),h=r;h<r+a;++h){const e=n[h];e.hidden||(e.active&&l?s.push(e):e.draw(t,o))}for(h=0;h<s.length;++h)s[h].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&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 e=this._cachedMeta.data[t];o=e.$context||(e.$context=function(t,e,i){return ge(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function(t,e){return ge(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(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="active"===e,o=this._cachedDataOpts,s=t+"-"+e,r=o[s],a=this.enableOptionSharing&&P(i);if(r)return Ri(r,a);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),h),d=Object.keys(Wt.elements[t]),g=l.resolveNamedOptions(u,d,(()=>this.getContext(i,n)),c);return g.$shared&&(g.$shared=a,o[s]=Object.freeze(Ri(g,a))),g}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,r=o[s];if(r)return r;let a;if(!1!==n.options.animation){const n=this.chart.config,o=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),o);a=n.createResolver(s,this.getContext(t,i,e))}const l=new mi(n,a&&a.animations);return a&&a._cacheable&&(o[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ki(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),s=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:s}}updateElement(t,e,i,n){ki(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ki(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[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,o=e.length,s=Math.min(o,n);s&&this.parse(0,s),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,s=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=s;r--)t[r]=t[r-e]};for(a(o),r=t;r<s;++r)o[r]=new this.dataElementType;this._parsing&&a(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&&Ci(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])}}function Ii(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,o=i.length;e<o;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=xe(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,o,s,r,a=e._length;const l=()=>{32767!==s&&-32768!==s&&(P(r)&&(a=Math.min(a,Math.abs(s-r)||a)),r=s)};for(n=0,o=i.length;n<o;++n)s=e.getPixelForValue(i[n]),l();for(r=void 0,n=0,o=e.ticks.length;n<o;++n)s=e.getPixelForTick(n),l();return a}function Ai(t,e,i,n){return c(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),r=Math.min(o,s),a=Math.max(o,s);let l=r,h=a;Math.abs(r)>Math.abs(a)&&(l=a,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:o,end:s,min:r,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Ei(t,e,i,n){const o=t.iScale,s=t.vScale,r=o.getLabels(),a=o===s,l=[];let h,c,u,d;for(h=i,c=i+n;h<c;++h)d=e[h],u={},u[o.axis]=a||o.parse(r[h],h),l.push(Ai(d,u,s,h));return l}function Oi(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Di(t,e,i,n){let o=e.borderSkipped;const s={};if(!o)return void(t.borderSkipped=s);const{start:r,end:a,reverse:l,top:h,bottom:c}=function(t){let e,i,n,o,s;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(o="end",s="start"):(o="start",s="end"),{start:i,end:n,reverse:e,top:o,bottom:s}}(t);"middle"===o&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?o=h:(i._bottom||0)===n?o=c:(s[Fi(c,r,a,l)]=!0,o=h)),s[Fi(o,r,a,l)]=!0,t.borderSkipped=s}function Fi(t,e,i,n){var o,s,r;return n?(r=i,t=Ti(t=(o=t)===(s=e)?r:o===r?s:o,i,e)):t=Ti(t,e,i),t}function Ti(t,e,i){return"start"===t?e:"end"===t?i:t}function Li(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}Pi.defaults={},Pi.prototype.datasetElementType=null,Pi.prototype.dataElementType=null;class Vi extends Pi{parsePrimitiveData(t,e,i,n){return Ei(t,e,i,n)}parseArrayData(t,e,i,n){return Ei(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l="x"===o.axis?r:a,h="x"===s.axis?r:a,c=[];let u,d,g,f;for(u=i,d=i+n;u<d;++u)f=e[u],g={},g[o.axis]=o.parse(k(f,l),u),c.push(Ai(k(f,h),g,s,u));return c}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),s=o._custom,r=Oi(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.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="reset"===n,{index:s,_cachedMeta:{vScale:r}}=this,a=r.getBasePixel(),l=r.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,n);for(let g=e;g<e+i;g++){const e=this.getParsed(g),i=o||h(e[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(g),f=this._calculateBarIndexPixels(g,c),p=(e._stacks||{})[r.axis],m={horizontal:l,base:i.base,enableBorderRadius:!p||Oi(e._custom)||s===p._top||s===p._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};d&&(m.options=u||this.resolveDataElementOptions(g,t[g].active?"active":n));const b=m.options||t[g].options;Di(m,b,p,s),Li(m,b,c.ratio),this.updateElement(t[g],g,m,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=i.options.stacked,s=[],r=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(h(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!r(i))&&((!1===o||-1===s.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&s.push(i.stack),i.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,s;for(o=0,s=e.data.length;o<s;++o)n.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const r=t.barThickness;return{min:r||Ii(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},options:{base:n,minBarLength:o}}=this,s=n||0,r=this.getParsed(t),a=r._custom,l=Oi(a);let c,u,d=r[e.axis],g=0,f=i?this.applyStack(e,r,i):d;f!==d&&(g=f-d,f=d),l&&(d=a.barStart,f=a.barEnd-a.barStart,0!==d&&B(d)!==B(a.barEnd)&&(g=0),g+=d);const p=h(n)||l?g:n;let m=e.getPixelForValue(p);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(g+f):m,u=c-m,Math.abs(u)<o){u=function(t,e,i){return 0!==t?B(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,s)*o,d===s&&(m-=u/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),n=Math.min(t,i),r=Math.max(t,i);m=Math.max(Math.min(m,r),n),c=m+u}if(m===e.getPixelForValue(s)){const t=B(u)*e.getLineWidthForValue(s)/2;m+=t,u-=t}return{size:u,base:m,head:c,center:c+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,s=f(n.maxBarThickness,1/0);let r,a;if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let r=t>0?o[t-1]:null,a=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===r&&(r=s-(null===a?e.end-e.start:a-s)),null===a&&(a=s+s-r);const h=s-(s-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:i.barPercentage,start:h}}(t,e,n,i):function(t,e,i,n){const o=i.barThickness;let s,r;return h(o)?(s=e.min*i.categoryPercentage,r=i.barPercentage):(s=o*n,r=1),{chunk:s/n,ratio:r,start:e.pixels[t]-s/2}}(t,e,n,i),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=l.start+l.chunk*c+l.chunk/2,a=Math.min(s,l.chunk*l.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(s,e.min*e.ratio);return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let o=0;for(;o<n;++o)null!==this.getParsed(o)[e.axis]&&i[o].draw(this._ctx)}}Vi.id="bar",Vi.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Vi.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class zi extends Pi{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const o=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<o.length;t++)o[t]._custom=this.resolveDataElementOptions(t+i).radius;return o}parseArrayData(t,e,i,n){const o=super.parseArrayData(t,e,i,n);for(let t=0;t<o.length;t++){const n=e[i+t];o[t]._custom=f(n[2],this.resolveDataElementOptions(t+i).radius)}return o}parseObjectData(t,e,i,n){const o=super.parseObjectData(t,e,i,n);for(let t=0;t<o.length;t++){const n=e[i+t];o[t]._custom=f(n&&n.r&&+n.r,this.resolveDataElementOptions(t+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,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),r=n.getLabelForValue(o.y),a=o._custom;return{label:e.label,value:"("+s+", "+r+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),h=s.axis,c=r.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!o&&this.getParsed(u),d={},g=d[h]=o?s.getPixelForDecimal(.5):s.getPixelForValue(i[h]),f=d[c]=o?r.getBasePixel():r.getPixelForValue(i[c]);d.skip=isNaN(g)||isNaN(f),l&&(d.options=a||this.resolveDataElementOptions(u,e.active?"active":n),o&&(d.options.radius=0)),this.updateElement(e,u,d,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"active"!==e&&(n.radius=0),n.radius+=f(i&&i._custom,o),n}}zi.id="bubble",zi.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},zi.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class Ni extends Pi{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(!1===this._parsing)n._parsed=i;else{let o,s,r=t=>+i[t];if(u(i[t])){const{key:t="value"}=this._parsing;r=e=>+k(i[e],t)}for(o=t,s=t+e;o<s;++o)n._parsed[o]=r(o)}}_getRotation(){return G(this.options.rotation-90)}_getCircumference(){return G(this.options.circumference)}_getRotationExtents(){let t=O,e=-O;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const n=this.chart.getDatasetMeta(i).controller,o=n._getRotation(),s=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,o=n.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-s)/2,0),a=Math.min((h=r,"string"==typeof(l=this.options.cutout)&&l.endsWith("%")?parseFloat(l)/100:l/h),1);var l,h;const c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:g,ratioY:f,offsetX:m,offsetY:b}=function(t,e,i){let n=1,o=1,s=0,r=0;if(e<O){const a=t,l=a+e,h=Math.cos(a),c=Math.sin(a),u=Math.cos(l),d=Math.sin(l),g=(t,e,n)=>Z(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>Z(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),p=g(0,h,u),m=g(L,c,d),b=f(E,h,u),v=f(E+L,c,d);n=(p-b)/2,o=(m-v)/2,s=-(p+b)/2,r=-(m+v)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:r}}(d,u,a),v=(i.width-s)/g,x=(i.height-s)/f,y=Math.max(Math.min(v,x)/2,0),_=p(this.options.radius,y),w=(_-Math.max(_*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*_,this.offsetY=b*_,n.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,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)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/O)}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,r=s.chartArea,a=s.options.animation,l=(r.left+r.right)/2,h=(r.top+r.bottom)/2,c=o&&a.animateScale,u=c?0:this.innerRadius,d=c?0:this.outerRadius,{sharedOptions:g,includeOptions:f}=this._getSharedOptions(e,n);let p,m=this._getRotation();for(p=0;p<e;++p)m+=this._circumference(p,o);for(p=e;p<e+i;++p){const e=this._circumference(p,o),i=t[p],s={x:l+this.offsetX,y:h+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:d,innerRadius:u};f&&(s.options=g||this.resolveDataElementOptions(p,i.active?"active":n)),m+=e,this.updateElement(i,p,s,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const o=t._parsed[i];null===o||isNaN(o)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?O*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=ei(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,o,s,r,a;if(!t)for(n=0,o=i.data.datasets.length;n<o;++n)if(i.isDatasetVisible(n)){s=i.getDatasetMeta(n),t=s.data,r=s.controller;break}if(!t)return 0;for(n=0,o=t.length;n<o;++n)a=r.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.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(f(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Ni.id="doughnut",Ni.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"},Ni.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},Ni.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return c(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Bi extends Pi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:r,count:a}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:r,_parsed:a}=t,l=r.axis,{min:h,max:c,minDefined:u,maxDefined:d}=r.getUserBounds();u&&(o=Q(Math.min(pe(a,r.axis,h).lo,i?n:pe(e,l,r.getPixelForValue(h)).lo),0,n-1)),s=d?Q(Math.max(pe(a,r.axis,c).hi+1,i?0:pe(e,l,r.getPixelForValue(c)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(e,n,s);this._drawStart=r,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(e)&&(r=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,r,a,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,n),d=s.axis,g=r.axis,{spanGaps:f,segment:p}=this.options,m=j(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===n;let v=e>0&&this.getParsed(e-1);for(let f=e;f<e+i;++f){const e=t[f],i=this.getParsed(f),x=b?e:{},y=h(i[g]),_=x[d]=s.getPixelForValue(i[d],f),w=x[g]=o||y?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,i,a):i[g],f);x.skip=isNaN(_)||isNaN(w)||y,x.stop=f>0&&Math.abs(i[d]-v[d])>m,p&&(x.parsed=i,x.raw=l.data[f]),u&&(x.options=c||this.resolveDataElementOptions(f,e.active?"active":n)),b||this.updateElement(e,f,x,n),v=i}}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)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Bi.id="line",Bi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Bi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Hi extends Pi{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=ei(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return De.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(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),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),s=(o-Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,r=s.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,h=a.yCenter,c=a.getIndexAngle(0)-.5*E;let u,d=c;const g=360/this.countVisibleElements();for(u=0;u<e;++u)d+=this._computeAngle(u,n,g);for(u=e;u<e+i;u++){const e=t[u];let i=d,f=d+this._computeAngle(u,n,g),p=s.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=f,o&&(r.animateScale&&(p=0),r.animateRotate&&(i=f=c));const m={x:l,y:h,innerRadius:0,outerRadius:p,startAngle:i,endAngle:f,options:this.resolveDataElementOptions(u,e.active?"active":n)};this.updateElement(e,u,m,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?G(this.resolveDataElementOptions(t,e).angle||i):0}}Hi.id="polarArea",Hi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Hi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class ji extends Ni{}ji.id="pie",ji.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Wi extends Pi{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 De.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,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===n.length,options:e};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const o=this._cachedMeta.rScale,s="reset"===n;for(let r=e;r<e+i;r++){const e=t[r],i=this.resolveDataElementOptions(r,e.active?"active":n),a=o.getPointPositionForValue(r,this.getParsed(r).r),l=s?o.xCenter:a.x,h=s?o.yCenter:a.y,c={x:l,y:h,angle:a.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,r,c,n)}}}Wi.id="radar",Wi.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Wi.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class $i extends Bi{}$i.id="scatter",$i.defaults={showLine:!1,fill:!1},$i.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Gi=Object.freeze({__proto__:null,BarController:Vi,BubbleController:zi,DoughnutController:Ni,LineController:Bi,PolarAreaController:Hi,PieController:ji,RadarController:Wi,ScatterController:$i});function Ui(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Yi{constructor(t){this.options=t||{}}formats(){return Ui()}parse(t,e){return Ui()}format(t,e){return Ui()}add(t,e,i){return Ui()}diff(t,e,i){return Ui()}startOf(t,e,i){return Ui()}endOf(t,e){return Ui()}}Yi.override=function(t){Object.assign(Yi.prototype,t)};var qi={_date:Yi};function Xi(t,e,i,n){const{controller:o,data:s,_sorted:r}=t,a=o._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&s.length){const t=a._reversePixels?me:pe;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),r=t(s,e,i+o);return{lo:n.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function Ji(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:a}=s[t],{lo:l,hi:h}=Xi(s[t],e,r,o);for(let t=l;t<=h;++t){const e=a[t];e.skip||n(e,i,t)}}}function Ki(t,e,i,n,o){const s=[];return o||t.isPointInArea(e)?(Ji(t,i,e,(function(i,r,a){(o||Jt(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&s.push({element:i,datasetIndex:r,index:a})}),!0),s):s}function Zi(t,e,i,n,o,s){return s||t.isPointInArea(e)?"r"!==i||n?function(t,e,i,n,o,s){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let l=Number.POSITIVE_INFINITY;return Ji(t,i,e,(function(i,h,c){const u=i.inRange(e.x,e.y,o);if(n&&!u)return;const d=i.getCenterPoint(o);if(!s&&!t.isPointInArea(d)&&!u)return;const g=a(e,d);g<l?(r=[{element:i,datasetIndex:h,index:c}],l=g):g===l&&r.push({element:i,datasetIndex:h,index:c})})),r}(t,e,i,n,o,s):function(t,e,i,n){let o=[];return Ji(t,i,e,(function(t,i,s){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:l}=q(t,{x:e.x,y:e.y});Z(l,r,a)&&o.push({element:t,datasetIndex:i,index:s})})),o}(t,e,i,o):[]}function Qi(t,e,i,n,o){const s=[],r="x"===i?"inXRange":"inYRange";let a=!1;return Ji(t,i,e,((t,n,l)=>{t[r](e[i],o)&&(s.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,o))})),n&&!a?[]:s}var tn={evaluateInteractionItems:Ji,modes:{index(t,e,i,n){const o=Ue(e,t),s=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?Ki(t,o,s,n,r):Zi(t,o,s,!1,n,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,n){const o=Ue(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?Ki(t,o,s,n,r):Zi(t,o,s,!1,n,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Ki(t,Ue(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const o=Ue(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;return Zi(t,o,s,i.intersect,n,r)},x:(t,e,i,n)=>Qi(t,Ue(e,t),"x",i.intersect,n),y:(t,e,i,n)=>Qi(t,Ue(e,t),"y",i.intersect,n)}};const en=["left","top","right","bottom"];function nn(t,e){return t.filter((t=>t.pos===e))}function on(t,e){return t.filter((t=>-1===en.indexOf(t.pos)&&t.box.axis===e))}function sn(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function rn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function an(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function ln(t,e,i,n){const{pos:o,box:s}=i,r=t.maxPadding;if(!u(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&an(r,s.getPadding());const a=Math.max(0,e.outerWidth-rn(r,t,"left","right")),l=Math.max(0,e.outerHeight-rn(r,t,"top","bottom")),h=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function hn(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function cn(t,e,i,n){const o=[];let s,r,a,l,h,c;for(s=0,r=t.length,h=0;s<r;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,hn(a.horizontal,e));const{same:r,other:u}=ln(e,i,a,n);h|=r&&o.length,c=c||u,l.fullSize||o.push(a)}return h&&cn(o,e,i,n)||c}function un(t,e,i,n,o){t.top=i,t.left=e,t.right=e+n,t.bottom=i+o,t.width=n,t.height=o}function dn(t,e,i,n){const o=i.padding;let{x:s,y:r}=e;for(const a of t){const t=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/l.weight||1;if(a.horizontal){const n=e.w*h,s=l.size||t.height;P(l.start)&&(r=l.start),t.fullSize?un(t,o.left,r,i.outerWidth-o.right-o.left,s):un(t,e.left+l.placed,r,n,s),l.start=r,l.placed+=n,r=t.bottom}else{const n=e.h*h,r=l.size||t.width;P(l.start)&&(s=l.start),t.fullSize?un(t,s,o.top,r,i.outerHeight-o.bottom-o.top):un(t,s,e.top+l.placed,r,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=r}Wt.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var gn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=ce(t.options.layout.padding),s=Math.max(e-o.width,0),r=Math.max(i-o.height,0),a=function(t){const e=function(t){const e=[];let i,n,o,s,r,a;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],({position:s,options:{stack:r,stackWeight:a=1}}=o),e.push({index:i,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:r&&s+r,stackWeight:a});return e}(t),i=sn(e.filter((t=>t.box.fullSize)),!0),n=sn(nn(e,"left"),!0),o=sn(nn(e,"right")),s=sn(nn(e,"top"),!0),r=sn(nn(e,"bottom")),a=on(e,"x"),l=on(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(r).concat(a),chartArea:nn(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(r).concat(a)}}(t.boxes),l=a.vertical,h=a.horizontal;b(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/c,hBoxMaxHeight:r/2}),d=Object.assign({},o);an(d,ce(n));const g=Object.assign({maxPadding:d,w:s,h:r,x:o.left,y:o.top},o),f=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!en.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,r,a;for(s=0,r=t.length;s<r;++s){a=t[s];const{fullSize:r}=a.box,l=i[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*n:r&&e.availableWidth,a.height=o):(a.width=n,a.height=h?h*o:r&&e.availableHeight)}return i}(l.concat(h),u);cn(a.fullSize,g,u,f),cn(l,g,u,f),cn(h,g,u,f)&&cn(l,g,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(g),dn(a.leftAndTop,g,u,f),g.x+=g.w,g.y+=g.h,dn(a.rightAndBottom,g,u,f),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},b(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class fn{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 pn extends fn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const mn="$chartjs",bn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},vn=t=>null===t||""===t,xn=!!Xe&&{passive:!0};function yn(t,e,i){t.canvas.removeEventListener(e,i,xn)}function _n(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function wn(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||_n(i.addedNodes,n),e=e&&!_n(i.removedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Sn(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||_n(i.removedNodes,n),e=e&&!_n(i.addedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}const Mn=new Map;let Cn=0;function kn(){const t=window.devicePixelRatio;t!==Cn&&(Cn=t,Mn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Rn(t,e,i){const n=t.canvas,s=n&&He(n);if(!s)return;const r=o(((t,e)=>{const n=s.clientWidth;i(t,e),n<s.clientWidth&&i()}),window),a=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||r(i,n)}));return a.observe(s),function(t,e){Mn.size||window.addEventListener("resize",kn),Mn.set(t,e)}(t,r),a}function Pn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Mn.delete(t),Mn.size||window.removeEventListener("resize",kn)}(t)}function In(t,e,i){const n=t.canvas,s=o((e=>{null!==t.ctx&&i(function(t,e){const i=bn[t.type]||t.type,{x:n,y:o}=Ue(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,xn)}(n,e,s),s}class An extends fn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[mn]={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",vn(o)){const e=Je(t,"width");void 0!==e&&(t.width=e)}if(vn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Je(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[mn])return!1;const i=e[mn].initial;["height","width"].forEach((t=>{const n=i[t];h(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[mn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:wn,detach:Sn,resize:Rn}[e]||In;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Pn,detach:Pn,resize:Pn}[e]||yn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const o=We(t),s=Ge(o,"margin"),r=je(o.maxWidth,t,"clientWidth")||F,a=je(o.maxHeight,t,"clientHeight")||F,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=He(t);if(s){const t=s.getBoundingClientRect(),r=We(s),a=Ge(r,"border","width"),l=Ge(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=je(r.maxWidth,s,"clientWidth"),o=je(r.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||F,maxHeight:o||F}}(t,e,i);let{width:h,height:c}=l;if("content-box"===o.boxSizing){const t=Ge(o,"border","width"),e=Ge(o,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-s.width),c=Math.max(0,n?Math.floor(h/n):c-s.height),h=Ye(Math.min(h,r,l.maxWidth)),c=Ye(Math.min(c,a,l.maxHeight)),h&&!c&&(c=Ye(h/2)),{width:h,height:c}}(t,e,i,n)}isAttached(t){const e=He(t);return!(!e||!e.isConnected)}}class En{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return j(this.x)&&j(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}En.defaults={},En.defaultRoutes=void 0;const On={values:t=>c(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const r=N(Math.abs(s)),a=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:o,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ei(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(N(t)));return 1===n||2===n||5===n?On.numeric.call(this,t,e,i):""}};var Dn={formatters:On};function Fn(t,e,i,n,o){const s=f(n,0),r=Math.min(f(o,t.length),t.length);let a,l,h,c=0;for(i=Math.ceil(i),o&&(a=o-n,i=a/Math.floor(a/i)),h=s;h<0;)c++,h=Math.round(s+c*i);for(l=Math.max(s,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(s+c*i))}Wt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Dn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Wt.route("scale.ticks","color","","color"),Wt.route("scale.grid","color","","borderColor"),Wt.route("scale.grid","borderColor","","borderColor"),Wt.route("scale.title","color","","color"),Wt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Wt.describe("scales",{_fallback:"scale"}),Wt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Tn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Ln(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function Vn(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,r=t._endPixel,a=1e-6;let l,h=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(h-s,r-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(o-1))/2,h+=o<e?l:-l,h<s-a||h>r+a)))return h}function zn(t){return t.drawTicks?t.tickLength:0}function Nn(t,e){if(!t.display)return 0;const i=ue(t.font,e),n=ce(t.padding);return(c(t.text)?t.text.length:1)*i.lineHeight+n.height}function Bn(t,e,i){let n=s(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Hn extends En{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=g(t,Number.POSITIVE_INFINITY),e=g(e,Number.NEGATIVE_INFINITY),i=g(i,Number.POSITIVE_INFINITY),n=g(n,Number.NEGATIVE_INFINITY),{min:g(t,i),max:g(e,n),minDefined:d(t),maxDefined:d(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:o,maxDefined:s}=this.getUserBounds();if(o&&s)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),o||(i=Math.min(i,e.min)),s||(n=Math.max(n,e.max));return i=s&&i>n?n:i,n=o&&i>n?i:n,{min:g(i,g(n,i)),max:g(n,g(i,n))}}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||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){m(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:s}=this.options,r=s.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=function(t,e,i){const{min:n,max:o}=t,s=p(e,(o-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(s)),max:r(o,s)}}(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?Ln(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=function(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,r=o[0],a=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,r=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===r&&(e.push(t[o]),s++,r=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((a-r)/(s-1)):null;for(Fn(e,l,c,h(n)?0:r-n,r),t=0,i=s-1;t<i;t++)Fn(e,l,c,o[t],o[t+1]);return Fn(e,l,c,a,h(n)?e.length:a+n),l}return Fn(e,l,c),l}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){m(this.options.afterUpdate,[this])}beforeSetDimensions(){m(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(){m(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),m(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){m(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=m(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){m(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){m(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,n=e.minRotation||0,o=e.maxRotation;let s,r,a,l=n;if(!this._isVisible()||!e.display||n>=o||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=Q(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:d/(i-1),c+6>s&&(s=d/(i-(t.offset?.5:1)),r=this.maxHeight-zn(t.grid)-e.padding-Nn(t.title,this.chart.options.font),a=Math.sqrt(c*c+u*u),l=U(Math.min(Math.asin(Q((h.highest.height+6)/s,-1,1)),Math.asin(Q(r/a,-1,1))-Math.asin(Q(u/a,-1,1)))),l=Math.max(n,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){m(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){m(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,s=this._isVisible(),r=this.isHorizontal();if(s){const s=Nn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=zn(o)+s):(t.height=this.maxHeight,t.width=zn(o)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:o,highest:s}=this._getLabelSizes(),a=2*i.padding,l=G(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(r){const e=i.mirror?0:c*o.width+h*s.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:h*o.width+c*s.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,c,h)}}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:s},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;a?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===o?u=e.width:"end"===o?c=t.width:"inner"!==o&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-r+s)*this.width/(this.width-r),0),this.paddingRight=Math.max((u-h+s)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===o?(i=0,n=t.height):"end"===o&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_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(){m(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)h(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=Ln(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let r,a,l,u,d,g,f,p,m,v,x,y=0,_=0;for(r=0;r<e;++r){if(u=t[r].label,d=this._resolveTickFontOptions(r),i.font=g=d.string,f=n[g]=n[g]||{data:{},gc:[]},p=d.lineHeight,m=v=0,h(u)||c(u)){if(c(u))for(a=0,l=u.length;a<l;++a)x=u[a],h(x)||c(x)||(m=$t(i,f.data,f.gc,m,x),v+=p)}else m=$t(i,f.data,f.gc,m,u),v=p;o.push(m),s.push(v),y=Math.max(m,y),_=Math.max(v,_)}!function(t,e){b(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const w=o.indexOf(y),S=s.indexOf(_),M=t=>({width:o[t]||0,height:s[t]||0});return{first:M(0),last:M(e-1),widest:M(w),highest:M(S),widths:o,heights:s}}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 Q(this._alignToPixels?Ut(this.chart,e,0):e,-32768,32767)}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=function(t,e,i){return ge(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=ge(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=G(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,r=o?o.widest.width+s:0,a=o?o.highest.height+s:0;return this.isHorizontal()?a*i>r*n?r/i:a/n:a*n<r*i?a/i:r/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:s}=n,r=o.offset,a=this.isHorizontal(),l=this.ticks.length+(r?1:0),h=zn(o),c=[],d=o.setContext(this.getContext()),g=d.drawBorder?d.borderWidth:0,p=g/2,m=function(t){return Ut(i,t,g)};let b,v,x,y,_,w,S,M,C,k,R,P;if("top"===s)b=m(this.bottom),w=this.bottom-h,M=b-p,k=m(t.top)+p,P=t.bottom;else if("bottom"===s)b=m(this.top),k=t.top,P=m(t.bottom)-p,w=b+p,M=this.top+h;else if("left"===s)b=m(this.right),_=this.right-h,S=b-p,C=m(t.left)+p,R=t.right;else if("right"===s)b=m(this.left),C=t.left,R=m(t.right)-p,_=b+p,S=this.left+h;else if("x"===e){if("center"===s)b=m((t.top+t.bottom)/2+.5);else if(u(s)){const t=Object.keys(s)[0],e=s[t];b=m(this.chart.scales[t].getPixelForValue(e))}k=t.top,P=t.bottom,w=b+p,M=w+h}else if("y"===e){if("center"===s)b=m((t.left+t.right)/2);else if(u(s)){const t=Object.keys(s)[0],e=s[t];b=m(this.chart.scales[t].getPixelForValue(e))}_=b-p,S=_-h,C=t.left,R=t.right}const I=f(n.ticks.maxTicksLimit,l),A=Math.max(1,Math.ceil(l/I));for(v=0;v<l;v+=A){const t=o.setContext(this.getContext(v)),e=t.lineWidth,n=t.color,s=o.borderDash||[],l=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,d=t.tickBorderDash||[],g=t.tickBorderDashOffset;x=Vn(this,v,r),void 0!==x&&(y=Ut(i,x,e),a?_=S=C=R=y:w=M=k=P=y,c.push({tx1:_,ty1:w,tx2:S,ty2:M,x1:C,y1:k,x2:R,y2:P,width:e,color:n,borderDash:s,borderDashOffset:l,tickWidth:h,tickColor:u,tickBorderDash:d,tickBorderDashOffset:g}))}return this._ticksLength=l,this._borderValue=b,c}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:o}=i,s=this.isHorizontal(),r=this.ticks,{align:a,crossAlign:l,padding:h,mirror:d}=o,g=zn(i.grid),f=g+h,p=d?-h:f,m=-G(this.labelRotation),b=[];let v,x,y,_,w,S,M,C,k,R,P,I,A="middle";if("top"===n)S=this.bottom-p,M=this._getXAxisLabelAlignment();else if("bottom"===n)S=this.top+p,M=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(g);M=t.textAlign,w=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(g);M=t.textAlign,w=t.x}else if("x"===e){if("center"===n)S=(t.top+t.bottom)/2+f;else if(u(n)){const t=Object.keys(n)[0],e=n[t];S=this.chart.scales[t].getPixelForValue(e)+f}M=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)w=(t.left+t.right)/2-f;else if(u(n)){const t=Object.keys(n)[0],e=n[t];w=this.chart.scales[t].getPixelForValue(e)}M=this._getYAxisLabelAlignment(g).textAlign}"y"===e&&("start"===a?A="top":"end"===a&&(A="bottom"));const E=this._getLabelSizes();for(v=0,x=r.length;v<x;++v){y=r[v],_=y.label;const t=o.setContext(this.getContext(v));C=this.getPixelForTick(v)+o.labelOffset,k=this._resolveTickFontOptions(v),R=k.lineHeight,P=c(_)?_.length:1;const e=P/2,i=t.color,a=t.textStrokeColor,h=t.textStrokeWidth;let u,g=M;if(s?(w=C,"inner"===M&&(g=v===x-1?this.options.reverse?"left":"right":0===v?this.options.reverse?"right":"left":"center"),I="top"===n?"near"===l||0!==m?-P*R+R/2:"center"===l?-E.highest.height/2-e*R+R:-E.highest.height+R/2:"near"===l||0!==m?R/2:"center"===l?E.highest.height/2-e*R:E.highest.height-P*R,d&&(I*=-1)):(S=C,I=(1-P)*R/2),t.showLabelBackdrop){const e=ce(t.backdropPadding),i=E.heights[v],n=E.widths[v];let o=S+I-e.top,s=w-e.left;switch(A){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}u={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}b.push({rotation:m,label:_,font:k,color:i,strokeColor:a,strokeWidth:h,textOffset:I,textAlign:g,textBaseline:A,translation:[w,S],backdrop:u})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-G(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:o}}=this.options,s=t+o,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+o,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-s,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+o,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+s,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.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,s;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(o=0,s=n.length;o<s;++o){const t=n[o];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,n=i.setContext(this.getContext()),o=i.drawBorder?n.borderWidth:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let a,l,h,c;this.isHorizontal()?(a=Ut(t,this.left,o)-o/2,l=Ut(t,this.right,s)+s/2,h=c=r):(h=Ut(t,this.top,o)-o/2,c=Ut(t,this.bottom,s)+s/2,a=l=r),e.save(),e.lineWidth=n.borderWidth,e.strokeStyle=n.borderColor,e.beginPath(),e.moveTo(a,h),e.lineTo(l,c),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Kt(e,i);const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));let o,s;for(o=0,s=n.length;o<s;++o){const t=n[o],i=t.font,s=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),ee(e,s,0,t.textOffset,i,t)}i&&Zt(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const o=ue(i.font),s=ce(i.padding),a=i.align;let l=o.lineHeight/2;"bottom"===e||"center"===e||u(e)?(l+=s.bottom,c(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:h,titleY:d,maxWidth:g,rotation:f}=function(t,e,i,n){const{top:o,left:s,bottom:a,right:l,chart:h}=t,{chartArea:c,scales:d}=h;let g,f,p,m=0;const b=a-o,v=l-s;if(t.isHorizontal()){if(f=r(n,s,l),u(i)){const t=Object.keys(i)[0],n=i[t];p=d[t].getPixelForValue(n)+b-e}else p="center"===i?(c.bottom+c.top)/2+b-e:Tn(t,i,e);g=l-s}else{if(u(i)){const t=Object.keys(i)[0],n=i[t];f=d[t].getPixelForValue(n)-v+e}else f="center"===i?(c.left+c.right)/2-v+e:Tn(t,i,e);p=r(n,a,o),m="left"===i?-L:L}return{titleX:f,titleY:p,maxWidth:g,rotation:m}}(this,l,e,a);ee(t,i.text,0,0,o,{color:i.color,maxWidth:g,rotation:f,textAlign:Bn(a,e,n),textBaseline:"middle",translation:[h,d]})}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=f(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===Hn.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,s;for(o=0,s=e.length;o<s;++o){const s=e[o];s[i]!==this.id||t&&s.type!==t||n.push(s)}return n}_resolveTickFontOptions(t){return ue(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class jn{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;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,function(t,e,i){const n=w(Object.create(null),[i?Wt.get(i):{},Wt.get(e),t.defaults]);Wt.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");Wt.route(s,o,l,a)}))}(e,t.defaultRoutes),t.descriptors&&Wt.describe(e,t.descriptors)}(t,s,i),this.override&&Wt.override(t.id,t.overrides)),s}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 Wt[n]&&(delete Wt[n][i],this.override&&delete Nt[i])}}var Wn=new class{constructor(){this.controllers=new jn(Pi,"datasets",!0),this.elements=new jn(En,"elements"),this.plugins=new jn(Object,"plugins"),this.scales=new jn(Hn,"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((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):b(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=R(t);m(i["before"+n],[],i),e[t](i),m(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(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class $n{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),s=this._notify(o,t,e,i);return"afterDestroy"===e&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===m(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){h(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=f(i.options&&i.options.plugins,{}),o=function(t){const e={},i=[],n=Object.keys(Wn.plugins.items);for(let t=0;t<n.length;t++)i.push(Wn.getPlugin(n[t]));const o=t.plugins||[];for(let t=0;t<o.length;t++){const n=o[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,o){const s=[],r=t.getContext();for(const a of e){const e=a.id,l=Gn(n[e],o);null!==l&&s.push({plugin:a,options:Un(t.config,{plugin:a,local:i[e]},l,r)})}return s}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Gn(t,e){return e||!1!==t?!0===t?{}:t:null}function Un(t,{plugin:e,local:i},n,o){const s=t.pluginScopeKeys(e),r=t.getOptionScopes(n,s);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Yn(t,e){const i=Wt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function qn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Xn(t){const e=t.options||(t.options={});e.plugins=f(e.plugins,{}),e.scales=function(t,e){const i=Nt[t.type]||{scales:{}},n=e.scales||{},o=Yn(t.type,e),s=Object.create(null),r=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!u(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=qn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,o),h=i.scales||{};s[a]=s[a]||t,r[t]=S(Object.create(null),[{axis:a},e,h[a],h[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,a=i.indexAxis||Yn(o,e),l=(Nt[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),o=i[e+"AxisID"]||s[e]||e;r[o]=r[o]||Object.create(null),S(r[o],[{axis:e},n[o],l[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];S(e,[Wt.scales[e.type],Wt.scale])})),r}(t,e)}function Jn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Kn=new Map,Zn=new Set;function Qn(t,e){let i=Kn.get(t);return i||(i=e(),Kn.set(t,i),Zn.add(i)),i}const to=(t,e,i)=>{const n=k(e,i);void 0!==n&&t.add(n)};class eo{constructor(t){this._config=function(t){return(t=t||{}).data=Jn(t.data),Xn(t),t}(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=Jn(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(),Xn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Qn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Qn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Qn(`${this.type}-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,s=this._cachedScopes(t,i),r=s.get(e);if(r)return r;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>to(a,t,e)))),e.forEach((t=>to(a,n,t))),e.forEach((t=>to(a,Nt[o]||{},t))),e.forEach((t=>to(a,Wt,t))),e.forEach((t=>to(a,Bt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Zn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Nt[e]||{},Wt.datasets[e]||{},{type:e},Wt,Bt]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:r}=io(this._resolverCache,t,n);let a=s;(function(t,e){const{isScriptable:i,isIndexable:n}=we(t);for(const o of e){const e=i(o),s=n(o),r=(s||e)&&t[o];if(e&&(I(r)||no(r))||s&&c(r))return!0}return!1})(s,e)&&(o.$shared=!1,a=_e(s,i=I(i)?i():i,this.createResolver(t,i,r)));for(const t of e)o[t]=a[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=io(this._resolverCache,t,i);return u(e)?_e(o,e,void 0,n):o}}function io(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);return s||(s={resolver:ye(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)),s}const no=t=>u(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||I(t[i])),!1),oo=["top","bottom","left","right","chartArea"];function so(t,e){return"top"===t||"bottom"===t||-1===oo.indexOf(t)&&"x"===e}function ro(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function ao(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),m(i&&i.onComplete,[t],e)}function lo(t){const e=t.chart,i=e.options.animation;m(i&&i.onProgress,[t],e)}function ho(t){return Be()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const co={},uo=t=>{const e=ho(t);return Object.values(co).filter((t=>t.canvas===e)).pop()};function go(t,e,i){const n=Object.keys(t);for(const o of n){const n=+o;if(n>=e){const s=t[o];delete t[o],(i>0||n>e)&&(t[n+i]=s)}}}class fo{constructor(t,e){const i=this.config=new eo(e),n=ho(t),o=uo(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 s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Be()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?pn:An}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,s.aspectRatio),a=r&&r.canvas,h=a&&a.height,c=a&&a.width;this.id=l(),this.ctx=r,this.canvas=a,this.width=c,this.height=h,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $n,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),s.resizeDelay||0),this._dataChanges=[],co[this.id]=this,r&&a?(ui.listen(this,"complete",ao),ui.listen(this,"progress",lo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return h(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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():qe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Yt(this.canvas,this.ctx),this}stop(){return ui.stop(this),this}resize(t,e){ui.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,s=this.platform.getMaximumSize(n,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,qe(this,r,!0)&&(this.notifyPlugins("resize",{size:s}),m(i.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){b(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const i=e[t],n=qn(t,i),o="r"===n,s="x"===n;return{options:i,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),b(o,(e=>{const o=e.options,s=o.id,r=qn(s,o),a=f(o.type,e.dtype);void 0!==o.position&&so(o.position,r)===so(e.dposition)||(o.position=e.dposition),n[s]=!0;let l=null;s in i&&i[s].type===a?l=i[s]:(l=new(Wn.getScale(a))({id:s,type:a,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(o,t)})),b(n,((t,e)=>{t||delete i[e]})),b(i,(t=>{gn.configure(this,t,t.options),gn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ro("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let o=this.getDatasetMeta(i);const s=n.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=s,o.indexAxis=n.indexAxis||Yn(s,this.options),o.order=n.order||0,o.index=i,o.label=""+n.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const e=Wn.getController(s),{datasetElementType:n,dataElementType:r}=Wt.datasets[s];Object.assign(e.prototype,{dataElementType:Wn.getElement(r),datasetElementType:n&&Wn.getElement(n)}),o.controller=new e(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){b(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(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===o.indexOf(e);e.buildOrUpdateElements(i),s=Math.max(+e.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),n||b(o,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ro("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){b(this.scales,(t=>{gn.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);A(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)go(t,n,"_removeElements"===i?-o:o)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;t<e;t++)if(!A(n,i(t)))return;return Array.from(n).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;gn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],b(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,I(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};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(ui.has(this)?this.attached&&!ui.running(this)&&ui.start(this):(this.draw(),ao({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))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 o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))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=this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(n&&Kt(e,{left:!1===i.left?0:o.left-i.left,right:!1===i.right?this.width:o.right+i.right,top:!1===i.top?0:o.top-i.top,bottom:!1===i.bottom?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&Zt(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Jt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=tn.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._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=ge(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"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).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),s=o.controller._resolveAnimations(void 0,n);P(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{visible:i}),this.update((e=>e.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(),ui.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(),Yt(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete co[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=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};b(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},o=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",o),i("detach",s)};s=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():s()}unbindEvents(){b(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},b(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,s,r,a;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){s=t[r];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!v(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=o(e,t),r=i?t:o(t,e);s.length&&this.updateHoverStyle(s,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=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))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,s=e,r=this._getActiveElements(t,n,i,s),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,m(o.onHover,[t,r,this],this),a&&m(o.onClick,[t,r,this],this));const h=!v(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}const po=()=>b(fo.instances,(t=>t._plugins.invalidate())),mo=!0;function bo(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:r,outerRadius:a,innerRadius:l}=e;let h=o/a;t.beginPath(),t.arc(s,r,a,n-h,i+h),l>o?(h=o/l,t.arc(s,r,l,i+h,n-h,!0)):t.arc(s,r,o,i+L,n-L),t.closePath(),t.clip()}function vo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function xo(t,e,i,n,o){const{x:s,y:r,startAngle:a,pixelMargin:l,innerRadius:h}=e,c=Math.max(e.outerRadius+n+i-l,0),u=h>0?h+n+i+l:0;let d=0;const g=o-a;if(n){const t=((h>0?h-n:0)+(c>0?c-n:0))/2;d=(g-(0!==t?g*t/(t+n):g))/2}const f=(g-Math.max(.001,g*c-i/E)/c)/2,p=a+f+d,m=o-f-d,{outerStart:b,outerEnd:v,innerStart:x,innerEnd:y}=function(t,e,i,n){const o=ae(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(i-e)/2,r=Math.min(s,n*e/2),a=t=>{const e=(i-Math.min(s,t))*n/2;return Q(t,0,Math.min(s,e))};return{outerStart:a(o.outerStart),outerEnd:a(o.outerEnd),innerStart:Q(o.innerStart,0,r),innerEnd:Q(o.innerEnd,0,r)}}(e,u,c,m-p),_=c-b,w=c-v,S=p+b/_,M=m-v/w,C=u+x,k=u+y,R=p+x/C,P=m-y/k;if(t.beginPath(),t.arc(s,r,c,S,M),v>0){const e=vo(w,M,s,r);t.arc(e.x,e.y,v,M,m+L)}const I=vo(k,m,s,r);if(t.lineTo(I.x,I.y),y>0){const e=vo(k,P,s,r);t.arc(e.x,e.y,y,m+L,P+Math.PI)}if(t.arc(s,r,u,m-y/u,p+x/u,!0),x>0){const e=vo(C,R,s,r);t.arc(e.x,e.y,x,R+Math.PI,p-L)}const A=vo(_,p,s,r);if(t.lineTo(A.x,A.y),b>0){const e=vo(_,S,s,r);t.arc(e.x,e.y,b,p-L,S)}t.closePath()}Object.defineProperties(fo,{defaults:{enumerable:mo,value:Wt},instances:{enumerable:mo,value:co},overrides:{enumerable:mo,value:Nt},registry:{enumerable:mo,value:Wn},version:{enumerable:mo,value:"3.8.2"},getChart:{enumerable:mo,value:uo},register:{enumerable:mo,value:(...t)=>{Wn.add(...t),po()}},unregister:{enumerable:mo,value:(...t)=>{Wn.remove(...t),po()}}});class yo extends En{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=q(n,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,d=f(c,a-r)>=O||Z(o,r,a),g=tt(s,l+u,h+u);return d&&g}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,h=(n+o)/2,c=(s+r+l+a)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>O?Math.floor(i/O):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(n){s=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*s,Math.sin(e)*s),this.circumference>=E&&(s=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,n){const{fullCircles:o,startAngle:s,circumference:r}=e;let a=e.endAngle;if(o){xo(t,e,i,n,s+O);for(let e=0;e<o;++e)t.fill();isNaN(r)||(a=s+r%O,r%O==0&&(a+=O))}return xo(t,e,i,n,a),t.fill(),a}(t,this,s,o);(function(t,e,i,n,o){const{options:s}=e,{borderWidth:r,borderJoinStyle:a}=s,l="inner"===s.borderAlign;r&&(l?(t.lineWidth=2*r,t.lineJoin=a||"round"):(t.lineWidth=r,t.lineJoin=a||"bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:r,fullCircles:a}=e,l=Math.max(e.outerRadius-r,0),h=e.innerRadius+r;let c;for(i&&bo(t,e,s+O),t.beginPath(),t.arc(n,o,h,s+O,s,!0),c=0;c<a;++c)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+O),c=0;c<a;++c)t.stroke()}(t,e,l),l&&bo(t,e,o),xo(t,e,i,n,o),t.stroke())})(t,this,s,o,r),t.restore()}}function _o(t,e,i=e){t.lineCap=f(i.borderCapStyle,e.borderCapStyle),t.setLineDash(f(i.borderDash,e.borderDash)),t.lineDashOffset=f(i.borderDashOffset,e.borderDashOffset),t.lineJoin=f(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=f(i.borderWidth,e.borderWidth),t.strokeStyle=f(i.borderColor,e.borderColor)}function wo(t,e,i){t.lineTo(i.x,i.y)}function So(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:r,end:a}=e,l=Math.max(o,r),h=Math.min(s,a),c=o<r&&s<r||o>a&&s>a;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function Mo(t,e,i,n){const{points:o,options:s}=e,{count:r,start:a,loop:l,ilen:h}=So(o,i,n),c=function(t){return t.stepped?Qt:t.tension||"monotone"===t.cubicInterpolationMode?te:wo}(s);let u,d,g,{move:f=!0,reverse:p}=n||{};for(u=0;u<=h;++u)d=o[(a+(p?h-u:u))%r],d.skip||(f?(t.moveTo(d.x,d.y),f=!1):c(t,g,d,p,s.stepped),g=d);return l&&(d=o[(a+(p?h:0))%r],c(t,g,d,p,s.stepped)),!!l}function Co(t,e,i,n){const o=e.points,{count:s,start:r,ilen:a}=So(o,i,n),{move:l=!0,reverse:h}=n||{};let c,u,d,g,f,p,m=0,b=0;const v=t=>(r+(h?a-t:t))%s,x=()=>{g!==f&&(t.lineTo(m,f),t.lineTo(m,g),t.lineTo(m,p))};for(l&&(u=o[v(0)],t.moveTo(u.x,u.y)),c=0;c<=a;++c){if(u=o[v(c)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<g?g=i:i>f&&(f=i),m=(b*m+e)/++b):(x(),t.lineTo(e,i),d=n,b=0,g=f=i),p=i}x()}function ko(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?Mo:Co}yo.id="arc",yo.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},yo.defaultRoutes={backgroundColor:"backgroundColor"};const Ro="function"==typeof Path2D;class Po extends En{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||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ne(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=function(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:r,end:a}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=t._chart.getContext(),s=hi(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,h=[];let c=s,u=e[0].start,d=u;function g(t,e,n,o){const s=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:n,style:o}),c=o,u=e%l)}}for(const t of e){u=a?u:t.start;let e,s=i[u%l];for(d=u+1;d<=t.end;d++){const a=i[d%l];e=hi(n.setContext(ge(o,{type:"segment",p0:s,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r}))),ci(e,c)&&g(u,d-1,t.loop,c),s=a,c=e}u<d-1&&g(u,d-1,t.loop,c)}return h}(t,e,i,n):e}(t,!0===n?[{start:r,end:a,loop:s}]:function(t,e,i,n){const o=t.length,s=[];let r,a=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(r-1)%o,loop:n}),e=a=i.stop?r:null):(a=r,l.skip&&(e=r)),l=i}return null!==a&&s.push({start:e%o,end:a%o,loop:n}),s}(i,r,a<r?a+o:a,!!t._fullLoop&&0===r&&a===o-1),i,e)}(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,s=li(this,{property:e,start:n,end:n});if(!s.length)return;const r=[],a=function(t){return t.stepped?Ze:t.tension||"monotone"===t.cubicInterpolationMode?Qe:Ke}(i);let l,h;for(l=0,h=s.length;l<h;++l){const{start:h,end:c}=s[l],u=o[h],d=o[c];if(u===d){r.push(u);continue}const g=a(u,d,Math.abs((n-u[e])/(d[e]-u[e])),i.stepped);g[e]=t[e],r.push(g)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return ko(this)(t,this,e,i)}path(t,e,i){const n=this.segments,o=ko(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const r of n)s&=o(t,this,r,{start:e,end:e+i-1});return!!s}draw(t,e,i,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),function(t,e,i,n){Ro&&!e.options.segment?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),_o(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,r=ko(e);for(const a of o)_o(t,s,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Io(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}Po.id="line",Po.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Po.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Po.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Ao extends En{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Io(this,t,"x",e)}inYRange(t,e){return Io(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Jt(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,qt(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Eo(t,e){const{x:i,y:n,base:o,width:s,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,h,c,u;return t.horizontal?(u=r/2,a=Math.min(i,o),l=Math.max(i,o),h=n-u,c=n+u):(u=s/2,a=i-u,l=i+u,h=Math.min(n,o),c=Math.max(n,o)),{left:a,top:h,right:l,bottom:c}}function Oo(t,e,i,n){return t?0:Q(e,i,n)}function Do(t,e,i,n){const o=null===e,s=null===i,r=t&&!(o&&s)&&Eo(t,n);return r&&(o||tt(e,r.left,r.right))&&(s||tt(i,r.top,r.bottom))}function Fo(t,e){t.rect(e.x,e.y,e.w,e.h)}function To(t,e,i={}){const n=t.x!==i.x?-e:0,o=t.y!==i.y?-e:0,s=(t.x+t.w!==i.x+i.w?e:0)-n,r=(t.y+t.h!==i.y+i.h?e:0)-o;return{x:t.x+n,y:t.y+o,w:t.w+s,h:t.h+r,radius:t.radius}}Ao.id="point",Ao.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Ao.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Lo extends En{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:s}=function(t){const e=Eo(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=t.borderSkipped,s=le(n);return{t:Oo(o.top,s.top,0,i),r:Oo(o.right,s.right,0,e),b:Oo(o.bottom,s.bottom,0,i),l:Oo(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=he(o),r=Math.min(e,i),a=t.borderSkipped,l=n||u(o);return{topLeft:Oo(!l||a.top||a.left,s.topLeft,0,r),topRight:Oo(!l||a.top||a.right,s.topRight,0,r),bottomLeft:Oo(!l||a.bottom||a.left,s.bottomLeft,0,r),bottomRight:Oo(!l||a.bottom||a.right,s.bottomRight,0,r)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}(this),r=(a=s.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?ne:Fo;var a;t.save(),s.w===o.w&&s.h===o.h||(t.beginPath(),r(t,To(s,e,o)),t.clip(),r(t,To(o,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,To(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Do(this,t,e,i)}inXRange(t,e){return Do(this,t,null,e)}inYRange(t,e){return Do(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"x"===t?this.width/2:this.height/2}}Lo.id="bar",Lo.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Lo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Vo=Object.freeze({__proto__:null,ArcElement:yo,LineElement:Po,PointElement:Ao,BarElement:Lo});function zo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function No(t){t.data.datasets.forEach((t=>{zo(t)}))}var Bo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void No(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:r}=e,a=t.getDatasetMeta(o),l=s||e.data;if("y"===de([r,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let u,{start:d,count:g}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:r,max:a,minDefined:l,maxDefined:h}=s.getUserBounds();return l&&(o=Q(pe(e,s.axis,r).lo,0,i-1)),n=h?Q(pe(e,s.axis,a).hi+1,o,i)-o:i-o,{start:o,count:n}}(a,l);if(g<=(i.threshold||4*n))zo(e);else{switch(h(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const r=[],a=(i-2)/(s-2);let l=0;const h=e+i-1;let c,u,d,g,f,p=e;for(r[l++]=t[p],c=0;c<s-2;c++){let n,o=0,s=0;const h=Math.floor((c+1)*a)+1+e,m=Math.min(Math.floor((c+2)*a)+1,i)+e,b=m-h;for(n=h;n<m;n++)o+=t[n].x,s+=t[n].y;o/=b,s/=b;const v=Math.floor(c*a)+1+e,x=Math.min(Math.floor((c+1)*a)+1,i)+e,{x:y,y:_}=t[p];for(d=g=-1,n=v;n<x;n++)g=.5*Math.abs((y-o)*(t[n].y-_)-(y-t[n].x)*(s-_)),g>d&&(d=g,u=t[n],f=n);r[l++]=u,p=f}return r[l++]=t[h],r}(l,d,g,n,i);break;case"min-max":u=function(t,e,i,n){let o,s,r,a,l,c,u,d,g,f,p=0,m=0;const b=[],v=e+i-1,x=t[e].x,y=t[v].x-x;for(o=e;o<e+i;++o){s=t[o],r=(s.x-x)/y*n,a=s.y;const e=0|r;if(e===l)a<g?(g=a,c=o):a>f&&(f=a,u=o),p=(m*p+s.x)/++m;else{const i=o-1;if(!h(c)&&!h(u)){const e=Math.min(c,u),n=Math.max(c,u);e!==d&&e!==i&&b.push({...t[e],x:p}),n!==d&&n!==i&&b.push({...t[n],x:p})}o>0&&i!==d&&b.push(t[i]),b.push(s),l=e,m=0,g=f=a,c=u=d=o}}return b}(l,d,g,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}}))},destroy(t){No(t)}};function Ho(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=K(o),s=K(s)),{property:t,start:o,end:s}}function jo(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Wo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function $o(t,e){let i=[],n=!1;return c(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=jo(t,e,o);const r=o[t],a=o[e];null!==n?(s.push({x:r.x,y:n}),s.push({x:a.x,y:n})):null!==i&&(s.push({x:i,y:r.y}),s.push({x:i,y:a.y}))})),s}(t,e),i.length?new Po({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Go(t){return t&&!1!==t.fill}function Uo(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!d(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function Yo(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=f(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(u(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return d(o)&&Math.floor(o)===o?function(t,e,i,n){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=n)&&i}(n[0],e,o,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function qo(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:r,last:a,point:l}=Xo(s,e,"x");if(!(!l||r&&a))if(r)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function Xo(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,r=t.points;let a=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=r[e.start][i],h=r[e.end][i];if(tt(o,n,h)){a=o===n,l=o===h;break}}return{first:a,last:l,point:n}}class Jo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:O},t.arc(n,o,s,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 Ko(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(d(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,o=[],s=n.segments,r=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;o.hidden||i.unshift(o.dataset)}return i}(e,i);a.push($o({x:null,y:e.bottom},n));for(let t=0;t<s.length;t++){const e=s[t];for(let t=e.start;t<=e.end;t++)qo(o,r[t],a)}return new Po({points:o,options:{}})}(t);if("shape"===i)return!0;const o=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=n.reverse?e.max:e.min,r=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:u(t)?t.value:e.getBaseValue(),n}(i,e,s),a=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,s);return new Jo({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<o;++t)a.push(e.getPointPositionForValue(t,r));return a}(t):function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:u(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(d(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return o instanceof Jo?o:$o(o,n)}(e),{line:o,scale:s,axis:r}=e,a=o.options,l=a.fill,h=a.backgroundColor,{above:c=h,below:g=h}=l||{};n&&o.points.length&&(Kt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:r,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(Zo(t,n,r.top),Qo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore(),t.save(),Zo(t,n,r.bottom)),Qo(t,{line:i,target:n,color:s,scale:a,property:l}),t.restore()}(t,{line:o,target:n,above:c,below:g,area:i,scale:s,axis:r}),Zt(t))}function Zo(t,e,i){const{segments:n,points:o}=e;let s=!0,r=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,h=o[n],c=o[jo(n,l,o)];s?(t.moveTo(h.x,h.y),s=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Qo(t,e){const{line:i,target:n,property:o,color:s,scale:r}=e,a=function(t,e,i){const n=t.segments,o=t.points,s=e.points,r=[];for(const t of n){let{start:n,end:a}=t;a=jo(n,a,o);const l=Ho(i,o[n],o[a],t.loop);if(!e.segments){r.push({source:t,target:l,start:o[n],end:o[a]});continue}const h=li(e,l);for(const e of h){const n=Ho(i,s[e.start],s[e.end],e.loop),a=ai(t,o,n);for(const t of a)r.push({source:t,target:e,start:{[i]:Wo(l,n,"start",Math.max)},end:{[i]:Wo(l,n,"end",Math.min)}})}}return r}(i,n,o);for(const{source:e,target:l,start:h,end:c}of a){const{style:{backgroundColor:a=s}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,ts(t,r,u&&Ho(o,h,c)),t.beginPath();const d=!!i.pathSegment(t,e);let g;if(u){d?t.closePath():es(t,n,c,o);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});g=d&&e,g||es(t,n,h,o)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function ts(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:r,end:a}=i||{};"x"===s&&(t.beginPath(),t.rect(r,n,a-r,o-n),t.clip())}function es(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}var is={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,r,a,l;for(r=0;r<n;++r)s=t.getDatasetMeta(r),a=s.dataset,l=null,a&&a.options&&a instanceof Po&&(l={visible:t.isDatasetVisible(r),index:r,fill:Yo(a,r,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,o.push(l);for(r=0;r<n;++r)l=o[r],l&&!1!==l.fill&&(l.fill=Uo(o,r,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&i.fill&&Ko(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Go(i)&&Ko(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Go(n)&&"beforeDatasetDraw"===i.drawTime&&Ko(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ns=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class os extends En{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=m(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=ue(i.font),o=n.size,s=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=ns(i,o);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(s,o,r,a)+10):(h=this.maxHeight,l=this._fitCols(s,o,r,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:s,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+r;let c=t;o.textAlign="left",o.textBaseline="middle";let u=-1,d=-h;return this.legendItems.forEach(((t,g)=>{const f=i+e/2+o.measureText(t.text).width;(0===g||l[l.length-1]+f+2*r>s)&&(c+=h,l[l.length-(g>0?0:1)]=0,d+=h,u++),a[g]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+r})),c}_fitCols(t,e,i,n){const{ctx:o,maxHeight:s,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],h=s-t;let c=r,u=0,d=0,g=0,f=0;return this.legendItems.forEach(((t,s)=>{const p=i+e/2+o.measureText(t.text).width;s>0&&d+n+2*r>h&&(c+=u+r,l.push({width:u,height:d}),g+=u+r,f++,u=d=0),a[s]={left:g,top:d,col:f,width:p,height:n},u=Math.max(u,p),d+=n+r})),c+=u,l.push({width:u,height:d}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,s=ii(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=r(i,this.left+n,this.right-this.lineWidths[o]);for(const l of e)o!==l.row&&(o=l.row,a=r(i,this.left+n,this.right-this.lineWidths[o])),l.top+=this.top+t+n,l.left=s.leftForLtr(s.x(a),l.width),a+=l.width+n}else{let o=0,a=r(i,this.top+t+n,this.bottom-this.columnSizes[o].height);for(const l of e)l.col!==o&&(o=l.col,a=r(i,this.top+t+n,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+n,l.left=s.leftForLtr(s.x(l.left),l.width),a+=l.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Kt(t,this),this._draw(),Zt(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:s}=t,a=Wt.color,l=ii(t.rtl,this.left,this.width),h=ue(s.font),{color:c,padding:u}=s,d=h.size,g=d/2;let p;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=h.string;const{boxWidth:m,boxHeight:b,itemHeight:v}=ns(s,d),x=this.isHorizontal(),y=this._computeTitleHeight();p=x?{x:r(o,this.left+u,this.right-i[0]),y:this.top+u+y,line:0}:{x:this.left+u,y:r(o,this.top+y+u,this.bottom-e[0].height),line:0},ni(this.ctx,t.textDirection);const _=v+u;this.legendItems.forEach(((w,S)=>{n.strokeStyle=w.fontColor||c,n.fillStyle=w.fontColor||c;const M=n.measureText(w.text).width,C=l.textAlign(w.textAlign||(w.textAlign=s.textAlign)),k=m+g+M;let R=p.x,P=p.y;l.setWidth(this.width),x?S>0&&R+k+u>this.right&&(P=p.y+=_,p.line++,R=p.x=r(o,this.left+u,this.right-i[p.line])):S>0&&P+_>this.bottom&&(R=p.x=R+e[p.line].width+u,p.line++,P=p.y=r(o,this.top+y+u,this.bottom-e[p.line].height)),function(t,e,i){if(isNaN(m)||m<=0||isNaN(b)||b<0)return;n.save();const o=f(i.lineWidth,1);if(n.fillStyle=f(i.fillStyle,a),n.lineCap=f(i.lineCap,"butt"),n.lineDashOffset=f(i.lineDashOffset,0),n.lineJoin=f(i.lineJoin,"miter"),n.lineWidth=o,n.strokeStyle=f(i.strokeStyle,a),n.setLineDash(f(i.lineDash,[])),s.usePointStyle){const s={radius:b*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:o},r=l.xPlus(t,m/2);Xt(n,s,r,e+g,m)}else{const s=e+Math.max((d-b)/2,0),r=l.leftForLtr(t,m),a=he(i.borderRadius);n.beginPath(),Object.values(a).some((t=>0!==t))?ne(n,{x:r,y:s,w:m,h:b,radius:a}):n.rect(r,s,m,b),n.fill(),0!==o&&n.stroke()}n.restore()}(l.x(R),P,w),R=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(C,R+m+g,x?R+k:this.right,t.rtl),function(t,e,i){ee(n,i.text,t,e+v/2,h,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})}(l.x(R),P,w),x?p.x+=k+u:p.y+=_})),oi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=ue(e.font),n=ce(e.padding);if(!e.display)return;const o=ii(t.rtl,this.left,this.width),a=this.ctx,l=e.position,h=i.size/2,c=n.top+h;let u,d=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),u=this.top+c,d=r(t.align,d,this.right-g);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=c+r(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=r(l,d,d+g);a.textAlign=o.textAlign(s(l)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,ee(a,e.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,e=ue(t.font),i=ce(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if(tt(t,this.left,this.right)&&tt(e,this.top,this.bottom))for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(n=o[i],tt(t,n.left,n.left+n.width)&&tt(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,r=(o=i,null!==(n=s)&&null!==o&&n.datasetIndex===o.datasetIndex&&n.index===o.index);s&&!r&&m(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!r&&m(e.onHover,[t,i,this],this)}else i&&m(e.onClick,[t,i,this],this);var n,o}}var ss={id:"legend",_element:os,start(t,e,i){const n=t.legend=new os({ctx:t.ctx,options:i,chart:t});gn.configure(t,n,i),gn.addBox(t,n)},stop(t){gn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;gn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const r=t.controller.getStyle(i?0:void 0),a=ce(r.borderWidth);return{text:e[t.index].label,fillStyle:r.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:r.borderColor,pointStyle:n||r.pointStyle,rotation:r.rotation,textAlign:o||r.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class rs extends En{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)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=c(i.text)?i.text.length:1;this._padding=ce(i.padding);const o=n*ue(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:o,options:s}=this,a=s.align;let l,h,c,u=0;return this.isHorizontal()?(h=r(a,i,o),c=e+t,l=o-i):("left"===s.position?(h=i+t,c=r(a,n,e),u=-.5*E):(h=o-t,c=r(a,e,n),u=.5*E),l=n-e),{titleX:h,titleY:c,maxWidth:l,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=ue(e.font),n=i.lineHeight/2+this._padding.top,{titleX:o,titleY:r,maxWidth:a,rotation:l}=this._drawArgs(n);ee(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:l,textAlign:s(e.align),textBaseline:"middle",translation:[o,r]})}}var as={id:"title",_element:rs,start(t,e,i){!function(t,e){const i=new rs({ctx:t.ctx,options:e,chart:t});gn.configure(t,i,e),gn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;gn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;gn.configure(t,n,i),n.options=i},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 ls=new WeakMap;var hs={id:"subtitle",start(t,e,i){const n=new rs({ctx:t.ctx,options:i,chart:t});gn.configure(t,n,i),gn.addBox(t,n),ls.set(t,n)},stop(t){gn.removeBox(t,ls.get(t)),ls.delete(t)},beforeUpdate(t,e,i){const n=ls.get(t);gn.configure(t,n,i),n.options=i},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 cs={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=X(e,n.getCenterPoint());t<a&&(a=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,r=t.y}return{x:s,y:r}}};function us(t,e){return e&&(c(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ds(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function gs(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:r,value:a}=s.getLabelAndValue(o);return{chart:t,label:r,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:a,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function fs(t,e){const i=t.chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:r,boxHeight:a}=e,l=ue(e.bodyFont),h=ue(e.titleFont),c=ue(e.footerFont),u=s.length,d=o.length,g=n.length,f=ce(e.padding);let p=f.height,m=0,v=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);v+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),v&&(p+=g*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(v-g)*l.lineHeight+(v-1)*e.bodySpacing),d&&(p+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let x=0;const y=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,b(t.title,y),i.font=l.string,b(t.beforeBody.concat(t.afterBody),y),x=e.displayColors?r+2+e.boxPadding:0,b(n,(t=>{b(t.before,y),b(t.lines,y),b(t.after,y)})),x=0,i.font=c.string,b(t.footer,y),i.restore(),m+=f.width,{width:m,height:p}}function ps(t,e,i,n){const{x:o,width:s}=i,{width:r,chartArea:{left:a,right:l}}=t;let h="center";return"center"===n?h=o<=(a+l)/2?"left":"right":o<=s/2?h="left":o>=r-s/2&&(h="right"),function(t,e,i,n){const{x:o,width:s}=n,r=i.caretSize+i.caretPadding;return"left"===t&&o+s+r>e.width||"right"===t&&o-s-r<0||void 0}(h,t,e,i)&&(h="center"),h}function ms(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||ps(t,e,i,n),yAlign:n}}function bs(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,h=o+s,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:g}=he(r);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const p=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,h);return"center"===l?"left"===a?f+=h:"right"===a&&(f-=h):"left"===a?f-=Math.max(c,d)+o:"right"===a&&(f+=Math.max(u,g)+o),{x:Q(f,0,n.width-e.width),y:Q(p,0,n.height-e.height)}}function vs(t,e,i){const n=ce(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function xs(t){return us([],ds(t))}function ys(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class _s extends En{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.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 mi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=ge(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),o=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let r=[];return r=us(r,ds(n)),r=us(r,ds(o)),r=us(r,ds(s)),r}getBeforeBody(t,e){return xs(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return b(t,(t=>{const e={before:[],lines:[],after:[]},o=ys(i,t);us(e.before,ds(o.beforeLabel.call(this,t))),us(e.lines,o.label.call(this,t)),us(e.after,ds(o.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return xs(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),o=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let r=[];return r=us(r,ds(n)),r=us(r,ds(o)),r=us(r,ds(s)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],s=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(gs(this.chart,e[r]));return t.filter&&(l=l.filter(((e,n,o)=>t.filter(e,n,o,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),b(l,(e=>{const i=ys(t.callbacks,e);n.push(i.labelColor.call(this,e)),o.push(i.labelPointStyle.call(this,e)),s.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,s=[];if(n.length){const t=cs[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=fs(this,i),r=Object.assign({},t,e),a=ms(this.chart,i,r),l=bs(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,o={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=s,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:s,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:h,bottomRight:c}=he(r),{x:u,y:d}=t,{width:g,height:f}=e;let p,m,b,v,x,y;return"center"===o?(x=d+f/2,"left"===n?(p=u,m=p-s,v=x+s,y=x-s):(p=u+g,m=p+s,v=x-s,y=x+s),b=p):(m="left"===n?u+Math.max(a,h)+s:"right"===n?u+g-Math.max(l,c)-s:this.caretX,"top"===o?(v=d,x=v-s,p=m-s,b=m+s):(v=d+f,x=v+s,p=m+s,b=m-s),y=v),{x1:p,x2:m,x3:b,y1:v,y2:x,y3:y}}drawTitle(t,e,i){const n=this.title,o=n.length;let s,r,a;if(o){const l=ii(i.rtl,this.x,this.width);for(t.x=vs(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=ue(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,a=0;a<o;++a)e.fillText(n[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r,a+1===o&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:a,boxWidth:l,boxPadding:h}=o,c=ue(o.bodyFont),d=vs(this,"left",o),g=n.x(d),f=a<c.lineHeight?(c.lineHeight-a)/2:0,p=e.y+f;if(o.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(g,l)+l/2,h=p+a/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,qt(t,e,i,h),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,qt(t,e,i,h)}else{t.lineWidth=u(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=n.leftForLtr(g,l-h),i=n.leftForLtr(n.xPlus(g,1),l-h-2),r=he(s.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ne(t,{x:e,y:p,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),ne(t,{x:i,y:p+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=s.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:s,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:h}=i,c=ue(i.bodyFont);let u=c.lineHeight,d=0;const g=ii(i.rtl,this.x,this.width),f=function(i){e.fillText(i,g.x(t.x+d),t.y+u/2),t.y+=u+o},p=g.textAlign(s);let m,v,x,y,_,w,S;for(e.textAlign=s,e.textBaseline="middle",e.font=c.string,t.x=vs(this,p,i),e.fillStyle=i.bodyColor,b(this.beforeBody,f),d=r&&"right"!==p?"center"===s?l/2+h:l+2+h:0,y=0,w=n.length;y<w;++y){for(m=n[y],v=this.labelTextColors[y],e.fillStyle=v,b(m.before,f),x=m.lines,r&&x.length&&(this._drawColorBox(e,t,y,g,i),u=Math.max(c.lineHeight,a)),_=0,S=x.length;_<S;++_)f(x[_]),u=c.lineHeight;b(m.after,f)}d=0,u=c.lineHeight,b(this.afterBody,f),t.y-=o}drawFooter(t,e,i){const n=this.footer,o=n.length;let s,r;if(o){const a=ii(i.rtl,this.x,this.width);for(t.x=vs(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",s=ue(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,r=0;r<o;++r)e.fillText(n[r],a.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:r,y:a}=t,{width:l,height:h}=i,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:g}=he(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+c,a),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(r+l-u,a),e.quadraticCurveTo(r+l,a,r+l,a+u),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+l,a+h-g),e.quadraticCurveTo(r+l,a+h,r+l-g,a+h),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(r+d,a+h),e.quadraticCurveTo(r,a+h,r,a+h-d),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(r,a+c),e.quadraticCurveTo(r,a,r+c,a),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 i=cs[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=fs(this,t),r=Object.assign({},i,this._size),a=ms(e,t,r),l=bs(t,r,a,e);n._to===l.x&&o._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_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 s=ce(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+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),oi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),o=!v(i,n),s=this._positionChanged(n,e);(o||s)&&(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||[],s=this._getActiveElements(t,o,e,i),r=this._positionChanged(s,t),a=e||!v(s,o)||r;return a&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const o=this.options;if("mouseout"===t.type)return[];if(!n)return e;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=cs[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}_s.positioners=cs;var ws={id:"tooltip",_element:_s,positioners:cs,afterInit(t,e,i){i&&(t.tooltip=new _s({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:a,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:a,beforeBody:a,beforeLabel:a,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return h(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:a,afterBody:a,beforeFooter:a,footer:a,afterFooter:a}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ss=Object.freeze({__proto__:null,Decimation:Bo,Filler:is,Legend:ss,SubTitle:hs,Title:as,Tooltip:ws});class Ms extends Hn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(h(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Q(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const o=t.indexOf(e);return-1===o?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):o!==t.lastIndexOf(e)?i:o}(i,t,f(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(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=0===t&&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 i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?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}}function Cs(t,e,{horizontal:i,minRotation:n}){const o=G(n),s=(i?Math.sin(o):Math.cos(o))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}Ms.id="category",Ms.defaults={ticks:{callback:Ms.prototype.getLabelForValue}};class ks extends Hn{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 h(t)||("number"==typeof t||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 s=t=>n=e?n:t,r=t=>o=i?o:t;if(t){const t=B(n),e=B(o);t<0&&e<0?r(0):t>0&&e>0&&s(0)}if(n===o){let e=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*o)),r(o+e),t||s(n-e)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:o,min:s,max:r,precision:a,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=t,g=o||1,f=c-1,{min:p,max:m}=e,b=!h(s),v=!h(r),x=!h(l),y=(m-p)/(u+1);let _,w,S,M,C=H((m-p)/f/g)*g;if(C<1e-14&&!b&&!v)return[{value:p},{value:m}];M=Math.ceil(m/C)-Math.floor(p/C),M>f&&(C=H(M*C/f/g)*g),h(a)||(_=Math.pow(10,a),C=Math.ceil(C*_)/_),"ticks"===n?(w=Math.floor(p/C)*C,S=Math.ceil(m/C)*C):(w=p,S=m),b&&v&&o&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-s)/o,C/1e3)?(M=Math.round(Math.min((r-s)/C,c)),C=(r-s)/M,w=s,S=r):x?(w=b?s:w,S=v?r:S,M=l-1,C=(S-w)/M):(M=(S-w)/C,M=W(M,Math.round(M),C/1e3)?Math.round(M):Math.ceil(M));const k=Math.max(Y(C),Y(w));_=Math.pow(10,h(a)?k:a),w=Math.round(w*_)/_,S=Math.round(S*_)/_;let R=0;for(b&&(d&&w!==s?(i.push({value:s}),w<s&&R++,W(Math.round((w+R*C)*_)/_,s,Cs(s,y,t))&&R++):w<s&&R++);R<M;++R)i.push({value:Math.round((w+R*C)*_)/_});return v&&d&&S!==r?i.length&&W(i[i.length-1].value,r,Cs(r,y,t))?i[i.length-1].value=r:i.push({value:r}):v&&S!==r||i.push({value:S}),i}({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:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&$(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}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 ei(t,this.chart.options.locale,this.options.ticks.format)}}class Rs extends ks{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=d(t)?t:0,this.max=d(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=G(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 null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ps(t){return 1==t/Math.pow(10,Math.floor(N(t)))}Rs.id="linear",Rs.defaults={ticks:{callback:Dn.formatters.numeric}};class Is extends Hn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=ks.prototype.parse.apply(this,[t,e]);if(0!==i)return d(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=d(t)?Math.max(0,t):null,this.max=d(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const o=e=>i=t?i:e,s=t=>n=e?n:t,r=(t,e)=>Math.pow(10,Math.floor(N(t))+e);i===n&&(i<=0?(o(1),s(10)):(o(r(i,-1)),s(r(n,1)))),i<=0&&o(r(n,-1)),n<=0&&s(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&o(r(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(N(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=g(t.min,Math.pow(10,Math.floor(N(e.min)))),r=Math.floor(N(s)),a=Math.floor(s/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{o.push({value:s,major:Ps(s)}),++a,10===a&&(a=1,++r,l=r>=0?1:l),s=Math.round(a*Math.pow(10,r)*l)/l}while(r<i||r===i&&a<n);const h=g(t.max,s);return o.push({value:h,major:Ps(s)}),o}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&$(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":ei(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=N(t),this._valueRange=N(this.max)-N(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(N(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function As(t){const e=t.ticks;if(e.display&&t.display){const t=ce(e.backdropPadding);return f(e.font&&e.font.size,Wt.font.size)+t.height}return 0}function Es(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Os(t,e,i,n,o){const s=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/s,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),o.start<e.t?(l=(e.t-o.start)/r,t.t=Math.min(t.t,e.t-l)):o.end>e.b&&(l=(o.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Ds(t){return 0===t||180===t?"center":t<180?"left":"right"}function Fs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Ts(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,O);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}Is.id="logarithmic",Is.defaults={ticks:{callback:Dn.formatters.logarithmic,major:{enabled:!0}}};class Ls extends ks{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=ce(As(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=d(t)&&!isNaN(t)?t:0,this.max=d(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/As(this.options))}generateTickLabels(t){ks.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=m(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],o=[],s=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?E/s:0;for(let d=0;d<s;d++){const s=r.setContext(t.getPointLabelContext(d));o[d]=s.padding;const g=t.getPointPosition(d,t.drawingArea+o[d],a),f=ue(s.font),p=(l=t.ctx,h=f,u=c(u=t._pointLabels[d])?u:[u],{w:Gt(l,h.string,u),h:u.length*h.lineHeight});n[d]=p;const m=K(t.getIndexAngle(d)+a),b=Math.round(U(m));Os(i,e,m,Es(b,g.x,p.w,0,180),Es(b,g.y,p.h,90,270))}var l,h,u;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],o=t._pointLabels.length,s=t.options,r=As(s)/2,a=t.drawingArea,l=s.pointLabels.centerPointLabels?E/o:0;for(let s=0;s<o;s++){const o=t.getPointPosition(s,a+r+i[s],l),d=Math.round(U(K(o.angle+L))),g=e[s],f=Fs(o.y,g.h,d),p=Ds(d),m=(h=o.x,c=g.w,"right"===(u=p)?h-=c:"center"===u&&(h-=c/2),h);n.push({x:o.x,y:f,textAlign:p,left:m,top:f,right:m+g.w,bottom:f+g.h})}var h,c,u;return n}(t,n,o)}(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){return K(t*(O/(this._pointLabels.length||1))+G(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(h(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(h(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 function(t,e,i){return ge(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-L+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(),Ts(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}=e,o=this._pointLabels.length;let s,r,a;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getPointLabelContext(o)),s=ue(e.font),{x:r,y:a,textAlign:l,left:c,top:u,right:d,bottom:g}=t._pointLabelItems[o],{backdropColor:f}=e;if(!h(f)){const t=he(e.borderRadius),n=ce(e.backdropPadding);i.fillStyle=f;const o=c-n.left,s=u-n.top,r=d-c+n.width,a=g-u+n.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),ne(i,{x:o,y:s,w:r,h:a,radius:t}),i.fill()):i.fillRect(o,s,r,a)}ee(i,t._pointLabels[o],r,a+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,o),n.display&&this.ticks.forEach(((t,e)=>{0!==e&&(r=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const o=t.ctx,s=e.circular,{color:r,lineWidth:a}=e;!s&&!n||!r||!a||i<0||(o.save(),o.strokeStyle=r,o.lineWidth=a,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Ts(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(this,n.setContext(this.getContext(e-1)),r,o))})),i.display){for(t.save(),s=o-1;s>=0;s--){const n=i.setContext(this.getPointLabelContext(s)),{color:o,lineWidth:l}=n;l&&o&&(t.lineWidth=l,t.strokeStyle=o,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.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,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,r)=>{if(0===r&&!e.reverse)return;const a=i.setContext(this.getContext(r)),l=ue(a.font);if(o=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,s=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=ce(a.backdropPadding);t.fillRect(-s/2-e.left,-o-l.size/2-e.top,s+e.width,l.size+e.height)}ee(t,n.label,0,-o,l,{color:a.color})})),t.restore()}drawTitle(){}}Ls.id="radialLinear",Ls.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Dn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},Ls.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Ls.descriptors={angleLines:{_fallback:"grid"}};const Vs={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}},zs=Object.keys(Vs);function Ns(t,e){return t-e}function Bs(t,e){if(h(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),d(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(o&&(r="week"!==o||!j(s)&&!0!==s?i.startOf(r,o):i.startOf(r,"isoWeek",s)),+r)}function Hs(t,e,i,n){const o=zs.length;for(let s=zs.indexOf(t);s<o-1;++s){const t=Vs[zs[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return zs[s]}return zs[o-1]}function js(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=fe(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function Ws(t,e,i){const n=[],o={},s=e.length;let r,a;for(r=0;r<s;++r)a=e[r],o[a]=r,n.push({value:a,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),r=e[e.length-1].value;let a,l;for(a=s;a<=r;a=+o.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class $s extends Hn{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 qi._date(t.adapters.date);S(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 void 0===t?null:Bs(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:s,maxDefined:r}=this.getUserBounds();function a(t){s||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(o=Math.max(o,t.max))}s&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=d(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),o=d(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="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,s=function(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}(n,o,this.max);return this._unit=e.unit||(i.autoSkip?Hs(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(t,e,i,n,o){for(let s=zs.length-1;s>=zs.indexOf(i);s--){const i=zs[s];if(Vs[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return zs[i?zs.indexOf(i):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=zs.indexOf(t)+1,i=zs.length;e<i;++e)if(Vs[zs[e]].common)return zs[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&s.reverse(),Ws(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t){let e,i,n=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),o=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Q(n,0,s),o=Q(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,s=o.unit||Hs(o.minUnit,e,i,this._getLabelCapacity(e)),r=f(o.stepSize,1),a="week"===s&&o.isoWeekday,l=j(a)||!0===a,h={};let c,u,d=e;if(l&&(d=+t.startOf(d,"isoWeek",a)),d=+t.startOf(d,l?"day":s),t.diff(i,e,s)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+s);const g="data"===n.ticks.source&&this.getDataTimestamps();for(c=d,u=0;c<i;c=+t.add(c,r,s),u++)js(h,c,g);return c!==i&&"ticks"!==n.bounds&&1!==u||js(h,c,g),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this.options,s=o.time.displayFormats,r=this._unit,a=this._majorUnit,l=r&&s[r],h=a&&s[a],c=i[e],u=a&&h&&c&&c.major,d=this._adapter.format(t,n||(u?h:l)),g=o.ticks.callback;return g?m(g,[d,e,i],this):d}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 null===t?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=G(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),s=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:i*o+r*s,h:i*s+r*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,Ws(this,[t],this._majorUnit),n),s=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}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(Bs(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return xe(t.sort(Ns))}}function Gs(t,e,i){let n,o,s,r,a=0,l=t.length-1;i?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=pe(t,"pos",e)),({pos:n,time:s}=t[a]),({pos:o,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=pe(t,"time",e)),({time:n,pos:s}=t[a]),({time:o,pos:r}=t[l]));const h=o-n;return h?s+(r-s)*(e-n)/h:s}$s.id="time",$s.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Us extends $s{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=Gs(e,this.min),this._tableRange=Gs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,r,a,l,h;for(s=0,r=t.length;s<r;++s)l=t[s],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,r=n.length;s<r;++s)h=n[s+1],a=n[s-1],l=n[s],Math.round((h+a)/2)!==l&&o.push({time:l,pos:s/(r-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Gs(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Gs(this._table,i*this._tableRange+this._minPos,!0)}}Us.id="timeseries",Us.defaults=$s.defaults;const Ys=[Gi,Vo,Ss,Object.freeze({__proto__:null,CategoryScale:Ms,LinearScale:Rs,LogarithmicScale:Is,RadialLinearScale:Ls,TimeScale:$s,TimeSeriesScale:Us})];fo.register(...Ys);const qs=fo},66139:(t,e,i)=>{"use strict";var n,o,s,r=i(12560),a=i(26953),l=i(52756),h=i(47424),c=i(6827),u=i(15110),d=i(89794),g=i(42882),f=i(24100),p=i(52297),m=i(97614).f,b=i(26830),v=i(56166),x=i(14322),y=i(67166),_=i(80637),w=i(33962),S=w.enforce,M=w.get,C=l.Int8Array,k=C&&C.prototype,R=l.Uint8ClampedArray,P=R&&R.prototype,I=C&&v(C),A=k&&v(k),E=Object.prototype,O=l.TypeError,D=y("toStringTag"),F=_("TYPED_ARRAY_TAG"),T="TypedArrayConstructor",L=r&&!!x&&"Opera"!==d(l.opera),V=!1,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=v(t);if(c(e)){var i=M(e);return i&&u(i,T)?i[T]:B(e)}},H=function(t){if(!c(t))return!1;var e=d(t);return u(z,e)||u(N,e)};for(n in z)(s=(o=l[n])&&o.prototype)?S(s)[T]=o:L=!1;for(n in N)(s=(o=l[n])&&o.prototype)&&(S(s)[T]=o);if((!L||!h(I)||I===Function.prototype)&&(I=function(){throw O("Incorrect invocation")},L))for(n in z)l[n]&&x(l[n],I);if((!L||!A||A===E)&&(A=I.prototype,L))for(n in z)l[n]&&x(l[n].prototype,A);if(L&&v(P)!==A&&x(P,A),a&&!u(A,D))for(n in V=!0,m(A,D,{get:function(){return c(this)?this[F]:void 0}}),z)l[n]&&f(l[n],F,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:V&&F,aTypedArray:function(t){if(H(t))return t;throw O("Target is not a typed array")},aTypedArrayConstructor:function(t){if(h(t)&&(!x||b(I,t)))return t;throw O(g(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,i,n){if(a){if(i)for(var o in z){var s=l[o];if(s&&u(s.prototype,t))try{delete s.prototype[t]}catch(i){try{s.prototype[t]=e}catch(t){}}}A[t]&&!i||p(A,t,i?e:L&&k[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,i){var n,o;if(a){if(x){if(i)for(n in z)if((o=l[n])&&u(o,t))try{delete o[t]}catch(t){}if(I[t]&&!i)return;try{return p(I,t,i?e:L&&I[t]||e)}catch(t){}}for(n in z)!(o=l[n])||o[t]&&!i||p(o,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!c(t))return!1;var e=d(t);return"DataView"===e||u(z,e)||u(N,e)},isTypedArray:H,TypedArray:I,TypedArrayPrototype:A}},93479:(t,e,i)=>{var n=i(68273),o=i(89709),s=i(98188),r=i(74440),a=i(77825),l=i(47690),h=o([].push),c=function(t){var e=1==t,i=2==t,o=3==t,c=4==t,u=6==t,d=7==t,g=5==t||u;return function(f,p,m,b){for(var v,x,y=r(f),_=s(y),w=n(p,m),S=a(_),M=0,C=b||l,k=e?C(f,S):i||d?C(f,0):void 0;S>M;M++)if((g||M in _)&&(x=w(v=_[M],M,y),t))if(e)k[M]=x;else if(x)switch(t){case 3:return!0;case 5:return v;case 6:return M;case 2:h(k,v)}else switch(t){case 4:return!1;case 7:h(k,v)}return u?-1:o||c?c:k}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},81788:(t,e,i)=>{var n=i(89794),o=i(89709)("".slice);t.exports=function(t){return"Big"===o(n(t),0,3)}},11868:(t,e,i)=>{var n=i(6827),o=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&o(t)===t}},11249:(t,e,i)=>{var n=i(27806),o=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw o("Can't convert number to bigint");return BigInt(e)}},59996:(t,e,i)=>{var n=i(92815),o=RangeError;t.exports=function(t,e){var i=n(t);if(i%e)throw o("Wrong offset");return i}},92815:(t,e,i)=>{var n=i(46372),o=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw o("The argument can't be less than 0");return e}},4894:(t,e,i)=>{"use strict";var n=i(65689),o=i(52756),s=i(25244),r=i(26953),a=i(30664),l=i(66139),h=i(96997),c=i(26),u=i(49367),d=i(24100),g=i(11868),f=i(69223),p=i(92119),m=i(59996),b=i(8756),v=i(15110),x=i(89794),y=i(6827),_=i(36396),w=i(33981),S=i(26830),M=i(14322),C=i(44161).f,k=i(98576),R=i(93479).forEach,P=i(76080),I=i(97614),A=i(70172),E=i(33962),O=i(13042),D=E.get,F=E.set,T=E.enforce,L=I.f,V=A.f,z=Math.round,N=o.RangeError,B=h.ArrayBuffer,H=B.prototype,j=h.DataView,W=l.NATIVE_ARRAY_BUFFER_VIEWS,$=l.TYPED_ARRAY_TAG,G=l.TypedArray,U=l.TypedArrayPrototype,Y=l.aTypedArrayConstructor,q=l.isTypedArray,X="BYTES_PER_ELEMENT",J="Wrong length",K=function(t,e){Y(t);for(var i=0,n=e.length,o=new t(n);n>i;)o[i]=e[i++];return o},Z=function(t,e){L(t,e,{get:function(){return D(this)[e]}})},Q=function(t){var e;return S(H,t)||"ArrayBuffer"==(e=x(t))||"SharedArrayBuffer"==e},tt=function(t,e){return q(t)&&!_(e)&&e in t&&g(+e)&&e>=0},et=function(t,e){return e=b(e),tt(t,e)?u(2,t[e]):V(t,e)},it=function(t,e,i){return e=b(e),!(tt(t,e)&&y(i)&&v(i,"value"))||v(i,"get")||v(i,"set")||i.configurable||v(i,"writable")&&!i.writable||v(i,"enumerable")&&!i.enumerable?L(t,e,i):(t[e]=i.value,t)};r?(W||(A.f=et,I.f=it,Z(U,"buffer"),Z(U,"byteOffset"),Z(U,"byteLength"),Z(U,"length")),n({target:"Object",stat:!0,forced:!W},{getOwnPropertyDescriptor:et,defineProperty:it}),t.exports=function(t,e,i){var r=t.match(/\d+$/)[0]/8,l=t+(i?"Clamped":"")+"Array",h="get"+t,u="set"+t,g=o[l],b=g,v=b&&b.prototype,x={},_=function(t,e){L(t,e,{get:function(){return function(t,e){var i=D(t);return i.view[h](e*r+i.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var o=D(t);i&&(n=(n=z(n))<0?0:n>255?255:255&n),o.view[u](e*r+o.byteOffset,n,!0)}(this,e,t)},enumerable:!0})};W?a&&(b=e((function(t,e,i,n){return c(t,v),O(y(e)?Q(e)?void 0!==n?new g(e,m(i,r),n):void 0!==i?new g(e,m(i,r)):new g(e):q(e)?K(b,e):s(k,b,e):new g(p(e)),t,b)})),M&&M(b,G),R(C(g),(function(t){t in b||d(b,t,g[t])})),b.prototype=v):(b=e((function(t,e,i,n){c(t,v);var o,a,l,h=0,u=0;if(y(e)){if(!Q(e))return q(e)?K(b,e):s(k,b,e);o=e,u=m(i,r);var d=e.byteLength;if(void 0===n){if(d%r)throw N(J);if((a=d-u)<0)throw N(J)}else if((a=f(n)*r)+u>d)throw N(J);l=a/r}else l=p(e),o=new B(a=l*r);for(F(t,{buffer:o,byteOffset:u,byteLength:a,length:l,view:new j(o)});h<l;)_(t,h++)})),M&&M(b,G),v=b.prototype=w(U)),v.constructor!==b&&d(v,"constructor",b),T(v).TypedArrayConstructor=b,$&&d(v,$,l);var S=b!=g;x[l]=b,n({global:!0,constructor:!0,forced:S,sham:!W},x),X in b||d(b,X,r),X in v||d(v,X,r),P(l)}):t.exports=function(){}},30664:(t,e,i)=>{var n=i(52756),o=i(98462),s=i(95239),r=i(66139).NATIVE_ARRAY_BUFFER_VIEWS,a=n.ArrayBuffer,l=n.Int8Array;t.exports=!r||!o((function(){l(1)}))||!o((function(){new l(-1)}))||!s((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||o((function(){return 1!==new l(new a(2),1,void 0).length}))},98576:(t,e,i)=>{var n=i(68273),o=i(25244),s=i(62197),r=i(74440),a=i(77825),l=i(30898),h=i(23054),c=i(29254),u=i(81788),d=i(66139).aTypedArrayConstructor,g=i(11249);t.exports=function(t){var e,i,f,p,m,b,v,x,y=s(this),_=r(t),w=arguments.length,S=w>1?arguments[1]:void 0,M=void 0!==S,C=h(_);if(C&&!c(C))for(x=(v=l(_,C)).next,_=[];!(b=o(x,v)).done;)_.push(b.value);for(M&&w>2&&(S=n(S,arguments[2])),i=a(_),f=new(d(y))(i),p=u(f),e=0;i>e;e++)m=M?S(_[e],e):_[e],f[e]=p?g(m):+m;return f}},71236:(t,e,i)=>{"use strict";var n=i(65689),o=i(25244),s=i(27853),r=i(48920),a=i(1542),l=i(6357);n({target:"Promise",stat:!0},{allSettled:function(t){var e=this,i=r.f(e),n=i.resolve,h=i.reject,c=a((function(){var i=s(e.resolve),r=[],a=0,h=1;l(t,(function(t){var s=a++,l=!1;h++,o(i,e,t).then((function(t){l||(l=!0,r[s]={status:"fulfilled",value:t},--h||n(r))}),(function(t){l||(l=!0,r[s]={status:"rejected",reason:t},--h||n(r))}))})),--h||n(r)}));return c.error&&h(c.value),i.promise}})},91736:(t,e,i)=>{"use strict";var n=i(65689),o=i(57690),s=i(66353),r=i(98462),a=i(75072),l=i(47424),h=i(48576),c=i(49191),u=i(52297),d=s&&s.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!s&&r((function(){d.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=h(this,a("Promise")),i=l(t);return this.then(i?function(i){return c(e,t()).then((function(){return i}))}:t,i?function(i){return c(e,t()).then((function(){throw i}))}:t)}}),!o&&l(s)){var g=a("Promise").prototype.finally;d.finally!==g&&u(d,"finally",g,{unsafe:!0})}},80345:(t,e,i)=>{"use strict";var n=i(66139),o=i(46650),s=i(11249),r=i(89794),a=i(25244),l=i(89709),h=i(98462),c=n.aTypedArray,u=n.exportTypedArrayMethod,d=l("".slice);u("fill",(function(t){var e=arguments.length;c(this);var i="Big"===d(r(this),0,3)?s(t):+t;return a(o,this,i,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),h((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},57278:(t,e,i)=>{"use strict";var n=i(52756),o=i(25244),s=i(66139),r=i(77825),a=i(59996),l=i(74440),h=i(98462),c=n.RangeError,u=n.Int8Array,d=u&&u.prototype,g=d&&d.set,f=s.aTypedArray,p=s.exportTypedArrayMethod,m=!h((function(){var t=new Uint8ClampedArray(2);return o(g,t,{length:1,0:3},1),3!==t[1]})),b=m&&s.NATIVE_ARRAY_BUFFER_VIEWS&&h((function(){var t=new u(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));p("set",(function(t){f(this);var e=a(arguments.length>1?arguments[1]:void 0,1),i=l(t);if(m)return o(g,this,i,e);var n=this.length,s=r(i),h=0;if(s+e>n)throw c("Wrong length");for(;h<s;)this[e+h]=i[h++]}),!m||b)},47156:(t,e,i)=>{"use strict";var n=i(52756),o=i(89709),s=i(98462),r=i(27853),a=i(62315),l=i(66139),h=i(34827),c=i(31385),u=i(35649),d=i(10209),g=l.aTypedArray,f=l.exportTypedArrayMethod,p=n.Uint16Array,m=p&&o(p.prototype.sort),b=!(!m||s((function(){m(new p(2),null)}))&&s((function(){m(new p(2),{})}))),v=!!m&&!s((function(){if(u)return u<74;if(h)return h<67;if(c)return!0;if(d)return d<602;var t,e,i=new p(516),n=Array(516);for(t=0;t<516;t++)e=t%4,i[t]=515-t,n[t]=t-2*e+3;for(m(i,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(i[t]!==n[t])return!0}));f("sort",(function(t){return void 0!==t&&r(t),v?m(this,t):a(g(this),function(t){return function(e,i){return void 0!==t?+t(e,i)||0:i!=i?-1:e!=e?1:0===e&&0===i?1/e>0&&1/i<0?1:-1:e>i}}(t))}),!v||b)},72020:(t,e,i)=>{"use strict";var n=i(52756),o=i(7322),s=i(66139),r=i(98462),a=i(23653),l=n.Int8Array,h=s.aTypedArray,c=s.exportTypedArrayMethod,u=[].toLocaleString,d=!!l&&r((function(){u.call(new l(1))}));c("toLocaleString",(function(){return o(u,d?a(h(this)):h(this),a(arguments))}),r((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!r((function(){l.prototype.toLocaleString.call([1,2])})))},28937:(t,e,i)=>{i(4894)("Uint32",(function(t){return function(e,i,n){return t(this,e,i,n)}}))},27105:(t,e,i)=>{i(71236)},55161:function(t,e,i){"use strict";function n(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}var o="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,i){t!=Array.prototype&&t!=Object.prototype&&(t[e]=i.value)},s="undefined"!=typeof window&&window===this?this:void 0!==i.g&&null!=i.g?i.g:this;function r(){r=function(){},s.Symbol||(s.Symbol=h)}function a(t,e){this.b=t,o(this,"description",{configurable:!0,writable:!0,value:e})}a.prototype.toString=function(){return this.b};var l,h=(l=0,function t(e){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new a("jscomp_symbol_"+(e||"")+"_"+l++,e)});function c(){r();var t=s.Symbol.iterator;t||(t=s.Symbol.iterator=s.Symbol("Symbol.iterator")),"function"!=typeof Array.prototype[t]&&o(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return function(t){return c(),(t={next:t})[s.Symbol.iterator]=function(){return this},t}(n(this))}}),c=function(){}}function u(t,e){if(e){var i=s;t=t.split(".");for(var n=0;n<t.length-1;n++){var r=t[n];r in i||(i[r]={}),i=i[r]}(e=e(n=i[t=t[t.length-1]]))!=n&&null!=e&&o(i,t,{configurable:!0,writable:!0,value:e})}}function d(t){var e="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];return e?e.call(t):{next:n(t)}}u("Array.prototype.keys",(function(t){return t||function(){return function(t,e){c(),t instanceof String&&(t+="");var i=0,n={next:function(){if(i<t.length){var o=i++;return{value:e(o,t[o]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[Symbol.iterator]=function(){return n},n}(this,(function(t){return t}))}})),u("Promise",(function(t){function e(t){this.h=0,this.m=void 0,this.b=[];var e=this.j();try{t(e.resolve,e.reject)}catch(t){e.reject(t)}}function i(){this.b=null}function n(t){return t instanceof e?t:new e((function(e){e(t)}))}if(t)return t;i.prototype.h=function(t){if(null==this.b){this.b=[];var e=this;this.j((function(){e.m()}))}this.b.push(t)};var o=s.setTimeout;i.prototype.j=function(t){o(t,0)},i.prototype.m=function(){for(;this.b&&this.b.length;){var t=this.b;this.b=[];for(var e=0;e<t.length;++e){var i=t[e];t[e]=null;try{i()}catch(t){this.l(t)}}}this.b=null},i.prototype.l=function(t){this.j((function(){throw t}))},e.prototype.j=function(){function t(t){return function(n){i||(i=!0,t.call(e,n))}}var e=this,i=!1;return{resolve:t(this.L),reject:t(this.l)}},e.prototype.L=function(t){if(t===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.M(t);else{t:switch(typeof t){case"object":var i=null!=t;break t;case"function":i=!0;break t;default:i=!1}i?this.K(t):this.w(t)}},e.prototype.K=function(t){var e=void 0;try{e=t.then}catch(t){return void this.l(t)}"function"==typeof e?this.N(e,t):this.w(t)},e.prototype.l=function(t){this.B(2,t)},e.prototype.w=function(t){this.B(1,t)},e.prototype.B=function(t,e){if(0!=this.h)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.h);this.h=t,this.m=e,this.I()},e.prototype.I=function(){if(null!=this.b){for(var t=0;t<this.b.length;++t)r.h(this.b[t]);this.b=null}};var r=new i;return e.prototype.M=function(t){var e=this.j();t.F(e.resolve,e.reject)},e.prototype.N=function(t,e){var i=this.j();try{t.call(e,i.resolve,i.reject)}catch(t){i.reject(t)}},e.prototype.then=function(t,i){function n(t,e){return"function"==typeof t?function(e){try{o(t(e))}catch(t){s(t)}}:e}var o,s,r=new e((function(t,e){o=t,s=e}));return this.F(n(t,o),n(i,s)),r},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.F=function(t,e){function i(){switch(n.h){case 1:t(n.m);break;case 2:e(n.m);break;default:throw Error("Unexpected state: "+n.h)}}var n=this;null==this.b?r.h(i):this.b.push(i)},e.resolve=n,e.reject=function(t){return new e((function(e,i){i(t)}))},e.race=function(t){return new e((function(e,i){for(var o=d(t),s=o.next();!s.done;s=o.next())n(s.value).F(e,i)}))},e.all=function(t){var i=d(t),o=i.next();return o.done?n([]):new e((function(t,e){function s(e){return function(i){r[e]=i,0==--a&&t(r)}}var r=[],a=0;do{r.push(void 0),a++,n(o.value).F(s(r.length-1),e),o=i.next()}while(!o.done)}))},e})),function(e,i,n){var o;(o=n.define)&&o.amd?o([],(function(){return i})):(o=n.modules)?o["FlexSearch".toLowerCase()]=i:t.exports=i}(0,function t(e){function i(t,e){var i=e?e.id:t&&t.id;this.id=i||0===i?i:E++,this.init(t,e),a(this,"index",(function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].f):Object.keys(this.f)})),a(this,"length",(function(){return this.index.length}))}function n(t,e,i,n){return this.D!==this.i&&(this.A=this.A.concat(i),this.D++,n&&this.A.length>=n&&(this.D=this.i),this.D===this.i&&(this.cache&&this.u.set(e,this.A),this.H&&this.H(this.A))),this}function o(t){var e,i=M();for(e in t)if(t.hasOwnProperty(e)){var n=t[e];x(n)?i[e]=n.slice(0):_(n)?i[e]=o(n):i[e]=n}return i}function s(t,e){for(var i=t.length,n=y(e),o=[],s=0,r=0;s<i;s++){var a=t[s];(n&&e(a)||!n&&!e[a])&&(o[r++]=a)}return o}function r(t,e,i,n,o,s,r,a,l,h){if(i=b(i,r?0:o,a,s,e,l,h),a){a=i.page;var c=i.next;i=i.result}if(r)e=this.where(r,null,o,i);else{for(e=i,i=this.v,o=e.length,s=Array(o),r=0;r<o;r++)s[r]=i[e[r]];e=s}return i=e,n&&(y(n)||(1<(R=n.split(":")).length?n=p:(R=R[0],n=f)),i.sort(n)),i=m(a,c,i),this.cache&&this.u.set(t,i),i}function a(t,e,i){Object.defineProperty(t,e,{get:i})}function l(t){return new RegExp(t,"g")}function h(t,e){for(var i=0;i<e.length;i+=2)t=t.replace(e[i],e[i+1]);return t}function c(t,e,i,n,o,s,r,a){return e[i]?e[i]:(o=o?(a-(r||a/1.5))*s+(r||a/1.5)*o:s,e[i]=o,o>=r&&((t=(t=t[a-(o+.5|0)])[i]||(t[i]=[]))[t.length]=n),o)}function u(t,e){if(t)for(var i=Object.keys(t),n=0,o=i.length;n<o;n++){var s=i[n],r=t[s];if(r)for(var a=0,l=r.length;a<l;a++){if(r[a]===e){1===l?delete t[s]:r.splice(a,1);break}_(r[a])&&u(r[a],e)}}}function d(t){for(var e="",i="",n="",o=0;o<t.length;o++){var s=t[o];s!==i&&(o&&"h"===s?(n="a"===n||"e"===n||"i"===n||"o"===n||"u"===n||"y"===n,(("a"===i||"e"===i||"i"===i||"o"===i||"u"===i||"y"===i)&&n||" "===i)&&(e+=s)):e+=s),n=o===t.length-1?"":t[o+1],i=s}return e}function g(t,e){return 0>(t=t.length-e.length)?1:t?-1:0}function f(t,e){return(t=t[R])<(e=e[R])?-1:t>e?1:0}function p(t,e){for(var i=R.length,n=0;n<i;n++)t=t[R[n]],e=e[R[n]];return t<e?-1:t>e?1:0}function m(t,e,i){return t?{page:t,next:e?""+e:null,result:i}:i}function b(t,e,i,n,o,s,r){var a=[];if(!0===i){i="0";var l=""}else l=i&&i.split(":");var h=t.length;if(1<h){var c,u,d,g,f=M(),p=[],b=0,x=!0,y=0;if(l)if(2===l.length){var _=l;l=!1}else l=d=parseInt(l[0],10);if(r){for(c=M();b<h;b++)if("not"===o[b]){var S=t[b],C=S.length;for(u=0;u<C;u++)c["@"+S[u]]=1}else var k=b+1;if(w(k))return m(i,F,a);b=0}else var R=v(o)&&o;for(;b<h;b++){var P=b===(k||h)-1;if(!R||!b)if((u=R||o&&o[b])&&"and"!==u){if("or"!==u)continue;g=!1}else g=s=!0;if(C=(S=t[b]).length){if(x){if(!E){E=S;continue}var I=E.length;for(u=0;u<I;u++){var A="@"+(x=E[u]);r&&c[A]||(f[A]=1,s||(a[y++]=x))}var E=null;x=!1}for(A=!1,u=0;u<C;u++){var O="@"+(I=S[u]),D=s?f[O]||0:b;if(!(!D&&!n||r&&c[O]||!s&&f[O]))if(D===b){if(P){if((!d||--d<y)&&(a[y++]=I,e&&y===e))return m(i,y+(l||0),a)}else f[O]=b+1;A=!0}else n&&((O=p[D]||(p[D]=[]))[O.length]=I)}if(g&&!A&&!n)break}else if(g&&!n)return m(i,F,S)}if(E)if(b=E.length,r)for(u=l?parseInt(l,10):0;u<b;u++)c["@"+(t=E[u])]||(a[y++]=t);else a=E;if(n)for(y=a.length,_?(b=parseInt(_[0],10)+1,u=parseInt(_[1],10)+1):(b=p.length,u=0);b--;)if(I=p[b]){for(C=I.length;u<C;u++)if(n=I[u],(!r||!c["@"+n])&&(a[y++]=n,e&&y===e))return m(i,b+":"+u,a);u=0}}else!h||o&&"not"===o[0]||(a=t[0],l&&(l=parseInt(l[0],10)));if(e){r=a.length,l&&l>r&&(l=0);var F=(l=l||0)+e;F<r?a=a.slice(l,F):(F=0,l&&(a=a.slice(l)))}return m(i,F,a)}function v(t){return"string"==typeof t}function x(t){return t.constructor===Array}function y(t){return"function"==typeof t}function _(t){return"object"==typeof t}function w(t){return void 0===t}function S(t){for(var e=Array(t),i=0;i<t;i++)e[i]=M();return e}function M(){return Object.create(null)}function C(){var t,e;self.onmessage=function(i){if(i=i.data)if(i.search){var n=e.search(i.content,i.threshold?{limit:i.limit,threshold:i.threshold,where:i.where}:i.limit);self.postMessage({id:t,content:i.content,limit:i.limit,result:n})}else i.add?e.add(i.id,i.content):i.update?e.update(i.id,i.content):i.remove?e.remove(i.id):i.clear?e.clear():i.info?((i=e.info()).worker=t,console.log(i)):i.register&&(t=i.id,i.options.cache=!1,i.options.async=!1,i.options.worker=!1,e=new(e=new Function(i.register.substring(i.register.indexOf("{")+1,i.register.lastIndexOf("}")))())(i.options))}}function k(i,n,o,s){i=e("flexsearch","id"+i,C,(function(t){(t=t.data)&&t.result&&s(t.id,t.content,t.result,t.limit,t.where,t.cursor,t.suggest)}),n);var r=t.toString();return o.id=n,i.postMessage({register:r,options:o,id:n}),i}var R,P={encode:"icase",g:"forward",split:/\W+/,cache:!1,async:!1,i:!1,G:!1,a:!1,c:9,threshold:0,depth:0},I={memory:{encode:"extra",g:"strict",threshold:0,c:1},speed:{encode:"icase",g:"strict",threshold:1,c:3,depth:2},match:{encode:"extra",g:"full",threshold:1,c:3},score:{encode:"extra",g:"strict",threshold:1,c:9,depth:4},balance:{encode:"balance",g:"strict",threshold:0,c:3,depth:3},fast:{encode:"icase",g:"strict",threshold:8,c:9,depth:1}},A=[],E=0,O={},D={};i.create=function(t,e){return new i(t,e)},i.registerMatcher=function(t){for(var e in t)t.hasOwnProperty(e)&&A.push(l(e),t[e]);return this},i.registerEncoder=function(t,e){return N[t]=e.bind(N),this},i.registerLanguage=function(t,e){return O[t]=e.filter,D[t]=e.stemmer,this},i.encode=function(t,e){return N[t](e)},i.prototype.init=function(t,e){if(this.h=[],e){var s=e.preset;t=e}else t||(t=P),s=t.preset;if(e={},v(t)?((e=I[t])||console.warn("Preset not found: "+t),t={}):s&&((e=I[s])||console.warn("Preset not found: "+s)),s=t.worker)if("undefined"==typeof Worker)t.worker=!1,this.b=null;else{var r=parseInt(s,10)||4;this.w=-1,this.D=0,this.A=[],this.H=null,this.b=Array(r);for(var a=0;a<r;a++)this.b[a]=k(this.id,a,t,n.bind(this))}if(this.g=t.tokenize||e.g||this.g||P.g,this.split=w(s=t.split)?this.split||P.split:v(s)?l(s):s,this.G=t.rtl||this.G||P.G,this.async="undefined"==typeof Promise||w(s=t.async)?this.async||P.async:s,this.i=w(s=t.worker)?this.i||P.i:s,this.threshold=w(s=t.threshold)?e.threshold||this.threshold||P.threshold:s,this.c=w(s=t.resolution)?s=e.c||this.c||P.c:s,s<=this.threshold&&(this.c=this.threshold+1),this.depth="strict"!==this.g||w(s=t.depth)?e.depth||this.depth||P.depth:s,this.j=(s=w(s=t.encode)?e.encode||P.encode:s)&&N[s]&&N[s].bind(N)||(y(s)?s:this.j||!1),(s=t.matcher)&&this.addMatcher(s),s=(e=t.lang)||t.filter){if(v(s)&&(s=O[s]),x(s)){r=this.j,a=M();for(var h=0;h<s.length;h++){var c=r?r(s[h]):s[h];a[c]=1}s=a}this.filter=s}if(s=e||t.stemmer){for(var u in e=v(s)?D[s]:s,r=this.j,a=[],e)e.hasOwnProperty(u)&&(h=r?r(u):u,a.push(l(h+"($|\\W)"),r?r(e[u]):e[u]));this.stemmer=a}if(this.a=a=(s=t.doc)?o(s):this.a||P.a,this.s=S(this.c-(this.threshold||0)),this.o=M(),this.f=M(),a){if(this.v=M(),t.doc=null,u=a.index={},e=a.keys=[],r=a.field,h=a.tag,c=a.store,x(a.id)||(a.id=a.id.split(":")),c){var d=M();if(v(c))d[c]=1;else if(x(c))for(var g=0;g<c.length;g++)d[c[g]]=1;else _(c)&&(d=c);a.store=d}if(h){if(this.B=M(),c=M(),r)if(v(r))c[r]=t;else if(x(r))for(d=0;d<r.length;d++)c[r[d]]=t;else _(r)&&(c=r);for(x(h)||(a.tag=h=[h]),r=0;r<h.length;r++)this.B[h[r]]=M();this.I=h,r=c}if(r){if(!x(r))if(_(r)){var f=r;a.field=r=Object.keys(r)}else a.field=r=[r];for(a=0;a<r.length;a++)x(h=r[a])||(f&&(t=f[h]),e[a]=h,r[a]=h.split(":")),u[h]=new i(t)}t.doc=s}return this.m=!0,this.u=!!(this.cache=s=w(s=t.cache)?this.cache||P.cache:s)&&new B(s),this},i.prototype.encode=function(t){return t&&(A.length&&(t=h(t,A)),this.h.length&&(t=h(t,this.h)),this.j&&(t=this.j(t)),this.stemmer&&(t=h(t,this.stemmer))),t},i.prototype.addMatcher=function(t){var e,i=this.h;for(e in t)t.hasOwnProperty(e)&&i.push(l(e),t[e]);return this},i.prototype.add=function(t,e,i,n,o){if(this.a&&_(t))return this.l("add",t,e);if(e&&v(e)&&(t||0===t)){var r="@"+t;if(this.f[r]&&!n)return this.update(t,e);if(this.i)return++this.w>=this.b.length&&(this.w=0),this.b[this.w].postMessage({add:!0,id:t,content:e}),this.f[r]=""+this.w,i&&i(),this;if(!o){if(this.async&&"function"!=typeof importScripts){var a=this;return r=new Promise((function(i){setTimeout((function(){a.add(t,e,null,n,!0),a=null,i()}))})),i?(r.then(i),this):r}if(i)return this.add(t,e,null,n,!0),i(),this}if(!(e=this.encode(e)).length)return this;o=y(i=this.g)?i(e):e.split(this.split),this.filter&&(o=s(o,this.filter));var l=M();l._ctx=M();for(var h=o.length,u=this.threshold,d=this.depth,g=this.c,f=this.s,p=this.G,m=0;m<h;m++){var b=o[m];if(b){var x=b.length,w=(p?m+1:h-m)/h,C="";switch(i){case"reverse":case"both":for(var k=x;--k;)c(f,l,C=b[k]+C,t,p?1:(x-k)/x,w,u,g-1);C="";case"forward":for(k=0;k<x;k++)c(f,l,C+=b[k],t,p?(k+1)/x:1,w,u,g-1);break;case"full":for(k=0;k<x;k++)for(var R=(p?k+1:x-k)/x,P=x;P>k;P--)c(f,l,C=b.substring(k,P),t,R,w,u,g-1);break;default:if(x=c(f,l,b,t,1,w,u,g-1),d&&1<h&&x>=u)for(x=l._ctx[b]||(l._ctx[b]=M()),b=this.o[b]||(this.o[b]=S(g-(u||0))),0>(w=m-d)&&(w=0),(C=m+d+1)>h&&(C=h);w<C;w++)w!==m&&c(b,x,o[w],t,0,g-(w<m?m-w:w-m),u,g-1)}}}this.f[r]=1,this.m=!1}return this},i.prototype.l=function(t,e,i){if(x(e)){var n=e.length;if(n--){for(var o=0;o<n;o++)this.l(t,e[o]);return this.l(t,e[n],i)}}else{var s,r=this.a.index,a=this.a.keys,l=this.a.tag;o=this.a.store;var h=this.a.id;n=e;for(var c=0;c<h.length;c++)n=n[h[c]];if("remove"===t&&(delete this.v[n],h=a.length,h--)){for(e=0;e<h;e++)r[a[e]].remove(n);return r[a[h]].remove(n,i)}if(l){for(s=0;s<l.length;s++){var u=l[s],d=e;for(h=u.split(":"),c=0;c<h.length;c++)d=d[h[c]];d="@"+d}s=(s=this.B[u])[d]||(s[d]=[])}for(l=0,u=(h=this.a.field).length;l<u;l++){c=h[l],d=e;for(var g=0;g<c.length;g++)d=d[c[g]];c=r[a[l]],g="add"===t?c.add:c.update,l===u-1?g.call(c,n,d,i):g.call(c,n,d)}if(o){for(i=Object.keys(o),t=M(),r=0;r<i.length;r++)if(o[a=i[r]])for(a=a.split(":"),l=h=void 0,u=0;u<a.length;u++)h=(h||e)[d=a[u]],l=(l||t)[d]=h;e=t}s&&(s[s.length]=e),this.v[n]=e}return this},i.prototype.update=function(t,e,i){return this.a&&_(t)?this.l("update",t,e):(this.f["@"+t]&&v(e)&&(this.remove(t),this.add(t,e,i,!0)),this)},i.prototype.remove=function(t,e,i){if(this.a&&_(t))return this.l("remove",t,e);var n="@"+t;if(this.f[n]){if(this.i)return this.b[this.f[n]].postMessage({remove:!0,id:t}),delete this.f[n],e&&e(),this;if(!i){if(this.async&&"function"!=typeof importScripts){var o=this;return n=new Promise((function(e){setTimeout((function(){o.remove(t,null,!0),o=null,e()}))})),e?(n.then(e),this):n}if(e)return this.remove(t,null,!0),e(),this}for(e=0;e<this.c-(this.threshold||0);e++)u(this.s[e],t);this.depth&&u(this.o,t),delete this.f[n],this.m=!1}return this},i.prototype.search=function(t,e,i,n){if(_(e)){if(x(e))for(var o=0;o<e.length;o++)e[o].query=t;else e.query=t;t=e,e=1e3}else e&&y(e)?(i=e,e=1e3):e||0===e||(e=1e3);if(!this.i){var a=[],l=t;if(_(t)&&!x(t)){i||(i=t.callback)&&(l.callback=null);var h=t.sort,c=t.page;e=t.limit,N=t.threshold;var u=t.suggest;t=t.query}if(this.a){N=this.a.index;var d,f,p=l.where,m=l.bool||"or",w=l.field,S=m;if(w)x(w)||(w=[w]);else if(x(l)){var C=l;w=[],S=[];for(var k=0;k<l.length;k++)o=(n=l[k]).bool||m,w[k]=n.field,S[k]=o,"not"===o?d=!0:"and"===o&&(f=!0)}else w=this.a.keys;for(m=w.length,k=0;k<m;k++)C&&(l=C[k]),c&&!v(l)&&(l.page=null,l.limit=0),a[k]=N[w[k]].search(l,0);if(i)return i(r.call(this,t,S,a,h,e,u,p,c,f,d));if(this.async){var R=this;return new Promise((function(i){Promise.all(a).then((function(n){i(r.call(R,t,S,n,h,e,u,p,c,f,d))}))}))}return r.call(this,t,S,a,h,e,u,p,c,f,d)}if(N||(N=this.threshold||0),!n){if(this.async&&"function"!=typeof importScripts){var P=this;return N=new Promise((function(t){setTimeout((function(){t(P.search(l,e,null,!0)),P=null}))})),i?(N.then(i),this):N}if(i)return i(this.search(l,e,null,!0)),this}if(!t||!v(t))return a;if(l=t,this.cache)if(this.m){if(i=this.u.get(t))return i}else this.u.clear(),this.m=!0;if(!(l=this.encode(l)).length)return a;i=y(i=this.g)?i(l):l.split(this.split),this.filter&&(i=s(i,this.filter)),C=i.length,n=!0,o=[];var I=M(),A=0;if(1<C&&(this.depth&&"strict"===this.g?m=!0:i.sort(g)),!m||(k=this.o))for(var E=this.c;A<C;A++){var O=i[A];if(O){if(m){if(!w)if(k[O])w=O,I[O]=1;else if(!u)return a;if(u&&A===C-1&&!o.length)m=!1,I[O=w||O]=0;else if(!w)continue}if(!I[O]){var D=[],F=!1,T=0,L=m?k[w]:this.s;if(L)for(var V=void 0,z=0;z<E-N;z++)(V=L[z]&&L[z][O])&&(D[T++]=V,F=!0);if(F)w=O,o[o.length]=1<T?D.concat.apply([],D):D[0];else if(!u){n=!1;break}I[O]=1}}}else n=!1;return n&&(a=b(o,e,c,u)),this.cache&&this.u.set(t,a),a}this.H=i,this.D=0,this.A=[];for(var N=0;N<this.i;N++)this.b[N].postMessage({search:!0,limit:e,content:t})},i.prototype.find=function(t,e){return this.where(t,e,1)[0]||null},i.prototype.where=function(t,e,i,n){var o,s=this.v,r=[],a=0;if(_(t)){i||(i=e);var l=Object.keys(t),h=l.length,c=!1;if(1===h&&"id"===l[0])return[s[t.id]];if((o=this.I)&&!n)for(var u=0;u<o.length;u++){var d=o[u],g=t[d];if(!w(g)){var f=this.B[d]["@"+g];if(0==--h)return f;l.splice(l.indexOf(d),1),delete t[d];break}}for(o=Array(h),u=0;u<h;u++)o[u]=l[u].split(":")}else{if(y(t)){for(i=(e=n||Object.keys(s)).length,l=0;l<i;l++)t(h=s[e[l]])&&(r[a++]=h);return r}if(w(e))return[s[t]];if("id"===t)return[s[e]];l=[t],h=1,o=[t.split(":")],c=!0}for(u=(n=f||n||Object.keys(s)).length,d=0;d<u;d++){g=f?n[d]:s[n[d]];for(var p=!0,m=0;m<h;m++){c||(e=t[l[m]]);var b=o[m],v=b.length,x=g;if(1<v)for(var S=0;S<v;S++)x=x[b[S]];else x=x[b[0]];if(x!==e){p=!1;break}}if(p&&(r[a++]=g,i&&a===i))break}return r},i.prototype.info=function(){if(!this.i)return{id:this.id,items:this.length,cache:!(!this.cache||!this.cache.C)&&this.cache.C.length,matcher:A.length+(this.h?this.h.length:0),worker:this.i,threshold:this.threshold,depth:this.depth,resolution:this.c,contextual:this.depth&&"strict"===this.g};for(var t=0;t<this.i;t++)this.b[t].postMessage({info:!0,id:this.id})},i.prototype.clear=function(){return this.destroy().init()},i.prototype.destroy=function(){if(this.cache&&(this.u.clear(),this.u=null),this.s=this.o=this.f=null,this.a){for(var t=this.a.keys,e=0;e<t.length;e++)this.a.index[t[e]].destroy();this.a=this.v=null}return this},i.prototype.export=function(t){var e=!t||w(t.serialize)||t.serialize;if(this.a){var i=!t||w(t.doc)||t.doc,n=!t||w(t.index)||t.index;t=[];var o=0;if(n)for(n=this.a.keys;o<n.length;o++){var s=this.a.index[n[o]];t[o]=[s.s,s.o,Object.keys(s.f)]}i&&(t[o]=this.v)}else t=[this.s,this.o,Object.keys(this.f)];return e&&(t=JSON.stringify(t)),t},i.prototype.import=function(t,e){(!e||w(e.serialize)||e.serialize)&&(t=JSON.parse(t));var i=M();if(this.a){var n=!e||w(e.doc)||e.doc,o=0;if(!e||w(e.index)||e.index){for(var s=(e=this.a.keys).length,r=t[0][2];o<r.length;o++)i[r[o]]=1;for(o=0;o<s;o++){r=this.a.index[e[o]];var a=t[o];a&&(r.s=a[0],r.o=a[1],r.f=i)}}n&&(this.v=_(n)?n:t[o])}else{for(n=t[2],o=0;o<n.length;o++)i[n[o]]=1;this.s=t[0],this.o=t[1],this.f=i}};var F,T,L,V,z=(T=l("\\s+"),L=l("[^a-z0-9 ]"),V=[l("[-/]")," ",L,"",T," "],function(t){return d(h(t.toLowerCase(),V))}),N={icase:function(t){return t.toLowerCase()},simple:function(){var t=l("\\s+"),e=l("[^a-z0-9 ]"),i=l("[-/]"),n=[l("[àáâãäå]"),"a",l("[èéêë]"),"e",l("[ìíîï]"),"i",l("[òóôõöő]"),"o",l("[ùúûüű]"),"u",l("[ýŷÿ]"),"y",l("ñ"),"n",l("[çc]"),"k",l("ß"),"s",l(" & ")," and ",i," ",e,"",t," "];return function(t){return" "===(t=h(t.toLowerCase(),n))?"":t}}(),advanced:function(){var t=l("ae"),e=l("ai"),i=l("ay"),n=l("ey"),o=l("oe"),s=l("ue"),r=l("ie"),a=l("sz"),c=l("zs"),u=l("ck"),g=l("cc"),f=[t,"a",e,"ei",i,"ei",n,"ei",o,"o",s,"u",r,"i",a,"s",c,"s",l("sh"),"s",u,"k",g,"k",l("th"),"t",l("dt"),"t",l("ph"),"f",l("pf"),"f",l("ou"),"o",l("uo"),"u"];return function(t,e){return t?(2<(t=this.simple(t)).length&&(t=h(t,f)),e||1<t.length&&(t=d(t)),t):t}}(),extra:(F=[l("p"),"b",l("z"),"s",l("[cgq]"),"k",l("n"),"m",l("d"),"t",l("[vw]"),"f",l("[aeiouy]"),""],function(t){if(!t)return t;if(1<(t=this.advanced(t,!0)).length){t=t.split(" ");for(var e=0;e<t.length;e++){var i=t[e];1<i.length&&(t[e]=i[0]+h(i.substring(1),F))}t=d(t=t.join(" "))}return t}),balance:z},B=function(){function t(t){this.clear(),this.J=!0!==t&&t}return t.prototype.clear=function(){this.cache=M(),this.count=M(),this.index=M(),this.C=[]},t.prototype.set=function(t,e){if(this.J&&w(this.cache[t])){var i=this.C.length;if(i===this.J){i--;var n=this.C[i];delete this.cache[n],delete this.count[n],delete this.index[n]}this.index[t]=i,this.C[i]=t,this.count[t]=-1,this.cache[t]=e,this.get(t)}else this.cache[t]=e},t.prototype.get=function(t){var e=this.cache[t];if(this.J&&e){var i=++this.count[t],n=this.index,o=n[t];if(0<o){for(var s=this.C,r=o;this.count[s[--o]]<=i&&-1!==o;);if(++o!==r){for(i=r;i>o;i--)r=s[i-1],s[i]=r,n[r]=i;s[o]=t,n[t]=o}}}return e},t}();return i}(function(){var t={},e="undefined"!=typeof Blob&&"undefined"!=typeof URL&&URL.createObjectURL;return function(i,n,o,s,r){return o=e?URL.createObjectURL(new Blob(["("+o.toString()+")()"],{type:"text/javascript"})):i+".es5.js",t[i+="-"+n]||(t[i]=[]),t[i][r]=new Worker(o),t[i][r].onmessage=s,console.log("Register Worker: "+i+"@"+r),t[i][r]}}()),this)},92908:function(t){!function(e){"use strict";const i="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:new RegExp(`^${i}\\.${i}\\.${i}\\.${i}$`,"i"),threeOctet:new RegExp(`^${i}\\.${i}\\.${i}$`,"i"),twoOctet:new RegExp(`^${i}\\.${i}$`,"i"),longValue:new RegExp(`^${i}$`,"i")},o=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),r="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(r,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${r})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${i}\\.${i}\\.${i}\\.${i}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${i}\\.${i}\\.${i}\\.${i}(${r})?$`,"i")};function h(t,e){if(t.indexOf("::")!==t.lastIndexOf("::"))return null;let i,n,o=0,s=-1,r=(t.match(l.zoneIndex)||[])[0];for(r&&(r=r.substring(1),t=t.replace(/%.+$/,""));(s=t.indexOf(":",s+1))>=0;)o++;if("::"===t.substr(0,2)&&o--,"::"===t.substr(-2,2)&&o--,o>e)return null;for(n=e-o,i=":";n--;)i+="0:";return":"===(t=t.replace("::",i))[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),{parts:e=function(){const e=t.split(":"),i=[];for(let t=0;t<e.length;t++)i.push(parseInt(e[t],16));return i}(),zoneId:r}}function c(t,e,i,n){if(t.length!==e.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let o,s=0;for(;n>0;){if(o=i-n,o<0&&(o=0),t[s]>>o!=e[s]>>o)return!1;n-=i,s+=1}return!0}function u(t){if(s.test(t))return parseInt(t,16);if("0"===t[0]&&!isNaN(parseInt(t[1],10))){if(o.test(t))return parseInt(t,8);throw new Error(`ipaddr: cannot parse ${t} as octal`)}return parseInt(t,10)}function d(t,e){for(;t.length<e;)t=`0${t}`;return t}const g={};g.IPv4=function(){function t(t){if(4!==t.length)throw new Error("ipaddr: ipv4 octet count should be 4");let e,i;for(e=0;e<t.length;e++)if(i=t[e],!(0<=i&&i<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=t}return t.prototype.SpecialRanges={unspecified:[[new t([0,0,0,0]),8]],broadcast:[[new t([255,255,255,255]),32]],multicast:[[new t([224,0,0,0]),4]],linkLocal:[[new t([169,254,0,0]),16]],loopback:[[new t([127,0,0,0]),8]],carrierGradeNat:[[new t([100,64,0,0]),10]],private:[[new t([10,0,0,0]),8],[new t([172,16,0,0]),12],[new t([192,168,0,0]),16]],reserved:[[new t([192,0,0,0]),24],[new t([192,0,2,0]),24],[new t([192,88,99,0]),24],[new t([198,18,0,0]),15],[new t([198,51,100,0]),24],[new t([203,0,113,0]),24],[new t([240,0,0,0]),4]]},t.prototype.kind=function(){return"ipv4"},t.prototype.match=function(t,e){let i;if(void 0===e&&(i=t,t=i[0],e=i[1]),"ipv4"!==t.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return c(this.octets,t.octets,8,e)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,e=!1;const i={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let n,o,s;for(n=3;n>=0;n-=1){if(o=this.octets[n],!(o in i))return null;if(s=i[o],e&&0!==s)return null;8!==s&&(e=!0),t+=s}return 32-t},t.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.toIPv4MappedAddress=function(){return g.IPv6.parse(`::ffff:${this.toString()}`)},t.prototype.toNormalizedString=function(){return this.toString()},t.prototype.toString=function(){return this.octets.join(".")},t}(),g.IPv4.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),i=e[0].toByteArray(),n=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[];let s=0;for(;s<4;)o.push(parseInt(i[s],10)|255^parseInt(n[s],10)),s++;return new this(o)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.isIPv4=function(t){return null!==this.parser(t)},g.IPv4.isValid=function(t){try{return new this(this.parser(t)),!0}catch(t){return!1}},g.IPv4.isValidFourPartDecimal=function(t){return!(!g.IPv4.isValid(t)||!t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},g.IPv4.networkAddressFromCIDR=function(t){let e,i,n,o,s;try{for(e=this.parseCIDR(t),n=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[],i=0;i<4;)o.push(parseInt(n[i],10)&parseInt(s[i],10)),i++;return new this(o)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.parse=function(t){const e=this.parser(t);if(null===e)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(e)},g.IPv4.parseCIDR=function(t){let e;if(e=t.match(/^(.+)\/(\d+)$/)){const t=parseInt(e[2]);if(t>=0&&t<=32){const i=[this.parse(e[1]),t];return Object.defineProperty(i,"toString",{value:function(){return this.join("/")}}),i}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},g.IPv4.parser=function(t){let e,i,o;if(e=t.match(n.fourOctet))return function(){const t=e.slice(1,6),n=[];for(let e=0;e<t.length;e++)i=t[e],n.push(u(i));return n}();if(e=t.match(n.longValue)){if(o=u(e[1]),o>4294967295||o<0)throw new Error("ipaddr: address outside defined range");return function(){const t=[];let e;for(e=0;e<=24;e+=8)t.push(o>>e&255);return t}().reverse()}return(e=t.match(n.twoOctet))?function(){const t=e.slice(1,4),i=[];if(o=u(t[1]),o>16777215||o<0)throw new Error("ipaddr: address outside defined range");return i.push(u(t[0])),i.push(o>>16&255),i.push(o>>8&255),i.push(255&o),i}():(e=t.match(n.threeOctet))?function(){const t=e.slice(1,5),i=[];if(o=u(t[2]),o>65535||o<0)throw new Error("ipaddr: address outside defined range");return i.push(u(t[0])),i.push(u(t[1])),i.push(o>>8&255),i.push(255&o),i}():null},g.IPv4.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>32)throw new Error("ipaddr: invalid IPv4 prefix length");const e=[0,0,0,0];let i=0;const n=Math.floor(t/8);for(;i<n;)e[i]=255,i++;return n<4&&(e[n]=Math.pow(2,t%8)-1<<8-t%8),new this(e)},g.IPv6=function(){function t(t,e){let i,n;if(16===t.length)for(this.parts=[],i=0;i<=14;i+=2)this.parts.push(t[i]<<8|t[i+1]);else{if(8!==t.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=t}for(i=0;i<this.parts.length;i++)if(n=this.parts[i],!(0<=n&&n<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");e&&(this.zoneId=e)}return t.prototype.SpecialRanges={unspecified:[new t([0,0,0,0,0,0,0,0]),128],linkLocal:[new t([65152,0,0,0,0,0,0,0]),10],multicast:[new t([65280,0,0,0,0,0,0,0]),8],loopback:[new t([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new t([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new t([0,0,0,0,0,65535,0,0]),96],rfc6145:[new t([0,0,0,0,65535,0,0,0]),96],rfc6052:[new t([100,65435,0,0,0,0,0,0]),96],"6to4":[new t([8194,0,0,0,0,0,0,0]),16],teredo:[new t([8193,0,0,0,0,0,0,0]),32],reserved:[[new t([8193,3512,0,0,0,0,0,0]),32]],benchmarking:[new t([8193,2,0,0,0,0,0,0]),48],amt:[new t([8193,3,0,0,0,0,0,0]),32],as112v6:[new t([8193,4,274,0,0,0,0,0]),48],deprecated:[new t([8193,16,0,0,0,0,0,0]),28],orchid2:[new t([8193,32,0,0,0,0,0,0]),28]},t.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},t.prototype.kind=function(){return"ipv6"},t.prototype.match=function(t,e){let i;if(void 0===e&&(i=t,t=i[0],e=i[1]),"ipv6"!==t.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return c(this.parts,t.parts,16,e)},t.prototype.prefixLengthFromSubnetMask=function(){let t=0,e=!1;const i={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let n,o;for(let s=7;s>=0;s-=1){if(n=this.parts[s],!(n in i))return null;if(o=i[n],e&&0!==o)return null;16!==o&&(e=!0),t+=o}return 128-t},t.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){let t;const e=[],i=this.parts;for(let n=0;n<i.length;n++)t=i[n],e.push(t>>8),e.push(255&t);return e},t.prototype.toFixedLengthString=function(){const t=function(){const t=[];for(let e=0;e<this.parts.length;e++)t.push(d(this.parts[e].toString(16),4));return t}.call(this).join(":");let e="";return this.zoneId&&(e=`%${this.zoneId}`),t+e},t.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const t=this.parts.slice(-2),e=t[0],i=t[1];return new g.IPv4([e>>8,255&e,i>>8,255&i])},t.prototype.toNormalizedString=function(){const t=function(){const t=[];for(let e=0;e<this.parts.length;e++)t.push(this.parts[e].toString(16));return t}.call(this).join(":");let e="";return this.zoneId&&(e=`%${this.zoneId}`),t+e},t.prototype.toRFC5952String=function(){const t=/((^|:)(0(:|$)){2,})/g,e=this.toNormalizedString();let i,n=0,o=-1;for(;i=t.exec(e);)i[0].length>o&&(n=i.index,o=i[0].length);return o<0?e:`${e.substring(0,n)}::${e.substring(n+o)}`},t.prototype.toString=function(){return this.toRFC5952String()},t}(),g.IPv6.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),i=e[0].toByteArray(),n=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[];let s=0;for(;s<16;)o.push(parseInt(i[s],10)|255^parseInt(n[s],10)),s++;return new this(o)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},g.IPv6.isIPv6=function(t){return null!==this.parser(t)},g.IPv6.isValid=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{const e=this.parser(t);return new this(e.parts,e.zoneId),!0}catch(t){return!1}},g.IPv6.networkAddressFromCIDR=function(t){let e,i,n,o,s;try{for(e=this.parseCIDR(t),n=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[],i=0;i<16;)o.push(parseInt(n[i],10)&parseInt(s[i],10)),i++;return new this(o)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},g.IPv6.parse=function(t){const e=this.parser(t);if(null===e.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(e.parts,e.zoneId)},g.IPv6.parseCIDR=function(t){let e,i,n;if((i=t.match(/^(.+)\/(\d+)$/))&&(e=parseInt(i[2]),e>=0&&e<=128))return n=[this.parse(i[1]),e],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},g.IPv6.parser=function(t){let e,i,n,o,s,r;if(n=t.match(l.deprecatedTransitional))return this.parser(`::ffff:${n[1]}`);if(l.native.test(t))return h(t,8);if((n=t.match(l.transitional))&&(r=n[6]||"",e=h(n[1].slice(0,-1)+r,6),e.parts)){for(s=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])],i=0;i<s.length;i++)if(o=s[i],!(0<=o&&o<=255))return null;return e.parts.push(s[0]<<8|s[1]),e.parts.push(s[2]<<8|s[3]),{parts:e.parts,zoneId:e.zoneId}}return null},g.IPv6.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>128)throw new Error("ipaddr: invalid IPv6 prefix length");const e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let i=0;const n=Math.floor(t/8);for(;i<n;)e[i]=255,i++;return n<16&&(e[n]=Math.pow(2,t%8)-1<<8-t%8),new this(e)},g.fromByteArray=function(t){const e=t.length;if(4===e)return new g.IPv4(t);if(16===e)return new g.IPv6(t);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},g.isValid=function(t){return g.IPv6.isValid(t)||g.IPv4.isValid(t)},g.parse=function(t){if(g.IPv6.isValid(t))return g.IPv6.parse(t);if(g.IPv4.isValid(t))return g.IPv4.parse(t);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},g.parseCIDR=function(t){try{return g.IPv6.parseCIDR(t)}catch(e){try{return g.IPv4.parseCIDR(t)}catch(t){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},g.process=function(t){const e=this.parse(t);return"ipv6"===e.kind()&&e.isIPv4MappedAddress()?e.toIPv4Address():e},g.subnetMatch=function(t,e,i){let n,o,s,r;for(o in null==i&&(i="unicast"),e)if(Object.prototype.hasOwnProperty.call(e,o))for(s=e[o],!s[0]||s[0]instanceof Array||(s=[s]),n=0;n<s.length;n++)if(r=s[n],t.kind()===r[0].kind()&&t.match.apply(t,r))return o;return i},t.exports?t.exports=g:e.ipaddr=g}(this)},29525:t=>{t.exports=function(t,e,i,n){for(var o=-1,s=null==t?0:t.length;++o<s;){var r=t[o];e(n,r,i(r),t)}return n}},26793:(t,e,i)=>{var n=i(72305);t.exports=function(t,e,i,o){return n(t,(function(t,n,s){e(o,t,i(t),s)})),o}},70351:(t,e,i)=>{var n=i(61527),o=i(12769),s=i(60021),r=i(44272),a=i(30041),l=i(79151);t.exports=function(t,e,i,h){var c=-1,u=o,d=!0,g=t.length,f=[],p=e.length;if(!g)return f;i&&(e=r(e,a(i))),h?(u=s,d=!1):e.length>=200&&(u=l,d=!1,e=new n(e));t:for(;++c<g;){var m=t[c],b=null==i?m:i(m);if(m=h||0!==m?m:0,d&&b==b){for(var v=p;v--;)if(e[v]===b)continue t;f.push(m)}else u(e,b,h)||f.push(m)}return f}},61044:(t,e,i)=>{var n=i(78740),o=i(18031);t.exports=function t(e,i,s,r,a){var l=-1,h=e.length;for(s||(s=o),a||(a=[]);++l<h;){var c=e[l];i>0&&s(c)?i>1?t(c,i-1,s,r,a):n(a,c):r||(a[a.length]=c)}return a}},58332:(t,e,i)=>{var n=i(29525),o=i(26793),s=i(31454),r=i(6397);t.exports=function(t,e){return function(i,a){var l=r(i)?n:o,h=e?e():{};return l(i,t,s(a,2),h)}}},18031:(t,e,i)=>{var n=i(32781),o=i(21256),s=i(6397),r=n?n.isConcatSpreadable:void 0;t.exports=function(t){return s(t)||o(t)||!!(r&&t&&t[r])}},15841:(t,e,i)=>{var n=i(70351),o=i(61044),s=i(71506),r=i(75569),a=s((function(t,e){return r(t)?n(t,o(e,1,r,!0)):[]}));t.exports=a},38750:(t,e,i)=>{var n=i(92391),o=i(58332),s=Object.prototype.hasOwnProperty,r=o((function(t,e,i){s.call(t,i)?t[i].push(e):n(t,i,[e])}));t.exports=r},66173:function(t){t.exports=function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},o=function(){function t(i){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;e(this,t),this.ctx=i,this.iframes=n,this.exclude=o,this.iframesTimeout=s}return i(t,[{key:"getContexts",value:function(){var t=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(e){var i=t.filter((function(t){return t.contains(e)})).length>0;-1!==t.indexOf(e)||i||t.push(e)})),t}},{key:"getIframeContents",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=void 0;try{var o=t.contentWindow;if(n=o.document,!o||!n)throw new Error("iframe inaccessible")}catch(t){i()}n&&e(n)}},{key:"isIframeBlank",value:function(t){var e="about:blank",i=t.getAttribute("src").trim();return t.contentWindow.location.href===e&&i!==e&&i}},{key:"observeIframeLoad",value:function(t,e,i){var n=this,o=!1,s=null,r=function r(){if(!o){o=!0,clearTimeout(s);try{n.isIframeBlank(t)||(t.removeEventListener("load",r),n.getIframeContents(t,e,i))}catch(t){i()}}};t.addEventListener("load",r),s=setTimeout(r,this.iframesTimeout)}},{key:"onIframeReady",value:function(t,e,i){try{"complete"===t.contentWindow.document.readyState?this.isIframeBlank(t)?this.observeIframeLoad(t,e,i):this.getIframeContents(t,e,i):this.observeIframeLoad(t,e,i)}catch(t){i()}}},{key:"waitForIframes",value:function(t,e){var i=this,n=0;this.forEachIframe(t,(function(){return!0}),(function(t){n++,i.waitForIframes(t.querySelector("html"),(function(){--n||e()}))}),(function(t){t||e()}))}},{key:"forEachIframe",value:function(e,i,n){var o=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},r=e.querySelectorAll("iframe"),a=r.length,l=0;r=Array.prototype.slice.call(r);var h=function(){--a<=0&&s(l)};a||h(),r.forEach((function(e){t.matches(e,o.exclude)?h():o.onIframeReady(e,(function(t){i(e)&&(l++,n(t)),h()}),h)}))}},{key:"createIterator",value:function(t,e,i){return document.createNodeIterator(t,e,i,!1)}},{key:"createInstanceOnIframe",value:function(e){return new t(e.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(t,e,i){if(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING){if(null===e)return!0;if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(t){var e=t.previousNode();return{prevNode:e,node:(null===e||t.nextNode())&&t.nextNode()}}},{key:"checkIframeFilter",value:function(t,e,i,n){var o=!1,s=!1;return n.forEach((function(t,e){t.val===i&&(o=e,s=t.handled)})),this.compareNodeIframe(t,e,i)?(!1!==o||s?!1===o||s||(n[o].handled=!0):n.push({val:i,handled:!0}),!0):(!1===o&&n.push({val:i,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(t,e,i,n){var o=this;t.forEach((function(t){t.handled||o.getIframeContents(t.val,(function(t){o.createInstanceOnIframe(t).forEachNode(e,i,n)}))}))}},{key:"iterateThroughNodes",value:function(t,e,i,n,o){for(var s=this,r=this.createIterator(e,t,n),a=[],l=[],h=void 0,c=void 0;u=void 0,u=s.getIteratorNode(r),c=u.prevNode,h=u.node;)this.iframes&&this.forEachIframe(e,(function(t){return s.checkIframeFilter(h,c,t,a)}),(function(e){s.createInstanceOnIframe(e).forEachNode(t,(function(t){return l.push(t)}),n)})),l.push(h);var u;l.forEach((function(t){i(t)})),this.iframes&&this.handleOpenIframes(a,t,i,n),o()}},{key:"forEachNode",value:function(t,e,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},s=this.getContexts(),r=s.length;r||o(),s.forEach((function(s){var a=function(){n.iterateThroughNodes(t,s,e,i,(function(){--r<=0&&o()}))};n.iframes?n.waitForIframes(s,a):a()}))}}],[{key:"matches",value:function(t,e){var i="string"==typeof e?[e]:e,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;if(n){var o=!1;return i.every((function(e){return!n.call(t,e)||(o=!0,!1)})),o}return!1}}]),t}(),s=function(){function s(t){e(this,s),this.ctx=t,this.ie=!1;var i=window.navigator.userAgent;(i.indexOf("MSIE")>-1||i.indexOf("Trident")>-1)&&(this.ie=!0)}return i(s,[{key:"log",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",n=this.opt.log;this.opt.debug&&"object"===(void 0===n?"undefined":t(n))&&"function"==typeof n[i]&&n[i]("mark.js: "+e)}},{key:"escapeStr",value:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(t){return"disabled"!==this.opt.wildcards&&(t=this.setupWildcardsRegExp(t)),t=this.escapeStr(t),Object.keys(this.opt.synonyms).length&&(t=this.createSynonymsRegExp(t)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),this.opt.diacritics&&(t=this.createDiacriticsRegExp(t)),t=this.createMergedBlanksRegExp(t),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.createJoinersRegExp(t)),"disabled"!==this.opt.wildcards&&(t=this.createWildcardsRegExp(t)),this.createAccuracyRegExp(t)}},{key:"createSynonymsRegExp",value:function(t){var e=this.opt.synonyms,i=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var o in e)if(e.hasOwnProperty(o)){var s=e[o],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s);""!==r&&""!==a&&(t=t.replace(new RegExp("("+this.escapeStr(r)+"|"+this.escapeStr(a)+")","gm"+i),n+"("+this.processSynomyms(r)+"|"+this.processSynomyms(a)+")"+n))}return t}},{key:"processSynomyms",value:function(t){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),t}},{key:"setupWildcardsRegExp",value:function(t){return(t=t.replace(/(?:\\)*\?/g,(function(t){return"\\"===t.charAt(0)?"?":""}))).replace(/(?:\\)*\*/g,(function(t){return"\\"===t.charAt(0)?"*":""}))}},{key:"createWildcardsRegExp",value:function(t){var e="withSpaces"===this.opt.wildcards;return t.replace(/\u0001/g,e?"[\\S\\s]?":"\\S?").replace(/\u0002/g,e?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(t){return t.replace(/[^(|)\\]/g,(function(t,e,i){var n=i.charAt(e+1);return/[(|)\\]/.test(n)||""===n?t:t+"\0"}))}},{key:"createJoinersRegExp",value:function(t){var e=[],i=this.opt.ignorePunctuation;return Array.isArray(i)&&i.length&&e.push(this.escapeStr(i.join(""))),this.opt.ignoreJoiners&&e.push("\\u00ad\\u200b\\u200c\\u200d"),e.length?t.split(/\u0000+/).join("["+e.join("")+"]*"):t}},{key:"createDiacriticsRegExp",value:function(t){var e=this.opt.caseSensitive?"":"i",i=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],n=[];return t.split("").forEach((function(o){i.every((function(i){if(-1!==i.indexOf(o)){if(n.indexOf(i)>-1)return!1;t=t.replace(new RegExp("["+i+"]","gm"+e),"["+i+"]"),n.push(i)}return!0}))})),t}},{key:"createMergedBlanksRegExp",value:function(t){return t.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(t){var e=this,i=this.opt.accuracy,n="string"==typeof i?i:i.value,o="string"==typeof i?[]:i.limiters,s="";switch(o.forEach((function(t){s+="|"+e.escapeStr(t)})),n){case"partially":default:return"()("+t+")";case"complementary":return"()([^"+(s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+t+"[^"+s+"]*)";case"exactly":return"(^|\\s"+s+")("+t+")(?=$|\\s"+s+")"}}},{key:"getSeparatedKeywords",value:function(t){var e=this,i=[];return t.forEach((function(t){e.opt.separateWordSearch?t.split(" ").forEach((function(t){t.trim()&&-1===i.indexOf(t)&&i.push(t)})):t.trim()&&-1===i.indexOf(t)&&i.push(t)})),{keywords:i.sort((function(t,e){return e.length-t.length})),length:i.length}}},{key:"isNumeric",value:function(t){return Number(parseFloat(t))==t}},{key:"checkRanges",value:function(t){var e=this;if(!Array.isArray(t)||"[object Object]"!==Object.prototype.toString.call(t[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(t),[];var i=[],n=0;return t.sort((function(t,e){return t.start-e.start})).forEach((function(t){var o=e.callNoMatchOnInvalidRanges(t,n),s=o.start,r=o.end;o.valid&&(t.start=s,t.length=r-s,i.push(t),n=r)})),i}},{key:"callNoMatchOnInvalidRanges",value:function(t,e){var i=void 0,n=void 0,o=!1;return t&&void 0!==t.start?(n=(i=parseInt(t.start,10))+parseInt(t.length,10),this.isNumeric(t.start)&&this.isNumeric(t.length)&&n-e>0&&n-i>0?o=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(t)),this.opt.noMatch(t))):(this.log("Ignoring invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:i,end:n,valid:o}}},{key:"checkWhitespaceRanges",value:function(t,e,i){var n=void 0,o=!0,s=i.length,r=e-s,a=parseInt(t.start,10)-r;return(n=(a=a>s?s:a)+parseInt(t.length,10))>s&&(n=s,this.log("End range automatically set to the max value of "+s)),a<0||n-a<0||a>s||n>s?(o=!1,this.log("Invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)):""===i.substring(a,n).replace(/\s+/g,"")&&(o=!1,this.log("Skipping whitespace only range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:a,end:n,valid:o}}},{key:"getTextNodes",value:function(t){var e=this,i="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(t){n.push({start:i.length,end:(i+=t.textContent).length,node:t})}),(function(t){return e.matchesExclude(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){t({value:i,nodes:n})}))}},{key:"matchesExclude",value:function(t){return o.matches(t,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(t,e,i){var n=this.opt.element?this.opt.element:"mark",o=t.splitText(e),s=o.splitText(i-e),r=document.createElement(n);return r.setAttribute("data-markjs","true"),this.opt.className&&r.setAttribute("class",this.opt.className),r.textContent=o.textContent,o.parentNode.replaceChild(r,o),s}},{key:"wrapRangeInMappedTextNode",value:function(t,e,i,n,o){var s=this;t.nodes.every((function(r,a){var l=t.nodes[a+1];if(void 0===l||l.start>e){if(!n(r.node))return!1;var h=e-r.start,c=(i>r.end?r.end:i)-r.start,u=t.value.substr(0,r.start),d=t.value.substr(c+r.start);if(r.node=s.wrapRangeInTextNode(r.node,h,c),t.value=u+d,t.nodes.forEach((function(e,i){i>=a&&(t.nodes[i].start>0&&i!==a&&(t.nodes[i].start-=c),t.nodes[i].end-=c)})),i-=c,o(r.node.previousSibling,r.start),!(i>r.end))return!1;e=r.end}return!0}))}},{key:"wrapMatches",value:function(t,e,i,n,o){var s=this,r=0===e?0:e+1;this.getTextNodes((function(e){e.nodes.forEach((function(e){e=e.node;for(var o=void 0;null!==(o=t.exec(e.textContent))&&""!==o[r];)if(i(o[r],e)){var a=o.index;if(0!==r)for(var l=1;l<r;l++)a+=o[l].length;e=s.wrapRangeInTextNode(e,a,a+o[r].length),n(e.previousSibling),t.lastIndex=0}})),o()}))}},{key:"wrapMatchesAcrossElements",value:function(t,e,i,n,o){var s=this,r=0===e?0:e+1;this.getTextNodes((function(e){for(var a=void 0;null!==(a=t.exec(e.value))&&""!==a[r];){var l=a.index;if(0!==r)for(var h=1;h<r;h++)l+=a[h].length;var c=l+a[r].length;s.wrapRangeInMappedTextNode(e,l,c,(function(t){return i(a[r],t)}),(function(e,i){t.lastIndex=i,n(e)}))}o()}))}},{key:"wrapRangeFromIndex",value:function(t,e,i,n){var o=this;this.getTextNodes((function(s){var r=s.value.length;t.forEach((function(t,n){var a=o.checkWhitespaceRanges(t,r,s.value),l=a.start,h=a.end;a.valid&&o.wrapRangeInMappedTextNode(s,l,h,(function(i){return e(i,t,s.value.substring(l,h),n)}),(function(e){i(e,t)}))})),n()}))}},{key:"unwrapMatches",value:function(t){for(var e=t.parentNode,i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.removeChild(t.firstChild));e.replaceChild(i,t),this.ie?this.normalizeTextNode(e):e.normalize()}},{key:"normalizeTextNode",value:function(t){if(t){if(3===t.nodeType)for(;t.nextSibling&&3===t.nextSibling.nodeType;)t.nodeValue+=t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);else this.normalizeTextNode(t.firstChild);this.normalizeTextNode(t.nextSibling)}}},{key:"markRegExp",value:function(t,e){var i=this;this.opt=e,this.log('Searching with expression "'+t+'"');var n=0,o="wrapMatches";this.opt.acrossElements&&(o="wrapMatchesAcrossElements"),this[o](t,this.opt.ignoreGroups,(function(t,e){return i.opt.filter(e,t,n)}),(function(t){n++,i.opt.each(t)}),(function(){0===n&&i.opt.noMatch(t),i.opt.done(n)}))}},{key:"mark",value:function(t,e){var i=this;this.opt=e;var n=0,o="wrapMatches",s=this.getSeparatedKeywords("string"==typeof t?[t]:t),r=s.keywords,a=s.length,l=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(o="wrapMatchesAcrossElements"),0===a?this.opt.done(n):function t(e){var s=new RegExp(i.createRegExp(e),"gm"+l),h=0;i.log('Searching with expression "'+s+'"'),i[o](s,1,(function(t,o){return i.opt.filter(o,e,n,h)}),(function(t){h++,n++,i.opt.each(t)}),(function(){0===h&&i.opt.noMatch(e),r[a-1]===e?i.opt.done(n):t(r[r.indexOf(e)+1])}))}(r[0])}},{key:"markRanges",value:function(t,e){var i=this;this.opt=e;var n=0,o=this.checkRanges(t);o&&o.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(o)),this.wrapRangeFromIndex(o,(function(t,e,n,o){return i.opt.filter(t,e,n,o)}),(function(t,e){n++,i.opt.each(t,e)}),(function(){i.opt.done(n)}))):this.opt.done(n)}},{key:"unmark",value:function(t){var e=this;this.opt=t;var i=this.opt.element?this.opt.element:"*";i+="[data-markjs]",this.opt.className&&(i+="."+this.opt.className),this.log('Removal selector "'+i+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,(function(t){e.unwrapMatches(t)}),(function(t){var n=o.matches(t,i),s=e.matchesExclude(t);return!n||s?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),this.opt.done)}},{key:"opt",set:function(t){this._opt=n({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},t)},get:function(){return this._opt}},{key:"iterator",get:function(){return new o(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),s}();return function(t){var e=this,i=new s(t);return this.mark=function(t,n){return i.mark(t,n),e},this.markRegExp=function(t,n){return i.markRegExp(t,n),e},this.markRanges=function(t,n){return i.markRanges(t,n),e},this.unmark=function(t){return i.unmark(t),e},this}}()},67796:(t,e,i)=>{"use strict";i.d(e,{Kv:()=>s,N4:()=>r});var n=i(97023),o=i(16666);function s(t,e){return t?function(t){return"function"==typeof t&&(()=>{const e=Object.getPrototypeOf(t);return e.prototype&&e.prototype.isReactComponent})()}(i=t)||"function"==typeof i||function(t){return"object"==typeof t&&"symbol"==typeof t.$$typeof&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}(i)?n.createElement(t,e):t:null;var i}function r(t){const e={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[i]=n.useState((()=>({current:(0,o.ZR)(e)}))),[s,r]=n.useState((()=>i.current.initialState));return i.current.setOptions((e=>({...e,...t,state:{...s,...t.state},onStateChange:e=>{r(e),null==t.onStateChange||t.onStateChange(e)}}))),i.current}},16666:(t,e,i)=>{"use strict";function n(t,e){return"function"==typeof t?t(e):t}function o(t,e){return i=>{e.setState((e=>({...e,[t]:n(i,e[t])})))}}function s(t){return t instanceof Function}function r(t,e,i){let n,o=[];return()=>{let s;i.key&&i.debug&&(s=Date.now());const r=t();if(r.length===o.length&&!r.some(((t,e)=>o[e]!==t)))return n;let a;if(o=r,i.key&&i.debug&&(a=Date.now()),n=e(...r),null==i||null==i.onChange||i.onChange(n),i.key&&i.debug&&null!=i&&i.debug()){const t=Math.round(100*(Date.now()-s))/100,e=Math.round(100*(Date.now()-a))/100,n=e/16,o=(t,e)=>{for(t=String(t);t.length<e;)t=" "+t;return t};console.info(`%c⏱ ${o(e,5)} /${o(t,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*n,120))}deg 100% 31%);`,null==i?void 0:i.key)}return n}}function a(t,e,i){var n;let o={id:null!=(n=i.id)?n:e.id,column:e,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const t=[],e=i=>{i.subHeaders&&i.subHeaders.length&&i.subHeaders.map(e),t.push(i)};return e(o),t},getContext:()=>({table:t,header:o,column:e})};return t._features.forEach((e=>{null==e.createHeader||e.createHeader(o,t)})),o}i.d(e,{FB:()=>H,HT:()=>j,ZR:()=>N,h5:()=>W});const l={createTable:t=>{t.getHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,i,n,o)=>{var s,r;const a=null!=(s=null==n?void 0:n.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?s:[],l=null!=(r=null==o?void 0:o.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?r:[];return h(e,[...a,...i.filter((t=>!(null!=n&&n.includes(t.id)||null!=o&&o.includes(t.id)))),...l],t)}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,i,n,o)=>h(e,i=i.filter((t=>!(null!=n&&n.includes(t.id)||null!=o&&o.includes(t.id)))),t,"center")),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left]),((e,i,n)=>{var o;return h(e,null!=(o=null==n?void 0:n.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?o:[],t,"left")}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right]),((e,i,n)=>{var o;return h(e,null!=(o=null==n?void 0:n.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?o:[],t,"right")}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getFooterGroups=r((()=>[t.getHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftFooterGroups=r((()=>[t.getLeftHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterFooterGroups=r((()=>[t.getCenterHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightFooterGroups=r((()=>[t.getRightHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getFlatHeaders=r((()=>[t.getHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftFlatHeaders=r((()=>[t.getLeftHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterFlatHeaders=r((()=>[t.getCenterHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightFlatHeaders=r((()=>[t.getRightHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterLeafHeaders=r((()=>[t.getCenterFlatHeaders()]),(t=>t.filter((t=>{var e;return!(null!=(e=t.subHeaders)&&e.length)}))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftLeafHeaders=r((()=>[t.getLeftFlatHeaders()]),(t=>t.filter((t=>{var e;return!(null!=(e=t.subHeaders)&&e.length)}))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightLeafHeaders=r((()=>[t.getRightFlatHeaders()]),(t=>t.filter((t=>{var e;return!(null!=(e=t.subHeaders)&&e.length)}))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeafHeaders=r((()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()]),((t,e,i)=>{var n,o,s,r,a,l;return[...null!=(n=null==(o=t[0])?void 0:o.headers)?n:[],...null!=(s=null==(r=e[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=i[0])?void 0:l.headers)?a:[]].map((t=>t.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}})}};function h(t,e,i,n){var o,s;let r=0;const l=function(t,e){void 0===e&&(e=1),r=Math.max(r,e),t.filter((t=>t.getIsVisible())).forEach((t=>{var i;null!=(i=t.columns)&&i.length&&l(t.columns,e+1)}),0)};l(t);let h=[];const c=(t,e)=>{const o={depth:e,id:[n,`${e}`].filter(Boolean).join("_"),headers:[]},s=[];t.forEach((t=>{const r=[...s].reverse()[0];let l,h=!1;if(t.column.depth===o.depth&&t.column.parent?l=t.column.parent:(l=t.column,h=!0),r&&(null==r?void 0:r.column)===l)r.subHeaders.push(t);else{const o=a(i,l,{id:[n,e,l.id,null==t?void 0:t.id].filter(Boolean).join("_"),isPlaceholder:h,placeholderId:h?`${s.filter((t=>t.column===l)).length}`:void 0,depth:e,index:s.length});o.subHeaders.push(t),s.push(o)}o.headers.push(t),t.headerGroup=o})),h.push(o),e>0&&c(s,e-1)},u=e.map(((t,e)=>a(i,t,{depth:r,index:e})));c(u,r-1),h.reverse();const d=t=>t.filter((t=>t.column.getIsVisible())).map((t=>{let e=0,i=0,n=[0];return t.subHeaders&&t.subHeaders.length?(n=[],d(t.subHeaders).forEach((t=>{let{colSpan:i,rowSpan:o}=t;e+=i,n.push(o)}))):e=1,i+=Math.min(...n),t.colSpan=e,t.rowSpan=i,{colSpan:e,rowSpan:i}}));return d(null!=(o=null==(s=h[0])?void 0:s.headers)?o:[]),h}const c={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},u={getDefaultColumnDef:()=>c,getInitialState:t=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",onColumnSizingChange:o("columnSizing",t),onColumnSizingInfoChange:o("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var i,n,o;const s=e.getState().columnSizing[t.id];return Math.min(Math.max(null!=(i=t.columnDef.minSize)?i:c.minSize,null!=(n=null!=s?s:t.columnDef.size)?n:c.size),null!=(o=t.columnDef.maxSize)?o:c.maxSize)},t.getStart=i=>{const n=i?"left"===i?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns(),o=n.findIndex((e=>e.id===t.id));if(o>0){const t=n[o-1];return t.getStart(i)+t.getSize()}return 0},t.resetSize=()=>{e.setColumnSizing((e=>{let{[t.id]:i,...n}=e;return n}))},t.getCanResize=()=>{var i,n;return(null==(i=t.columnDef.enableResizing)||i)&&(null==(n=e.options.enableColumnResizing)||n)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let e=0;const i=t=>{var n;t.subHeaders.length?t.subHeaders.forEach(i):e+=null!=(n=t.column.getSize())?n:0};return i(t),e},t.getStart=()=>{if(t.index>0){const e=t.headerGroup.headers[t.index-1];return e.getStart()+e.getSize()}return 0},t.getResizeHandler=()=>{const i=e.getColumn(t.column.id),n=null==i?void 0:i.getCanResize();return o=>{if(!i||!n)return;if(null==o.persist||o.persist(),g(o)&&o.touches&&o.touches.length>1)return;const s=t.getSize(),r=t?t.getLeafHeaders().map((t=>[t.column.id,t.column.getSize()])):[[i.id,i.getSize()]],a=g(o)?Math.round(o.touches[0].clientX):o.clientX,l={},h=(t,i)=>{"number"==typeof i&&(e.setColumnSizingInfo((t=>{var e,n;const o=i-(null!=(e=null==t?void 0:t.startOffset)?e:0),s=Math.max(o/(null!=(n=null==t?void 0:t.startSize)?n:0),-.999999);return t.columnSizingStart.forEach((t=>{let[e,i]=t;l[e]=Math.round(100*Math.max(i+i*s,0))/100})),{...t,deltaOffset:o,deltaPercentage:s}})),"onChange"!==e.options.columnResizeMode&&"end"!==t||e.setColumnSizing((t=>({...t,...l}))))},c=t=>h("move",t),u=t=>{h("end",t),e.setColumnSizingInfo((t=>({...t,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},f={moveHandler:t=>c(t.clientX),upHandler:t=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),u(t.clientX)}},p={moveHandler:t=>(t.cancelable&&(t.preventDefault(),t.stopPropagation()),c(t.touches[0].clientX),!1),upHandler:t=>{var e;document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),t.cancelable&&(t.preventDefault(),t.stopPropagation()),u(null==(e=t.touches[0])?void 0:e.clientX)}},m=!!function(){if("boolean"==typeof d)return d;let t=!1;try{const e={get passive(){return t=!0,!1}},i=()=>{};window.addEventListener("test",i,e),window.removeEventListener("test",i)}catch(e){t=!1}return d=t,d}()&&{passive:!1};g(o)?(document.addEventListener("touchmove",p.moveHandler,m),document.addEventListener("touchend",p.upHandler,m)):(document.addEventListener("mousemove",f.moveHandler,m),document.addEventListener("mouseup",f.upHandler,m)),e.setColumnSizingInfo((t=>({...t,startOffset:a,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:i.id})))}}},createTable:t=>{t.setColumnSizing=e=>null==t.options.onColumnSizingChange?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>null==t.options.onColumnSizingInfoChange?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var i;t.setColumnSizing(e?{}:null!=(i=t.initialState.columnSizing)?i:{})},t.resetHeaderSizeInfo=e=>{var i;t.setColumnSizingInfo(e?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(i=t.initialState.columnSizingInfo)?i:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},t.getTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getLeftTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getLeftHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getCenterTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getCenterHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getRightTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getRightHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0}}};let d=null;function g(t){return"touchstart"===t.type}const f={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:o("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,i=!1;t._autoResetExpanded=()=>{var n,o;if(e){if(null!=(n=null!=(o=t.options.autoResetAll)?o:t.options.autoResetExpanded)?n:!t.options.manualExpanding){if(i)return;i=!0,t._queue((()=>{t.resetExpanded(),i=!1}))}}else t._queue((()=>{e=!0}))},t.setExpanded=e=>null==t.options.onExpandedChange?void 0:t.options.onExpandedChange(e),t.toggleAllRowsExpanded=e=>{(null!=e?e:!t.getIsAllRowsExpanded())?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=e=>{var i,n;t.setExpanded(e?{}:null!=(i=null==(n=t.initialState)?void 0:n.expanded)?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some((t=>t.getCanExpand())),t.getToggleAllRowsExpandedHandler=()=>e=>{null==e.persist||e.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const e=t.getState().expanded;return!0===e||Object.values(e).some(Boolean)},t.getIsAllRowsExpanded=()=>{const e=t.getState().expanded;return"boolean"==typeof e?!0===e:!!Object.keys(e).length&&!t.getRowModel().flatRows.some((t=>!t.getIsExpanded()))},t.getExpandedDepth=()=>{let e=0;return(!0===t.getState().expanded?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach((t=>{const i=t.split(".");e=Math.max(e,i.length)})),e},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=i=>{e.setExpanded((n=>{var o;const s=!0===n||!(null==n||!n[t.id]);let r={};if(!0===n?Object.keys(e.getRowModel().rowsById).forEach((t=>{r[t]=!0})):r=n,i=null!=(o=i)?o:!s,!s&&i)return{...r,[t.id]:!0};if(s&&!i){const{[t.id]:e,...i}=r;return i}return n}))},t.getIsExpanded=()=>{var i;const n=e.getState().expanded;return!!(null!=(i=null==e.options.getIsRowExpanded?void 0:e.options.getIsRowExpanded(t))?i:!0===n||(null==n?void 0:n[t.id]))},t.getCanExpand=()=>{var i,n,o;return null!=(i=null==e.options.getRowCanExpand?void 0:e.options.getRowCanExpand(t))?i:(null==(n=e.options.enableExpanding)||n)&&!(null==(o=t.subRows)||!o.length)},t.getIsAllParentsExpanded=()=>{let i=!0,n=t;for(;i&&n.parentId;)n=e.getRow(n.parentId,!0),i=n.getIsExpanded();return i},t.getToggleExpandedHandler=()=>{const e=t.getCanExpand();return()=>{e&&t.toggleExpanded()}}}},p=(t,e,i)=>{var n;const o=i.toLowerCase();return Boolean(null==(n=t.getValue(e))||null==(n=n.toString())||null==(n=n.toLowerCase())?void 0:n.includes(o))};p.autoRemove=t=>C(t);const m=(t,e,i)=>{var n;return Boolean(null==(n=t.getValue(e))||null==(n=n.toString())?void 0:n.includes(i))};m.autoRemove=t=>C(t);const b=(t,e,i)=>{var n;return(null==(n=t.getValue(e))||null==(n=n.toString())?void 0:n.toLowerCase())===(null==i?void 0:i.toLowerCase())};b.autoRemove=t=>C(t);const v=(t,e,i)=>{var n;return null==(n=t.getValue(e))?void 0:n.includes(i)};v.autoRemove=t=>C(t)||!(null!=t&&t.length);const x=(t,e,i)=>!i.some((i=>{var n;return!(null!=(n=t.getValue(e))&&n.includes(i))}));x.autoRemove=t=>C(t)||!(null!=t&&t.length);const y=(t,e,i)=>i.some((i=>{var n;return null==(n=t.getValue(e))?void 0:n.includes(i)}));y.autoRemove=t=>C(t)||!(null!=t&&t.length);const _=(t,e,i)=>t.getValue(e)===i;_.autoRemove=t=>C(t);const w=(t,e,i)=>t.getValue(e)==i;w.autoRemove=t=>C(t);const S=(t,e,i)=>{let[n,o]=i;const s=t.getValue(e);return s>=n&&s<=o};S.resolveFilterValue=t=>{let[e,i]=t,n="number"!=typeof e?parseFloat(e):e,o="number"!=typeof i?parseFloat(i):i,s=null===e||Number.isNaN(n)?-1/0:n,r=null===i||Number.isNaN(o)?1/0:o;if(s>r){const t=s;s=r,r=t}return[s,r]},S.autoRemove=t=>C(t)||C(t[0])&&C(t[1]);const M={includesString:p,includesStringSensitive:m,equalsString:b,arrIncludes:v,arrIncludesAll:x,arrIncludesSome:y,equals:_,weakEquals:w,inNumberRange:S};function C(t){return null==t||""===t}function k(t,e,i){return!(!t||!t.autoRemove)&&t.autoRemove(e,i)||void 0===e||"string"==typeof e&&!e}const R={sum:(t,e,i)=>i.reduce(((e,i)=>{const n=i.getValue(t);return e+("number"==typeof n?n:0)}),0),min:(t,e,i)=>{let n;return i.forEach((e=>{const i=e.getValue(t);null!=i&&(n>i||void 0===n&&i>=i)&&(n=i)})),n},max:(t,e,i)=>{let n;return i.forEach((e=>{const i=e.getValue(t);null!=i&&(n<i||void 0===n&&i>=i)&&(n=i)})),n},extent:(t,e,i)=>{let n,o;return i.forEach((e=>{const i=e.getValue(t);null!=i&&(void 0===n?i>=i&&(n=o=i):(n>i&&(n=i),o<i&&(o=i)))})),[n,o]},mean:(t,e)=>{let i=0,n=0;if(e.forEach((e=>{let o=e.getValue(t);null!=o&&(o=+o)>=o&&(++i,n+=o)})),i)return n/i},median:(t,e)=>{if(!e.length)return;const i=e.map((e=>e.getValue(t)));if(n=i,!Array.isArray(n)||!n.every((t=>"number"==typeof t)))return;var n;if(1===i.length)return i[0];const o=Math.floor(i.length/2),s=i.sort(((t,e)=>t-e));return i.length%2!=0?s[o]:(s[o-1]+s[o])/2},unique:(t,e)=>Array.from(new Set(e.map((e=>e.getValue(t)))).values()),uniqueCount:(t,e)=>new Set(e.map((e=>e.getValue(t)))).size,count:(t,e)=>e.length},P={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:o("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>null==t.options.onRowSelectionChange?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var i;return t.setRowSelection(e?{}:null!=(i=t.initialState.rowSelection)?i:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection((i=>{e=void 0!==e?e:!t.getIsAllRowsSelected();const n={...i},o=t.getPreGroupedRowModel().flatRows;return e?o.forEach((t=>{t.getCanSelect()&&(n[t.id]=!0)})):o.forEach((t=>{delete n[t.id]})),n}))},t.toggleAllPageRowsSelected=e=>t.setRowSelection((i=>{const n=void 0!==e?e:!t.getIsAllPageRowsSelected(),o={...i};return t.getRowModel().rows.forEach((e=>{I(o,e.id,n,!0,t)})),o})),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=r((()=>[t.getState().rowSelection,t.getCoreRowModel()]),((e,i)=>Object.keys(e).length?A(t,i):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getFilteredSelectedRowModel=r((()=>[t.getState().rowSelection,t.getFilteredRowModel()]),((e,i)=>Object.keys(e).length?A(t,i):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getGroupedSelectedRowModel=r((()=>[t.getState().rowSelection,t.getSortedRowModel()]),((e,i)=>Object.keys(e).length?A(t,i):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:i}=t.getState();let n=Boolean(e.length&&Object.keys(i).length);return n&&e.some((t=>t.getCanSelect()&&!i[t.id]))&&(n=!1),n},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter((t=>t.getCanSelect())),{rowSelection:i}=t.getState();let n=!!e.length;return n&&e.some((t=>!i[t.id]))&&(n=!1),n},t.getIsSomeRowsSelected=()=>{var e;const i=Object.keys(null!=(e=t.getState().rowSelection)?e:{}).length;return i>0&&i<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return!t.getIsAllPageRowsSelected()&&e.filter((t=>t.getCanSelect())).some((t=>t.getIsSelected()||t.getIsSomeSelected()))},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(i,n)=>{const o=t.getIsSelected();e.setRowSelection((s=>{var r;if(i=void 0!==i?i:!o,t.getCanSelect()&&o===i)return s;const a={...s};return I(a,t.id,i,null==(r=null==n?void 0:n.selectChildren)||r,e),a}))},t.getIsSelected=()=>{const{rowSelection:i}=e.getState();return E(t,i)},t.getIsSomeSelected=()=>{const{rowSelection:i}=e.getState();return"some"===O(t,i)},t.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=e.getState();return"all"===O(t,i)},t.getCanSelect=()=>{var i;return"function"==typeof e.options.enableRowSelection?e.options.enableRowSelection(t):null==(i=e.options.enableRowSelection)||i},t.getCanSelectSubRows=()=>{var i;return"function"==typeof e.options.enableSubRowSelection?e.options.enableSubRowSelection(t):null==(i=e.options.enableSubRowSelection)||i},t.getCanMultiSelect=()=>{var i;return"function"==typeof e.options.enableMultiRowSelection?e.options.enableMultiRowSelection(t):null==(i=e.options.enableMultiRowSelection)||i},t.getToggleSelectedHandler=()=>{const e=t.getCanSelect();return i=>{var n;e&&t.toggleSelected(null==(n=i.target)?void 0:n.checked)}}}},I=(t,e,i,n,o)=>{var s;const r=o.getRow(e);i?(r.getCanMultiSelect()||Object.keys(t).forEach((e=>delete t[e])),r.getCanSelect()&&(t[e]=!0)):delete t[e],n&&null!=(s=r.subRows)&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach((e=>I(t,e.id,i,n,o)))};function A(t,e){const i=t.getState().rowSelection,n=[],o={},s=function(t,e){return t.map((t=>{var e;const r=E(t,i);if(r&&(n.push(t),o[t.id]=t),null!=(e=t.subRows)&&e.length&&(t={...t,subRows:s(t.subRows)}),r)return t})).filter(Boolean)};return{rows:s(e.rows),flatRows:n,rowsById:o}}function E(t,e){var i;return null!=(i=e[t.id])&&i}function O(t,e,i){var n;if(null==(n=t.subRows)||!n.length)return!1;let o=!0,s=!1;return t.subRows.forEach((t=>{if((!s||o)&&(t.getCanSelect()&&(E(t,e)?s=!0:o=!1),t.subRows&&t.subRows.length)){const i=O(t,e);"all"===i?s=!0:"some"===i?(s=!0,o=!1):o=!1}})),o?"all":!!s&&"some"}const D=/([0-9]+)/gm;function F(t,e){return t===e?0:t>e?1:-1}function T(t){return"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?"":String(t):"string"==typeof t?t:""}function L(t,e){const i=t.split(D).filter(Boolean),n=e.split(D).filter(Boolean);for(;i.length&&n.length;){const t=i.shift(),e=n.shift(),o=parseInt(t,10),s=parseInt(e,10),r=[o,s].sort();if(isNaN(r[0])){if(t>e)return 1;if(e>t)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1;if(o>s)return 1;if(s>o)return-1}}return i.length-n.length}const V={alphanumeric:(t,e,i)=>L(T(t.getValue(i)).toLowerCase(),T(e.getValue(i)).toLowerCase()),alphanumericCaseSensitive:(t,e,i)=>L(T(t.getValue(i)),T(e.getValue(i))),text:(t,e,i)=>F(T(t.getValue(i)).toLowerCase(),T(e.getValue(i)).toLowerCase()),textCaseSensitive:(t,e,i)=>F(T(t.getValue(i)),T(e.getValue(i))),datetime:(t,e,i)=>{const n=t.getValue(i),o=e.getValue(i);return n>o?1:n<o?-1:0},basic:(t,e,i)=>F(t.getValue(i),e.getValue(i))},z=[l,{getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:o("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=i=>{t.getCanHide()&&e.setColumnVisibility((e=>({...e,[t.id]:null!=i?i:!t.getIsVisible()})))},t.getIsVisible=()=>{var i,n;return null==(i=null==(n=e.getState().columnVisibility)?void 0:n[t.id])||i},t.getCanHide=()=>{var i,n;return(null==(i=t.columnDef.enableHiding)||i)&&(null==(n=e.options.enableHiding)||n)},t.getToggleVisibilityHandler=()=>e=>{null==t.toggleVisibility||t.toggleVisibility(e.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=r((()=>[t.getAllCells(),e.getState().columnVisibility]),(t=>t.filter((t=>t.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),t.getVisibleCells=r((()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()]),((t,e,i)=>[...t,...e,...i]),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},createTable:t=>{const e=(e,i)=>r((()=>[i(),i().filter((t=>t.getIsVisible())).map((t=>t.id)).join("_")]),(t=>t.filter((t=>null==t.getIsVisible?void 0:t.getIsVisible()))),{key:e,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}});t.getVisibleFlatColumns=e("getVisibleFlatColumns",(()=>t.getAllFlatColumns())),t.getVisibleLeafColumns=e("getVisibleLeafColumns",(()=>t.getAllLeafColumns())),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",(()=>t.getLeftLeafColumns())),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",(()=>t.getRightLeafColumns())),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",(()=>t.getCenterLeafColumns())),t.setColumnVisibility=e=>null==t.options.onColumnVisibilityChange?void 0:t.options.onColumnVisibilityChange(e),t.resetColumnVisibility=e=>{var i;t.setColumnVisibility(e?{}:null!=(i=t.initialState.columnVisibility)?i:{})},t.toggleAllColumnsVisible=e=>{var i;e=null!=(i=e)?i:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce(((t,i)=>({...t,[i.id]:e||!(null!=i.getCanHide&&i.getCanHide())})),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some((t=>!(null!=t.getIsVisible&&t.getIsVisible()))),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some((t=>null==t.getIsVisible?void 0:t.getIsVisible())),t.getToggleAllColumnsVisibilityHandler=()=>e=>{var i;t.toggleAllColumnsVisible(null==(i=e.target)?void 0:i.checked)}}},{getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:o("columnOrder",t)}),createTable:t=>{t.setColumnOrder=e=>null==t.options.onColumnOrderChange?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var i;t.setColumnOrder(e?[]:null!=(i=t.initialState.columnOrder)?i:[])},t._getOrderColumnsFn=r((()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode]),((t,e,i)=>n=>{let o=[];if(null!=t&&t.length){const e=[...t],i=[...n];for(;i.length&&e.length;){const t=e.shift(),n=i.findIndex((e=>e.id===t));n>-1&&o.push(i.splice(n,1)[0])}o=[...o,...i]}else o=n;return function(t,e,i){if(null==e||!e.length||!i)return t;const n=t.filter((t=>!e.includes(t.id)));return"remove"===i?n:[...e.map((e=>t.find((t=>t.id===e)))).filter(Boolean),...n]}(o,e,i)}),{key:!1})}},{getInitialState:t=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...t}),getDefaultOptions:t=>({onColumnPinningChange:o("columnPinning",t),onRowPinningChange:o("rowPinning",t)}),createColumn:(t,e)=>{t.pin=i=>{const n=t.getLeafColumns().map((t=>t.id)).filter(Boolean);e.setColumnPinning((t=>{var e,o,s,r,a,l;return"right"===i?{left:(null!=(s=null==t?void 0:t.left)?s:[]).filter((t=>!(null!=n&&n.includes(t)))),right:[...(null!=(r=null==t?void 0:t.right)?r:[]).filter((t=>!(null!=n&&n.includes(t)))),...n]}:"left"===i?{left:[...(null!=(a=null==t?void 0:t.left)?a:[]).filter((t=>!(null!=n&&n.includes(t)))),...n],right:(null!=(l=null==t?void 0:t.right)?l:[]).filter((t=>!(null!=n&&n.includes(t))))}:{left:(null!=(e=null==t?void 0:t.left)?e:[]).filter((t=>!(null!=n&&n.includes(t)))),right:(null!=(o=null==t?void 0:t.right)?o:[]).filter((t=>!(null!=n&&n.includes(t))))}}))},t.getCanPin=()=>t.getLeafColumns().some((t=>{var i,n,o;return(null==(i=t.columnDef.enablePinning)||i)&&(null==(n=null!=(o=e.options.enableColumnPinning)?o:e.options.enablePinning)||n)})),t.getIsPinned=()=>{const i=t.getLeafColumns().map((t=>t.id)),{left:n,right:o}=e.getState().columnPinning,s=i.some((t=>null==n?void 0:n.includes(t))),r=i.some((t=>null==o?void 0:o.includes(t)));return s?"left":!!r&&"right"},t.getPinnedIndex=()=>{var i,n;const o=t.getIsPinned();return o?null!=(i=null==(n=e.getState().columnPinning)||null==(n=n[o])?void 0:n.indexOf(t.id))?i:-1:0}},createRow:(t,e)=>{t.pin=(i,n,o)=>{const s=n?t.getLeafRows().map((t=>{let{id:e}=t;return e})):[],r=o?t.getParentRows().map((t=>{let{id:e}=t;return e})):[],a=new Set([...r,t.id,...s]);e.setRowPinning((t=>{var e,n,o,s,r,l;return"bottom"===i?{top:(null!=(o=null==t?void 0:t.top)?o:[]).filter((t=>!(null!=a&&a.has(t)))),bottom:[...(null!=(s=null==t?void 0:t.bottom)?s:[]).filter((t=>!(null!=a&&a.has(t)))),...Array.from(a)]}:"top"===i?{top:[...(null!=(r=null==t?void 0:t.top)?r:[]).filter((t=>!(null!=a&&a.has(t)))),...Array.from(a)],bottom:(null!=(l=null==t?void 0:t.bottom)?l:[]).filter((t=>!(null!=a&&a.has(t))))}:{top:(null!=(e=null==t?void 0:t.top)?e:[]).filter((t=>!(null!=a&&a.has(t)))),bottom:(null!=(n=null==t?void 0:t.bottom)?n:[]).filter((t=>!(null!=a&&a.has(t))))}}))},t.getCanPin=()=>{var i;const{enableRowPinning:n,enablePinning:o}=e.options;return"function"==typeof n?n(t):null==(i=null!=n?n:o)||i},t.getIsPinned=()=>{const i=[t.id],{top:n,bottom:o}=e.getState().rowPinning,s=i.some((t=>null==n?void 0:n.includes(t))),r=i.some((t=>null==o?void 0:o.includes(t)));return s?"top":!!r&&"bottom"},t.getPinnedIndex=()=>{var i,n;const o=t.getIsPinned();if(!o)return-1;const s=null==(i=e._getPinnedRows(o))?void 0:i.map((t=>{let{id:e}=t;return e}));return null!=(n=null==s?void 0:s.indexOf(t.id))?n:-1},t.getCenterVisibleCells=r((()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,e,i)=>{const n=[...null!=e?e:[],...null!=i?i:[]];return t.filter((t=>!n.includes(t.column.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),t.getLeftVisibleCells=r((()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,,]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.column.id===e)))).filter(Boolean).map((t=>({...t,position:"left"})))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),t.getRightVisibleCells=r((()=>[t._getAllVisibleCells(),e.getState().columnPinning.right]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.column.id===e)))).filter(Boolean).map((t=>({...t,position:"right"})))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},createTable:t=>{t.setColumnPinning=e=>null==t.options.onColumnPinningChange?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var i,n;return t.setColumnPinning(e?{left:[],right:[]}:null!=(i=null==(n=t.initialState)?void 0:n.columnPinning)?i:{left:[],right:[]})},t.getIsSomeColumnsPinned=e=>{var i;const n=t.getState().columnPinning;var o,s;return e?Boolean(null==(i=n[e])?void 0:i.length):Boolean((null==(o=n.left)?void 0:o.length)||(null==(s=n.right)?void 0:s.length))},t.getLeftLeafColumns=r((()=>[t.getAllLeafColumns(),t.getState().columnPinning.left]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.id===e)))).filter(Boolean)),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),t.getRightLeafColumns=r((()=>[t.getAllLeafColumns(),t.getState().columnPinning.right]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.id===e)))).filter(Boolean)),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),t.getCenterLeafColumns=r((()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((t,e,i)=>{const n=[...null!=e?e:[],...null!=i?i:[]];return t.filter((t=>!n.includes(t.id)))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),t.setRowPinning=e=>null==t.options.onRowPinningChange?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var i,n;return t.setRowPinning(e?{top:[],bottom:[]}:null!=(i=null==(n=t.initialState)?void 0:n.rowPinning)?i:{top:[],bottom:[]})},t.getIsSomeRowsPinned=e=>{var i;const n=t.getState().rowPinning;var o,s;return e?Boolean(null==(i=n[e])?void 0:i.length):Boolean((null==(o=n.top)?void 0:o.length)||(null==(s=n.bottom)?void 0:s.length))},t._getPinnedRows=e=>r((()=>[t.getRowModel().rows,t.getState().rowPinning[e]]),((i,n)=>{var o;return(null==(o=t.options.keepPinnedRows)||o?(null!=n?n:[]).map((e=>{const i=t.getRow(e,!0);return i.getIsAllParentsExpanded()?i:null})):(null!=n?n:[]).map((t=>i.find((e=>e.id===t))))).filter(Boolean).map((t=>({...t,position:e})))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})(),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=r((()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom]),((t,e,i)=>{const n=new Set([...null!=e?e:[],...null!=i?i:[]]);return t.filter((t=>!n.has(t.id)))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:o("columnFilters",t),onGlobalFilterChange:o("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var i;const n=null==(i=t.getCoreRowModel().flatRows[0])||null==(i=i._getAllCellsByColumnId()[e.id])?void 0:i.getValue();return"string"==typeof n||"number"==typeof n}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const i=e.getCoreRowModel().flatRows[0],n=null==i?void 0:i.getValue(t.id);return"string"==typeof n?M.includesString:"number"==typeof n?M.inNumberRange:"boolean"==typeof n||null!==n&&"object"==typeof n?M.equals:Array.isArray(n)?M.arrIncludes:M.weakEquals},t.getFilterFn=()=>{var i,n;return s(t.columnDef.filterFn)?t.columnDef.filterFn:"auto"===t.columnDef.filterFn?t.getAutoFilterFn():null!=(i=null==(n=e.options.filterFns)?void 0:n[t.columnDef.filterFn])?i:M[t.columnDef.filterFn]},t.getCanFilter=()=>{var i,n,o;return(null==(i=t.columnDef.enableColumnFilter)||i)&&(null==(n=e.options.enableColumnFilters)||n)&&(null==(o=e.options.enableFilters)||o)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var i,n,o,s;return(null==(i=t.columnDef.enableGlobalFilter)||i)&&(null==(n=e.options.enableGlobalFilter)||n)&&(null==(o=e.options.enableFilters)||o)&&(null==(s=null==e.options.getColumnCanGlobalFilter?void 0:e.options.getColumnCanGlobalFilter(t))||s)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var i;return null==(i=e.getState().columnFilters)||null==(i=i.find((e=>e.id===t.id)))?void 0:i.value},t.getFilterIndex=()=>{var i,n;return null!=(i=null==(n=e.getState().columnFilters)?void 0:n.findIndex((e=>e.id===t.id)))?i:-1},t.setFilterValue=i=>{e.setColumnFilters((e=>{const o=t.getFilterFn(),s=null==e?void 0:e.find((e=>e.id===t.id)),r=n(i,s?s.value:void 0);var a;if(k(o,r,t))return null!=(a=null==e?void 0:e.filter((e=>e.id!==t.id)))?a:[];const l={id:t.id,value:r};var h;return s?null!=(h=null==e?void 0:e.map((e=>e.id===t.id?l:e)))?h:[]:null!=e&&e.length?[...e,l]:[l]}))},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>M.includesString,t.getGlobalFilterFn=()=>{var e,i;const{globalFilterFn:n}=t.options;return s(n)?n:"auto"===n?t.getGlobalAutoFilterFn():null!=(e=null==(i=t.options.filterFns)?void 0:i[n])?e:M[n]},t.setColumnFilters=e=>{const i=t.getAllLeafColumns();null==t.options.onColumnFiltersChange||t.options.onColumnFiltersChange((t=>{var o;return null==(o=n(e,t))?void 0:o.filter((t=>{const e=i.find((e=>e.id===t.id));return!e||!k(e.getFilterFn(),t.value,e)}))}))},t.setGlobalFilter=e=>{null==t.options.onGlobalFilterChange||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var i,n;t.setColumnFilters(e?[]:null!=(i=null==(n=t.initialState)?void 0:n.columnFilters)?i:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:o("sorting",t),isMultiSortEvent:t=>t.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const i=e.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const e of i){const i=null==e?void 0:e.getValue(t.id);if("[object Date]"===Object.prototype.toString.call(i))return V.datetime;if("string"==typeof i&&(n=!0,i.split(D).length>1))return V.alphanumeric}return n?V.text:V.basic},t.getAutoSortDir=()=>{const i=e.getFilteredRowModel().flatRows[0];return"string"==typeof(null==i?void 0:i.getValue(t.id))?"asc":"desc"},t.getSortingFn=()=>{var i,n;if(!t)throw new Error;return s(t.columnDef.sortingFn)?t.columnDef.sortingFn:"auto"===t.columnDef.sortingFn?t.getAutoSortingFn():null!=(i=null==(n=e.options.sortingFns)?void 0:n[t.columnDef.sortingFn])?i:V[t.columnDef.sortingFn]},t.toggleSorting=(i,n)=>{const o=t.getNextSortingOrder(),s=null!=i;e.setSorting((r=>{const a=null==r?void 0:r.find((e=>e.id===t.id)),l=null==r?void 0:r.findIndex((e=>e.id===t.id));let h,c=[],u=s?i:"desc"===o;var d;return h=null!=r&&r.length&&t.getCanMultiSort()&&n?a?"toggle":"add":null!=r&&r.length&&l!==r.length-1?"replace":a?"toggle":"replace","toggle"===h&&(s||o||(h="remove")),"add"===h?(c=[...r,{id:t.id,desc:u}],c.splice(0,c.length-(null!=(d=e.options.maxMultiSortColCount)?d:Number.MAX_SAFE_INTEGER))):c="toggle"===h?r.map((e=>e.id===t.id?{...e,desc:u}:e)):"remove"===h?r.filter((e=>e.id!==t.id)):[{id:t.id,desc:u}],c}))},t.getFirstSortDir=()=>{var i,n;return(null!=(i=null!=(n=t.columnDef.sortDescFirst)?n:e.options.sortDescFirst)?i:"desc"===t.getAutoSortDir())?"desc":"asc"},t.getNextSortingOrder=i=>{var n,o;const s=t.getFirstSortDir(),r=t.getIsSorted();return r?!!(r===s||null!=(n=e.options.enableSortingRemoval)&&!n||i&&null!=(o=e.options.enableMultiRemove)&&!o)&&("desc"===r?"asc":"desc"):s},t.getCanSort=()=>{var i,n;return(null==(i=t.columnDef.enableSorting)||i)&&(null==(n=e.options.enableSorting)||n)&&!!t.accessorFn},t.getCanMultiSort=()=>{var i,n;return null!=(i=null!=(n=t.columnDef.enableMultiSort)?n:e.options.enableMultiSort)?i:!!t.accessorFn},t.getIsSorted=()=>{var i;const n=null==(i=e.getState().sorting)?void 0:i.find((e=>e.id===t.id));return!!n&&(n.desc?"desc":"asc")},t.getSortIndex=()=>{var i,n;return null!=(i=null==(n=e.getState().sorting)?void 0:n.findIndex((e=>e.id===t.id)))?i:-1},t.clearSorting=()=>{e.setSorting((e=>null!=e&&e.length?e.filter((e=>e.id!==t.id)):[]))},t.getToggleSortingHandler=()=>{const i=t.getCanSort();return n=>{i&&(null==n.persist||n.persist(),null==t.toggleSorting||t.toggleSorting(void 0,!!t.getCanMultiSort()&&(null==e.options.isMultiSortEvent?void 0:e.options.isMultiSortEvent(n))))}}},createTable:t=>{t.setSorting=e=>null==t.options.onSortingChange?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var i,n;t.setSorting(e?[]:null!=(i=null==(n=t.initialState)?void 0:n.sorting)?i:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},{getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,i;return null!=(e=null==(i=t.getValue())||null==i.toString?void 0:i.toString())?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:o("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping((e=>null!=e&&e.includes(t.id)?e.filter((e=>e!==t.id)):[...null!=e?e:[],t.id]))},t.getCanGroup=()=>{var i,n,o,s;return null!=(i=null==(n=null!=(o=null==(s=t.columnDef.enableGrouping)||s)?o:e.options.enableGrouping)||n)?i:!!t.accessorFn},t.getIsGrouped=()=>{var i;return null==(i=e.getState().grouping)?void 0:i.includes(t.id)},t.getGroupedIndex=()=>{var i;return null==(i=e.getState().grouping)?void 0:i.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const e=t.getCanGroup();return()=>{e&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const i=e.getCoreRowModel().flatRows[0],n=null==i?void 0:i.getValue(t.id);return"number"==typeof n?R.sum:"[object Date]"===Object.prototype.toString.call(n)?R.extent:void 0},t.getAggregationFn=()=>{var i,n;if(!t)throw new Error;return s(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:"auto"===t.columnDef.aggregationFn?t.getAutoAggregationFn():null!=(i=null==(n=e.options.aggregationFns)?void 0:n[t.columnDef.aggregationFn])?i:R[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>null==t.options.onGroupingChange?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var i,n;t.setGrouping(e?[]:null!=(i=null==(n=t.initialState)?void 0:n.grouping)?i:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=i=>{if(t._groupingValuesCache.hasOwnProperty(i))return t._groupingValuesCache[i];const n=e.getColumn(i);return null!=n&&n.columnDef.getGroupingValue?(t._groupingValuesCache[i]=n.columnDef.getGroupingValue(t.original),t._groupingValuesCache[i]):t.getValue(i)},t._groupingValuesCache={}},createCell:(t,e,i,n)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===i.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var e;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!(null==(e=i.subRows)||!e.length)}}},f,{getInitialState:t=>({...t,pagination:{pageIndex:0,pageSize:10,...null==t?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:o("pagination",t)}),createTable:t=>{let e=!1,i=!1;t._autoResetPageIndex=()=>{var n,o;if(e){if(null!=(n=null!=(o=t.options.autoResetAll)?o:t.options.autoResetPageIndex)?n:!t.options.manualPagination){if(i)return;i=!0,t._queue((()=>{t.resetPageIndex(),i=!1}))}}else t._queue((()=>{e=!0}))},t.setPagination=e=>null==t.options.onPaginationChange?void 0:t.options.onPaginationChange((t=>n(e,t))),t.resetPagination=e=>{var i;t.setPagination(e?{pageIndex:0,pageSize:10}:null!=(i=t.initialState.pagination)?i:{pageIndex:0,pageSize:10})},t.setPageIndex=e=>{t.setPagination((i=>{let o=n(e,i.pageIndex);const s=void 0===t.options.pageCount||-1===t.options.pageCount?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}}))},t.resetPageIndex=e=>{var i,n;t.setPageIndex(e?0:null!=(i=null==(n=t.initialState)||null==(n=n.pagination)?void 0:n.pageIndex)?i:0)},t.resetPageSize=e=>{var i,n;t.setPageSize(e?10:null!=(i=null==(n=t.initialState)||null==(n=n.pagination)?void 0:n.pageSize)?i:10)},t.setPageSize=e=>{t.setPagination((t=>{const i=Math.max(1,n(e,t.pageSize)),o=t.pageSize*t.pageIndex,s=Math.floor(o/i);return{...t,pageIndex:s,pageSize:i}}))},t.setPageCount=e=>t.setPagination((i=>{var o;let s=n(e,null!=(o=t.options.pageCount)?o:-1);return"number"==typeof s&&(s=Math.max(-1,s)),{...i,pageCount:s}})),t.getPageOptions=r((()=>[t.getPageCount()]),(t=>{let e=[];return t&&t>0&&(e=[...new Array(t)].fill(null).map(((t,e)=>e))),e}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:e}=t.getState().pagination,i=t.getPageCount();return-1===i||0!==i&&e<i-1},t.previousPage=()=>t.setPageIndex((t=>t-1)),t.nextPage=()=>t.setPageIndex((t=>t+1)),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var e;return null!=(e=t.options.pageCount)?e:Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)}}},P,u];function N(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let i={_features:z};const o=i._features.reduce(((t,e)=>Object.assign(t,null==e.getDefaultOptions?void 0:e.getDefaultOptions(i))),{});let s={...null!=(e=t.initialState)?e:{}};i._features.forEach((t=>{var e;s=null!=(e=null==t.getInitialState?void 0:t.getInitialState(s))?e:s}));const a=[];let l=!1;const h={_features:z,options:{...o,...t},initialState:s,_queue:t=>{a.push(t),l||(l=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();l=!1})).catch((t=>setTimeout((()=>{throw t})))))},reset:()=>{i.setState(i.initialState)},setOptions:t=>{const e=n(t,i.options);i.options=(t=>i.options.mergeOptions?i.options.mergeOptions(o,t):{...o,...t})(e)},getState:()=>i.options.state,setState:t=>{null==i.options.onStateChange||i.options.onStateChange(t)},_getRowId:(t,e,n)=>{var o;return null!=(o=null==i.options.getRowId?void 0:i.options.getRowId(t,e,n))?o:`${n?[n.id,e].join("."):e}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(t,e)=>{const n=(e?i.getCoreRowModel():i.getRowModel()).rowsById[t];if(!n)throw new Error;return n},_getDefaultColumnDef:r((()=>[i.options.defaultColumn]),(t=>{var e;return t=null!=(e=t)?e:{},{header:t=>{const e=t.header.column.columnDef;return e.accessorKey?e.accessorKey:e.accessorFn?e.id:null},cell:t=>{var e,i;return null!=(e=null==(i=t.renderValue())||null==i.toString?void 0:i.toString())?e:null},...i._features.reduce(((t,e)=>Object.assign(t,null==e.getDefaultColumnDef?void 0:e.getDefaultColumnDef())),{}),...t}}),{debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns},key:!1}),_getColumnDefs:()=>i.options.columns,getAllColumns:r((()=>[i._getColumnDefs()]),(t=>{const e=function(t,n,o){return void 0===o&&(o=0),t.map((t=>{const s=function(t,e,i,n){var o,s;const a={...t._getDefaultColumnDef(),...e},l=a.accessorKey;let h,c=null!=(o=null!=(s=a.id)?s:l?l.replace(".","_"):void 0)?o:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?h=a.accessorFn:l&&(h=l.includes(".")?t=>{let e=t;for(const t of l.split(".")){var i;e=null==(i=e)?void 0:i[t]}return e}:t=>t[a.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:h,parent:n,depth:i,columnDef:a,columns:[],getFlatColumns:r((()=>[!0]),(()=>{var t;return[u,...null==(t=u.columns)?void 0:t.flatMap((t=>t.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),getLeafColumns:r((()=>[t._getOrderColumnsFn()]),(t=>{var e;if(null!=(e=u.columns)&&e.length){let e=u.columns.flatMap((t=>t.getLeafColumns()));return t(e)}return[u]}),{key:"column.getLeafColumns",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}})};for(const e of t._features)null==e.createColumn||e.createColumn(u,t);return u}(i,t,o,n),a=t;return s.columns=a.columns?e(a.columns,s,o+1):[],s}))};return e(t)}),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),getAllFlatColumns:r((()=>[i.getAllColumns()]),(t=>t.flatMap((t=>t.getFlatColumns()))),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),_getAllFlatColumnsById:r((()=>[i.getAllFlatColumns()]),(t=>t.reduce(((t,e)=>(t[e.id]=e,t)),{})),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),getAllLeafColumns:r((()=>[i.getAllColumns(),i._getOrderColumnsFn()]),((t,e)=>e(t.flatMap((t=>t.getLeafColumns())))),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),getColumn:t=>i._getAllFlatColumnsById()[t]};Object.assign(i,h);for(let t=0;t<i._features.length;t++){const e=i._features[t];null==e||null==e.createTable||e.createTable(i)}return i}const B=(t,e,i,n,o,s,a)=>{let l={id:e,index:n,original:i,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:e=>{if(l._valuesCache.hasOwnProperty(e))return l._valuesCache[e];const i=t.getColumn(e);return null!=i&&i.accessorFn?(l._valuesCache[e]=i.accessorFn(l.original,n),l._valuesCache[e]):void 0},getUniqueValues:e=>{if(l._uniqueValuesCache.hasOwnProperty(e))return l._uniqueValuesCache[e];const i=t.getColumn(e);return null!=i&&i.accessorFn?i.columnDef.getUniqueValues?(l._uniqueValuesCache[e]=i.columnDef.getUniqueValues(l.original,n),l._uniqueValuesCache[e]):(l._uniqueValuesCache[e]=[l.getValue(e)],l._uniqueValuesCache[e]):void 0},renderValue:e=>{var i;return null!=(i=l.getValue(e))?i:t.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>function(t,e){const i=[],n=t=>{t.forEach((t=>{i.push(t);const o=e(t);null!=o&&o.length&&n(o)}))};return n(t),i}(l.subRows,(t=>t.subRows)),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let t=[],e=l;for(;;){const i=e.getParentRow();if(!i)break;t.push(i),e=i}return t.reverse()},getAllCells:r((()=>[t.getAllLeafColumns()]),(e=>e.map((e=>function(t,e,i,n){const o={id:`${e.id}_${i.id}`,row:e,column:i,getValue:()=>e.getValue(n),renderValue:()=>{var e;return null!=(e=o.getValue())?e:t.options.renderFallbackValue},getContext:r((()=>[t,i,e,o]),((t,e,i,n)=>({table:t,column:e,row:i,cell:n,getValue:n.getValue,renderValue:n.renderValue})),{key:!1,debug:()=>t.options.debugAll})};return t._features.forEach((n=>{null==n.createCell||n.createCell(o,i,e,t)}),{}),o}(t,l,e,e.id)))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),_getAllCellsByColumnId:r((()=>[l.getAllCells()]),(t=>t.reduce(((t,e)=>(t[e.column.id]=e,t)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})};for(let e=0;e<t._features.length;e++){const i=t._features[e];null==i||null==i.createRow||i.createRow(l,t)}return l};function H(){return{accessor:(t,e)=>"function"==typeof t?{...e,accessorFn:t}:{...e,accessorKey:t},display:t=>t,group:t=>t}}function j(){return t=>r((()=>[t.options.data]),(e=>{const i={rows:[],flatRows:[],rowsById:{}},n=function(e,o,s){void 0===o&&(o=0);const r=[];for(let l=0;l<e.length;l++){const h=B(t,t._getRowId(e[l],l,s),e[l],l,o,void 0,null==s?void 0:s.id);var a;i.flatRows.push(h),i.rowsById[h.id]=h,r.push(h),t.options.getSubRows&&(h.originalSubRows=t.options.getSubRows(e[l],l),null!=(a=h.originalSubRows)&&a.length&&(h.subRows=n(h.originalSubRows,o+1,h)))}return r};return i.rows=n(e),i}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function W(){return t=>r((()=>[t.getState().sorting,t.getPreSortedRowModel()]),((e,i)=>{if(!i.rows.length||null==e||!e.length)return i;const n=t.getState().sorting,o=[],s=n.filter((e=>{var i;return null==(i=t.getColumn(e.id))?void 0:i.getCanSort()})),r={};s.forEach((e=>{const i=t.getColumn(e.id);i&&(r[e.id]={sortUndefined:i.columnDef.sortUndefined,invertSorting:i.columnDef.invertSorting,sortingFn:i.getSortingFn()})}));const a=t=>{const e=t.map((t=>({...t})));return e.sort(((t,e)=>{for(let n=0;n<s.length;n+=1){var i;const o=s[n],a=r[o.id],l=null!=(i=null==o?void 0:o.desc)&&i;let h=0;if(a.sortUndefined){const i=void 0===t.getValue(o.id),n=void 0===e.getValue(o.id);(i||n)&&(h=i&&n?0:i?a.sortUndefined:-a.sortUndefined)}if(0===h&&(h=a.sortingFn(t,e,o.id)),0!==h)return l&&(h*=-1),a.invertSorting&&(h*=-1),h}return t.index-e.index})),e.forEach((t=>{var e;o.push(t),null!=(e=t.subRows)&&e.length&&(t.subRows=a(t.subRows))})),e};return{rows:a(i.rows),flatRows:o,rowsById:i.rowsById}}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}}}]); //# sourceMappingURL=895.b86d062dedb179e1af3a.js.map