diff --git a/backend/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java b/backend/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java index e3c373b..4be8d38 100644 --- a/backend/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java +++ b/backend/src/main/java/net/miarma/contaminus/server/HttpServerVerticle.java @@ -13,24 +13,27 @@ public class HttpServerVerticle extends AbstractVerticle { Constants.LOGGER.info("🟒 Iniciando HttpServerVerticle..."); Router router = Router.router(vertx); - - router.route("/*").handler(StaticHandler.create(Constants.BASE_DIR + "/webroot") - .setDefaultContentEncoding("UTF-8")); - + + router.route("/*") + .handler( + StaticHandler.create("webroot") + .setDefaultContentEncoding("UTF-8") + ); router.route("/dashboard/*").handler(ctx -> { ctx.reroute("/index.html"); }); vertx.createHttpServer().requestHandler(router).listen( - Host.getWebserverPort(), Host.getHost(), result -> { - if (result.succeeded()) { - Constants.LOGGER.info(String.format("πŸ“‘ HttpServerVerticle desplegado. (http://%s:%d)", - Host.getHost(), Host.getWebserverPort()) - ); - } else { - Constants.LOGGER.error("❌ Error al desplegar HttpServerVerticle", result.cause()); - } - }); + Host.getWebserverPort(), Host.getHost(), result -> { + if (result.succeeded()) { + Constants.LOGGER.info(String.format("πŸ“‘ HttpServerVerticle desplegado. (http://%s:%d)", + Host.getHost(), Host.getWebserverPort()) + ); + } else { + Constants.LOGGER.error("❌ Error al desplegar HttpServerVerticle", result.cause()); + } + } + ); } } diff --git a/backend/src/main/resources/webroot/assets/chartjs-C6LAl0aW.js b/backend/src/main/resources/webroot/assets/chartjs-C6LAl0aW.js new file mode 100644 index 0000000..9186f20 --- /dev/null +++ b/backend/src/main/resources/webroot/assets/chartjs-C6LAl0aW.js @@ -0,0 +1,16 @@ +var qi=Object.defineProperty;var Gi=(s,t,e)=>t in s?qi(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var k=(s,t,e)=>Gi(s,typeof t!="symbol"?t+"":t,e);/*! + * @kurkle/color v0.3.4 + * https://github.com/kurkle/color#readme + * (c) 2024 Jukka Kurkela + * Released under the MIT License + */function Ut(s){return s+.5|0}const J=(s,t,e)=>Math.max(Math.min(s,e),t);function Lt(s){return J(Ut(s*2.55),0,255)}function et(s){return J(Ut(s*255),0,255)}function Z(s){return J(Ut(s/2.55)/100,0,1)}function es(s){return J(Ut(s*100),0,100)}const W={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},Ee=[..."0123456789ABCDEF"],Zi=s=>Ee[s&15],Qi=s=>Ee[(s&240)>>4]+Ee[s&15],qt=s=>(s&240)>>4===(s&15),Ji=s=>qt(s.r)&&qt(s.g)&&qt(s.b)&&qt(s.a);function tn(s){var t=s.length,e;return s[0]==="#"&&(t===4||t===5?e={r:255&W[s[1]]*17,g:255&W[s[2]]*17,b:255&W[s[3]]*17,a:t===5?W[s[4]]*17:255}:(t===7||t===9)&&(e={r:W[s[1]]<<4|W[s[2]],g:W[s[3]]<<4|W[s[4]],b:W[s[5]]<<4|W[s[6]],a:t===9?W[s[7]]<<4|W[s[8]]:255})),e}const en=(s,t)=>s<255?t(s):"";function sn(s){var t=Ji(s)?Zi:Qi;return s?"#"+t(s.r)+t(s.g)+t(s.b)+en(s.a,t):void 0}const nn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pi(s,t,e){const i=t*Math.min(e,1-e),n=(o,r=(o+s/30)%12)=>e-i*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function on(s,t,e){const i=(n,o=(n+s/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function rn(s,t,e){const i=pi(s,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function an(s,t,e,i,n){return s===n?(t-e)/i+(t.5?h/(2-o-r):h/(o+r),c=an(e,i,n,h,o),c=c*60+.5),[c|0,l||0,a]}function je(s,t,e,i){return(Array.isArray(t)?s(t[0],t[1],t[2]):s(t,e,i)).map(et)}function He(s,t,e){return je(pi,s,t,e)}function cn(s,t,e){return je(rn,s,t,e)}function ln(s,t,e){return je(on,s,t,e)}function mi(s){return(s%360+360)%360}function hn(s){const t=nn.exec(s);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?Lt(+t[5]):et(+t[5]));const n=mi(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?i=cn(n,o,r):t[1]==="hsv"?i=ln(n,o,r):i=He(n,o,r),{r:i[0],g:i[1],b:i[2],a:e}}function fn(s,t){var e=Ve(s);e[0]=mi(e[0]+t),e=He(e),s.r=e[0],s.g=e[1],s.b=e[2]}function un(s){if(!s)return;const t=Ve(s),e=t[0],i=es(t[1]),n=es(t[2]);return s.a<255?`hsla(${e}, ${i}%, ${n}%, ${Z(s.a)})`:`hsl(${e}, ${i}%, ${n}%)`}const ss={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"},is={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function dn(){const s={},t=Object.keys(is),e=Object.keys(ss);let i,n,o,r,a;for(i=0;i>16&255,o>>8&255,o&255]}return s}let Gt;function gn(s){Gt||(Gt=dn(),Gt.transparent=[0,0,0,0]);const t=Gt[s.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const pn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function mn(s){const t=pn.exec(s);let e=255,i,n,o;if(t){if(t[7]!==i){const r=+t[7];e=t[8]?Lt(r):J(r*255,0,255)}return i=+t[1],n=+t[3],o=+t[5],i=255&(t[2]?Lt(i):J(i,0,255)),n=255&(t[4]?Lt(n):J(n,0,255)),o=255&(t[6]?Lt(o):J(o,0,255)),{r:i,g:n,b:o,a:e}}}function _n(s){return s&&(s.a<255?`rgba(${s.r}, ${s.g}, ${s.b}, ${Z(s.a)})`:`rgb(${s.r}, ${s.g}, ${s.b})`)}const ve=s=>s<=.0031308?s*12.92:Math.pow(s,1/2.4)*1.055-.055,bt=s=>s<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4);function bn(s,t,e){const i=bt(Z(s.r)),n=bt(Z(s.g)),o=bt(Z(s.b));return{r:et(ve(i+e*(bt(Z(t.r))-i))),g:et(ve(n+e*(bt(Z(t.g))-n))),b:et(ve(o+e*(bt(Z(t.b))-o))),a:s.a+e*(t.a-s.a)}}function Zt(s,t,e){if(s){let i=Ve(s);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=He(i),s.r=i[0],s.g=i[1],s.b=i[2]}}function _i(s,t){return s&&Object.assign(t||{},s)}function ns(s){var t={r:0,g:0,b:0,a:255};return Array.isArray(s)?s.length>=3&&(t={r:s[0],g:s[1],b:s[2],a:255},s.length>3&&(t.a=et(s[3]))):(t=_i(s,{r:0,g:0,b:0,a:1}),t.a=et(t.a)),t}function xn(s){return s.charAt(0)==="r"?mn(s):hn(s)}class Bt{constructor(t){if(t instanceof Bt)return t;const e=typeof t;let i;e==="object"?i=ns(t):e==="string"&&(i=tn(t)||gn(t)||xn(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=_i(this._rgb);return t&&(t.a=Z(t.a)),t}set rgb(t){this._rgb=ns(t)}rgbString(){return this._valid?_n(this._rgb):void 0}hexString(){return this._valid?sn(this._rgb):void 0}hslString(){return this._valid?un(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,c=i.a-n.a,l=((a*c===-1?a:(a+c)/(1+a*c))+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=r*i.a+(1-r)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=bn(this._rgb,t._rgb,e)),this}clone(){return new Bt(this.rgb)}alpha(t){return this._rgb.a=et(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Ut(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Zt(this._rgb,2,t),this}darken(t){return Zt(this._rgb,2,-t),this}saturate(t){return Zt(this._rgb,1,t),this}desaturate(t){return Zt(this._rgb,1,-t),this}rotate(t){return fn(this._rgb,t),this}}/*! + * Chart.js v4.4.8 + * https://www.chartjs.org + * (c) 2025 Chart.js Contributors + * Released under the MIT License + */const yn=(()=>{let s=0;return()=>s++})();function T(s){return s==null}function R(s){if(Array.isArray&&Array.isArray(s))return!0;const t=Object.prototype.toString.call(s);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function S(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}function B(s){return(typeof s=="number"||s instanceof Number)&&isFinite(+s)}function U(s,t){return B(s)?s:t}function P(s,t){return typeof s>"u"?t:s}const vn=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*t:+s;function E(s,t,e){if(s&&typeof s.call=="function")return s.apply(e,t)}function N(s,t,e,i){let n,o,r;if(R(s))for(o=s.length,n=0;ns,x:s=>s.x,y:s=>s.y};function Mn(s){const t=s.split("."),e=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Sn(s){const t=Mn(s);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function ue(s,t){return(rs[t]||(rs[t]=Sn(t)))(s)}function We(s){return s.charAt(0).toUpperCase()+s.slice(1)}const de=s=>typeof s<"u",st=s=>typeof s=="function",as=(s,t)=>{if(s.size!==t.size)return!1;for(const e of s)if(!t.has(e))return!1;return!0};function On(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}const j=Math.PI,q=2*j,Dn=q+j,ge=Number.POSITIVE_INFINITY,Pn=j/180,tt=j/2,ot=j/4,cs=j*2/3,xi=Math.log10,xt=Math.sign;function At(s,t,e){return Math.abs(s-t)n-o).pop(),t}function In(s){return typeof s=="symbol"||typeof s=="object"&&s!==null&&!(Symbol.toPrimitive in s||"toString"in s||"valueOf"in s)}function jt(s){return!In(s)&&!isNaN(parseFloat(s))&&isFinite(s)}function Cn(s,t){const e=Math.round(s);return e-t<=s&&e+t>=s}function Ln(s,t,e){let i,n,o;for(i=0,n=s.length;ic&&l=Math.min(t,e)-i&&s<=Math.max(t,e)+i}function $e(s,t,e){e=e||(r=>s[r]1;)o=n+i>>1,e(o)?n=o:i=o;return{lo:n,hi:i}}const ut=(s,t,e,i)=>$e(s,e,i?n=>{const o=s[n][t];return os[n][t]$e(s,e,i=>s[i][t]>=e);function Nn(s,t,e){let i=0,n=s.length;for(;ii&&s[n-1]>e;)n--;return i>0||n{const i="_onData"+We(e),n=s[e];Object.defineProperty(s,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return s._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),r}})})}function us(s,t){const e=s._chartjs;if(!e)return;const i=e.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(ki.forEach(o=>{delete s[o]}),delete s._chartjs)}function Vn(s){const t=new Set(s);return t.size===s.length?s:Array.from(t)}const wi=function(){return typeof window>"u"?function(s){return s()}:window.requestAnimationFrame}();function Mi(s,t){let e=[],i=!1;return function(...n){e=n,i||(i=!0,wi.call(window,()=>{i=!1,s.apply(t,e)}))}}function jn(s,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(s,t,i)):s.apply(this,i),t}}const Hn=s=>s==="start"?"left":s==="end"?"right":"center",ds=(s,t,e)=>s==="start"?t:s==="end"?e:(t+e)/2;function Wn(s,t,e){const i=t.length;let n=0,o=i;if(s._sorted){const{iScale:r,vScale:a,_parsed:c}=s,l=s.dataset&&s.dataset.options?s.dataset.options.spanGaps:null,h=r.axis,{min:f,max:u,minDefined:d,maxDefined:m}=r.getUserBounds();if(d){if(n=Math.min(ut(c,h,f).lo,e?i:ut(t,h,r.getPixelForValue(f)).lo),l){const g=c.slice(0,n+1).reverse().findIndex(p=>!T(p[a.axis]));n-=Math.max(0,g)}n=X(n,0,i-1)}if(m){let g=Math.max(ut(c,r.axis,u,!0).hi+1,e?0:ut(t,h,r.getPixelForValue(u),!0).hi+1);if(l){const p=c.slice(g-1).findIndex(_=>!T(_[a.axis]));g+=Math.max(0,p)}o=X(g,n,i)-n}else o=i-n}return{start:n,count:o}}function $n(s){const{xScale:t,yScale:e,_scaleRanges:i}=s,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return s._scaleRanges=n,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,n),o}const Qt=s=>s===0||s===1,gs=(s,t,e)=>-(Math.pow(2,10*(s-=1))*Math.sin((s-t)*q/e)),ps=(s,t,e)=>Math.pow(2,-10*s)*Math.sin((s-t)*q/e)+1,zt={linear:s=>s,easeInQuad:s=>s*s,easeOutQuad:s=>-s*(s-2),easeInOutQuad:s=>(s/=.5)<1?.5*s*s:-.5*(--s*(s-2)-1),easeInCubic:s=>s*s*s,easeOutCubic:s=>(s-=1)*s*s+1,easeInOutCubic:s=>(s/=.5)<1?.5*s*s*s:.5*((s-=2)*s*s+2),easeInQuart:s=>s*s*s*s,easeOutQuart:s=>-((s-=1)*s*s*s-1),easeInOutQuart:s=>(s/=.5)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2),easeInQuint:s=>s*s*s*s*s,easeOutQuint:s=>(s-=1)*s*s*s*s+1,easeInOutQuint:s=>(s/=.5)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2),easeInSine:s=>-Math.cos(s*tt)+1,easeOutSine:s=>Math.sin(s*tt),easeInOutSine:s=>-.5*(Math.cos(j*s)-1),easeInExpo:s=>s===0?0:Math.pow(2,10*(s-1)),easeOutExpo:s=>s===1?1:-Math.pow(2,-10*s)+1,easeInOutExpo:s=>Qt(s)?s:s<.5?.5*Math.pow(2,10*(s*2-1)):.5*(-Math.pow(2,-10*(s*2-1))+2),easeInCirc:s=>s>=1?s:-(Math.sqrt(1-s*s)-1),easeOutCirc:s=>Math.sqrt(1-(s-=1)*s),easeInOutCirc:s=>(s/=.5)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1),easeInElastic:s=>Qt(s)?s:gs(s,.075,.3),easeOutElastic:s=>Qt(s)?s:ps(s,.075,.3),easeInOutElastic(s){return Qt(s)?s:s<.5?.5*gs(s*2,.1125,.45):.5+.5*ps(s*2-1,.1125,.45)},easeInBack(s){return s*s*((1.70158+1)*s-1.70158)},easeOutBack(s){return(s-=1)*s*((1.70158+1)*s+1.70158)+1},easeInOutBack(s){let t=1.70158;return(s/=.5)<1?.5*(s*s*(((t*=1.525)+1)*s-t)):.5*((s-=2)*s*(((t*=1.525)+1)*s+t)+2)},easeInBounce:s=>1-zt.easeOutBounce(1-s),easeOutBounce(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},easeInOutBounce:s=>s<.5?zt.easeInBounce(s*2)*.5:zt.easeOutBounce(s*2-1)*.5+.5};function Ue(s){if(s&&typeof s=="object"){const t=s.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ms(s){return Ue(s)?s:new Bt(s)}function ke(s){return Ue(s)?s:new Bt(s).saturate(.5).darken(.1).hexString()}const Un=["x","y","borderWidth","radius","tension"],Yn=["color","borderColor","backgroundColor"];function Kn(s){s.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),s.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),s.set("animations",{colors:{type:"color",properties:Yn},numbers:{type:"number",properties:Un}}),s.describe("animations",{_fallback:"animation"}),s.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Xn(s){s.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const _s=new Map;function qn(s,t){t=t||{};const e=s+JSON.stringify(t);let i=_s.get(e);return i||(i=new Intl.NumberFormat(s,t),_s.set(e,i)),i}function Si(s,t,e){return qn(t,e).format(s)}const Gn={values(s){return R(s)?s:""+s},numeric(s,t,e){if(s===0)return"0";const i=this.chart.options.locale;let n,o=s;if(e.length>1){const l=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(l<1e-4||l>1e15)&&(n="scientific"),o=Zn(s,e)}const r=xi(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),c={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),Si(s,i,c)}};function Zn(s,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&s!==Math.floor(s)&&(e=s-Math.floor(s)),e}var Oi={formatters:Gn};function Qn(s){s.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Oi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),s.route("scale.ticks","color","","color"),s.route("scale.grid","color","","borderColor"),s.route("scale.border","color","","borderColor"),s.route("scale.title","color","","color"),s.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),s.describe("scales",{_fallback:"scale"}),s.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const pt=Object.create(null),Fe=Object.create(null);function Rt(s,t){if(!t)return s;const e=t.split(".");for(let i=0,n=e.length;ii.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,n)=>ke(n.backgroundColor),this.hoverBorderColor=(i,n)=>ke(n.borderColor),this.hoverColor=(i,n)=>ke(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return we(this,t,e)}get(t){return Rt(this,t)}describe(t,e){return we(Fe,t,e)}override(t,e){return we(pt,t,e)}route(t,e,i,n){const o=Rt(this,t),r=Rt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const c=this[a],l=r[n];return S(c)?Object.assign({},l,c):P(c,l)},set(c){this[a]=c}}})}apply(t){t.forEach(e=>e(this))}}var F=new Jn({_scriptable:s=>!s.startsWith("on"),_indexable:s=>s!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Kn,Xn,Qn]);function to(s){return!s||T(s.size)||T(s.family)?null:(s.style?s.style+" ":"")+(s.weight?s.weight+" ":"")+s.size+"px "+s.family}function bs(s,t,e,i,n){let o=t[n];return o||(o=t[n]=s.measureText(n).width,e.push(n)),o>i&&(i=o),i}function rt(s,t,e){const i=s.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*i)/i+n}function xs(s,t){!t&&!s||(t=t||s.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,s.width,s.height),t.restore())}function eo(s,t,e,i){so(s,t,e,i)}function so(s,t,e,i,n){let o,r,a,c,l,h,f,u;const d=t.pointStyle,m=t.rotation,g=t.radius;let p=(m||0)*Pn;if(d&&typeof d=="object"&&(o=d.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){s.save(),s.translate(e,i),s.rotate(p),s.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),s.restore();return}if(!(isNaN(g)||g<=0)){switch(s.beginPath(),d){default:s.arc(e,i,g,0,q),s.closePath();break;case"triangle":h=g,s.moveTo(e+Math.sin(p)*h,i-Math.cos(p)*g),p+=cs,s.lineTo(e+Math.sin(p)*h,i-Math.cos(p)*g),p+=cs,s.lineTo(e+Math.sin(p)*h,i-Math.cos(p)*g),s.closePath();break;case"rectRounded":l=g*.516,c=g-l,r=Math.cos(p+ot)*c,f=Math.cos(p+ot)*c,a=Math.sin(p+ot)*c,u=Math.sin(p+ot)*c,s.arc(e-f,i-a,l,p-j,p-tt),s.arc(e+u,i-r,l,p-tt,p),s.arc(e+f,i+a,l,p,p+tt),s.arc(e-u,i+r,l,p+tt,p+j),s.closePath();break;case"rect":if(!m){c=Math.SQRT1_2*g,h=c,s.rect(e-h,i-c,2*h,2*c);break}p+=ot;case"rectRot":f=Math.cos(p)*g,r=Math.cos(p)*g,a=Math.sin(p)*g,u=Math.sin(p)*g,s.moveTo(e-f,i-a),s.lineTo(e+u,i-r),s.lineTo(e+f,i+a),s.lineTo(e-u,i+r),s.closePath();break;case"crossRot":p+=ot;case"cross":f=Math.cos(p)*g,r=Math.cos(p)*g,a=Math.sin(p)*g,u=Math.sin(p)*g,s.moveTo(e-f,i-a),s.lineTo(e+f,i+a),s.moveTo(e+u,i-r),s.lineTo(e-u,i+r);break;case"star":f=Math.cos(p)*g,r=Math.cos(p)*g,a=Math.sin(p)*g,u=Math.sin(p)*g,s.moveTo(e-f,i-a),s.lineTo(e+f,i+a),s.moveTo(e+u,i-r),s.lineTo(e-u,i+r),p+=ot,f=Math.cos(p)*g,r=Math.cos(p)*g,a=Math.sin(p)*g,u=Math.sin(p)*g,s.moveTo(e-f,i-a),s.lineTo(e+f,i+a),s.moveTo(e+u,i-r),s.lineTo(e-u,i+r);break;case"line":r=Math.cos(p)*g,a=Math.sin(p)*g,s.moveTo(e-r,i-a),s.lineTo(e+r,i+a);break;case"dash":s.moveTo(e,i),s.lineTo(e+Math.cos(p)*g,i+Math.sin(p)*g);break;case!1:s.closePath();break}s.fill(),t.borderWidth>0&&s.stroke()}}function Ht(s,t,e){return e=e||.5,!t||s&&s.x>t.left-e&&s.xt.top-e&&s.y0&&o.strokeColor!=="";let c,l;for(s.save(),s.font=n.string,oo(s,o),c=0;c+s||0;function uo(s,t){const e={},i=S(t),n=i?Object.keys(t):t,o=S(s)?i?r=>P(s[r],s[t[r]]):r=>s[r]:()=>s;for(const r of n)e[r]=fo(o(r));return e}function go(s){return uo(s,{top:"y",right:"x",bottom:"y",left:"x"})}function Wt(s){const t=go(s);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ae(s,t){s=s||{},t=t||F.font;let e=P(s.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=P(s.style,t.style);i&&!(""+i).match(lo)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:P(s.family,t.family),lineHeight:ho(P(s.lineHeight,t.lineHeight),e),size:e,style:i,weight:P(s.weight,t.weight),string:""};return n.string=to(n),n}function Jt(s,t,e,i){let n,o,r;for(n=0,o=s.length;ne&&a===0?0:a+c;return{min:r(i,-Math.abs(o)),max:r(n,o)}}function wt(s,t){return Object.assign(Object.create(s),t)}function Xe(s,t=[""],e,i,n=()=>s[0]){const o=e||s;typeof i>"u"&&(i=Ii("_fallback",s));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:s,_rootScopes:o,_fallback:i,_getTarget:n,override:a=>Xe([a,...s],t,o,i)};return new Proxy(r,{deleteProperty(a,c){return delete a[c],delete a._keys,delete s[0][c],!0},get(a,c){return Pi(a,c,()=>wo(c,t,s,a))},getOwnPropertyDescriptor(a,c){return Reflect.getOwnPropertyDescriptor(a._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(s[0])},has(a,c){return ks(a).includes(c)},ownKeys(a){return ks(a)},set(a,c,l){const h=a._storage||(a._storage=n());return a[c]=h[c]=l,delete a._keys,!0}})}function yt(s,t,e,i){const n={_cacheable:!1,_proxy:s,_context:t,_subProxy:e,_stack:new Set,_descriptors:Di(s,i),setContext:o=>yt(s,o,e,i),override:o=>yt(s.override(o),t,e,i)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete s[r],!0},get(o,r,a){return Pi(o,r,()=>_o(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(s,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,r)},getPrototypeOf(){return Reflect.getPrototypeOf(s)},has(o,r){return Reflect.has(s,r)},ownKeys(){return Reflect.ownKeys(s)},set(o,r,a){return s[r]=a,delete o[r],!0}})}function Di(s,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=s;return{allKeys:n,scriptable:e,indexable:i,isScriptable:st(e)?e:()=>e,isIndexable:st(i)?i:()=>i}}const mo=(s,t)=>s?s+We(t):t,qe=(s,t)=>S(t)&&s!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Pi(s,t,e){if(Object.prototype.hasOwnProperty.call(s,t)||t==="constructor")return s[t];const i=e();return s[t]=i,i}function _o(s,t,e){const{_proxy:i,_context:n,_subProxy:o,_descriptors:r}=s;let a=i[t];return st(a)&&r.isScriptable(t)&&(a=bo(t,a,s,e)),R(a)&&a.length&&(a=xo(t,a,s,r.isIndexable)),qe(t,a)&&(a=yt(a,n,o&&o[t],r)),a}function bo(s,t,e,i){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(s))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+s);a.add(s);let c=t(o,r||i);return a.delete(s),qe(s,c)&&(c=Ge(n._scopes,n,s,c)),c}function xo(s,t,e,i){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&i(s))return t[o.index%t.length];if(S(t[0])){const c=t,l=n._scopes.filter(h=>h!==c);t=[];for(const h of c){const f=Ge(l,n,s,h);t.push(yt(f,o,r&&r[s],a))}}return t}function Ti(s,t,e){return st(s)?s(t,e):s}const yo=(s,t)=>s===!0?t:typeof s=="string"?ue(t,s):void 0;function vo(s,t,e,i,n){for(const o of t){const r=yo(e,o);if(r){s.add(r);const a=Ti(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==i)return a}else if(r===!1&&typeof i<"u"&&e!==i)return null}return!1}function Ge(s,t,e,i){const n=t._rootScopes,o=Ti(t._fallback,e,i),r=[...s,...n],a=new Set;a.add(i);let c=vs(a,r,e,o||e,i);return c===null||typeof o<"u"&&o!==e&&(c=vs(a,r,o,c,i),c===null)?!1:Xe(Array.from(a),[""],n,o,()=>ko(t,e,i))}function vs(s,t,e,i,n){for(;e;)e=vo(s,t,e,i,n);return e}function ko(s,t,e){const i=s._getTarget();t in i||(i[t]={});const n=i[t];return R(n)&&S(e)?e:n||{}}function wo(s,t,e,i){let n;for(const o of t)if(n=Ii(mo(o,s),e),typeof n<"u")return qe(s,n)?Ge(e,i,s,n):n}function Ii(s,t){for(const e of t){if(!e)continue;const i=e[s];if(typeof i<"u")return i}}function ks(s){let t=s._keys;return t||(t=s._keys=Mo(s._scopes)),t}function Mo(s){const t=new Set;for(const e of s)for(const i of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}const So=Number.EPSILON||1e-14,vt=(s,t)=>ts==="x"?"y":"x";function Oo(s,t,e,i){const n=s.skip?t:s,o=t,r=e.skip?t:e,a=fs(o,n),c=fs(r,o);let l=a/(a+c),h=c/(a+c);l=isNaN(l)?0:l,h=isNaN(h)?0:h;const f=i*l,u=i*h;return{previous:{x:o.x-f*(r.x-n.x),y:o.y-f*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function Do(s,t,e){const i=s.length;let n,o,r,a,c,l=vt(s,0);for(let h=0;h!l.skip)),t.cubicInterpolationMode==="monotone")To(s,n);else{let l=i?s[s.length-1]:s[0];for(o=0,r=s.length;os.ownerDocument.defaultView.getComputedStyle(s,null);function Lo(s,t){return be(s).getPropertyValue(t)}const Eo=["top","right","bottom","left"];function gt(s,t,e){const i={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Eo[n];i[o]=parseFloat(s[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Fo=(s,t,e)=>(s>0||t>0)&&(!e||!e.shadowRoot);function Ao(s,t){const e=s.touches,i=e&&e.length?e[0]:s,{offsetX:n,offsetY:o}=i;let r=!1,a,c;if(Fo(n,o,s.target))a=n,c=o;else{const l=t.getBoundingClientRect();a=i.clientX-l.left,c=i.clientY-l.top,r=!0}return{x:a,y:c,box:r}}function ct(s,t){if("native"in s)return s;const{canvas:e,currentDevicePixelRatio:i}=t,n=be(e),o=n.boxSizing==="border-box",r=gt(n,"padding"),a=gt(n,"border","width"),{x:c,y:l,box:h}=Ao(s,e),f=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:d,height:m}=t;return o&&(d-=r.width+a.width,m-=r.height+a.height),{x:Math.round((c-f)/d*e.width/i),y:Math.round((l-u)/m*e.height/i)}}function zo(s,t,e){let i,n;if(t===void 0||e===void 0){const o=s&&Qe(s);if(!o)t=s.clientWidth,e=s.clientHeight;else{const r=o.getBoundingClientRect(),a=be(o),c=gt(a,"border","width"),l=gt(a,"padding");t=r.width-l.width-c.width,e=r.height-l.height-c.height,i=pe(a.maxWidth,o,"clientWidth"),n=pe(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||ge,maxHeight:n||ge}}const ee=s=>Math.round(s*10)/10;function Ro(s,t,e,i){const n=be(s),o=gt(n,"margin"),r=pe(n.maxWidth,s,"clientWidth")||ge,a=pe(n.maxHeight,s,"clientHeight")||ge,c=zo(s,t,e);let{width:l,height:h}=c;if(n.boxSizing==="content-box"){const u=gt(n,"border","width"),d=gt(n,"padding");l-=d.width+u.width,h-=d.height+u.height}return l=Math.max(0,l-o.width),h=Math.max(0,i?l/i:h-o.height),l=ee(Math.min(l,r,c.maxWidth)),h=ee(Math.min(h,a,c.maxHeight)),l&&!h&&(h=ee(l/2)),(t!==void 0||e!==void 0)&&i&&c.height&&h>c.height&&(h=c.height,l=ee(Math.floor(h*i))),{width:l,height:h}}function ws(s,t,e){const i=t||1,n=Math.floor(s.height*i),o=Math.floor(s.width*i);s.height=Math.floor(s.height),s.width=Math.floor(s.width);const r=s.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${s.height}px`,r.style.width=`${s.width}px`),s.currentDevicePixelRatio!==i||r.height!==n||r.width!==o?(s.currentDevicePixelRatio=i,r.height=n,r.width=o,s.ctx.setTransform(i,0,0,i,0,0),!0):!1}const No=function(){let s=!1;try{const t={get passive(){return s=!0,!1}};Ze()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return s}();function Ms(s,t){const e=Lo(s,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function lt(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:s.y+e*(t.y-s.y)}}function Bo(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:i==="middle"?e<.5?s.y:t.y:i==="after"?e<1?s.y:t.y:e>0?t.y:s.y}}function Vo(s,t,e,i){const n={x:s.cp2x,y:s.cp2y},o={x:t.cp1x,y:t.cp1y},r=lt(s,n,e),a=lt(n,o,e),c=lt(o,t,e),l=lt(r,a,e),h=lt(a,c,e);return lt(l,h,e)}function Li(s){return s==="angle"?{between:yi,compare:An,normalize:K}:{between:vi,compare:(t,e)=>t-e,normalize:t=>t}}function Ss({start:s,end:t,count:e,loop:i,style:n}){return{start:s%e,end:t%e,loop:i&&(t-s+1)%e===0,style:n}}function jo(s,t,e){const{property:i,start:n,end:o}=e,{between:r,normalize:a}=Li(i),c=t.length;let{start:l,end:h,loop:f}=s,u,d;if(f){for(l+=c,h+=c,u=0,d=c;uc(n,O,_)&&a(n,O)!==0,b=()=>a(o,_)===0||c(o,O,_),w=()=>g||D(),y=()=>!g||b();for(let v=h,M=h;v<=f;++v)x=t[v%r],!x.skip&&(_=l(x[i]),_!==O&&(g=c(_,n,o),p===null&&w()&&(p=a(_,n)===0?v:M),p!==null&&y()&&(m.push(Ss({start:p,end:v,loop:u,count:r,style:d})),p=null),M=v,O=_));return p!==null&&m.push(Ss({start:p,end:f,loop:u,count:r,style:d})),m}function Fi(s,t){const e=[],i=s.segments;for(let n=0;nn&&s[o%t].skip;)o--;return o%=t,{start:n,end:o}}function Wo(s,t,e,i){const n=s.length,o=[];let r=t,a=s[t],c;for(c=t+1;c<=e;++c){const l=s[c%n];l.skip||l.stop?a.skip||(i=!1,o.push({start:t%n,end:(c-1)%n,loop:i}),t=r=l.stop?c:null):(r=c,a.skip&&(t=c)),a=l}return r!==null&&o.push({start:t%n,end:r%n,loop:i}),o}function $o(s,t){const e=s.points,i=s.options.spanGaps,n=e.length;if(!n)return[];const o=!!s._loop,{start:r,end:a}=Ho(e,n,o,i);if(i===!0)return Os(s,[{start:r,end:a,loop:o}],e,t);const c=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=wi.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 r=o.length-1,a=!1,c;for(;r>=0;--r)c=o[r],c._active?(c._total>i.duration&&(i.duration=c._total),c.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,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var G=new Ko;const Ps="transparent",Xo={boolean(s,t,e){return e>.5?t:s},color(s,t,e){const i=ms(s||Ps),n=i.valid&&ms(t||Ps);return n&&n.valid?n.mix(i,e).hexString():t},number(s,t,e){return s+(t-s)*e}};class qo{constructor(t,e,i,n){const o=e[i];n=Jt([t.to,n,o,t.from]);const r=Jt([t.from,o,n]);this._active=!0,this._fn=t.fn||Xo[t.type||typeof r],this._easing=zt[t.easing]||zt.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=r,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,r=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Jt([t.to,e,n,t.from]),this._from=Jt([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,r=this._loop,a=this._to;let c;if(this._active=o!==a&&(r||e1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[n]=this._fn(o,a,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n{const o=t[n];if(!S(o))return;const r={};for(const a of e)r[a]=o[a];(R(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!i.has(a))&&i.set(a,r)})})}_animateOptions(t,e){const i=e.options,n=Qo(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&Zo(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let c;for(c=r.length-1;c>=0;--c){const l=r[c];if(l.charAt(0)==="$")continue;if(l==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[l];let f=o[l];const u=i.get(l);if(f)if(u&&f.active()){f.update(u,h,a);continue}else f.cancel();if(!u||!u.duration){t[l]=h;continue}o[l]=f=new qo(u,t,l,h),n.push(f)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return G.add(this._chart,i),!0}}function Zo(s,t){const e=[],i=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Ls(s,t){const{chart:e,_cachedMeta:i}=s,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=i,c=o.axis,l=r.axis,h=sr(o,r,i),f=t.length;let u;for(let d=0;de[i].axis===t).shift()}function or(s,t){return wt(s,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function rr(s,t,e){return wt(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Dt(s,t){const e=s.controller.index,i=s.vScale&&s.vScale.axis;if(i){t=t||s._parsed;for(const n of t){const o=n._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const Oe=s=>s==="reset"||s==="none",Es=(s,t)=>t?s:Object.assign({},s),ar=(s,t,e)=>s&&!t.hidden&&t._stacked&&{keys:Ai(e,!0),values:null};class Nt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Me(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Dt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(f,u,d,m)=>f==="x"?u:f==="r"?m:d,o=e.xAxisID=P(i.xAxisID,Se(t,"x")),r=e.yAxisID=P(i.yAxisID,Se(t,"y")),a=e.rAxisID=P(i.rAxisID,Se(t,"r")),c=e.indexAxis,l=e.iAxisID=n(c,o,r,a),h=e.vAxisID=n(c,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),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&&us(this._data,this),t._stacked&&Dt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e)){const n=this._cachedMeta;this._data=er(e,n)}else if(i!==e){if(i){us(i,this);const n=this._cachedMeta;Dt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Bn(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Me(e.vScale,e),e.stack!==i.stack&&(n=!0,Dt(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Ls(this,e._parsed),e._stacked=Me(e.vScale,e))}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:r}=i,a=o.axis;let c=t===0&&e===n.length?!0:i._sorted,l=t>0&&i._parsed[t-1],h,f,u;if(this._parsing===!1)i._parsed=n,i._sorted=!0,u=n;else{R(n[t])?u=this.parseArrayData(i,n,t,e):S(n[t])?u=this.parseObjectData(i,n,t,e):u=this.parsePrimitiveData(i,n,t,e);const d=()=>f[a]===null||l&&f[a]g||f=0;--u)if(!m()){this.updateRangeFromParsed(l,t,d,c);break}}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,r;for(n=0,o=e.length;n=0&&tthis.getContext(i,n,e),g=l.resolveNamedOptions(u,d,m,f);return g.$shared&&(g.$shared=c,o[r]=Object.freeze(Es(g,c))),g}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let c;if(n.options.animation!==!1){const h=this.chart.config,f=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),f);c=h.createResolver(u,this.getContext(t,i,e))}const l=new Go(n,c&&c.animations);return c&&c._cacheable&&(o[r]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Oe(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:r}}updateElement(t,e,i,n){Oe(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Oe(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[a,c,l]of this._syncList)this[a](c,l);this._syncList=[];const n=i.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o{for(l.length+=e,a=l.length-1;a>=r;a--)l[a]=l[a-e]};for(c(o),a=t;a0&&this.getParsed(e-1);for(let b=0;b=x){y.skip=!0;continue}const v=this.getParsed(b),M=T(v[d]),I=y[u]=r.getPixelForValue(v[u],b),C=y[d]=o||M?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,v,c):v[d],b);y.skip=isNaN(I)||isNaN(C)||M,y.stop=b>0&&Math.abs(v[u]-D[u])>p,g&&(y.parsed=v,y.raw=l.data[b]),f&&(y.options=h||this.resolveDataElementOptions(b,w.active?"active":n)),_||this.updateElement(w,b,y,n),D=v}}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)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}k(De,"id","line"),k(De,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),k(De,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function at(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Je{constructor(t){k(this,"options");this.options=t||{}}static override(t){Object.assign(Je.prototype,t)}init(){}formats(){return at()}parse(){return at()}format(){return at()}add(){return at()}diff(){return at()}startOf(){return at()}endOf(){return at()}}var cr={_date:Je};function lr(s,t,e,i){const{controller:n,data:o,_sorted:r}=s,a=n._cachedMeta.iScale,c=s.dataset&&s.dataset.options?s.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?Rn:ut;if(i){if(n._sharedOptions){const h=o[0],f=typeof h.getRange=="function"&&h.getRange(t);if(f){const u=l(o,t,e-f),d=l(o,t,e+f);return{lo:u.lo,hi:d.hi}}}}else{const h=l(o,t,e);if(c){const{vScale:f}=n._cachedMeta,{_parsed:u}=s,d=u.slice(0,h.lo+1).reverse().findIndex(g=>!T(g[f.axis]));h.lo-=Math.max(0,d);const m=u.slice(h.hi).findIndex(g=>!T(g[f.axis]));h.hi+=Math.max(0,m)}return h}}return{lo:0,hi:o.length-1}}function xe(s,t,e,i,n){const o=s.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,c=o.length;a{c[r]&&c[r](t[e],n)&&(o.push({element:c,datasetIndex:l,index:h}),a=a||c.inRange(t.x,t.y,n))}),i&&!a?[]:o}var dr={modes:{index(s,t,e,i){const n=ct(t,s),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Pe(s,n,o,i,r):Te(s,n,o,!1,i,r),c=[];return a.length?(s.getSortedVisibleDatasetMetas().forEach(l=>{const h=a[0].index,f=l.data[h];f&&!f.skip&&c.push({element:f,datasetIndex:l.index,index:h})}),c):[]},dataset(s,t,e,i){const n=ct(t,s),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Pe(s,n,o,i,r):Te(s,n,o,!1,i,r);if(a.length>0){const c=a[0].datasetIndex,l=s.getDatasetMeta(c).data;a=[];for(let h=0;he.pos===t)}function As(s,t){return s.filter(e=>zi.indexOf(e.pos)===-1&&e.box.axis===t)}function Tt(s,t){return s.sort((e,i)=>{const n=t?i:e,o=t?e:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function gr(s){const t=[];let e,i,n,o,r,a;for(e=0,i=(s||[]).length;el.box.fullSize),!0),i=Tt(Pt(t,"left"),!0),n=Tt(Pt(t,"right")),o=Tt(Pt(t,"top"),!0),r=Tt(Pt(t,"bottom")),a=As(t,"x"),c=As(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:n.concat(c).concat(r).concat(a),chartArea:Pt(t,"chartArea"),vertical:i.concat(n).concat(c),horizontal:o.concat(r).concat(a)}}function zs(s,t,e,i){return Math.max(s[e],t[e])+Math.max(s[i],t[i])}function Ri(s,t){s.top=Math.max(s.top,t.top),s.left=Math.max(s.left,t.left),s.bottom=Math.max(s.bottom,t.bottom),s.right=Math.max(s.right,t.right)}function br(s,t,e,i){const{pos:n,box:o}=e,r=s.maxPadding;if(!S(n)){e.size&&(s[n]-=e.size);const f=i[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?o.height:o.width),e.size=f.size/f.count,s[n]+=e.size}o.getPadding&&Ri(r,o.getPadding());const a=Math.max(0,t.outerWidth-zs(r,s,"left","right")),c=Math.max(0,t.outerHeight-zs(r,s,"top","bottom")),l=a!==s.w,h=c!==s.h;return s.w=a,s.h=c,e.horizontal?{same:l,other:h}:{same:h,other:l}}function xr(s){const t=s.maxPadding;function e(i){const n=Math.max(t[i]-s[i],0);return s[i]+=n,n}s.y+=e("top"),s.x+=e("left"),e("right"),e("bottom")}function yr(s,t){const e=t.maxPadding;function i(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return i(s?["left","right"]:["top","bottom"])}function Et(s,t,e,i){const n=[];let o,r,a,c,l,h;for(o=0,r=s.length,l=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=c.reduce((g,p)=>p.box.options&&p.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},n);Ri(u,Wt(i));const d=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),m=mr(c.concat(l),f);Et(a.fullSize,d,f,m),Et(c,d,f,m),Et(l,d,f,m)&&Et(c,d,f,m),xr(d),Rs(a.leftAndTop,d,f,m),d.x+=d.w,d.y+=d.h,Rs(a.rightAndBottom,d,f,m),s.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},N(a.chartArea,g=>{const p=g.box;Object.assign(p,s.chartArea),p.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class Ni{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 vr extends Ni{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const le="$chartjs",kr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ns=s=>s===null||s==="";function wr(s,t){const e=s.style,i=s.getAttribute("height"),n=s.getAttribute("width");if(s[le]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ns(n)){const o=Ms(s,"width");o!==void 0&&(s.width=o)}if(Ns(i))if(s.style.height==="")s.height=s.width/(t||2);else{const o=Ms(s,"height");o!==void 0&&(s.height=o)}return s}const Bi=No?{passive:!0}:!1;function Mr(s,t,e){s&&s.addEventListener(t,e,Bi)}function Sr(s,t,e){s&&s.canvas&&s.canvas.removeEventListener(t,e,Bi)}function Or(s,t){const e=kr[s.type]||s.type,{x:i,y:n}=ct(s,t);return{type:e,chart:t,native:s,x:i!==void 0?i:null,y:n!==void 0?n:null}}function me(s,t){for(const e of s)if(e===t||e.contains(t))return!0}function Dr(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||me(a.addedNodes,i),r=r&&!me(a.removedNodes,i);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Pr(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||me(a.removedNodes,i),r=r&&!me(a.addedNodes,i);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const $t=new Map;let Bs=0;function Vi(){const s=window.devicePixelRatio;s!==Bs&&(Bs=s,$t.forEach((t,e)=>{e.currentDevicePixelRatio!==s&&t()}))}function Tr(s,t){$t.size||window.addEventListener("resize",Vi),$t.set(s,t)}function Ir(s){$t.delete(s),$t.size||window.removeEventListener("resize",Vi)}function Cr(s,t,e){const i=s.canvas,n=i&&Qe(i);if(!n)return;const o=Mi((a,c)=>{const l=n.clientWidth;e(a,c),l{const c=a[0],l=c.contentRect.width,h=c.contentRect.height;l===0&&h===0||o(l,h)});return r.observe(n),Tr(s,o),r}function Ie(s,t,e){e&&e.disconnect(),t==="resize"&&Ir(s)}function Lr(s,t,e){const i=s.canvas,n=Mi(o=>{s.ctx!==null&&e(Or(o,s))},s);return Mr(i,t,n),n}class Er extends Ni{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(wr(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[le])return!1;const i=e[le].initial;["height","width"].forEach(o=>{const r=i[o];T(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=i.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[le],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Dr,detach:Pr,resize:Cr}[e]||Lr;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Ie,detach:Ie,resize:Ie}[e]||Sr)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return Ro(t,e,i,n)}isAttached(t){const e=t&&Qe(t);return!!(e&&e.isConnected)}}function Fr(s){return!Ze()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?vr:Er}class kt{constructor(){k(this,"x");k(this,"y");k(this,"active",!1);k(this,"options");k(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return jt(this.x)&&jt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(o=>{n[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),n}}k(kt,"defaults",{}),k(kt,"defaultRoutes");function Ar(s,t){const e=s.options.ticks,i=zr(s),n=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?Nr(t):[],r=o.length,a=o[0],c=o[r-1],l=[];if(r>n)return Br(t,l,o,r/n),l;const h=Rr(o,t,n);if(r>0){let f,u;const d=r>1?Math.round((c-a)/(r-1)):null;for(ne(t,l,h,T(d)?0:a-d,a),f=0,u=r-1;fn)return c}return Math.max(n,1)}function Nr(s){const t=[];let e,i;for(e=0,i=s.length;es==="left"?"right":s==="right"?"left":s,Vs=(s,t,e)=>t==="top"||t==="left"?s[t]+e:s[t]-e,js=(s,t)=>Math.min(t||s,s);function Hs(s,t){const e=[],i=s.length/t,n=s.length;let o=0;for(;or+a)))return c}function Wr(s,t){N(s,e=>{const i=e.gc,n=i.length/2;let o;if(n>t){for(o=0;oi?i:e,i=n&&e>i?e:i,{min:U(e,U(i,e)),max:U(i,U(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){E(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.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=po(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a=o||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),f=h.widest.width,u=h.highest.height,d=X(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/i:d/(i-1),f+6>a&&(a=d/(i-(t.offset?.5:1)),c=this.maxHeight-It(t.grid)-e.padding-Ws(t.title,this.chart.options.font),l=Math.sqrt(f*f+u*u),r=En(Math.min(Math.asin(X((h.highest.height+6)/a,-1,1)),Math.asin(X(c/l,-1,1))-Math.asin(X(u/l,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){E(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){E(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const c=Ws(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=It(o)+c):(t.height=this.maxHeight,t.width=It(o)+c),i.display&&this.ticks.length){const{first:l,last:h,widest:f,highest:u}=this._getLabelSizes(),d=i.padding*2,m=ft(this.labelRotation),g=Math.cos(m),p=Math.sin(m);if(a){const _=i.mirror?0:p*f.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+_+d)}else{const _=i.mirror?0:g*f.width+p*u.height;t.width=Math.min(this.maxWidth,t.width+_+d)}this._calculatePadding(l,h,p,g)}}this._handleMargins(),a?(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:r},position:a}=this.options,c=this.labelRotation!==0,l=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,d=0;c?l?(u=n*t.width,d=i*e.height):(u=i*t.height,d=n*e.width):o==="start"?d=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,d=e.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((d-f+r)*this.width/(this.width-f),0)}else{let h=e.height/2,f=t.height/2;o==="start"?(h=0,f=t.height):o==="end"&&(h=e.height,f=0),this.paddingTop=h+r,this.paddingBottom=f+r}}_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(){E(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e({width:r[M]||0,height:a[M]||0});return{first:v(0),last:v(e-1),widest:v(w),highest:v(y),widths:r,heights:a}}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 zn(this._alignToPixels?rt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/i:c/n:c*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:r,border:a}=n,c=o.offset,l=this.isHorizontal(),f=this.ticks.length+(c?1:0),u=It(o),d=[],m=a.setContext(this.getContext()),g=m.display?m.width:0,p=g/2,_=function(z){return rt(i,z,g)};let x,O,D,b,w,y,v,M,I,C,A,$;if(r==="top")x=_(this.bottom),y=this.bottom-u,M=x-p,C=_(t.top)+p,$=t.bottom;else if(r==="bottom")x=_(this.top),C=t.top,$=_(t.bottom)-p,y=x+p,M=this.top+u;else if(r==="left")x=_(this.right),w=this.right-u,v=x-p,I=_(t.left)+p,A=t.right;else if(r==="right")x=_(this.left),I=t.left,A=_(t.right)-p,w=x+p,v=this.left+u;else if(e==="x"){if(r==="center")x=_((t.top+t.bottom)/2+.5);else if(S(r)){const z=Object.keys(r)[0],H=r[z];x=_(this.chart.scales[z].getPixelForValue(H))}C=t.top,$=t.bottom,y=x+p,M=y+u}else if(e==="y"){if(r==="center")x=_((t.left+t.right)/2);else if(S(r)){const z=Object.keys(r)[0],H=r[z];x=_(this.chart.scales[z].getPixelForValue(H))}w=x-p,v=w-u,I=t.left,A=t.right}const Q=P(n.ticks.maxTicksLimit,f),L=Math.max(1,Math.ceil(f/Q));for(O=0;O0&&(nt-=it/2);break}Xt={left:nt,top:Ot,width:it+_t.width,height:St+_t.height,color:L.backdropColor}}p.push({label:D,font:M,textOffset:A,options:{rotation:g,color:H,strokeColor:Yt,strokeWidth:Kt,textAlign:mt,textBaseline:$,translation:[b,w],backdrop:Xt}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ft(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,c=r.widest.width;let l,h;return e==="left"?n?(h=this.right+o,i==="near"?l="left":i==="center"?(l="center",h+=c/2):(l="right",h+=c)):(h=this.right-a,i==="near"?l="right":i==="center"?(l="center",h-=c/2):(l="left",h=this.left)):e==="right"?n?(h=this.left+o,i==="near"?l="right":i==="center"?(l="center",h-=c/2):(l="left",h-=c)):(h=this.left+a,i==="near"?l="left":i==="center"?(l="center",h+=c/2):(l="right",h=this.right)):l="right",{textAlign:l,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(c,l,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(l.x,l.y),i.stroke(),i.restore())};if(e.display)for(o=0,r=n.length;o{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o{const i=e.split("."),n=i.pop(),o=[s].concat(i).join("."),r=t[e].split("."),a=r.pop(),c=r.join(".");F.route(o,n,c,a)})}function Gr(s){return"id"in s&&"defaults"in s}class Zr{constructor(){this.controllers=new oe(Nt,"datasets",!0),this.elements=new oe(kt,"elements"),this.plugins=new oe(Object,"plugins"),this.scales=new oe(Mt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(n=>{const o=i||this._getRegistryForType(n);i||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):N(n,r=>{const a=i||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,i){const n=We(t);E(i["before"+n],[],i),e[t](i),E(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;eo.filter(a=>!r.some(c=>a.plugin.id===c.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Jr(s){const t={},e=[],i=Object.keys(Y.plugins.items);for(let o=0;o1&&$s(s[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${s}' axis. Please provide 'axis' or 'position' option.`)}function Us(s,t,e){if(e[t+"AxisID"]===s)return{axis:t}}function ra(s,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===s||i.yAxisID===s);if(e.length)return Us(s,"x",e[0])||Us(s,"y",e[0])}return{}}function aa(s,t){const e=pt[s.type]||{scales:{}},i=t.scales||{},n=ze(s.type,t),o=Object.create(null);return Object.keys(i).forEach(r=>{const a=i[r];if(!S(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const c=Re(r,a,ra(r,s),F.scales[a.type]),l=na(c,n),h=e.scales||{};o[r]=Ft(Object.create(null),[{axis:c},a,h[c],h[l]])}),s.data.datasets.forEach(r=>{const a=r.type||s.type,c=r.indexAxis||ze(a,t),h=(pt[a]||{}).scales||{};Object.keys(h).forEach(f=>{const u=ia(f,c),d=r[u+"AxisID"]||u;o[d]=o[d]||Object.create(null),Ft(o[d],[{axis:u},i[d],h[f]])})}),Object.keys(o).forEach(r=>{const a=o[r];Ft(a,[F.scales[a.type],F.scale])}),o}function ji(s){const t=s.options||(s.options={});t.plugins=P(t.plugins,{}),t.scales=aa(s,t)}function Hi(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function ca(s){return s=s||{},s.data=Hi(s.data),ji(s),s}const Ys=new Map,Wi=new Set;function re(s,t){let e=Ys.get(s);return e||(e=t(),Ys.set(s,e),Wi.add(e)),e}const Ct=(s,t,e)=>{const i=ue(t,e);i!==void 0&&s.add(i)};class la{constructor(t){this._config=ca(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=Hi(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(),ji(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return re(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return re(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return re(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return re(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,r=this._cachedScopes(t,i),a=r.get(e);if(a)return a;const c=new Set;e.forEach(h=>{t&&(c.add(t),h.forEach(f=>Ct(c,t,f))),h.forEach(f=>Ct(c,n,f)),h.forEach(f=>Ct(c,pt[o]||{},f)),h.forEach(f=>Ct(c,F,f)),h.forEach(f=>Ct(c,Fe,f))});const l=Array.from(c);return l.length===0&&l.push(Object.create(null)),Wi.has(e)&&r.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,pt[e]||{},F.datasets[e]||{},{type:e},F,Fe]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=Ks(this._resolverCache,t,n);let c=r;if(fa(r,e)){o.$shared=!1,i=st(i)?i():i;const l=this.createResolver(t,i,a);c=yt(r,i,l)}for(const l of e)o[l]=c[l];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Ks(this._resolverCache,t,i);return S(e)?yt(o,e,void 0,n):o}}function Ks(s,t,e){let i=s.get(t);i||(i=new Map,s.set(t,i));const n=e.join();let o=i.get(n);return o||(o={resolver:Xe(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(n,o)),o}const ha=s=>S(s)&&Object.getOwnPropertyNames(s).some(t=>st(s[t]));function fa(s,t){const{isScriptable:e,isIndexable:i}=Di(s);for(const n of t){const o=e(n),r=i(n),a=(r||o)&&s[n];if(o&&(st(a)||ha(a))||r&&R(a))return!0}return!1}var ua="4.4.8";const da=["top","bottom","left","right","chartArea"];function Xs(s,t){return s==="top"||s==="bottom"||da.indexOf(s)===-1&&t==="x"}function qs(s,t){return function(e,i){return e[s]===i[s]?e[t]-i[t]:e[s]-i[s]}}function Gs(s){const t=s.chart,e=t.options.animation;t.notifyPlugins("afterRender"),E(e&&e.onComplete,[s],t)}function ga(s){const t=s.chart,e=t.options.animation;E(e&&e.onProgress,[s],t)}function $i(s){return Ze()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}const he={},Zs=s=>{const t=$i(s);return Object.values(he).filter(e=>e.canvas===t).pop()};function pa(s,t,e){const i=Object.keys(s);for(const n of i){const o=+n;if(o>=t){const r=s[n];delete s[n],(e>0||o>t)&&(s[o+e]=r)}}}function ma(s,t,e,i){return!e||s.type==="mouseout"?null:i?t:s}function ae(s,t,e){return s.options.clip?s[e]:t[e]}function _a(s,t){const{xScale:e,yScale:i}=s;return e&&i?{left:ae(e,t,"left"),right:ae(e,t,"right"),top:ae(i,t,"top"),bottom:ae(i,t,"bottom")}:t}class ht{static register(...t){Y.add(...t),Qs()}static unregister(...t){Y.remove(...t),Qs()}constructor(t,e){const i=this.config=new la(e),n=$i(t),o=Zs(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 r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Fr(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,r.aspectRatio),c=a&&a.canvas,l=c&&c.height,h=c&&c.width;if(this.id=yn(),this.ctx=a,this.canvas=c,this.width=h,this.height=l,this._options=r,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 Qr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=jn(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],he[this.id]=this,!a||!c){console.error("Failed to create chart: can't acquire context from the given item");return}G.listen(this,"complete",Gs),G.listen(this,"progress",ga),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Y}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ws(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return xs(this.canvas,this.ctx),this}stop(){return G.stop(this),this}resize(t,e){G.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,r=this.platform.getMaximumSize(n,t,e,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,ws(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),E(i.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};N(e,(i,n)=>{i.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],c=Re(r,a),l=c==="r",h=c==="x";return{options:a,dposition:l?"chartArea":h?"bottom":"left",dtype:l?"radialLinear":h?"category":"linear"}}))),N(o,r=>{const a=r.options,c=a.id,l=Re(c,a),h=P(a.type,r.dtype);(a.position===void 0||Xs(a.position,l)!==Xs(r.dposition))&&(a.position=r.dposition),n[c]=!0;let f=null;if(c in i&&i[c].type===h)f=i[c];else{const u=Y.getScale(h);f=new u({id:c,type:h,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(a,t)}),N(n,(r,a)=>{r||delete i[a]}),N(i,r=>{ie.configure(this,r,r.options),ie.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,o)=>n.index-o.index),i>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let l=0,h=this.data.datasets.length;l{l.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(qs("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){N(this.scales,t=>{ie.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!as(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:o}of e){const r=i==="_removeElements"?-o:o;pa(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=i(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ie.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],N(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,o=_a(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(n&&Ye(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&Ke(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Ht(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=dr.modes[e];return typeof o=="function"?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=wt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);de(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(o,{visible:i}),this.update(a=>a.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(),G.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};N(this.options.events,o=>i(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(c,l)=>{e.addEventListener(this,c,l),t[c]=l},n=(c,l)=>{t[c]&&(e.removeEventListener(this,c,l),delete t[c])},o=(c,l)=>{this.canvas&&this.resize(c,l)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){N(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},N(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,r,a,c;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,c=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!os(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(c,l)=>c.filter(h=>!l.some(f=>h.datasetIndex===f.datasetIndex&&h.index===f.index)),r=o(e,t),a=i?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,i,r),c=On(t),l=ma(t,this._lastEvent,i,c);i&&(this._lastEvent=null,E(o.onHover,[t,a,this],this),c&&E(o.onClick,[t,a,this],this));const h=!os(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}k(ht,"defaults",F),k(ht,"instances",he),k(ht,"overrides",pt),k(ht,"registry",Y),k(ht,"version",ua),k(ht,"getChart",Zs);function Qs(){return N(ht.instances,s=>s._plugins.invalidate())}function Ui(s,t,e=t){s.lineCap=P(e.borderCapStyle,t.borderCapStyle),s.setLineDash(P(e.borderDash,t.borderDash)),s.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),s.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),s.lineWidth=P(e.borderWidth,t.borderWidth),s.strokeStyle=P(e.borderColor,t.borderColor)}function ba(s,t,e){s.lineTo(e.x,e.y)}function xa(s){return s.stepped?io:s.tension||s.cubicInterpolationMode==="monotone"?no:ba}function Yi(s,t,e={}){const i=s.length,{start:n=0,end:o=i-1}=e,{start:r,end:a}=t,c=Math.max(n,r),l=Math.min(o,a),h=na&&o>a;return{count:i,start:c,loop:t.loop,ilen:l(r+(l?a-D:D))%o,O=()=>{g!==p&&(s.lineTo(h,p),s.lineTo(h,g),s.lineTo(h,_))};for(c&&(d=n[x(0)],s.moveTo(d.x,d.y)),u=0;u<=a;++u){if(d=n[x(u)],d.skip)continue;const D=d.x,b=d.y,w=D|0;w===m?(bp&&(p=b),h=(f*h+D)/++f):(O(),s.lineTo(D,b),m=w,f=0,g=p=b),_=b}O()}function Ne(s){const t=s.options,e=t.borderDash&&t.borderDash.length;return!s._decimated&&!s._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?va:ya}function ka(s){return s.stepped?Bo:s.tension||s.cubicInterpolationMode==="monotone"?Vo:lt}function wa(s,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),Ui(s,t.options),s.stroke(n)}function Ma(s,t,e,i){const{segments:n,options:o}=t,r=Ne(t);for(const a of n)Ui(s,o,a.style),s.beginPath(),r(s,t,a,{start:e,end:e+i-1})&&s.closePath(),s.stroke()}const Sa=typeof Path2D=="function";function Oa(s,t,e,i){Sa&&!t.options.segment?wa(s,t,e,i):Ma(s,t,e,i)}class dt extends kt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Co(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=$o(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,r=Fi(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],c=ka(i);let l,h;for(l=0,h=r.length;lt!=="borderDash"&&t!=="fill"});function Js(s,t,e,i){const n=s.options,{[e]:o}=s.getProps([e],i);return Math.abs(t-o){a=ts(r,a,n);const c=n[r],l=n[a];i!==null?(o.push({x:c.x,y:i}),o.push({x:l.x,y:i})):e!==null&&(o.push({x:e,y:c.y}),o.push({x:e,y:l.y}))}),o}function ts(s,t,e){for(;t>s;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function ti(s,t,e,i){return s&&t?i(s[e],t[e]):s?s[e]:t?t[e]:0}function Ki(s,t){let e=[],i=!1;return R(s)?(i=!0,e=s):e=Pa(s,t),e.length?new dt({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function ei(s){return s&&s.fill!==!1}function Ta(s,t,e){let n=s[t].fill;const o=[t];let r;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!B(n))return n;if(r=s[n],!r)return!1;if(r.visible)return n;o.push(n),n=r.fill}return!1}function Ia(s,t,e){const i=Fa(s);if(S(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return B(n)&&Math.floor(n)===n?Ca(i[0],t,n,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Ca(s,t,e,i){return(s==="-"||s==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function La(s,t){let e=null;return s==="start"?e=t.bottom:s==="end"?e=t.top:S(s)?e=t.getPixelForValue(s.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ea(s,t,e){let i;return s==="start"?i=e:s==="end"?i=t.options.reverse?t.min:t.max:S(s)?i=s.value:i=t.getBaseValue(),i}function Fa(s){const t=s.options,e=t.fill;let i=P(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Aa(s){const{scale:t,index:e,line:i}=s,n=[],o=i.segments,r=i.points,a=za(t,e);a.push(Ki({x:null,y:t.bottom},i));for(let c=0;c=0;--r){const a=n[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),i&&a.fill&&Le(s.ctx,a,o))}},beforeDatasetsDraw(s,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=s.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const o=i[n].$filler;ei(o)&&Le(s.ctx,o,s.chartArea)}},beforeDatasetDraw(s,t,e){const i=t.meta.$filler;!ei(i)||e.drawTime!=="beforeDatasetDraw"||Le(s.ctx,i,s.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ya=(s,t,e,i)=>(typeof t=="string"?(e=s.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Ka(s,t,e,i){const n=s.indexOf(t);if(n===-1)return Ya(s,t,e,i);const o=s.lastIndexOf(t);return n!==o?e:n}const Xa=(s,t)=>s===null?null:X(Math.round(s),0,t);function oi(s){const t=this.getLabels();return s>=0&&se.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}k(ri,"id","category"),k(ri,"defaults",{ticks:{callback:oi}});function qa(s,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:c,count:l,maxTicks:h,maxDigits:f,includeBounds:u}=s,d=o||1,m=h-1,{min:g,max:p}=t,_=!T(r),x=!T(a),O=!T(l),D=(p-g)/(f+1);let b=ls((p-g)/m/d)*d,w,y,v,M;if(b<1e-14&&!_&&!x)return[{value:g},{value:p}];M=Math.ceil(p/b)-Math.floor(g/b),M>m&&(b=ls(M*b/m/d)*d),T(c)||(w=Math.pow(10,c),b=Math.ceil(b*w)/w),n==="ticks"?(y=Math.floor(g/b)*b,v=Math.ceil(p/b)*b):(y=g,v=p),_&&x&&o&&Cn((a-r)/o,b/1e3)?(M=Math.round(Math.min((a-r)/b,h)),b=(a-r)/M,y=r,v=a):O?(y=_?r:y,v=x?a:v,M=l-1,b=(v-y)/M):(M=(v-y)/b,At(M,Math.round(M),b/1e3)?M=Math.round(M):M=Math.ceil(M));const I=Math.max(hs(b),hs(y));w=Math.pow(10,T(c)?I:c),y=Math.round(y*w)/w,v=Math.round(v*w)/w;let C=0;for(_&&(u&&y!==r?(e.push({value:r}),ya)break;e.push({value:A})}return x&&u&&v!==a?e.length&&At(e[e.length-1].value,a,ai(a,D,s))?e[e.length-1].value=a:e.push({value:a}):(!x||v===a)&&e.push({value:v}),e}function ai(s,t,{horizontal:e,minRotation:i}){const n=ft(i),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+s).length;return Math.min(t/o,r)}class Ga extends Mt{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 T(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const r=c=>n=e?n:c,a=c=>o=i?o:c;if(t){const c=xt(n),l=xt(o);c<0&&l<0?a(0):c>0&&l>0&&r(0)}if(n===o){let c=o===0?1:Math.abs(o*.05);a(o+c),t||r(n-c)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=qa(n,o);return t.bounds==="ticks"&&Ln(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}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 Si(t,this.chart.options.locale,this.options.ticks.format)}}class ci extends Ga{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=B(t)?t:0,this.max=B(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=ft(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}k(ci,"id","linear"),k(ci,"defaults",{ticks:{callback:Oi.formatters.numeric}});const ye={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}},V=Object.keys(ye);function li(s,t){return s-t}function hi(s,t){if(T(t))return null;const e=s._adapter,{parser:i,round:n,isoWeekday:o}=s._parseOpts;let r=t;return typeof i=="function"&&(r=i(r)),B(r)||(r=typeof i=="string"?e.parse(r,i):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(jt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function fi(s,t,e,i){const n=V.length;for(let o=V.indexOf(s);o=V.indexOf(e);o--){const r=V[o];if(ye[r].common&&s._adapter.diff(n,i,r)>=t-1)return r}return V[e?V.indexOf(e):0]}function Qa(s){for(let t=V.indexOf(s)+1,e=V.length;t=t?e[i]:e[n];s[o]=!0}}function Ja(s,t,e,i){const n=s._adapter,o=+n.startOf(t[0].value,i),r=t[t.length-1].value;let a,c;for(a=o;a<=r;a=+n.add(a,1,i))c=e[a],c>=0&&(t[c].major=!0);return t}function di(s,t,e){const i=[],n={},o=t.length;let r,a;for(r=0;r+t.value))}initOffsets(t=[]){let e=0,i=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=X(e,0,r),i=X(i,0,r),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,r=o.unit||fi(o.minUnit,e,i,this._getLabelCapacity(e)),a=P(n.ticks.stepSize,1),c=r==="week"?o.isoWeekday:!1,l=jt(c)||c===!0,h={};let f=e,u,d;if(l&&(f=+t.startOf(f,"isoWeek",c)),f=+t.startOf(f,l?"day":r),t.diff(i,e,r)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+r);const m=n.ticks.source==="data"&&this.getDataTimestamps();for(u=f,d=0;u+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,i,n){const o=this.options,r=o.ticks.callback;if(r)return E(r,[t,e,i],this);const a=o.time.displayFormats,c=this._unit,l=this._majorUnit,h=c&&a[c],f=l&&a[l],u=i[e],d=l&&f&&u&&u.major;return this._adapter.format(t,n||(d?f:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,i=n.length;e=s[i].pos&&t<=s[n].pos&&({lo:i,hi:n}=ut(s,"pos",t)),{pos:o,time:a}=s[i],{pos:r,time:c}=s[n]):(t>=s[i].time&&t<=s[n].time&&({lo:i,hi:n}=ut(s,"time",t)),{time:o,pos:a}=s[i],{time:r,pos:c}=s[n]);const l=r-o;return l?a+(c-a)*(t-o)/l:a}class gi extends _e{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ce(e,this.min),this._tableRange=ce(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let r,a,c,l,h;for(r=0,a=t.length;r=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,a=n.length;rn-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ce(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ce(this._table,i*this._tableRange+this._minPos,!0)}}k(gi,"id","timeseries"),k(gi,"defaults",_e.defaults);export{ht as C,De as L,Ce as P,dt as a,ci as b,ri as c,ec as i}; diff --git a/backend/src/main/resources/webroot/assets/index-ByqS16T9.js b/backend/src/main/resources/webroot/assets/index-ByqS16T9.js new file mode 100644 index 0000000..f6cc704 --- /dev/null +++ b/backend/src/main/resources/webroot/assets/index-ByqS16T9.js @@ -0,0 +1,612 @@ +import{r as dg,g as hg,a as mg}from"./react-vendors-DbHEDQBy.js";import{r as Uy}from"./leaflet-DYDK0jU3.js";import{C as Pd,L as Hy,a as ky,P as By,b as qy,c as Yy,i as Xy}from"./chartjs-C6LAl0aW.js";(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&c(y)}).observe(document,{childList:!0,subtree:!0});function o(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(f){if(f.ep)return;f.ep=!0;const m=o(f);fetch(f.href,m)}})();var pd={exports:{}},vu={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yp;function Gy(){if(yp)return vu;yp=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function o(c,f,m){var y=null;if(m!==void 0&&(y=""+m),f.key!==void 0&&(y=""+f.key),"key"in f){m={};for(var b in f)b!=="key"&&(m[b]=f[b])}else m=f;return f=m.ref,{$$typeof:l,type:c,key:y,ref:f!==void 0?f:null,props:m}}return vu.Fragment=u,vu.jsx=o,vu.jsxs=o,vu}var bp;function Vy(){return bp||(bp=1,pd.exports=Gy()),pd.exports}var G=Vy(),w=dg();const Bi=hg(w);var gd={exports:{}},yu={},vd={exports:{}},yd={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _p;function Qy(){return _p||(_p=1,function(l){function u(tt,gt){var mt=tt.length;tt.push(gt);t:for(;0>>1,k=tt[Bt];if(0>>1;Btf(an,mt))_tf(me,an)?(tt[Bt]=me,tt[_t]=mt,Bt=_t):(tt[Bt]=an,tt[In]=mt,Bt=In);else if(_tf(me,mt))tt[Bt]=me,tt[_t]=mt,Bt=_t;else break t}}return gt}function f(tt,gt){var mt=tt.sortIndex-gt.sortIndex;return mt!==0?mt:tt.id-gt.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var y=Date,b=y.now();l.unstable_now=function(){return y.now()-b}}var S=[],E=[],D=1,j=null,z=3,q=!1,L=!1,I=!1,Q=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function P(tt){for(var gt=o(E);gt!==null;){if(gt.callback===null)c(E);else if(gt.startTime<=tt)c(E),gt.sortIndex=gt.expirationTime,u(S,gt);else break;gt=o(E)}}function bt(tt){if(I=!1,P(tt),!L)if(o(S)!==null)L=!0,Jn();else{var gt=o(E);gt!==null&&Wn(bt,gt.startTime-tt)}}var Ot=!1,It=-1,de=5,ue=-1;function lt(){return!(l.unstable_now()-uett&<());){var Bt=j.callback;if(typeof Bt=="function"){j.callback=null,z=j.priorityLevel;var k=Bt(j.expirationTime<=tt);if(tt=l.unstable_now(),typeof k=="function"){j.callback=k,P(tt),gt=!0;break e}j===o(S)&&c(S),P(tt)}else c(S);j=o(S)}if(j!==null)gt=!0;else{var Pn=o(E);Pn!==null&&Wn(bt,Pn.startTime-tt),gt=!1}}break t}finally{j=null,z=mt,q=!1}gt=void 0}}finally{gt?$e():Ot=!1}}}var $e;if(typeof W=="function")$e=function(){W(St)};else if(typeof MessageChannel<"u"){var il=new MessageChannel,Fn=il.port2;il.port1.onmessage=St,$e=function(){Fn.postMessage(null)}}else $e=function(){Q(St,0)};function Jn(){Ot||(Ot=!0,$e())}function Wn(tt,gt){It=Q(function(){tt(l.unstable_now())},gt)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(tt){tt.callback=null},l.unstable_continueExecution=function(){L||q||(L=!0,Jn())},l.unstable_forceFrameRate=function(tt){0>tt||125Bt?(tt.sortIndex=mt,u(E,tt),o(S)===null&&tt===o(E)&&(I?(H(It),It=-1):I=!0,Wn(bt,mt-Bt))):(tt.sortIndex=k,u(S,tt),L||q||(L=!0,Jn())),tt},l.unstable_shouldYield=lt,l.unstable_wrapCallback=function(tt){var gt=z;return function(){var mt=z;z=gt;try{return tt.apply(this,arguments)}finally{z=mt}}}}(yd)),yd}var Sp;function Zy(){return Sp||(Sp=1,vd.exports=Qy()),vd.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ep;function Ky(){if(Ep)return yu;Ep=1;var l=Zy(),u=dg(),o=mg();function c(t){var e="https://react.dev/errors/"+t;if(1)":-1i||_[a]!==T[i]){var B=` +`+_[a].replace(" at new "," at ");return t.displayName&&B.includes("")&&(B=B.replace("",t.displayName)),B}while(1<=a&&0<=i);break}}}finally{Jn=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Fn(n):""}function tt(t){switch(t.tag){case 26:case 27:case 5:return Fn(t.type);case 16:return Fn("Lazy");case 13:return Fn("Suspense");case 19:return Fn("SuspenseList");case 0:case 15:return t=Wn(t.type,!1),t;case 11:return t=Wn(t.type.render,!1),t;case 1:return t=Wn(t.type,!0),t;default:return""}}function gt(t){try{var e="";do e+=tt(t),t=t.return;while(t);return e}catch(n){return` +Error generating stack: `+n.message+` +`+n.stack}}function mt(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Bt(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function k(t){if(mt(t)!==t)throw Error(c(188))}function Pn(t){var e=t.alternate;if(!e){if(e=mt(t),e===null)throw Error(c(188));return e!==t?null:t}for(var n=t,a=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return k(i),t;if(s===a)return k(i),e;s=s.sibling}throw Error(c(188))}if(n.return!==a.return)n=i,a=s;else{for(var h=!1,g=i.child;g;){if(g===n){h=!0,n=i,a=s;break}if(g===a){h=!0,a=i,n=s;break}g=g.sibling}if(!h){for(g=s.child;g;){if(g===n){h=!0,n=s,a=i;break}if(g===a){h=!0,a=s,n=i;break}g=g.sibling}if(!h)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?t:e}function In(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=In(t),e!==null)return e;t=t.sibling}return null}var an=Array.isArray,_t=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},He=[],ta=-1;function nt(t){return{current:t}}function Ft(t){0>ta||(t.current=He[ta],He[ta]=null,ta--)}function qt(t,e){ta++,He[ta]=t.current,t.current=e}var vn=nt(null),Wl=nt(null),Fe=nt(null),Pl=nt(null);function ea(t,e){switch(qt(Fe,e),qt(Wl,t),qt(vn,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?Km(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=Km(t),e=$m(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ft(vn),qt(vn,e)}function ln(){Ft(vn),Ft(Wl),Ft(Fe)}function Wr(t){t.memoizedState!==null&&qt(Pl,t);var e=vn.current,n=$m(e,t.type);e!==n&&(qt(Wl,t),qt(vn,n))}function Gi(t){Wl.current===t&&(Ft(vn),Ft(Wl)),Pl.current===t&&(Ft(Pl),du._currentValue=me)}var Pr=Object.prototype.hasOwnProperty,Ir=l.unstable_scheduleCallback,ts=l.unstable_cancelCallback,Cc=l.unstable_shouldYield,wc=l.unstable_requestPaint,ke=l.unstable_now,na=l.unstable_getCurrentPriorityLevel,es=l.unstable_ImmediatePriority,rl=l.unstable_UserBlockingPriority,Ln=l.unstable_NormalPriority,sl=l.unstable_LowPriority,Il=l.unstable_IdlePriority,Dc=l.log,ns=l.unstable_setDisableYieldValue,ti=null,Be=null;function Mc(t){if(Be&&typeof Be.onCommitFiberRoot=="function")try{Be.onCommitFiberRoot(ti,t,void 0,(t.current.flags&128)===128)}catch{}}function aa(t){if(typeof Dc=="function"&&ns(t),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(ti,t)}catch{}}var qe=Math.clz32?Math.clz32:Vi,Nc=Math.log,Lu=Math.LN2;function Vi(t){return t>>>=0,t===0?32:31-(Nc(t)/Lu|0)|0}var ei=128,ni=4194304;function Ca(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Qi(t,e){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,s=t.pingedLanes,h=t.warmLanes;t=t.finishedLanes!==0;var g=n&134217727;return g!==0?(n=g&~i,n!==0?a=Ca(n):(s&=g,s!==0?a=Ca(s):t||(h=g&~h,h!==0&&(a=Ca(h))))):(g=n&~i,g!==0?a=Ca(g):s!==0?a=Ca(s):t||(h=n&~h,h!==0&&(a=Ca(h)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,h=e&-e,i>=h||i===32&&(h&4194176)!==0)?e:a}function ai(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function zc(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wa(){var t=ei;return ei<<=1,(ei&4194176)===0&&(ei=128),t}function ul(){var t=ni;return ni<<=1,(ni&62914560)===0&&(ni=4194304),t}function as(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function li(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Rc(t,e,n,a,i,s){var h=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var g=t.entanglements,_=t.expirationTimes,T=t.hiddenUpdates;for(n=h&~n;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),is={},rs={};function ku(t){return Pr.call(rs,t)?!0:Pr.call(is,t)?!1:Hu.test(t)?rs[t]=!0:(is[t]=!0,!1)}function ii(t,e,n){if(ku(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var a=e.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function ri(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function _n(t,e,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+a)}}function Xe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ss(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Sn(t){var e=ss(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),a=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(h){a=""+h,s.call(this,h)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function pe(t){t._valueTracker||(t._valueTracker=Sn(t))}function sa(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),a="";return t&&(a=ss(t)?t.checked?"true":"false":t.value),t=a,t!==n?(e.setValue(t),!0):!1}function Ae(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var us=/[\n"\\]/g;function ze(t){return t.replace(us,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Pe(t,e,n,a,i,s,h,g){t.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.type=h:t.removeAttribute("type"),e!=null?h==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Xe(e)):t.value!==""+Xe(e)&&(t.value=""+Xe(e)):h!=="submit"&&h!=="reset"||t.removeAttribute("value"),e!=null?fl(t,h,Xe(e)):n!=null?fl(t,h,Xe(n)):a!=null&&t.removeAttribute("value"),i==null&&s!=null&&(t.defaultChecked=!!s),i!=null&&(t.checked=i&&typeof i!="function"&&typeof i!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.name=""+Xe(g):t.removeAttribute("name")}function ua(t,e,n,a,i,s,h,g){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(t.type=s),e!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||e!=null))return;n=n!=null?""+Xe(n):"",e=e!=null?""+Xe(e):n,g||e===t.value||(t.value=e),t.defaultValue=e}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=g?t.checked:!!a,t.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.name=h)}function fl(t,e,n){e==="number"&&Ae(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function rn(t,e,n,a){if(t=t.options,e){e={};for(var i=0;i=mi),Ju=" ",Wu=!1;function Pu(t,e){switch(t){case"keyup":return dl.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iu(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hl=!1;function Gc(t,e){switch(t){case"compositionend":return Iu(e);case"keypress":return e.which!==32?null:(Wu=!0,Ju);case"textInput":return t=e.data,t===Ju&&Wu?null:t;default:return null}}function Vc(t,e){if(hl)return t==="compositionend"||!kn&&Pu(t,e)?(t=fi(),Pi=ci=un=null,hl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=a}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=ro(n)}}function Os(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Os(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function so(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ae(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Ae(t.document)}return e}function Cs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Zc(t,e){var n=so(e);e=t.focusedElem;var a=t.selectionRange;if(n!==e&&e&&e.ownerDocument&&Os(e.ownerDocument.documentElement,e)){if(a!==null&&Cs(e)){if(t=a.start,n=a.end,n===void 0&&(n=t),"selectionStart"in e)e.selectionStart=t,e.selectionEnd=Math.min(n,e.value.length);else if(n=(t=e.ownerDocument||document)&&t.defaultView||window,n.getSelection){n=n.getSelection();var i=e.textContent.length,s=Math.min(a.start,i);a=a.end===void 0?s:Math.min(a.end,i),!n.extend&&s>a&&(i=a,a=s,s=i),i=Ts(e,s);var h=Ts(e,a);i&&h&&(n.rangeCount!==1||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==h.node||n.focusOffset!==h.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),n.removeAllRanges(),s>a?(n.addRange(t),n.extend(h.node,h.offset)):(t.setEnd(h.node,h.offset),n.addRange(t)))}}for(t=[],n=e;n=n.parentNode;)n.nodeType===1&&t.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,pl=null,ws=null,gl=null,cr=!1;function fr(t,e,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cr||pl==null||pl!==Ae(a)||(a=pl,"selectionStart"in a&&Cs(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),gl&&yi(gl,a)||(gl=a,a=Go(ws,"onSelect"),0>=h,i-=h,Ve=1<<32-qe(e)+i|n<ht?(Se=ot,ot=null):Se=ot.sibling;var Lt=N(C,ot,M[ht],Y);if(Lt===null){ot===null&&(ot=Se);break}t&&ot&&Lt.alternate===null&&e(C,ot),x=s(Lt,x,ht),At===null?at=Lt:At.sibling=Lt,At=Lt,ot=Se}if(ht===M.length)return n(C,ot),xt&&ka(C,ht),at;if(ot===null){for(;htht?(Se=ot,ot=null):Se=ot.sibling;var Ql=N(C,ot,Lt.value,Y);if(Ql===null){ot===null&&(ot=Se);break}t&&ot&&Ql.alternate===null&&e(C,ot),x=s(Ql,x,ht),At===null?at=Ql:At.sibling=Ql,At=Ql,ot=Se}if(Lt.done)return n(C,ot),xt&&ka(C,ht),at;if(ot===null){for(;!Lt.done;ht++,Lt=M.next())Lt=Z(C,Lt.value,Y),Lt!==null&&(x=s(Lt,x,ht),At===null?at=Lt:At.sibling=Lt,At=Lt);return xt&&ka(C,ht),at}for(ot=a(ot);!Lt.done;ht++,Lt=M.next())Lt=U(ot,C,ht,Lt.value,Y),Lt!==null&&(t&&Lt.alternate!==null&&ot.delete(Lt.key===null?ht:Lt.key),x=s(Lt,x,ht),At===null?at=Lt:At.sibling=Lt,At=Lt);return t&&ot.forEach(function(jy){return e(C,jy)}),xt&&ka(C,ht),at}function le(C,x,M,Y){if(typeof M=="object"&&M!==null&&M.type===S&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case y:t:{for(var at=M.key;x!==null;){if(x.key===at){if(at=M.type,at===S){if(x.tag===7){n(C,x.sibling),Y=i(x,M.props.children),Y.return=C,C=Y;break t}}else if(x.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===W&&Ls(at)===x.type){n(C,x.sibling),Y=i(x,M.props),Ol(Y,M),Y.return=C,C=Y;break t}n(C,x);break}else e(C,x);x=x.sibling}M.type===S?(Y=Li(M.props.children,C.mode,Y,M.key),Y.return=C,C=Y):(Y=Ro(M.type,M.key,M.props,null,C.mode,Y),Ol(Y,M),Y.return=C,C=Y)}return h(C);case b:t:{for(at=M.key;x!==null;){if(x.key===at)if(x.tag===4&&x.stateNode.containerInfo===M.containerInfo&&x.stateNode.implementation===M.implementation){n(C,x.sibling),Y=i(x,M.children||[]),Y.return=C,C=Y;break t}else{n(C,x);break}else e(C,x);x=x.sibling}Y=zf(M,C.mode,Y),Y.return=C,C=Y}return h(C);case W:return at=M._init,M=at(M._payload),le(C,x,M,Y)}if(an(M))return rt(C,x,M,Y);if(It(M)){if(at=It(M),typeof at!="function")throw Error(c(150));return M=at.call(M),yt(C,x,M,Y)}if(typeof M.then=="function")return le(C,x,br(M),Y);if(M.$$typeof===q)return le(C,x,Mo(C,M),Y);_r(C,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,x!==null&&x.tag===6?(n(C,x.sibling),Y=i(x,M),Y.return=C,C=Y):(n(C,x),Y=Nf(M,C.mode,Y),Y.return=C,C=Y),h(C)):n(C,x)}return function(C,x,M,Y){try{Ai=0;var at=le(C,x,M,Y);return Tl=null,at}catch(ot){if(ot===Si)throw ot;var At=Nn(29,ot,null,C.mode);return At.lanes=Y,At.return=C,At}finally{}}}var da=Sr(!0),ha=Sr(!1),Ya=nt(null),Cl=nt(0);function js(t,e){t=Wa,qt(Cl,t),qt(Ya,e),Wa=t|e.baseLanes}function xi(){qt(Cl,Wa),qt(Ya,Ya.current)}function Er(){Wa=Cl.current,Ft(Ya),Ft(Cl)}var Re=nt(null),Cn=null;function Le(t){var e=t.alternate;qt(re,re.current&1),qt(Re,t),Cn===null&&(e===null||Ya.current!==null||e.memoizedState!==null)&&(Cn=t)}function Gn(t){if(t.tag===22){if(qt(re,re.current),qt(Re,t),Cn===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(Cn=t)}}else ma()}function ma(){qt(re,re.current),qt(Re,Re.current)}function Vn(t){Ft(Re),Cn===t&&(Cn=null),Ft(re)}var re=nt(0);function Ar(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Fc=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,a){t.push(a)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},Jc=l.unstable_scheduleCallback,Wc=l.unstable_NormalPriority,se={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xr(){return{controller:new Fc,data:new Map,refCount:0}}function pa(t){t.refCount--,t.refCount===0&&Jc(Wc,function(){t.controller.abort()})}var ga=null,Us=0,wl=0,wn=null;function p(t,e){if(ga===null){var n=ga=[];Us=0,wl=Kf(),wn={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Us++,e.then(r,r),e}function r(){if(--Us===0&&ga!==null){wn!==null&&(wn.status="fulfilled");var t=ga;ga=null,wl=0,wn=null;for(var e=0;es?s:8;var h=lt.T,g={};lt.T=g,af(t,!1,e,n);try{var _=i(),T=lt.S;if(T!==null&&T(g,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var B=d(_,a);Zs(t,e,B,pn(t))}else Zs(t,e,a,pn(t))}catch(Z){Zs(t,e,{then:function(){},status:"rejected",reason:Z},pn())}finally{_t.p=s,lt.T=h}}function Nv(){}function ef(t,e,n,a){if(t.tag!==5)throw Error(c(476));var i=Th(t).queue;xh(t,i,e,me,n===null?Nv:function(){return Oh(t),n(a)})}function Th(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ce,lastRenderedState:me},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ce,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Oh(t){var e=Th(t).next.queue;Zs(t,e,{},pn())}function nf(){return je(du)}function Ch(){return Ct().memoizedState}function wh(){return Ct().memoizedState}function zv(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=pn();t=Rl(n);var a=Ll(e,t,n);a!==null&&(Ke(a,e,n),Fs(a,e,n)),e={cache:xr()},t.payload=e;return}e=e.return}}function Rv(t,e,n){var a=pn();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Oo(t)?Mh(e,n):(n=cn(t,e,n,a),n!==null&&(Ke(n,t,a),Nh(n,e,a)))}function Dh(t,e,n){var a=pn();Zs(t,e,n,a)}function Zs(t,e,n,a){var i={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Oo(t))Mh(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var h=e.lastRenderedState,g=s(h,n);if(i.hasEagerState=!0,i.eagerState=g,Gt(g,h))return hr(t,e,i,0),Qt===null&&dr(),!1}catch{}finally{}if(n=cn(t,e,i,a),n!==null)return Ke(n,t,a),Nh(n,e,a),!0}return!1}function af(t,e,n,a){if(a={lane:2,revertLane:Kf(),action:a,hasEagerState:!1,eagerState:null,next:null},Oo(t)){if(e)throw Error(c(479))}else e=cn(t,n,a,2),e!==null&&Ke(e,t,2)}function Oo(t){var e=t.alternate;return t===V||e!==null&&e===V}function Mh(t,e){ut=pt=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Nh(t,e,n){if((n&4194176)!==0){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,Uu(t,n)}}var ya={readContext:je,use:Yt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it};ya.useCacheRefresh=it,ya.useMemoCache=it,ya.useHostTransitionStatus=it,ya.useFormState=it,ya.useActionState=it,ya.useOptimistic=it;var wi={readContext:je,use:Yt,useCallback:function(t,e){return Vt().memoizedState=[t,e===void 0?null:e],t},useContext:je,useEffect:Vs,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Oi(4194308,4,Dr.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Oi(4194308,4,t,e)},useInsertionEffect:function(t,e){Oi(4,2,t,e)},useMemo:function(t,e){var n=Vt();e=e===void 0?null:e;var a=t();if(ct){aa(!0);try{t()}finally{aa(!1)}}return n.memoizedState=[a,e],a},useReducer:function(t,e,n){var a=Vt();if(n!==void 0){var i=n(e);if(ct){aa(!0);try{n(e)}finally{aa(!1)}}}else i=e;return a.memoizedState=a.baseState=i,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},a.queue=t,t=t.dispatch=Rv.bind(null,V,t),[a.memoizedState,t]},useRef:function(t){var e=Vt();return t={current:t},e.memoizedState=t},useState:function(t){t=Dl(t);var e=t.queue,n=Dh.bind(null,V,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:Ic,useDeferredValue:function(t,e){var n=Vt();return tf(n,t,e)},useTransition:function(){var t=Dl(!1);return t=xh.bind(null,V,t.queue,!0,!1),Vt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var a=V,i=Vt();if(xt){if(n===void 0)throw Error(c(407));n=n()}else{if(n=e(),Qt===null)throw Error(c(349));(Nt&60)!==0||Ze(a,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Vs(Ti.bind(null,a,s,t),[t]),a.flags|=2048,Xa(9,Zn.bind(null,a,s,n,e),{destroy:void 0},null),n},useId:function(){var t=Vt(),e=Qt.identifierPrefix;if(xt){var n=fn,a=Ve;n=(a&~(1<<32-qe(a)-1)).toString(32)+n,e=":"+e+"R"+n,n=ft++,0 title"))),De(s,a,n),s[oe]=t,te(s),a=s;break t;case"link":var h=lp("link","href",i).get(a+(n.href||""));if(h){for(var g=0;g<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?t.multiple=!0:a.size&&(t.size=a.size);break;default:t=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}t[oe]=e,t[Me]=a;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=t;t:switch(De(t,n,a),n){case"button":case"input":case"select":case"textarea":t=!!a.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&Fa(e)}}return Jt(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&Fa(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(c(166));if(t=Fe.current,Al(e)){if(t=e.stateNode,n=e.memoizedProps,a=null,i=Te,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}t[oe]=e,t=!!(t.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Zm(t.nodeValue,n)),t||Ba(e)}else t=Qo(t).createTextNode(a),t[oe]=e,e.stateNode=t}return Jt(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(i=Al(e),a!==null&&a.dehydrated!==null){if(t===null){if(!i)throw Error(c(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[oe]=e}else bi(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Jt(e),i=!1}else Qe!==null&&(qf(Qe),Qe=null),i=!0;if(!i)return e.flags&256?(Vn(e),e):(Vn(e),null)}if(Vn(e),(e.flags&128)!==0)return e.lanes=n,e;if(n=a!==null,t=t!==null&&t.memoizedState!==null,n){a=e.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool);var s=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==i&&(a.flags|=2048)}return n!==t&&n&&(e.child.flags|=8192),Lo(e,e.updateQueue),Jt(e),null;case 4:return ln(),t===null&&Wf(e.stateNode.containerInfo),Jt(e),null;case 10:return Qa(e.type),Jt(e),null;case 19:if(Ft(re),i=e.memoizedState,i===null)return Jt(e),null;if(a=(e.flags&128)!==0,s=i.rendering,s===null)if(a)nu(i,!1);else{if(ae!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(s=Ar(t),s!==null){for(e.flags|=128,nu(i,!1),t=s.updateQueue,e.updateQueue=t,Lo(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)_m(n,t),n=n.sibling;return qt(re,re.current&1|2),e.child}t=t.sibling}i.tail!==null&&ke()>jo&&(e.flags|=128,a=!0,nu(i,!1),e.lanes=4194304)}else{if(!a)if(t=Ar(s),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Lo(e,t),nu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!xt)return Jt(e),null}else 2*ke()-i.renderingStartTime>jo&&n!==536870912&&(e.flags|=128,a=!0,nu(i,!1),e.lanes=4194304);i.isBackwards?(s.sibling=e.child,e.child=s):(t=i.last,t!==null?t.sibling=s:e.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=ke(),e.sibling=null,t=re.current,qt(re,a?t&1|2:t&1),e):(Jt(e),null);case 22:case 23:return Vn(e),Er(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(n&536870912)!==0&&(e.flags&128)===0&&(Jt(e),e.subtreeFlags&6&&(e.flags|=8192)):Jt(e),n=e.updateQueue,n!==null&&Lo(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==n&&(e.flags|=2048),t!==null&&Ft(A),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Qa(se),Jt(e),null;case 25:return null}throw Error(c(156,e.tag))}function qv(t,e){switch(Yn(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Qa(se),ln(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Gi(e),null;case 13:if(Vn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));bi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ft(re),null;case 4:return ln(),null;case 10:return Qa(e.type),null;case 22:case 23:return Vn(e),Er(),t!==null&&Ft(A),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Qa(se),null;case 25:return null;default:return null}}function Am(t,e){switch(Yn(e),e.tag){case 3:Qa(se),ln();break;case 26:case 27:case 5:Gi(e);break;case 4:ln();break;case 13:Vn(e);break;case 19:Ft(re);break;case 10:Qa(e.type);break;case 22:case 23:Vn(e),Er(),t!==null&&Ft(A);break;case 24:Qa(se)}}var Yv={getCacheForType:function(t){var e=je(se),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n}},Xv=typeof WeakMap=="function"?WeakMap:Map,Wt=0,Qt=null,Tt=null,Nt=0,Zt=0,mn=null,Ja=!1,Rr=!1,Rf=!1,Wa=0,ae=0,Bl=0,ji=0,Lf=0,zn=0,Lr=0,au=null,ba=null,jf=!1,Uf=0,jo=1/0,Uo=null,ql=null,Ho=!1,Ui=null,lu=0,Hf=0,kf=null,iu=0,Bf=null;function pn(){if((Wt&2)!==0&&Nt!==0)return Nt&-Nt;if(lt.T!==null){var t=wl;return t!==0?t:Kf()}return Da()}function xm(){zn===0&&(zn=(Nt&536870912)===0||xt?wa():536870912);var t=Re.current;return t!==null&&(t.flags|=32),zn}function Ke(t,e,n){(t===Qt&&Zt===2||t.cancelPendingCommit!==null)&&(jr(t,0),Pa(t,Nt,zn,!1)),li(t,n),((Wt&2)===0||t!==Qt)&&(t===Qt&&((Wt&2)===0&&(ji|=n),ae===4&&Pa(t,Nt,zn,!1)),_a(t))}function Tm(t,e,n){if((Wt&6)!==0)throw Error(c(327));var a=!n&&(e&60)===0&&(e&t.expiredLanes)===0||ai(t,e),i=a?Qv(t,e):Gf(t,e,!0),s=a;do{if(i===0){Rr&&!a&&Pa(t,e,0,!1);break}else if(i===6)Pa(t,e,0,!Ja);else{if(n=t.current.alternate,s&&!Gv(n)){i=Gf(t,e,!1),s=!1;continue}if(i===2){if(s=e,t.errorRecoveryDisabledLanes&s)var h=0;else h=t.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){e=h;t:{var g=t;i=au;var _=g.current.memoizedState.isDehydrated;if(_&&(jr(g,h).flags|=256),h=Gf(g,h,!1),h!==2){if(Rf&&!_){g.errorRecoveryDisabledLanes|=s,ji|=s,i=4;break t}s=ba,ba=i,s!==null&&qf(s)}i=h}if(s=!1,i!==2)continue}}if(i===1){jr(t,0),Pa(t,e,0,!0);break}t:{switch(a=t,i){case 0:case 1:throw Error(c(345));case 4:if((e&4194176)===e){Pa(a,e,zn,!Ja);break t}break;case 2:ba=null;break;case 3:case 5:break;default:throw Error(c(329))}if(a.finishedWork=n,a.finishedLanes=e,(e&62914560)===e&&(s=Uf+300-ke(),10n?32:n,lt.T=null,Ui===null)var s=!1;else{n=kf,kf=null;var h=Ui,g=lu;if(Ui=null,lu=0,(Wt&6)!==0)throw Error(c(331));var _=Wt;if(Wt|=4,ym(h.current),pm(h,h.current,g,n),Wt=_,ru(0,!1),Be&&typeof Be.onPostCommitFiberRoot=="function")try{Be.onPostCommitFiberRoot(ti,h)}catch{}s=!0}return s}finally{_t.p=i,lt.T=a,Lm(t,e)}}return!1}function jm(t,e,n){e=en(n,e),e=sf(t.stateNode,e,2),t=Ll(t,e,2),t!==null&&(li(t,2),_a(t))}function Xt(t,e,n){if(t.tag===3)jm(t,t,n);else for(;e!==null;){if(e.tag===3){jm(e,t,n);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ql===null||!ql.has(a))){t=en(n,t),n=kh(2),a=Ll(e,n,2),a!==null&&(Bh(n,a,e,t),li(a,2),_a(a));break}}e=e.return}}function Vf(t,e,n){var a=t.pingCache;if(a===null){a=t.pingCache=new Xv;var i=new Set;a.set(e,i)}else i=a.get(e),i===void 0&&(i=new Set,a.set(e,i));i.has(n)||(Rf=!0,i.add(n),t=$v.bind(null,t,e,n),e.then(t,t))}function $v(t,e,n){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Qt===t&&(Nt&n)===n&&(ae===4||ae===3&&(Nt&62914560)===Nt&&300>ke()-Uf?(Wt&2)===0&&jr(t,0):Lf|=n,Lr===Nt&&(Lr=0)),_a(t)}function Um(t,e){e===0&&(e=ul()),t=qn(t,e),t!==null&&(li(t,e),_a(t))}function Fv(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Um(t,n)}function Jv(t,e){var n=0;switch(t.tag){case 13:var a=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(e),Um(t,n)}function Wv(t,e){return Ir(t,e)}var qo=null,kr=null,Qf=!1,Yo=!1,Zf=!1,Hi=0;function _a(t){t!==kr&&t.next===null&&(kr===null?qo=kr=t:kr=kr.next=t),Yo=!0,Qf||(Qf=!0,Iv(Pv))}function ru(t,e){if(!Zf&&Yo){Zf=!0;do for(var n=!1,a=qo;a!==null;){if(t!==0){var i=a.pendingLanes;if(i===0)var s=0;else{var h=a.suspendedLanes,g=a.pingedLanes;s=(1<<31-qe(42|t)+1)-1,s&=i&~(h&~g),s=s&201326677?s&201326677|1:s?s|2:0}s!==0&&(n=!0,Bm(a,s))}else s=Nt,s=Qi(a,a===Qt?s:0),(s&3)===0||ai(a,s)||(n=!0,Bm(a,s));a=a.next}while(n);Zf=!1}}function Pv(){Yo=Qf=!1;var t=0;Hi!==0&&(sy()&&(t=Hi),Hi=0);for(var e=ke(),n=null,a=qo;a!==null;){var i=a.next,s=Hm(a,e);s===0?(a.next=null,n===null?qo=i:n.next=i,i===null&&(kr=n)):(n=a,(t!==0||(s&3)!==0)&&(Yo=!0)),a=i}ru(t)}function Hm(t,e){for(var n=t.suspendedLanes,a=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes&-62914561;0"u"?null:document;function tp(t,e,n){var a=qr;if(a&&typeof e=="string"&&e){var i=ze(e);i='link[rel="'+t+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Im.has(i)||(Im.add(i),t={rel:t,crossOrigin:n,href:e},a.querySelector(i)===null&&(e=a.createElement("link"),De(e,"link",t),te(e),a.head.appendChild(e)))}}function py(t){Ia.D(t),tp("dns-prefetch",t,null)}function gy(t,e){Ia.C(t,e),tp("preconnect",t,e)}function vy(t,e,n){Ia.L(t,e,n);var a=qr;if(a&&t&&e){var i='link[rel="preload"][as="'+ze(e)+'"]';e==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+ze(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+ze(n.imageSizes)+'"]')):i+='[href="'+ze(t)+'"]';var s=i;switch(e){case"style":s=Yr(t);break;case"script":s=Xr(t)}Rn.has(s)||(t=St({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Rn.set(s,t),a.querySelector(i)!==null||e==="style"&&a.querySelector(ou(s))||e==="script"&&a.querySelector(cu(s))||(e=a.createElement("link"),De(e,"link",t),te(e),a.head.appendChild(e)))}}function yy(t,e){Ia.m(t,e);var n=qr;if(n&&t){var a=e&&typeof e.as=="string"?e.as:"script",i='link[rel="modulepreload"][as="'+ze(a)+'"][href="'+ze(t)+'"]',s=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Xr(t)}if(!Rn.has(s)&&(t=St({rel:"modulepreload",href:t},e),Rn.set(s,t),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(cu(s)))return}a=n.createElement("link"),De(a,"link",t),te(a),n.head.appendChild(a)}}}function by(t,e,n){Ia.S(t,e,n);var a=qr;if(a&&t){var i=Ma(a).hoistableStyles,s=Yr(t);e=e||"default";var h=i.get(s);if(!h){var g={loading:0,preload:null};if(h=a.querySelector(ou(s)))g.loading=5;else{t=St({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Rn.get(s))&&rd(t,n);var _=h=a.createElement("link");te(_),De(_,"link",t),_._p=new Promise(function(T,B){_.onload=T,_.onerror=B}),_.addEventListener("load",function(){g.loading|=1}),_.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Ko(h,e,a)}h={type:"stylesheet",instance:h,count:1,state:g},i.set(s,h)}}}function _y(t,e){Ia.X(t,e);var n=qr;if(n&&t){var a=Ma(n).hoistableScripts,i=Xr(t),s=a.get(i);s||(s=n.querySelector(cu(i)),s||(t=St({src:t,async:!0},e),(e=Rn.get(i))&&sd(t,e),s=n.createElement("script"),te(s),De(s,"link",t),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(i,s))}}function Sy(t,e){Ia.M(t,e);var n=qr;if(n&&t){var a=Ma(n).hoistableScripts,i=Xr(t),s=a.get(i);s||(s=n.querySelector(cu(i)),s||(t=St({src:t,async:!0,type:"module"},e),(e=Rn.get(i))&&sd(t,e),s=n.createElement("script"),te(s),De(s,"link",t),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(i,s))}}function ep(t,e,n,a){var i=(i=Fe.current)?Zo(i):null;if(!i)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Yr(n.href),n=Ma(i).hoistableStyles,a=n.get(e),a||(a={type:"style",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Yr(n.href);var s=Ma(i).hoistableStyles,h=s.get(t);if(h||(i=i.ownerDocument||i,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(t,h),(s=i.querySelector(ou(t)))&&!s._p&&(h.instance=s,h.state.loading=5),Rn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rn.set(t,n),s||Ey(i,t,n,h.state))),e&&a===null)throw Error(c(528,""));return h}if(e&&a!==null)throw Error(c(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Xr(n),n=Ma(i).hoistableScripts,a=n.get(e),a||(a={type:"script",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function Yr(t){return'href="'+ze(t)+'"'}function ou(t){return'link[rel="stylesheet"]['+t+"]"}function np(t){return St({},t,{"data-precedence":t.precedence,precedence:null})}function Ey(t,e,n,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),De(e,"link",n),te(e),t.head.appendChild(e))}function Xr(t){return'[src="'+ze(t)+'"]'}function cu(t){return"script[async]"+t}function ap(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+ze(n.href)+'"]');if(a)return e.instance=a,te(a),a;var i=St({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),te(a),De(a,"style",i),Ko(a,n.precedence,t),e.instance=a;case"stylesheet":i=Yr(n.href);var s=t.querySelector(ou(i));if(s)return e.state.loading|=4,e.instance=s,te(s),s;a=np(n),(i=Rn.get(i))&&rd(a,i),s=(t.ownerDocument||t).createElement("link"),te(s);var h=s;return h._p=new Promise(function(g,_){h.onload=g,h.onerror=_}),De(s,"link",a),e.state.loading|=4,Ko(s,n.precedence,t),e.instance=s;case"script":return s=Xr(n.src),(i=t.querySelector(cu(s)))?(e.instance=i,te(i),i):(a=n,(i=Rn.get(s))&&(a=St({},n),sd(a,i)),t=t.ownerDocument||t,i=t.createElement("script"),te(i),De(i,"link",a),t.head.appendChild(i),e.instance=i);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Ko(a,n.precedence,t));return e.instance}function Ko(t,e,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,s=i,h=0;h title"):null)}function Ay(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function rp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var fu=null;function xy(){}function Ty(t,e,n){if(fu===null)throw Error(c(475));var a=fu;if(e.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var i=Yr(n.href),s=t.querySelector(ou(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(a.count++,a=Fo.bind(a),t.then(a,a)),e.state.loading|=4,e.instance=s,te(s);return}s=t.ownerDocument||t,n=np(n),(i=Rn.get(i))&&rd(n,i),s=s.createElement("link"),te(s);var h=s;h._p=new Promise(function(g,_){h.onload=g,h.onerror=_}),De(s,"link",n),e.instance=s}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(a.count++,e=Fo.bind(a),t.addEventListener("load",e),t.addEventListener("error",e))}}function Oy(){if(fu===null)throw Error(c(475));var t=fu;return t.stylesheets&&t.count===0&&ud(t,t.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),gd.exports=Ky(),gd.exports}var Fy=$y(),bu={},xp;function Jy(){if(xp)return bu;xp=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.parse=y,bu.serialize=E;const l=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,u=/^[\u0021-\u003A\u003C-\u007E]*$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,c=/^[\u0020-\u003A\u003D-\u007E]*$/,f=Object.prototype.toString,m=(()=>{const z=function(){};return z.prototype=Object.create(null),z})();function y(z,q){const L=new m,I=z.length;if(I<2)return L;const Q=(q==null?void 0:q.decode)||D;let H=0;do{const W=z.indexOf("=",H);if(W===-1)break;const P=z.indexOf(";",H),bt=P===-1?I:P;if(W>bt){H=z.lastIndexOf(";",W-1)+1;continue}const Ot=b(z,H,W),It=S(z,W,Ot),de=z.slice(Ot,It);if(L[de]===void 0){let ue=b(z,W+1,bt),lt=S(z,bt,ue);const St=Q(z.slice(ue,lt));L[de]=St}H=bt+1}while(HL;){const I=z.charCodeAt(--q);if(I!==32&&I!==9)return q+1}return L}function E(z,q,L){const I=(L==null?void 0:L.encode)||encodeURIComponent;if(!l.test(z))throw new TypeError(`argument name is invalid: ${z}`);const Q=I(q);if(!u.test(Q))throw new TypeError(`argument val is invalid: ${q}`);let H=z+"="+Q;if(!L)return H;if(L.maxAge!==void 0){if(!Number.isInteger(L.maxAge))throw new TypeError(`option maxAge is invalid: ${L.maxAge}`);H+="; Max-Age="+L.maxAge}if(L.domain){if(!o.test(L.domain))throw new TypeError(`option domain is invalid: ${L.domain}`);H+="; Domain="+L.domain}if(L.path){if(!c.test(L.path))throw new TypeError(`option path is invalid: ${L.path}`);H+="; Path="+L.path}if(L.expires){if(!j(L.expires)||!Number.isFinite(L.expires.valueOf()))throw new TypeError(`option expires is invalid: ${L.expires}`);H+="; Expires="+L.expires.toUTCString()}if(L.httpOnly&&(H+="; HttpOnly"),L.secure&&(H+="; Secure"),L.partitioned&&(H+="; Partitioned"),L.priority)switch(typeof L.priority=="string"?L.priority.toLowerCase():void 0){case"low":H+="; Priority=Low";break;case"medium":H+="; Priority=Medium";break;case"high":H+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${L.priority}`)}if(L.sameSite)switch(typeof L.sameSite=="string"?L.sameSite.toLowerCase():L.sameSite){case!0:case"strict":H+="; SameSite=Strict";break;case"lax":H+="; SameSite=Lax";break;case"none":H+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${L.sameSite}`)}return H}function D(z){if(z.indexOf("%")===-1)return z;try{return decodeURIComponent(z)}catch{return z}}function j(z){return f.call(z)==="[object Date]"}return bu}Jy();/** + * react-router v7.3.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var Tp="popstate";function Wy(l={}){function u(c,f){let{pathname:m,search:y,hash:b}=c.location;return Md("",{pathname:m,search:y,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function o(c,f){return typeof f=="string"?f:xu(f)}return Iy(u,o,null,l)}function Pt(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function xa(l,u){if(!l){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Py(){return Math.random().toString(36).substring(2,10)}function Op(l,u){return{usr:l.state,key:l.key,idx:u}}function Md(l,u,o=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof u=="string"?Kr(u):u,state:o,key:u&&u.key||c||Py()}}function xu({pathname:l="/",search:u="",hash:o=""}){return u&&u!=="?"&&(l+=u.charAt(0)==="?"?u:"?"+u),o&&o!=="#"&&(l+=o.charAt(0)==="#"?o:"#"+o),l}function Kr(l){let u={};if(l){let o=l.indexOf("#");o>=0&&(u.hash=l.substring(o),l=l.substring(0,o));let c=l.indexOf("?");c>=0&&(u.search=l.substring(c),l=l.substring(0,c)),l&&(u.pathname=l)}return u}function Iy(l,u,o,c={}){let{window:f=document.defaultView,v5Compat:m=!1}=c,y=f.history,b="POP",S=null,E=D();E==null&&(E=0,y.replaceState({...y.state,idx:E},""));function D(){return(y.state||{idx:null}).idx}function j(){b="POP";let Q=D(),H=Q==null?null:Q-E;E=Q,S&&S({action:b,location:I.location,delta:H})}function z(Q,H){b="PUSH";let W=Md(I.location,Q,H);E=D()+1;let P=Op(W,E),bt=I.createHref(W);try{y.pushState(P,"",bt)}catch(Ot){if(Ot instanceof DOMException&&Ot.name==="DataCloneError")throw Ot;f.location.assign(bt)}m&&S&&S({action:b,location:I.location,delta:1})}function q(Q,H){b="REPLACE";let W=Md(I.location,Q,H);E=D();let P=Op(W,E),bt=I.createHref(W);y.replaceState(P,"",bt),m&&S&&S({action:b,location:I.location,delta:0})}function L(Q){let H=f.location.origin!=="null"?f.location.origin:f.location.href,W=typeof Q=="string"?Q:xu(Q);return W=W.replace(/ $/,"%20"),Pt(H,`No window.location.(origin|href) available to create URL for href: ${W}`),new URL(W,H)}let I={get action(){return b},get location(){return l(f,y)},listen(Q){if(S)throw new Error("A history only accepts one active listener");return f.addEventListener(Tp,j),S=Q,()=>{f.removeEventListener(Tp,j),S=null}},createHref(Q){return u(f,Q)},createURL:L,encodeLocation(Q){let H=L(Q);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:z,replace:q,go(Q){return y.go(Q)}};return I}function pg(l,u,o="/"){return t0(l,u,o,!1)}function t0(l,u,o,c){let f=typeof u=="string"?Kr(u):u,m=el(f.pathname||"/",o);if(m==null)return null;let y=gg(l);e0(y);let b=null;for(let S=0;b==null&&S{let S={relativePath:b===void 0?m.path||"":b,caseSensitive:m.caseSensitive===!0,childrenIndex:y,route:m};S.relativePath.startsWith("/")&&(Pt(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length));let E=tl([c,S.relativePath]),D=o.concat(S);m.children&&m.children.length>0&&(Pt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),gg(m.children,u,D,E)),!(m.path==null&&!m.index)&&u.push({path:E,score:u0(E,m.index),routesMeta:D})};return l.forEach((m,y)=>{var b;if(m.path===""||!((b=m.path)!=null&&b.includes("?")))f(m,y);else for(let S of vg(m.path))f(m,y,S)}),u}function vg(l){let u=l.split("/");if(u.length===0)return[];let[o,...c]=u,f=o.endsWith("?"),m=o.replace(/\?$/,"");if(c.length===0)return f?[m,""]:[m];let y=vg(c.join("/")),b=[];return b.push(...y.map(S=>S===""?m:[m,S].join("/"))),f&&b.push(...y),b.map(S=>l.startsWith("/")&&S===""?"/":S)}function e0(l){l.sort((u,o)=>u.score!==o.score?o.score-u.score:o0(u.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var n0=/^:[\w-]+$/,a0=3,l0=2,i0=1,r0=10,s0=-2,Cp=l=>l==="*";function u0(l,u){let o=l.split("/"),c=o.length;return o.some(Cp)&&(c+=s0),u&&(c+=l0),o.filter(f=>!Cp(f)).reduce((f,m)=>f+(n0.test(m)?a0:m===""?i0:r0),c)}function o0(l,u){return l.length===u.length&&l.slice(0,-1).every((c,f)=>c===u[f])?l[l.length-1]-u[u.length-1]:0}function c0(l,u,o=!1){let{routesMeta:c}=l,f={},m="/",y=[];for(let b=0;b{if(D==="*"){let L=b[z]||"";y=m.slice(0,m.length-L.length).replace(/(.)\/+$/,"$1")}const q=b[z];return j&&!q?E[D]=void 0:E[D]=(q||"").replace(/%2F/g,"/"),E},{}),pathname:m,pathnameBase:y,pattern:l}}function f0(l,u=!1,o=!0){xa(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,b,S)=>(c.push({paramName:b,isOptional:S!=null}),S?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,u?void 0:"i"),c]}function d0(l){try{return l.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return xa(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),l}}function el(l,u){if(u==="/")return l;if(!l.toLowerCase().startsWith(u.toLowerCase()))return null;let o=u.endsWith("/")?u.length-1:u.length,c=l.charAt(o);return c&&c!=="/"?null:l.slice(o)||"/"}function h0(l,u="/"){let{pathname:o,search:c="",hash:f=""}=typeof l=="string"?Kr(l):l;return{pathname:o?o.startsWith("/")?o:m0(o,u):u,search:v0(c),hash:y0(f)}}function m0(l,u){let o=u.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function bd(l,u,o,c){return`Cannot include a '${l}' character in a manually specified \`to.${u}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function p0(l){return l.filter((u,o)=>o===0||u.route.path&&u.route.path.length>0)}function yg(l){let u=p0(l);return u.map((o,c)=>c===u.length-1?o.pathname:o.pathnameBase)}function bg(l,u,o,c=!1){let f;typeof l=="string"?f=Kr(l):(f={...l},Pt(!f.pathname||!f.pathname.includes("?"),bd("?","pathname","search",f)),Pt(!f.pathname||!f.pathname.includes("#"),bd("#","pathname","hash",f)),Pt(!f.search||!f.search.includes("#"),bd("#","search","hash",f)));let m=l===""||f.pathname==="",y=m?"/":f.pathname,b;if(y==null)b=o;else{let j=u.length-1;if(!c&&y.startsWith("..")){let z=y.split("/");for(;z[0]==="..";)z.shift(),j-=1;f.pathname=z.join("/")}b=j>=0?u[j]:"/"}let S=h0(f,b),E=y&&y!=="/"&&y.endsWith("/"),D=(m||y===".")&&o.endsWith("/");return!S.pathname.endsWith("/")&&(E||D)&&(S.pathname+="/"),S}var tl=l=>l.join("/").replace(/\/\/+/g,"/"),g0=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),v0=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,y0=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function b0(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}var _g=["POST","PUT","PATCH","DELETE"];new Set(_g);var _0=["GET",..._g];new Set(_0);var $r=w.createContext(null);$r.displayName="DataRouter";var gc=w.createContext(null);gc.displayName="DataRouterState";var Sg=w.createContext({isTransitioning:!1});Sg.displayName="ViewTransition";var S0=w.createContext(new Map);S0.displayName="Fetchers";var E0=w.createContext(null);E0.displayName="Await";var Ta=w.createContext(null);Ta.displayName="Navigation";var Cu=w.createContext(null);Cu.displayName="Location";var Oa=w.createContext({outlet:null,matches:[],isDataRoute:!1});Oa.displayName="Route";var Id=w.createContext(null);Id.displayName="RouteError";function A0(l,{relative:u}={}){Pt(wu(),"useHref() may be used only in the context of a component.");let{basename:o,navigator:c}=w.useContext(Ta),{hash:f,pathname:m,search:y}=Du(l,{relative:u}),b=m;return o!=="/"&&(b=m==="/"?o:tl([o,m])),c.createHref({pathname:b,search:y,hash:f})}function wu(){return w.useContext(Cu)!=null}function Xi(){return Pt(wu(),"useLocation() may be used only in the context of a component."),w.useContext(Cu).location}var Eg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ag(l){w.useContext(Ta).static||w.useLayoutEffect(l)}function x0(){let{isDataRoute:l}=w.useContext(Oa);return l?k0():T0()}function T0(){Pt(wu(),"useNavigate() may be used only in the context of a component.");let l=w.useContext($r),{basename:u,navigator:o}=w.useContext(Ta),{matches:c}=w.useContext(Oa),{pathname:f}=Xi(),m=JSON.stringify(yg(c)),y=w.useRef(!1);return Ag(()=>{y.current=!0}),w.useCallback((S,E={})=>{if(xa(y.current,Eg),!y.current)return;if(typeof S=="number"){o.go(S);return}let D=bg(S,JSON.parse(m),f,E.relative==="path");l==null&&u!=="/"&&(D.pathname=D.pathname==="/"?u:tl([u,D.pathname])),(E.replace?o.replace:o.push)(D,E.state,E)},[u,o,m,f,l])}w.createContext(null);function O0(){let{matches:l}=w.useContext(Oa),u=l[l.length-1];return u?u.params:{}}function Du(l,{relative:u}={}){let{matches:o}=w.useContext(Oa),{pathname:c}=Xi(),f=JSON.stringify(yg(o));return w.useMemo(()=>bg(l,JSON.parse(f),c,u==="path"),[l,f,c,u])}function C0(l,u){return xg(l,u)}function xg(l,u,o,c){var W;Pt(wu(),"useRoutes() may be used only in the context of a component.");let{navigator:f,static:m}=w.useContext(Ta),{matches:y}=w.useContext(Oa),b=y[y.length-1],S=b?b.params:{},E=b?b.pathname:"/",D=b?b.pathnameBase:"/",j=b&&b.route;{let P=j&&j.path||"";Tg(E,!j||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${E}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let z=Xi(),q;if(u){let P=typeof u=="string"?Kr(u):u;Pt(D==="/"||((W=P.pathname)==null?void 0:W.startsWith(D)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${D}" but pathname "${P.pathname}" was given in the \`location\` prop.`),q=P}else q=z;let L=q.pathname||"/",I=L;if(D!=="/"){let P=D.replace(/^\//,"").split("/");I="/"+L.replace(/^\//,"").split("/").slice(P.length).join("/")}let Q=!m&&o&&o.matches&&o.matches.length>0?o.matches:pg(l,{pathname:I});xa(j||Q!=null,`No routes matched location "${q.pathname}${q.search}${q.hash}" `),xa(Q==null||Q[Q.length-1].route.element!==void 0||Q[Q.length-1].route.Component!==void 0||Q[Q.length-1].route.lazy!==void 0,`Matched leaf route at location "${q.pathname}${q.search}${q.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let H=z0(Q&&Q.map(P=>Object.assign({},P,{params:Object.assign({},S,P.params),pathname:tl([D,f.encodeLocation?f.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?D:tl([D,f.encodeLocation?f.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),y,o,c);return u&&H?w.createElement(Cu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...q},navigationType:"POP"}},H):H}function w0(){let l=H0(),u=b0(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),o=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},m={padding:"2px 4px",backgroundColor:c},y=null;return console.error("Error handled by React Router default ErrorBoundary:",l),y=w.createElement(w.Fragment,null,w.createElement("p",null,"πŸ’Ώ Hey developer πŸ‘‹"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:m},"ErrorBoundary")," or"," ",w.createElement("code",{style:m},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},u),o?w.createElement("pre",{style:f},o):null,y)}var D0=w.createElement(w0,null),M0=class extends w.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,u){return u.location!==l.location||u.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:u.error,location:u.location,revalidation:l.revalidation||u.revalidation}}componentDidCatch(l,u){console.error("React Router caught the following error during render",l,u)}render(){return this.state.error!==void 0?w.createElement(Oa.Provider,{value:this.props.routeContext},w.createElement(Id.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function N0({routeContext:l,match:u,children:o}){let c=w.useContext($r);return c&&c.static&&c.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=u.route.id),w.createElement(Oa.Provider,{value:l},o)}function z0(l,u=[],o=null,c=null){if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(u.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let f=l,m=o==null?void 0:o.errors;if(m!=null){let S=f.findIndex(E=>E.route.id&&(m==null?void 0:m[E.route.id])!==void 0);Pt(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let y=!1,b=-1;if(o)for(let S=0;S=0?f=f.slice(0,b+1):f=[f[0]];break}}}return f.reduceRight((S,E,D)=>{let j,z=!1,q=null,L=null;o&&(j=m&&E.route.id?m[E.route.id]:void 0,q=E.route.errorElement||D0,y&&(b<0&&D===0?(Tg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),z=!0,L=null):b===D&&(z=!0,L=E.route.hydrateFallbackElement||null)));let I=u.concat(f.slice(0,D+1)),Q=()=>{let H;return j?H=q:z?H=L:E.route.Component?H=w.createElement(E.route.Component,null):E.route.element?H=E.route.element:H=S,w.createElement(N0,{match:E,routeContext:{outlet:S,matches:I,isDataRoute:o!=null},children:H})};return o&&(E.route.ErrorBoundary||E.route.errorElement||D===0)?w.createElement(M0,{location:o.location,revalidation:o.revalidation,component:q,error:j,children:Q(),routeContext:{outlet:null,matches:I,isDataRoute:!0}}):Q()},null)}function th(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function R0(l){let u=w.useContext($r);return Pt(u,th(l)),u}function L0(l){let u=w.useContext(gc);return Pt(u,th(l)),u}function j0(l){let u=w.useContext(Oa);return Pt(u,th(l)),u}function eh(l){let u=j0(l),o=u.matches[u.matches.length-1];return Pt(o.route.id,`${l} can only be used on routes that contain a unique "id"`),o.route.id}function U0(){return eh("useRouteId")}function H0(){var c;let l=w.useContext(Id),u=L0("useRouteError"),o=eh("useRouteError");return l!==void 0?l:(c=u.errors)==null?void 0:c[o]}function k0(){let{router:l}=R0("useNavigate"),u=eh("useNavigate"),o=w.useRef(!1);return Ag(()=>{o.current=!0}),w.useCallback(async(f,m={})=>{xa(o.current,Eg),o.current&&(typeof f=="number"?l.navigate(f):await l.navigate(f,{fromRouteId:u,...m}))},[l,u])}var wp={};function Tg(l,u,o){!u&&!wp[l]&&(wp[l]=!0,xa(!1,o))}w.memo(B0);function B0({routes:l,future:u,state:o}){return xg(l,void 0,o,u)}function Nd(l){Pt(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function q0({basename:l="/",children:u=null,location:o,navigationType:c="POP",navigator:f,static:m=!1}){Pt(!wu(),"You cannot render a inside another . You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),b=w.useMemo(()=>({basename:y,navigator:f,static:m,future:{}}),[y,f,m]);typeof o=="string"&&(o=Kr(o));let{pathname:S="/",search:E="",hash:D="",state:j=null,key:z="default"}=o,q=w.useMemo(()=>{let L=el(S,y);return L==null?null:{location:{pathname:L,search:E,hash:D,state:j,key:z},navigationType:c}},[y,S,E,D,j,z,c]);return xa(q!=null,` is not able to match the URL "${S}${E}${D}" because it does not start with the basename, so the won't render anything.`),q==null?null:w.createElement(Ta.Provider,{value:b},w.createElement(Cu.Provider,{children:u,value:q}))}function Y0({children:l,location:u}){return C0(zd(l),u)}function zd(l,u=[]){let o=[];return w.Children.forEach(l,(c,f)=>{if(!w.isValidElement(c))return;let m=[...u,f];if(c.type===w.Fragment){o.push.apply(o,zd(c.props.children,m));return}Pt(c.type===Nd,`[${typeof c.type=="string"?c.type:c.type.name}] is not a component. All component children of must be a or `),Pt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let y={id:c.props.id||m.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(y.children=zd(c.props.children,m)),o.push(y)}),o}var sc="get",uc="application/x-www-form-urlencoded";function vc(l){return l!=null&&typeof l.tagName=="string"}function X0(l){return vc(l)&&l.tagName.toLowerCase()==="button"}function G0(l){return vc(l)&&l.tagName.toLowerCase()==="form"}function V0(l){return vc(l)&&l.tagName.toLowerCase()==="input"}function Q0(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Z0(l,u){return l.button===0&&(!u||u==="_self")&&!Q0(l)}var lc=null;function K0(){if(lc===null)try{new FormData(document.createElement("form"),0),lc=!1}catch{lc=!0}return lc}var $0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _d(l){return l!=null&&!$0.has(l)?(xa(!1,`"${l}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${uc}"`),null):l}function F0(l,u){let o,c,f,m,y;if(G0(l)){let b=l.getAttribute("action");c=b?el(b,u):null,o=l.getAttribute("method")||sc,f=_d(l.getAttribute("enctype"))||uc,m=new FormData(l)}else if(X0(l)||V0(l)&&(l.type==="submit"||l.type==="image")){let b=l.form;if(b==null)throw new Error('Cannot submit a