@nogataka/smart-edit 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +201 -65
- package/dist/smart-edit/cli.js +79 -2
- package/dist/smart-edit/dashboard.js +29 -0
- package/dist/smart-edit/instance-registry.d.ts +43 -0
- package/dist/smart-edit/instance-registry.js +272 -0
- package/dist/smart-edit/resources/dashboard/dashboard.js +9 -9
- package/dist/smart-edit/resources/dashboard/index.css +1 -1
- package/dist/smart-edit/standalone-dashboard.d.ts +32 -0
- package/dist/smart-edit/standalone-dashboard.js +223 -0
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();var vu={exports:{}},Da={};var _m;function Fv(){if(_m)return Da;_m=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:s,type:a,key:u,ref:o!==void 0?o:null,props:c}}return Da.Fragment=e,Da.jsx=i,Da.jsxs=i,Da}var Sm;function Kv(){return Sm||(Sm=1,vu.exports=Fv()),vu.exports}var _=Kv(),xu={exports:{}},ct={};var Tm;function Wv(){if(Tm)return ct;Tm=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function S(C){return C===null||typeof C!="object"?null:(C=v&&C[v]||C["@@iterator"],typeof C=="function"?C:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function D(C,U,F){this.props=C,this.context=U,this.refs=A,this.updater=F||T}D.prototype.isReactComponent={},D.prototype.setState=function(C,U){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,U,"setState")},D.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function L(){}L.prototype=D.prototype;function q(C,U,F){this.props=C,this.context=U,this.refs=A,this.updater=F||T}var G=q.prototype=new L;G.constructor=q,M(G,D.prototype),G.isPureReactComponent=!0;var Y=Array.isArray;function K(){}var X={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function tt(C,U,F){var J=F.ref;return{$$typeof:s,type:C,key:U,ref:J!==void 0?J:null,props:F}}function rt(C,U){return tt(C.type,U,C.props)}function it(C){return typeof C=="object"&&C!==null&&C.$$typeof===s}function st(C){var U={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(F){return U[F]})}var Nt=/\/+/g;function Vt(C,U){return typeof C=="object"&&C!==null&&C.key!=null?st(""+C.key):U.toString(36)}function dt(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(K,K):(C.status="pending",C.then(function(U){C.status==="pending"&&(C.status="fulfilled",C.value=U)},function(U){C.status==="pending"&&(C.status="rejected",C.reason=U)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function k(C,U,F,J,at){var ot=typeof C;(ot==="undefined"||ot==="boolean")&&(C=null);var Et=!1;if(C===null)Et=!0;else switch(ot){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(C.$$typeof){case s:case e:Et=!0;break;case p:return Et=C._init,k(Et(C._payload),U,F,J,at)}}if(Et)return at=at(C),Et=J===""?"."+Vt(C,0):J,Y(at)?(F="",Et!=null&&(F=Et.replace(Nt,"$&/")+"/"),k(at,U,F,"",function(Ls){return Ls})):at!=null&&(it(at)&&(at=rt(at,F+(at.key==null||C&&C.key===at.key?"":(""+at.key).replace(Nt,"$&/")+"/")+Et)),U.push(at)),1;Et=0;var de=J===""?".":J+":";if(Y(C))for(var Qt=0;Qt<C.length;Qt++)J=C[Qt],ot=de+Vt(J,Qt),Et+=k(J,U,F,ot,at);else if(Qt=S(C),typeof Qt=="function")for(C=Qt.call(C),Qt=0;!(J=C.next()).done;)J=J.value,ot=de+Vt(J,Qt++),Et+=k(J,U,F,ot,at);else if(ot==="object"){if(typeof C.then=="function")return k(dt(C),U,F,J,at);throw U=String(C),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Et}function Q(C,U,F){if(C==null)return C;var J=[],at=0;return k(C,J,"","",function(ot){return U.call(F,ot,at++)}),J}function $(C){if(C._status===-1){var U=C._result;U=U(),U.then(function(F){(C._status===0||C._status===-1)&&(C._status=1,C._result=F)},function(F){(C._status===0||C._status===-1)&&(C._status=2,C._result=F)}),C._status===-1&&(C._status=0,C._result=U)}if(C._status===1)return C._result.default;throw C._result}var lt=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},_t={map:Q,forEach:function(C,U,F){Q(C,function(){U.apply(this,arguments)},F)},count:function(C){var U=0;return Q(C,function(){U++}),U},toArray:function(C){return Q(C,function(U){return U})||[]},only:function(C){if(!it(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ct.Activity=b,ct.Children=_t,ct.Component=D,ct.Fragment=i,ct.Profiler=o,ct.PureComponent=q,ct.StrictMode=a,ct.Suspense=d,ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ct.__COMPILER_RUNTIME={__proto__:null,c:function(C){return X.H.useMemoCache(C)}},ct.cache=function(C){return function(){return C.apply(null,arguments)}},ct.cacheSignal=function(){return null},ct.cloneElement=function(C,U,F){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var J=M({},C.props),at=C.key;if(U!=null)for(ot in U.key!==void 0&&(at=""+U.key),U)!Z.call(U,ot)||ot==="key"||ot==="__self"||ot==="__source"||ot==="ref"&&U.ref===void 0||(J[ot]=U[ot]);var ot=arguments.length-2;if(ot===1)J.children=F;else if(1<ot){for(var Et=Array(ot),de=0;de<ot;de++)Et[de]=arguments[de+2];J.children=Et}return tt(C.type,at,J)},ct.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},ct.createElement=function(C,U,F){var J,at={},ot=null;if(U!=null)for(J in U.key!==void 0&&(ot=""+U.key),U)Z.call(U,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(at[J]=U[J]);var Et=arguments.length-2;if(Et===1)at.children=F;else if(1<Et){for(var de=Array(Et),Qt=0;Qt<Et;Qt++)de[Qt]=arguments[Qt+2];at.children=de}if(C&&C.defaultProps)for(J in Et=C.defaultProps,Et)at[J]===void 0&&(at[J]=Et[J]);return tt(C,ot,at)},ct.createRef=function(){return{current:null}},ct.forwardRef=function(C){return{$$typeof:f,render:C}},ct.isValidElement=it,ct.lazy=function(C){return{$$typeof:p,_payload:{_status:-1,_result:C},_init:$}},ct.memo=function(C,U){return{$$typeof:m,type:C,compare:U===void 0?null:U}},ct.startTransition=function(C){var U=X.T,F={};X.T=F;try{var J=C(),at=X.S;at!==null&&at(F,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(K,lt)}catch(ot){lt(ot)}finally{U!==null&&F.types!==null&&(U.types=F.types),X.T=U}},ct.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ct.use=function(C){return X.H.use(C)},ct.useActionState=function(C,U,F){return X.H.useActionState(C,U,F)},ct.useCallback=function(C,U){return X.H.useCallback(C,U)},ct.useContext=function(C){return X.H.useContext(C)},ct.useDebugValue=function(){},ct.useDeferredValue=function(C,U){return X.H.useDeferredValue(C,U)},ct.useEffect=function(C,U){return X.H.useEffect(C,U)},ct.useEffectEvent=function(C){return X.H.useEffectEvent(C)},ct.useId=function(){return X.H.useId()},ct.useImperativeHandle=function(C,U,F){return X.H.useImperativeHandle(C,U,F)},ct.useInsertionEffect=function(C,U){return X.H.useInsertionEffect(C,U)},ct.useLayoutEffect=function(C,U){return X.H.useLayoutEffect(C,U)},ct.useMemo=function(C,U){return X.H.useMemo(C,U)},ct.useOptimistic=function(C,U){return X.H.useOptimistic(C,U)},ct.useReducer=function(C,U,F){return X.H.useReducer(C,U,F)},ct.useRef=function(C){return X.H.useRef(C)},ct.useState=function(C){return X.H.useState(C)},ct.useSyncExternalStore=function(C,U,F){return X.H.useSyncExternalStore(C,U,F)},ct.useTransition=function(){return X.H.useTransition()},ct.version="19.2.4",ct}var Mm;function tf(){return Mm||(Mm=1,xu.exports=Wv()),xu.exports}var W=tf(),_u={exports:{}},za={},Su={exports:{}},Tu={};var Em;function Jv(){return Em||(Em=1,(function(s){function e(k,Q){var $=k.length;k.push(Q);t:for(;0<$;){var lt=$-1>>>1,_t=k[lt];if(0<o(_t,Q))k[lt]=Q,k[$]=_t,$=lt;else break t}}function i(k){return k.length===0?null:k[0]}function a(k){if(k.length===0)return null;var Q=k[0],$=k.pop();if($!==Q){k[0]=$;t:for(var lt=0,_t=k.length,C=_t>>>1;lt<C;){var U=2*(lt+1)-1,F=k[U],J=U+1,at=k[J];if(0>o(F,$))J<_t&&0>o(at,F)?(k[lt]=at,k[J]=$,lt=J):(k[lt]=F,k[U]=$,lt=U);else if(J<_t&&0>o(at,$))k[lt]=at,k[J]=$,lt=J;else break t}}return Q}function o(k,Q){var $=k.sortIndex-Q.sortIndex;return $!==0?$:k.id-Q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;s.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();s.unstable_now=function(){return u.now()-f}}var d=[],m=[],p=1,b=null,v=3,S=!1,T=!1,M=!1,A=!1,D=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function G(k){for(var Q=i(m);Q!==null;){if(Q.callback===null)a(m);else if(Q.startTime<=k)a(m),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=i(m)}}function Y(k){if(M=!1,G(k),!T)if(i(d)!==null)T=!0,K||(K=!0,st());else{var Q=i(m);Q!==null&&dt(Y,Q.startTime-k)}}var K=!1,X=-1,Z=5,tt=-1;function rt(){return A?!0:!(s.unstable_now()-tt<Z)}function it(){if(A=!1,K){var k=s.unstable_now();tt=k;var Q=!0;try{t:{T=!1,M&&(M=!1,L(X),X=-1),S=!0;var $=v;try{e:{for(G(k),b=i(d);b!==null&&!(b.expirationTime>k&&rt());){var lt=b.callback;if(typeof lt=="function"){b.callback=null,v=b.priorityLevel;var _t=lt(b.expirationTime<=k);if(k=s.unstable_now(),typeof _t=="function"){b.callback=_t,G(k),Q=!0;break e}b===i(d)&&a(d),G(k)}else a(d);b=i(d)}if(b!==null)Q=!0;else{var C=i(m);C!==null&&dt(Y,C.startTime-k),Q=!1}}break t}finally{b=null,v=$,S=!1}Q=void 0}}finally{Q?st():K=!1}}}var st;if(typeof q=="function")st=function(){q(it)};else if(typeof MessageChannel<"u"){var Nt=new MessageChannel,Vt=Nt.port2;Nt.port1.onmessage=it,st=function(){Vt.postMessage(null)}}else st=function(){D(it,0)};function dt(k,Q){X=D(function(){k(s.unstable_now())},Q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(k){k.callback=null},s.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<k?Math.floor(1e3/k):5},s.unstable_getCurrentPriorityLevel=function(){return v},s.unstable_next=function(k){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var $=v;v=Q;try{return k()}finally{v=$}},s.unstable_requestPaint=function(){A=!0},s.unstable_runWithPriority=function(k,Q){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var $=v;v=k;try{return Q()}finally{v=$}},s.unstable_scheduleCallback=function(k,Q,$){var lt=s.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?lt+$:lt):$=lt,k){case 1:var _t=-1;break;case 2:_t=250;break;case 5:_t=1073741823;break;case 4:_t=1e4;break;default:_t=5e3}return _t=$+_t,k={id:p++,callback:Q,priorityLevel:k,startTime:$,expirationTime:_t,sortIndex:-1},$>lt?(k.sortIndex=$,e(m,k),i(d)===null&&k===i(m)&&(M?(L(X),X=-1):M=!0,dt(Y,$-lt))):(k.sortIndex=_t,e(d,k),T||S||(T=!0,K||(K=!0,st()))),k},s.unstable_shouldYield=rt,s.unstable_wrapCallback=function(k){var Q=v;return function(){var $=v;v=Q;try{return k.apply(this,arguments)}finally{v=$}}}})(Tu)),Tu}var Am;function Iv(){return Am||(Am=1,Su.exports=Jv()),Su.exports}var Mu={exports:{}},ce={};var Om;function Pv(){if(Om)return ce;Om=1;var s=tf();function e(d){var m="https://react.dev/errors/"+d;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(d,m,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:d,containerInfo:m,implementation:p}}var u=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,m){if(d==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return ce.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,ce.createPortal=function(d,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return c(d,m,null,p)},ce.flushSync=function(d){var m=u.T,p=a.p;try{if(u.T=null,a.p=2,d)return d()}finally{u.T=m,a.p=p,a.d.f()}},ce.preconnect=function(d,m){typeof d=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(d,m))},ce.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},ce.preinit=function(d,m){if(typeof d=="string"&&m&&typeof m.as=="string"){var p=m.as,b=f(p,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?a.d.S(d,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:S}):p==="script"&&a.d.X(d,{crossOrigin:b,integrity:v,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},ce.preinitModule=function(d,m){if(typeof d=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=f(m.as,m.crossOrigin);a.d.M(d,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(d)},ce.preload=function(d,m){if(typeof d=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,b=f(p,m.crossOrigin);a.d.L(d,p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},ce.preloadModule=function(d,m){if(typeof d=="string")if(m){var p=f(m.as,m.crossOrigin);a.d.m(d,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(d)},ce.requestFormReset=function(d){a.d.r(d)},ce.unstable_batchedUpdates=function(d,m){return d(m)},ce.useFormState=function(d,m,p){return u.H.useFormState(d,m,p)},ce.useFormStatus=function(){return u.H.useHostTransitionStatus()},ce.version="19.2.4",ce}var Cm;function $v(){if(Cm)return Mu.exports;Cm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),Mu.exports=Pv(),Mu.exports}var Dm;function tx(){if(Dm)return za;Dm=1;var s=Iv(),e=tf(),i=$v();function a(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var n=t,l=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(l=n.return),t=n.return;while(t)}return n.tag===3?l:null}function u(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function d(t){if(c(t)!==t)throw Error(a(188))}function m(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(a(188));return n!==t?null:t}for(var l=t,r=n;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(r=h.return,r!==null){l=r;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return d(h),t;if(g===r)return d(h),n;g=g.sibling}throw Error(a(188))}if(l.return!==r.return)l=h,r=g;else{for(var y=!1,x=h.child;x;){if(x===l){y=!0,l=h,r=g;break}if(x===r){y=!0,r=h,l=g;break}x=x.sibling}if(!y){for(x=g.child;x;){if(x===l){y=!0,l=g,r=h;break}if(x===r){y=!0,r=g,l=h;break}x=x.sibling}if(!y)throw Error(a(189))}}if(l.alternate!==r)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?t:n}function p(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=p(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),q=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),tt=Symbol.for("react.activity"),rt=Symbol.for("react.memo_cache_sentinel"),it=Symbol.iterator;function st(t){return t===null||typeof t!="object"?null:(t=it&&t[it]||t["@@iterator"],typeof t=="function"?t:null)}var Nt=Symbol.for("react.client.reference");function Vt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Nt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case M:return"Fragment";case D:return"Profiler";case A:return"StrictMode";case Y:return"Suspense";case K:return"SuspenseList";case tt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case T:return"Portal";case q:return t.displayName||"Context";case L:return(t._context.displayName||"Context")+".Consumer";case G:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case X:return n=t.displayName||null,n!==null?n:Vt(t.type)||"Memo";case Z:n=t._payload,t=t._init;try{return Vt(t(n))}catch{}}return null}var dt=Array.isArray,k=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},lt=[],_t=-1;function C(t){return{current:t}}function U(t){0>_t||(t.current=lt[_t],lt[_t]=null,_t--)}function F(t,n){_t++,lt[_t]=t.current,t.current=n}var J=C(null),at=C(null),ot=C(null),Et=C(null);function de(t,n){switch(F(ot,n),F(at,t),F(J,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Gg(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Gg(n),t=Qg(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}U(J),F(J,t)}function Qt(){U(J),U(at),U(ot)}function Ls(t){t.memoizedState!==null&&F(Et,t);var n=J.current,l=Qg(n,t.type);n!==l&&(F(at,t),F(J,l))}function el(t){at.current===t&&(U(J),U(at)),Et.current===t&&(U(Et),Ea._currentValue=$)}var er,xf;function gi(t){if(er===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);er=n&&n[1]||"",xf=-1<l.stack.indexOf(`
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();var vu={exports:{}},Da={};var Sm;function Iv(){if(Sm)return Da;Sm=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:s,type:a,key:u,ref:o!==void 0?o:null,props:c}}return Da.Fragment=e,Da.jsx=i,Da.jsxs=i,Da}var Tm;function Pv(){return Tm||(Tm=1,vu.exports=Iv()),vu.exports}var x=Pv(),xu={exports:{}},ct={};var Mm;function $v(){if(Mm)return ct;Mm=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function S(C){return C===null||typeof C!="object"?null:(C=v&&C[v]||C["@@iterator"],typeof C=="function"?C:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function D(C,U,K){this.props=C,this.context=U,this.refs=A,this.updater=K||T}D.prototype.isReactComponent={},D.prototype.setState=function(C,U){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,U,"setState")},D.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function L(){}L.prototype=D.prototype;function q(C,U,K){this.props=C,this.context=U,this.refs=A,this.updater=K||T}var G=q.prototype=new L;G.constructor=q,M(G,D.prototype),G.isPureReactComponent=!0;var Y=Array.isArray;function W(){}var X={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function tt(C,U,K){var J=K.ref;return{$$typeof:s,type:C,key:U,ref:J!==void 0?J:null,props:K}}function rt(C,U){return tt(C.type,U,C.props)}function it(C){return typeof C=="object"&&C!==null&&C.$$typeof===s}function st(C){var U={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(K){return U[K]})}var kt=/\/+/g;function Vt(C,U){return typeof C=="object"&&C!==null&&C.key!=null?st(""+C.key):U.toString(36)}function dt(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(W,W):(C.status="pending",C.then(function(U){C.status==="pending"&&(C.status="fulfilled",C.value=U)},function(U){C.status==="pending"&&(C.status="rejected",C.reason=U)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function N(C,U,K,J,at){var ot=typeof C;(ot==="undefined"||ot==="boolean")&&(C=null);var Et=!1;if(C===null)Et=!0;else switch(ot){case"bigint":case"string":case"number":Et=!0;break;case"object":switch(C.$$typeof){case s:case e:Et=!0;break;case p:return Et=C._init,N(Et(C._payload),U,K,J,at)}}if(Et)return at=at(C),Et=J===""?"."+Vt(C,0):J,Y(at)?(K="",Et!=null&&(K=Et.replace(kt,"$&/")+"/"),N(at,U,K,"",function(Ls){return Ls})):at!=null&&(it(at)&&(at=rt(at,K+(at.key==null||C&&C.key===at.key?"":(""+at.key).replace(kt,"$&/")+"/")+Et)),U.push(at)),1;Et=0;var de=J===""?".":J+":";if(Y(C))for(var Qt=0;Qt<C.length;Qt++)J=C[Qt],ot=de+Vt(J,Qt),Et+=N(J,U,K,ot,at);else if(Qt=S(C),typeof Qt=="function")for(C=Qt.call(C),Qt=0;!(J=C.next()).done;)J=J.value,ot=de+Vt(J,Qt++),Et+=N(J,U,K,ot,at);else if(ot==="object"){if(typeof C.then=="function")return N(dt(C),U,K,J,at);throw U=String(C),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Et}function Q(C,U,K){if(C==null)return C;var J=[],at=0;return N(C,J,"","",function(ot){return U.call(K,ot,at++)}),J}function $(C){if(C._status===-1){var U=C._result;U=U(),U.then(function(K){(C._status===0||C._status===-1)&&(C._status=1,C._result=K)},function(K){(C._status===0||C._status===-1)&&(C._status=2,C._result=K)}),C._status===-1&&(C._status=0,C._result=U)}if(C._status===1)return C._result.default;throw C._result}var lt=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},_t={map:Q,forEach:function(C,U,K){Q(C,function(){U.apply(this,arguments)},K)},count:function(C){var U=0;return Q(C,function(){U++}),U},toArray:function(C){return Q(C,function(U){return U})||[]},only:function(C){if(!it(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ct.Activity=b,ct.Children=_t,ct.Component=D,ct.Fragment=i,ct.Profiler=o,ct.PureComponent=q,ct.StrictMode=a,ct.Suspense=d,ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ct.__COMPILER_RUNTIME={__proto__:null,c:function(C){return X.H.useMemoCache(C)}},ct.cache=function(C){return function(){return C.apply(null,arguments)}},ct.cacheSignal=function(){return null},ct.cloneElement=function(C,U,K){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var J=M({},C.props),at=C.key;if(U!=null)for(ot in U.key!==void 0&&(at=""+U.key),U)!F.call(U,ot)||ot==="key"||ot==="__self"||ot==="__source"||ot==="ref"&&U.ref===void 0||(J[ot]=U[ot]);var ot=arguments.length-2;if(ot===1)J.children=K;else if(1<ot){for(var Et=Array(ot),de=0;de<ot;de++)Et[de]=arguments[de+2];J.children=Et}return tt(C.type,at,J)},ct.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},ct.createElement=function(C,U,K){var J,at={},ot=null;if(U!=null)for(J in U.key!==void 0&&(ot=""+U.key),U)F.call(U,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(at[J]=U[J]);var Et=arguments.length-2;if(Et===1)at.children=K;else if(1<Et){for(var de=Array(Et),Qt=0;Qt<Et;Qt++)de[Qt]=arguments[Qt+2];at.children=de}if(C&&C.defaultProps)for(J in Et=C.defaultProps,Et)at[J]===void 0&&(at[J]=Et[J]);return tt(C,ot,at)},ct.createRef=function(){return{current:null}},ct.forwardRef=function(C){return{$$typeof:f,render:C}},ct.isValidElement=it,ct.lazy=function(C){return{$$typeof:p,_payload:{_status:-1,_result:C},_init:$}},ct.memo=function(C,U){return{$$typeof:m,type:C,compare:U===void 0?null:U}},ct.startTransition=function(C){var U=X.T,K={};X.T=K;try{var J=C(),at=X.S;at!==null&&at(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(W,lt)}catch(ot){lt(ot)}finally{U!==null&&K.types!==null&&(U.types=K.types),X.T=U}},ct.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ct.use=function(C){return X.H.use(C)},ct.useActionState=function(C,U,K){return X.H.useActionState(C,U,K)},ct.useCallback=function(C,U){return X.H.useCallback(C,U)},ct.useContext=function(C){return X.H.useContext(C)},ct.useDebugValue=function(){},ct.useDeferredValue=function(C,U){return X.H.useDeferredValue(C,U)},ct.useEffect=function(C,U){return X.H.useEffect(C,U)},ct.useEffectEvent=function(C){return X.H.useEffectEvent(C)},ct.useId=function(){return X.H.useId()},ct.useImperativeHandle=function(C,U,K){return X.H.useImperativeHandle(C,U,K)},ct.useInsertionEffect=function(C,U){return X.H.useInsertionEffect(C,U)},ct.useLayoutEffect=function(C,U){return X.H.useLayoutEffect(C,U)},ct.useMemo=function(C,U){return X.H.useMemo(C,U)},ct.useOptimistic=function(C,U){return X.H.useOptimistic(C,U)},ct.useReducer=function(C,U,K){return X.H.useReducer(C,U,K)},ct.useRef=function(C){return X.H.useRef(C)},ct.useState=function(C){return X.H.useState(C)},ct.useSyncExternalStore=function(C,U,K){return X.H.useSyncExternalStore(C,U,K)},ct.useTransition=function(){return X.H.useTransition()},ct.version="19.2.4",ct}var Em;function ef(){return Em||(Em=1,xu.exports=$v()),xu.exports}var Z=ef(),_u={exports:{}},za={},Su={exports:{}},Tu={};var Am;function tx(){return Am||(Am=1,(function(s){function e(N,Q){var $=N.length;N.push(Q);t:for(;0<$;){var lt=$-1>>>1,_t=N[lt];if(0<o(_t,Q))N[lt]=Q,N[$]=_t,$=lt;else break t}}function i(N){return N.length===0?null:N[0]}function a(N){if(N.length===0)return null;var Q=N[0],$=N.pop();if($!==Q){N[0]=$;t:for(var lt=0,_t=N.length,C=_t>>>1;lt<C;){var U=2*(lt+1)-1,K=N[U],J=U+1,at=N[J];if(0>o(K,$))J<_t&&0>o(at,K)?(N[lt]=at,N[J]=$,lt=J):(N[lt]=K,N[U]=$,lt=U);else if(J<_t&&0>o(at,$))N[lt]=at,N[J]=$,lt=J;else break t}}return Q}function o(N,Q){var $=N.sortIndex-Q.sortIndex;return $!==0?$:N.id-Q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;s.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();s.unstable_now=function(){return u.now()-f}}var d=[],m=[],p=1,b=null,v=3,S=!1,T=!1,M=!1,A=!1,D=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function G(N){for(var Q=i(m);Q!==null;){if(Q.callback===null)a(m);else if(Q.startTime<=N)a(m),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=i(m)}}function Y(N){if(M=!1,G(N),!T)if(i(d)!==null)T=!0,W||(W=!0,st());else{var Q=i(m);Q!==null&&dt(Y,Q.startTime-N)}}var W=!1,X=-1,F=5,tt=-1;function rt(){return A?!0:!(s.unstable_now()-tt<F)}function it(){if(A=!1,W){var N=s.unstable_now();tt=N;var Q=!0;try{t:{T=!1,M&&(M=!1,L(X),X=-1),S=!0;var $=v;try{e:{for(G(N),b=i(d);b!==null&&!(b.expirationTime>N&&rt());){var lt=b.callback;if(typeof lt=="function"){b.callback=null,v=b.priorityLevel;var _t=lt(b.expirationTime<=N);if(N=s.unstable_now(),typeof _t=="function"){b.callback=_t,G(N),Q=!0;break e}b===i(d)&&a(d),G(N)}else a(d);b=i(d)}if(b!==null)Q=!0;else{var C=i(m);C!==null&&dt(Y,C.startTime-N),Q=!1}}break t}finally{b=null,v=$,S=!1}Q=void 0}}finally{Q?st():W=!1}}}var st;if(typeof q=="function")st=function(){q(it)};else if(typeof MessageChannel<"u"){var kt=new MessageChannel,Vt=kt.port2;kt.port1.onmessage=it,st=function(){Vt.postMessage(null)}}else st=function(){D(it,0)};function dt(N,Q){X=D(function(){N(s.unstable_now())},Q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(N){N.callback=null},s.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<N?Math.floor(1e3/N):5},s.unstable_getCurrentPriorityLevel=function(){return v},s.unstable_next=function(N){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var $=v;v=Q;try{return N()}finally{v=$}},s.unstable_requestPaint=function(){A=!0},s.unstable_runWithPriority=function(N,Q){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var $=v;v=N;try{return Q()}finally{v=$}},s.unstable_scheduleCallback=function(N,Q,$){var lt=s.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?lt+$:lt):$=lt,N){case 1:var _t=-1;break;case 2:_t=250;break;case 5:_t=1073741823;break;case 4:_t=1e4;break;default:_t=5e3}return _t=$+_t,N={id:p++,callback:Q,priorityLevel:N,startTime:$,expirationTime:_t,sortIndex:-1},$>lt?(N.sortIndex=$,e(m,N),i(d)===null&&N===i(m)&&(M?(L(X),X=-1):M=!0,dt(Y,$-lt))):(N.sortIndex=_t,e(d,N),T||S||(T=!0,W||(W=!0,st()))),N},s.unstable_shouldYield=rt,s.unstable_wrapCallback=function(N){var Q=v;return function(){var $=v;v=Q;try{return N.apply(this,arguments)}finally{v=$}}}})(Tu)),Tu}var Om;function ex(){return Om||(Om=1,Su.exports=tx()),Su.exports}var Mu={exports:{}},ce={};var Cm;function nx(){if(Cm)return ce;Cm=1;var s=ef();function e(d){var m="https://react.dev/errors/"+d;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(d,m,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:d,containerInfo:m,implementation:p}}var u=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,m){if(d==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return ce.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,ce.createPortal=function(d,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return c(d,m,null,p)},ce.flushSync=function(d){var m=u.T,p=a.p;try{if(u.T=null,a.p=2,d)return d()}finally{u.T=m,a.p=p,a.d.f()}},ce.preconnect=function(d,m){typeof d=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(d,m))},ce.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},ce.preinit=function(d,m){if(typeof d=="string"&&m&&typeof m.as=="string"){var p=m.as,b=f(p,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?a.d.S(d,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:S}):p==="script"&&a.d.X(d,{crossOrigin:b,integrity:v,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},ce.preinitModule=function(d,m){if(typeof d=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=f(m.as,m.crossOrigin);a.d.M(d,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(d)},ce.preload=function(d,m){if(typeof d=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,b=f(p,m.crossOrigin);a.d.L(d,p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},ce.preloadModule=function(d,m){if(typeof d=="string")if(m){var p=f(m.as,m.crossOrigin);a.d.m(d,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(d)},ce.requestFormReset=function(d){a.d.r(d)},ce.unstable_batchedUpdates=function(d,m){return d(m)},ce.useFormState=function(d,m,p){return u.H.useFormState(d,m,p)},ce.useFormStatus=function(){return u.H.useHostTransitionStatus()},ce.version="19.2.4",ce}var Dm;function ix(){if(Dm)return Mu.exports;Dm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),Mu.exports=nx(),Mu.exports}var zm;function sx(){if(zm)return za;zm=1;var s=ex(),e=ef(),i=ix();function a(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var n=t,l=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(l=n.return),t=n.return;while(t)}return n.tag===3?l:null}function u(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function d(t){if(c(t)!==t)throw Error(a(188))}function m(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(a(188));return n!==t?null:t}for(var l=t,r=n;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(r=h.return,r!==null){l=r;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return d(h),t;if(g===r)return d(h),n;g=g.sibling}throw Error(a(188))}if(l.return!==r.return)l=h,r=g;else{for(var y=!1,_=h.child;_;){if(_===l){y=!0,l=h,r=g;break}if(_===r){y=!0,r=h,l=g;break}_=_.sibling}if(!y){for(_=g.child;_;){if(_===l){y=!0,l=g,r=h;break}if(_===r){y=!0,r=g,l=h;break}_=_.sibling}if(!y)throw Error(a(189))}}if(l.alternate!==r)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?t:n}function p(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=p(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),q=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),tt=Symbol.for("react.activity"),rt=Symbol.for("react.memo_cache_sentinel"),it=Symbol.iterator;function st(t){return t===null||typeof t!="object"?null:(t=it&&t[it]||t["@@iterator"],typeof t=="function"?t:null)}var kt=Symbol.for("react.client.reference");function Vt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===kt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case M:return"Fragment";case D:return"Profiler";case A:return"StrictMode";case Y:return"Suspense";case W:return"SuspenseList";case tt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case T:return"Portal";case q:return t.displayName||"Context";case L:return(t._context.displayName||"Context")+".Consumer";case G:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case X:return n=t.displayName||null,n!==null?n:Vt(t.type)||"Memo";case F:n=t._payload,t=t._init;try{return Vt(t(n))}catch{}}return null}var dt=Array.isArray,N=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},lt=[],_t=-1;function C(t){return{current:t}}function U(t){0>_t||(t.current=lt[_t],lt[_t]=null,_t--)}function K(t,n){_t++,lt[_t]=t.current,t.current=n}var J=C(null),at=C(null),ot=C(null),Et=C(null);function de(t,n){switch(K(ot,n),K(at,t),K(J,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Qg(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Qg(n),t=Zg(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}U(J),K(J,t)}function Qt(){U(J),U(at),U(ot)}function Ls(t){t.memoizedState!==null&&K(Et,t);var n=J.current,l=Zg(n,t.type);n!==l&&(K(at,t),K(J,l))}function el(t){at.current===t&&(U(J),U(at)),Et.current===t&&(U(Et),Ea._currentValue=$)}var er,_f;function mi(t){if(er===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);er=n&&n[1]||"",_f=-1<l.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+er+t+
|
|
4
|
-
`),j=
|
|
3
|
+
`+er+t+_f}var nr=!1;function ir(t,n){if(!t||nr)return"";nr=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(n){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(k){var R=k}Reflect.construct(t,[],V)}else{try{V.call()}catch(k){R=k}t.call(V.prototype)}}else{try{throw Error()}catch(k){R=k}(V=t())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(k){if(k&&R&&typeof k.stack=="string")return[k.stack,R.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=r.DetermineComponentFrameRoot(),y=g[0],_=g[1];if(y&&_){var E=y.split(`
|
|
4
|
+
`),j=_.split(`
|
|
5
5
|
`);for(h=r=0;r<E.length&&!E[r].includes("DetermineComponentFrameRoot");)r++;for(;h<j.length&&!j[h].includes("DetermineComponentFrameRoot");)h++;if(r===E.length||h===j.length)for(r=E.length-1,h=j.length-1;1<=r&&0<=h&&E[r]!==j[h];)h--;for(;1<=r&&0<=h;r--,h--)if(E[r]!==j[h]){if(r!==1||h!==1)do if(r--,h--,0>h||E[r]!==j[h]){var H=`
|
|
6
|
-
`+E[r].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),H}while(1<=r&&0<=h);break}}}finally{nr=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?
|
|
6
|
+
`+E[r].replace(" at new "," at ");return t.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",t.displayName)),H}while(1<=r&&0<=h);break}}}finally{nr=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?mi(l):""}function Cy(t,n){switch(t.tag){case 26:case 27:case 5:return mi(t.type);case 16:return mi("Lazy");case 13:return t.child!==n&&n!==null?mi("Suspense Fallback"):mi("Suspense");case 19:return mi("SuspenseList");case 0:case 15:return ir(t.type,!1);case 11:return ir(t.type.render,!1);case 1:return ir(t.type,!0);case 31:return mi("Activity");default:return""}}function Sf(t){try{var n="",l=null;do n+=Cy(t,l),l=t,t=t.return;while(t);return n}catch(r){return`
|
|
7
7
|
Error generating stack: `+r.message+`
|
|
8
|
-
`+r.stack}}var sr=Object.prototype.hasOwnProperty,ar=s.unstable_scheduleCallback,lr=s.unstable_cancelCallback,Ey=s.unstable_shouldYield,Ay=s.unstable_requestPaint,Ee=s.unstable_now,Oy=s.unstable_getCurrentPriorityLevel,Sf=s.unstable_ImmediatePriority,Tf=s.unstable_UserBlockingPriority,nl=s.unstable_NormalPriority,Cy=s.unstable_LowPriority,Mf=s.unstable_IdlePriority,Dy=s.log,zy=s.unstable_setDisableYieldValue,Hs=null,Ae=null;function Ln(t){if(typeof Dy=="function"&&zy(t),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(Hs,t)}catch{}}var Oe=Math.clz32?Math.clz32:Ry,wy=Math.log,jy=Math.LN2;function Ry(t){return t>>>=0,t===0?32:31-(wy(t)/jy|0)|0}var il=256,sl=262144,al=4194304;function mi(t){var n=t&42;if(n!==0)return n;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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;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 ll(t,n,l){var r=t.pendingLanes;if(r===0)return 0;var h=0,g=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var x=r&134217727;return x!==0?(r=x&~g,r!==0?h=mi(r):(y&=x,y!==0?h=mi(y):l||(l=x&~t,l!==0&&(h=mi(l))))):(x=r&~g,x!==0?h=mi(x):y!==0?h=mi(y):l||(l=r&~t,l!==0&&(h=mi(l)))),h===0?0:n!==0&&n!==h&&(n&g)===0&&(g=h&-h,l=n&-n,g>=l||g===32&&(l&4194048)!==0)?n:h}function Bs(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function ky(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32: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 n+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 Ef(){var t=al;return al<<=1,(al&62914560)===0&&(al=4194304),t}function or(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function Us(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ny(t,n,l,r,h,g){var y=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var x=t.entanglements,E=t.expirationTimes,j=t.hiddenUpdates;for(l=y&~l;0<l;){var H=31-Oe(l),V=1<<H;x[H]=0,E[H]=-1;var R=j[H];if(R!==null)for(j[H]=null,H=0;H<R.length;H++){var N=R[H];N!==null&&(N.lane&=-536870913)}l&=~V}r!==0&&Af(t,r,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(y&~n))}function Af(t,n,l){t.pendingLanes|=n,t.suspendedLanes&=~n;var r=31-Oe(n);t.entangledLanes|=n,t.entanglements[r]=t.entanglements[r]|1073741824|l&261930}function Of(t,n){var l=t.entangledLanes|=n;for(t=t.entanglements;l;){var r=31-Oe(l),h=1<<r;h&n|t[r]&n&&(t[r]|=n),l&=~h}}function Cf(t,n){var l=n&-n;return l=(l&42)!==0?1:rr(l),(l&(t.suspendedLanes|n))!==0?0:l}function rr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function cr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Df(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:gm(t.type))}function zf(t,n){var l=Q.p;try{return Q.p=t,n()}finally{Q.p=l}}var Hn=Math.random().toString(36).slice(2),ie="__reactFiber$"+Hn,me="__reactProps$"+Hn,Gi="__reactContainer$"+Hn,ur="__reactEvents$"+Hn,Ly="__reactListeners$"+Hn,Hy="__reactHandles$"+Hn,wf="__reactResources$"+Hn,Vs="__reactMarker$"+Hn;function fr(t){delete t[ie],delete t[me],delete t[ur],delete t[Ly],delete t[Hy]}function Qi(t){var n=t[ie];if(n)return n;for(var l=t.parentNode;l;){if(n=l[Gi]||l[ie]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=Pg(t);t!==null;){if(l=t[ie])return l;t=Pg(t)}return n}t=l,l=t.parentNode}return null}function Zi(t){if(t=t[ie]||t[Gi]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Ys(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(a(33))}function Fi(t){var n=t[wf];return n||(n=t[wf]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ee(t){t[Vs]=!0}var jf=new Set,Rf={};function pi(t,n){Ki(t,n),Ki(t+"Capture",n)}function Ki(t,n){for(Rf[t]=n,t=0;t<n.length;t++)jf.add(n[t])}var By=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]*$"),kf={},Nf={};function Uy(t){return sr.call(Nf,t)?!0:sr.call(kf,t)?!1:By.test(t)?Nf[t]=!0:(kf[t]=!0,!1)}function ol(t,n,l){if(Uy(n))if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var r=n.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+l)}}function rl(t,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+l)}}function cn(t,n,l,r){if(r===null)t.removeAttribute(l);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(n,l,""+r)}}function He(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Lf(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Vy(t,n,l){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var h=r.get,g=r.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(y){l=""+y,g.call(this,y)}}),Object.defineProperty(t,n,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function hr(t){if(!t._valueTracker){var n=Lf(t)?"checked":"value";t._valueTracker=Vy(t,n,""+t[n])}}function Hf(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),r="";return t&&(r=Lf(t)?t.checked?"true":"false":t.value),t=r,t!==l?(n.setValue(t),!0):!1}function cl(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 Yy=/[\n"\\]/g;function Be(t){return t.replace(Yy,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function dr(t,n,l,r,h,g,y,x){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),n!=null?y==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+He(n)):t.value!==""+He(n)&&(t.value=""+He(n)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),n!=null?gr(t,y,He(n)):l!=null?gr(t,y,He(l)):r!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.name=""+He(x):t.removeAttribute("name")}function Bf(t,n,l,r,h,g,y,x){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){hr(t);return}l=l!=null?""+He(l):"",n=n!=null?""+He(n):l,x||n===t.value||(t.value=n),t.defaultValue=n}r=r??h,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=x?t.checked:!!r,t.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),hr(t)}function gr(t,n,l){n==="number"&&cl(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Wi(t,n,l,r){if(t=t.options,n){n={};for(var h=0;h<l.length;h++)n["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=n.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&r&&(t[l].defaultSelected=!0)}else{for(l=""+He(l),n=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,r&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function Uf(t,n,l){if(n!=null&&(n=""+He(n),n!==t.value&&(t.value=n),l==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=l!=null?""+He(l):""}function Vf(t,n,l,r){if(n==null){if(r!=null){if(l!=null)throw Error(a(92));if(dt(r)){if(1<r.length)throw Error(a(93));r=r[0]}l=r}l==null&&(l=""),n=l}l=He(n),t.defaultValue=l,r=t.textContent,r===l&&r!==""&&r!==null&&(t.value=r),hr(t)}function Ji(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var qy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Yf(t,n,l){var r=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?r?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":r?t.setProperty(n,l):typeof l!="number"||l===0||qy.has(n)?n==="float"?t.cssFloat=l:t[n]=(""+l).trim():t[n]=l+"px"}function qf(t,n,l){if(n!=null&&typeof n!="object")throw Error(a(62));if(t=t.style,l!=null){for(var r in l)!l.hasOwnProperty(r)||n!=null&&n.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="");for(var h in n)r=n[h],n.hasOwnProperty(h)&&l[h]!==r&&Yf(t,h,r)}else for(var g in n)n.hasOwnProperty(g)&&Yf(t,g,n[g])}function mr(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Gy=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ul(t){return Gy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function un(){}var pr=null;function yr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ii=null,Pi=null;function Xf(t){var n=Zi(t);if(n&&(t=n.stateNode)){var l=t[me]||null;t:switch(t=n.stateNode,n.type){case"input":if(dr(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Be(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var r=l[n];if(r!==t&&r.form===t.form){var h=r[me]||null;if(!h)throw Error(a(90));dr(r,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<l.length;n++)r=l[n],r.form===t.form&&Hf(r)}break t;case"textarea":Uf(t,l.value,l.defaultValue);break t;case"select":n=l.value,n!=null&&Wi(t,!!l.multiple,n,!1)}}}var br=!1;function Gf(t,n,l){if(br)return t(n,l);br=!0;try{var r=t(n);return r}finally{if(br=!1,(Ii!==null||Pi!==null)&&(Il(),Ii&&(n=Ii,t=Pi,Pi=Ii=null,Xf(n),t)))for(n=0;n<t.length;n++)Xf(t[n])}}function qs(t,n){var l=t.stateNode;if(l===null)return null;var r=l[me]||null;if(r===null)return null;l=r[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vr=!1;if(fn)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){vr=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{vr=!1}var Bn=null,xr=null,fl=null;function Qf(){if(fl)return fl;var t,n=xr,l=n.length,r,h="value"in Bn?Bn.value:Bn.textContent,g=h.length;for(t=0;t<l&&n[t]===h[t];t++);var y=l-t;for(r=1;r<=y&&n[l-r]===h[g-r];r++);return fl=h.slice(t,1<r?1-r:void 0)}function hl(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function dl(){return!0}function Zf(){return!1}function pe(t){function n(l,r,h,g,y){this._reactName=l,this._targetInst=h,this.type=r,this.nativeEvent=g,this.target=y,this.currentTarget=null;for(var x in t)t.hasOwnProperty(x)&&(l=t[x],this[x]=l?l(g):g[x]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?dl:Zf,this.isPropagationStopped=Zf,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=dl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=dl)},persist:function(){},isPersistent:dl}),n}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gl=pe(yi),Gs=b({},yi,{view:0,detail:0}),Qy=pe(Gs),_r,Sr,Qs,ml=b({},Gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Qs&&(Qs&&t.type==="mousemove"?(_r=t.screenX-Qs.screenX,Sr=t.screenY-Qs.screenY):Sr=_r=0,Qs=t),_r)},movementY:function(t){return"movementY"in t?t.movementY:Sr}}),Ff=pe(ml),Zy=b({},ml,{dataTransfer:0}),Fy=pe(Zy),Ky=b({},Gs,{relatedTarget:0}),Tr=pe(Ky),Wy=b({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),Jy=pe(Wy),Iy=b({},yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Py=pe(Iy),$y=b({},yi,{data:0}),Kf=pe($y),tb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ib(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=nb[t])?!!n[t]:!1}function Mr(){return ib}var sb=b({},Gs,{key:function(t){if(t.key){var n=tb[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=hl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?eb[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mr,charCode:function(t){return t.type==="keypress"?hl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?hl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ab=pe(sb),lb=b({},ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wf=pe(lb),ob=b({},Gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mr}),rb=pe(ob),cb=b({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),ub=pe(cb),fb=b({},ml,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),hb=pe(fb),db=b({},yi,{newState:0,oldState:0}),gb=pe(db),mb=[9,13,27,32],Er=fn&&"CompositionEvent"in window,Zs=null;fn&&"documentMode"in document&&(Zs=document.documentMode);var pb=fn&&"TextEvent"in window&&!Zs,Jf=fn&&(!Er||Zs&&8<Zs&&11>=Zs),If=" ",Pf=!1;function $f(t,n){switch(t){case"keyup":return mb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function th(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var $i=!1;function yb(t,n){switch(t){case"compositionend":return th(n);case"keypress":return n.which!==32?null:(Pf=!0,If);case"textInput":return t=n.data,t===If&&Pf?null:t;default:return null}}function bb(t,n){if($i)return t==="compositionend"||!Er&&$f(t,n)?(t=Qf(),fl=xr=Bn=null,$i=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Jf&&n.locale!=="ko"?null:n.data;default:return null}}var vb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function eh(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!vb[t.type]:n==="textarea"}function nh(t,n,l,r){Ii?Pi?Pi.push(r):Pi=[r]:Ii=r,n=so(n,"onChange"),0<n.length&&(l=new gl("onChange","change",null,l,r),t.push({event:l,listeners:n}))}var Fs=null,Ks=null;function xb(t){Bg(t,0)}function pl(t){var n=Ys(t);if(Hf(n))return t}function ih(t,n){if(t==="change")return n}var sh=!1;if(fn){var Ar;if(fn){var Or="oninput"in document;if(!Or){var ah=document.createElement("div");ah.setAttribute("oninput","return;"),Or=typeof ah.oninput=="function"}Ar=Or}else Ar=!1;sh=Ar&&(!document.documentMode||9<document.documentMode)}function lh(){Fs&&(Fs.detachEvent("onpropertychange",oh),Ks=Fs=null)}function oh(t){if(t.propertyName==="value"&&pl(Ks)){var n=[];nh(n,Ks,t,yr(t)),Gf(xb,n)}}function _b(t,n,l){t==="focusin"?(lh(),Fs=n,Ks=l,Fs.attachEvent("onpropertychange",oh)):t==="focusout"&&lh()}function Sb(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return pl(Ks)}function Tb(t,n){if(t==="click")return pl(n)}function Mb(t,n){if(t==="input"||t==="change")return pl(n)}function Eb(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Ce=typeof Object.is=="function"?Object.is:Eb;function Ws(t,n){if(Ce(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var l=Object.keys(t),r=Object.keys(n);if(l.length!==r.length)return!1;for(r=0;r<l.length;r++){var h=l[r];if(!sr.call(n,h)||!Ce(t[h],n[h]))return!1}return!0}function rh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ch(t,n){var l=rh(t);t=0;for(var r;l;){if(l.nodeType===3){if(r=t+l.textContent.length,t<=n&&r>=n)return{node:l,offset:n-t};t=r}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=rh(l)}}function uh(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?uh(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function fh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=cl(t.document);n instanceof t.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)t=n.contentWindow;else break;n=cl(t.document)}return n}function Cr(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var Ab=fn&&"documentMode"in document&&11>=document.documentMode,ts=null,Dr=null,Js=null,zr=!1;function hh(t,n,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;zr||ts==null||ts!==cl(r)||(r=ts,"selectionStart"in r&&Cr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Js&&Ws(Js,r)||(Js=r,r=so(Dr,"onSelect"),0<r.length&&(n=new gl("onSelect","select",null,n,l),t.push({event:n,listeners:r}),n.target=ts)))}function bi(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var es={animationend:bi("Animation","AnimationEnd"),animationiteration:bi("Animation","AnimationIteration"),animationstart:bi("Animation","AnimationStart"),transitionrun:bi("Transition","TransitionRun"),transitionstart:bi("Transition","TransitionStart"),transitioncancel:bi("Transition","TransitionCancel"),transitionend:bi("Transition","TransitionEnd")},wr={},dh={};fn&&(dh=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function vi(t){if(wr[t])return wr[t];if(!es[t])return t;var n=es[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in dh)return wr[t]=n[l];return t}var gh=vi("animationend"),mh=vi("animationiteration"),ph=vi("animationstart"),Ob=vi("transitionrun"),Cb=vi("transitionstart"),Db=vi("transitioncancel"),yh=vi("transitionend"),bh=new Map,jr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");jr.push("scrollEnd");function We(t,n){bh.set(t,n),pi(n,[t])}var yl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ue=[],ns=0,Rr=0;function bl(){for(var t=ns,n=Rr=ns=0;n<t;){var l=Ue[n];Ue[n++]=null;var r=Ue[n];Ue[n++]=null;var h=Ue[n];Ue[n++]=null;var g=Ue[n];if(Ue[n++]=null,r!==null&&h!==null){var y=r.pending;y===null?h.next=h:(h.next=y.next,y.next=h),r.pending=h}g!==0&&vh(l,h,g)}}function vl(t,n,l,r){Ue[ns++]=t,Ue[ns++]=n,Ue[ns++]=l,Ue[ns++]=r,Rr|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function kr(t,n,l,r){return vl(t,n,l,r),xl(t)}function xi(t,n){return vl(t,null,null,n),xl(t)}function vh(t,n,l){t.lanes|=l;var r=t.alternate;r!==null&&(r.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,r=g.alternate,r!==null&&(r.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&n!==null&&(h=31-Oe(l),t=g.hiddenUpdates,r=t[h],r===null?t[h]=[n]:r.push(n),n.lane=l|536870912),g):null}function xl(t){if(50<ba)throw ba=0,Xc=null,Error(a(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var is={};function zb(t,n,l,r){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function De(t,n,l,r){return new zb(t,n,l,r)}function Nr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hn(t,n){var l=t.alternate;return l===null?(l=De(t.tag,n,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=n,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,n=t.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function xh(t,n){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,n=l.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function _l(t,n,l,r,h,g){var y=0;if(r=t,typeof t=="function")Nr(t)&&(y=1);else if(typeof t=="string")y=Nv(t,l,J.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case tt:return t=De(31,l,n,h),t.elementType=tt,t.lanes=g,t;case M:return _i(l.children,h,g,n);case A:y=8,h|=24;break;case D:return t=De(12,l,n,h|2),t.elementType=D,t.lanes=g,t;case Y:return t=De(13,l,n,h),t.elementType=Y,t.lanes=g,t;case K:return t=De(19,l,n,h),t.elementType=K,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case q:y=10;break t;case L:y=9;break t;case G:y=11;break t;case X:y=14;break t;case Z:y=16,r=null;break t}y=29,l=Error(a(130,t===null?"null":typeof t,"")),r=null}return n=De(y,l,n,h),n.elementType=t,n.type=r,n.lanes=g,n}function _i(t,n,l,r){return t=De(7,t,r,n),t.lanes=l,t}function Lr(t,n,l){return t=De(6,t,null,n),t.lanes=l,t}function _h(t){var n=De(18,null,null,0);return n.stateNode=t,n}function Hr(t,n,l){return n=De(4,t.children!==null?t.children:[],t.key,n),n.lanes=l,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Sh=new WeakMap;function Ve(t,n){if(typeof t=="object"&&t!==null){var l=Sh.get(t);return l!==void 0?l:(n={value:t,source:n,stack:_f(n)},Sh.set(t,n),n)}return{value:t,source:n,stack:_f(n)}}var ss=[],as=0,Sl=null,Is=0,Ye=[],qe=0,Un=null,$e=1,tn="";function dn(t,n){ss[as++]=Is,ss[as++]=Sl,Sl=t,Is=n}function Th(t,n,l){Ye[qe++]=$e,Ye[qe++]=tn,Ye[qe++]=Un,Un=t;var r=$e;t=tn;var h=32-Oe(r)-1;r&=~(1<<h),l+=1;var g=32-Oe(n)+h;if(30<g){var y=h-h%5;g=(r&(1<<y)-1).toString(32),r>>=y,h-=y,$e=1<<32-Oe(n)+h|l<<h|r,tn=g+t}else $e=1<<g|l<<h|r,tn=t}function Br(t){t.return!==null&&(dn(t,1),Th(t,1,0))}function Ur(t){for(;t===Sl;)Sl=ss[--as],ss[as]=null,Is=ss[--as],ss[as]=null;for(;t===Un;)Un=Ye[--qe],Ye[qe]=null,tn=Ye[--qe],Ye[qe]=null,$e=Ye[--qe],Ye[qe]=null}function Mh(t,n){Ye[qe++]=$e,Ye[qe++]=tn,Ye[qe++]=Un,$e=n.id,tn=n.overflow,Un=t}var se=null,Lt=null,vt=!1,Vn=null,Xe=!1,Vr=Error(a(519));function Yn(t){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ps(Ve(n,t)),Vr}function Eh(t){var n=t.stateNode,l=t.type,r=t.memoizedProps;switch(n[ie]=t,n[me]=r,l){case"dialog":mt("cancel",n),mt("close",n);break;case"iframe":case"object":case"embed":mt("load",n);break;case"video":case"audio":for(l=0;l<xa.length;l++)mt(xa[l],n);break;case"source":mt("error",n);break;case"img":case"image":case"link":mt("error",n),mt("load",n);break;case"details":mt("toggle",n);break;case"input":mt("invalid",n),Bf(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":mt("invalid",n);break;case"textarea":mt("invalid",n),Vf(n,r.value,r.defaultValue,r.children)}l=r.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||r.suppressHydrationWarning===!0||qg(n.textContent,l)?(r.popover!=null&&(mt("beforetoggle",n),mt("toggle",n)),r.onScroll!=null&&mt("scroll",n),r.onScrollEnd!=null&&mt("scrollend",n),r.onClick!=null&&(n.onclick=un),n=!0):n=!1,n||Yn(t,!0)}function Ah(t){for(se=t.return;se;)switch(se.tag){case 5:case 31:case 13:Xe=!1;return;case 27:case 3:Xe=!0;return;default:se=se.return}}function ls(t){if(t!==se)return!1;if(!vt)return Ah(t),vt=!0,!1;var n=t.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||su(t.type,t.memoizedProps)),l=!l),l&&Lt&&Yn(t),Ah(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Lt=Ig(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Lt=Ig(t)}else n===27?(n=Lt,ei(t.type)?(t=cu,cu=null,Lt=t):Lt=n):Lt=se?Qe(t.stateNode.nextSibling):null;return!0}function Si(){Lt=se=null,vt=!1}function Yr(){var t=Vn;return t!==null&&(xe===null?xe=t:xe.push.apply(xe,t),Vn=null),t}function Ps(t){Vn===null?Vn=[t]:Vn.push(t)}var qr=C(null),Ti=null,gn=null;function qn(t,n,l){F(qr,n._currentValue),n._currentValue=l}function mn(t){t._currentValue=qr.current,U(qr)}function Xr(t,n,l){for(;t!==null;){var r=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),t===l)break;t=t.return}}function Gr(t,n,l,r){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var y=h.child;g=g.firstContext;t:for(;g!==null;){var x=g;g=h;for(var E=0;E<n.length;E++)if(x.context===n[E]){g.lanes|=l,x=g.alternate,x!==null&&(x.lanes|=l),Xr(g.return,l,t),r||(y=null);break t}g=x.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(a(341));y.lanes|=l,g=y.alternate,g!==null&&(g.lanes|=l),Xr(y,l,t),y=null}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===t){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}}function os(t,n,l,r){t=null;for(var h=n,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var y=h.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var x=h.type;Ce(h.pendingProps.value,y.value)||(t!==null?t.push(x):t=[x])}}else if(h===Et.current){if(y=h.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Ea):t=[Ea])}h=h.return}t!==null&&Gr(n,t,l,r),n.flags|=262144}function Tl(t){for(t=t.firstContext;t!==null;){if(!Ce(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Mi(t){Ti=t,gn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ae(t){return Oh(Ti,t)}function Ml(t,n){return Ti===null&&Mi(t),Oh(t,n)}function Oh(t,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},gn===null){if(t===null)throw Error(a(308));gn=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else gn=gn.next=n;return l}var wb=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(l,r){t.push(r)}};this.abort=function(){n.aborted=!0,t.forEach(function(l){return l()})}},jb=s.unstable_scheduleCallback,Rb=s.unstable_NormalPriority,Wt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qr(){return{controller:new wb,data:new Map,refCount:0}}function $s(t){t.refCount--,t.refCount===0&&jb(Rb,function(){t.controller.abort()})}var ta=null,Zr=0,rs=0,cs=null;function kb(t,n){if(ta===null){var l=ta=[];Zr=0,rs=Wc(),cs={status:"pending",value:void 0,then:function(r){l.push(r)}}}return Zr++,n.then(Ch,Ch),n}function Ch(){if(--Zr===0&&ta!==null){cs!==null&&(cs.status="fulfilled");var t=ta;ta=null,rs=0,cs=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Nb(t,n){var l=[],r={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){r.status="fulfilled",r.value=n;for(var h=0;h<l.length;h++)(0,l[h])(n)},function(h){for(r.status="rejected",r.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),r}var Dh=k.S;k.S=function(t,n){hg=Ee(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&kb(t,n),Dh!==null&&Dh(t,n)};var Ei=C(null);function Fr(){var t=Ei.current;return t!==null?t:Rt.pooledCache}function El(t,n){n===null?F(Ei,Ei.current):F(Ei,n.pool)}function zh(){var t=Fr();return t===null?null:{parent:Wt._currentValue,pool:t}}var us=Error(a(460)),Kr=Error(a(474)),Al=Error(a(542)),Ol={then:function(){}};function wh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function jh(t,n,l){switch(l=t[l],l===void 0?t.push(n):l!==n&&(n.then(un,un),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,kh(t),t;default:if(typeof n.status=="string")n.then(un,un);else{if(t=Rt,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=n,t.status="pending",t.then(function(r){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=r}},function(r){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=r}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,kh(t),t}throw Oi=n,us}}function Ai(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Oi=l,us):l}}var Oi=null;function Rh(){if(Oi===null)throw Error(a(459));var t=Oi;return Oi=null,t}function kh(t){if(t===us||t===Al)throw Error(a(483))}var fs=null,ea=0;function Cl(t){var n=ea;return ea+=1,fs===null&&(fs=[]),jh(fs,t,n)}function na(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Dl(t,n){throw n.$$typeof===v?Error(a(525)):(t=Object.prototype.toString.call(n),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Nh(t){function n(z,O){if(t){var w=z.deletions;w===null?(z.deletions=[O],z.flags|=16):w.push(O)}}function l(z,O){if(!t)return null;for(;O!==null;)n(z,O),O=O.sibling;return null}function r(z){for(var O=new Map;z!==null;)z.key!==null?O.set(z.key,z):O.set(z.index,z),z=z.sibling;return O}function h(z,O){return z=hn(z,O),z.index=0,z.sibling=null,z}function g(z,O,w){return z.index=w,t?(w=z.alternate,w!==null?(w=w.index,w<O?(z.flags|=67108866,O):w):(z.flags|=67108866,O)):(z.flags|=1048576,O)}function y(z){return t&&z.alternate===null&&(z.flags|=67108866),z}function x(z,O,w,B){return O===null||O.tag!==6?(O=Lr(w,z.mode,B),O.return=z,O):(O=h(O,w),O.return=z,O)}function E(z,O,w,B){var et=w.type;return et===M?H(z,O,w.props.children,B,w.key):O!==null&&(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===Z&&Ai(et)===O.type)?(O=h(O,w.props),na(O,w),O.return=z,O):(O=_l(w.type,w.key,w.props,null,z.mode,B),na(O,w),O.return=z,O)}function j(z,O,w,B){return O===null||O.tag!==4||O.stateNode.containerInfo!==w.containerInfo||O.stateNode.implementation!==w.implementation?(O=Hr(w,z.mode,B),O.return=z,O):(O=h(O,w.children||[]),O.return=z,O)}function H(z,O,w,B,et){return O===null||O.tag!==7?(O=_i(w,z.mode,B,et),O.return=z,O):(O=h(O,w),O.return=z,O)}function V(z,O,w){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Lr(""+O,z.mode,w),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case S:return w=_l(O.type,O.key,O.props,null,z.mode,w),na(w,O),w.return=z,w;case T:return O=Hr(O,z.mode,w),O.return=z,O;case Z:return O=Ai(O),V(z,O,w)}if(dt(O)||st(O))return O=_i(O,z.mode,w,null),O.return=z,O;if(typeof O.then=="function")return V(z,Cl(O),w);if(O.$$typeof===q)return V(z,Ml(z,O),w);Dl(z,O)}return null}function R(z,O,w,B){var et=O!==null?O.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return et!==null?null:x(z,O,""+w,B);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case S:return w.key===et?E(z,O,w,B):null;case T:return w.key===et?j(z,O,w,B):null;case Z:return w=Ai(w),R(z,O,w,B)}if(dt(w)||st(w))return et!==null?null:H(z,O,w,B,null);if(typeof w.then=="function")return R(z,O,Cl(w),B);if(w.$$typeof===q)return R(z,O,Ml(z,w),B);Dl(z,w)}return null}function N(z,O,w,B,et){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return z=z.get(w)||null,x(O,z,""+B,et);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case S:return z=z.get(B.key===null?w:B.key)||null,E(O,z,B,et);case T:return z=z.get(B.key===null?w:B.key)||null,j(O,z,B,et);case Z:return B=Ai(B),N(z,O,w,B,et)}if(dt(B)||st(B))return z=z.get(w)||null,H(O,z,B,et,null);if(typeof B.then=="function")return N(z,O,w,Cl(B),et);if(B.$$typeof===q)return N(z,O,w,Ml(O,B),et);Dl(O,B)}return null}function I(z,O,w,B){for(var et=null,St=null,P=O,ft=O=0,bt=null;P!==null&&ft<w.length;ft++){P.index>ft?(bt=P,P=null):bt=P.sibling;var Tt=R(z,P,w[ft],B);if(Tt===null){P===null&&(P=bt);break}t&&P&&Tt.alternate===null&&n(z,P),O=g(Tt,O,ft),St===null?et=Tt:St.sibling=Tt,St=Tt,P=bt}if(ft===w.length)return l(z,P),vt&&dn(z,ft),et;if(P===null){for(;ft<w.length;ft++)P=V(z,w[ft],B),P!==null&&(O=g(P,O,ft),St===null?et=P:St.sibling=P,St=P);return vt&&dn(z,ft),et}for(P=r(P);ft<w.length;ft++)bt=N(P,z,ft,w[ft],B),bt!==null&&(t&&bt.alternate!==null&&P.delete(bt.key===null?ft:bt.key),O=g(bt,O,ft),St===null?et=bt:St.sibling=bt,St=bt);return t&&P.forEach(function(li){return n(z,li)}),vt&&dn(z,ft),et}function nt(z,O,w,B){if(w==null)throw Error(a(151));for(var et=null,St=null,P=O,ft=O=0,bt=null,Tt=w.next();P!==null&&!Tt.done;ft++,Tt=w.next()){P.index>ft?(bt=P,P=null):bt=P.sibling;var li=R(z,P,Tt.value,B);if(li===null){P===null&&(P=bt);break}t&&P&&li.alternate===null&&n(z,P),O=g(li,O,ft),St===null?et=li:St.sibling=li,St=li,P=bt}if(Tt.done)return l(z,P),vt&&dn(z,ft),et;if(P===null){for(;!Tt.done;ft++,Tt=w.next())Tt=V(z,Tt.value,B),Tt!==null&&(O=g(Tt,O,ft),St===null?et=Tt:St.sibling=Tt,St=Tt);return vt&&dn(z,ft),et}for(P=r(P);!Tt.done;ft++,Tt=w.next())Tt=N(P,z,ft,Tt.value,B),Tt!==null&&(t&&Tt.alternate!==null&&P.delete(Tt.key===null?ft:Tt.key),O=g(Tt,O,ft),St===null?et=Tt:St.sibling=Tt,St=Tt);return t&&P.forEach(function(Zv){return n(z,Zv)}),vt&&dn(z,ft),et}function jt(z,O,w,B){if(typeof w=="object"&&w!==null&&w.type===M&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case S:t:{for(var et=w.key;O!==null;){if(O.key===et){if(et=w.type,et===M){if(O.tag===7){l(z,O.sibling),B=h(O,w.props.children),B.return=z,z=B;break t}}else if(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===Z&&Ai(et)===O.type){l(z,O.sibling),B=h(O,w.props),na(B,w),B.return=z,z=B;break t}l(z,O);break}else n(z,O);O=O.sibling}w.type===M?(B=_i(w.props.children,z.mode,B,w.key),B.return=z,z=B):(B=_l(w.type,w.key,w.props,null,z.mode,B),na(B,w),B.return=z,z=B)}return y(z);case T:t:{for(et=w.key;O!==null;){if(O.key===et)if(O.tag===4&&O.stateNode.containerInfo===w.containerInfo&&O.stateNode.implementation===w.implementation){l(z,O.sibling),B=h(O,w.children||[]),B.return=z,z=B;break t}else{l(z,O);break}else n(z,O);O=O.sibling}B=Hr(w,z.mode,B),B.return=z,z=B}return y(z);case Z:return w=Ai(w),jt(z,O,w,B)}if(dt(w))return I(z,O,w,B);if(st(w)){if(et=st(w),typeof et!="function")throw Error(a(150));return w=et.call(w),nt(z,O,w,B)}if(typeof w.then=="function")return jt(z,O,Cl(w),B);if(w.$$typeof===q)return jt(z,O,Ml(z,w),B);Dl(z,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,O!==null&&O.tag===6?(l(z,O.sibling),B=h(O,w),B.return=z,z=B):(l(z,O),B=Lr(w,z.mode,B),B.return=z,z=B),y(z)):l(z,O)}return function(z,O,w,B){try{ea=0;var et=jt(z,O,w,B);return fs=null,et}catch(P){if(P===us||P===Al)throw P;var St=De(29,P,null,z.mode);return St.lanes=B,St.return=z,St}}}var Ci=Nh(!0),Lh=Nh(!1),Xn=!1;function Wr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jr(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Qn(t,n,l){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(Mt&2)!==0){var h=r.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),r.pending=n,n=xl(t),vh(t,null,l),n}return vl(t,r,n,l),xl(t)}function ia(t,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var r=n.lanes;r&=t.pendingLanes,l|=r,n.lanes=l,Of(t,l)}}function Ir(t,n){var l=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=y:g=g.next=y,l=l.next}while(l!==null);g===null?h=g=n:g=g.next=n}else h=g=n;l={baseState:r.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:r.shared,callbacks:r.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=n:t.next=n,l.lastBaseUpdate=n}var Pr=!1;function sa(){if(Pr){var t=cs;if(t!==null)throw t}}function aa(t,n,l,r){Pr=!1;var h=t.updateQueue;Xn=!1;var g=h.firstBaseUpdate,y=h.lastBaseUpdate,x=h.shared.pending;if(x!==null){h.shared.pending=null;var E=x,j=E.next;E.next=null,y===null?g=j:y.next=j,y=E;var H=t.alternate;H!==null&&(H=H.updateQueue,x=H.lastBaseUpdate,x!==y&&(x===null?H.firstBaseUpdate=j:x.next=j,H.lastBaseUpdate=E))}if(g!==null){var V=h.baseState;y=0,H=j=E=null,x=g;do{var R=x.lane&-536870913,N=R!==x.lane;if(N?(yt&R)===R:(r&R)===R){R!==0&&R===rs&&(Pr=!0),H!==null&&(H=H.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});t:{var I=t,nt=x;R=n;var jt=l;switch(nt.tag){case 1:if(I=nt.payload,typeof I=="function"){V=I.call(jt,V,R);break t}V=I;break t;case 3:I.flags=I.flags&-65537|128;case 0:if(I=nt.payload,R=typeof I=="function"?I.call(jt,V,R):I,R==null)break t;V=b({},V,R);break t;case 2:Xn=!0}}R=x.callback,R!==null&&(t.flags|=64,N&&(t.flags|=8192),N=h.callbacks,N===null?h.callbacks=[R]:N.push(R))}else N={lane:R,tag:x.tag,payload:x.payload,callback:x.callback,next:null},H===null?(j=H=N,E=V):H=H.next=N,y|=R;if(x=x.next,x===null){if(x=h.shared.pending,x===null)break;N=x,x=N.next,N.next=null,h.lastBaseUpdate=N,h.shared.pending=null}}while(!0);H===null&&(E=V),h.baseState=E,h.firstBaseUpdate=j,h.lastBaseUpdate=H,g===null&&(h.shared.lanes=0),Jn|=y,t.lanes=y,t.memoizedState=V}}function Hh(t,n){if(typeof t!="function")throw Error(a(191,t));t.call(n)}function Bh(t,n){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Hh(l[t],n)}var hs=C(null),zl=C(0);function Uh(t,n){t=Mn,F(zl,t),F(hs,n),Mn=t|n.baseLanes}function $r(){F(zl,Mn),F(hs,hs.current)}function tc(){Mn=zl.current,U(hs),U(zl)}var ze=C(null),Ge=null;function Zn(t){var n=t.alternate;F(Zt,Zt.current&1),F(ze,t),Ge===null&&(n===null||hs.current!==null||n.memoizedState!==null)&&(Ge=t)}function ec(t){F(Zt,Zt.current),F(ze,t),Ge===null&&(Ge=t)}function Vh(t){t.tag===22?(F(Zt,Zt.current),F(ze,t),Ge===null&&(Ge=t)):Fn()}function Fn(){F(Zt,Zt.current),F(ze,ze.current)}function we(t){U(ze),Ge===t&&(Ge=null),U(Zt)}var Zt=C(0);function wl(t){for(var n=t;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ou(l)||ru(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var pn=0,ut=null,zt=null,Jt=null,jl=!1,ds=!1,Di=!1,Rl=0,la=0,gs=null,Lb=0;function qt(){throw Error(a(321))}function nc(t,n){if(n===null)return!1;for(var l=0;l<n.length&&l<t.length;l++)if(!Ce(t[l],n[l]))return!1;return!0}function ic(t,n,l,r,h,g){return pn=g,ut=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,k.H=t===null||t.memoizedState===null?Td:bc,Di=!1,g=l(r,h),Di=!1,ds&&(g=qh(n,l,r,h)),Yh(t),g}function Yh(t){k.H=ca;var n=zt!==null&&zt.next!==null;if(pn=0,Jt=zt=ut=null,jl=!1,la=0,gs=null,n)throw Error(a(300));t===null||It||(t=t.dependencies,t!==null&&Tl(t)&&(It=!0))}function qh(t,n,l,r){ut=t;var h=0;do{if(ds&&(gs=null),la=0,ds=!1,25<=h)throw Error(a(301));if(h+=1,Jt=zt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}k.H=Md,g=n(l,r)}while(ds);return g}function Hb(){var t=k.H,n=t.useState()[0];return n=typeof n.then=="function"?oa(n):n,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(ut.flags|=1024),n}function sc(){var t=Rl!==0;return Rl=0,t}function ac(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function lc(t){if(jl){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}jl=!1}pn=0,Jt=zt=ut=null,ds=!1,la=Rl=0,gs=null}function ge(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?ut.memoizedState=Jt=t:Jt=Jt.next=t,Jt}function Ft(){if(zt===null){var t=ut.alternate;t=t!==null?t.memoizedState:null}else t=zt.next;var n=Jt===null?ut.memoizedState:Jt.next;if(n!==null)Jt=n,zt=t;else{if(t===null)throw ut.alternate===null?Error(a(467)):Error(a(310));zt=t,t={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Jt===null?ut.memoizedState=Jt=t:Jt=Jt.next=t}return Jt}function kl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oa(t){var n=la;return la+=1,gs===null&&(gs=[]),t=jh(gs,t,n),n=ut,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,k.H=n===null||n.memoizedState===null?Td:bc),t}function Nl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return oa(t);if(t.$$typeof===q)return ae(t)}throw Error(a(438,String(t)))}function oc(t){var n=null,l=ut.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var r=ut.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(n={data:r.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=kl(),ut.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(t),r=0;r<t;r++)l[r]=rt;return n.index++,l}function yn(t,n){return typeof n=="function"?n(t):n}function Ll(t){var n=Ft();return rc(n,zt,t)}function rc(t,n,l){var r=t.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=l;var h=t.baseQueue,g=r.pending;if(g!==null){if(h!==null){var y=h.next;h.next=g.next,g.next=y}n.baseQueue=h=g,r.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{n=h.next;var x=y=null,E=null,j=n,H=!1;do{var V=j.lane&-536870913;if(V!==j.lane?(yt&V)===V:(pn&V)===V){var R=j.revertLane;if(R===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),V===rs&&(H=!0);else if((pn&R)===R){j=j.next,R===rs&&(H=!0);continue}else V={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},E===null?(x=E=V,y=g):E=E.next=V,ut.lanes|=R,Jn|=R;V=j.action,Di&&l(g,V),g=j.hasEagerState?j.eagerState:l(g,V)}else R={lane:V,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},E===null?(x=E=R,y=g):E=E.next=R,ut.lanes|=V,Jn|=V;j=j.next}while(j!==null&&j!==n);if(E===null?y=g:E.next=x,!Ce(g,t.memoizedState)&&(It=!0,H&&(l=cs,l!==null)))throw l;t.memoizedState=g,t.baseState=y,t.baseQueue=E,r.lastRenderedState=g}return h===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function cc(t){var n=Ft(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=t;var r=l.dispatch,h=l.pending,g=n.memoizedState;if(h!==null){l.pending=null;var y=h=h.next;do g=t(g,y.action),y=y.next;while(y!==h);Ce(g,n.memoizedState)||(It=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),l.lastRenderedState=g}return[g,r]}function Xh(t,n,l){var r=ut,h=Ft(),g=vt;if(g){if(l===void 0)throw Error(a(407));l=l()}else l=n();var y=!Ce((zt||h).memoizedState,l);if(y&&(h.memoizedState=l,It=!0),h=h.queue,hc(Zh.bind(null,r,h,t),[t]),h.getSnapshot!==n||y||Jt!==null&&Jt.memoizedState.tag&1){if(r.flags|=2048,ms(9,{destroy:void 0},Qh.bind(null,r,h,l,n),null),Rt===null)throw Error(a(349));g||(pn&127)!==0||Gh(r,n,l)}return l}function Gh(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=ut.updateQueue,n===null?(n=kl(),ut.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function Qh(t,n,l,r){n.value=l,n.getSnapshot=r,Fh(n)&&Kh(t)}function Zh(t,n,l){return l(function(){Fh(n)&&Kh(t)})}function Fh(t){var n=t.getSnapshot;t=t.value;try{var l=n();return!Ce(t,l)}catch{return!0}}function Kh(t){var n=xi(t,2);n!==null&&_e(n,t,2)}function uc(t){var n=ge();if(typeof t=="function"){var l=t;if(t=l(),Di){Ln(!0);try{l()}finally{Ln(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:t},n}function Wh(t,n,l,r){return t.baseState=l,rc(t,zt,typeof r=="function"?r:yn)}function Bb(t,n,l,r,h){if(Ul(t))throw Error(a(485));if(t=n.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){g.listeners.push(y)}};k.T!==null?l(!0):g.isTransition=!1,r(g),l=n.pending,l===null?(g.next=n.pending=g,Jh(n,g)):(g.next=l.next,n.pending=l.next=g)}}function Jh(t,n){var l=n.action,r=n.payload,h=t.state;if(n.isTransition){var g=k.T,y={};k.T=y;try{var x=l(h,r),E=k.S;E!==null&&E(y,x),Ih(t,n,x)}catch(j){fc(t,n,j)}finally{g!==null&&y.types!==null&&(g.types=y.types),k.T=g}}else try{g=l(h,r),Ih(t,n,g)}catch(j){fc(t,n,j)}}function Ih(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){Ph(t,n,r)},function(r){return fc(t,n,r)}):Ph(t,n,l)}function Ph(t,n,l){n.status="fulfilled",n.value=l,$h(n),t.state=l,n=t.pending,n!==null&&(l=n.next,l===n?t.pending=null:(l=l.next,n.next=l,Jh(t,l)))}function fc(t,n,l){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do n.status="rejected",n.reason=l,$h(n),n=n.next;while(n!==r)}t.action=null}function $h(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function td(t,n){return n}function ed(t,n){if(vt){var l=Rt.formState;if(l!==null){t:{var r=ut;if(vt){if(Lt){e:{for(var h=Lt,g=Xe;h.nodeType!==8;){if(!g){h=null;break e}if(h=Qe(h.nextSibling),h===null){h=null;break e}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){Lt=Qe(h.nextSibling),r=h.data==="F!";break t}}Yn(r)}r=!1}r&&(n=l[0])}}return l=ge(),l.memoizedState=l.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:td,lastRenderedState:n},l.queue=r,l=xd.bind(null,ut,r),r.dispatch=l,r=uc(!1),g=yc.bind(null,ut,!1,r.queue),r=ge(),h={state:n,dispatch:null,action:t,pending:null},r.queue=h,l=Bb.bind(null,ut,h,g,l),h.dispatch=l,r.memoizedState=t,[n,l,!1]}function nd(t){var n=Ft();return id(n,zt,t)}function id(t,n,l){if(n=rc(t,n,td)[0],t=Ll(yn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var r=oa(n)}catch(y){throw y===us?Al:y}else r=n;n=Ft();var h=n.queue,g=h.dispatch;return l!==n.memoizedState&&(ut.flags|=2048,ms(9,{destroy:void 0},Ub.bind(null,h,l),null)),[r,g,t]}function Ub(t,n){t.action=n}function sd(t){var n=Ft(),l=zt;if(l!==null)return id(n,l,t);Ft(),n=n.memoizedState,l=Ft();var r=l.queue.dispatch;return l.memoizedState=t,[n,r,!1]}function ms(t,n,l,r){return t={tag:t,create:l,deps:r,inst:n,next:null},n=ut.updateQueue,n===null&&(n=kl(),ut.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=t.next=t:(r=l.next,l.next=t,t.next=r,n.lastEffect=t),t}function ad(){return Ft().memoizedState}function Hl(t,n,l,r){var h=ge();ut.flags|=t,h.memoizedState=ms(1|n,{destroy:void 0},l,r===void 0?null:r)}function Bl(t,n,l,r){var h=Ft();r=r===void 0?null:r;var g=h.memoizedState.inst;zt!==null&&r!==null&&nc(r,zt.memoizedState.deps)?h.memoizedState=ms(n,g,l,r):(ut.flags|=t,h.memoizedState=ms(1|n,g,l,r))}function ld(t,n){Hl(8390656,8,t,n)}function hc(t,n){Bl(2048,8,t,n)}function Vb(t){ut.flags|=4;var n=ut.updateQueue;if(n===null)n=kl(),ut.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function od(t){var n=Ft().memoizedState;return Vb({ref:n,nextImpl:t}),function(){if((Mt&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function rd(t,n){return Bl(4,2,t,n)}function cd(t,n){return Bl(4,4,t,n)}function ud(t,n){if(typeof n=="function"){t=t();var l=n(t);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function fd(t,n,l){l=l!=null?l.concat([t]):null,Bl(4,4,ud.bind(null,n,t),l)}function dc(){}function hd(t,n){var l=Ft();n=n===void 0?null:n;var r=l.memoizedState;return n!==null&&nc(n,r[1])?r[0]:(l.memoizedState=[t,n],t)}function dd(t,n){var l=Ft();n=n===void 0?null:n;var r=l.memoizedState;if(n!==null&&nc(n,r[1]))return r[0];if(r=t(),Di){Ln(!0);try{t()}finally{Ln(!1)}}return l.memoizedState=[r,n],r}function gc(t,n,l){return l===void 0||(pn&1073741824)!==0&&(yt&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=gg(),ut.lanes|=t,Jn|=t,l)}function gd(t,n,l,r){return Ce(l,n)?l:hs.current!==null?(t=gc(t,l,r),Ce(t,n)||(It=!0),t):(pn&42)===0||(pn&1073741824)!==0&&(yt&261930)===0?(It=!0,t.memoizedState=l):(t=gg(),ut.lanes|=t,Jn|=t,n)}function md(t,n,l,r,h){var g=Q.p;Q.p=g!==0&&8>g?g:8;var y=k.T,x={};k.T=x,yc(t,!1,n,l);try{var E=h(),j=k.S;if(j!==null&&j(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var H=Nb(E,r);ra(t,n,H,ke(t))}else ra(t,n,r,ke(t))}catch(V){ra(t,n,{then:function(){},status:"rejected",reason:V},ke())}finally{Q.p=g,y!==null&&x.types!==null&&(y.types=x.types),k.T=y}}function Yb(){}function mc(t,n,l,r){if(t.tag!==5)throw Error(a(476));var h=pd(t).queue;md(t,h,n,$,l===null?Yb:function(){return yd(t),l(r)})}function pd(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:$},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:l},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function yd(t){var n=pd(t);n.next===null&&(n=t.alternate.memoizedState),ra(t,n.next.queue,{},ke())}function pc(){return ae(Ea)}function bd(){return Ft().memoizedState}function vd(){return Ft().memoizedState}function qb(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=ke();t=Gn(l);var r=Qn(n,t,l);r!==null&&(_e(r,n,l),ia(r,n,l)),n={cache:Qr()},t.payload=n;return}n=n.return}}function Xb(t,n,l){var r=ke();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ul(t)?_d(n,l):(l=kr(t,n,l,r),l!==null&&(_e(l,t,r),Sd(l,n,r)))}function xd(t,n,l){var r=ke();ra(t,n,l,r)}function ra(t,n,l,r){var h={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ul(t))_d(n,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var y=n.lastRenderedState,x=g(y,l);if(h.hasEagerState=!0,h.eagerState=x,Ce(x,y))return vl(t,n,h,0),Rt===null&&bl(),!1}catch{}if(l=kr(t,n,h,r),l!==null)return _e(l,t,r),Sd(l,n,r),!0}return!1}function yc(t,n,l,r){if(r={lane:2,revertLane:Wc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ul(t)){if(n)throw Error(a(479))}else n=kr(t,l,r,2),n!==null&&_e(n,t,2)}function Ul(t){var n=t.alternate;return t===ut||n!==null&&n===ut}function _d(t,n){ds=jl=!0;var l=t.pending;l===null?n.next=n:(n.next=l.next,l.next=n),t.pending=n}function Sd(t,n,l){if((l&4194048)!==0){var r=n.lanes;r&=t.pendingLanes,l|=r,n.lanes=l,Of(t,l)}}var ca={readContext:ae,use:Nl,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};ca.useEffectEvent=qt;var Td={readContext:ae,use:Nl,useCallback:function(t,n){return ge().memoizedState=[t,n===void 0?null:n],t},useContext:ae,useEffect:ld,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,Hl(4194308,4,ud.bind(null,n,t),l)},useLayoutEffect:function(t,n){return Hl(4194308,4,t,n)},useInsertionEffect:function(t,n){Hl(4,2,t,n)},useMemo:function(t,n){var l=ge();n=n===void 0?null:n;var r=t();if(Di){Ln(!0);try{t()}finally{Ln(!1)}}return l.memoizedState=[r,n],r},useReducer:function(t,n,l){var r=ge();if(l!==void 0){var h=l(n);if(Di){Ln(!0);try{l(n)}finally{Ln(!1)}}}else h=n;return r.memoizedState=r.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},r.queue=t,t=t.dispatch=Xb.bind(null,ut,t),[r.memoizedState,t]},useRef:function(t){var n=ge();return t={current:t},n.memoizedState=t},useState:function(t){t=uc(t);var n=t.queue,l=xd.bind(null,ut,n);return n.dispatch=l,[t.memoizedState,l]},useDebugValue:dc,useDeferredValue:function(t,n){var l=ge();return gc(l,t,n)},useTransition:function(){var t=uc(!1);return t=md.bind(null,ut,t.queue,!0,!1),ge().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var r=ut,h=ge();if(vt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),Rt===null)throw Error(a(349));(yt&127)!==0||Gh(r,n,l)}h.memoizedState=l;var g={value:l,getSnapshot:n};return h.queue=g,ld(Zh.bind(null,r,g,t),[t]),r.flags|=2048,ms(9,{destroy:void 0},Qh.bind(null,r,g,l,n),null),l},useId:function(){var t=ge(),n=Rt.identifierPrefix;if(vt){var l=tn,r=$e;l=(r&~(1<<32-Oe(r)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Rl++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=Lb++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:pc,useFormState:ed,useActionState:ed,useOptimistic:function(t){var n=ge();n.memoizedState=n.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=yc.bind(null,ut,!0,l),l.dispatch=n,[t,n]},useMemoCache:oc,useCacheRefresh:function(){return ge().memoizedState=qb.bind(null,ut)},useEffectEvent:function(t){var n=ge(),l={impl:t};return n.memoizedState=l,function(){if((Mt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},bc={readContext:ae,use:Nl,useCallback:hd,useContext:ae,useEffect:hc,useImperativeHandle:fd,useInsertionEffect:rd,useLayoutEffect:cd,useMemo:dd,useReducer:Ll,useRef:ad,useState:function(){return Ll(yn)},useDebugValue:dc,useDeferredValue:function(t,n){var l=Ft();return gd(l,zt.memoizedState,t,n)},useTransition:function(){var t=Ll(yn)[0],n=Ft().memoizedState;return[typeof t=="boolean"?t:oa(t),n]},useSyncExternalStore:Xh,useId:bd,useHostTransitionStatus:pc,useFormState:nd,useActionState:nd,useOptimistic:function(t,n){var l=Ft();return Wh(l,zt,t,n)},useMemoCache:oc,useCacheRefresh:vd};bc.useEffectEvent=od;var Md={readContext:ae,use:Nl,useCallback:hd,useContext:ae,useEffect:hc,useImperativeHandle:fd,useInsertionEffect:rd,useLayoutEffect:cd,useMemo:dd,useReducer:cc,useRef:ad,useState:function(){return cc(yn)},useDebugValue:dc,useDeferredValue:function(t,n){var l=Ft();return zt===null?gc(l,t,n):gd(l,zt.memoizedState,t,n)},useTransition:function(){var t=cc(yn)[0],n=Ft().memoizedState;return[typeof t=="boolean"?t:oa(t),n]},useSyncExternalStore:Xh,useId:bd,useHostTransitionStatus:pc,useFormState:sd,useActionState:sd,useOptimistic:function(t,n){var l=Ft();return zt!==null?Wh(l,zt,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:oc,useCacheRefresh:vd};Md.useEffectEvent=od;function vc(t,n,l,r){n=t.memoizedState,l=l(r,n),l=l==null?n:b({},n,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var xc={enqueueSetState:function(t,n,l){t=t._reactInternals;var r=ke(),h=Gn(r);h.payload=n,l!=null&&(h.callback=l),n=Qn(t,h,r),n!==null&&(_e(n,t,r),ia(n,t,r))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var r=ke(),h=Gn(r);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Qn(t,h,r),n!==null&&(_e(n,t,r),ia(n,t,r))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=ke(),r=Gn(l);r.tag=2,n!=null&&(r.callback=n),n=Qn(t,r,l),n!==null&&(_e(n,t,l),ia(n,t,l))}};function Ed(t,n,l,r,h,g,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,g,y):n.prototype&&n.prototype.isPureReactComponent?!Ws(l,r)||!Ws(h,g):!0}function Ad(t,n,l,r){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,r),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,r),n.state!==t&&xc.enqueueReplaceState(n,n.state,null)}function zi(t,n){var l=n;if("ref"in n){l={};for(var r in n)r!=="ref"&&(l[r]=n[r])}if(t=t.defaultProps){l===n&&(l=b({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function Od(t){yl(t)}function Cd(t){console.error(t)}function Dd(t){yl(t)}function Vl(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(r){setTimeout(function(){throw r})}}function zd(t,n,l){try{var r=t.onCaughtError;r(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function _c(t,n,l){return l=Gn(l),l.tag=3,l.payload={element:null},l.callback=function(){Vl(t,n)},l}function wd(t){return t=Gn(t),t.tag=3,t}function jd(t,n,l,r){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=r.value;t.payload=function(){return h(g)},t.callback=function(){zd(n,l,r)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){zd(n,l,r),typeof h!="function"&&(In===null?In=new Set([this]):In.add(this));var x=r.stack;this.componentDidCatch(r.value,{componentStack:x!==null?x:""})})}function Gb(t,n,l,r,h){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(n=l.alternate,n!==null&&os(n,l,h,!0),l=ze.current,l!==null){switch(l.tag){case 31:case 13:return Ge===null?Pl():l.alternate===null&&Xt===0&&(Xt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,r===Ol?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([r]):n.add(r),Zc(t,r,h)),!1;case 22:return l.flags|=65536,r===Ol?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([r])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([r]):l.add(r)),Zc(t,r,h)),!1}throw Error(a(435,l.tag))}return Zc(t,r,h),Pl(),!1}if(vt)return n=ze.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,r!==Vr&&(t=Error(a(422),{cause:r}),Ps(Ve(t,l)))):(r!==Vr&&(n=Error(a(423),{cause:r}),Ps(Ve(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,r=Ve(r,l),h=_c(t.stateNode,r,h),Ir(t,h),Xt!==4&&(Xt=2)),!1;var g=Error(a(520),{cause:r});if(g=Ve(g,l),ya===null?ya=[g]:ya.push(g),Xt!==4&&(Xt=2),n===null)return!0;r=Ve(r,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=_c(l.stateNode,r,t),Ir(l,t),!1;case 1:if(n=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(In===null||!In.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=wd(h),jd(h,t,l,r),Ir(l,h),!1}l=l.return}while(l!==null);return!1}var Sc=Error(a(461)),It=!1;function le(t,n,l,r){n.child=t===null?Lh(n,null,l,r):Ci(n,t.child,l,r)}function Rd(t,n,l,r,h){l=l.render;var g=n.ref;if("ref"in r){var y={};for(var x in r)x!=="ref"&&(y[x]=r[x])}else y=r;return Mi(n),r=ic(t,n,l,y,g,h),x=sc(),t!==null&&!It?(ac(t,n,h),bn(t,n,h)):(vt&&x&&Br(n),n.flags|=1,le(t,n,r,h),n.child)}function kd(t,n,l,r,h){if(t===null){var g=l.type;return typeof g=="function"&&!Nr(g)&&g.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=g,Nd(t,n,g,r,h)):(t=_l(l.type,null,r,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!zc(t,h)){var y=g.memoizedProps;if(l=l.compare,l=l!==null?l:Ws,l(y,r)&&t.ref===n.ref)return bn(t,n,h)}return n.flags|=1,t=hn(g,r),t.ref=n.ref,t.return=n,n.child=t}function Nd(t,n,l,r,h){if(t!==null){var g=t.memoizedProps;if(Ws(g,r)&&t.ref===n.ref)if(It=!1,n.pendingProps=r=g,zc(t,h))(t.flags&131072)!==0&&(It=!0);else return n.lanes=t.lanes,bn(t,n,h)}return Tc(t,n,l,r,h)}function Ld(t,n,l,r){var h=r.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|l:l,t!==null){for(r=n.child=t.child,h=0;r!==null;)h=h|r.lanes|r.childLanes,r=r.sibling;r=h&~g}else r=0,n.child=null;return Hd(t,n,g,l,r)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&El(n,g!==null?g.cachePool:null),g!==null?Uh(n,g):$r(),Vh(n);else return r=n.lanes=536870912,Hd(t,n,g!==null?g.baseLanes|l:l,l,r)}else g!==null?(El(n,g.cachePool),Uh(n,g),Fn(),n.memoizedState=null):(t!==null&&El(n,null),$r(),Fn());return le(t,n,h,l),n.child}function ua(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Hd(t,n,l,r,h){var g=Fr();return g=g===null?null:{parent:Wt._currentValue,pool:g},n.memoizedState={baseLanes:l,cachePool:g},t!==null&&El(n,null),$r(),Vh(n),t!==null&&os(t,n,r,!0),n.childLanes=h,null}function Yl(t,n){return n=Xl({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Bd(t,n,l){return Ci(n,t.child,null,l),t=Yl(n,n.pendingProps),t.flags|=2,we(n),n.memoizedState=null,t}function Qb(t,n,l){var r=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(vt){if(r.mode==="hidden")return t=Yl(n,r),n.lanes=536870912,ua(null,t);if(ec(n),(t=Lt)?(t=Jg(t,Xe),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Un!==null?{id:$e,overflow:tn}:null,retryLane:536870912,hydrationErrors:null},l=_h(t),l.return=n,n.child=l,se=n,Lt=null)):t=null,t===null)throw Yn(n);return n.lanes=536870912,null}return Yl(n,r)}var g=t.memoizedState;if(g!==null){var y=g.dehydrated;if(ec(n),h)if(n.flags&256)n.flags&=-257,n=Bd(t,n,l);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(a(558));else if(It||os(t,n,l,!1),h=(l&t.childLanes)!==0,It||h){if(r=Rt,r!==null&&(y=Cf(r,l),y!==0&&y!==g.retryLane))throw g.retryLane=y,xi(t,y),_e(r,t,y),Sc;Pl(),n=Bd(t,n,l)}else t=g.treeContext,Lt=Qe(y.nextSibling),se=n,vt=!0,Vn=null,Xe=!1,t!==null&&Mh(n,t),n=Yl(n,r),n.flags|=4096;return n}return t=hn(t.child,{mode:r.mode,children:r.children}),t.ref=n.ref,n.child=t,t.return=n,t}function ql(t,n){var l=n.ref;if(l===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(t===null||t.ref!==l)&&(n.flags|=4194816)}}function Tc(t,n,l,r,h){return Mi(n),l=ic(t,n,l,r,void 0,h),r=sc(),t!==null&&!It?(ac(t,n,h),bn(t,n,h)):(vt&&r&&Br(n),n.flags|=1,le(t,n,l,h),n.child)}function Ud(t,n,l,r,h,g){return Mi(n),n.updateQueue=null,l=qh(n,r,l,h),Yh(t),r=sc(),t!==null&&!It?(ac(t,n,g),bn(t,n,g)):(vt&&r&&Br(n),n.flags|=1,le(t,n,l,g),n.child)}function Vd(t,n,l,r,h){if(Mi(n),n.stateNode===null){var g=is,y=l.contextType;typeof y=="object"&&y!==null&&(g=ae(y)),g=new l(r,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=xc,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=r,g.state=n.memoizedState,g.refs={},Wr(n),y=l.contextType,g.context=typeof y=="object"&&y!==null?ae(y):is,g.state=n.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(vc(n,l,y,r),g.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(y=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),y!==g.state&&xc.enqueueReplaceState(g,g.state,null),aa(n,r,g,h),sa(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!0}else if(t===null){g=n.stateNode;var x=n.memoizedProps,E=zi(l,x);g.props=E;var j=g.context,H=l.contextType;y=is,typeof H=="object"&&H!==null&&(y=ae(H));var V=l.getDerivedStateFromProps;H=typeof V=="function"||typeof g.getSnapshotBeforeUpdate=="function",x=n.pendingProps!==x,H||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x||j!==y)&&Ad(n,g,r,y),Xn=!1;var R=n.memoizedState;g.state=R,aa(n,r,g,h),sa(),j=n.memoizedState,x||R!==j||Xn?(typeof V=="function"&&(vc(n,l,V,r),j=n.memoizedState),(E=Xn||Ed(n,l,E,r,R,j,y))?(H||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=j),g.props=r,g.state=j,g.context=y,r=E):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{g=n.stateNode,Jr(t,n),y=n.memoizedProps,H=zi(l,y),g.props=H,V=n.pendingProps,R=g.context,j=l.contextType,E=is,typeof j=="object"&&j!==null&&(E=ae(j)),x=l.getDerivedStateFromProps,(j=typeof x=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==V||R!==E)&&Ad(n,g,r,E),Xn=!1,R=n.memoizedState,g.state=R,aa(n,r,g,h),sa();var N=n.memoizedState;y!==V||R!==N||Xn||t!==null&&t.dependencies!==null&&Tl(t.dependencies)?(typeof x=="function"&&(vc(n,l,x,r),N=n.memoizedState),(H=Xn||Ed(n,l,H,r,R,N,E)||t!==null&&t.dependencies!==null&&Tl(t.dependencies))?(j||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(r,N,E),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(r,N,E)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=N),g.props=r,g.state=N,g.context=E,r=H):(typeof g.componentDidUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=1024),r=!1)}return g=r,ql(t,n),r=(n.flags&128)!==0,g||r?(g=n.stateNode,l=r&&typeof l.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&r?(n.child=Ci(n,t.child,null,h),n.child=Ci(n,null,l,h)):le(t,n,l,h),n.memoizedState=g.state,t=n.child):t=bn(t,n,h),t}function Yd(t,n,l,r){return Si(),n.flags|=256,le(t,n,l,r),n.child}var Mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(t){return{baseLanes:t,cachePool:zh()}}function Ac(t,n,l){return t=t!==null?t.childLanes&~l:0,n&&(t|=Re),t}function qd(t,n,l){var r=n.pendingProps,h=!1,g=(n.flags&128)!==0,y;if((y=g)||(y=t!==null&&t.memoizedState===null?!1:(Zt.current&2)!==0),y&&(h=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,t===null){if(vt){if(h?Zn(n):Fn(),(t=Lt)?(t=Jg(t,Xe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Un!==null?{id:$e,overflow:tn}:null,retryLane:536870912,hydrationErrors:null},l=_h(t),l.return=n,n.child=l,se=n,Lt=null)):t=null,t===null)throw Yn(n);return ru(t)?n.lanes=32:n.lanes=536870912,null}var x=r.children;return r=r.fallback,h?(Fn(),h=n.mode,x=Xl({mode:"hidden",children:x},h),r=_i(r,h,l,null),x.return=n,r.return=n,x.sibling=r,n.child=x,r=n.child,r.memoizedState=Ec(l),r.childLanes=Ac(t,y,l),n.memoizedState=Mc,ua(null,r)):(Zn(n),Oc(n,x))}var E=t.memoizedState;if(E!==null&&(x=E.dehydrated,x!==null)){if(g)n.flags&256?(Zn(n),n.flags&=-257,n=Cc(t,n,l)):n.memoizedState!==null?(Fn(),n.child=t.child,n.flags|=128,n=null):(Fn(),x=r.fallback,h=n.mode,r=Xl({mode:"visible",children:r.children},h),x=_i(x,h,l,null),x.flags|=2,r.return=n,x.return=n,r.sibling=x,n.child=r,Ci(n,t.child,null,l),r=n.child,r.memoizedState=Ec(l),r.childLanes=Ac(t,y,l),n.memoizedState=Mc,n=ua(null,r));else if(Zn(n),ru(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var j=y.dgst;y=j,r=Error(a(419)),r.stack="",r.digest=y,Ps({value:r,source:null,stack:null}),n=Cc(t,n,l)}else if(It||os(t,n,l,!1),y=(l&t.childLanes)!==0,It||y){if(y=Rt,y!==null&&(r=Cf(y,l),r!==0&&r!==E.retryLane))throw E.retryLane=r,xi(t,r),_e(y,t,r),Sc;ou(x)||Pl(),n=Cc(t,n,l)}else ou(x)?(n.flags|=192,n.child=t.child,n=null):(t=E.treeContext,Lt=Qe(x.nextSibling),se=n,vt=!0,Vn=null,Xe=!1,t!==null&&Mh(n,t),n=Oc(n,r.children),n.flags|=4096);return n}return h?(Fn(),x=r.fallback,h=n.mode,E=t.child,j=E.sibling,r=hn(E,{mode:"hidden",children:r.children}),r.subtreeFlags=E.subtreeFlags&65011712,j!==null?x=hn(j,x):(x=_i(x,h,l,null),x.flags|=2),x.return=n,r.return=n,r.sibling=x,n.child=r,ua(null,r),r=n.child,x=t.child.memoizedState,x===null?x=Ec(l):(h=x.cachePool,h!==null?(E=Wt._currentValue,h=h.parent!==E?{parent:E,pool:E}:h):h=zh(),x={baseLanes:x.baseLanes|l,cachePool:h}),r.memoizedState=x,r.childLanes=Ac(t,y,l),n.memoizedState=Mc,ua(t.child,r)):(Zn(n),l=t.child,t=l.sibling,l=hn(l,{mode:"visible",children:r.children}),l.return=n,l.sibling=null,t!==null&&(y=n.deletions,y===null?(n.deletions=[t],n.flags|=16):y.push(t)),n.child=l,n.memoizedState=null,l)}function Oc(t,n){return n=Xl({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Xl(t,n){return t=De(22,t,null,n),t.lanes=0,t}function Cc(t,n,l){return Ci(n,t.child,null,l),t=Oc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Xd(t,n,l){t.lanes|=n;var r=t.alternate;r!==null&&(r.lanes|=n),Xr(t.return,n,l)}function Dc(t,n,l,r,h,g){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:l,tailMode:h,treeForkCount:g}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=l,y.tailMode=h,y.treeForkCount=g)}function Gd(t,n,l){var r=n.pendingProps,h=r.revealOrder,g=r.tail;r=r.children;var y=Zt.current,x=(y&2)!==0;if(x?(y=y&1|2,n.flags|=128):y&=1,F(Zt,y),le(t,n,r,l),r=vt?Is:0,!x&&t!==null&&(t.flags&128)!==0)t:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Xd(t,l,n);else if(t.tag===19)Xd(t,l,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break t;for(;t.sibling===null;){if(t.return===null||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(l=n.child,h=null;l!==null;)t=l.alternate,t!==null&&wl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null),Dc(n,!1,h,l,g,r);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&wl(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Dc(n,!0,l,null,g,r);break;case"together":Dc(n,!1,null,null,void 0,r);break;default:n.memoizedState=null}return n.child}function bn(t,n,l){if(t!==null&&(n.dependencies=t.dependencies),Jn|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(os(t,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(a(153));if(n.child!==null){for(t=n.child,l=hn(t,t.pendingProps),n.child=l,l.return=n;t.sibling!==null;)t=t.sibling,l=l.sibling=hn(t,t.pendingProps),l.return=n;l.sibling=null}return n.child}function zc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Tl(t)))}function Zb(t,n,l){switch(n.tag){case 3:de(n,n.stateNode.containerInfo),qn(n,Wt,t.memoizedState.cache),Si();break;case 27:case 5:Ls(n);break;case 4:de(n,n.stateNode.containerInfo);break;case 10:qn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,ec(n),null;break;case 13:var r=n.memoizedState;if(r!==null)return r.dehydrated!==null?(Zn(n),n.flags|=128,null):(l&n.child.childLanes)!==0?qd(t,n,l):(Zn(n),t=bn(t,n,l),t!==null?t.sibling:null);Zn(n);break;case 19:var h=(t.flags&128)!==0;if(r=(l&n.childLanes)!==0,r||(os(t,n,l,!1),r=(l&n.childLanes)!==0),h){if(r)return Gd(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),F(Zt,Zt.current),r)break;return null;case 22:return n.lanes=0,Ld(t,n,l,n.pendingProps);case 24:qn(n,Wt,t.memoizedState.cache)}return bn(t,n,l)}function Qd(t,n,l){if(t!==null)if(t.memoizedProps!==n.pendingProps)It=!0;else{if(!zc(t,l)&&(n.flags&128)===0)return It=!1,Zb(t,n,l);It=(t.flags&131072)!==0}else It=!1,vt&&(n.flags&1048576)!==0&&Th(n,Is,n.index);switch(n.lanes=0,n.tag){case 16:t:{var r=n.pendingProps;if(t=Ai(n.elementType),n.type=t,typeof t=="function")Nr(t)?(r=zi(t,r),n.tag=1,n=Vd(null,n,t,r,l)):(n.tag=0,n=Tc(null,n,t,r,l));else{if(t!=null){var h=t.$$typeof;if(h===G){n.tag=11,n=Rd(null,n,t,r,l);break t}else if(h===X){n.tag=14,n=kd(null,n,t,r,l);break t}}throw n=Vt(t)||t,Error(a(306,n,""))}}return n;case 0:return Tc(t,n,n.type,n.pendingProps,l);case 1:return r=n.type,h=zi(r,n.pendingProps),Vd(t,n,r,h,l);case 3:t:{if(de(n,n.stateNode.containerInfo),t===null)throw Error(a(387));r=n.pendingProps;var g=n.memoizedState;h=g.element,Jr(t,n),aa(n,r,null,l);var y=n.memoizedState;if(r=y.cache,qn(n,Wt,r),r!==g.cache&&Gr(n,[Wt],l,!0),sa(),r=y.element,g.isDehydrated)if(g={element:r,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=Yd(t,n,r,l);break t}else if(r!==h){h=Ve(Error(a(424)),n),Ps(h),n=Yd(t,n,r,l);break t}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Lt=Qe(t.firstChild),se=n,vt=!0,Vn=null,Xe=!0,l=Lh(n,null,r,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Si(),r===h){n=bn(t,n,l);break t}le(t,n,r,l)}n=n.child}return n;case 26:return ql(t,n),t===null?(l=nm(n.type,null,n.pendingProps,null))?n.memoizedState=l:vt||(l=n.type,t=n.pendingProps,r=ao(ot.current).createElement(l),r[ie]=n,r[me]=t,oe(r,l,t),ee(r),n.stateNode=r):n.memoizedState=nm(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Ls(n),t===null&&vt&&(r=n.stateNode=$g(n.type,n.pendingProps,ot.current),se=n,Xe=!0,h=Lt,ei(n.type)?(cu=h,Lt=Qe(r.firstChild)):Lt=h),le(t,n,n.pendingProps.children,l),ql(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&vt&&((h=r=Lt)&&(r=Sv(r,n.type,n.pendingProps,Xe),r!==null?(n.stateNode=r,se=n,Lt=Qe(r.firstChild),Xe=!1,h=!0):h=!1),h||Yn(n)),Ls(n),h=n.type,g=n.pendingProps,y=t!==null?t.memoizedProps:null,r=g.children,su(h,g)?r=null:y!==null&&su(h,y)&&(n.flags|=32),n.memoizedState!==null&&(h=ic(t,n,Hb,null,null,l),Ea._currentValue=h),ql(t,n),le(t,n,r,l),n.child;case 6:return t===null&&vt&&((t=l=Lt)&&(l=Tv(l,n.pendingProps,Xe),l!==null?(n.stateNode=l,se=n,Lt=null,t=!0):t=!1),t||Yn(n)),null;case 13:return qd(t,n,l);case 4:return de(n,n.stateNode.containerInfo),r=n.pendingProps,t===null?n.child=Ci(n,null,r,l):le(t,n,r,l),n.child;case 11:return Rd(t,n,n.type,n.pendingProps,l);case 7:return le(t,n,n.pendingProps,l),n.child;case 8:return le(t,n,n.pendingProps.children,l),n.child;case 12:return le(t,n,n.pendingProps.children,l),n.child;case 10:return r=n.pendingProps,qn(n,n.type,r.value),le(t,n,r.children,l),n.child;case 9:return h=n.type._context,r=n.pendingProps.children,Mi(n),h=ae(h),r=r(h),n.flags|=1,le(t,n,r,l),n.child;case 14:return kd(t,n,n.type,n.pendingProps,l);case 15:return Nd(t,n,n.type,n.pendingProps,l);case 19:return Gd(t,n,l);case 31:return Qb(t,n,l);case 22:return Ld(t,n,l,n.pendingProps);case 24:return Mi(n),r=ae(Wt),t===null?(h=Fr(),h===null&&(h=Rt,g=Qr(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),n.memoizedState={parent:r,cache:h},Wr(n),qn(n,Wt,h)):((t.lanes&l)!==0&&(Jr(t,n),aa(n,null,null,l),sa()),h=t.memoizedState,g=n.memoizedState,h.parent!==r?(h={parent:r,cache:r},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),qn(n,Wt,r)):(r=g.cache,qn(n,Wt,r),r!==h.cache&&Gr(n,[Wt],l,!0))),le(t,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function vn(t){t.flags|=4}function wc(t,n,l,r,h){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(bg())t.flags|=8192;else throw Oi=Ol,Kr}else t.flags&=-16777217}function Zd(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!om(n))if(bg())t.flags|=8192;else throw Oi=Ol,Kr}function Gl(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Ef():536870912,t.lanes|=n,vs|=n)}function fa(t,n){if(!vt)switch(t.tailMode){case"hidden":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var r=null;l!==null;)l.alternate!==null&&(r=l),l=l.sibling;r===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ht(t){var n=t.alternate!==null&&t.alternate.child===t.child,l=0,r=0;if(n)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,r|=h.subtreeFlags&65011712,r|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,r|=h.subtreeFlags,r|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=r,t.childLanes=l,n}function Fb(t,n,l){var r=n.pendingProps;switch(Ur(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(n),null;case 1:return Ht(n),null;case 3:return l=n.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),mn(Wt),Qt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ls(n)?vn(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Yr())),Ht(n),null;case 26:var h=n.type,g=n.memoizedState;return t===null?(vn(n),g!==null?(Ht(n),Zd(n,g)):(Ht(n),wc(n,h,null,r,l))):g?g!==t.memoizedState?(vn(n),Ht(n),Zd(n,g)):(Ht(n),n.flags&=-16777217):(t=t.memoizedProps,t!==r&&vn(n),Ht(n),wc(n,h,t,r,l)),null;case 27:if(el(n),l=ot.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(!r){if(n.stateNode===null)throw Error(a(166));return Ht(n),null}t=J.current,ls(n)?Eh(n):(t=$g(h,r,l),n.stateNode=t,vn(n))}return Ht(n),null;case 5:if(el(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(!r){if(n.stateNode===null)throw Error(a(166));return Ht(n),null}if(g=J.current,ls(n))Eh(n);else{var y=ao(ot.current);switch(g){case 1:g=y.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=y.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=y.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?g.multiple=!0:r.size&&(g.size=r.size);break;default:g=typeof r.is=="string"?y.createElement(h,{is:r.is}):y.createElement(h)}}g[ie]=n,g[me]=r;t:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)g.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break t;for(;y.sibling===null;){if(y.return===null||y.return===n)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=g;t:switch(oe(g,h,r),h){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break t;case"img":r=!0;break t;default:r=!1}r&&vn(n)}}return Ht(n),wc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,l),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(a(166));if(t=ot.current,ls(n)){if(t=n.stateNode,l=n.memoizedProps,r=null,h=se,h!==null)switch(h.tag){case 27:case 5:r=h.memoizedProps}t[ie]=n,t=!!(t.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||qg(t.nodeValue,l)),t||Yn(n,!0)}else t=ao(t).createTextNode(r),t[ie]=n,n.stateNode=t}return Ht(n),null;case 31:if(l=n.memoizedState,t===null||t.memoizedState!==null){if(r=ls(n),l!==null){if(t===null){if(!r)throw Error(a(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[ie]=n}else Si(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),t=!1}else l=Yr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return n.flags&256?(we(n),n):(we(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Ht(n),null;case 13:if(r=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=ls(n),r!==null&&r.dehydrated!==null){if(t===null){if(!h)throw Error(a(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[ie]=n}else Si(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),h=!1}else h=Yr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(we(n),n):(we(n),null)}return we(n),(n.flags&128)!==0?(n.lanes=l,n):(l=r!==null,t=t!==null&&t.memoizedState!==null,l&&(r=n.child,h=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(h=r.alternate.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048)),l!==t&&l&&(n.child.flags|=8192),Gl(n,n.updateQueue),Ht(n),null);case 4:return Qt(),t===null&&$c(n.stateNode.containerInfo),Ht(n),null;case 10:return mn(n.type),Ht(n),null;case 19:if(U(Zt),r=n.memoizedState,r===null)return Ht(n),null;if(h=(n.flags&128)!==0,g=r.rendering,g===null)if(h)fa(r,!1);else{if(Xt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=wl(t),g!==null){for(n.flags|=128,fa(r,!1),t=g.updateQueue,n.updateQueue=t,Gl(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)xh(l,t),l=l.sibling;return F(Zt,Zt.current&1|2),vt&&dn(n,r.treeForkCount),n.child}t=t.sibling}r.tail!==null&&Ee()>Wl&&(n.flags|=128,h=!0,fa(r,!1),n.lanes=4194304)}else{if(!h)if(t=wl(g),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Gl(n,t),fa(r,!0),r.tail===null&&r.tailMode==="hidden"&&!g.alternate&&!vt)return Ht(n),null}else 2*Ee()-r.renderingStartTime>Wl&&l!==536870912&&(n.flags|=128,h=!0,fa(r,!1),n.lanes=4194304);r.isBackwards?(g.sibling=n.child,n.child=g):(t=r.last,t!==null?t.sibling=g:n.child=g,r.last=g)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=Ee(),t.sibling=null,l=Zt.current,F(Zt,h?l&1|2:l&1),vt&&dn(n,r.treeForkCount),t):(Ht(n),null);case 22:case 23:return we(n),tc(),r=n.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(l&536870912)!==0&&(n.flags&128)===0&&(Ht(n),n.subtreeFlags&6&&(n.flags|=8192)):Ht(n),l=n.updateQueue,l!==null&&Gl(n,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==l&&(n.flags|=2048),t!==null&&U(Ei),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),mn(Wt),Ht(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function Kb(t,n){switch(Ur(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return mn(Wt),Qt(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return el(n),null;case 31:if(n.memoizedState!==null){if(we(n),n.alternate===null)throw Error(a(340));Si()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(we(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Si()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return U(Zt),null;case 4:return Qt(),null;case 10:return mn(n.type),null;case 22:case 23:return we(n),tc(),t!==null&&U(Ei),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return mn(Wt),null;case 25:return null;default:return null}}function Fd(t,n){switch(Ur(n),n.tag){case 3:mn(Wt),Qt();break;case 26:case 27:case 5:el(n);break;case 4:Qt();break;case 31:n.memoizedState!==null&&we(n);break;case 13:we(n);break;case 19:U(Zt);break;case 10:mn(n.type);break;case 22:case 23:we(n),tc(),t!==null&&U(Ei);break;case 24:mn(Wt)}}function ha(t,n){try{var l=n.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var h=r.next;l=h;do{if((l.tag&t)===t){r=void 0;var g=l.create,y=l.inst;r=g(),y.destroy=r}l=l.next}while(l!==h)}}catch(x){Ct(n,n.return,x)}}function Kn(t,n,l){try{var r=n.updateQueue,h=r!==null?r.lastEffect:null;if(h!==null){var g=h.next;r=g;do{if((r.tag&t)===t){var y=r.inst,x=y.destroy;if(x!==void 0){y.destroy=void 0,h=n;var E=l,j=x;try{j()}catch(H){Ct(h,E,H)}}}r=r.next}while(r!==g)}}catch(H){Ct(n,n.return,H)}}function Kd(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{Bh(n,l)}catch(r){Ct(t,t.return,r)}}}function Wd(t,n,l){l.props=zi(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(r){Ct(t,n,r)}}function da(t,n){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}typeof l=="function"?t.refCleanup=l(r):l.current=r}}catch(h){Ct(t,n,h)}}function en(t,n){var l=t.ref,r=t.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(h){Ct(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Ct(t,n,h)}else l.current=null}function Jd(t){var n=t.type,l=t.memoizedProps,r=t.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break t;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(h){Ct(t,t.return,h)}}function jc(t,n,l){try{var r=t.stateNode;pv(r,t.type,l,n),r[me]=n}catch(h){Ct(t,t.return,h)}}function Id(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ei(t.type)||t.tag===4}function Rc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Id(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ei(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function kc(t,n,l){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(t),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=un));else if(r!==4&&(r===27&&ei(t.type)&&(l=t.stateNode,n=null),t=t.child,t!==null))for(kc(t,n,l),t=t.sibling;t!==null;)kc(t,n,l),t=t.sibling}function Ql(t,n,l){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?l.insertBefore(t,n):l.appendChild(t);else if(r!==4&&(r===27&&ei(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Ql(t,n,l),t=t.sibling;t!==null;)Ql(t,n,l),t=t.sibling}function Pd(t){var n=t.stateNode,l=t.memoizedProps;try{for(var r=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);oe(n,r,l),n[ie]=t,n[me]=l}catch(g){Ct(t,t.return,g)}}var xn=!1,Pt=!1,Nc=!1,$d=typeof WeakSet=="function"?WeakSet:Set,ne=null;function Wb(t,n){if(t=t.containerInfo,nu=ho,t=fh(t),Cr(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var r=l.getSelection&&l.getSelection();if(r&&r.rangeCount!==0){l=r.anchorNode;var h=r.anchorOffset,g=r.focusNode;r=r.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break t}var y=0,x=-1,E=-1,j=0,H=0,V=t,R=null;e:for(;;){for(var N;V!==l||h!==0&&V.nodeType!==3||(x=y+h),V!==g||r!==0&&V.nodeType!==3||(E=y+r),V.nodeType===3&&(y+=V.nodeValue.length),(N=V.firstChild)!==null;)R=V,V=N;for(;;){if(V===t)break e;if(R===l&&++j===h&&(x=y),R===g&&++H===r&&(E=y),(N=V.nextSibling)!==null)break;V=R,R=V.parentNode}V=N}l=x===-1||E===-1?null:{start:x,end:E}}else l=null}l=l||{start:0,end:0}}else l=null;for(iu={focusedElem:t,selectionRange:l},ho=!1,ne=n;ne!==null;)if(n=ne,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,ne=t;else for(;ne!==null;){switch(n=ne,g=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)h=t[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,l=n,h=g.memoizedProps,g=g.memoizedState,r=l.stateNode;try{var I=zi(l.type,h);t=r.getSnapshotBeforeUpdate(I,g),r.__reactInternalSnapshotBeforeUpdate=t}catch(nt){Ct(l,l.return,nt)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,l=t.nodeType,l===9)lu(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":lu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=n.sibling,t!==null){t.return=n.return,ne=t;break}ne=n.return}}function tg(t,n,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:Sn(t,l),r&4&&ha(5,l);break;case 1:if(Sn(t,l),r&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(y){Ct(l,l.return,y)}else{var h=zi(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Ct(l,l.return,y)}}r&64&&Kd(l),r&512&&da(l,l.return);break;case 3:if(Sn(t,l),r&64&&(t=l.updateQueue,t!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Bh(t,n)}catch(y){Ct(l,l.return,y)}}break;case 27:n===null&&r&4&&Pd(l);case 26:case 5:Sn(t,l),n===null&&r&4&&Jd(l),r&512&&da(l,l.return);break;case 12:Sn(t,l);break;case 31:Sn(t,l),r&4&&ig(t,l);break;case 13:Sn(t,l),r&4&&sg(t,l),r&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=sv.bind(null,l),Mv(t,l))));break;case 22:if(r=l.memoizedState!==null||xn,!r){n=n!==null&&n.memoizedState!==null||Pt,h=xn;var g=Pt;xn=r,(Pt=n)&&!g?Tn(t,l,(l.subtreeFlags&8772)!==0):Sn(t,l),xn=h,Pt=g}break;case 30:break;default:Sn(t,l)}}function eg(t){var n=t.alternate;n!==null&&(t.alternate=null,eg(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&fr(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Bt=null,ye=!1;function _n(t,n,l){for(l=l.child;l!==null;)ng(t,n,l),l=l.sibling}function ng(t,n,l){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(Hs,l)}catch{}switch(l.tag){case 26:Pt||en(l,n),_n(t,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Pt||en(l,n);var r=Bt,h=ye;ei(l.type)&&(Bt=l.stateNode,ye=!1),_n(t,n,l),Sa(l.stateNode),Bt=r,ye=h;break;case 5:Pt||en(l,n);case 6:if(r=Bt,h=ye,Bt=null,_n(t,n,l),Bt=r,ye=h,Bt!==null)if(ye)try{(Bt.nodeType===9?Bt.body:Bt.nodeName==="HTML"?Bt.ownerDocument.body:Bt).removeChild(l.stateNode)}catch(g){Ct(l,n,g)}else try{Bt.removeChild(l.stateNode)}catch(g){Ct(l,n,g)}break;case 18:Bt!==null&&(ye?(t=Bt,Kg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Os(t)):Kg(Bt,l.stateNode));break;case 4:r=Bt,h=ye,Bt=l.stateNode.containerInfo,ye=!0,_n(t,n,l),Bt=r,ye=h;break;case 0:case 11:case 14:case 15:Kn(2,l,n),Pt||Kn(4,l,n),_n(t,n,l);break;case 1:Pt||(en(l,n),r=l.stateNode,typeof r.componentWillUnmount=="function"&&Wd(l,n,r)),_n(t,n,l);break;case 21:_n(t,n,l);break;case 22:Pt=(r=Pt)||l.memoizedState!==null,_n(t,n,l),Pt=r;break;default:_n(t,n,l)}}function ig(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Os(t)}catch(l){Ct(n,n.return,l)}}}function sg(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Os(t)}catch(l){Ct(n,n.return,l)}}function Jb(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new $d),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new $d),n;default:throw Error(a(435,t.tag))}}function Zl(t,n){var l=Jb(t);n.forEach(function(r){if(!l.has(r)){l.add(r);var h=av.bind(null,t,r);r.then(h,h)}})}function be(t,n){var l=n.deletions;if(l!==null)for(var r=0;r<l.length;r++){var h=l[r],g=t,y=n,x=y;t:for(;x!==null;){switch(x.tag){case 27:if(ei(x.type)){Bt=x.stateNode,ye=!1;break t}break;case 5:Bt=x.stateNode,ye=!1;break t;case 3:case 4:Bt=x.stateNode.containerInfo,ye=!0;break t}x=x.return}if(Bt===null)throw Error(a(160));ng(g,y,h),Bt=null,ye=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)ag(n,t),n=n.sibling}var Je=null;function ag(t,n){var l=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:be(n,t),ve(t),r&4&&(Kn(3,t,t.return),ha(3,t),Kn(5,t,t.return));break;case 1:be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),r&64&&xn&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?r:l.concat(r))));break;case 26:var h=Je;if(be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),r&4){var g=l!==null?l.memoizedState:null;if(r=t.memoizedState,l===null)if(r===null)if(t.stateNode===null){t:{r=t.type,l=t.memoizedProps,h=h.ownerDocument||h;e:switch(r){case"title":g=h.getElementsByTagName("title")[0],(!g||g[Vs]||g[ie]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(r),h.head.insertBefore(g,h.querySelector("head > title"))),oe(g,r,l),g[ie]=t,ee(g),r=g;break t;case"link":var y=am("link","href",h).get(r+(l.href||""));if(y){for(var x=0;x<y.length;x++)if(g=y[x],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(x,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;case"meta":if(y=am("meta","content",h).get(r+(l.content||""))){for(x=0;x<y.length;x++)if(g=y[x],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(x,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;default:throw Error(a(468,r))}g[ie]=t,ee(g),r=g}t.stateNode=r}else lm(h,t.type,t.stateNode);else t.stateNode=sm(h,r,t.memoizedProps);else g!==r?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,r===null?lm(h,t.type,t.stateNode):sm(h,r,t.memoizedProps)):r===null&&t.stateNode!==null&&jc(t,t.memoizedProps,l.memoizedProps)}break;case 27:be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),l!==null&&r&4&&jc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),t.flags&32){h=t.stateNode;try{Ji(h,"")}catch(I){Ct(t,t.return,I)}}r&4&&t.stateNode!=null&&(h=t.memoizedProps,jc(t,h,l!==null?l.memoizedProps:h)),r&1024&&(Nc=!0);break;case 6:if(be(n,t),ve(t),r&4){if(t.stateNode===null)throw Error(a(162));r=t.memoizedProps,l=t.stateNode;try{l.nodeValue=r}catch(I){Ct(t,t.return,I)}}break;case 3:if(ro=null,h=Je,Je=lo(n.containerInfo),be(n,t),Je=h,ve(t),r&4&&l!==null&&l.memoizedState.isDehydrated)try{Os(n.containerInfo)}catch(I){Ct(t,t.return,I)}Nc&&(Nc=!1,lg(t));break;case 4:r=Je,Je=lo(t.stateNode.containerInfo),be(n,t),ve(t),Je=r;break;case 12:be(n,t),ve(t);break;case 31:be(n,t),ve(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Zl(t,r)));break;case 13:be(n,t),ve(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Kl=Ee()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Zl(t,r)));break;case 22:h=t.memoizedState!==null;var E=l!==null&&l.memoizedState!==null,j=xn,H=Pt;if(xn=j||h,Pt=H||E,be(n,t),Pt=H,xn=j,ve(t),r&8192)t:for(n=t.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(l===null||E||xn||Pt||wi(t)),l=null,n=t;;){if(n.tag===5||n.tag===26){if(l===null){E=l=n;try{if(g=E.stateNode,h)y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{x=E.stateNode;var V=E.memoizedProps.style,R=V!=null&&V.hasOwnProperty("display")?V.display:null;x.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(I){Ct(E,E.return,I)}}}else if(n.tag===6){if(l===null){E=n;try{E.stateNode.nodeValue=h?"":E.memoizedProps}catch(I){Ct(E,E.return,I)}}}else if(n.tag===18){if(l===null){E=n;try{var N=E.stateNode;h?Wg(N,!0):Wg(E.stateNode,!1)}catch(I){Ct(E,E.return,I)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break t;for(;n.sibling===null;){if(n.return===null||n.return===t)break t;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}r&4&&(r=t.updateQueue,r!==null&&(l=r.retryQueue,l!==null&&(r.retryQueue=null,Zl(t,l))));break;case 19:be(n,t),ve(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Zl(t,r)));break;case 30:break;case 21:break;default:be(n,t),ve(t)}}function ve(t){var n=t.flags;if(n&2){try{for(var l,r=t.return;r!==null;){if(Id(r)){l=r;break}r=r.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var h=l.stateNode,g=Rc(t);Ql(t,g,h);break;case 5:var y=l.stateNode;l.flags&32&&(Ji(y,""),l.flags&=-33);var x=Rc(t);Ql(t,x,y);break;case 3:case 4:var E=l.stateNode.containerInfo,j=Rc(t);kc(t,j,E);break;default:throw Error(a(161))}}catch(H){Ct(t,t.return,H)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function lg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;lg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Sn(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)tg(t,n.alternate,n),n=n.sibling}function wi(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Kn(4,n,n.return),wi(n);break;case 1:en(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Wd(n,n.return,l),wi(n);break;case 27:Sa(n.stateNode);case 26:case 5:en(n,n.return),wi(n);break;case 22:n.memoizedState===null&&wi(n);break;case 30:wi(n);break;default:wi(n)}t=t.sibling}}function Tn(t,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var r=n.alternate,h=t,g=n,y=g.flags;switch(g.tag){case 0:case 11:case 15:Tn(h,g,l),ha(4,g);break;case 1:if(Tn(h,g,l),r=g,h=r.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(j){Ct(r,r.return,j)}if(r=g,h=r.updateQueue,h!==null){var x=r.stateNode;try{var E=h.shared.hiddenCallbacks;if(E!==null)for(h.shared.hiddenCallbacks=null,h=0;h<E.length;h++)Hh(E[h],x)}catch(j){Ct(r,r.return,j)}}l&&y&64&&Kd(g),da(g,g.return);break;case 27:Pd(g);case 26:case 5:Tn(h,g,l),l&&r===null&&y&4&&Jd(g),da(g,g.return);break;case 12:Tn(h,g,l);break;case 31:Tn(h,g,l),l&&y&4&&ig(h,g);break;case 13:Tn(h,g,l),l&&y&4&&sg(h,g);break;case 22:g.memoizedState===null&&Tn(h,g,l),da(g,g.return);break;case 30:break;default:Tn(h,g,l)}n=n.sibling}}function Lc(t,n){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&$s(l))}function Hc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&$s(t))}function Ie(t,n,l,r){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)og(t,n,l,r),n=n.sibling}function og(t,n,l,r){var h=n.flags;switch(n.tag){case 0:case 11:case 15:Ie(t,n,l,r),h&2048&&ha(9,n);break;case 1:Ie(t,n,l,r);break;case 3:Ie(t,n,l,r),h&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&$s(t)));break;case 12:if(h&2048){Ie(t,n,l,r),t=n.stateNode;try{var g=n.memoizedProps,y=g.id,x=g.onPostCommit;typeof x=="function"&&x(y,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(E){Ct(n,n.return,E)}}else Ie(t,n,l,r);break;case 31:Ie(t,n,l,r);break;case 13:Ie(t,n,l,r);break;case 23:break;case 22:g=n.stateNode,y=n.alternate,n.memoizedState!==null?g._visibility&2?Ie(t,n,l,r):ga(t,n):g._visibility&2?Ie(t,n,l,r):(g._visibility|=2,ps(t,n,l,r,(n.subtreeFlags&10256)!==0||!1)),h&2048&&Lc(y,n);break;case 24:Ie(t,n,l,r),h&2048&&Hc(n.alternate,n);break;default:Ie(t,n,l,r)}}function ps(t,n,l,r,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,y=n,x=l,E=r,j=y.flags;switch(y.tag){case 0:case 11:case 15:ps(g,y,x,E,h),ha(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?ps(g,y,x,E,h):ga(g,y):(H._visibility|=2,ps(g,y,x,E,h)),h&&j&2048&&Lc(y.alternate,y);break;case 24:ps(g,y,x,E,h),h&&j&2048&&Hc(y.alternate,y);break;default:ps(g,y,x,E,h)}n=n.sibling}}function ga(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=t,r=n,h=r.flags;switch(r.tag){case 22:ga(l,r),h&2048&&Lc(r.alternate,r);break;case 24:ga(l,r),h&2048&&Hc(r.alternate,r);break;default:ga(l,r)}n=n.sibling}}var ma=8192;function ys(t,n,l){if(t.subtreeFlags&ma)for(t=t.child;t!==null;)rg(t,n,l),t=t.sibling}function rg(t,n,l){switch(t.tag){case 26:ys(t,n,l),t.flags&ma&&t.memoizedState!==null&&Lv(l,Je,t.memoizedState,t.memoizedProps);break;case 5:ys(t,n,l);break;case 3:case 4:var r=Je;Je=lo(t.stateNode.containerInfo),ys(t,n,l),Je=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ma,ma=16777216,ys(t,n,l),ma=r):ys(t,n,l));break;default:ys(t,n,l)}}function cg(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function pa(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var r=n[l];ne=r,fg(r,t)}cg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ug(t),t=t.sibling}function ug(t){switch(t.tag){case 0:case 11:case 15:pa(t),t.flags&2048&&Kn(9,t,t.return);break;case 3:pa(t);break;case 12:pa(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Fl(t)):pa(t);break;default:pa(t)}}function Fl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var r=n[l];ne=r,fg(r,t)}cg(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Kn(8,n,n.return),Fl(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Fl(n));break;default:Fl(n)}t=t.sibling}}function fg(t,n){for(;ne!==null;){var l=ne;switch(l.tag){case 0:case 11:case 15:Kn(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var r=l.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:$s(l.memoizedState.cache)}if(r=l.child,r!==null)r.return=l,ne=r;else t:for(l=t;ne!==null;){r=ne;var h=r.sibling,g=r.return;if(eg(r),r===l){ne=null;break t}if(h!==null){h.return=g,ne=h;break t}ne=g}}}var Ib={getCacheForType:function(t){var n=ae(Wt),l=n.data.get(t);return l===void 0&&(l=t(),n.data.set(t,l)),l},cacheSignal:function(){return ae(Wt).controller.signal}},Pb=typeof WeakMap=="function"?WeakMap:Map,Mt=0,Rt=null,gt=null,yt=0,Ot=0,je=null,Wn=!1,bs=!1,Bc=!1,Mn=0,Xt=0,Jn=0,ji=0,Uc=0,Re=0,vs=0,ya=null,xe=null,Vc=!1,Kl=0,hg=0,Wl=1/0,Jl=null,In=null,$t=0,Pn=null,xs=null,En=0,Yc=0,qc=null,dg=null,ba=0,Xc=null;function ke(){return(Mt&2)!==0&&yt!==0?yt&-yt:k.T!==null?Wc():Df()}function gg(){if(Re===0)if((yt&536870912)===0||vt){var t=sl;sl<<=1,(sl&3932160)===0&&(sl=262144),Re=t}else Re=536870912;return t=ze.current,t!==null&&(t.flags|=32),Re}function _e(t,n,l){(t===Rt&&(Ot===2||Ot===9)||t.cancelPendingCommit!==null)&&(_s(t,0),$n(t,yt,Re,!1)),Us(t,l),((Mt&2)===0||t!==Rt)&&(t===Rt&&((Mt&2)===0&&(ji|=l),Xt===4&&$n(t,yt,Re,!1)),nn(t))}function mg(t,n,l){if((Mt&6)!==0)throw Error(a(327));var r=!l&&(n&127)===0&&(n&t.expiredLanes)===0||Bs(t,n),h=r?ev(t,n):Qc(t,n,!0),g=r;do{if(h===0){bs&&!r&&$n(t,n,0,!1);break}else{if(l=t.current.alternate,g&&!$b(l)){h=Qc(t,n,!1),g=!1;continue}if(h===2){if(g=n,t.errorRecoveryDisabledLanes&g)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;t:{var x=t;h=ya;var E=x.current.memoizedState.isDehydrated;if(E&&(_s(x,y).flags|=256),y=Qc(x,y,!1),y!==2){if(Bc&&!E){x.errorRecoveryDisabledLanes|=g,ji|=g,h=4;break t}g=xe,xe=h,g!==null&&(xe===null?xe=g:xe.push.apply(xe,g))}h=y}if(g=!1,h!==2)continue}}if(h===1){_s(t,0),$n(t,n,0,!0);break}t:{switch(r=t,g=h,g){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:$n(r,n,Re,!Wn);break t;case 2:xe=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(h=Kl+300-Ee(),10<h)){if($n(r,n,Re,!Wn),ll(r,0,!0)!==0)break t;En=n,r.timeoutHandle=Zg(pg.bind(null,r,l,xe,Jl,Vc,n,Re,ji,vs,Wn,g,"Throttled",-0,0),h);break t}pg(r,l,xe,Jl,Vc,n,Re,ji,vs,Wn,g,null,-0,0)}}break}while(!0);nn(t)}function pg(t,n,l,r,h,g,y,x,E,j,H,V,R,N){if(t.timeoutHandle=-1,V=n.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},rg(n,g,V);var I=(g&62914560)===g?Kl-Ee():(g&4194048)===g?hg-Ee():0;if(I=Hv(V,I),I!==null){En=g,t.cancelPendingCommit=I(Mg.bind(null,t,n,g,l,r,h,y,x,E,H,V,null,R,N)),$n(t,g,y,!j);return}}Mg(t,n,g,l,r,h,y,x,E)}function $b(t){for(var n=t;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var r=0;r<l.length;r++){var h=l[r],g=h.getSnapshot;h=h.value;try{if(!Ce(g(),h))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function $n(t,n,l,r){n&=~Uc,n&=~ji,t.suspendedLanes|=n,t.pingedLanes&=~n,r&&(t.warmLanes|=n),r=t.expirationTimes;for(var h=n;0<h;){var g=31-Oe(h),y=1<<g;r[g]=-1,h&=~y}l!==0&&Af(t,l,n)}function Il(){return(Mt&6)===0?(va(0),!1):!0}function Gc(){if(gt!==null){if(Ot===0)var t=gt.return;else t=gt,gn=Ti=null,lc(t),fs=null,ea=0,t=gt;for(;t!==null;)Fd(t.alternate,t),t=t.return;gt=null}}function _s(t,n){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,vv(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),En=0,Gc(),Rt=t,gt=l=hn(t.current,null),yt=n,Ot=0,je=null,Wn=!1,bs=Bs(t,n),Bc=!1,vs=Re=Uc=ji=Jn=Xt=0,xe=ya=null,Vc=!1,(n&8)!==0&&(n|=n&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=n;0<r;){var h=31-Oe(r),g=1<<h;n|=t[h],r&=~g}return Mn=n,bl(),l}function yg(t,n){ut=null,k.H=ca,n===us||n===Al?(n=Rh(),Ot=3):n===Kr?(n=Rh(),Ot=4):Ot=n===Sc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,je=n,gt===null&&(Xt=1,Vl(t,Ve(n,t.current)))}function bg(){var t=ze.current;return t===null?!0:(yt&4194048)===yt?Ge===null:(yt&62914560)===yt||(yt&536870912)!==0?t===Ge:!1}function vg(){var t=k.H;return k.H=ca,t===null?ca:t}function xg(){var t=k.A;return k.A=Ib,t}function Pl(){Xt=4,Wn||(yt&4194048)!==yt&&ze.current!==null||(bs=!0),(Jn&134217727)===0&&(ji&134217727)===0||Rt===null||$n(Rt,yt,Re,!1)}function Qc(t,n,l){var r=Mt;Mt|=2;var h=vg(),g=xg();(Rt!==t||yt!==n)&&(Jl=null,_s(t,n)),n=!1;var y=Xt;t:do try{if(Ot!==0&>!==null){var x=gt,E=je;switch(Ot){case 8:Gc(),y=6;break t;case 3:case 2:case 9:case 6:ze.current===null&&(n=!0);var j=Ot;if(Ot=0,je=null,Ss(t,x,E,j),l&&bs){y=0;break t}break;default:j=Ot,Ot=0,je=null,Ss(t,x,E,j)}}tv(),y=Xt;break}catch(H){yg(t,H)}while(!0);return n&&t.shellSuspendCounter++,gn=Ti=null,Mt=r,k.H=h,k.A=g,gt===null&&(Rt=null,yt=0,bl()),y}function tv(){for(;gt!==null;)_g(gt)}function ev(t,n){var l=Mt;Mt|=2;var r=vg(),h=xg();Rt!==t||yt!==n?(Jl=null,Wl=Ee()+500,_s(t,n)):bs=Bs(t,n);t:do try{if(Ot!==0&>!==null){n=gt;var g=je;e:switch(Ot){case 1:Ot=0,je=null,Ss(t,n,g,1);break;case 2:case 9:if(wh(g)){Ot=0,je=null,Sg(n);break}n=function(){Ot!==2&&Ot!==9||Rt!==t||(Ot=7),nn(t)},g.then(n,n);break t;case 3:Ot=7;break t;case 4:Ot=5;break t;case 7:wh(g)?(Ot=0,je=null,Sg(n)):(Ot=0,je=null,Ss(t,n,g,7));break;case 5:var y=null;switch(gt.tag){case 26:y=gt.memoizedState;case 5:case 27:var x=gt;if(y?om(y):x.stateNode.complete){Ot=0,je=null;var E=x.sibling;if(E!==null)gt=E;else{var j=x.return;j!==null?(gt=j,$l(j)):gt=null}break e}}Ot=0,je=null,Ss(t,n,g,5);break;case 6:Ot=0,je=null,Ss(t,n,g,6);break;case 8:Gc(),Xt=6;break t;default:throw Error(a(462))}}nv();break}catch(H){yg(t,H)}while(!0);return gn=Ti=null,k.H=r,k.A=h,Mt=l,gt!==null?0:(Rt=null,yt=0,bl(),Xt)}function nv(){for(;gt!==null&&!Ey();)_g(gt)}function _g(t){var n=Qd(t.alternate,t,Mn);t.memoizedProps=t.pendingProps,n===null?$l(t):gt=n}function Sg(t){var n=t,l=n.alternate;switch(n.tag){case 15:case 0:n=Ud(l,n,n.pendingProps,n.type,void 0,yt);break;case 11:n=Ud(l,n,n.pendingProps,n.type.render,n.ref,yt);break;case 5:lc(n);default:Fd(l,n),n=gt=xh(n,Mn),n=Qd(l,n,Mn)}t.memoizedProps=t.pendingProps,n===null?$l(t):gt=n}function Ss(t,n,l,r){gn=Ti=null,lc(n),fs=null,ea=0;var h=n.return;try{if(Gb(t,h,n,l,yt)){Xt=1,Vl(t,Ve(l,t.current)),gt=null;return}}catch(g){if(h!==null)throw gt=h,g;Xt=1,Vl(t,Ve(l,t.current)),gt=null;return}n.flags&32768?(vt||r===1?t=!0:bs||(yt&536870912)!==0?t=!1:(Wn=t=!0,(r===2||r===9||r===3||r===6)&&(r=ze.current,r!==null&&r.tag===13&&(r.flags|=16384))),Tg(n,t)):$l(n)}function $l(t){var n=t;do{if((n.flags&32768)!==0){Tg(n,Wn);return}t=n.return;var l=Fb(n.alternate,n,Mn);if(l!==null){gt=l;return}if(n=n.sibling,n!==null){gt=n;return}gt=n=t}while(n!==null);Xt===0&&(Xt=5)}function Tg(t,n){do{var l=Kb(t.alternate,t);if(l!==null){l.flags&=32767,gt=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(t=t.sibling,t!==null)){gt=t;return}gt=t=l}while(t!==null);Xt=6,gt=null}function Mg(t,n,l,r,h,g,y,x,E){t.cancelPendingCommit=null;do to();while($t!==0);if((Mt&6)!==0)throw Error(a(327));if(n!==null){if(n===t.current)throw Error(a(177));if(g=n.lanes|n.childLanes,g|=Rr,Ny(t,l,g,y,x,E),t===Rt&&(gt=Rt=null,yt=0),xs=n,Pn=t,En=l,Yc=g,qc=h,dg=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,lv(nl,function(){return Dg(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=k.T,k.T=null,h=Q.p,Q.p=2,y=Mt,Mt|=4;try{Wb(t,n,l)}finally{Mt=y,Q.p=h,k.T=r}}$t=1,Eg(),Ag(),Og()}}function Eg(){if($t===1){$t=0;var t=Pn,n=xs,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var r=Q.p;Q.p=2;var h=Mt;Mt|=4;try{ag(n,t);var g=iu,y=fh(t.containerInfo),x=g.focusedElem,E=g.selectionRange;if(y!==x&&x&&x.ownerDocument&&uh(x.ownerDocument.documentElement,x)){if(E!==null&&Cr(x)){var j=E.start,H=E.end;if(H===void 0&&(H=j),"selectionStart"in x)x.selectionStart=j,x.selectionEnd=Math.min(H,x.value.length);else{var V=x.ownerDocument||document,R=V&&V.defaultView||window;if(R.getSelection){var N=R.getSelection(),I=x.textContent.length,nt=Math.min(E.start,I),jt=E.end===void 0?nt:Math.min(E.end,I);!N.extend&&nt>jt&&(y=jt,jt=nt,nt=y);var z=ch(x,nt),O=ch(x,jt);if(z&&O&&(N.rangeCount!==1||N.anchorNode!==z.node||N.anchorOffset!==z.offset||N.focusNode!==O.node||N.focusOffset!==O.offset)){var w=V.createRange();w.setStart(z.node,z.offset),N.removeAllRanges(),nt>jt?(N.addRange(w),N.extend(O.node,O.offset)):(w.setEnd(O.node,O.offset),N.addRange(w))}}}}for(V=[],N=x;N=N.parentNode;)N.nodeType===1&&V.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<V.length;x++){var B=V[x];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}ho=!!nu,iu=nu=null}finally{Mt=h,Q.p=r,k.T=l}}t.current=n,$t=2}}function Ag(){if($t===2){$t=0;var t=Pn,n=xs,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var r=Q.p;Q.p=2;var h=Mt;Mt|=4;try{tg(t,n.alternate,n)}finally{Mt=h,Q.p=r,k.T=l}}$t=3}}function Og(){if($t===4||$t===3){$t=0,Ay();var t=Pn,n=xs,l=En,r=dg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?$t=5:($t=0,xs=Pn=null,Cg(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(In=null),cr(l),n=n.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(Hs,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=k.T,h=Q.p,Q.p=2,k.T=null;try{for(var g=t.onRecoverableError,y=0;y<r.length;y++){var x=r[y];g(x.value,{componentStack:x.stack})}}finally{k.T=n,Q.p=h}}(En&3)!==0&&to(),nn(t),h=t.pendingLanes,(l&261930)!==0&&(h&42)!==0?t===Xc?ba++:(ba=0,Xc=t):ba=0,va(0)}}function Cg(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,$s(n)))}function to(){return Eg(),Ag(),Og(),Dg()}function Dg(){if($t!==5)return!1;var t=Pn,n=Yc;Yc=0;var l=cr(En),r=k.T,h=Q.p;try{Q.p=32>l?32:l,k.T=null,l=qc,qc=null;var g=Pn,y=En;if($t=0,xs=Pn=null,En=0,(Mt&6)!==0)throw Error(a(331));var x=Mt;if(Mt|=4,ug(g.current),og(g,g.current,y,l),Mt=x,va(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(Hs,g)}catch{}return!0}finally{Q.p=h,k.T=r,Cg(t,n)}}function zg(t,n,l){n=Ve(l,n),n=_c(t.stateNode,n,2),t=Qn(t,n,2),t!==null&&(Us(t,2),nn(t))}function Ct(t,n,l){if(t.tag===3)zg(t,t,l);else for(;n!==null;){if(n.tag===3){zg(n,t,l);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(In===null||!In.has(r))){t=Ve(l,t),l=wd(2),r=Qn(n,l,2),r!==null&&(jd(l,r,n,t),Us(r,2),nn(r));break}}n=n.return}}function Zc(t,n,l){var r=t.pingCache;if(r===null){r=t.pingCache=new Pb;var h=new Set;r.set(n,h)}else h=r.get(n),h===void 0&&(h=new Set,r.set(n,h));h.has(l)||(Bc=!0,h.add(l),t=iv.bind(null,t,n,l),n.then(t,t))}function iv(t,n,l){var r=t.pingCache;r!==null&&r.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Rt===t&&(yt&l)===l&&(Xt===4||Xt===3&&(yt&62914560)===yt&&300>Ee()-Kl?(Mt&2)===0&&_s(t,0):Uc|=l,vs===yt&&(vs=0)),nn(t)}function wg(t,n){n===0&&(n=Ef()),t=xi(t,n),t!==null&&(Us(t,n),nn(t))}function sv(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),wg(t,l)}function av(t,n){var l=0;switch(t.tag){case 31:case 13:var r=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(n),wg(t,l)}function lv(t,n){return ar(t,n)}var eo=null,Ts=null,Fc=!1,no=!1,Kc=!1,ti=0;function nn(t){t!==Ts&&t.next===null&&(Ts===null?eo=Ts=t:Ts=Ts.next=t),no=!0,Fc||(Fc=!0,rv())}function va(t,n){if(!Kc&&no){Kc=!0;do for(var l=!1,r=eo;r!==null;){if(t!==0){var h=r.pendingLanes;if(h===0)var g=0;else{var y=r.suspendedLanes,x=r.pingedLanes;g=(1<<31-Oe(42|t)+1)-1,g&=h&~(y&~x),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,Ng(r,g))}else g=yt,g=ll(r,r===Rt?g:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(g&3)===0||Bs(r,g)||(l=!0,Ng(r,g));r=r.next}while(l);Kc=!1}}function ov(){jg()}function jg(){no=Fc=!1;var t=0;ti!==0&&bv()&&(t=ti);for(var n=Ee(),l=null,r=eo;r!==null;){var h=r.next,g=Rg(r,n);g===0?(r.next=null,l===null?eo=h:l.next=h,h===null&&(Ts=l)):(l=r,(t!==0||(g&3)!==0)&&(no=!0)),r=h}$t!==0&&$t!==5||va(t),ti!==0&&(ti=0)}function Rg(t,n){for(var l=t.suspendedLanes,r=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var y=31-Oe(g),x=1<<y,E=h[y];E===-1?((x&l)===0||(x&r)!==0)&&(h[y]=ky(x,n)):E<=n&&(t.expiredLanes|=x),g&=~x}if(n=Rt,l=yt,l=ll(t,t===n?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,l===0||t===n&&(Ot===2||Ot===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&lr(r),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Bs(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(r!==null&&lr(r),cr(l)){case 2:case 8:l=Tf;break;case 32:l=nl;break;case 268435456:l=Mf;break;default:l=nl}return r=kg.bind(null,t),l=ar(l,r),t.callbackPriority=n,t.callbackNode=l,n}return r!==null&&r!==null&&lr(r),t.callbackPriority=2,t.callbackNode=null,2}function kg(t,n){if($t!==0&&$t!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(to()&&t.callbackNode!==l)return null;var r=yt;return r=ll(t,t===Rt?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(mg(t,r,n),Rg(t,Ee()),t.callbackNode!=null&&t.callbackNode===l?kg.bind(null,t):null)}function Ng(t,n){if(to())return null;mg(t,n,!0)}function rv(){xv(function(){(Mt&6)!==0?ar(Sf,ov):jg()})}function Wc(){if(ti===0){var t=rs;t===0&&(t=il,il<<=1,(il&261888)===0&&(il=256)),ti=t}return ti}function Lg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ul(""+t)}function Hg(t,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,t.id&&l.setAttribute("form",t.id),n.parentNode.insertBefore(l,n),t=new FormData(t),l.parentNode.removeChild(l),t}function cv(t,n,l,r,h){if(n==="submit"&&l&&l.stateNode===h){var g=Lg((h[me]||null).action),y=r.submitter;y&&(n=(n=y[me]||null)?Lg(n.formAction):y.getAttribute("formAction"),n!==null&&(g=n,y=null));var x=new gl("action","action",null,r,h);t.push({event:x,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ti!==0){var E=y?Hg(h,y):new FormData(h);mc(l,{pending:!0,data:E,method:h.method,action:g},null,E)}}else typeof g=="function"&&(x.preventDefault(),E=y?Hg(h,y):new FormData(h),mc(l,{pending:!0,data:E,method:h.method,action:g},g,E))},currentTarget:h}]})}}for(var Jc=0;Jc<jr.length;Jc++){var Ic=jr[Jc],uv=Ic.toLowerCase(),fv=Ic[0].toUpperCase()+Ic.slice(1);We(uv,"on"+fv)}We(gh,"onAnimationEnd"),We(mh,"onAnimationIteration"),We(ph,"onAnimationStart"),We("dblclick","onDoubleClick"),We("focusin","onFocus"),We("focusout","onBlur"),We(Ob,"onTransitionRun"),We(Cb,"onTransitionStart"),We(Db,"onTransitionCancel"),We(yh,"onTransitionEnd"),Ki("onMouseEnter",["mouseout","mouseover"]),Ki("onMouseLeave",["mouseout","mouseover"]),Ki("onPointerEnter",["pointerout","pointerover"]),Ki("onPointerLeave",["pointerout","pointerover"]),pi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pi("onBeforeInput",["compositionend","keypress","textInput","paste"]),pi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),hv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xa));function Bg(t,n){n=(n&4)!==0;for(var l=0;l<t.length;l++){var r=t[l],h=r.event;r=r.listeners;t:{var g=void 0;if(n)for(var y=r.length-1;0<=y;y--){var x=r[y],E=x.instance,j=x.currentTarget;if(x=x.listener,E!==g&&h.isPropagationStopped())break t;g=x,h.currentTarget=j;try{g(h)}catch(H){yl(H)}h.currentTarget=null,g=E}else for(y=0;y<r.length;y++){if(x=r[y],E=x.instance,j=x.currentTarget,x=x.listener,E!==g&&h.isPropagationStopped())break t;g=x,h.currentTarget=j;try{g(h)}catch(H){yl(H)}h.currentTarget=null,g=E}}}}function mt(t,n){var l=n[ur];l===void 0&&(l=n[ur]=new Set);var r=t+"__bubble";l.has(r)||(Ug(n,t,2,!1),l.add(r))}function Pc(t,n,l){var r=0;n&&(r|=4),Ug(l,t,r,n)}var io="_reactListening"+Math.random().toString(36).slice(2);function $c(t){if(!t[io]){t[io]=!0,jf.forEach(function(l){l!=="selectionchange"&&(hv.has(l)||Pc(l,!1,t),Pc(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[io]||(n[io]=!0,Pc("selectionchange",!1,n))}}function Ug(t,n,l,r){switch(gm(n)){case 2:var h=Vv;break;case 8:h=Yv;break;default:h=gu}l=h.bind(null,n,l,t),h=void 0,!vr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),r?h!==void 0?t.addEventListener(n,l,{capture:!0,passive:h}):t.addEventListener(n,l,!0):h!==void 0?t.addEventListener(n,l,{passive:h}):t.addEventListener(n,l,!1)}function tu(t,n,l,r,h){var g=r;if((n&1)===0&&(n&2)===0&&r!==null)t:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var x=r.stateNode.containerInfo;if(x===h)break;if(y===4)for(y=r.return;y!==null;){var E=y.tag;if((E===3||E===4)&&y.stateNode.containerInfo===h)return;y=y.return}for(;x!==null;){if(y=Qi(x),y===null)return;if(E=y.tag,E===5||E===6||E===26||E===27){r=g=y;continue t}x=x.parentNode}}r=r.return}Gf(function(){var j=g,H=yr(l),V=[];t:{var R=bh.get(t);if(R!==void 0){var N=gl,I=t;switch(t){case"keypress":if(hl(l)===0)break t;case"keydown":case"keyup":N=ab;break;case"focusin":I="focus",N=Tr;break;case"focusout":I="blur",N=Tr;break;case"beforeblur":case"afterblur":N=Tr;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":N=Ff;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":N=Fy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":N=rb;break;case gh:case mh:case ph:N=Jy;break;case yh:N=ub;break;case"scroll":case"scrollend":N=Qy;break;case"wheel":N=hb;break;case"copy":case"cut":case"paste":N=Py;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":N=Wf;break;case"toggle":case"beforetoggle":N=gb}var nt=(n&4)!==0,jt=!nt&&(t==="scroll"||t==="scrollend"),z=nt?R!==null?R+"Capture":null:R;nt=[];for(var O=j,w;O!==null;){var B=O;if(w=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||w===null||z===null||(B=qs(O,z),B!=null&&nt.push(_a(O,B,w))),jt)break;O=O.return}0<nt.length&&(R=new N(R,I,null,l,H),V.push({event:R,listeners:nt}))}}if((n&7)===0){t:{if(R=t==="mouseover"||t==="pointerover",N=t==="mouseout"||t==="pointerout",R&&l!==pr&&(I=l.relatedTarget||l.fromElement)&&(Qi(I)||I[Gi]))break t;if((N||R)&&(R=H.window===H?H:(R=H.ownerDocument)?R.defaultView||R.parentWindow:window,N?(I=l.relatedTarget||l.toElement,N=j,I=I?Qi(I):null,I!==null&&(jt=c(I),nt=I.tag,I!==jt||nt!==5&&nt!==27&&nt!==6)&&(I=null)):(N=null,I=j),N!==I)){if(nt=Ff,B="onMouseLeave",z="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(nt=Wf,B="onPointerLeave",z="onPointerEnter",O="pointer"),jt=N==null?R:Ys(N),w=I==null?R:Ys(I),R=new nt(B,O+"leave",N,l,H),R.target=jt,R.relatedTarget=w,B=null,Qi(H)===j&&(nt=new nt(z,O+"enter",I,l,H),nt.target=w,nt.relatedTarget=jt,B=nt),jt=B,N&&I)e:{for(nt=dv,z=N,O=I,w=0,B=z;B;B=nt(B))w++;B=0;for(var et=O;et;et=nt(et))B++;for(;0<w-B;)z=nt(z),w--;for(;0<B-w;)O=nt(O),B--;for(;w--;){if(z===O||O!==null&&z===O.alternate){nt=z;break e}z=nt(z),O=nt(O)}nt=null}else nt=null;N!==null&&Vg(V,R,N,nt,!1),I!==null&&jt!==null&&Vg(V,jt,I,nt,!0)}}t:{if(R=j?Ys(j):window,N=R.nodeName&&R.nodeName.toLowerCase(),N==="select"||N==="input"&&R.type==="file")var St=ih;else if(eh(R))if(sh)St=Mb;else{St=Sb;var P=_b}else N=R.nodeName,!N||N.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?j&&mr(j.elementType)&&(St=ih):St=Tb;if(St&&(St=St(t,j))){nh(V,St,l,H);break t}P&&P(t,R,j),t==="focusout"&&j&&R.type==="number"&&j.memoizedProps.value!=null&&gr(R,"number",R.value)}switch(P=j?Ys(j):window,t){case"focusin":(eh(P)||P.contentEditable==="true")&&(ts=P,Dr=j,Js=null);break;case"focusout":Js=Dr=ts=null;break;case"mousedown":zr=!0;break;case"contextmenu":case"mouseup":case"dragend":zr=!1,hh(V,l,H);break;case"selectionchange":if(Ab)break;case"keydown":case"keyup":hh(V,l,H)}var ft;if(Er)t:{switch(t){case"compositionstart":var bt="onCompositionStart";break t;case"compositionend":bt="onCompositionEnd";break t;case"compositionupdate":bt="onCompositionUpdate";break t}bt=void 0}else $i?$f(t,l)&&(bt="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(bt="onCompositionStart");bt&&(Jf&&l.locale!=="ko"&&($i||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&$i&&(ft=Qf()):(Bn=H,xr="value"in Bn?Bn.value:Bn.textContent,$i=!0)),P=so(j,bt),0<P.length&&(bt=new Kf(bt,t,null,l,H),V.push({event:bt,listeners:P}),ft?bt.data=ft:(ft=th(l),ft!==null&&(bt.data=ft)))),(ft=pb?yb(t,l):bb(t,l))&&(bt=so(j,"onBeforeInput"),0<bt.length&&(P=new Kf("onBeforeInput","beforeinput",null,l,H),V.push({event:P,listeners:bt}),P.data=ft)),cv(V,t,j,l,H)}Bg(V,n)})}function _a(t,n,l){return{instance:t,listener:n,currentTarget:l}}function so(t,n){for(var l=n+"Capture",r=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=qs(t,l),h!=null&&r.unshift(_a(t,h,g)),h=qs(t,n),h!=null&&r.push(_a(t,h,g))),t.tag===3)return r;t=t.return}return[]}function dv(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Vg(t,n,l,r,h){for(var g=n._reactName,y=[];l!==null&&l!==r;){var x=l,E=x.alternate,j=x.stateNode;if(x=x.tag,E!==null&&E===r)break;x!==5&&x!==26&&x!==27||j===null||(E=j,h?(j=qs(l,g),j!=null&&y.unshift(_a(l,j,E))):h||(j=qs(l,g),j!=null&&y.push(_a(l,j,E)))),l=l.return}y.length!==0&&t.push({event:n,listeners:y})}var gv=/\r\n?/g,mv=/\u0000|\uFFFD/g;function Yg(t){return(typeof t=="string"?t:""+t).replace(gv,`
|
|
9
|
-
`).replace(mv,"")}function qg(t,n){return n=Yg(n),Yg(t)===n}function wt(t,n,l,r,h,g){switch(l){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||Ji(t,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&Ji(t,""+r);break;case"className":rl(t,"class",r);break;case"tabIndex":rl(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(t,l,r);break;case"style":qf(t,r,g);break;case"data":if(n!=="object"){rl(t,"data",r);break}case"src":case"href":if(r===""&&(n!=="a"||l!=="href")){t.removeAttribute(l);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(l);break}r=ul(""+r),t.setAttribute(l,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(l==="formAction"?(n!=="input"&&wt(t,n,"name",h.name,h,null),wt(t,n,"formEncType",h.formEncType,h,null),wt(t,n,"formMethod",h.formMethod,h,null),wt(t,n,"formTarget",h.formTarget,h,null)):(wt(t,n,"encType",h.encType,h,null),wt(t,n,"method",h.method,h,null),wt(t,n,"target",h.target,h,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(l);break}r=ul(""+r),t.setAttribute(l,r);break;case"onClick":r!=null&&(t.onclick=un);break;case"onScroll":r!=null&&mt("scroll",t);break;case"onScrollEnd":r!=null&&mt("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}l=ul(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,""+r):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":r===!0?t.setAttribute(l,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,r):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(l,r):t.removeAttribute(l);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(l):t.setAttribute(l,r);break;case"popover":mt("beforetoggle",t),mt("toggle",t),ol(t,"popover",r);break;case"xlinkActuate":cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":cn(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":cn(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":cn(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":cn(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ol(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Xy.get(l)||l,ol(t,l,r))}}function eu(t,n,l,r,h,g){switch(l){case"style":qf(t,r,g);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"children":typeof r=="string"?Ji(t,r):(typeof r=="number"||typeof r=="bigint")&&Ji(t,""+r);break;case"onScroll":r!=null&&mt("scroll",t);break;case"onScrollEnd":r!=null&&mt("scrollend",t);break;case"onClick":r!=null&&(t.onclick=un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rf.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),n=l.slice(2,h?l.length-7:void 0),g=t[me]||null,g=g!=null?g[l]:null,typeof g=="function"&&t.removeEventListener(n,g,h),typeof r=="function")){typeof g!="function"&&g!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(n,r,h);break t}l in t?t[l]=r:r===!0?t.setAttribute(l,""):ol(t,l,r)}}}function oe(t,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",t),mt("load",t);var r=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var y=l[g];if(y!=null)switch(g){case"src":r=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:wt(t,n,g,y,l,null)}}h&&wt(t,n,"srcSet",l.srcSet,l,null),r&&wt(t,n,"src",l.src,l,null);return;case"input":mt("invalid",t);var x=g=y=h=null,E=null,j=null;for(r in l)if(l.hasOwnProperty(r)){var H=l[r];if(H!=null)switch(r){case"name":h=H;break;case"type":y=H;break;case"checked":E=H;break;case"defaultChecked":j=H;break;case"value":g=H;break;case"defaultValue":x=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,n));break;default:wt(t,n,r,H,l,null)}}Bf(t,g,x,E,j,y,h,!1);return;case"select":mt("invalid",t),r=y=g=null;for(h in l)if(l.hasOwnProperty(h)&&(x=l[h],x!=null))switch(h){case"value":g=x;break;case"defaultValue":y=x;break;case"multiple":r=x;default:wt(t,n,h,x,l,null)}n=g,l=y,t.multiple=!!r,n!=null?Wi(t,!!r,n,!1):l!=null&&Wi(t,!!r,l,!0);return;case"textarea":mt("invalid",t),g=h=r=null;for(y in l)if(l.hasOwnProperty(y)&&(x=l[y],x!=null))switch(y){case"value":r=x;break;case"defaultValue":h=x;break;case"children":g=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(a(91));break;default:wt(t,n,y,x,l,null)}Vf(t,r,h,g);return;case"option":for(E in l)l.hasOwnProperty(E)&&(r=l[E],r!=null)&&(E==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":wt(t,n,E,r,l,null));return;case"dialog":mt("beforetoggle",t),mt("toggle",t),mt("cancel",t),mt("close",t);break;case"iframe":case"object":mt("load",t);break;case"video":case"audio":for(r=0;r<xa.length;r++)mt(xa[r],t);break;case"image":mt("error",t),mt("load",t);break;case"details":mt("toggle",t);break;case"embed":case"source":case"link":mt("error",t),mt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in l)if(l.hasOwnProperty(j)&&(r=l[j],r!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:wt(t,n,j,r,l,null)}return;default:if(mr(n)){for(H in l)l.hasOwnProperty(H)&&(r=l[H],r!==void 0&&eu(t,n,H,r,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(r=l[x],r!=null&&wt(t,n,x,r,l,null))}function pv(t,n,l,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,y=null,x=null,E=null,j=null,H=null;for(N in l){var V=l[N];if(l.hasOwnProperty(N)&&V!=null)switch(N){case"checked":break;case"value":break;case"defaultValue":E=V;default:r.hasOwnProperty(N)||wt(t,n,N,null,r,V)}}for(var R in r){var N=r[R];if(V=l[R],r.hasOwnProperty(R)&&(N!=null||V!=null))switch(R){case"type":g=N;break;case"name":h=N;break;case"checked":j=N;break;case"defaultChecked":H=N;break;case"value":y=N;break;case"defaultValue":x=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(137,n));break;default:N!==V&&wt(t,n,R,N,r,V)}}dr(t,y,x,E,j,H,g,h);return;case"select":N=y=x=R=null;for(g in l)if(E=l[g],l.hasOwnProperty(g)&&E!=null)switch(g){case"value":break;case"multiple":N=E;default:r.hasOwnProperty(g)||wt(t,n,g,null,r,E)}for(h in r)if(g=r[h],E=l[h],r.hasOwnProperty(h)&&(g!=null||E!=null))switch(h){case"value":R=g;break;case"defaultValue":x=g;break;case"multiple":y=g;default:g!==E&&wt(t,n,h,g,r,E)}n=x,l=y,r=N,R!=null?Wi(t,!!l,R,!1):!!r!=!!l&&(n!=null?Wi(t,!!l,n,!0):Wi(t,!!l,l?[]:"",!1));return;case"textarea":N=R=null;for(x in l)if(h=l[x],l.hasOwnProperty(x)&&h!=null&&!r.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:wt(t,n,x,null,r,h)}for(y in r)if(h=r[y],g=l[y],r.hasOwnProperty(y)&&(h!=null||g!=null))switch(y){case"value":R=h;break;case"defaultValue":N=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==g&&wt(t,n,y,h,r,g)}Uf(t,R,N);return;case"option":for(var I in l)R=l[I],l.hasOwnProperty(I)&&R!=null&&!r.hasOwnProperty(I)&&(I==="selected"?t.selected=!1:wt(t,n,I,null,r,R));for(E in r)R=r[E],N=l[E],r.hasOwnProperty(E)&&R!==N&&(R!=null||N!=null)&&(E==="selected"?t.selected=R&&typeof R!="function"&&typeof R!="symbol":wt(t,n,E,R,r,N));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var nt in l)R=l[nt],l.hasOwnProperty(nt)&&R!=null&&!r.hasOwnProperty(nt)&&wt(t,n,nt,null,r,R);for(j in r)if(R=r[j],N=l[j],r.hasOwnProperty(j)&&R!==N&&(R!=null||N!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(a(137,n));break;default:wt(t,n,j,R,r,N)}return;default:if(mr(n)){for(var jt in l)R=l[jt],l.hasOwnProperty(jt)&&R!==void 0&&!r.hasOwnProperty(jt)&&eu(t,n,jt,void 0,r,R);for(H in r)R=r[H],N=l[H],!r.hasOwnProperty(H)||R===N||R===void 0&&N===void 0||eu(t,n,H,R,r,N);return}}for(var z in l)R=l[z],l.hasOwnProperty(z)&&R!=null&&!r.hasOwnProperty(z)&&wt(t,n,z,null,r,R);for(V in r)R=r[V],N=l[V],!r.hasOwnProperty(V)||R===N||R==null&&N==null||wt(t,n,V,R,r,N)}function Xg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yv(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,l=performance.getEntriesByType("resource"),r=0;r<l.length;r++){var h=l[r],g=h.transferSize,y=h.initiatorType,x=h.duration;if(g&&x&&Xg(y)){for(y=0,x=h.responseEnd,r+=1;r<l.length;r++){var E=l[r],j=E.startTime;if(j>x)break;var H=E.transferSize,V=E.initiatorType;H&&Xg(V)&&(E=E.responseEnd,y+=H*(E<x?1:(x-j)/(E-j)))}if(--r,n+=8*(g+y)/(h.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var nu=null,iu=null;function ao(t){return t.nodeType===9?t:t.ownerDocument}function Gg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Qg(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function su(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var au=null;function bv(){var t=window.event;return t&&t.type==="popstate"?t===au?!1:(au=t,!0):(au=null,!1)}var Zg=typeof setTimeout=="function"?setTimeout:void 0,vv=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,xv=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(t){return Fg.resolve(null).then(t).catch(_v)}:Zg;function _v(t){setTimeout(function(){throw t})}function ei(t){return t==="head"}function Kg(t,n){var l=n,r=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(r===0){t.removeChild(h),Os(n);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")Sa(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Sa(l);for(var g=l.firstChild;g;){var y=g.nextSibling,x=g.nodeName;g[Vs]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=y}}else l==="body"&&Sa(t.ownerDocument.body);l=h}while(l);Os(n)}function Wg(t,n){var l=t;t=0;do{var r=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),r&&r.nodeType===8)if(l=r.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=r}while(l)}function lu(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":lu(l),fr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Sv(t,n,l,r){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[Vs])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Qe(t.nextSibling),t===null)break}return null}function Tv(t,n,l){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Qe(t.nextSibling),t===null))return null;return t}function Jg(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Qe(t.nextSibling),t===null))return null;return t}function ou(t){return t.data==="$?"||t.data==="$~"}function ru(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Mv(t,n){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||l.readyState!=="loading")n();else{var r=function(){n(),l.removeEventListener("DOMContentLoaded",r)};l.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Qe(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var cu=null;function Ig(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(n===0)return Qe(t.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}t=t.nextSibling}return null}function Pg(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return t;n--}else l!=="/$"&&l!=="/&"||n++}t=t.previousSibling}return null}function $g(t,n,l){switch(n=ao(l),t){case"html":if(t=n.documentElement,!t)throw Error(a(452));return t;case"head":if(t=n.head,!t)throw Error(a(453));return t;case"body":if(t=n.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function Sa(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);fr(t)}var Ze=new Map,tm=new Set;function lo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var An=Q.d;Q.d={f:Ev,r:Av,D:Ov,C:Cv,L:Dv,m:zv,X:jv,S:wv,M:Rv};function Ev(){var t=An.f(),n=Il();return t||n}function Av(t){var n=Zi(t);n!==null&&n.tag===5&&n.type==="form"?yd(n):An.r(t)}var Ms=typeof document>"u"?null:document;function em(t,n,l){var r=Ms;if(r&&typeof n=="string"&&n){var h=Be(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),tm.has(h)||(tm.add(h),t={rel:t,crossOrigin:l,href:n},r.querySelector(h)===null&&(n=r.createElement("link"),oe(n,"link",t),ee(n),r.head.appendChild(n)))}}function Ov(t){An.D(t),em("dns-prefetch",t,null)}function Cv(t,n){An.C(t,n),em("preconnect",t,n)}function Dv(t,n,l){An.L(t,n,l);var r=Ms;if(r&&t&&n){var h='link[rel="preload"][as="'+Be(n)+'"]';n==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Be(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Be(l.imageSizes)+'"]')):h+='[href="'+Be(t)+'"]';var g=h;switch(n){case"style":g=Es(t);break;case"script":g=As(t)}Ze.has(g)||(t=b({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:t,as:n},l),Ze.set(g,t),r.querySelector(h)!==null||n==="style"&&r.querySelector(Ta(g))||n==="script"&&r.querySelector(Ma(g))||(n=r.createElement("link"),oe(n,"link",t),ee(n),r.head.appendChild(n)))}}function zv(t,n){An.m(t,n);var l=Ms;if(l&&t){var r=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Be(r)+'"][href="'+Be(t)+'"]',g=h;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=As(t)}if(!Ze.has(g)&&(t=b({rel:"modulepreload",href:t},n),Ze.set(g,t),l.querySelector(h)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ma(g)))return}r=l.createElement("link"),oe(r,"link",t),ee(r),l.head.appendChild(r)}}}function wv(t,n,l){An.S(t,n,l);var r=Ms;if(r&&t){var h=Fi(r).hoistableStyles,g=Es(t);n=n||"default";var y=h.get(g);if(!y){var x={loading:0,preload:null};if(y=r.querySelector(Ta(g)))x.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":n},l),(l=Ze.get(g))&&uu(t,l);var E=y=r.createElement("link");ee(E),oe(E,"link",t),E._p=new Promise(function(j,H){E.onload=j,E.onerror=H}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,oo(y,n,r)}y={type:"stylesheet",instance:y,count:1,state:x},h.set(g,y)}}}function jv(t,n){An.X(t,n);var l=Ms;if(l&&t){var r=Fi(l).hoistableScripts,h=As(t),g=r.get(h);g||(g=l.querySelector(Ma(h)),g||(t=b({src:t,async:!0},n),(n=Ze.get(h))&&fu(t,n),g=l.createElement("script"),ee(g),oe(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},r.set(h,g))}}function Rv(t,n){An.M(t,n);var l=Ms;if(l&&t){var r=Fi(l).hoistableScripts,h=As(t),g=r.get(h);g||(g=l.querySelector(Ma(h)),g||(t=b({src:t,async:!0,type:"module"},n),(n=Ze.get(h))&&fu(t,n),g=l.createElement("script"),ee(g),oe(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},r.set(h,g))}}function nm(t,n,l,r){var h=(h=ot.current)?lo(h):null;if(!h)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Es(l.href),l=Fi(h).hoistableStyles,r=l.get(n),r||(r={type:"style",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Es(l.href);var g=Fi(h).hoistableStyles,y=g.get(t);if(y||(h=h.ownerDocument||h,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,y),(g=h.querySelector(Ta(t)))&&!g._p&&(y.instance=g,y.state.loading=5),Ze.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ze.set(t,l),g||kv(h,t,l,y.state))),n&&r===null)throw Error(a(528,""));return y}if(n&&r!==null)throw Error(a(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=As(l),l=Fi(h).hoistableScripts,r=l.get(n),r||(r={type:"script",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function Es(t){return'href="'+Be(t)+'"'}function Ta(t){return'link[rel="stylesheet"]['+t+"]"}function im(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function kv(t,n,l,r){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=t.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),oe(n,"link",l),ee(n),t.head.appendChild(n))}function As(t){return'[src="'+Be(t)+'"]'}function Ma(t){return"script[async]"+t}function sm(t,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var r=t.querySelector('style[data-href~="'+Be(l.href)+'"]');if(r)return n.instance=r,ee(r),r;var h=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),ee(r),oe(r,"style",h),oo(r,l.precedence,t),n.instance=r;case"stylesheet":h=Es(l.href);var g=t.querySelector(Ta(h));if(g)return n.state.loading|=4,n.instance=g,ee(g),g;r=im(l),(h=Ze.get(h))&&uu(r,h),g=(t.ownerDocument||t).createElement("link"),ee(g);var y=g;return y._p=new Promise(function(x,E){y.onload=x,y.onerror=E}),oe(g,"link",r),n.state.loading|=4,oo(g,l.precedence,t),n.instance=g;case"script":return g=As(l.src),(h=t.querySelector(Ma(g)))?(n.instance=h,ee(h),h):(r=l,(h=Ze.get(g))&&(r=b({},l),fu(r,h)),t=t.ownerDocument||t,h=t.createElement("script"),ee(h),oe(h,"link",r),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,oo(r,l.precedence,t));return n.instance}function oo(t,n,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=r.length?r[r.length-1]:null,g=h,y=0;y<r.length;y++){var x=r[y];if(x.dataset.precedence===n)g=x;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(t,n.firstChild))}function uu(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function fu(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var ro=null;function am(t,n,l){if(ro===null){var r=new Map,h=ro=new Map;h.set(l,r)}else h=ro,r=h.get(l),r||(r=new Map,h.set(l,r));if(r.has(t))return r;for(r.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[Vs]||g[ie]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var y=g.getAttribute(n)||"";y=t+y;var x=r.get(y);x?x.push(g):r.set(y,[g])}}return r}function lm(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function Nv(t,n,l){if(l===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function om(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Lv(t,n,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Es(r.href),g=n.querySelector(Ta(h));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=co.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=g,ee(g);return}g=n.ownerDocument||n,r=im(r),(h=Ze.get(h))&&uu(r,h),g=g.createElement("link"),ee(g);var y=g;y._p=new Promise(function(x,E){y.onload=x,y.onerror=E}),oe(g,"link",r),l.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=co.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var hu=0;function Hv(t,n){return t.stylesheets&&t.count===0&&fo(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var r=setTimeout(function(){if(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&hu===0&&(hu=62500*yv());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>hu?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(h)}}:null}function co(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var uo=null;function fo(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,uo=new Map,n.forEach(Bv,t),uo=null,co.call(t))}function Bv(t,n){if(!(n.state.loading&4)){var l=uo.get(t);if(l)var r=l.get(null);else{l=new Map,uo.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var y=h[g];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),r=y)}r&&l.set(null,r)}h=n.instance,y=h.getAttribute("data-precedence"),g=l.get(y)||r,g===r&&l.set(null,h),l.set(y,h),this.count++,r=co.bind(this),h.addEventListener("load",r),h.addEventListener("error",r),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Ea={$$typeof:q,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Uv(t,n,l,r,h,g,y,x,E){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=or(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=or(0),this.hiddenUpdates=or(null),this.identifierPrefix=r,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function rm(t,n,l,r,h,g,y,x,E,j,H,V){return t=new Uv(t,n,l,y,E,j,H,V,x),n=1,g===!0&&(n|=24),g=De(3,null,null,n),t.current=g,g.stateNode=t,n=Qr(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:r,isDehydrated:l,cache:n},Wr(g),t}function cm(t){return t?(t=is,t):is}function um(t,n,l,r,h,g){h=cm(h),r.context===null?r.context=h:r.pendingContext=h,r=Gn(n),r.payload={element:l},g=g===void 0?null:g,g!==null&&(r.callback=g),l=Qn(t,r,n),l!==null&&(_e(l,t,n),ia(l,t,n))}function fm(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<n?l:n}}function du(t,n){fm(t,n),(t=t.alternate)&&fm(t,n)}function hm(t){if(t.tag===13||t.tag===31){var n=xi(t,67108864);n!==null&&_e(n,t,67108864),du(t,67108864)}}function dm(t){if(t.tag===13||t.tag===31){var n=ke();n=rr(n);var l=xi(t,n);l!==null&&_e(l,t,n),du(t,n)}}var ho=!0;function Vv(t,n,l,r){var h=k.T;k.T=null;var g=Q.p;try{Q.p=2,gu(t,n,l,r)}finally{Q.p=g,k.T=h}}function Yv(t,n,l,r){var h=k.T;k.T=null;var g=Q.p;try{Q.p=8,gu(t,n,l,r)}finally{Q.p=g,k.T=h}}function gu(t,n,l,r){if(ho){var h=mu(r);if(h===null)tu(t,n,r,go,l),mm(t,r);else if(Xv(h,t,n,l,r))r.stopPropagation();else if(mm(t,r),n&4&&-1<qv.indexOf(t)){for(;h!==null;){var g=Zi(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var y=mi(g.pendingLanes);if(y!==0){var x=g;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var E=1<<31-Oe(y);x.entanglements[1]|=E,y&=~E}nn(g),(Mt&6)===0&&(Wl=Ee()+500,va(0))}}break;case 31:case 13:x=xi(g,2),x!==null&&_e(x,g,2),Il(),du(g,2)}if(g=mu(r),g===null&&tu(t,n,r,go,l),g===h)break;h=g}h!==null&&r.stopPropagation()}else tu(t,n,r,null,l)}}function mu(t){return t=yr(t),pu(t)}var go=null;function pu(t){if(go=null,t=Qi(t),t!==null){var n=c(t);if(n===null)t=null;else{var l=n.tag;if(l===13){if(t=u(n),t!==null)return t;t=null}else if(l===31){if(t=f(n),t!==null)return t;t=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return go=t,null}function gm(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Oy()){case Sf:return 2;case Tf:return 8;case nl:case Cy:return 32;case Mf:return 268435456;default:return 32}default:return 32}}var yu=!1,ni=null,ii=null,si=null,Aa=new Map,Oa=new Map,ai=[],qv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function mm(t,n){switch(t){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":Aa.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oa.delete(n.pointerId)}}function Ca(t,n,l,r,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:l,eventSystemFlags:r,nativeEvent:g,targetContainers:[h]},n!==null&&(n=Zi(n),n!==null&&hm(n)),t):(t.eventSystemFlags|=r,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function Xv(t,n,l,r,h){switch(n){case"focusin":return ni=Ca(ni,t,n,l,r,h),!0;case"dragenter":return ii=Ca(ii,t,n,l,r,h),!0;case"mouseover":return si=Ca(si,t,n,l,r,h),!0;case"pointerover":var g=h.pointerId;return Aa.set(g,Ca(Aa.get(g)||null,t,n,l,r,h)),!0;case"gotpointercapture":return g=h.pointerId,Oa.set(g,Ca(Oa.get(g)||null,t,n,l,r,h)),!0}return!1}function pm(t){var n=Qi(t.target);if(n!==null){var l=c(n);if(l!==null){if(n=l.tag,n===13){if(n=u(l),n!==null){t.blockedOn=n,zf(t.priority,function(){dm(l)});return}}else if(n===31){if(n=f(l),n!==null){t.blockedOn=n,zf(t.priority,function(){dm(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function mo(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var l=mu(t.nativeEvent);if(l===null){l=t.nativeEvent;var r=new l.constructor(l.type,l);pr=r,l.target.dispatchEvent(r),pr=null}else return n=Zi(l),n!==null&&hm(n),t.blockedOn=l,!1;n.shift()}return!0}function ym(t,n,l){mo(t)&&l.delete(n)}function Gv(){yu=!1,ni!==null&&mo(ni)&&(ni=null),ii!==null&&mo(ii)&&(ii=null),si!==null&&mo(si)&&(si=null),Aa.forEach(ym),Oa.forEach(ym)}function po(t,n){t.blockedOn===n&&(t.blockedOn=null,yu||(yu=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Gv)))}var yo=null;function bm(t){yo!==t&&(yo=t,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){yo===t&&(yo=null);for(var n=0;n<t.length;n+=3){var l=t[n],r=t[n+1],h=t[n+2];if(typeof r!="function"){if(pu(r||l)===null)continue;break}var g=Zi(l);g!==null&&(t.splice(n,3),n-=3,mc(g,{pending:!0,data:h,method:l.method,action:r},r,h))}}))}function Os(t){function n(E){return po(E,t)}ni!==null&&po(ni,t),ii!==null&&po(ii,t),si!==null&&po(si,t),Aa.forEach(n),Oa.forEach(n);for(var l=0;l<ai.length;l++){var r=ai[l];r.blockedOn===t&&(r.blockedOn=null)}for(;0<ai.length&&(l=ai[0],l.blockedOn===null);)pm(l),l.blockedOn===null&&ai.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(r=0;r<l.length;r+=3){var h=l[r],g=l[r+1],y=h[me]||null;if(typeof g=="function")y||bm(l);else if(y){var x=null;if(g&&g.hasAttribute("formAction")){if(h=g,y=g[me]||null)x=y.formAction;else if(pu(h)!==null)continue}else x=y.action;typeof x=="function"?l[r+1]=x:(l.splice(r,3),r-=3),bm(l)}}}function vm(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(y){return h=y})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),r||setTimeout(l,20)}function l(){if(!r&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function bu(t){this._internalRoot=t}bo.prototype.render=bu.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(a(409));var l=n.current,r=ke();um(l,r,t,n,null,null)},bo.prototype.unmount=bu.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;um(t.current,2,null,t,null,null),Il(),n[Gi]=null}};function bo(t){this._internalRoot=t}bo.prototype.unstable_scheduleHydration=function(t){if(t){var n=Df();t={blockedOn:null,target:t,priority:n};for(var l=0;l<ai.length&&n!==0&&n<ai[l].priority;l++);ai.splice(l,0,t),l===0&&pm(t)}};var xm=e.version;if(xm!=="19.2.4")throw Error(a(527,xm,"19.2.4"));Q.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=m(n),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var Qv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vo.isDisabled&&vo.supportsFiber)try{Hs=vo.inject(Qv),Ae=vo}catch{}}return za.createRoot=function(t,n){if(!o(t))throw Error(a(299));var l=!1,r="",h=Od,g=Cd,y=Dd;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=rm(t,1,!1,null,null,l,r,null,h,g,y,vm),t[Gi]=n.current,$c(t),new bu(n)},za.hydrateRoot=function(t,n,l){if(!o(t))throw Error(a(299));var r=!1,h="",g=Od,y=Cd,x=Dd,E=null;return l!=null&&(l.unstable_strictMode===!0&&(r=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(E=l.formState)),n=rm(t,1,!0,n,l??null,r,h,E,g,y,x,vm),n.context=cm(null),l=n.current,r=ke(),r=rr(r),h=Gn(r),h.callback=null,Qn(l,h,r),l=r,n.current.lanes=l,Us(n,l),nn(n),t[Gi]=n.current,$c(t),new bo(n)},za.version="19.2.4",za}var zm;function ex(){if(zm)return _u.exports;zm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),_u.exports=tx(),_u.exports}var nx=ex();function tl(s){return s+.5|0}const oi=(s,e,i)=>Math.max(Math.min(s,i),e);function Ha(s){return oi(tl(s*2.55),0,255)}function fi(s){return oi(tl(s*255),0,255)}function zn(s){return oi(tl(s/2.55)/100,0,1)}function wm(s){return oi(tl(s*100),0,100)}const Fe={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},Qu=[..."0123456789ABCDEF"],ix=s=>Qu[s&15],sx=s=>Qu[(s&240)>>4]+Qu[s&15],xo=s=>(s&240)>>4===(s&15),ax=s=>xo(s.r)&&xo(s.g)&&xo(s.b)&&xo(s.a);function lx(s){var e=s.length,i;return s[0]==="#"&&(e===4||e===5?i={r:255&Fe[s[1]]*17,g:255&Fe[s[2]]*17,b:255&Fe[s[3]]*17,a:e===5?Fe[s[4]]*17:255}:(e===7||e===9)&&(i={r:Fe[s[1]]<<4|Fe[s[2]],g:Fe[s[3]]<<4|Fe[s[4]],b:Fe[s[5]]<<4|Fe[s[6]],a:e===9?Fe[s[7]]<<4|Fe[s[8]]:255})),i}const ox=(s,e)=>s<255?e(s):"";function rx(s){var e=ax(s)?ix:sx;return s?"#"+e(s.r)+e(s.g)+e(s.b)+ox(s.a,e):void 0}const cx=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function f0(s,e,i){const a=e*Math.min(i,1-i),o=(c,u=(c+s/30)%12)=>i-a*Math.max(Math.min(u-3,9-u,1),-1);return[o(0),o(8),o(4)]}function ux(s,e,i){const a=(o,c=(o+s/60)%6)=>i-i*e*Math.max(Math.min(c,4-c,1),0);return[a(5),a(3),a(1)]}function fx(s,e,i){const a=f0(s,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)a[o]*=1-e-i,a[o]+=e;return a}function hx(s,e,i,a,o){return s===o?(e-i)/a+(e<i?6:0):e===o?(i-s)/a+2:(s-e)/a+4}function ef(s){const i=s.r/255,a=s.g/255,o=s.b/255,c=Math.max(i,a,o),u=Math.min(i,a,o),f=(c+u)/2;let d,m,p;return c!==u&&(p=c-u,m=f>.5?p/(2-c-u):p/(c+u),d=hx(i,a,o,p,c),d=d*60+.5),[d|0,m||0,f]}function nf(s,e,i,a){return(Array.isArray(e)?s(e[0],e[1],e[2]):s(e,i,a)).map(fi)}function sf(s,e,i){return nf(f0,s,e,i)}function dx(s,e,i){return nf(fx,s,e,i)}function gx(s,e,i){return nf(ux,s,e,i)}function h0(s){return(s%360+360)%360}function mx(s){const e=cx.exec(s);let i=255,a;if(!e)return;e[5]!==a&&(i=e[6]?Ha(+e[5]):fi(+e[5]));const o=h0(+e[2]),c=+e[3]/100,u=+e[4]/100;return e[1]==="hwb"?a=dx(o,c,u):e[1]==="hsv"?a=gx(o,c,u):a=sf(o,c,u),{r:a[0],g:a[1],b:a[2],a:i}}function px(s,e){var i=ef(s);i[0]=h0(i[0]+e),i=sf(i),s.r=i[0],s.g=i[1],s.b=i[2]}function yx(s){if(!s)return;const e=ef(s),i=e[0],a=wm(e[1]),o=wm(e[2]);return s.a<255?`hsla(${i}, ${a}%, ${o}%, ${zn(s.a)})`:`hsl(${i}, ${a}%, ${o}%)`}const jm={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"},Rm={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 bx(){const s={},e=Object.keys(Rm),i=Object.keys(jm);let a,o,c,u,f;for(a=0;a<e.length;a++){for(u=f=e[a],o=0;o<i.length;o++)c=i[o],f=f.replace(c,jm[c]);c=parseInt(Rm[u],16),s[f]=[c>>16&255,c>>8&255,c&255]}return s}let _o;function vx(s){_o||(_o=bx(),_o.transparent=[0,0,0,0]);const e=_o[s.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const xx=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function _x(s){const e=xx.exec(s);let i=255,a,o,c;if(e){if(e[7]!==a){const u=+e[7];i=e[8]?Ha(u):oi(u*255,0,255)}return a=+e[1],o=+e[3],c=+e[5],a=255&(e[2]?Ha(a):oi(a,0,255)),o=255&(e[4]?Ha(o):oi(o,0,255)),c=255&(e[6]?Ha(c):oi(c,0,255)),{r:a,g:o,b:c,a:i}}}function Sx(s){return s&&(s.a<255?`rgba(${s.r}, ${s.g}, ${s.b}, ${zn(s.a)})`:`rgb(${s.r}, ${s.g}, ${s.b})`)}const Eu=s=>s<=.0031308?s*12.92:Math.pow(s,1/2.4)*1.055-.055,Cs=s=>s<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4);function Tx(s,e,i){const a=Cs(zn(s.r)),o=Cs(zn(s.g)),c=Cs(zn(s.b));return{r:fi(Eu(a+i*(Cs(zn(e.r))-a))),g:fi(Eu(o+i*(Cs(zn(e.g))-o))),b:fi(Eu(c+i*(Cs(zn(e.b))-c))),a:s.a+i*(e.a-s.a)}}function So(s,e,i){if(s){let a=ef(s);a[e]=Math.max(0,Math.min(a[e]+a[e]*i,e===0?360:1)),a=sf(a),s.r=a[0],s.g=a[1],s.b=a[2]}}function d0(s,e){return s&&Object.assign(e||{},s)}function km(s){var e={r:0,g:0,b:0,a:255};return Array.isArray(s)?s.length>=3&&(e={r:s[0],g:s[1],b:s[2],a:255},s.length>3&&(e.a=fi(s[3]))):(e=d0(s,{r:0,g:0,b:0,a:1}),e.a=fi(e.a)),e}function Mx(s){return s.charAt(0)==="r"?_x(s):mx(s)}class Za{constructor(e){if(e instanceof Za)return e;const i=typeof e;let a;i==="object"?a=km(e):i==="string"&&(a=lx(e)||vx(e)||Mx(e)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var e=d0(this._rgb);return e&&(e.a=zn(e.a)),e}set rgb(e){this._rgb=km(e)}rgbString(){return this._valid?Sx(this._rgb):void 0}hexString(){return this._valid?rx(this._rgb):void 0}hslString(){return this._valid?yx(this._rgb):void 0}mix(e,i){if(e){const a=this.rgb,o=e.rgb;let c;const u=i===c?.5:i,f=2*u-1,d=a.a-o.a,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2;c=1-m,a.r=255&m*a.r+c*o.r+.5,a.g=255&m*a.g+c*o.g+.5,a.b=255&m*a.b+c*o.b+.5,a.a=u*a.a+(1-u)*o.a,this.rgb=a}return this}interpolate(e,i){return e&&(this._rgb=Tx(this._rgb,e._rgb,i)),this}clone(){return new Za(this.rgb)}alpha(e){return this._rgb.a=fi(e),this}clearer(e){const i=this._rgb;return i.a*=1-e,this}greyscale(){const e=this._rgb,i=tl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=i,this}opaquer(e){const i=this._rgb;return i.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return So(this._rgb,2,e),this}darken(e){return So(this._rgb,2,-e),this}saturate(e){return So(this._rgb,1,e),this}desaturate(e){return So(this._rgb,1,-e),this}rotate(e){return px(this._rgb,e),this}}function On(){}const Ex=(()=>{let s=0;return()=>s++})();function xt(s){return s==null}function Kt(s){if(Array.isArray&&Array.isArray(s))return!0;const e=Object.prototype.toString.call(s);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function pt(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}function he(s){return(typeof s=="number"||s instanceof Number)&&isFinite(+s)}function sn(s,e){return he(s)?s:e}function ht(s,e){return typeof s>"u"?e:s}const Ax=(s,e)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100:+s/e,g0=(s,e)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*e:+s;function kt(s,e,i){if(s&&typeof s.call=="function")return s.apply(i,e)}function At(s,e,i,a){let o,c,u;if(Kt(s))for(c=s.length,o=0;o<c;o++)e.call(i,s[o],o);else if(pt(s))for(u=Object.keys(s),c=u.length,o=0;o<c;o++)e.call(i,s[u[o]],u[o])}function Uo(s,e){let i,a,o,c;if(!s||!e||s.length!==e.length)return!1;for(i=0,a=s.length;i<a;++i)if(o=s[i],c=e[i],o.datasetIndex!==c.datasetIndex||o.index!==c.index)return!1;return!0}function Vo(s){if(Kt(s))return s.map(Vo);if(pt(s)){const e=Object.create(null),i=Object.keys(s),a=i.length;let o=0;for(;o<a;++o)e[i[o]]=Vo(s[i[o]]);return e}return s}function m0(s){return["__proto__","prototype","constructor"].indexOf(s)===-1}function Ox(s,e,i,a){if(!m0(s))return;const o=e[s],c=i[s];pt(o)&&pt(c)?rn(o,c,a):e[s]=Vo(c)}function rn(s,e,i){const a=Kt(e)?e:[e],o=a.length;if(!pt(s))return s;i=i||{};const c=i.merger||Ox;let u;for(let f=0;f<o;++f){if(u=a[f],!pt(u))continue;const d=Object.keys(u);for(let m=0,p=d.length;m<p;++m)c(d[m],s,u,i)}return s}function Va(s,e){return rn(s,e,{merger:Cx})}function Cx(s,e,i){if(!m0(s))return;const a=e[s],o=i[s];pt(a)&&pt(o)?Va(a,o):Object.prototype.hasOwnProperty.call(e,s)||(e[s]=Vo(o))}const Nm={"":s=>s,x:s=>s.x,y:s=>s.y};function Dx(s){const e=s.split("."),i=[];let a="";for(const o of e)a+=o,a.endsWith("\\")?a=a.slice(0,-1)+".":(i.push(a),a="");return i}function zx(s){const e=Dx(s);return i=>{for(const a of e){if(a==="")break;i=i&&i[a]}return i}}function Vi(s,e){return(Nm[e]||(Nm[e]=zx(e)))(s)}function af(s){return s.charAt(0).toUpperCase()+s.slice(1)}const Fa=s=>typeof s<"u",hi=s=>typeof s=="function",Lm=(s,e)=>{if(s.size!==e.size)return!1;for(const i of s)if(!e.has(i))return!1;return!0};function wx(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}const Dt=Math.PI,Yt=2*Dt,jx=Yt+Dt,Yo=Number.POSITIVE_INFINITY,Rx=Dt/180,te=Dt/2,Ri=Dt/4,Hm=Dt*2/3,p0=Math.log10,on=Math.sign;function Ya(s,e,i){return Math.abs(s-e)<i}function Bm(s){const e=Math.round(s);s=Ya(s,e,s/1e3)?e:s;const i=Math.pow(10,Math.floor(p0(s))),a=s/i;return(a<=1?1:a<=2?2:a<=5?5:10)*i}function kx(s){const e=[],i=Math.sqrt(s);let a;for(a=1;a<i;a++)s%a===0&&(e.push(a),e.push(s/a));return i===(i|0)&&e.push(i),e.sort((o,c)=>o-c).pop(),e}function Nx(s){return typeof s=="symbol"||typeof s=="object"&&s!==null&&!(Symbol.toPrimitive in s||"toString"in s||"valueOf"in s)}function Ka(s){return!Nx(s)&&!isNaN(parseFloat(s))&&isFinite(s)}function Lx(s,e){const i=Math.round(s);return i-e<=s&&i+e>=s}function Hx(s,e,i){let a,o,c;for(a=0,o=s.length;a<o;a++)c=s[a][i],isNaN(c)||(e.min=Math.min(e.min,c),e.max=Math.max(e.max,c))}function jn(s){return s*(Dt/180)}function Bx(s){return s*(180/Dt)}function Um(s){if(!he(s))return;let e=1,i=0;for(;Math.round(s*e)/e!==s;)e*=10,i++;return i}function y0(s,e){const i=e.x-s.x,a=e.y-s.y,o=Math.sqrt(i*i+a*a);let c=Math.atan2(a,i);return c<-.5*Dt&&(c+=Yt),{angle:c,distance:o}}function Zu(s,e){return Math.sqrt(Math.pow(e.x-s.x,2)+Math.pow(e.y-s.y,2))}function Ux(s,e){return(s-e+jx)%Yt-Dt}function Ne(s){return(s%Yt+Yt)%Yt}function Wa(s,e,i,a){const o=Ne(s),c=Ne(e),u=Ne(i),f=Ne(c-o),d=Ne(u-o),m=Ne(o-c),p=Ne(o-u);return o===c||o===u||a&&c===u||f>d&&m<p}function fe(s,e,i){return Math.max(e,Math.min(i,s))}function Vx(s){return fe(s,-32768,32767)}function Rn(s,e,i,a=1e-6){return s>=Math.min(e,i)-a&&s<=Math.max(e,i)+a}function lf(s,e,i){i=i||(u=>s[u]<e);let a=s.length-1,o=0,c;for(;a-o>1;)c=o+a>>1,i(c)?o=c:a=c;return{lo:o,hi:a}}const Bi=(s,e,i,a)=>lf(s,i,a?o=>{const c=s[o][e];return c<i||c===i&&s[o+1][e]===i}:o=>s[o][e]<i),Yx=(s,e,i)=>lf(s,i,a=>s[a][e]>=i);function qx(s,e,i){let a=0,o=s.length;for(;a<o&&s[a]<e;)a++;for(;o>a&&s[o-1]>i;)o--;return a>0||o<s.length?s.slice(a,o):s}const b0=["push","pop","shift","splice","unshift"];function Xx(s,e){if(s._chartjs){s._chartjs.listeners.push(e);return}Object.defineProperty(s,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),b0.forEach(i=>{const a="_onData"+af(i),o=s[i];Object.defineProperty(s,i,{configurable:!0,enumerable:!1,value(...c){const u=o.apply(this,c);return s._chartjs.listeners.forEach(f=>{typeof f[a]=="function"&&f[a](...c)}),u}})})}function Vm(s,e){const i=s._chartjs;if(!i)return;const a=i.listeners,o=a.indexOf(e);o!==-1&&a.splice(o,1),!(a.length>0)&&(b0.forEach(c=>{delete s[c]}),delete s._chartjs)}function v0(s){const e=new Set(s);return e.size===s.length?s:Array.from(e)}const x0=(function(){return typeof window>"u"?function(s){return s()}:window.requestAnimationFrame})();function _0(s,e){let i=[],a=!1;return function(...o){i=o,a||(a=!0,x0.call(window,()=>{a=!1,s.apply(e,i)}))}}function Gx(s,e){let i;return function(...a){return e?(clearTimeout(i),i=setTimeout(s,e,a)):s.apply(this,a),e}}const of=s=>s==="start"?"left":s==="end"?"right":"center",ue=(s,e,i)=>s==="start"?e:s==="end"?i:(e+i)/2,Qx=(s,e,i,a)=>s===(a?"left":"right")?i:s==="center"?(e+i)/2:e;function Zx(s,e,i){const a=e.length;let o=0,c=a;if(s._sorted){const{iScale:u,vScale:f,_parsed:d}=s,m=s.dataset&&s.dataset.options?s.dataset.options.spanGaps:null,p=u.axis,{min:b,max:v,minDefined:S,maxDefined:T}=u.getUserBounds();if(S){if(o=Math.min(Bi(d,p,b).lo,i?a:Bi(e,p,u.getPixelForValue(b)).lo),m){const M=d.slice(0,o+1).reverse().findIndex(A=>!xt(A[f.axis]));o-=Math.max(0,M)}o=fe(o,0,a-1)}if(T){let M=Math.max(Bi(d,u.axis,v,!0).hi+1,i?0:Bi(e,p,u.getPixelForValue(v),!0).hi+1);if(m){const A=d.slice(M-1).findIndex(D=>!xt(D[f.axis]));M+=Math.max(0,A)}c=fe(M,o,a)-o}else c=a-o}return{start:o,count:c}}function Fx(s){const{xScale:e,yScale:i,_scaleRanges:a}=s,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!a)return s._scaleRanges=o,!0;const c=a.xmin!==e.min||a.xmax!==e.max||a.ymin!==i.min||a.ymax!==i.max;return Object.assign(a,o),c}const To=s=>s===0||s===1,Ym=(s,e,i)=>-(Math.pow(2,10*(s-=1))*Math.sin((s-e)*Yt/i)),qm=(s,e,i)=>Math.pow(2,-10*s)*Math.sin((s-e)*Yt/i)+1,qa={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*te)+1,easeOutSine:s=>Math.sin(s*te),easeInOutSine:s=>-.5*(Math.cos(Dt*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=>To(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=>To(s)?s:Ym(s,.075,.3),easeOutElastic:s=>To(s)?s:qm(s,.075,.3),easeInOutElastic(s){return To(s)?s:s<.5?.5*Ym(s*2,.1125,.45):.5+.5*qm(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 e=1.70158;return(s/=.5)<1?.5*(s*s*(((e*=1.525)+1)*s-e)):.5*((s-=2)*s*(((e*=1.525)+1)*s+e)+2)},easeInBounce:s=>1-qa.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?qa.easeInBounce(s*2)*.5:qa.easeOutBounce(s*2-1)*.5+.5};function rf(s){if(s&&typeof s=="object"){const e=s.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Xm(s){return rf(s)?s:new Za(s)}function Au(s){return rf(s)?s:new Za(s).saturate(.5).darken(.1).hexString()}const Kx=["x","y","borderWidth","radius","tension"],Wx=["color","borderColor","backgroundColor"];function Jx(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:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),s.set("animations",{colors:{type:"color",properties:Wx},numbers:{type:"number",properties:Kx}}),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:e=>e|0}}}})}function Ix(s){s.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Gm=new Map;function Px(s,e){e=e||{};const i=s+JSON.stringify(e);let a=Gm.get(i);return a||(a=new Intl.NumberFormat(s,e),Gm.set(i,a)),a}function cf(s,e,i){return Px(e,i).format(s)}const $x={values(s){return Kt(s)?s:""+s},numeric(s,e,i){if(s===0)return"0";const a=this.chart.options.locale;let o,c=s;if(i.length>1){const m=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(m<1e-4||m>1e15)&&(o="scientific"),c=t_(s,i)}const u=p0(Math.abs(c)),f=isNaN(u)?1:Math.max(Math.min(-1*Math.floor(u),20),0),d={notation:o,minimumFractionDigits:f,maximumFractionDigits:f};return Object.assign(d,this.options.ticks.format),cf(s,a,d)}};function t_(s,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&s!==Math.floor(s)&&(i=s-Math.floor(s)),i}var S0={formatters:$x};function e_(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:(e,i)=>i.lineWidth,tickColor:(e,i)=>i.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:S0.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:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),s.describe("scales",{_fallback:"scale"}),s.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Yi=Object.create(null),Fu=Object.create(null);function Xa(s,e){if(!e)return s;const i=e.split(".");for(let a=0,o=i.length;a<o;++a){const c=i[a];s=s[c]||(s[c]=Object.create(null))}return s}function Ou(s,e,i){return typeof e=="string"?rn(Xa(s,e),i):rn(Xa(s,""),e)}class n_{constructor(e,i){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=a=>a.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=(a,o)=>Au(o.backgroundColor),this.hoverBorderColor=(a,o)=>Au(o.borderColor),this.hoverColor=(a,o)=>Au(o.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(e),this.apply(i)}set(e,i){return Ou(this,e,i)}get(e){return Xa(this,e)}describe(e,i){return Ou(Fu,e,i)}override(e,i){return Ou(Yi,e,i)}route(e,i,a,o){const c=Xa(this,e),u=Xa(this,a),f="_"+i;Object.defineProperties(c,{[f]:{value:c[i],writable:!0},[i]:{enumerable:!0,get(){const d=this[f],m=u[o];return pt(d)?Object.assign({},m,d):ht(d,m)},set(d){this[f]=d}}})}apply(e){e.forEach(i=>i(this))}}var Gt=new n_({_scriptable:s=>!s.startsWith("on"),_indexable:s=>s!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Jx,Ix,e_]);function i_(s){return!s||xt(s.size)||xt(s.family)?null:(s.style?s.style+" ":"")+(s.weight?s.weight+" ":"")+s.size+"px "+s.family}function Qm(s,e,i,a,o){let c=e[o];return c||(c=e[o]=s.measureText(o).width,i.push(o)),c>a&&(a=c),a}function ki(s,e,i){const a=s.currentDevicePixelRatio,o=i!==0?Math.max(i/2,.5):0;return Math.round((e-o)*a)/a+o}function Zm(s,e){!e&&!s||(e=e||s.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,s.width,s.height),e.restore())}function Ku(s,e,i,a){T0(s,e,i,a,null)}function T0(s,e,i,a,o){let c,u,f,d,m,p,b,v;const S=e.pointStyle,T=e.rotation,M=e.radius;let A=(T||0)*Rx;if(S&&typeof S=="object"&&(c=S.toString(),c==="[object HTMLImageElement]"||c==="[object HTMLCanvasElement]")){s.save(),s.translate(i,a),s.rotate(A),s.drawImage(S,-S.width/2,-S.height/2,S.width,S.height),s.restore();return}if(!(isNaN(M)||M<=0)){switch(s.beginPath(),S){default:o?s.ellipse(i,a,o/2,M,0,0,Yt):s.arc(i,a,M,0,Yt),s.closePath();break;case"triangle":p=o?o/2:M,s.moveTo(i+Math.sin(A)*p,a-Math.cos(A)*M),A+=Hm,s.lineTo(i+Math.sin(A)*p,a-Math.cos(A)*M),A+=Hm,s.lineTo(i+Math.sin(A)*p,a-Math.cos(A)*M),s.closePath();break;case"rectRounded":m=M*.516,d=M-m,u=Math.cos(A+Ri)*d,b=Math.cos(A+Ri)*(o?o/2-m:d),f=Math.sin(A+Ri)*d,v=Math.sin(A+Ri)*(o?o/2-m:d),s.arc(i-b,a-f,m,A-Dt,A-te),s.arc(i+v,a-u,m,A-te,A),s.arc(i+b,a+f,m,A,A+te),s.arc(i-v,a+u,m,A+te,A+Dt),s.closePath();break;case"rect":if(!T){d=Math.SQRT1_2*M,p=o?o/2:d,s.rect(i-p,a-d,2*p,2*d);break}A+=Ri;case"rectRot":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+v,a-u),s.lineTo(i+b,a+f),s.lineTo(i-v,a+u),s.closePath();break;case"crossRot":A+=Ri;case"cross":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+b,a+f),s.moveTo(i+v,a-u),s.lineTo(i-v,a+u);break;case"star":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+b,a+f),s.moveTo(i+v,a-u),s.lineTo(i-v,a+u),A+=Ri,b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+b,a+f),s.moveTo(i+v,a-u),s.lineTo(i-v,a+u);break;case"line":u=o?o/2:Math.cos(A)*M,f=Math.sin(A)*M,s.moveTo(i-u,a-f),s.lineTo(i+u,a+f);break;case"dash":s.moveTo(i,a),s.lineTo(i+Math.cos(A)*(o?o/2:M),a+Math.sin(A)*M);break;case!1:s.closePath();break}s.fill(),e.borderWidth>0&&s.stroke()}}function Ja(s,e,i){return i=i||.5,!e||s&&s.x>e.left-i&&s.x<e.right+i&&s.y>e.top-i&&s.y<e.bottom+i}function Zo(s,e){s.save(),s.beginPath(),s.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),s.clip()}function Fo(s){s.restore()}function s_(s,e,i,a,o){if(!e)return s.lineTo(i.x,i.y);if(o==="middle"){const c=(e.x+i.x)/2;s.lineTo(c,e.y),s.lineTo(c,i.y)}else o==="after"!=!!a?s.lineTo(e.x,i.y):s.lineTo(i.x,e.y);s.lineTo(i.x,i.y)}function a_(s,e,i,a){if(!e)return s.lineTo(i.x,i.y);s.bezierCurveTo(a?e.cp1x:e.cp2x,a?e.cp1y:e.cp2y,a?i.cp2x:i.cp1x,a?i.cp2y:i.cp1y,i.x,i.y)}function l_(s,e){e.translation&&s.translate(e.translation[0],e.translation[1]),xt(e.rotation)||s.rotate(e.rotation),e.color&&(s.fillStyle=e.color),e.textAlign&&(s.textAlign=e.textAlign),e.textBaseline&&(s.textBaseline=e.textBaseline)}function o_(s,e,i,a,o){if(o.strikethrough||o.underline){const c=s.measureText(a),u=e-c.actualBoundingBoxLeft,f=e+c.actualBoundingBoxRight,d=i-c.actualBoundingBoxAscent,m=i+c.actualBoundingBoxDescent,p=o.strikethrough?(d+m)/2:m;s.strokeStyle=s.fillStyle,s.beginPath(),s.lineWidth=o.decorationWidth||2,s.moveTo(u,p),s.lineTo(f,p),s.stroke()}}function r_(s,e){const i=s.fillStyle;s.fillStyle=e.color,s.fillRect(e.left,e.top,e.width,e.height),s.fillStyle=i}function Ia(s,e,i,a,o,c={}){const u=Kt(e)?e:[e],f=c.strokeWidth>0&&c.strokeColor!=="";let d,m;for(s.save(),s.font=o.string,l_(s,c),d=0;d<u.length;++d)m=u[d],c.backdrop&&r_(s,c.backdrop),f&&(c.strokeColor&&(s.strokeStyle=c.strokeColor),xt(c.strokeWidth)||(s.lineWidth=c.strokeWidth),s.strokeText(m,i,a,c.maxWidth)),s.fillText(m,i,a,c.maxWidth),o_(s,i,a,m,c),a+=Number(o.lineHeight);s.restore()}function qo(s,e){const{x:i,y:a,w:o,h:c,radius:u}=e;s.arc(i+u.topLeft,a+u.topLeft,u.topLeft,1.5*Dt,Dt,!0),s.lineTo(i,a+c-u.bottomLeft),s.arc(i+u.bottomLeft,a+c-u.bottomLeft,u.bottomLeft,Dt,te,!0),s.lineTo(i+o-u.bottomRight,a+c),s.arc(i+o-u.bottomRight,a+c-u.bottomRight,u.bottomRight,te,0,!0),s.lineTo(i+o,a+u.topRight),s.arc(i+o-u.topRight,a+u.topRight,u.topRight,0,-te,!0),s.lineTo(i+u.topLeft,a)}const c_=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,u_=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function f_(s,e){const i=(""+s).match(c_);if(!i||i[1]==="normal")return e*1.2;switch(s=+i[2],i[3]){case"px":return s;case"%":s/=100;break}return e*s}const h_=s=>+s||0;function uf(s,e){const i={},a=pt(e),o=a?Object.keys(e):e,c=pt(s)?a?u=>ht(s[u],s[e[u]]):u=>s[u]:()=>s;for(const u of o)i[u]=h_(c(u));return i}function M0(s){return uf(s,{top:"y",right:"x",bottom:"y",left:"x"})}function zs(s){return uf(s,["topLeft","topRight","bottomLeft","bottomRight"])}function Le(s){const e=M0(s);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function re(s,e){s=s||{},e=e||Gt.font;let i=ht(s.size,e.size);typeof i=="string"&&(i=parseInt(i,10));let a=ht(s.style,e.style);a&&!(""+a).match(u_)&&(console.warn('Invalid font style specified: "'+a+'"'),a=void 0);const o={family:ht(s.family,e.family),lineHeight:f_(ht(s.lineHeight,e.lineHeight),i),size:i,style:a,weight:ht(s.weight,e.weight),string:""};return o.string=i_(o),o}function Ut(s,e,i,a){let o,c,u;for(o=0,c=s.length;o<c;++o)if(u=s[o],u!==void 0&&(e!==void 0&&typeof u=="function"&&(u=u(e)),i!==void 0&&Kt(u)&&(u=u[i%u.length]),u!==void 0))return u}function d_(s,e,i){const{min:a,max:o}=s,c=g0(e,(o-a)/2),u=(f,d)=>i&&f===0?0:f+d;return{min:u(a,-Math.abs(c)),max:u(o,c)}}function qi(s,e){return Object.assign(Object.create(s),e)}function ff(s,e=[""],i,a,o=()=>s[0]){const c=i||s;typeof a>"u"&&(a=C0("_fallback",s));const u={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:s,_rootScopes:c,_fallback:a,_getTarget:o,override:f=>ff([f,...s],e,c,a)};return new Proxy(u,{deleteProperty(f,d){return delete f[d],delete f._keys,delete s[0][d],!0},get(f,d){return A0(f,d,()=>__(d,e,s,f))},getOwnPropertyDescriptor(f,d){return Reflect.getOwnPropertyDescriptor(f._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(s[0])},has(f,d){return Km(f).includes(d)},ownKeys(f){return Km(f)},set(f,d,m){const p=f._storage||(f._storage=o());return f[d]=p[d]=m,delete f._keys,!0}})}function Rs(s,e,i,a){const o={_cacheable:!1,_proxy:s,_context:e,_subProxy:i,_stack:new Set,_descriptors:E0(s,a),setContext:c=>Rs(s,c,i,a),override:c=>Rs(s.override(c),e,i,a)};return new Proxy(o,{deleteProperty(c,u){return delete c[u],delete s[u],!0},get(c,u,f){return A0(c,u,()=>m_(c,u,f))},getOwnPropertyDescriptor(c,u){return c._descriptors.allKeys?Reflect.has(s,u)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,u)},getPrototypeOf(){return Reflect.getPrototypeOf(s)},has(c,u){return Reflect.has(s,u)},ownKeys(){return Reflect.ownKeys(s)},set(c,u,f){return s[u]=f,delete c[u],!0}})}function E0(s,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:a=e.indexable,_allKeys:o=e.allKeys}=s;return{allKeys:o,scriptable:i,indexable:a,isScriptable:hi(i)?i:()=>i,isIndexable:hi(a)?a:()=>a}}const g_=(s,e)=>s?s+af(e):e,hf=(s,e)=>pt(e)&&s!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function A0(s,e,i){if(Object.prototype.hasOwnProperty.call(s,e)||e==="constructor")return s[e];const a=i();return s[e]=a,a}function m_(s,e,i){const{_proxy:a,_context:o,_subProxy:c,_descriptors:u}=s;let f=a[e];return hi(f)&&u.isScriptable(e)&&(f=p_(e,f,s,i)),Kt(f)&&f.length&&(f=y_(e,f,s,u.isIndexable)),hf(e,f)&&(f=Rs(f,o,c&&c[e],u)),f}function p_(s,e,i,a){const{_proxy:o,_context:c,_subProxy:u,_stack:f}=i;if(f.has(s))throw new Error("Recursion detected: "+Array.from(f).join("->")+"->"+s);f.add(s);let d=e(c,u||a);return f.delete(s),hf(s,d)&&(d=df(o._scopes,o,s,d)),d}function y_(s,e,i,a){const{_proxy:o,_context:c,_subProxy:u,_descriptors:f}=i;if(typeof c.index<"u"&&a(s))return e[c.index%e.length];if(pt(e[0])){const d=e,m=o._scopes.filter(p=>p!==d);e=[];for(const p of d){const b=df(m,o,s,p);e.push(Rs(b,c,u&&u[s],f))}}return e}function O0(s,e,i){return hi(s)?s(e,i):s}const b_=(s,e)=>s===!0?e:typeof s=="string"?Vi(e,s):void 0;function v_(s,e,i,a,o){for(const c of e){const u=b_(i,c);if(u){s.add(u);const f=O0(u._fallback,i,o);if(typeof f<"u"&&f!==i&&f!==a)return f}else if(u===!1&&typeof a<"u"&&i!==a)return null}return!1}function df(s,e,i,a){const o=e._rootScopes,c=O0(e._fallback,i,a),u=[...s,...o],f=new Set;f.add(a);let d=Fm(f,u,i,c||i,a);return d===null||typeof c<"u"&&c!==i&&(d=Fm(f,u,c,d,a),d===null)?!1:ff(Array.from(f),[""],o,c,()=>x_(e,i,a))}function Fm(s,e,i,a,o){for(;i;)i=v_(s,e,i,a,o);return i}function x_(s,e,i){const a=s._getTarget();e in a||(a[e]={});const o=a[e];return Kt(o)&&pt(i)?i:o||{}}function __(s,e,i,a){let o;for(const c of e)if(o=C0(g_(c,s),i),typeof o<"u")return hf(s,o)?df(i,a,s,o):o}function C0(s,e){for(const i of e){if(!i)continue;const a=i[s];if(typeof a<"u")return a}}function Km(s){let e=s._keys;return e||(e=s._keys=S_(s._scopes)),e}function S_(s){const e=new Set;for(const i of s)for(const a of Object.keys(i).filter(o=>!o.startsWith("_")))e.add(a);return Array.from(e)}const T_=Number.EPSILON||1e-14,ks=(s,e)=>e<s.length&&!s[e].skip&&s[e],D0=s=>s==="x"?"y":"x";function M_(s,e,i,a){const o=s.skip?e:s,c=e,u=i.skip?e:i,f=Zu(c,o),d=Zu(u,c);let m=f/(f+d),p=d/(f+d);m=isNaN(m)?0:m,p=isNaN(p)?0:p;const b=a*m,v=a*p;return{previous:{x:c.x-b*(u.x-o.x),y:c.y-b*(u.y-o.y)},next:{x:c.x+v*(u.x-o.x),y:c.y+v*(u.y-o.y)}}}function E_(s,e,i){const a=s.length;let o,c,u,f,d,m=ks(s,0);for(let p=0;p<a-1;++p)if(d=m,m=ks(s,p+1),!(!d||!m)){if(Ya(e[p],0,T_)){i[p]=i[p+1]=0;continue}o=i[p]/e[p],c=i[p+1]/e[p],f=Math.pow(o,2)+Math.pow(c,2),!(f<=9)&&(u=3/Math.sqrt(f),i[p]=o*u*e[p],i[p+1]=c*u*e[p])}}function A_(s,e,i="x"){const a=D0(i),o=s.length;let c,u,f,d=ks(s,0);for(let m=0;m<o;++m){if(u=f,f=d,d=ks(s,m+1),!f)continue;const p=f[i],b=f[a];u&&(c=(p-u[i])/3,f[`cp1${i}`]=p-c,f[`cp1${a}`]=b-c*e[m]),d&&(c=(d[i]-p)/3,f[`cp2${i}`]=p+c,f[`cp2${a}`]=b+c*e[m])}}function O_(s,e="x"){const i=D0(e),a=s.length,o=Array(a).fill(0),c=Array(a);let u,f,d,m=ks(s,0);for(u=0;u<a;++u)if(f=d,d=m,m=ks(s,u+1),!!d){if(m){const p=m[e]-d[e];o[u]=p!==0?(m[i]-d[i])/p:0}c[u]=f?m?on(o[u-1])!==on(o[u])?0:(o[u-1]+o[u])/2:o[u-1]:o[u]}E_(s,o,c),A_(s,c,e)}function Mo(s,e,i){return Math.max(Math.min(s,i),e)}function C_(s,e){let i,a,o,c,u,f=Ja(s[0],e);for(i=0,a=s.length;i<a;++i)u=c,c=f,f=i<a-1&&Ja(s[i+1],e),c&&(o=s[i],u&&(o.cp1x=Mo(o.cp1x,e.left,e.right),o.cp1y=Mo(o.cp1y,e.top,e.bottom)),f&&(o.cp2x=Mo(o.cp2x,e.left,e.right),o.cp2y=Mo(o.cp2y,e.top,e.bottom)))}function D_(s,e,i,a,o){let c,u,f,d;if(e.spanGaps&&(s=s.filter(m=>!m.skip)),e.cubicInterpolationMode==="monotone")O_(s,o);else{let m=a?s[s.length-1]:s[0];for(c=0,u=s.length;c<u;++c)f=s[c],d=M_(m,f,s[Math.min(c+1,u-(a?0:1))%u],e.tension),f.cp1x=d.previous.x,f.cp1y=d.previous.y,f.cp2x=d.next.x,f.cp2y=d.next.y,m=f}e.capBezierPoints&&C_(s,i)}function gf(){return typeof window<"u"&&typeof document<"u"}function mf(s){let e=s.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Xo(s,e,i){let a;return typeof s=="string"?(a=parseInt(s,10),s.indexOf("%")!==-1&&(a=a/100*e.parentNode[i])):a=s,a}const Ko=s=>s.ownerDocument.defaultView.getComputedStyle(s,null);function z_(s,e){return Ko(s).getPropertyValue(e)}const w_=["top","right","bottom","left"];function Ui(s,e,i){const a={};i=i?"-"+i:"";for(let o=0;o<4;o++){const c=w_[o];a[c]=parseFloat(s[e+"-"+c+i])||0}return a.width=a.left+a.right,a.height=a.top+a.bottom,a}const j_=(s,e,i)=>(s>0||e>0)&&(!i||!i.shadowRoot);function R_(s,e){const i=s.touches,a=i&&i.length?i[0]:s,{offsetX:o,offsetY:c}=a;let u=!1,f,d;if(j_(o,c,s.target))f=o,d=c;else{const m=e.getBoundingClientRect();f=a.clientX-m.left,d=a.clientY-m.top,u=!0}return{x:f,y:d,box:u}}function Li(s,e){if("native"in s)return s;const{canvas:i,currentDevicePixelRatio:a}=e,o=Ko(i),c=o.boxSizing==="border-box",u=Ui(o,"padding"),f=Ui(o,"border","width"),{x:d,y:m,box:p}=R_(s,i),b=u.left+(p&&f.left),v=u.top+(p&&f.top);let{width:S,height:T}=e;return c&&(S-=u.width+f.width,T-=u.height+f.height),{x:Math.round((d-b)/S*i.width/a),y:Math.round((m-v)/T*i.height/a)}}function k_(s,e,i){let a,o;if(e===void 0||i===void 0){const c=s&&mf(s);if(!c)e=s.clientWidth,i=s.clientHeight;else{const u=c.getBoundingClientRect(),f=Ko(c),d=Ui(f,"border","width"),m=Ui(f,"padding");e=u.width-m.width-d.width,i=u.height-m.height-d.height,a=Xo(f.maxWidth,c,"clientWidth"),o=Xo(f.maxHeight,c,"clientHeight")}}return{width:e,height:i,maxWidth:a||Yo,maxHeight:o||Yo}}const ri=s=>Math.round(s*10)/10;function N_(s,e,i,a){const o=Ko(s),c=Ui(o,"margin"),u=Xo(o.maxWidth,s,"clientWidth")||Yo,f=Xo(o.maxHeight,s,"clientHeight")||Yo,d=k_(s,e,i);let{width:m,height:p}=d;if(o.boxSizing==="content-box"){const v=Ui(o,"border","width"),S=Ui(o,"padding");m-=S.width+v.width,p-=S.height+v.height}return m=Math.max(0,m-c.width),p=Math.max(0,a?m/a:p-c.height),m=ri(Math.min(m,u,d.maxWidth)),p=ri(Math.min(p,f,d.maxHeight)),m&&!p&&(p=ri(m/2)),(e!==void 0||i!==void 0)&&a&&d.height&&p>d.height&&(p=d.height,m=ri(Math.floor(p*a))),{width:m,height:p}}function Wm(s,e,i){const a=e||1,o=ri(s.height*a),c=ri(s.width*a);s.height=ri(s.height),s.width=ri(s.width);const u=s.canvas;return u.style&&(i||!u.style.height&&!u.style.width)&&(u.style.height=`${s.height}px`,u.style.width=`${s.width}px`),s.currentDevicePixelRatio!==a||u.height!==o||u.width!==c?(s.currentDevicePixelRatio=a,u.height=o,u.width=c,s.ctx.setTransform(a,0,0,a,0,0),!0):!1}const L_=(function(){let s=!1;try{const e={get passive(){return s=!0,!1}};gf()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return s})();function Jm(s,e){const i=z_(s,e),a=i&&i.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}function Hi(s,e,i,a){return{x:s.x+i*(e.x-s.x),y:s.y+i*(e.y-s.y)}}function H_(s,e,i,a){return{x:s.x+i*(e.x-s.x),y:a==="middle"?i<.5?s.y:e.y:a==="after"?i<1?s.y:e.y:i>0?e.y:s.y}}function B_(s,e,i,a){const o={x:s.cp2x,y:s.cp2y},c={x:e.cp1x,y:e.cp1y},u=Hi(s,o,i),f=Hi(o,c,i),d=Hi(c,e,i),m=Hi(u,f,i),p=Hi(f,d,i);return Hi(m,p,i)}const U_=function(s,e){return{x(i){return s+s+e-i},setWidth(i){e=i},textAlign(i){return i==="center"?i:i==="right"?"left":"right"},xPlus(i,a){return i-a},leftForLtr(i,a){return i-a}}},V_=function(){return{x(s){return s},setWidth(s){},textAlign(s){return s},xPlus(s,e){return s+e},leftForLtr(s,e){return s}}};function ws(s,e,i){return s?U_(e,i):V_()}function z0(s,e){let i,a;(e==="ltr"||e==="rtl")&&(i=s.canvas.style,a=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),s.prevTextDirection=a)}function w0(s,e){e!==void 0&&(delete s.prevTextDirection,s.canvas.style.setProperty("direction",e[0],e[1]))}function j0(s){return s==="angle"?{between:Wa,compare:Ux,normalize:Ne}:{between:Rn,compare:(e,i)=>e-i,normalize:e=>e}}function Im({start:s,end:e,count:i,loop:a,style:o}){return{start:s%i,end:e%i,loop:a&&(e-s+1)%i===0,style:o}}function Y_(s,e,i){const{property:a,start:o,end:c}=i,{between:u,normalize:f}=j0(a),d=e.length;let{start:m,end:p,loop:b}=s,v,S;if(b){for(m+=d,p+=d,v=0,S=d;v<S&&u(f(e[m%d][a]),o,c);++v)m--,p--;m%=d,p%=d}return p<m&&(p+=d),{start:m,end:p,loop:b,style:s.style}}function R0(s,e,i){if(!i)return[s];const{property:a,start:o,end:c}=i,u=e.length,{compare:f,between:d,normalize:m}=j0(a),{start:p,end:b,loop:v,style:S}=Y_(s,e,i),T=[];let M=!1,A=null,D,L,q;const G=()=>d(o,q,D)&&f(o,q)!==0,Y=()=>f(c,D)===0||d(c,q,D),K=()=>M||G(),X=()=>!M||Y();for(let Z=p,tt=p;Z<=b;++Z)L=e[Z%u],!L.skip&&(D=m(L[a]),D!==q&&(M=d(D,o,c),A===null&&K()&&(A=f(D,o)===0?Z:tt),A!==null&&X()&&(T.push(Im({start:A,end:Z,loop:v,count:u,style:S})),A=null),tt=Z,q=D));return A!==null&&T.push(Im({start:A,end:b,loop:v,count:u,style:S})),T}function k0(s,e){const i=[],a=s.segments;for(let o=0;o<a.length;o++){const c=R0(a[o],s.points,e);c.length&&i.push(...c)}return i}function q_(s,e,i,a){let o=0,c=e-1;if(i&&!a)for(;o<e&&!s[o].skip;)o++;for(;o<e&&s[o].skip;)o++;for(o%=e,i&&(c+=o);c>o&&s[c%e].skip;)c--;return c%=e,{start:o,end:c}}function X_(s,e,i,a){const o=s.length,c=[];let u=e,f=s[e],d;for(d=e+1;d<=i;++d){const m=s[d%o];m.skip||m.stop?f.skip||(a=!1,c.push({start:e%o,end:(d-1)%o,loop:a}),e=u=m.stop?d:null):(u=d,f.skip&&(e=d)),f=m}return u!==null&&c.push({start:e%o,end:u%o,loop:a}),c}function G_(s,e){const i=s.points,a=s.options.spanGaps,o=i.length;if(!o)return[];const c=!!s._loop,{start:u,end:f}=q_(i,o,c,a);if(a===!0)return Pm(s,[{start:u,end:f,loop:c}],i,e);const d=f<u?f+o:f,m=!!s._fullLoop&&u===0&&f===o-1;return Pm(s,X_(i,u,d,m),i,e)}function Pm(s,e,i,a){return!a||!a.setContext||!i?e:Q_(s,e,i,a)}function Q_(s,e,i,a){const o=s._chart.getContext(),c=$m(s.options),{_datasetIndex:u,options:{spanGaps:f}}=s,d=i.length,m=[];let p=c,b=e[0].start,v=b;function S(T,M,A,D){const L=f?-1:1;if(T!==M){for(T+=d;i[T%d].skip;)T-=L;for(;i[M%d].skip;)M+=L;T%d!==M%d&&(m.push({start:T%d,end:M%d,loop:A,style:D}),p=D,b=M%d)}}for(const T of e){b=f?b:T.start;let M=i[b%d],A;for(v=b+1;v<=T.end;v++){const D=i[v%d];A=$m(a.setContext(qi(o,{type:"segment",p0:M,p1:D,p0DataIndex:(v-1)%d,p1DataIndex:v%d,datasetIndex:u}))),Z_(A,p)&&S(b,v-1,T.loop,p),M=D,p=A}b<v-1&&S(b,v-1,T.loop,p)}return m}function $m(s){return{backgroundColor:s.backgroundColor,borderCapStyle:s.borderCapStyle,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderJoinStyle:s.borderJoinStyle,borderWidth:s.borderWidth,borderColor:s.borderColor}}function Z_(s,e){if(!e)return!1;const i=[],a=function(o,c){return rf(c)?(i.includes(c)||i.push(c),i.indexOf(c)):c};return JSON.stringify(s,a)!==JSON.stringify(e,a)}function Eo(s,e,i){return s.options.clip?s[i]:e[i]}function F_(s,e){const{xScale:i,yScale:a}=s;return i&&a?{left:Eo(i,e,"left"),right:Eo(i,e,"right"),top:Eo(a,e,"top"),bottom:Eo(a,e,"bottom")}:e}function N0(s,e){const i=e._clip;if(i.disabled)return!1;const a=F_(e,s.chartArea);return{left:i.left===!1?0:a.left-(i.left===!0?0:i.left),right:i.right===!1?s.width:a.right+(i.right===!0?0:i.right),top:i.top===!1?0:a.top-(i.top===!0?0:i.top),bottom:i.bottom===!1?s.height:a.bottom+(i.bottom===!0?0:i.bottom)}}class K_{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,i,a,o){const c=i.listeners[o],u=i.duration;c.forEach(f=>f({chart:e,initial:i.initial,numSteps:u,currentStep:Math.min(a-i.start,u)}))}_refresh(){this._request||(this._running=!0,this._request=x0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let i=0;this._charts.forEach((a,o)=>{if(!a.running||!a.items.length)return;const c=a.items;let u=c.length-1,f=!1,d;for(;u>=0;--u)d=c[u],d._active?(d._total>a.duration&&(a.duration=d._total),d.tick(e),f=!0):(c[u]=c[c.length-1],c.pop());f&&(o.draw(),this._notify(o,a,e,"progress")),c.length||(a.running=!1,this._notify(o,a,e,"complete"),a.initial=!1),i+=c.length}),this._lastDate=e,i===0&&(this._running=!1)}_getAnims(e){const i=this._charts;let a=i.get(e);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},i.set(e,a)),a}listen(e,i,a){this._getAnims(e).listeners[i].push(a)}add(e,i){!i||!i.length||this._getAnims(e).items.push(...i)}has(e){return this._getAnims(e).items.length>0}start(e){const i=this._charts.get(e);i&&(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce((a,o)=>Math.max(a,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;const i=this._charts.get(e);return!(!i||!i.running||!i.items.length)}stop(e){const i=this._charts.get(e);if(!i||!i.items.length)return;const a=i.items;let o=a.length-1;for(;o>=0;--o)a[o].cancel();i.items=[],this._notify(e,i,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Cn=new K_;const tp="transparent",W_={boolean(s,e,i){return i>.5?e:s},color(s,e,i){const a=Xm(s||tp),o=a.valid&&Xm(e||tp);return o&&o.valid?o.mix(a,i).hexString():e},number(s,e,i){return s+(e-s)*i}};class J_{constructor(e,i,a,o){const c=i[a];o=Ut([e.to,o,c,e.from]);const u=Ut([e.from,c,o]);this._active=!0,this._fn=e.fn||W_[e.type||typeof u],this._easing=qa[e.easing]||qa.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=i,this._prop=a,this._from=u,this._to=o,this._promises=void 0}active(){return this._active}update(e,i,a){if(this._active){this._notify(!1);const o=this._target[this._prop],c=a-this._start,u=this._duration-c;this._start=a,this._duration=Math.floor(Math.max(u,e.duration)),this._total+=c,this._loop=!!e.loop,this._to=Ut([e.to,i,o,e.from]),this._from=Ut([e.from,o,i])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const i=e-this._start,a=this._duration,o=this._prop,c=this._from,u=this._loop,f=this._to;let d;if(this._active=c!==f&&(u||i<a),!this._active){this._target[o]=f,this._notify(!0);return}if(i<0){this._target[o]=c;return}d=i/a%2,d=u&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[o]=this._fn(c,f,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((i,a)=>{e.push({res:i,rej:a})})}_notify(e){const i=e?"res":"rej",a=this._promises||[];for(let o=0;o<a.length;o++)a[o][i]()}}class L0{constructor(e,i){this._chart=e,this._properties=new Map,this.configure(i)}configure(e){if(!pt(e))return;const i=Object.keys(Gt.animation),a=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{const c=e[o];if(!pt(c))return;const u={};for(const f of i)u[f]=c[f];(Kt(c.properties)&&c.properties||[o]).forEach(f=>{(f===o||!a.has(f))&&a.set(f,u)})})}_animateOptions(e,i){const a=i.options,o=P_(e,a);if(!o)return[];const c=this._createAnimations(o,a);return a.$shared&&I_(e.options.$animations,a).then(()=>{e.options=a},()=>{}),c}_createAnimations(e,i){const a=this._properties,o=[],c=e.$animations||(e.$animations={}),u=Object.keys(i),f=Date.now();let d;for(d=u.length-1;d>=0;--d){const m=u[d];if(m.charAt(0)==="$")continue;if(m==="options"){o.push(...this._animateOptions(e,i));continue}const p=i[m];let b=c[m];const v=a.get(m);if(b)if(v&&b.active()){b.update(v,p,f);continue}else b.cancel();if(!v||!v.duration){e[m]=p;continue}c[m]=b=new J_(v,e,m,p),o.push(b)}return o}update(e,i){if(this._properties.size===0){Object.assign(e,i);return}const a=this._createAnimations(e,i);if(a.length)return Cn.add(this._chart,a),!0}}function I_(s,e){const i=[],a=Object.keys(e);for(let o=0;o<a.length;o++){const c=s[a[o]];c&&c.active()&&i.push(c.wait())}return Promise.all(i)}function P_(s,e){if(!e)return;let i=s.options;if(!i){s.options=e;return}return i.$shared&&(s.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}function ep(s,e){const i=s&&s.options||{},a=i.reverse,o=i.min===void 0?e:0,c=i.max===void 0?e:0;return{start:a?c:o,end:a?o:c}}function $_(s,e,i){if(i===!1)return!1;const a=ep(s,i),o=ep(e,i);return{top:o.end,right:a.end,bottom:o.start,left:a.start}}function t1(s){let e,i,a,o;return pt(s)?(e=s.top,i=s.right,a=s.bottom,o=s.left):e=i=a=o=s,{top:e,right:i,bottom:a,left:o,disabled:s===!1}}function H0(s,e){const i=[],a=s._getSortedDatasetMetas(e);let o,c;for(o=0,c=a.length;o<c;++o)i.push(a[o].index);return i}function np(s,e,i,a={}){const o=s.keys,c=a.mode==="single";let u,f,d,m;if(e===null)return;let p=!1;for(u=0,f=o.length;u<f;++u){if(d=+o[u],d===i){if(p=!0,a.all)continue;break}m=s.values[d],he(m)&&(c||e===0||on(e)===on(m))&&(e+=m)}return!p&&!a.all?0:e}function e1(s,e){const{iScale:i,vScale:a}=e,o=i.axis==="x"?"x":"y",c=a.axis==="x"?"x":"y",u=Object.keys(s),f=new Array(u.length);let d,m,p;for(d=0,m=u.length;d<m;++d)p=u[d],f[d]={[o]:p,[c]:s[p]};return f}function Cu(s,e){const i=s&&s.options.stacked;return i||i===void 0&&e.stack!==void 0}function n1(s,e,i){return`${s.id}.${e.id}.${i.stack||i.type}`}function i1(s){const{min:e,max:i,minDefined:a,maxDefined:o}=s.getUserBounds();return{min:a?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}function s1(s,e,i){const a=s[e]||(s[e]={});return a[i]||(a[i]={})}function ip(s,e,i,a){for(const o of e.getMatchingVisibleMetas(a).reverse()){const c=s[o.index];if(i&&c>0||!i&&c<0)return o.index}return null}function sp(s,e){const{chart:i,_cachedMeta:a}=s,o=i._stacks||(i._stacks={}),{iScale:c,vScale:u,index:f}=a,d=c.axis,m=u.axis,p=n1(c,u,a),b=e.length;let v;for(let S=0;S<b;++S){const T=e[S],{[d]:M,[m]:A}=T,D=T._stacks||(T._stacks={});v=D[m]=s1(o,p,M),v[f]=A,v._top=ip(v,u,!0,a.type),v._bottom=ip(v,u,!1,a.type);const L=v._visualValues||(v._visualValues={});L[f]=A}}function Du(s,e){const i=s.scales;return Object.keys(i).filter(a=>i[a].axis===e).shift()}function a1(s,e){return qi(s,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function l1(s,e,i){return qi(s,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}function wa(s,e){const i=s.controller.index,a=s.vScale&&s.vScale.axis;if(a){e=e||s._parsed;for(const o of e){const c=o._stacks;if(!c||c[a]===void 0||c[a][i]===void 0)return;delete c[a][i],c[a]._visualValues!==void 0&&c[a]._visualValues[i]!==void 0&&delete c[a]._visualValues[i]}}}const zu=s=>s==="reset"||s==="none",ap=(s,e)=>e?s:Object.assign({},s),o1=(s,e,i)=>s&&!e.hidden&&e._stacked&&{keys:H0(i,!0),values:null};class Wo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,i){this.chart=e,this._ctx=e.ctx,this.index=i,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Cu(e.vScale,e),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(e){this.index!==e&&wa(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,i=this._cachedMeta,a=this.getDataset(),o=(b,v,S,T)=>b==="x"?v:b==="r"?T:S,c=i.xAxisID=ht(a.xAxisID,Du(e,"x")),u=i.yAxisID=ht(a.yAxisID,Du(e,"y")),f=i.rAxisID=ht(a.rAxisID,Du(e,"r")),d=i.indexAxis,m=i.iAxisID=o(d,c,u,f),p=i.vAxisID=o(d,u,c,f);i.xScale=this.getScaleForId(c),i.yScale=this.getScaleForId(u),i.rScale=this.getScaleForId(f),i.iScale=this.getScaleForId(m),i.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const i=this._cachedMeta;return e===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Vm(this._data,this),e._stacked&&wa(e)}_dataCheck(){const e=this.getDataset(),i=e.data||(e.data=[]),a=this._data;if(pt(i)){const o=this._cachedMeta;this._data=e1(i,o)}else if(a!==i){if(a){Vm(a,this);const o=this._cachedMeta;wa(o),o._parsed=[]}i&&Object.isExtensible(i)&&Xx(i,this),this._syncList=[],this._data=i}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const i=this._cachedMeta,a=this.getDataset();let o=!1;this._dataCheck();const c=i._stacked;i._stacked=Cu(i.vScale,i),i.stack!==a.stack&&(o=!0,wa(i),i.stack=a.stack),this._resyncElements(e),(o||c!==i._stacked)&&(sp(this,i._parsed),i._stacked=Cu(i.vScale,i))}configure(){const e=this.chart.config,i=e.datasetScopeKeys(this._type),a=e.getOptionScopes(this.getDataset(),i,!0);this.options=e.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,i){const{_cachedMeta:a,_data:o}=this,{iScale:c,_stacked:u}=a,f=c.axis;let d=e===0&&i===o.length?!0:a._sorted,m=e>0&&a._parsed[e-1],p,b,v;if(this._parsing===!1)a._parsed=o,a._sorted=!0,v=o;else{Kt(o[e])?v=this.parseArrayData(a,o,e,i):pt(o[e])?v=this.parseObjectData(a,o,e,i):v=this.parsePrimitiveData(a,o,e,i);const S=()=>b[f]===null||m&&b[f]<m[f];for(p=0;p<i;++p)a._parsed[p+e]=b=v[p],d&&(S()&&(d=!1),m=b);a._sorted=d}u&&sp(this,v)}parsePrimitiveData(e,i,a,o){const{iScale:c,vScale:u}=e,f=c.axis,d=u.axis,m=c.getLabels(),p=c===u,b=new Array(o);let v,S,T;for(v=0,S=o;v<S;++v)T=v+a,b[v]={[f]:p||c.parse(m[T],T),[d]:u.parse(i[T],T)};return b}parseArrayData(e,i,a,o){const{xScale:c,yScale:u}=e,f=new Array(o);let d,m,p,b;for(d=0,m=o;d<m;++d)p=d+a,b=i[p],f[d]={x:c.parse(b[0],p),y:u.parse(b[1],p)};return f}parseObjectData(e,i,a,o){const{xScale:c,yScale:u}=e,{xAxisKey:f="x",yAxisKey:d="y"}=this._parsing,m=new Array(o);let p,b,v,S;for(p=0,b=o;p<b;++p)v=p+a,S=i[v],m[p]={x:c.parse(Vi(S,f),v),y:u.parse(Vi(S,d),v)};return m}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,i,a){const o=this.chart,c=this._cachedMeta,u=i[e.axis],f={keys:H0(o,!0),values:i._stacks[e.axis]._visualValues};return np(f,u,c.index,{mode:a})}updateRangeFromParsed(e,i,a,o){const c=a[i.axis];let u=c===null?NaN:c;const f=o&&a._stacks[i.axis];o&&f&&(o.values=f,u=np(o,c,this._cachedMeta.index)),e.min=Math.min(e.min,u),e.max=Math.max(e.max,u)}getMinMax(e,i){const a=this._cachedMeta,o=a._parsed,c=a._sorted&&e===a.iScale,u=o.length,f=this._getOtherScale(e),d=o1(i,a,this.chart),m={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:b}=i1(f);let v,S;function T(){S=o[v];const M=S[f.axis];return!he(S[e.axis])||p>M||b<M}for(v=0;v<u&&!(!T()&&(this.updateRangeFromParsed(m,e,S,d),c));++v);if(c){for(v=u-1;v>=0;--v)if(!T()){this.updateRangeFromParsed(m,e,S,d);break}}return m}getAllParsedValues(e){const i=this._cachedMeta._parsed,a=[];let o,c,u;for(o=0,c=i.length;o<c;++o)u=i[o][e.axis],he(u)&&a.push(u);return a}getMaxOverflow(){return!1}getLabelAndValue(e){const i=this._cachedMeta,a=i.iScale,o=i.vScale,c=this.getParsed(e);return{label:a?""+a.getLabelForValue(c[a.axis]):"",value:o?""+o.getLabelForValue(c[o.axis]):""}}_update(e){const i=this._cachedMeta;this.update(e||"default"),i._clip=t1(ht(this.options.clip,$_(i.xScale,i.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,i=this.chart,a=this._cachedMeta,o=a.data||[],c=i.chartArea,u=[],f=this._drawStart||0,d=this._drawCount||o.length-f,m=this.options.drawActiveElementsOnTop;let p;for(a.dataset&&a.dataset.draw(e,c,f,d),p=f;p<f+d;++p){const b=o[p];b.hidden||(b.active&&m?u.push(b):b.draw(e,c))}for(p=0;p<u.length;++p)u[p].draw(e,c)}getStyle(e,i){const a=i?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(a):this.resolveDataElementOptions(e||0,a)}getContext(e,i,a){const o=this.getDataset();let c;if(e>=0&&e<this._cachedMeta.data.length){const u=this._cachedMeta.data[e];c=u.$context||(u.$context=l1(this.getContext(),e,u)),c.parsed=this.getParsed(e),c.raw=o.data[e],c.index=c.dataIndex=e}else c=this.$context||(this.$context=a1(this.chart.getContext(),this.index)),c.dataset=o,c.index=c.datasetIndex=this.index;return c.active=!!i,c.mode=a,c}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,i){return this._resolveElementOptions(this.dataElementType.id,i,e)}_resolveElementOptions(e,i="default",a){const o=i==="active",c=this._cachedDataOpts,u=e+"-"+i,f=c[u],d=this.enableOptionSharing&&Fa(a);if(f)return ap(f,d);const m=this.chart.config,p=m.datasetElementScopeKeys(this._type,e),b=o?[`${e}Hover`,"hover",e,""]:[e,""],v=m.getOptionScopes(this.getDataset(),p),S=Object.keys(Gt.elements[e]),T=()=>this.getContext(a,o,i),M=m.resolveNamedOptions(v,S,T,b);return M.$shared&&(M.$shared=d,c[u]=Object.freeze(ap(M,d))),M}_resolveAnimations(e,i,a){const o=this.chart,c=this._cachedDataOpts,u=`animation-${i}`,f=c[u];if(f)return f;let d;if(o.options.animation!==!1){const p=this.chart.config,b=p.datasetAnimationScopeKeys(this._type,i),v=p.getOptionScopes(this.getDataset(),b);d=p.createResolver(v,this.getContext(e,a,i))}const m=new L0(o,d&&d.animations);return d&&d._cacheable&&(c[u]=Object.freeze(m)),m}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,i){return!i||zu(e)||this.chart._animationsDisabled}_getSharedOptions(e,i){const a=this.resolveDataElementOptions(e,i),o=this._sharedOptions,c=this.getSharedOptions(a),u=this.includeOptions(i,c)||c!==o;return this.updateSharedOptions(c,i,a),{sharedOptions:c,includeOptions:u}}updateElement(e,i,a,o){zu(o)?Object.assign(e,a):this._resolveAnimations(i,o).update(e,a)}updateSharedOptions(e,i,a){e&&!zu(i)&&this._resolveAnimations(void 0,i).update(e,a)}_setStyle(e,i,a,o){e.active=o;const c=this.getStyle(i,o);this._resolveAnimations(i,a,o).update(e,{options:!o&&this.getSharedOptions(c)||c})}removeHoverStyle(e,i,a){this._setStyle(e,a,"active",!1)}setHoverStyle(e,i,a){this._setStyle(e,a,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const i=this._data,a=this._cachedMeta.data;for(const[f,d,m]of this._syncList)this[f](d,m);this._syncList=[];const o=a.length,c=i.length,u=Math.min(c,o);u&&this.parse(0,u),c>o?this._insertElements(o,c-o,e):c<o&&this._removeElements(c,o-c)}_insertElements(e,i,a=!0){const o=this._cachedMeta,c=o.data,u=e+i;let f;const d=m=>{for(m.length+=i,f=m.length-1;f>=u;f--)m[f]=m[f-i]};for(d(c),f=e;f<u;++f)c[f]=new this.dataElementType;this._parsing&&d(o._parsed),this.parse(e,i),a&&this.updateElements(c,e,i,"reset")}updateElements(e,i,a,o){}_removeElements(e,i){const a=this._cachedMeta;if(this._parsing){const o=a._parsed.splice(e,i);a._stacked&&wa(a,o)}a.data.splice(e,i)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[i,a,o]=e;this[i](a,o)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,i){i&&this._sync(["_removeElements",e,i]);const a=arguments.length-2;a&&this._sync(["_insertElements",e,a])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function r1(s,e){if(!s._cache.$bar){const i=s.getMatchingVisibleMetas(e);let a=[];for(let o=0,c=i.length;o<c;o++)a=a.concat(i[o].controller.getAllParsedValues(s));s._cache.$bar=v0(a.sort((o,c)=>o-c))}return s._cache.$bar}function c1(s){const e=s.iScale,i=r1(e,s.type);let a=e._length,o,c,u,f;const d=()=>{u===32767||u===-32768||(Fa(f)&&(a=Math.min(a,Math.abs(u-f)||a)),f=u)};for(o=0,c=i.length;o<c;++o)u=e.getPixelForValue(i[o]),d();for(f=void 0,o=0,c=e.ticks.length;o<c;++o)u=e.getPixelForTick(o),d();return a}function u1(s,e,i,a){const o=i.barThickness;let c,u;return xt(o)?(c=e.min*i.categoryPercentage,u=i.barPercentage):(c=o*a,u=1),{chunk:c/a,ratio:u,start:e.pixels[s]-c/2}}function f1(s,e,i,a){const o=e.pixels,c=o[s];let u=s>0?o[s-1]:null,f=s<o.length-1?o[s+1]:null;const d=i.categoryPercentage;u===null&&(u=c-(f===null?e.end-e.start:f-c)),f===null&&(f=c+c-u);const m=c-(c-Math.min(u,f))/2*d;return{chunk:Math.abs(f-u)/2*d/a,ratio:i.barPercentage,start:m}}function h1(s,e,i,a){const o=i.parse(s[0],a),c=i.parse(s[1],a),u=Math.min(o,c),f=Math.max(o,c);let d=u,m=f;Math.abs(u)>Math.abs(f)&&(d=f,m=u),e[i.axis]=m,e._custom={barStart:d,barEnd:m,start:o,end:c,min:u,max:f}}function B0(s,e,i,a){return Kt(s)?h1(s,e,i,a):e[i.axis]=i.parse(s,a),e}function lp(s,e,i,a){const o=s.iScale,c=s.vScale,u=o.getLabels(),f=o===c,d=[];let m,p,b,v;for(m=i,p=i+a;m<p;++m)v=e[m],b={},b[o.axis]=f||o.parse(u[m],m),d.push(B0(v,b,c,m));return d}function wu(s){return s&&s.barStart!==void 0&&s.barEnd!==void 0}function d1(s,e,i){return s!==0?on(s):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}function g1(s){let e,i,a,o,c;return s.horizontal?(e=s.base>s.x,i="left",a="right"):(e=s.base<s.y,i="bottom",a="top"),e?(o="end",c="start"):(o="start",c="end"),{start:i,end:a,reverse:e,top:o,bottom:c}}function m1(s,e,i,a){let o=e.borderSkipped;const c={};if(!o){s.borderSkipped=c;return}if(o===!0){s.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:u,end:f,reverse:d,top:m,bottom:p}=g1(s);o==="middle"&&i&&(s.enableBorderRadius=!0,(i._top||0)===a?o=m:(i._bottom||0)===a?o=p:(c[op(p,u,f,d)]=!0,o=m)),c[op(o,u,f,d)]=!0,s.borderSkipped=c}function op(s,e,i,a){return a?(s=p1(s,e,i),s=rp(s,i,e)):s=rp(s,e,i),s}function p1(s,e,i){return s===e?i:s===i?e:s}function rp(s,e,i){return s==="start"?e:s==="end"?i:s}function y1(s,{inflateAmount:e},i){s.inflateAmount=e==="auto"?i===1?.33:0:e}class b1 extends Wo{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,i,a,o){return lp(e,i,a,o)}parseArrayData(e,i,a,o){return lp(e,i,a,o)}parseObjectData(e,i,a,o){const{iScale:c,vScale:u}=e,{xAxisKey:f="x",yAxisKey:d="y"}=this._parsing,m=c.axis==="x"?f:d,p=u.axis==="x"?f:d,b=[];let v,S,T,M;for(v=a,S=a+o;v<S;++v)M=i[v],T={},T[c.axis]=c.parse(Vi(M,m),v),b.push(B0(Vi(M,p),T,u,v));return b}updateRangeFromParsed(e,i,a,o){super.updateRangeFromParsed(e,i,a,o);const c=a._custom;c&&i===this._cachedMeta.vScale&&(e.min=Math.min(e.min,c.min),e.max=Math.max(e.max,c.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const i=this._cachedMeta,{iScale:a,vScale:o}=i,c=this.getParsed(e),u=c._custom,f=wu(u)?"["+u.start+", "+u.end+"]":""+o.getLabelForValue(c[o.axis]);return{label:""+a.getLabelForValue(c[a.axis]),value:f}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,e)}updateElements(e,i,a,o){const c=o==="reset",{index:u,_cachedMeta:{vScale:f}}=this,d=f.getBasePixel(),m=f.isHorizontal(),p=this._getRuler(),{sharedOptions:b,includeOptions:v}=this._getSharedOptions(i,o);for(let S=i;S<i+a;S++){const T=this.getParsed(S),M=c||xt(T[f.axis])?{base:d,head:d}:this._calculateBarValuePixels(S),A=this._calculateBarIndexPixels(S,p),D=(T._stacks||{})[f.axis],L={horizontal:m,base:M.base,enableBorderRadius:!D||wu(T._custom)||u===D._top||u===D._bottom,x:m?M.head:A.center,y:m?A.center:M.head,height:m?A.size:Math.abs(M.size),width:m?Math.abs(M.size):A.size};v&&(L.options=b||this.resolveDataElementOptions(S,e[S].active?"active":o));const q=L.options||e[S].options;m1(L,q,D,u),y1(L,q,p.ratio),this.updateElement(e[S],S,L,o)}}_getStacks(e,i){const{iScale:a}=this._cachedMeta,o=a.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),c=a.options.stacked,u=[],f=this._cachedMeta.controller.getParsed(i),d=f&&f[a.axis],m=p=>{const b=p._parsed.find(S=>S[a.axis]===d),v=b&&b[p.vScale.axis];if(xt(v)||isNaN(v))return!0};for(const p of o)if(!(i!==void 0&&m(p))&&((c===!1||u.indexOf(p.stack)===-1||c===void 0&&p.stack===void 0)&&u.push(p.stack),p.index===e))break;return u.length||u.push(void 0),u}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,i=this.chart.options.indexAxis;return Object.keys(e).filter(a=>e[a].axis===i).shift()}_getAxis(){const e={},i=this.getFirstScaleIdForIndexAxis();for(const a of this.chart.data.datasets)e[ht(this.chart.options.indexAxis==="x"?a.xAxisID:a.yAxisID,i)]=!0;return Object.keys(e)}_getStackIndex(e,i,a){const o=this._getStacks(e,a),c=i!==void 0?o.indexOf(i):-1;return c===-1?o.length-1:c}_getRuler(){const e=this.options,i=this._cachedMeta,a=i.iScale,o=[];let c,u;for(c=0,u=i.data.length;c<u;++c)o.push(a.getPixelForValue(this.getParsed(c)[a.axis],c));const f=e.barThickness;return{min:f||c1(i),pixels:o,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:e.grouped,ratio:f?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:i,_stacked:a,index:o},options:{base:c,minBarLength:u}}=this,f=c||0,d=this.getParsed(e),m=d._custom,p=wu(m);let b=d[i.axis],v=0,S=a?this.applyStack(i,d,a):b,T,M;S!==b&&(v=S-b,S=b),p&&(b=m.barStart,S=m.barEnd-m.barStart,b!==0&&on(b)!==on(m.barEnd)&&(v=0),v+=b);const A=!xt(c)&&!p?c:v;let D=i.getPixelForValue(A);if(this.chart.getDataVisibility(e)?T=i.getPixelForValue(v+S):T=D,M=T-D,Math.abs(M)<u){M=d1(M,i,f)*u,b===f&&(D-=M/2);const L=i.getPixelForDecimal(0),q=i.getPixelForDecimal(1),G=Math.min(L,q),Y=Math.max(L,q);D=Math.max(Math.min(D,Y),G),T=D+M,a&&!p&&(d._stacks[i.axis]._visualValues[o]=i.getValueForPixel(T)-i.getValueForPixel(D))}if(D===i.getPixelForValue(f)){const L=on(M)*i.getLineWidthForValue(f)/2;D+=L,M-=L}return{size:M,base:D,head:T,center:T+M/2}}_calculateBarIndexPixels(e,i){const a=i.scale,o=this.options,c=o.skipNull,u=ht(o.maxBarThickness,1/0);let f,d;const m=this._getAxisCount();if(i.grouped){const p=c?this._getStackCount(e):i.stackCount,b=o.barThickness==="flex"?f1(e,i,o,p*m):u1(e,i,o,p*m),v=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,S=this._getAxis().indexOf(ht(v,this.getFirstScaleIdForIndexAxis())),T=this._getStackIndex(this.index,this._cachedMeta.stack,c?e:void 0)+S;f=b.start+b.chunk*T+b.chunk/2,d=Math.min(u,b.chunk*b.ratio)}else f=a.getPixelForValue(this.getParsed(e)[a.axis],e),d=Math.min(u,i.min*i.ratio);return{base:f-d/2,head:f+d/2,center:f,size:d}}draw(){const e=this._cachedMeta,i=e.vScale,a=e.data,o=a.length;let c=0;for(;c<o;++c)this.getParsed(c)[i.axis]!==null&&!a[c].hidden&&a[c].draw(this._ctx)}}function v1(s,e,i){let a=1,o=1,c=0,u=0;if(e<Yt){const f=s,d=f+e,m=Math.cos(f),p=Math.sin(f),b=Math.cos(d),v=Math.sin(d),S=(q,G,Y)=>Wa(q,f,d,!0)?1:Math.max(G,G*i,Y,Y*i),T=(q,G,Y)=>Wa(q,f,d,!0)?-1:Math.min(G,G*i,Y,Y*i),M=S(0,m,b),A=S(te,p,v),D=T(Dt,m,b),L=T(Dt+te,p,v);a=(M-D)/2,o=(A-L)/2,c=-(M+D)/2,u=-(A+L)/2}return{ratioX:a,ratioY:o,offsetX:c,offsetY:u}}class x1 extends Wo{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const i=e.data,{labels:{pointStyle:a,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=e.legend.options;return i.labels.length&&i.datasets.length?i.labels.map((d,m)=>{const b=e.getDatasetMeta(0).controller.getStyle(m);return{text:d,fillStyle:b.backgroundColor,fontColor:c,hidden:!e.getDataVisibility(m),lineDash:b.borderDash,lineDashOffset:b.borderDashOffset,lineJoin:b.borderJoinStyle,lineWidth:b.borderWidth,strokeStyle:b.borderColor,textAlign:o,pointStyle:a,borderRadius:u&&(f||b.borderRadius),index:m}}):[]}},onClick(e,i,a){a.chart.toggleDataVisibility(i.index),a.chart.update()}}}};constructor(e,i){super(e,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,i){const a=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=a;else{let c=d=>+a[d];if(pt(a[e])){const{key:d="value"}=this._parsing;c=m=>+Vi(a[m],d)}let u,f;for(u=e,f=e+i;u<f;++u)o._parsed[u]=c(u)}}_getRotation(){return jn(this.options.rotation-90)}_getCircumference(){return jn(this.options.circumference)}_getRotationExtents(){let e=Yt,i=-Yt;for(let a=0;a<this.chart.data.datasets.length;++a)if(this.chart.isDatasetVisible(a)&&this.chart.getDatasetMeta(a).type===this._type){const o=this.chart.getDatasetMeta(a).controller,c=o._getRotation(),u=o._getCircumference();e=Math.min(e,c),i=Math.max(i,c+u)}return{rotation:e,circumference:i-e}}update(e){const i=this.chart,{chartArea:a}=i,o=this._cachedMeta,c=o.data,u=this.getMaxBorderWidth()+this.getMaxOffset(c)+this.options.spacing,f=Math.max((Math.min(a.width,a.height)-u)/2,0),d=Math.min(Ax(this.options.cutout,f),1),m=this._getRingWeight(this.index),{circumference:p,rotation:b}=this._getRotationExtents(),{ratioX:v,ratioY:S,offsetX:T,offsetY:M}=v1(b,p,d),A=(a.width-u)/v,D=(a.height-u)/S,L=Math.max(Math.min(A,D)/2,0),q=g0(this.options.radius,L),G=Math.max(q*d,0),Y=(q-G)/this._getVisibleDatasetWeightTotal();this.offsetX=T*q,this.offsetY=M*q,o.total=this.calculateTotal(),this.outerRadius=q-Y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-Y*m,0),this.updateElements(c,0,c.length,e)}_circumference(e,i){const a=this.options,o=this._cachedMeta,c=this._getCircumference();return i&&a.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*c/Yt)}updateElements(e,i,a,o){const c=o==="reset",u=this.chart,f=u.chartArea,m=u.options.animation,p=(f.left+f.right)/2,b=(f.top+f.bottom)/2,v=c&&m.animateScale,S=v?0:this.innerRadius,T=v?0:this.outerRadius,{sharedOptions:M,includeOptions:A}=this._getSharedOptions(i,o);let D=this._getRotation(),L;for(L=0;L<i;++L)D+=this._circumference(L,c);for(L=i;L<i+a;++L){const q=this._circumference(L,c),G=e[L],Y={x:p+this.offsetX,y:b+this.offsetY,startAngle:D,endAngle:D+q,circumference:q,outerRadius:T,innerRadius:S};A&&(Y.options=M||this.resolveDataElementOptions(L,G.active?"active":o)),D+=q,this.updateElement(G,L,Y,o)}}calculateTotal(){const e=this._cachedMeta,i=e.data;let a=0,o;for(o=0;o<i.length;o++){const c=e._parsed[o];c!==null&&!isNaN(c)&&this.chart.getDataVisibility(o)&&!i[o].hidden&&(a+=Math.abs(c))}return a}calculateCircumference(e){const i=this._cachedMeta.total;return i>0&&!isNaN(e)?Yt*(Math.abs(e)/i):0}getLabelAndValue(e){const i=this._cachedMeta,a=this.chart,o=a.data.labels||[],c=cf(i._parsed[e],a.options.locale);return{label:o[e]||"",value:c}}getMaxBorderWidth(e){let i=0;const a=this.chart;let o,c,u,f,d;if(!e){for(o=0,c=a.data.datasets.length;o<c;++o)if(a.isDatasetVisible(o)){u=a.getDatasetMeta(o),e=u.data,f=u.controller;break}}if(!e)return 0;for(o=0,c=e.length;o<c;++o)d=f.resolveDataElementOptions(o),d.borderAlign!=="inner"&&(i=Math.max(i,d.borderWidth||0,d.hoverBorderWidth||0));return i}getMaxOffset(e){let i=0;for(let a=0,o=e.length;a<o;++a){const c=this.resolveDataElementOptions(a);i=Math.max(i,c.offset||0,c.hoverOffset||0)}return i}_getRingWeightOffset(e){let i=0;for(let a=0;a<e;++a)this.chart.isDatasetVisible(a)&&(i+=this._getRingWeight(a));return i}_getRingWeight(e){return Math.max(ht(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class _1 extends Wo{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const i=this._cachedMeta,{dataset:a,data:o=[],_dataset:c}=i,u=this.chart._animationsDisabled;let{start:f,count:d}=Zx(i,o,u);this._drawStart=f,this._drawCount=d,Fx(i)&&(f=0,d=o.length),a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!c._decimated,a.points=o;const m=this.resolveDatasetElementOptions(e);this.options.showLine||(m.borderWidth=0),m.segment=this.options.segment,this.updateElement(a,void 0,{animated:!u,options:m},e),this.updateElements(o,f,d,e)}updateElements(e,i,a,o){const c=o==="reset",{iScale:u,vScale:f,_stacked:d,_dataset:m}=this._cachedMeta,{sharedOptions:p,includeOptions:b}=this._getSharedOptions(i,o),v=u.axis,S=f.axis,{spanGaps:T,segment:M}=this.options,A=Ka(T)?T:Number.POSITIVE_INFINITY,D=this.chart._animationsDisabled||c||o==="none",L=i+a,q=e.length;let G=i>0&&this.getParsed(i-1);for(let Y=0;Y<q;++Y){const K=e[Y],X=D?K:{};if(Y<i||Y>=L){X.skip=!0;continue}const Z=this.getParsed(Y),tt=xt(Z[S]),rt=X[v]=u.getPixelForValue(Z[v],Y),it=X[S]=c||tt?f.getBasePixel():f.getPixelForValue(d?this.applyStack(f,Z,d):Z[S],Y);X.skip=isNaN(rt)||isNaN(it)||tt,X.stop=Y>0&&Math.abs(Z[v]-G[v])>A,M&&(X.parsed=Z,X.raw=m.data[Y]),b&&(X.options=p||this.resolveDataElementOptions(Y,K.active?"active":o)),D||this.updateElement(K,Y,X,o),G=Z}}getMaxOverflow(){const e=this._cachedMeta,i=e.dataset,a=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return a;const c=o[0].size(this.resolveDataElementOptions(0)),u=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(a,c,u)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class S1 extends x1{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function Ni(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class pf{static override(e){Object.assign(pf.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return Ni()}parse(){return Ni()}format(){return Ni()}add(){return Ni()}diff(){return Ni()}startOf(){return Ni()}endOf(){return Ni()}}var T1={_date:pf};function M1(s,e,i,a){const{controller:o,data:c,_sorted:u}=s,f=o._cachedMeta.iScale,d=s.dataset&&s.dataset.options?s.dataset.options.spanGaps:null;if(f&&e===f.axis&&e!=="r"&&u&&c.length){const m=f._reversePixels?Yx:Bi;if(a){if(o._sharedOptions){const p=c[0],b=typeof p.getRange=="function"&&p.getRange(e);if(b){const v=m(c,e,i-b),S=m(c,e,i+b);return{lo:v.lo,hi:S.hi}}}}else{const p=m(c,e,i);if(d){const{vScale:b}=o._cachedMeta,{_parsed:v}=s,S=v.slice(0,p.lo+1).reverse().findIndex(M=>!xt(M[b.axis]));p.lo-=Math.max(0,S);const T=v.slice(p.hi).findIndex(M=>!xt(M[b.axis]));p.hi+=Math.max(0,T)}return p}}return{lo:0,hi:c.length-1}}function Jo(s,e,i,a,o){const c=s.getSortedVisibleDatasetMetas(),u=i[e];for(let f=0,d=c.length;f<d;++f){const{index:m,data:p}=c[f],{lo:b,hi:v}=M1(c[f],e,u,o);for(let S=b;S<=v;++S){const T=p[S];T.skip||a(T,m,S)}}}function E1(s){const e=s.indexOf("x")!==-1,i=s.indexOf("y")!==-1;return function(a,o){const c=e?Math.abs(a.x-o.x):0,u=i?Math.abs(a.y-o.y):0;return Math.sqrt(Math.pow(c,2)+Math.pow(u,2))}}function ju(s,e,i,a,o){const c=[];return!o&&!s.isPointInArea(e)||Jo(s,i,e,function(f,d,m){!o&&!Ja(f,s.chartArea,0)||f.inRange(e.x,e.y,a)&&c.push({element:f,datasetIndex:d,index:m})},!0),c}function A1(s,e,i,a){let o=[];function c(u,f,d){const{startAngle:m,endAngle:p}=u.getProps(["startAngle","endAngle"],a),{angle:b}=y0(u,{x:e.x,y:e.y});Wa(b,m,p)&&o.push({element:u,datasetIndex:f,index:d})}return Jo(s,i,e,c),o}function O1(s,e,i,a,o,c){let u=[];const f=E1(i);let d=Number.POSITIVE_INFINITY;function m(p,b,v){const S=p.inRange(e.x,e.y,o);if(a&&!S)return;const T=p.getCenterPoint(o);if(!(!!c||s.isPointInArea(T))&&!S)return;const A=f(e,T);A<d?(u=[{element:p,datasetIndex:b,index:v}],d=A):A===d&&u.push({element:p,datasetIndex:b,index:v})}return Jo(s,i,e,m),u}function Ru(s,e,i,a,o,c){return!c&&!s.isPointInArea(e)?[]:i==="r"&&!a?A1(s,e,i,o):O1(s,e,i,a,o,c)}function cp(s,e,i,a,o){const c=[],u=i==="x"?"inXRange":"inYRange";let f=!1;return Jo(s,i,e,(d,m,p)=>{d[u]&&d[u](e[i],o)&&(c.push({element:d,datasetIndex:m,index:p}),f=f||d.inRange(e.x,e.y,o))}),a&&!f?[]:c}var C1={modes:{index(s,e,i,a){const o=Li(e,s),c=i.axis||"x",u=i.includeInvisible||!1,f=i.intersect?ju(s,o,c,a,u):Ru(s,o,c,!1,a,u),d=[];return f.length?(s.getSortedVisibleDatasetMetas().forEach(m=>{const p=f[0].index,b=m.data[p];b&&!b.skip&&d.push({element:b,datasetIndex:m.index,index:p})}),d):[]},dataset(s,e,i,a){const o=Li(e,s),c=i.axis||"xy",u=i.includeInvisible||!1;let f=i.intersect?ju(s,o,c,a,u):Ru(s,o,c,!1,a,u);if(f.length>0){const d=f[0].datasetIndex,m=s.getDatasetMeta(d).data;f=[];for(let p=0;p<m.length;++p)f.push({element:m[p],datasetIndex:d,index:p})}return f},point(s,e,i,a){const o=Li(e,s),c=i.axis||"xy",u=i.includeInvisible||!1;return ju(s,o,c,a,u)},nearest(s,e,i,a){const o=Li(e,s),c=i.axis||"xy",u=i.includeInvisible||!1;return Ru(s,o,c,i.intersect,a,u)},x(s,e,i,a){const o=Li(e,s);return cp(s,o,"x",i.intersect,a)},y(s,e,i,a){const o=Li(e,s);return cp(s,o,"y",i.intersect,a)}}};const U0=["left","top","right","bottom"];function ja(s,e){return s.filter(i=>i.pos===e)}function up(s,e){return s.filter(i=>U0.indexOf(i.pos)===-1&&i.box.axis===e)}function Ra(s,e){return s.sort((i,a)=>{const o=e?a:i,c=e?i:a;return o.weight===c.weight?o.index-c.index:o.weight-c.weight})}function D1(s){const e=[];let i,a,o,c,u,f;for(i=0,a=(s||[]).length;i<a;++i)o=s[i],{position:c,options:{stack:u,stackWeight:f=1}}=o,e.push({index:i,box:o,pos:c,horizontal:o.isHorizontal(),weight:o.weight,stack:u&&c+u,stackWeight:f});return e}function z1(s){const e={};for(const i of s){const{stack:a,pos:o,stackWeight:c}=i;if(!a||!U0.includes(o))continue;const u=e[a]||(e[a]={count:0,placed:0,weight:0,size:0});u.count++,u.weight+=c}return e}function w1(s,e){const i=z1(s),{vBoxMaxWidth:a,hBoxMaxHeight:o}=e;let c,u,f;for(c=0,u=s.length;c<u;++c){f=s[c];const{fullSize:d}=f.box,m=i[f.stack],p=m&&f.stackWeight/m.weight;f.horizontal?(f.width=p?p*a:d&&e.availableWidth,f.height=o):(f.width=a,f.height=p?p*o:d&&e.availableHeight)}return i}function j1(s){const e=D1(s),i=Ra(e.filter(m=>m.box.fullSize),!0),a=Ra(ja(e,"left"),!0),o=Ra(ja(e,"right")),c=Ra(ja(e,"top"),!0),u=Ra(ja(e,"bottom")),f=up(e,"x"),d=up(e,"y");return{fullSize:i,leftAndTop:a.concat(c),rightAndBottom:o.concat(d).concat(u).concat(f),chartArea:ja(e,"chartArea"),vertical:a.concat(o).concat(d),horizontal:c.concat(u).concat(f)}}function fp(s,e,i,a){return Math.max(s[i],e[i])+Math.max(s[a],e[a])}function V0(s,e){s.top=Math.max(s.top,e.top),s.left=Math.max(s.left,e.left),s.bottom=Math.max(s.bottom,e.bottom),s.right=Math.max(s.right,e.right)}function R1(s,e,i,a){const{pos:o,box:c}=i,u=s.maxPadding;if(!pt(o)){i.size&&(s[o]-=i.size);const b=a[i.stack]||{size:0,count:1};b.size=Math.max(b.size,i.horizontal?c.height:c.width),i.size=b.size/b.count,s[o]+=i.size}c.getPadding&&V0(u,c.getPadding());const f=Math.max(0,e.outerWidth-fp(u,s,"left","right")),d=Math.max(0,e.outerHeight-fp(u,s,"top","bottom")),m=f!==s.w,p=d!==s.h;return s.w=f,s.h=d,i.horizontal?{same:m,other:p}:{same:p,other:m}}function k1(s){const e=s.maxPadding;function i(a){const o=Math.max(e[a]-s[a],0);return s[a]+=o,o}s.y+=i("top"),s.x+=i("left"),i("right"),i("bottom")}function N1(s,e){const i=e.maxPadding;function a(o){const c={left:0,top:0,right:0,bottom:0};return o.forEach(u=>{c[u]=Math.max(e[u],i[u])}),c}return a(s?["left","right"]:["top","bottom"])}function Ba(s,e,i,a){const o=[];let c,u,f,d,m,p;for(c=0,u=s.length,m=0;c<u;++c){f=s[c],d=f.box,d.update(f.width||e.w,f.height||e.h,N1(f.horizontal,e));const{same:b,other:v}=R1(e,i,f,a);m|=b&&o.length,p=p||v,d.fullSize||o.push(f)}return m&&Ba(o,e,i,a)||p}function Ao(s,e,i,a,o){s.top=i,s.left=e,s.right=e+a,s.bottom=i+o,s.width=a,s.height=o}function hp(s,e,i,a){const o=i.padding;let{x:c,y:u}=e;for(const f of s){const d=f.box,m=a[f.stack]||{placed:0,weight:1},p=f.stackWeight/m.weight||1;if(f.horizontal){const b=e.w*p,v=m.size||d.height;Fa(m.start)&&(u=m.start),d.fullSize?Ao(d,o.left,u,i.outerWidth-o.right-o.left,v):Ao(d,e.left+m.placed,u,b,v),m.start=u,m.placed+=b,u=d.bottom}else{const b=e.h*p,v=m.size||d.width;Fa(m.start)&&(c=m.start),d.fullSize?Ao(d,c,o.top,v,i.outerHeight-o.bottom-o.top):Ao(d,c,e.top+m.placed,v,b),m.start=c,m.placed+=b,c=d.right}}e.x=c,e.y=u}var Ke={addBox(s,e){s.boxes||(s.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(i){e.draw(i)}}]},s.boxes.push(e)},removeBox(s,e){const i=s.boxes?s.boxes.indexOf(e):-1;i!==-1&&s.boxes.splice(i,1)},configure(s,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(s,e,i,a){if(!s)return;const o=Le(s.options.layout.padding),c=Math.max(e-o.width,0),u=Math.max(i-o.height,0),f=j1(s.boxes),d=f.vertical,m=f.horizontal;At(s.boxes,M=>{typeof M.beforeLayout=="function"&&M.beforeLayout()});const p=d.reduce((M,A)=>A.box.options&&A.box.options.display===!1?M:M+1,0)||1,b=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:c,availableHeight:u,vBoxMaxWidth:c/2/p,hBoxMaxHeight:u/2}),v=Object.assign({},o);V0(v,Le(a));const S=Object.assign({maxPadding:v,w:c,h:u,x:o.left,y:o.top},o),T=w1(d.concat(m),b);Ba(f.fullSize,S,b,T),Ba(d,S,b,T),Ba(m,S,b,T)&&Ba(d,S,b,T),k1(S),hp(f.leftAndTop,S,b,T),S.x+=S.w,S.y+=S.h,hp(f.rightAndBottom,S,b,T),s.chartArea={left:S.left,top:S.top,right:S.left+S.w,bottom:S.top+S.h,height:S.h,width:S.w},At(f.chartArea,M=>{const A=M.box;Object.assign(A,s.chartArea),A.update(S.w,S.h,{left:0,top:0,right:0,bottom:0})})}};class Y0{acquireContext(e,i){}releaseContext(e){return!1}addEventListener(e,i,a){}removeEventListener(e,i,a){}getDevicePixelRatio(){return 1}getMaximumSize(e,i,a,o){return i=Math.max(0,i||e.width),a=a||e.height,{width:i,height:Math.max(0,o?Math.floor(i/o):a)}}isAttached(e){return!0}updateConfig(e){}}class L1 extends Y0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Ho="$chartjs",H1={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},dp=s=>s===null||s==="";function B1(s,e){const i=s.style,a=s.getAttribute("height"),o=s.getAttribute("width");if(s[Ho]={initial:{height:a,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",dp(o)){const c=Jm(s,"width");c!==void 0&&(s.width=c)}if(dp(a))if(s.style.height==="")s.height=s.width/(e||2);else{const c=Jm(s,"height");c!==void 0&&(s.height=c)}return s}const q0=L_?{passive:!0}:!1;function U1(s,e,i){s&&s.addEventListener(e,i,q0)}function V1(s,e,i){s&&s.canvas&&s.canvas.removeEventListener(e,i,q0)}function Y1(s,e){const i=H1[s.type]||s.type,{x:a,y:o}=Li(s,e);return{type:i,chart:e,native:s,x:a!==void 0?a:null,y:o!==void 0?o:null}}function Go(s,e){for(const i of s)if(i===e||i.contains(e))return!0}function q1(s,e,i){const a=s.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||Go(f.addedNodes,a),u=u&&!Go(f.removedNodes,a);u&&i()});return o.observe(document,{childList:!0,subtree:!0}),o}function X1(s,e,i){const a=s.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||Go(f.removedNodes,a),u=u&&!Go(f.addedNodes,a);u&&i()});return o.observe(document,{childList:!0,subtree:!0}),o}const Pa=new Map;let gp=0;function X0(){const s=window.devicePixelRatio;s!==gp&&(gp=s,Pa.forEach((e,i)=>{i.currentDevicePixelRatio!==s&&e()}))}function G1(s,e){Pa.size||window.addEventListener("resize",X0),Pa.set(s,e)}function Q1(s){Pa.delete(s),Pa.size||window.removeEventListener("resize",X0)}function Z1(s,e,i){const a=s.canvas,o=a&&mf(a);if(!o)return;const c=_0((f,d)=>{const m=o.clientWidth;i(f,d),m<o.clientWidth&&i()},window),u=new ResizeObserver(f=>{const d=f[0],m=d.contentRect.width,p=d.contentRect.height;m===0&&p===0||c(m,p)});return u.observe(o),G1(s,c),u}function ku(s,e,i){i&&i.disconnect(),e==="resize"&&Q1(s)}function F1(s,e,i){const a=s.canvas,o=_0(c=>{s.ctx!==null&&i(Y1(c,s))},s);return U1(a,e,o),o}class K1 extends Y0{acquireContext(e,i){const a=e&&e.getContext&&e.getContext("2d");return a&&a.canvas===e?(B1(e,i),a):null}releaseContext(e){const i=e.canvas;if(!i[Ho])return!1;const a=i[Ho].initial;["height","width"].forEach(c=>{const u=a[c];xt(u)?i.removeAttribute(c):i.setAttribute(c,u)});const o=a.style||{};return Object.keys(o).forEach(c=>{i.style[c]=o[c]}),i.width=i.width,delete i[Ho],!0}addEventListener(e,i,a){this.removeEventListener(e,i);const o=e.$proxies||(e.$proxies={}),u={attach:q1,detach:X1,resize:Z1}[i]||F1;o[i]=u(e,i,a)}removeEventListener(e,i){const a=e.$proxies||(e.$proxies={}),o=a[i];if(!o)return;({attach:ku,detach:ku,resize:ku}[i]||V1)(e,i,o),a[i]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,i,a,o){return N_(e,i,a,o)}isAttached(e){const i=e&&mf(e);return!!(i&&i.isConnected)}}function W1(s){return!gf()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?L1:K1}class Nn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:i,y:a}=this.getProps(["x","y"],e);return{x:i,y:a}}hasValue(){return Ka(this.x)&&Ka(this.y)}getProps(e,i){const a=this.$animations;if(!i||!a)return this;const o={};return e.forEach(c=>{o[c]=a[c]&&a[c].active()?a[c]._to:this[c]}),o}}function J1(s,e){const i=s.options.ticks,a=I1(s),o=Math.min(i.maxTicksLimit||a,a),c=i.major.enabled?$1(e):[],u=c.length,f=c[0],d=c[u-1],m=[];if(u>o)return tS(e,m,c,u/o),m;const p=P1(c,e,o);if(u>0){let b,v;const S=u>1?Math.round((d-f)/(u-1)):null;for(Oo(e,m,p,xt(S)?0:f-S,f),b=0,v=u-1;b<v;b++)Oo(e,m,p,c[b],c[b+1]);return Oo(e,m,p,d,xt(S)?e.length:d+S),m}return Oo(e,m,p),m}function I1(s){const e=s.options.offset,i=s._tickSize(),a=s._length/i+(e?0:1),o=s._maxLength/i;return Math.floor(Math.min(a,o))}function P1(s,e,i){const a=eS(s),o=e.length/i;if(!a)return Math.max(o,1);const c=kx(a);for(let u=0,f=c.length-1;u<f;u++){const d=c[u];if(d>o)return d}return Math.max(o,1)}function $1(s){const e=[];let i,a;for(i=0,a=s.length;i<a;i++)s[i].major&&e.push(i);return e}function tS(s,e,i,a){let o=0,c=i[0],u;for(a=Math.ceil(a),u=0;u<s.length;u++)u===c&&(e.push(s[u]),o++,c=i[o*a])}function Oo(s,e,i,a,o){const c=ht(a,0),u=Math.min(ht(o,s.length),s.length);let f=0,d,m,p;for(i=Math.ceil(i),o&&(d=o-a,i=d/Math.floor(d/i)),p=c;p<0;)f++,p=Math.round(c+f*i);for(m=Math.max(c,0);m<u;m++)m===p&&(e.push(s[m]),f++,p=Math.round(c+f*i))}function eS(s){const e=s.length;let i,a;if(e<2)return!1;for(a=s[0],i=1;i<e;++i)if(s[i]-s[i-1]!==a)return!1;return a}const nS=s=>s==="left"?"right":s==="right"?"left":s,mp=(s,e,i)=>e==="top"||e==="left"?s[e]+i:s[e]-i,pp=(s,e)=>Math.min(e||s,s);function yp(s,e){const i=[],a=s.length/e,o=s.length;let c=0;for(;c<o;c+=a)i.push(s[Math.floor(c)]);return i}function iS(s,e,i){const a=s.ticks.length,o=Math.min(e,a-1),c=s._startPixel,u=s._endPixel,f=1e-6;let d=s.getPixelForTick(o),m;if(!(i&&(a===1?m=Math.max(d-c,u-d):e===0?m=(s.getPixelForTick(1)-d)/2:m=(d-s.getPixelForTick(o-1))/2,d+=o<e?m:-m,d<c-f||d>u+f)))return d}function sS(s,e){At(s,i=>{const a=i.gc,o=a.length/2;let c;if(o>e){for(c=0;c<o;++c)delete i.data[a[c]];a.splice(0,o)}})}function ka(s){return s.drawTicks?s.tickLength:0}function bp(s,e){if(!s.display)return 0;const i=re(s.font,e),a=Le(s.padding);return(Kt(s.text)?s.text.length:1)*i.lineHeight+a.height}function aS(s,e){return qi(s,{scale:e,type:"scale"})}function lS(s,e,i){return qi(s,{tick:i,index:e,type:"tick"})}function oS(s,e,i){let a=of(s);return(i&&e!=="right"||!i&&e==="right")&&(a=nS(a)),a}function rS(s,e,i,a){const{top:o,left:c,bottom:u,right:f,chart:d}=s,{chartArea:m,scales:p}=d;let b=0,v,S,T;const M=u-o,A=f-c;if(s.isHorizontal()){if(S=ue(a,c,f),pt(i)){const D=Object.keys(i)[0],L=i[D];T=p[D].getPixelForValue(L)+M-e}else i==="center"?T=(m.bottom+m.top)/2+M-e:T=mp(s,i,e);v=f-c}else{if(pt(i)){const D=Object.keys(i)[0],L=i[D];S=p[D].getPixelForValue(L)-A+e}else i==="center"?S=(m.left+m.right)/2-A+e:S=mp(s,i,e);T=ue(a,u,o),b=i==="left"?-te:te}return{titleX:S,titleY:T,maxWidth:v,rotation:b}}class Ns extends Nn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,i){return e}getUserBounds(){let{_userMin:e,_userMax:i,_suggestedMin:a,_suggestedMax:o}=this;return e=sn(e,Number.POSITIVE_INFINITY),i=sn(i,Number.NEGATIVE_INFINITY),a=sn(a,Number.POSITIVE_INFINITY),o=sn(o,Number.NEGATIVE_INFINITY),{min:sn(e,a),max:sn(i,o),minDefined:he(e),maxDefined:he(i)}}getMinMax(e){let{min:i,max:a,minDefined:o,maxDefined:c}=this.getUserBounds(),u;if(o&&c)return{min:i,max:a};const f=this.getMatchingVisibleMetas();for(let d=0,m=f.length;d<m;++d)u=f[d].controller.getMinMax(this,e),o||(i=Math.min(i,u.min)),c||(a=Math.max(a,u.max));return i=c&&i>a?a:i,a=o&&i>a?i:a,{min:sn(i,sn(a,i)),max:sn(a,sn(i,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){kt(this.options.beforeUpdate,[this])}update(e,i,a){const{beginAtZero:o,grace:c,ticks:u}=this.options,f=u.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=i,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=d_(this,c,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=f<this.ticks.length;this._convertTicksToLabels(d?yp(this.ticks,f):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),u.display&&(u.autoSkip||u.source==="auto")&&(this.ticks=J1(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,i,a;this.isHorizontal()?(i=this.left,a=this.right):(i=this.top,a=this.bottom,e=!e),this._startPixel=i,this._endPixel=a,this._reversePixels=e,this._length=a-i,this._alignToPixels=this.options.alignToPixels}afterUpdate(){kt(this.options.afterUpdate,[this])}beforeSetDimensions(){kt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){kt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),kt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){kt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const i=this.options.ticks;let a,o,c;for(a=0,o=e.length;a<o;a++)c=e[a],c.label=kt(i.callback,[c.value,a,e],this)}afterTickToLabelConversion(){kt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){kt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,i=e.ticks,a=pp(this.ticks.length,e.ticks.maxTicksLimit),o=i.minRotation||0,c=i.maxRotation;let u=o,f,d,m;if(!this._isVisible()||!i.display||o>=c||a<=1||!this.isHorizontal()){this.labelRotation=o;return}const p=this._getLabelSizes(),b=p.widest.width,v=p.highest.height,S=fe(this.chart.width-b,0,this.maxWidth);f=e.offset?this.maxWidth/a:S/(a-1),b+6>f&&(f=S/(a-(e.offset?.5:1)),d=this.maxHeight-ka(e.grid)-i.padding-bp(e.title,this.chart.options.font),m=Math.sqrt(b*b+v*v),u=Bx(Math.min(Math.asin(fe((p.highest.height+6)/f,-1,1)),Math.asin(fe(d/m,-1,1))-Math.asin(fe(v/m,-1,1)))),u=Math.max(o,Math.min(c,u))),this.labelRotation=u}afterCalculateLabelRotation(){kt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){kt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:i,options:{ticks:a,title:o,grid:c}}=this,u=this._isVisible(),f=this.isHorizontal();if(u){const d=bp(o,i.options.font);if(f?(e.width=this.maxWidth,e.height=ka(c)+d):(e.height=this.maxHeight,e.width=ka(c)+d),a.display&&this.ticks.length){const{first:m,last:p,widest:b,highest:v}=this._getLabelSizes(),S=a.padding*2,T=jn(this.labelRotation),M=Math.cos(T),A=Math.sin(T);if(f){const D=a.mirror?0:A*b.width+M*v.height;e.height=Math.min(this.maxHeight,e.height+D+S)}else{const D=a.mirror?0:M*b.width+A*v.height;e.width=Math.min(this.maxWidth,e.width+D+S)}this._calculatePadding(m,p,A,M)}}this._handleMargins(),f?(this.width=this._length=i.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=i.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,i,a,o){const{ticks:{align:c,padding:u},position:f}=this.options,d=this.labelRotation!==0,m=f!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,b=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,S=0;d?m?(v=o*e.width,S=a*i.height):(v=a*e.height,S=o*i.width):c==="start"?S=i.width:c==="end"?v=e.width:c!=="inner"&&(v=e.width/2,S=i.width/2),this.paddingLeft=Math.max((v-p+u)*this.width/(this.width-p),0),this.paddingRight=Math.max((S-b+u)*this.width/(this.width-b),0)}else{let p=i.height/2,b=e.height/2;c==="start"?(p=0,b=e.height):c==="end"&&(p=i.height,b=0),this.paddingTop=p+u,this.paddingBottom=b+u}}_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(){kt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:i}=this.options;return i==="top"||i==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let i,a;for(i=0,a=e.length;i<a;i++)xt(e[i].label)&&(e.splice(i,1),a--,i--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const i=this.options.ticks.sampleSize;let a=this.ticks;i<a.length&&(a=yp(a,i)),this._labelSizes=e=this._computeLabelSizes(a,a.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,i,a){const{ctx:o,_longestTextCache:c}=this,u=[],f=[],d=Math.floor(i/pp(i,a));let m=0,p=0,b,v,S,T,M,A,D,L,q,G,Y;for(b=0;b<i;b+=d){if(T=e[b].label,M=this._resolveTickFontOptions(b),o.font=A=M.string,D=c[A]=c[A]||{data:{},gc:[]},L=M.lineHeight,q=G=0,!xt(T)&&!Kt(T))q=Qm(o,D.data,D.gc,q,T),G=L;else if(Kt(T))for(v=0,S=T.length;v<S;++v)Y=T[v],!xt(Y)&&!Kt(Y)&&(q=Qm(o,D.data,D.gc,q,Y),G+=L);u.push(q),f.push(G),m=Math.max(q,m),p=Math.max(G,p)}sS(c,i);const K=u.indexOf(m),X=f.indexOf(p),Z=tt=>({width:u[tt]||0,height:f[tt]||0});return{first:Z(0),last:Z(i-1),widest:Z(K),highest:Z(X),widths:u,heights:f}}getLabelForValue(e){return e}getPixelForValue(e,i){return NaN}getValueForPixel(e){}getPixelForTick(e){const i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const i=this._startPixel+e*this._length;return Vx(this._alignToPixels?ki(this.chart,i,0):i)}getDecimalForPixel(e){const i=(e-this._startPixel)/this._length;return this._reversePixels?1-i:i}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:i}=this;return e<0&&i<0?i:e>0&&i>0?e:0}getContext(e){const i=this.ticks||[];if(e>=0&&e<i.length){const a=i[e];return a.$context||(a.$context=lS(this.getContext(),e,a))}return this.$context||(this.$context=aS(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,i=jn(this.labelRotation),a=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),c=this._getLabelSizes(),u=e.autoSkipPadding||0,f=c?c.widest.width+u:0,d=c?c.highest.height+u:0;return this.isHorizontal()?d*a>f*o?f/a:d/o:d*o<f*a?d/a:f/o}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const i=this.axis,a=this.chart,o=this.options,{grid:c,position:u,border:f}=o,d=c.offset,m=this.isHorizontal(),b=this.ticks.length+(d?1:0),v=ka(c),S=[],T=f.setContext(this.getContext()),M=T.display?T.width:0,A=M/2,D=function(k){return ki(a,k,M)};let L,q,G,Y,K,X,Z,tt,rt,it,st,Nt;if(u==="top")L=D(this.bottom),X=this.bottom-v,tt=L-A,it=D(e.top)+A,Nt=e.bottom;else if(u==="bottom")L=D(this.top),it=e.top,Nt=D(e.bottom)-A,X=L+A,tt=this.top+v;else if(u==="left")L=D(this.right),K=this.right-v,Z=L-A,rt=D(e.left)+A,st=e.right;else if(u==="right")L=D(this.left),rt=e.left,st=D(e.right)-A,K=L+A,Z=this.left+v;else if(i==="x"){if(u==="center")L=D((e.top+e.bottom)/2+.5);else if(pt(u)){const k=Object.keys(u)[0],Q=u[k];L=D(this.chart.scales[k].getPixelForValue(Q))}it=e.top,Nt=e.bottom,X=L+A,tt=X+v}else if(i==="y"){if(u==="center")L=D((e.left+e.right)/2);else if(pt(u)){const k=Object.keys(u)[0],Q=u[k];L=D(this.chart.scales[k].getPixelForValue(Q))}K=L-A,Z=K-v,rt=e.left,st=e.right}const Vt=ht(o.ticks.maxTicksLimit,b),dt=Math.max(1,Math.ceil(b/Vt));for(q=0;q<b;q+=dt){const k=this.getContext(q),Q=c.setContext(k),$=f.setContext(k),lt=Q.lineWidth,_t=Q.color,C=$.dash||[],U=$.dashOffset,F=Q.tickWidth,J=Q.tickColor,at=Q.tickBorderDash||[],ot=Q.tickBorderDashOffset;G=iS(this,q,d),G!==void 0&&(Y=ki(a,G,lt),m?K=Z=rt=st=Y:X=tt=it=Nt=Y,S.push({tx1:K,ty1:X,tx2:Z,ty2:tt,x1:rt,y1:it,x2:st,y2:Nt,width:lt,color:_t,borderDash:C,borderDashOffset:U,tickWidth:F,tickColor:J,tickBorderDash:at,tickBorderDashOffset:ot}))}return this._ticksLength=b,this._borderValue=L,S}_computeLabelItems(e){const i=this.axis,a=this.options,{position:o,ticks:c}=a,u=this.isHorizontal(),f=this.ticks,{align:d,crossAlign:m,padding:p,mirror:b}=c,v=ka(a.grid),S=v+p,T=b?-p:S,M=-jn(this.labelRotation),A=[];let D,L,q,G,Y,K,X,Z,tt,rt,it,st,Nt="middle";if(o==="top")K=this.bottom-T,X=this._getXAxisLabelAlignment();else if(o==="bottom")K=this.top+T,X=this._getXAxisLabelAlignment();else if(o==="left"){const dt=this._getYAxisLabelAlignment(v);X=dt.textAlign,Y=dt.x}else if(o==="right"){const dt=this._getYAxisLabelAlignment(v);X=dt.textAlign,Y=dt.x}else if(i==="x"){if(o==="center")K=(e.top+e.bottom)/2+S;else if(pt(o)){const dt=Object.keys(o)[0],k=o[dt];K=this.chart.scales[dt].getPixelForValue(k)+S}X=this._getXAxisLabelAlignment()}else if(i==="y"){if(o==="center")Y=(e.left+e.right)/2-S;else if(pt(o)){const dt=Object.keys(o)[0],k=o[dt];Y=this.chart.scales[dt].getPixelForValue(k)}X=this._getYAxisLabelAlignment(v).textAlign}i==="y"&&(d==="start"?Nt="top":d==="end"&&(Nt="bottom"));const Vt=this._getLabelSizes();for(D=0,L=f.length;D<L;++D){q=f[D],G=q.label;const dt=c.setContext(this.getContext(D));Z=this.getPixelForTick(D)+c.labelOffset,tt=this._resolveTickFontOptions(D),rt=tt.lineHeight,it=Kt(G)?G.length:1;const k=it/2,Q=dt.color,$=dt.textStrokeColor,lt=dt.textStrokeWidth;let _t=X;u?(Y=Z,X==="inner"&&(D===L-1?_t=this.options.reverse?"left":"right":D===0?_t=this.options.reverse?"right":"left":_t="center"),o==="top"?m==="near"||M!==0?st=-it*rt+rt/2:m==="center"?st=-Vt.highest.height/2-k*rt+rt:st=-Vt.highest.height+rt/2:m==="near"||M!==0?st=rt/2:m==="center"?st=Vt.highest.height/2-k*rt:st=Vt.highest.height-it*rt,b&&(st*=-1),M!==0&&!dt.showLabelBackdrop&&(Y+=rt/2*Math.sin(M))):(K=Z,st=(1-it)*rt/2);let C;if(dt.showLabelBackdrop){const U=Le(dt.backdropPadding),F=Vt.heights[D],J=Vt.widths[D];let at=st-U.top,ot=0-U.left;switch(Nt){case"middle":at-=F/2;break;case"bottom":at-=F;break}switch(X){case"center":ot-=J/2;break;case"right":ot-=J;break;case"inner":D===L-1?ot-=J:D>0&&(ot-=J/2);break}C={left:ot,top:at,width:J+U.width,height:F+U.height,color:dt.backdropColor}}A.push({label:G,font:tt,textOffset:st,options:{rotation:M,color:Q,strokeColor:$,strokeWidth:lt,textAlign:_t,textBaseline:Nt,translation:[Y,K],backdrop:C}})}return A}_getXAxisLabelAlignment(){const{position:e,ticks:i}=this.options;if(-jn(this.labelRotation))return e==="top"?"left":"right";let o="center";return i.align==="start"?o="left":i.align==="end"?o="right":i.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:i,ticks:{crossAlign:a,mirror:o,padding:c}}=this.options,u=this._getLabelSizes(),f=e+c,d=u.widest.width;let m,p;return i==="left"?o?(p=this.right+c,a==="near"?m="left":a==="center"?(m="center",p+=d/2):(m="right",p+=d)):(p=this.right-f,a==="near"?m="right":a==="center"?(m="center",p-=d/2):(m="left",p=this.left)):i==="right"?o?(p=this.left+c,a==="near"?m="right":a==="center"?(m="center",p-=d/2):(m="left",p-=d)):(p=this.left+f,a==="near"?m="left":a==="center"?(m="center",p+=d/2):(m="right",p=this.right)):m="right",{textAlign:m,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,i=this.options.position;if(i==="left"||i==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(i==="top"||i==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:i},left:a,top:o,width:c,height:u}=this;i&&(e.save(),e.fillStyle=i,e.fillRect(a,o,c,u),e.restore())}getLineWidthForValue(e){const i=this.options.grid;if(!this._isVisible()||!i.display)return 0;const o=this.ticks.findIndex(c=>c.value===e);return o>=0?i.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){const i=this.options.grid,a=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let c,u;const f=(d,m,p)=>{!p.width||!p.color||(a.save(),a.lineWidth=p.width,a.strokeStyle=p.color,a.setLineDash(p.borderDash||[]),a.lineDashOffset=p.borderDashOffset,a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(m.x,m.y),a.stroke(),a.restore())};if(i.display)for(c=0,u=o.length;c<u;++c){const d=o[c];i.drawOnChartArea&&f({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),i.drawTicks&&f({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:i,options:{border:a,grid:o}}=this,c=a.setContext(this.getContext()),u=a.display?c.width:0;if(!u)return;const f=o.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let m,p,b,v;this.isHorizontal()?(m=ki(e,this.left,u)-u/2,p=ki(e,this.right,f)+f/2,b=v=d):(b=ki(e,this.top,u)-u/2,v=ki(e,this.bottom,f)+f/2,m=p=d),i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.beginPath(),i.moveTo(m,b),i.lineTo(p,v),i.stroke(),i.restore()}drawLabels(e){if(!this.options.ticks.display)return;const a=this.ctx,o=this._computeLabelArea();o&&Zo(a,o);const c=this.getLabelItems(e);for(const u of c){const f=u.options,d=u.font,m=u.label,p=u.textOffset;Ia(a,m,0,p,d,f)}o&&Fo(a)}drawTitle(){const{ctx:e,options:{position:i,title:a,reverse:o}}=this;if(!a.display)return;const c=re(a.font),u=Le(a.padding),f=a.align;let d=c.lineHeight/2;i==="bottom"||i==="center"||pt(i)?(d+=u.bottom,Kt(a.text)&&(d+=c.lineHeight*(a.text.length-1))):d+=u.top;const{titleX:m,titleY:p,maxWidth:b,rotation:v}=rS(this,d,i,f);Ia(e,a.text,0,0,c,{color:a.color,maxWidth:b,rotation:v,textAlign:oS(f,i,o),textBaseline:"middle",translation:[m,p]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,i=e.ticks&&e.ticks.z||0,a=ht(e.grid&&e.grid.z,-1),o=ht(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ns.prototype.draw?[{z:i,draw:c=>{this.draw(c)}}]:[{z:a,draw:c=>{this.drawBackground(),this.drawGrid(c),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:i,draw:c=>{this.drawLabels(c)}}]}getMatchingVisibleMetas(e){const i=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",o=[];let c,u;for(c=0,u=i.length;c<u;++c){const f=i[c];f[a]===this.id&&(!e||f.type===e)&&o.push(f)}return o}_resolveTickFontOptions(e){const i=this.options.ticks.setContext(this.getContext(e));return re(i.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Co{constructor(e,i,a){this.type=e,this.scope=i,this.override=a,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const i=Object.getPrototypeOf(e);let a;fS(i)&&(a=this.register(i));const o=this.items,c=e.id,u=this.scope+"."+c;if(!c)throw new Error("class does not have id: "+e);return c in o||(o[c]=e,cS(e,u,a),this.override&&Gt.override(e.id,e.overrides)),u}get(e){return this.items[e]}unregister(e){const i=this.items,a=e.id,o=this.scope;a in i&&delete i[a],o&&a in Gt[o]&&(delete Gt[o][a],this.override&&delete Yi[a])}}function cS(s,e,i){const a=rn(Object.create(null),[i?Gt.get(i):{},Gt.get(e),s.defaults]);Gt.set(e,a),s.defaultRoutes&&uS(e,s.defaultRoutes),s.descriptors&&Gt.describe(e,s.descriptors)}function uS(s,e){Object.keys(e).forEach(i=>{const a=i.split("."),o=a.pop(),c=[s].concat(a).join("."),u=e[i].split("."),f=u.pop(),d=u.join(".");Gt.route(c,o,d,f)})}function fS(s){return"id"in s&&"defaults"in s}class hS{constructor(){this.controllers=new Co(Wo,"datasets",!0),this.elements=new Co(Nn,"elements"),this.plugins=new Co(Object,"plugins"),this.scales=new Co(Ns,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,i,a){[...i].forEach(o=>{const c=a||this._getRegistryForType(o);a||c.isForType(o)||c===this.plugins&&o.id?this._exec(e,c,o):At(o,u=>{const f=a||this._getRegistryForType(u);this._exec(e,f,u)})})}_exec(e,i,a){const o=af(e);kt(a["before"+o],[],a),i[e](a),kt(a["after"+o],[],a)}_getRegistryForType(e){for(let i=0;i<this._typedRegistries.length;i++){const a=this._typedRegistries[i];if(a.isForType(e))return a}return this.plugins}_get(e,i,a){const o=i.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+a+".");return o}}var ln=new hS;class dS{constructor(){this._init=void 0}notify(e,i,a,o){if(i==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const c=o?this._descriptors(e).filter(o):this._descriptors(e),u=this._notify(c,e,i,a);return i==="afterDestroy"&&(this._notify(c,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),u}_notify(e,i,a,o){o=o||{};for(const c of e){const u=c.plugin,f=u[a],d=[i,o,c.options];if(kt(f,d,u)===!1&&o.cancelable)return!1}return!0}invalidate(){xt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const i=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),i}_createDescriptors(e,i){const a=e&&e.config,o=ht(a.options&&a.options.plugins,{}),c=gS(a);return o===!1&&!i?[]:pS(e,c,o,i)}_notifyStateChanges(e){const i=this._oldCache||[],a=this._cache,o=(c,u)=>c.filter(f=>!u.some(d=>f.plugin.id===d.plugin.id));this._notify(o(i,a),e,"stop"),this._notify(o(a,i),e,"start")}}function gS(s){const e={},i=[],a=Object.keys(ln.plugins.items);for(let c=0;c<a.length;c++)i.push(ln.getPlugin(a[c]));const o=s.plugins||[];for(let c=0;c<o.length;c++){const u=o[c];i.indexOf(u)===-1&&(i.push(u),e[u.id]=!0)}return{plugins:i,localIds:e}}function mS(s,e){return!e&&s===!1?null:s===!0?{}:s}function pS(s,{plugins:e,localIds:i},a,o){const c=[],u=s.getContext();for(const f of e){const d=f.id,m=mS(a[d],o);m!==null&&c.push({plugin:f,options:yS(s.config,{plugin:f,local:i[d]},m,u)})}return c}function yS(s,{plugin:e,local:i},a,o){const c=s.pluginScopeKeys(e),u=s.getOptionScopes(a,c);return i&&e.defaults&&u.push(e.defaults),s.createResolver(u,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wu(s,e){const i=Gt.datasets[s]||{};return((e.datasets||{})[s]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function bS(s,e){let i=s;return s==="_index_"?i=e:s==="_value_"&&(i=e==="x"?"y":"x"),i}function vS(s,e){return s===e?"_index_":"_value_"}function vp(s){if(s==="x"||s==="y"||s==="r")return s}function xS(s){if(s==="top"||s==="bottom")return"x";if(s==="left"||s==="right")return"y"}function Ju(s,...e){if(vp(s))return s;for(const i of e){const a=i.axis||xS(i.position)||s.length>1&&vp(s[0].toLowerCase());if(a)return a}throw new Error(`Cannot determine type of '${s}' axis. Please provide 'axis' or 'position' option.`)}function xp(s,e,i){if(i[e+"AxisID"]===s)return{axis:e}}function _S(s,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter(a=>a.xAxisID===s||a.yAxisID===s);if(i.length)return xp(s,"x",i[0])||xp(s,"y",i[0])}return{}}function SS(s,e){const i=Yi[s.type]||{scales:{}},a=e.scales||{},o=Wu(s.type,e),c=Object.create(null);return Object.keys(a).forEach(u=>{const f=a[u];if(!pt(f))return console.error(`Invalid scale configuration for scale: ${u}`);if(f._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${u}`);const d=Ju(u,f,_S(u,s),Gt.scales[f.type]),m=vS(d,o),p=i.scales||{};c[u]=Va(Object.create(null),[{axis:d},f,p[d],p[m]])}),s.data.datasets.forEach(u=>{const f=u.type||s.type,d=u.indexAxis||Wu(f,e),p=(Yi[f]||{}).scales||{};Object.keys(p).forEach(b=>{const v=bS(b,d),S=u[v+"AxisID"]||v;c[S]=c[S]||Object.create(null),Va(c[S],[{axis:v},a[S],p[b]])})}),Object.keys(c).forEach(u=>{const f=c[u];Va(f,[Gt.scales[f.type],Gt.scale])}),c}function G0(s){const e=s.options||(s.options={});e.plugins=ht(e.plugins,{}),e.scales=SS(s,e)}function Q0(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function TS(s){return s=s||{},s.data=Q0(s.data),G0(s),s}const _p=new Map,Z0=new Set;function Do(s,e){let i=_p.get(s);return i||(i=e(),_p.set(s,i),Z0.add(i)),i}const Na=(s,e,i)=>{const a=Vi(e,i);a!==void 0&&s.add(a)};class MS{constructor(e){this._config=TS(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Q0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),G0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Do(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,i){return Do(`${e}.transition.${i}`,()=>[[`datasets.${e}.transitions.${i}`,`transitions.${i}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,i){return Do(`${e}-${i}`,()=>[[`datasets.${e}.elements.${i}`,`datasets.${e}`,`elements.${i}`,""]])}pluginScopeKeys(e){const i=e.id,a=this.type;return Do(`${a}-plugin-${i}`,()=>[[`plugins.${i}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,i){const a=this._scopeCache;let o=a.get(e);return(!o||i)&&(o=new Map,a.set(e,o)),o}getOptionScopes(e,i,a){const{options:o,type:c}=this,u=this._cachedScopes(e,a),f=u.get(i);if(f)return f;const d=new Set;i.forEach(p=>{e&&(d.add(e),p.forEach(b=>Na(d,e,b))),p.forEach(b=>Na(d,o,b)),p.forEach(b=>Na(d,Yi[c]||{},b)),p.forEach(b=>Na(d,Gt,b)),p.forEach(b=>Na(d,Fu,b))});const m=Array.from(d);return m.length===0&&m.push(Object.create(null)),Z0.has(i)&&u.set(i,m),m}chartOptionScopes(){const{options:e,type:i}=this;return[e,Yi[i]||{},Gt.datasets[i]||{},{type:i},Gt,Fu]}resolveNamedOptions(e,i,a,o=[""]){const c={$shared:!0},{resolver:u,subPrefixes:f}=Sp(this._resolverCache,e,o);let d=u;if(AS(u,i)){c.$shared=!1,a=hi(a)?a():a;const m=this.createResolver(e,a,f);d=Rs(u,a,m)}for(const m of i)c[m]=d[m];return c}createResolver(e,i,a=[""],o){const{resolver:c}=Sp(this._resolverCache,e,a);return pt(i)?Rs(c,i,void 0,o):c}}function Sp(s,e,i){let a=s.get(e);a||(a=new Map,s.set(e,a));const o=i.join();let c=a.get(o);return c||(c={resolver:ff(e,i),subPrefixes:i.filter(f=>!f.toLowerCase().includes("hover"))},a.set(o,c)),c}const ES=s=>pt(s)&&Object.getOwnPropertyNames(s).some(e=>hi(s[e]));function AS(s,e){const{isScriptable:i,isIndexable:a}=E0(s);for(const o of e){const c=i(o),u=a(o),f=(u||c)&&s[o];if(c&&(hi(f)||ES(f))||u&&Kt(f))return!0}return!1}var OS="4.5.1";const CS=["top","bottom","left","right","chartArea"];function Tp(s,e){return s==="top"||s==="bottom"||CS.indexOf(s)===-1&&e==="x"}function Mp(s,e){return function(i,a){return i[s]===a[s]?i[e]-a[e]:i[s]-a[s]}}function Ep(s){const e=s.chart,i=e.options.animation;e.notifyPlugins("afterRender"),kt(i&&i.onComplete,[s],e)}function DS(s){const e=s.chart,i=e.options.animation;kt(i&&i.onProgress,[s],e)}function F0(s){return gf()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}const Bo={},Ap=s=>{const e=F0(s);return Object.values(Bo).filter(i=>i.canvas===e).pop()};function zS(s,e,i){const a=Object.keys(s);for(const o of a){const c=+o;if(c>=e){const u=s[o];delete s[o],(i>0||c>e)&&(s[c+i]=u)}}}function wS(s,e,i,a){return!i||s.type==="mouseout"?null:a?e:s}let Io=class{static defaults=Gt;static instances=Bo;static overrides=Yi;static registry=ln;static version=OS;static getChart=Ap;static register(...e){ln.add(...e),Op()}static unregister(...e){ln.remove(...e),Op()}constructor(e,i){const a=this.config=new MS(i),o=F0(e),c=Ap(o);if(c)throw new Error("Canvas is already in use. Chart with ID '"+c.id+"' must be destroyed before the canvas with ID '"+c.canvas.id+"' can be reused.");const u=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||W1(o)),this.platform.updateConfig(a);const f=this.platform.acquireContext(o,u.aspectRatio),d=f&&f.canvas,m=d&&d.height,p=d&&d.width;if(this.id=Ex(),this.ctx=f,this.canvas=d,this.width=p,this.height=m,this._options=u,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 dS,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Gx(b=>this.update(b),u.resizeDelay||0),this._dataChanges=[],Bo[this.id]=this,!f||!d){console.error("Failed to create chart: can't acquire context from the given item");return}Cn.listen(this,"complete",Ep),Cn.listen(this,"progress",DS),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:i},width:a,height:o,_aspectRatio:c}=this;return xt(e)?i&&c?c:o?a/o:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ln}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Wm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Zm(this.canvas,this.ctx),this}stop(){return Cn.stop(this),this}resize(e,i){Cn.running(this)?this._resizeBeforeDraw={width:e,height:i}:this._resize(e,i)}_resize(e,i){const a=this.options,o=this.canvas,c=a.maintainAspectRatio&&this.aspectRatio,u=this.platform.getMaximumSize(o,e,i,c),f=a.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=u.width,this.height=u.height,this._aspectRatio=this.aspectRatio,Wm(this,f,!0)&&(this.notifyPlugins("resize",{size:u}),kt(a.onResize,[this,u],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const i=this.options.scales||{};At(i,(a,o)=>{a.id=o})}buildOrUpdateScales(){const e=this.options,i=e.scales,a=this.scales,o=Object.keys(a).reduce((u,f)=>(u[f]=!1,u),{});let c=[];i&&(c=c.concat(Object.keys(i).map(u=>{const f=i[u],d=Ju(u,f),m=d==="r",p=d==="x";return{options:f,dposition:m?"chartArea":p?"bottom":"left",dtype:m?"radialLinear":p?"category":"linear"}}))),At(c,u=>{const f=u.options,d=f.id,m=Ju(d,f),p=ht(f.type,u.dtype);(f.position===void 0||Tp(f.position,m)!==Tp(u.dposition))&&(f.position=u.dposition),o[d]=!0;let b=null;if(d in a&&a[d].type===p)b=a[d];else{const v=ln.getScale(p);b=new v({id:d,type:p,ctx:this.ctx,chart:this}),a[b.id]=b}b.init(f,e)}),At(o,(u,f)=>{u||delete a[f]}),At(a,u=>{Ke.configure(this,u,u.options),Ke.addBox(this,u)})}_updateMetasets(){const e=this._metasets,i=this.data.datasets.length,a=e.length;if(e.sort((o,c)=>o.index-c.index),a>i){for(let o=i;o<a;++o)this._destroyDatasetMeta(o);e.splice(i,a-i)}this._sortedMetasets=e.slice(0).sort(Mp("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:i}}=this;e.length>i.length&&delete this._stacks,e.forEach((a,o)=>{i.filter(c=>c===a._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const e=[],i=this.data.datasets;let a,o;for(this._removeUnreferencedMetasets(),a=0,o=i.length;a<o;a++){const c=i[a];let u=this.getDatasetMeta(a);const f=c.type||this.config.type;if(u.type&&u.type!==f&&(this._destroyDatasetMeta(a),u=this.getDatasetMeta(a)),u.type=f,u.indexAxis=c.indexAxis||Wu(f,this.options),u.order=c.order||0,u.index=a,u.label=""+c.label,u.visible=this.isDatasetVisible(a),u.controller)u.controller.updateIndex(a),u.controller.linkScales();else{const d=ln.getController(f),{datasetElementType:m,dataElementType:p}=Gt.datasets[f];Object.assign(d,{dataElementType:ln.getElement(p),datasetElementType:m&&ln.getElement(m)}),u.controller=new d(this,a),e.push(u.controller)}}return this._updateMetasets(),e}_resetElements(){At(this.data.datasets,(e,i)=>{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const i=this.config;i.update();const a=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const c=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let u=0;for(let m=0,p=this.data.datasets.length;m<p;m++){const{controller:b}=this.getDatasetMeta(m),v=!o&&c.indexOf(b)===-1;b.buildOrUpdateElements(v),u=Math.max(+b.getMaxOverflow(),u)}u=this._minPadding=a.layout.autoPadding?u:0,this._updateLayout(u),o||At(c,m=>{m.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Mp("z","_idx"));const{_active:f,_lastEvent:d}=this;d?this._eventHandler(d,!0):f.length&&this._updateHoverStyles(f,f,!0),this.render()}_updateScales(){At(this.scales,e=>{Ke.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,i=new Set(Object.keys(this._listeners)),a=new Set(e.events);(!Lm(i,a)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,i=this._getUniformDataChanges()||[];for(const{method:a,start:o,count:c}of i){const u=a==="_removeElements"?-c:c;zS(e,o,u)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const i=this.data.datasets.length,a=c=>new Set(e.filter(u=>u[0]===c).map((u,f)=>f+","+u.splice(1).join(","))),o=a(0);for(let c=1;c<i;c++)if(!Lm(o,a(c)))return;return Array.from(o).map(c=>c.split(",")).map(c=>({method:c[1],start:+c[2],count:+c[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ke.update(this,this.width,this.height,e);const i=this.chartArea,a=i.width<=0||i.height<=0;this._layers=[],At(this.boxes,o=>{a&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,c)=>{o._idx=c}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let i=0,a=this.data.datasets.length;i<a;++i)this.getDatasetMeta(i).controller.configure();for(let i=0,a=this.data.datasets.length;i<a;++i)this._updateDataset(i,hi(e)?e({datasetIndex:i}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,i){const a=this.getDatasetMeta(e),o={meta:a,index:e,mode:i,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(a.controller._update(i),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Cn.has(this)?this.attached&&!Cn.running(this)&&Cn.start(this):(this.draw(),Ep({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:a,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(a,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const i=this._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(this.chartArea);for(this._drawDatasets();e<i.length;++e)i[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const i=this._sortedMetasets,a=[];let o,c;for(o=0,c=i.length;o<c;++o){const u=i[o];(!e||u.visible)&&a.push(u)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)this._drawDataset(e[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const i=this.ctx,a={meta:e,index:e.index,cancelable:!0},o=N0(this,e);this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(o&&Zo(i,o),e.controller.draw(),o&&Fo(i),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return Ja(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,i,a,o){const c=C1.modes[i];return typeof c=="function"?c(this,e,a,o):[]}getDatasetMeta(e){const i=this.data.datasets[e],a=this._metasets;let o=a.filter(c=>c&&c._dataset===i).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:e,_dataset:i,_parsed:[],_sorted:!1},a.push(o)),o}getContext(){return this.$context||(this.$context=qi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const i=this.data.datasets[e];if(!i)return!1;const a=this.getDatasetMeta(e);return typeof a.hidden=="boolean"?!a.hidden:!i.hidden}setDatasetVisibility(e,i){const a=this.getDatasetMeta(e);a.hidden=!i}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,i,a){const o=a?"show":"hide",c=this.getDatasetMeta(e),u=c.controller._resolveAnimations(void 0,o);Fa(i)?(c.data[i].hidden=!a,this.update()):(this.setDatasetVisibility(e,a),u.update(c,{visible:a}),this.update(f=>f.datasetIndex===e?o:void 0))}hide(e,i){this._updateVisibility(e,i,!1)}show(e,i){this._updateVisibility(e,i,!0)}_destroyDatasetMeta(e){const i=this._metasets[e];i&&i.controller&&i.controller._destroy(),delete this._metasets[e]}_stop(){let e,i;for(this.stop(),Cn.remove(this),e=0,i=this.data.datasets.length;e<i;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:i}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Zm(e,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete Bo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,i=this.platform,a=(c,u)=>{i.addEventListener(this,c,u),e[c]=u},o=(c,u,f)=>{c.offsetX=u,c.offsetY=f,this._eventHandler(c)};At(this.options.events,c=>a(c,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,i=this.platform,a=(d,m)=>{i.addEventListener(this,d,m),e[d]=m},o=(d,m)=>{e[d]&&(i.removeEventListener(this,d,m),delete e[d])},c=(d,m)=>{this.canvas&&this.resize(d,m)};let u;const f=()=>{o("attach",f),this.attached=!0,this.resize(),a("resize",c),a("detach",u)};u=()=>{this.attached=!1,o("resize",c),this._stop(),this._resize(0,0),a("attach",f)},i.isAttached(this.canvas)?f():u()}unbindEvents(){At(this._listeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._listeners={},At(this._responsiveListeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,i,a){const o=a?"set":"remove";let c,u,f,d;for(i==="dataset"&&(c=this.getDatasetMeta(e[0].datasetIndex),c.controller["_"+o+"DatasetHoverStyle"]()),f=0,d=e.length;f<d;++f){u=e[f];const m=u&&this.getDatasetMeta(u.datasetIndex).controller;m&&m[o+"HoverStyle"](u.element,u.datasetIndex,u.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const i=this._active||[],a=e.map(({datasetIndex:c,index:u})=>{const f=this.getDatasetMeta(c);if(!f)throw new Error("No dataset found at index "+c);return{datasetIndex:c,element:f.data[u],index:u}});!Uo(a,i)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,i))}notifyPlugins(e,i,a){return this._plugins.notify(this,e,i,a)}isPluginEnabled(e){return this._plugins._cache.filter(i=>i.plugin.id===e).length===1}_updateHoverStyles(e,i,a){const o=this.options.hover,c=(d,m)=>d.filter(p=>!m.some(b=>p.datasetIndex===b.datasetIndex&&p.index===b.index)),u=c(i,e),f=a?e:c(e,i);u.length&&this.updateHoverStyle(u,o.mode,!1),f.length&&o.mode&&this.updateHoverStyle(f,o.mode,!0)}_eventHandler(e,i){const a={event:e,replay:i,cancelable:!0,inChartArea:this.isPointInArea(e)},o=u=>(u.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",a,o)===!1)return;const c=this._handleEvent(e,i,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,o),(c||a.changed)&&this.render(),this}_handleEvent(e,i,a){const{_active:o=[],options:c}=this,u=i,f=this._getActiveElements(e,o,a,u),d=wx(e),m=wS(e,this._lastEvent,a,d);a&&(this._lastEvent=null,kt(c.onHover,[e,f,this],this),d&&kt(c.onClick,[e,f,this],this));const p=!Uo(f,o);return(p||i)&&(this._active=f,this._updateHoverStyles(f,o,i)),this._lastEvent=m,p}_getActiveElements(e,i,a,o){if(e.type==="mouseout")return[];if(!a)return i;const c=this.options.hover;return this.getElementsAtEventForMode(e,c.mode,c,o)}};function Op(){return At(Io.instances,s=>s._plugins.invalidate())}function jS(s,e,i){const{startAngle:a,x:o,y:c,outerRadius:u,innerRadius:f,options:d}=e,{borderWidth:m,borderJoinStyle:p}=d,b=Math.min(m/u,Ne(a-i));if(s.beginPath(),s.arc(o,c,u-m/2,a+b/2,i-b/2),f>0){const v=Math.min(m/f,Ne(a-i));s.arc(o,c,f+m/2,i-v/2,a+v/2,!0)}else{const v=Math.min(m/2,u*Ne(a-i));if(p==="round")s.arc(o,c,v,i-Dt/2,a+Dt/2,!0);else if(p==="bevel"){const S=2*v*v,T=-S*Math.cos(i+Dt/2)+o,M=-S*Math.sin(i+Dt/2)+c,A=S*Math.cos(a+Dt/2)+o,D=S*Math.sin(a+Dt/2)+c;s.lineTo(T,M),s.lineTo(A,D)}}s.closePath(),s.moveTo(0,0),s.rect(0,0,s.canvas.width,s.canvas.height),s.clip("evenodd")}function RS(s,e,i){const{startAngle:a,pixelMargin:o,x:c,y:u,outerRadius:f,innerRadius:d}=e;let m=o/f;s.beginPath(),s.arc(c,u,f,a-m,i+m),d>o?(m=o/d,s.arc(c,u,d,i+m,a-m,!0)):s.arc(c,u,o,i+te,a-te),s.closePath(),s.clip()}function kS(s){return uf(s,["outerStart","outerEnd","innerStart","innerEnd"])}function NS(s,e,i,a){const o=kS(s.options.borderRadius),c=(i-e)/2,u=Math.min(c,a*e/2),f=d=>{const m=(i-Math.min(c,d))*a/2;return fe(d,0,Math.min(c,m))};return{outerStart:f(o.outerStart),outerEnd:f(o.outerEnd),innerStart:fe(o.innerStart,0,u),innerEnd:fe(o.innerEnd,0,u)}}function Ds(s,e,i,a){return{x:i+s*Math.cos(e),y:a+s*Math.sin(e)}}function Qo(s,e,i,a,o,c){const{x:u,y:f,startAngle:d,pixelMargin:m,innerRadius:p}=e,b=Math.max(e.outerRadius+a+i-m,0),v=p>0?p+a+i+m:0;let S=0;const T=o-d;if(a){const dt=p>0?p-a:0,k=b>0?b-a:0,Q=(dt+k)/2,$=Q!==0?T*Q/(Q+a):T;S=(T-$)/2}const M=Math.max(.001,T*b-i/Dt)/b,A=(T-M)/2,D=d+A+S,L=o-A-S,{outerStart:q,outerEnd:G,innerStart:Y,innerEnd:K}=NS(e,v,b,L-D),X=b-q,Z=b-G,tt=D+q/X,rt=L-G/Z,it=v+Y,st=v+K,Nt=D+Y/it,Vt=L-K/st;if(s.beginPath(),c){const dt=(tt+rt)/2;if(s.arc(u,f,b,tt,dt),s.arc(u,f,b,dt,rt),G>0){const lt=Ds(Z,rt,u,f);s.arc(lt.x,lt.y,G,rt,L+te)}const k=Ds(st,L,u,f);if(s.lineTo(k.x,k.y),K>0){const lt=Ds(st,Vt,u,f);s.arc(lt.x,lt.y,K,L+te,Vt+Math.PI)}const Q=(L-K/v+(D+Y/v))/2;if(s.arc(u,f,v,L-K/v,Q,!0),s.arc(u,f,v,Q,D+Y/v,!0),Y>0){const lt=Ds(it,Nt,u,f);s.arc(lt.x,lt.y,Y,Nt+Math.PI,D-te)}const $=Ds(X,D,u,f);if(s.lineTo($.x,$.y),q>0){const lt=Ds(X,tt,u,f);s.arc(lt.x,lt.y,q,D-te,tt)}}else{s.moveTo(u,f);const dt=Math.cos(tt)*b+u,k=Math.sin(tt)*b+f;s.lineTo(dt,k);const Q=Math.cos(rt)*b+u,$=Math.sin(rt)*b+f;s.lineTo(Q,$)}s.closePath()}function LS(s,e,i,a,o){const{fullCircles:c,startAngle:u,circumference:f}=e;let d=e.endAngle;if(c){Qo(s,e,i,a,d,o);for(let m=0;m<c;++m)s.fill();isNaN(f)||(d=u+(f%Yt||Yt))}return Qo(s,e,i,a,d,o),s.fill(),d}function HS(s,e,i,a,o){const{fullCircles:c,startAngle:u,circumference:f,options:d}=e,{borderWidth:m,borderJoinStyle:p,borderDash:b,borderDashOffset:v,borderRadius:S}=d,T=d.borderAlign==="inner";if(!m)return;s.setLineDash(b||[]),s.lineDashOffset=v,T?(s.lineWidth=m*2,s.lineJoin=p||"round"):(s.lineWidth=m,s.lineJoin=p||"bevel");let M=e.endAngle;if(c){Qo(s,e,i,a,M,o);for(let A=0;A<c;++A)s.stroke();isNaN(f)||(M=u+(f%Yt||Yt))}T&&RS(s,e,M),d.selfJoin&&M-u>=Dt&&S===0&&p!=="miter"&&jS(s,e,M),c||(Qo(s,e,i,a,M,o),s.stroke())}class K0 extends Nn{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,a){const o=this.getProps(["x","y"],a),{angle:c,distance:u}=y0(o,{x:e,y:i}),{startAngle:f,endAngle:d,innerRadius:m,outerRadius:p,circumference:b}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),v=(this.options.spacing+this.options.borderWidth)/2,S=ht(b,d-f),T=Wa(c,f,d)&&f!==d,M=S>=Yt||T,A=Rn(u,m+v,p+v);return M&&A}getCenterPoint(e){const{x:i,y:a,startAngle:o,endAngle:c,innerRadius:u,outerRadius:f}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:m}=this.options,p=(o+c)/2,b=(u+f+m+d)/2;return{x:i+Math.cos(p)*b,y:a+Math.sin(p)*b}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:a}=this,o=(i.offset||0)/4,c=(i.spacing||0)/2,u=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=a>Yt?Math.floor(a/Yt):0,a===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const f=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(f)*o,Math.sin(f)*o);const d=1-Math.sin(Math.min(Dt,a||0)),m=o*d;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,LS(e,this,m,c,u),HS(e,this,m,c,u),e.restore()}}function W0(s,e,i=e){s.lineCap=ht(i.borderCapStyle,e.borderCapStyle),s.setLineDash(ht(i.borderDash,e.borderDash)),s.lineDashOffset=ht(i.borderDashOffset,e.borderDashOffset),s.lineJoin=ht(i.borderJoinStyle,e.borderJoinStyle),s.lineWidth=ht(i.borderWidth,e.borderWidth),s.strokeStyle=ht(i.borderColor,e.borderColor)}function BS(s,e,i){s.lineTo(i.x,i.y)}function US(s){return s.stepped?s_:s.tension||s.cubicInterpolationMode==="monotone"?a_:BS}function J0(s,e,i={}){const a=s.length,{start:o=0,end:c=a-1}=i,{start:u,end:f}=e,d=Math.max(o,u),m=Math.min(c,f),p=o<u&&c<u||o>f&&c>f;return{count:a,start:d,loop:e.loop,ilen:m<d&&!p?a+m-d:m-d}}function VS(s,e,i,a){const{points:o,options:c}=e,{count:u,start:f,loop:d,ilen:m}=J0(o,i,a),p=US(c);let{move:b=!0,reverse:v}=a||{},S,T,M;for(S=0;S<=m;++S)T=o[(f+(v?m-S:S))%u],!T.skip&&(b?(s.moveTo(T.x,T.y),b=!1):p(s,M,T,v,c.stepped),M=T);return d&&(T=o[(f+(v?m:0))%u],p(s,M,T,v,c.stepped)),!!d}function YS(s,e,i,a){const o=e.points,{count:c,start:u,ilen:f}=J0(o,i,a),{move:d=!0,reverse:m}=a||{};let p=0,b=0,v,S,T,M,A,D;const L=G=>(u+(m?f-G:G))%c,q=()=>{M!==A&&(s.lineTo(p,A),s.lineTo(p,M),s.lineTo(p,D))};for(d&&(S=o[L(0)],s.moveTo(S.x,S.y)),v=0;v<=f;++v){if(S=o[L(v)],S.skip)continue;const G=S.x,Y=S.y,K=G|0;K===T?(Y<M?M=Y:Y>A&&(A=Y),p=(b*p+G)/++b):(q(),s.lineTo(G,Y),T=K,b=0,M=A=Y),D=Y}q()}function Iu(s){const e=s.options,i=e.borderDash&&e.borderDash.length;return!s._decimated&&!s._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!i?YS:VS}function qS(s){return s.stepped?H_:s.tension||s.cubicInterpolationMode==="monotone"?B_:Hi}function XS(s,e,i,a){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,a)&&o.closePath()),W0(s,e.options),s.stroke(o)}function GS(s,e,i,a){const{segments:o,options:c}=e,u=Iu(e);for(const f of o)W0(s,c,f.style),s.beginPath(),u(s,e,f,{start:i,end:i+a-1})&&s.closePath(),s.stroke()}const QS=typeof Path2D=="function";function ZS(s,e,i,a){QS&&!e.options.segment?XS(s,e,i,a):GS(s,e,i,a)}class Po extends Nn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,i){const a=this.options;if((a.tension||a.cubicInterpolationMode==="monotone")&&!a.stepped&&!this._pointsUpdated){const o=a.spanGaps?this._loop:this._fullLoop;D_(this._points,a,e,o,i),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=G_(this,this.options.segment))}first(){const e=this.segments,i=this.points;return e.length&&i[e[0].start]}last(){const e=this.segments,i=this.points,a=e.length;return a&&i[e[a-1].end]}interpolate(e,i){const a=this.options,o=e[i],c=this.points,u=k0(this,{property:i,start:o,end:o});if(!u.length)return;const f=[],d=qS(a);let m,p;for(m=0,p=u.length;m<p;++m){const{start:b,end:v}=u[m],S=c[b],T=c[v];if(S===T){f.push(S);continue}const M=Math.abs((o-S[i])/(T[i]-S[i])),A=d(S,T,M,a.stepped);A[i]=e[i],f.push(A)}return f.length===1?f[0]:f}pathSegment(e,i,a){return Iu(this)(e,this,i,a)}path(e,i,a){const o=this.segments,c=Iu(this);let u=this._loop;i=i||0,a=a||this.points.length-i;for(const f of o)u&=c(e,this,f,{start:i,end:i+a-1});return!!u}draw(e,i,a,o){const c=this.options||{};(this.points||[]).length&&c.borderWidth&&(e.save(),ZS(e,this,a,o),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Cp(s,e,i,a){const o=s.options,{[i]:c}=s.getProps([i],a);return Math.abs(e-c)<o.radius+o.hitRadius}class I0 extends Nn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,a){const o=this.options,{x:c,y:u}=this.getProps(["x","y"],a);return Math.pow(e-c,2)+Math.pow(i-u,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return Cp(this,e,"x",i)}inYRange(e,i){return Cp(this,e,"y",i)}getCenterPoint(e){const{x:i,y:a}=this.getProps(["x","y"],e);return{x:i,y:a}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const a=i&&e.borderWidth||0;return(i+a)*2}draw(e,i){const a=this.options;this.skip||a.radius<.1||!Ja(this,i,this.size(a)/2)||(e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.fillStyle=a.backgroundColor,Ku(e,a,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function P0(s,e){const{x:i,y:a,base:o,width:c,height:u}=s.getProps(["x","y","base","width","height"],e);let f,d,m,p,b;return s.horizontal?(b=u/2,f=Math.min(i,o),d=Math.max(i,o),m=a-b,p=a+b):(b=c/2,f=i-b,d=i+b,m=Math.min(a,o),p=Math.max(a,o)),{left:f,top:m,right:d,bottom:p}}function ci(s,e,i,a){return s?0:fe(e,i,a)}function FS(s,e,i){const a=s.options.borderWidth,o=s.borderSkipped,c=M0(a);return{t:ci(o.top,c.top,0,i),r:ci(o.right,c.right,0,e),b:ci(o.bottom,c.bottom,0,i),l:ci(o.left,c.left,0,e)}}function KS(s,e,i){const{enableBorderRadius:a}=s.getProps(["enableBorderRadius"]),o=s.options.borderRadius,c=zs(o),u=Math.min(e,i),f=s.borderSkipped,d=a||pt(o);return{topLeft:ci(!d||f.top||f.left,c.topLeft,0,u),topRight:ci(!d||f.top||f.right,c.topRight,0,u),bottomLeft:ci(!d||f.bottom||f.left,c.bottomLeft,0,u),bottomRight:ci(!d||f.bottom||f.right,c.bottomRight,0,u)}}function WS(s){const e=P0(s),i=e.right-e.left,a=e.bottom-e.top,o=FS(s,i/2,a/2),c=KS(s,i/2,a/2);return{outer:{x:e.left,y:e.top,w:i,h:a,radius:c},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:a-o.t-o.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,c.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(o.b,o.r))}}}}function Nu(s,e,i,a){const o=e===null,c=i===null,f=s&&!(o&&c)&&P0(s,a);return f&&(o||Rn(e,f.left,f.right))&&(c||Rn(i,f.top,f.bottom))}function JS(s){return s.topLeft||s.topRight||s.bottomLeft||s.bottomRight}function IS(s,e){s.rect(e.x,e.y,e.w,e.h)}function Lu(s,e,i={}){const a=s.x!==i.x?-e:0,o=s.y!==i.y?-e:0,c=(s.x+s.w!==i.x+i.w?e:0)-a,u=(s.y+s.h!==i.y+i.h?e:0)-o;return{x:s.x+a,y:s.y+o,w:s.w+c,h:s.h+u,radius:s.radius}}class $0 extends Nn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:i,options:{borderColor:a,backgroundColor:o}}=this,{inner:c,outer:u}=WS(this),f=JS(u.radius)?qo:IS;e.save(),(u.w!==c.w||u.h!==c.h)&&(e.beginPath(),f(e,Lu(u,i,c)),e.clip(),f(e,Lu(c,-i,u)),e.fillStyle=a,e.fill("evenodd")),e.beginPath(),f(e,Lu(c,i)),e.fillStyle=o,e.fill(),e.restore()}inRange(e,i,a){return Nu(this,e,i,a)}inXRange(e,i){return Nu(this,e,null,i)}inYRange(e,i){return Nu(this,null,e,i)}getCenterPoint(e){const{x:i,y:a,base:o,horizontal:c}=this.getProps(["x","y","base","horizontal"],e);return{x:c?(i+o)/2:i,y:c?a:(a+o)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}function PS(s,e,i){const a=s.segments,o=s.points,c=e.points,u=[];for(const f of a){let{start:d,end:m}=f;m=$o(d,m,o);const p=Pu(i,o[d],o[m],f.loop);if(!e.segments){u.push({source:f,target:p,start:o[d],end:o[m]});continue}const b=k0(e,p);for(const v of b){const S=Pu(i,c[v.start],c[v.end],v.loop),T=R0(f,o,S);for(const M of T)u.push({source:M,target:v,start:{[i]:Dp(p,S,"start",Math.max)},end:{[i]:Dp(p,S,"end",Math.min)}})}}return u}function Pu(s,e,i,a){if(a)return;let o=e[s],c=i[s];return s==="angle"&&(o=Ne(o),c=Ne(c)),{property:s,start:o,end:c}}function $S(s,e){const{x:i=null,y:a=null}=s||{},o=e.points,c=[];return e.segments.forEach(({start:u,end:f})=>{f=$o(u,f,o);const d=o[u],m=o[f];a!==null?(c.push({x:d.x,y:a}),c.push({x:m.x,y:a})):i!==null&&(c.push({x:i,y:d.y}),c.push({x:i,y:m.y}))}),c}function $o(s,e,i){for(;e>s;e--){const a=i[e];if(!isNaN(a.x)&&!isNaN(a.y))break}return e}function Dp(s,e,i,a){return s&&e?a(s[i],e[i]):s?s[i]:e?e[i]:0}function ty(s,e){let i=[],a=!1;return Kt(s)?(a=!0,i=s):i=$S(s,e),i.length?new Po({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function zp(s){return s&&s.fill!==!1}function t2(s,e,i){let o=s[e].fill;const c=[e];let u;if(!i)return o;for(;o!==!1&&c.indexOf(o)===-1;){if(!he(o))return o;if(u=s[o],!u)return!1;if(u.visible)return o;c.push(o),o=u.fill}return!1}function e2(s,e,i){const a=a2(s);if(pt(a))return isNaN(a.value)?!1:a;let o=parseFloat(a);return he(o)&&Math.floor(o)===o?n2(a[0],e,o,i):["origin","start","end","stack","shape"].indexOf(a)>=0&&a}function n2(s,e,i,a){return(s==="-"||s==="+")&&(i=e+i),i===e||i<0||i>=a?!1:i}function i2(s,e){let i=null;return s==="start"?i=e.bottom:s==="end"?i=e.top:pt(s)?i=e.getPixelForValue(s.value):e.getBasePixel&&(i=e.getBasePixel()),i}function s2(s,e,i){let a;return s==="start"?a=i:s==="end"?a=e.options.reverse?e.min:e.max:pt(s)?a=s.value:a=e.getBaseValue(),a}function a2(s){const e=s.options,i=e.fill;let a=ht(i&&i.target,i);return a===void 0&&(a=!!e.backgroundColor),a===!1||a===null?!1:a===!0?"origin":a}function l2(s){const{scale:e,index:i,line:a}=s,o=[],c=a.segments,u=a.points,f=o2(e,i);f.push(ty({x:null,y:e.bottom},a));for(let d=0;d<c.length;d++){const m=c[d];for(let p=m.start;p<=m.end;p++)r2(o,u[p],f)}return new Po({points:o,options:{}})}function o2(s,e){const i=[],a=s.getMatchingVisibleMetas("line");for(let o=0;o<a.length;o++){const c=a[o];if(c.index===e)break;c.hidden||i.unshift(c.dataset)}return i}function r2(s,e,i){const a=[];for(let o=0;o<i.length;o++){const c=i[o],{first:u,last:f,point:d}=c2(c,e,"x");if(!(!d||u&&f)){if(u)a.unshift(d);else if(s.push(d),!f)break}}s.push(...a)}function c2(s,e,i){const a=s.interpolate(e,i);if(!a)return{};const o=a[i],c=s.segments,u=s.points;let f=!1,d=!1;for(let m=0;m<c.length;m++){const p=c[m],b=u[p.start][i],v=u[p.end][i];if(Rn(o,b,v)){f=o===b,d=o===v;break}}return{first:f,last:d,point:a}}class ey{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,i,a){const{x:o,y:c,radius:u}=this;return i=i||{start:0,end:Yt},e.arc(o,c,u,i.end,i.start,!0),!a.bounds}interpolate(e){const{x:i,y:a,radius:o}=this,c=e.angle;return{x:i+Math.cos(c)*o,y:a+Math.sin(c)*o,angle:c}}}function u2(s){const{chart:e,fill:i,line:a}=s;if(he(i))return f2(e,i);if(i==="stack")return l2(s);if(i==="shape")return!0;const o=h2(s);return o instanceof ey?o:ty(o,a)}function f2(s,e){const i=s.getDatasetMeta(e);return i&&s.isDatasetVisible(e)?i.dataset:null}function h2(s){return(s.scale||{}).getPointPositionForValue?g2(s):d2(s)}function d2(s){const{scale:e={},fill:i}=s,a=i2(i,e);if(he(a)){const o=e.isHorizontal();return{x:o?a:null,y:o?null:a}}return null}function g2(s){const{scale:e,fill:i}=s,a=e.options,o=e.getLabels().length,c=a.reverse?e.max:e.min,u=s2(i,e,c),f=[];if(a.grid.circular){const d=e.getPointPositionForValue(0,c);return new ey({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(u)})}for(let d=0;d<o;++d)f.push(e.getPointPositionForValue(d,u));return f}function Hu(s,e,i){const a=u2(e),{chart:o,index:c,line:u,scale:f,axis:d}=e,m=u.options,p=m.fill,b=m.backgroundColor,{above:v=b,below:S=b}=p||{},T=o.getDatasetMeta(c),M=N0(o,T);a&&u.points.length&&(Zo(s,i),m2(s,{line:u,target:a,above:v,below:S,area:i,scale:f,axis:d,clip:M}),Fo(s))}function m2(s,e){const{line:i,target:a,above:o,below:c,area:u,scale:f,clip:d}=e,m=i._loop?"angle":e.axis;s.save();let p=c;c!==o&&(m==="x"?(wp(s,a,u.top),Bu(s,{line:i,target:a,color:o,scale:f,property:m,clip:d}),s.restore(),s.save(),wp(s,a,u.bottom)):m==="y"&&(jp(s,a,u.left),Bu(s,{line:i,target:a,color:c,scale:f,property:m,clip:d}),s.restore(),s.save(),jp(s,a,u.right),p=o)),Bu(s,{line:i,target:a,color:p,scale:f,property:m,clip:d}),s.restore()}function wp(s,e,i){const{segments:a,points:o}=e;let c=!0,u=!1;s.beginPath();for(const f of a){const{start:d,end:m}=f,p=o[d],b=o[$o(d,m,o)];c?(s.moveTo(p.x,p.y),c=!1):(s.lineTo(p.x,i),s.lineTo(p.x,p.y)),u=!!e.pathSegment(s,f,{move:u}),u?s.closePath():s.lineTo(b.x,i)}s.lineTo(e.first().x,i),s.closePath(),s.clip()}function jp(s,e,i){const{segments:a,points:o}=e;let c=!0,u=!1;s.beginPath();for(const f of a){const{start:d,end:m}=f,p=o[d],b=o[$o(d,m,o)];c?(s.moveTo(p.x,p.y),c=!1):(s.lineTo(i,p.y),s.lineTo(p.x,p.y)),u=!!e.pathSegment(s,f,{move:u}),u?s.closePath():s.lineTo(i,b.y)}s.lineTo(i,e.first().y),s.closePath(),s.clip()}function Bu(s,e){const{line:i,target:a,property:o,color:c,scale:u,clip:f}=e,d=PS(i,a,o);for(const{source:m,target:p,start:b,end:v}of d){const{style:{backgroundColor:S=c}={}}=m,T=a!==!0;s.save(),s.fillStyle=S,p2(s,u,f,T&&Pu(o,b,v)),s.beginPath();const M=!!i.pathSegment(s,m);let A;if(T){M?s.closePath():Rp(s,a,v,o);const D=!!a.pathSegment(s,p,{move:M,reverse:!0});A=M&&D,A||Rp(s,a,b,o)}s.closePath(),s.fill(A?"evenodd":"nonzero"),s.restore()}}function p2(s,e,i,a){const o=e.chart.chartArea,{property:c,start:u,end:f}=a||{};if(c==="x"||c==="y"){let d,m,p,b;c==="x"?(d=u,m=o.top,p=f,b=o.bottom):(d=o.left,m=u,p=o.right,b=f),s.beginPath(),i&&(d=Math.max(d,i.left),p=Math.min(p,i.right),m=Math.max(m,i.top),b=Math.min(b,i.bottom)),s.rect(d,m,p-d,b-m),s.clip()}}function Rp(s,e,i,a){const o=e.interpolate(i,a);o&&s.lineTo(o.x,o.y)}var y2={id:"filler",afterDatasetsUpdate(s,e,i){const a=(s.data.datasets||[]).length,o=[];let c,u,f,d;for(u=0;u<a;++u)c=s.getDatasetMeta(u),f=c.dataset,d=null,f&&f.options&&f instanceof Po&&(d={visible:s.isDatasetVisible(u),index:u,fill:e2(f,u,a),chart:s,axis:c.controller.options.indexAxis,scale:c.vScale,line:f}),c.$filler=d,o.push(d);for(u=0;u<a;++u)d=o[u],!(!d||d.fill===!1)&&(d.fill=t2(o,u,i.propagate))},beforeDraw(s,e,i){const a=i.drawTime==="beforeDraw",o=s.getSortedVisibleDatasetMetas(),c=s.chartArea;for(let u=o.length-1;u>=0;--u){const f=o[u].$filler;f&&(f.line.updateControlPoints(c,f.axis),a&&f.fill&&Hu(s.ctx,f,c))}},beforeDatasetsDraw(s,e,i){if(i.drawTime!=="beforeDatasetsDraw")return;const a=s.getSortedVisibleDatasetMetas();for(let o=a.length-1;o>=0;--o){const c=a[o].$filler;zp(c)&&Hu(s.ctx,c,s.chartArea)}},beforeDatasetDraw(s,e,i){const a=e.meta.$filler;!zp(a)||i.drawTime!=="beforeDatasetDraw"||Hu(s.ctx,a,s.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const kp=(s,e)=>{let{boxHeight:i=e,boxWidth:a=e}=s;return s.usePointStyle&&(i=Math.min(i,e),a=s.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:i,itemHeight:Math.max(e,i)}},b2=(s,e)=>s!==null&&e!==null&&s.datasetIndex===e.datasetIndex&&s.index===e.index;class Np extends Nn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,i,a){this.maxWidth=e,this.maxHeight=i,this._margins=a,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let i=kt(e.generateLabels,[this.chart],this)||[];e.filter&&(i=i.filter(a=>e.filter(a,this.chart.data))),e.sort&&(i=i.sort((a,o)=>e.sort(a,o,this.chart.data))),this.options.reverse&&i.reverse(),this.legendItems=i}fit(){const{options:e,ctx:i}=this;if(!e.display){this.width=this.height=0;return}const a=e.labels,o=re(a.font),c=o.size,u=this._computeTitleHeight(),{boxWidth:f,itemHeight:d}=kp(a,c);let m,p;i.font=o.string,this.isHorizontal()?(m=this.maxWidth,p=this._fitRows(u,c,f,d)+10):(p=this.maxHeight,m=this._fitCols(u,o,f,d)+10),this.width=Math.min(m,e.maxWidth||this.maxWidth),this.height=Math.min(p,e.maxHeight||this.maxHeight)}_fitRows(e,i,a,o){const{ctx:c,maxWidth:u,options:{labels:{padding:f}}}=this,d=this.legendHitBoxes=[],m=this.lineWidths=[0],p=o+f;let b=e;c.textAlign="left",c.textBaseline="middle";let v=-1,S=-p;return this.legendItems.forEach((T,M)=>{const A=a+i/2+c.measureText(T.text).width;(M===0||m[m.length-1]+A+2*f>u)&&(b+=p,m[m.length-(M>0?0:1)]=0,S+=p,v++),d[M]={left:0,top:S,row:v,width:A,height:o},m[m.length-1]+=A+f}),b}_fitCols(e,i,a,o){const{ctx:c,maxHeight:u,options:{labels:{padding:f}}}=this,d=this.legendHitBoxes=[],m=this.columnSizes=[],p=u-e;let b=f,v=0,S=0,T=0,M=0;return this.legendItems.forEach((A,D)=>{const{itemWidth:L,itemHeight:q}=v2(a,i,c,A,o);D>0&&S+q+2*f>p&&(b+=v+f,m.push({width:v,height:S}),T+=v+f,M++,v=S=0),d[D]={left:T,top:S,col:M,width:L,height:q},v=Math.max(v,L),S+=q+f}),b+=v,m.push({width:v,height:S}),b}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:i,options:{align:a,labels:{padding:o},rtl:c}}=this,u=ws(c,this.left,this.width);if(this.isHorizontal()){let f=0,d=ue(a,this.left+o,this.right-this.lineWidths[f]);for(const m of i)f!==m.row&&(f=m.row,d=ue(a,this.left+o,this.right-this.lineWidths[f])),m.top+=this.top+e+o,m.left=u.leftForLtr(u.x(d),m.width),d+=m.width+o}else{let f=0,d=ue(a,this.top+e+o,this.bottom-this.columnSizes[f].height);for(const m of i)m.col!==f&&(f=m.col,d=ue(a,this.top+e+o,this.bottom-this.columnSizes[f].height)),m.top=d,m.left+=this.left+o,m.left=u.leftForLtr(u.x(m.left),m.width),d+=m.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Zo(e,this),this._draw(),Fo(e)}}_draw(){const{options:e,columnSizes:i,lineWidths:a,ctx:o}=this,{align:c,labels:u}=e,f=Gt.color,d=ws(e.rtl,this.left,this.width),m=re(u.font),{padding:p}=u,b=m.size,v=b/2;let S;this.drawTitle(),o.textAlign=d.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=m.string;const{boxWidth:T,boxHeight:M,itemHeight:A}=kp(u,b),D=function(K,X,Z){if(isNaN(T)||T<=0||isNaN(M)||M<0)return;o.save();const tt=ht(Z.lineWidth,1);if(o.fillStyle=ht(Z.fillStyle,f),o.lineCap=ht(Z.lineCap,"butt"),o.lineDashOffset=ht(Z.lineDashOffset,0),o.lineJoin=ht(Z.lineJoin,"miter"),o.lineWidth=tt,o.strokeStyle=ht(Z.strokeStyle,f),o.setLineDash(ht(Z.lineDash,[])),u.usePointStyle){const rt={radius:M*Math.SQRT2/2,pointStyle:Z.pointStyle,rotation:Z.rotation,borderWidth:tt},it=d.xPlus(K,T/2),st=X+v;T0(o,rt,it,st,u.pointStyleWidth&&T)}else{const rt=X+Math.max((b-M)/2,0),it=d.leftForLtr(K,T),st=zs(Z.borderRadius);o.beginPath(),Object.values(st).some(Nt=>Nt!==0)?qo(o,{x:it,y:rt,w:T,h:M,radius:st}):o.rect(it,rt,T,M),o.fill(),tt!==0&&o.stroke()}o.restore()},L=function(K,X,Z){Ia(o,Z.text,K,X+A/2,m,{strikethrough:Z.hidden,textAlign:d.textAlign(Z.textAlign)})},q=this.isHorizontal(),G=this._computeTitleHeight();q?S={x:ue(c,this.left+p,this.right-a[0]),y:this.top+p+G,line:0}:S={x:this.left+p,y:ue(c,this.top+G+p,this.bottom-i[0].height),line:0},z0(this.ctx,e.textDirection);const Y=A+p;this.legendItems.forEach((K,X)=>{o.strokeStyle=K.fontColor,o.fillStyle=K.fontColor;const Z=o.measureText(K.text).width,tt=d.textAlign(K.textAlign||(K.textAlign=u.textAlign)),rt=T+v+Z;let it=S.x,st=S.y;d.setWidth(this.width),q?X>0&&it+rt+p>this.right&&(st=S.y+=Y,S.line++,it=S.x=ue(c,this.left+p,this.right-a[S.line])):X>0&&st+Y>this.bottom&&(it=S.x=it+i[S.line].width+p,S.line++,st=S.y=ue(c,this.top+G+p,this.bottom-i[S.line].height));const Nt=d.x(it);if(D(Nt,st,K),it=Qx(tt,it+T+v,q?it+rt:this.right,e.rtl),L(d.x(it),st,K),q)S.x+=rt+p;else if(typeof K.text!="string"){const Vt=m.lineHeight;S.y+=ny(K,Vt)+p}else S.y+=Y}),w0(this.ctx,e.textDirection)}drawTitle(){const e=this.options,i=e.title,a=re(i.font),o=Le(i.padding);if(!i.display)return;const c=ws(e.rtl,this.left,this.width),u=this.ctx,f=i.position,d=a.size/2,m=o.top+d;let p,b=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),p=this.top+m,b=ue(e.align,b,this.right-v);else{const T=this.columnSizes.reduce((M,A)=>Math.max(M,A.height),0);p=m+ue(e.align,this.top,this.bottom-T-e.labels.padding-this._computeTitleHeight())}const S=ue(f,b,b+v);u.textAlign=c.textAlign(of(f)),u.textBaseline="middle",u.strokeStyle=i.color,u.fillStyle=i.color,u.font=a.string,Ia(u,i.text,S,p,a)}_computeTitleHeight(){const e=this.options.title,i=re(e.font),a=Le(e.padding);return e.display?i.lineHeight+a.height:0}_getLegendItemAt(e,i){let a,o,c;if(Rn(e,this.left,this.right)&&Rn(i,this.top,this.bottom)){for(c=this.legendHitBoxes,a=0;a<c.length;++a)if(o=c[a],Rn(e,o.left,o.left+o.width)&&Rn(i,o.top,o.top+o.height))return this.legendItems[a]}return null}handleEvent(e){const i=this.options;if(!S2(e.type,i))return;const a=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const o=this._hoveredItem,c=b2(o,a);o&&!c&&kt(i.onLeave,[e,o,this],this),this._hoveredItem=a,a&&!c&&kt(i.onHover,[e,a,this],this)}else a&&kt(i.onClick,[e,a,this],this)}}function v2(s,e,i,a,o){const c=x2(a,s,e,i),u=_2(o,a,e.lineHeight);return{itemWidth:c,itemHeight:u}}function x2(s,e,i,a){let o=s.text;return o&&typeof o!="string"&&(o=o.reduce((c,u)=>c.length>u.length?c:u)),e+i.size/2+a.measureText(o).width}function _2(s,e,i){let a=s;return typeof e.text!="string"&&(a=ny(e,i)),a}function ny(s,e){const i=s.text?s.text.length:0;return e*i}function S2(s,e){return!!((s==="mousemove"||s==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(s==="click"||s==="mouseup"))}var T2={id:"legend",_element:Np,start(s,e,i){const a=s.legend=new Np({ctx:s.ctx,options:i,chart:s});Ke.configure(s,a,i),Ke.addBox(s,a)},stop(s){Ke.removeBox(s,s.legend),delete s.legend},beforeUpdate(s,e,i){const a=s.legend;Ke.configure(s,a,i),a.options=i},afterUpdate(s){const e=s.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(s,e){e.replay||s.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(s,e,i){const a=e.datasetIndex,o=i.chart;o.isDatasetVisible(a)?(o.hide(a),e.hidden=!0):(o.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:s=>s.chart.options.color,boxWidth:40,padding:10,generateLabels(s){const e=s.data.datasets,{labels:{usePointStyle:i,pointStyle:a,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=s.legend.options;return s._getSortedDatasetMetas().map(d=>{const m=d.controller.getStyle(i?0:void 0),p=Le(m.borderWidth);return{text:e[d.index].label,fillStyle:m.backgroundColor,fontColor:c,hidden:!d.visible,lineCap:m.borderCapStyle,lineDash:m.borderDash,lineDashOffset:m.borderDashOffset,lineJoin:m.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:m.borderColor,pointStyle:a||m.pointStyle,rotation:m.rotation,textAlign:o||m.textAlign,borderRadius:u&&(f||m.borderRadius),datasetIndex:d.index}},this)}},title:{color:s=>s.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:s=>!s.startsWith("on"),labels:{_scriptable:s=>!["generateLabels","filter","sort"].includes(s)}}};class iy extends Nn{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,i){const a=this.options;if(this.left=0,this.top=0,!a.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=i;const o=Kt(a.text)?a.text.length:1;this._padding=Le(a.padding);const c=o*re(a.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=c:this.width=c}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:i,left:a,bottom:o,right:c,options:u}=this,f=u.align;let d=0,m,p,b;return this.isHorizontal()?(p=ue(f,a,c),b=i+e,m=c-a):(u.position==="left"?(p=a+e,b=ue(f,o,i),d=Dt*-.5):(p=c-e,b=ue(f,i,o),d=Dt*.5),m=o-i),{titleX:p,titleY:b,maxWidth:m,rotation:d}}draw(){const e=this.ctx,i=this.options;if(!i.display)return;const a=re(i.font),c=a.lineHeight/2+this._padding.top,{titleX:u,titleY:f,maxWidth:d,rotation:m}=this._drawArgs(c);Ia(e,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:m,textAlign:of(i.align),textBaseline:"middle",translation:[u,f]})}}function M2(s,e){const i=new iy({ctx:s.ctx,options:e,chart:s});Ke.configure(s,i,e),Ke.addBox(s,i),s.titleBlock=i}var E2={id:"title",_element:iy,start(s,e,i){M2(s,i)},stop(s){const e=s.titleBlock;Ke.removeBox(s,e),delete s.titleBlock},beforeUpdate(s,e,i){const a=s.titleBlock;Ke.configure(s,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ua={average(s){if(!s.length)return!1;let e,i,a=new Set,o=0,c=0;for(e=0,i=s.length;e<i;++e){const f=s[e].element;if(f&&f.hasValue()){const d=f.tooltipPosition();a.add(d.x),o+=d.y,++c}}return c===0||a.size===0?!1:{x:[...a].reduce((f,d)=>f+d)/a.size,y:o/c}},nearest(s,e){if(!s.length)return!1;let i=e.x,a=e.y,o=Number.POSITIVE_INFINITY,c,u,f;for(c=0,u=s.length;c<u;++c){const d=s[c].element;if(d&&d.hasValue()){const m=d.getCenterPoint(),p=Zu(e,m);p<o&&(o=p,f=d)}}if(f){const d=f.tooltipPosition();i=d.x,a=d.y}return{x:i,y:a}}};function an(s,e){return e&&(Kt(e)?Array.prototype.push.apply(s,e):s.push(e)),s}function Dn(s){return(typeof s=="string"||s instanceof String)&&s.indexOf(`
|
|
8
|
+
`+r.stack}}var sr=Object.prototype.hasOwnProperty,ar=s.unstable_scheduleCallback,lr=s.unstable_cancelCallback,Dy=s.unstable_shouldYield,zy=s.unstable_requestPaint,Ee=s.unstable_now,wy=s.unstable_getCurrentPriorityLevel,Tf=s.unstable_ImmediatePriority,Mf=s.unstable_UserBlockingPriority,nl=s.unstable_NormalPriority,jy=s.unstable_LowPriority,Ef=s.unstable_IdlePriority,Ry=s.log,Ny=s.unstable_setDisableYieldValue,Hs=null,Ae=null;function Ln(t){if(typeof Ry=="function"&&Ny(t),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(Hs,t)}catch{}}var Oe=Math.clz32?Math.clz32:Hy,ky=Math.log,Ly=Math.LN2;function Hy(t){return t>>>=0,t===0?32:31-(ky(t)/Ly|0)|0}var il=256,sl=262144,al=4194304;function pi(t){var n=t&42;if(n!==0)return n;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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;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 ll(t,n,l){var r=t.pendingLanes;if(r===0)return 0;var h=0,g=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var _=r&134217727;return _!==0?(r=_&~g,r!==0?h=pi(r):(y&=_,y!==0?h=pi(y):l||(l=_&~t,l!==0&&(h=pi(l))))):(_=r&~g,_!==0?h=pi(_):y!==0?h=pi(y):l||(l=r&~t,l!==0&&(h=pi(l)))),h===0?0:n!==0&&n!==h&&(n&g)===0&&(g=h&-h,l=n&-n,g>=l||g===32&&(l&4194048)!==0)?n:h}function Bs(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function By(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32: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 n+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 Af(){var t=al;return al<<=1,(al&62914560)===0&&(al=4194304),t}function or(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function Us(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Uy(t,n,l,r,h,g){var y=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var _=t.entanglements,E=t.expirationTimes,j=t.hiddenUpdates;for(l=y&~l;0<l;){var H=31-Oe(l),V=1<<H;_[H]=0,E[H]=-1;var R=j[H];if(R!==null)for(j[H]=null,H=0;H<R.length;H++){var k=R[H];k!==null&&(k.lane&=-536870913)}l&=~V}r!==0&&Of(t,r,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(y&~n))}function Of(t,n,l){t.pendingLanes|=n,t.suspendedLanes&=~n;var r=31-Oe(n);t.entangledLanes|=n,t.entanglements[r]=t.entanglements[r]|1073741824|l&261930}function Cf(t,n){var l=t.entangledLanes|=n;for(t=t.entanglements;l;){var r=31-Oe(l),h=1<<r;h&n|t[r]&n&&(t[r]|=n),l&=~h}}function Df(t,n){var l=n&-n;return l=(l&42)!==0?1:rr(l),(l&(t.suspendedLanes|n))!==0?0:l}function rr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function cr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function zf(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:mm(t.type))}function wf(t,n){var l=Q.p;try{return Q.p=t,n()}finally{Q.p=l}}var Hn=Math.random().toString(36).slice(2),ie="__reactFiber$"+Hn,me="__reactProps$"+Hn,Gi="__reactContainer$"+Hn,ur="__reactEvents$"+Hn,Vy="__reactListeners$"+Hn,Yy="__reactHandles$"+Hn,jf="__reactResources$"+Hn,Vs="__reactMarker$"+Hn;function fr(t){delete t[ie],delete t[me],delete t[ur],delete t[Vy],delete t[Yy]}function Qi(t){var n=t[ie];if(n)return n;for(var l=t.parentNode;l;){if(n=l[Gi]||l[ie]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=$g(t);t!==null;){if(l=t[ie])return l;t=$g(t)}return n}t=l,l=t.parentNode}return null}function Zi(t){if(t=t[ie]||t[Gi]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Ys(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(a(33))}function Fi(t){var n=t[jf];return n||(n=t[jf]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ee(t){t[Vs]=!0}var Rf=new Set,Nf={};function yi(t,n){Ki(t,n),Ki(t+"Capture",n)}function Ki(t,n){for(Nf[t]=n,t=0;t<n.length;t++)Rf.add(n[t])}var qy=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]*$"),kf={},Lf={};function Xy(t){return sr.call(Lf,t)?!0:sr.call(kf,t)?!1:qy.test(t)?Lf[t]=!0:(kf[t]=!0,!1)}function ol(t,n,l){if(Xy(n))if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var r=n.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+l)}}function rl(t,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+l)}}function cn(t,n,l,r){if(r===null)t.removeAttribute(l);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(n,l,""+r)}}function He(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Hf(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Gy(t,n,l){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var h=r.get,g=r.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(y){l=""+y,g.call(this,y)}}),Object.defineProperty(t,n,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function hr(t){if(!t._valueTracker){var n=Hf(t)?"checked":"value";t._valueTracker=Gy(t,n,""+t[n])}}function Bf(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),r="";return t&&(r=Hf(t)?t.checked?"true":"false":t.value),t=r,t!==l?(n.setValue(t),!0):!1}function cl(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 Qy=/[\n"\\]/g;function Be(t){return t.replace(Qy,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function dr(t,n,l,r,h,g,y,_){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),n!=null?y==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+He(n)):t.value!==""+He(n)&&(t.value=""+He(n)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),n!=null?gr(t,y,He(n)):l!=null?gr(t,y,He(l)):r!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+He(_):t.removeAttribute("name")}function Uf(t,n,l,r,h,g,y,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){hr(t);return}l=l!=null?""+He(l):"",n=n!=null?""+He(n):l,_||n===t.value||(t.value=n),t.defaultValue=n}r=r??h,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=_?t.checked:!!r,t.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),hr(t)}function gr(t,n,l){n==="number"&&cl(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Wi(t,n,l,r){if(t=t.options,n){n={};for(var h=0;h<l.length;h++)n["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=n.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&r&&(t[l].defaultSelected=!0)}else{for(l=""+He(l),n=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,r&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function Vf(t,n,l){if(n!=null&&(n=""+He(n),n!==t.value&&(t.value=n),l==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=l!=null?""+He(l):""}function Yf(t,n,l,r){if(n==null){if(r!=null){if(l!=null)throw Error(a(92));if(dt(r)){if(1<r.length)throw Error(a(93));r=r[0]}l=r}l==null&&(l=""),n=l}l=He(n),t.defaultValue=l,r=t.textContent,r===l&&r!==""&&r!==null&&(t.value=r),hr(t)}function Ji(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var Zy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function qf(t,n,l){var r=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?r?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":r?t.setProperty(n,l):typeof l!="number"||l===0||Zy.has(n)?n==="float"?t.cssFloat=l:t[n]=(""+l).trim():t[n]=l+"px"}function Xf(t,n,l){if(n!=null&&typeof n!="object")throw Error(a(62));if(t=t.style,l!=null){for(var r in l)!l.hasOwnProperty(r)||n!=null&&n.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="");for(var h in n)r=n[h],n.hasOwnProperty(h)&&l[h]!==r&&qf(t,h,r)}else for(var g in n)n.hasOwnProperty(g)&&qf(t,g,n[g])}function mr(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ky=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ul(t){return Ky.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function un(){}var pr=null;function yr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ii=null,Pi=null;function Gf(t){var n=Zi(t);if(n&&(t=n.stateNode)){var l=t[me]||null;t:switch(t=n.stateNode,n.type){case"input":if(dr(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Be(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var r=l[n];if(r!==t&&r.form===t.form){var h=r[me]||null;if(!h)throw Error(a(90));dr(r,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<l.length;n++)r=l[n],r.form===t.form&&Bf(r)}break t;case"textarea":Vf(t,l.value,l.defaultValue);break t;case"select":n=l.value,n!=null&&Wi(t,!!l.multiple,n,!1)}}}var br=!1;function Qf(t,n,l){if(br)return t(n,l);br=!0;try{var r=t(n);return r}finally{if(br=!1,(Ii!==null||Pi!==null)&&(Il(),Ii&&(n=Ii,t=Pi,Pi=Ii=null,Gf(n),t)))for(n=0;n<t.length;n++)Gf(t[n])}}function qs(t,n){var l=t.stateNode;if(l===null)return null;var r=l[me]||null;if(r===null)return null;l=r[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vr=!1;if(fn)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){vr=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{vr=!1}var Bn=null,xr=null,fl=null;function Zf(){if(fl)return fl;var t,n=xr,l=n.length,r,h="value"in Bn?Bn.value:Bn.textContent,g=h.length;for(t=0;t<l&&n[t]===h[t];t++);var y=l-t;for(r=1;r<=y&&n[l-r]===h[g-r];r++);return fl=h.slice(t,1<r?1-r:void 0)}function hl(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function dl(){return!0}function Ff(){return!1}function pe(t){function n(l,r,h,g,y){this._reactName=l,this._targetInst=h,this.type=r,this.nativeEvent=g,this.target=y,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(l=t[_],this[_]=l?l(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?dl:Ff,this.isPropagationStopped=Ff,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=dl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=dl)},persist:function(){},isPersistent:dl}),n}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gl=pe(bi),Gs=b({},bi,{view:0,detail:0}),Wy=pe(Gs),_r,Sr,Qs,ml=b({},Gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Qs&&(Qs&&t.type==="mousemove"?(_r=t.screenX-Qs.screenX,Sr=t.screenY-Qs.screenY):Sr=_r=0,Qs=t),_r)},movementY:function(t){return"movementY"in t?t.movementY:Sr}}),Kf=pe(ml),Jy=b({},ml,{dataTransfer:0}),Iy=pe(Jy),Py=b({},Gs,{relatedTarget:0}),Tr=pe(Py),$y=b({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),tb=pe($y),eb=b({},bi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),nb=pe(eb),ib=b({},bi,{data:0}),Wf=pe(ib),sb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ab={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ob(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=lb[t])?!!n[t]:!1}function Mr(){return ob}var rb=b({},Gs,{key:function(t){if(t.key){var n=sb[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=hl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ab[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mr,charCode:function(t){return t.type==="keypress"?hl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?hl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),cb=pe(rb),ub=b({},ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jf=pe(ub),fb=b({},Gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mr}),hb=pe(fb),db=b({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),gb=pe(db),mb=b({},ml,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),pb=pe(mb),yb=b({},bi,{newState:0,oldState:0}),bb=pe(yb),vb=[9,13,27,32],Er=fn&&"CompositionEvent"in window,Zs=null;fn&&"documentMode"in document&&(Zs=document.documentMode);var xb=fn&&"TextEvent"in window&&!Zs,If=fn&&(!Er||Zs&&8<Zs&&11>=Zs),Pf=" ",$f=!1;function th(t,n){switch(t){case"keyup":return vb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var $i=!1;function _b(t,n){switch(t){case"compositionend":return eh(n);case"keypress":return n.which!==32?null:($f=!0,Pf);case"textInput":return t=n.data,t===Pf&&$f?null:t;default:return null}}function Sb(t,n){if($i)return t==="compositionend"||!Er&&th(t,n)?(t=Zf(),fl=xr=Bn=null,$i=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return If&&n.locale!=="ko"?null:n.data;default:return null}}var Tb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nh(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Tb[t.type]:n==="textarea"}function ih(t,n,l,r){Ii?Pi?Pi.push(r):Pi=[r]:Ii=r,n=so(n,"onChange"),0<n.length&&(l=new gl("onChange","change",null,l,r),t.push({event:l,listeners:n}))}var Fs=null,Ks=null;function Mb(t){Ug(t,0)}function pl(t){var n=Ys(t);if(Bf(n))return t}function sh(t,n){if(t==="change")return n}var ah=!1;if(fn){var Ar;if(fn){var Or="oninput"in document;if(!Or){var lh=document.createElement("div");lh.setAttribute("oninput","return;"),Or=typeof lh.oninput=="function"}Ar=Or}else Ar=!1;ah=Ar&&(!document.documentMode||9<document.documentMode)}function oh(){Fs&&(Fs.detachEvent("onpropertychange",rh),Ks=Fs=null)}function rh(t){if(t.propertyName==="value"&&pl(Ks)){var n=[];ih(n,Ks,t,yr(t)),Qf(Mb,n)}}function Eb(t,n,l){t==="focusin"?(oh(),Fs=n,Ks=l,Fs.attachEvent("onpropertychange",rh)):t==="focusout"&&oh()}function Ab(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return pl(Ks)}function Ob(t,n){if(t==="click")return pl(n)}function Cb(t,n){if(t==="input"||t==="change")return pl(n)}function Db(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Ce=typeof Object.is=="function"?Object.is:Db;function Ws(t,n){if(Ce(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var l=Object.keys(t),r=Object.keys(n);if(l.length!==r.length)return!1;for(r=0;r<l.length;r++){var h=l[r];if(!sr.call(n,h)||!Ce(t[h],n[h]))return!1}return!0}function ch(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function uh(t,n){var l=ch(t);t=0;for(var r;l;){if(l.nodeType===3){if(r=t+l.textContent.length,t<=n&&r>=n)return{node:l,offset:n-t};t=r}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=ch(l)}}function fh(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?fh(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function hh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=cl(t.document);n instanceof t.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)t=n.contentWindow;else break;n=cl(t.document)}return n}function Cr(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var zb=fn&&"documentMode"in document&&11>=document.documentMode,ts=null,Dr=null,Js=null,zr=!1;function dh(t,n,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;zr||ts==null||ts!==cl(r)||(r=ts,"selectionStart"in r&&Cr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Js&&Ws(Js,r)||(Js=r,r=so(Dr,"onSelect"),0<r.length&&(n=new gl("onSelect","select",null,n,l),t.push({event:n,listeners:r}),n.target=ts)))}function vi(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var es={animationend:vi("Animation","AnimationEnd"),animationiteration:vi("Animation","AnimationIteration"),animationstart:vi("Animation","AnimationStart"),transitionrun:vi("Transition","TransitionRun"),transitionstart:vi("Transition","TransitionStart"),transitioncancel:vi("Transition","TransitionCancel"),transitionend:vi("Transition","TransitionEnd")},wr={},gh={};fn&&(gh=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function xi(t){if(wr[t])return wr[t];if(!es[t])return t;var n=es[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in gh)return wr[t]=n[l];return t}var mh=xi("animationend"),ph=xi("animationiteration"),yh=xi("animationstart"),wb=xi("transitionrun"),jb=xi("transitionstart"),Rb=xi("transitioncancel"),bh=xi("transitionend"),vh=new Map,jr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");jr.push("scrollEnd");function We(t,n){vh.set(t,n),yi(n,[t])}var yl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ue=[],ns=0,Rr=0;function bl(){for(var t=ns,n=Rr=ns=0;n<t;){var l=Ue[n];Ue[n++]=null;var r=Ue[n];Ue[n++]=null;var h=Ue[n];Ue[n++]=null;var g=Ue[n];if(Ue[n++]=null,r!==null&&h!==null){var y=r.pending;y===null?h.next=h:(h.next=y.next,y.next=h),r.pending=h}g!==0&&xh(l,h,g)}}function vl(t,n,l,r){Ue[ns++]=t,Ue[ns++]=n,Ue[ns++]=l,Ue[ns++]=r,Rr|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function Nr(t,n,l,r){return vl(t,n,l,r),xl(t)}function _i(t,n){return vl(t,null,null,n),xl(t)}function xh(t,n,l){t.lanes|=l;var r=t.alternate;r!==null&&(r.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,r=g.alternate,r!==null&&(r.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&n!==null&&(h=31-Oe(l),t=g.hiddenUpdates,r=t[h],r===null?t[h]=[n]:r.push(n),n.lane=l|536870912),g):null}function xl(t){if(50<ba)throw ba=0,Xc=null,Error(a(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var is={};function Nb(t,n,l,r){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function De(t,n,l,r){return new Nb(t,n,l,r)}function kr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hn(t,n){var l=t.alternate;return l===null?(l=De(t.tag,n,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=n,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,n=t.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function _h(t,n){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,n=l.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function _l(t,n,l,r,h,g){var y=0;if(r=t,typeof t=="function")kr(t)&&(y=1);else if(typeof t=="string")y=Uv(t,l,J.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case tt:return t=De(31,l,n,h),t.elementType=tt,t.lanes=g,t;case M:return Si(l.children,h,g,n);case A:y=8,h|=24;break;case D:return t=De(12,l,n,h|2),t.elementType=D,t.lanes=g,t;case Y:return t=De(13,l,n,h),t.elementType=Y,t.lanes=g,t;case W:return t=De(19,l,n,h),t.elementType=W,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case q:y=10;break t;case L:y=9;break t;case G:y=11;break t;case X:y=14;break t;case F:y=16,r=null;break t}y=29,l=Error(a(130,t===null?"null":typeof t,"")),r=null}return n=De(y,l,n,h),n.elementType=t,n.type=r,n.lanes=g,n}function Si(t,n,l,r){return t=De(7,t,r,n),t.lanes=l,t}function Lr(t,n,l){return t=De(6,t,null,n),t.lanes=l,t}function Sh(t){var n=De(18,null,null,0);return n.stateNode=t,n}function Hr(t,n,l){return n=De(4,t.children!==null?t.children:[],t.key,n),n.lanes=l,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Th=new WeakMap;function Ve(t,n){if(typeof t=="object"&&t!==null){var l=Th.get(t);return l!==void 0?l:(n={value:t,source:n,stack:Sf(n)},Th.set(t,n),n)}return{value:t,source:n,stack:Sf(n)}}var ss=[],as=0,Sl=null,Is=0,Ye=[],qe=0,Un=null,$e=1,tn="";function dn(t,n){ss[as++]=Is,ss[as++]=Sl,Sl=t,Is=n}function Mh(t,n,l){Ye[qe++]=$e,Ye[qe++]=tn,Ye[qe++]=Un,Un=t;var r=$e;t=tn;var h=32-Oe(r)-1;r&=~(1<<h),l+=1;var g=32-Oe(n)+h;if(30<g){var y=h-h%5;g=(r&(1<<y)-1).toString(32),r>>=y,h-=y,$e=1<<32-Oe(n)+h|l<<h|r,tn=g+t}else $e=1<<g|l<<h|r,tn=t}function Br(t){t.return!==null&&(dn(t,1),Mh(t,1,0))}function Ur(t){for(;t===Sl;)Sl=ss[--as],ss[as]=null,Is=ss[--as],ss[as]=null;for(;t===Un;)Un=Ye[--qe],Ye[qe]=null,tn=Ye[--qe],Ye[qe]=null,$e=Ye[--qe],Ye[qe]=null}function Eh(t,n){Ye[qe++]=$e,Ye[qe++]=tn,Ye[qe++]=Un,$e=n.id,tn=n.overflow,Un=t}var se=null,Lt=null,vt=!1,Vn=null,Xe=!1,Vr=Error(a(519));function Yn(t){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ps(Ve(n,t)),Vr}function Ah(t){var n=t.stateNode,l=t.type,r=t.memoizedProps;switch(n[ie]=t,n[me]=r,l){case"dialog":mt("cancel",n),mt("close",n);break;case"iframe":case"object":case"embed":mt("load",n);break;case"video":case"audio":for(l=0;l<xa.length;l++)mt(xa[l],n);break;case"source":mt("error",n);break;case"img":case"image":case"link":mt("error",n),mt("load",n);break;case"details":mt("toggle",n);break;case"input":mt("invalid",n),Uf(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":mt("invalid",n);break;case"textarea":mt("invalid",n),Yf(n,r.value,r.defaultValue,r.children)}l=r.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||r.suppressHydrationWarning===!0||Xg(n.textContent,l)?(r.popover!=null&&(mt("beforetoggle",n),mt("toggle",n)),r.onScroll!=null&&mt("scroll",n),r.onScrollEnd!=null&&mt("scrollend",n),r.onClick!=null&&(n.onclick=un),n=!0):n=!1,n||Yn(t,!0)}function Oh(t){for(se=t.return;se;)switch(se.tag){case 5:case 31:case 13:Xe=!1;return;case 27:case 3:Xe=!0;return;default:se=se.return}}function ls(t){if(t!==se)return!1;if(!vt)return Oh(t),vt=!0,!1;var n=t.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||su(t.type,t.memoizedProps)),l=!l),l&&Lt&&Yn(t),Oh(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Lt=Pg(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Lt=Pg(t)}else n===27?(n=Lt,ei(t.type)?(t=cu,cu=null,Lt=t):Lt=n):Lt=se?Qe(t.stateNode.nextSibling):null;return!0}function Ti(){Lt=se=null,vt=!1}function Yr(){var t=Vn;return t!==null&&(xe===null?xe=t:xe.push.apply(xe,t),Vn=null),t}function Ps(t){Vn===null?Vn=[t]:Vn.push(t)}var qr=C(null),Mi=null,gn=null;function qn(t,n,l){K(qr,n._currentValue),n._currentValue=l}function mn(t){t._currentValue=qr.current,U(qr)}function Xr(t,n,l){for(;t!==null;){var r=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),t===l)break;t=t.return}}function Gr(t,n,l,r){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var y=h.child;g=g.firstContext;t:for(;g!==null;){var _=g;g=h;for(var E=0;E<n.length;E++)if(_.context===n[E]){g.lanes|=l,_=g.alternate,_!==null&&(_.lanes|=l),Xr(g.return,l,t),r||(y=null);break t}g=_.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(a(341));y.lanes|=l,g=y.alternate,g!==null&&(g.lanes|=l),Xr(y,l,t),y=null}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===t){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}}function os(t,n,l,r){t=null;for(var h=n,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var y=h.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var _=h.type;Ce(h.pendingProps.value,y.value)||(t!==null?t.push(_):t=[_])}}else if(h===Et.current){if(y=h.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Ea):t=[Ea])}h=h.return}t!==null&&Gr(n,t,l,r),n.flags|=262144}function Tl(t){for(t=t.firstContext;t!==null;){if(!Ce(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ei(t){Mi=t,gn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ae(t){return Ch(Mi,t)}function Ml(t,n){return Mi===null&&Ei(t),Ch(t,n)}function Ch(t,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},gn===null){if(t===null)throw Error(a(308));gn=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else gn=gn.next=n;return l}var kb=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(l,r){t.push(r)}};this.abort=function(){n.aborted=!0,t.forEach(function(l){return l()})}},Lb=s.unstable_scheduleCallback,Hb=s.unstable_NormalPriority,Wt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qr(){return{controller:new kb,data:new Map,refCount:0}}function $s(t){t.refCount--,t.refCount===0&&Lb(Hb,function(){t.controller.abort()})}var ta=null,Zr=0,rs=0,cs=null;function Bb(t,n){if(ta===null){var l=ta=[];Zr=0,rs=Wc(),cs={status:"pending",value:void 0,then:function(r){l.push(r)}}}return Zr++,n.then(Dh,Dh),n}function Dh(){if(--Zr===0&&ta!==null){cs!==null&&(cs.status="fulfilled");var t=ta;ta=null,rs=0,cs=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Ub(t,n){var l=[],r={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){r.status="fulfilled",r.value=n;for(var h=0;h<l.length;h++)(0,l[h])(n)},function(h){for(r.status="rejected",r.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),r}var zh=N.S;N.S=function(t,n){dg=Ee(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Bb(t,n),zh!==null&&zh(t,n)};var Ai=C(null);function Fr(){var t=Ai.current;return t!==null?t:Rt.pooledCache}function El(t,n){n===null?K(Ai,Ai.current):K(Ai,n.pool)}function wh(){var t=Fr();return t===null?null:{parent:Wt._currentValue,pool:t}}var us=Error(a(460)),Kr=Error(a(474)),Al=Error(a(542)),Ol={then:function(){}};function jh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Rh(t,n,l){switch(l=t[l],l===void 0?t.push(n):l!==n&&(n.then(un,un),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,kh(t),t;default:if(typeof n.status=="string")n.then(un,un);else{if(t=Rt,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=n,t.status="pending",t.then(function(r){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=r}},function(r){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=r}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,kh(t),t}throw Ci=n,us}}function Oi(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ci=l,us):l}}var Ci=null;function Nh(){if(Ci===null)throw Error(a(459));var t=Ci;return Ci=null,t}function kh(t){if(t===us||t===Al)throw Error(a(483))}var fs=null,ea=0;function Cl(t){var n=ea;return ea+=1,fs===null&&(fs=[]),Rh(fs,t,n)}function na(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Dl(t,n){throw n.$$typeof===v?Error(a(525)):(t=Object.prototype.toString.call(n),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Lh(t){function n(z,O){if(t){var w=z.deletions;w===null?(z.deletions=[O],z.flags|=16):w.push(O)}}function l(z,O){if(!t)return null;for(;O!==null;)n(z,O),O=O.sibling;return null}function r(z){for(var O=new Map;z!==null;)z.key!==null?O.set(z.key,z):O.set(z.index,z),z=z.sibling;return O}function h(z,O){return z=hn(z,O),z.index=0,z.sibling=null,z}function g(z,O,w){return z.index=w,t?(w=z.alternate,w!==null?(w=w.index,w<O?(z.flags|=67108866,O):w):(z.flags|=67108866,O)):(z.flags|=1048576,O)}function y(z){return t&&z.alternate===null&&(z.flags|=67108866),z}function _(z,O,w,B){return O===null||O.tag!==6?(O=Lr(w,z.mode,B),O.return=z,O):(O=h(O,w),O.return=z,O)}function E(z,O,w,B){var et=w.type;return et===M?H(z,O,w.props.children,B,w.key):O!==null&&(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===F&&Oi(et)===O.type)?(O=h(O,w.props),na(O,w),O.return=z,O):(O=_l(w.type,w.key,w.props,null,z.mode,B),na(O,w),O.return=z,O)}function j(z,O,w,B){return O===null||O.tag!==4||O.stateNode.containerInfo!==w.containerInfo||O.stateNode.implementation!==w.implementation?(O=Hr(w,z.mode,B),O.return=z,O):(O=h(O,w.children||[]),O.return=z,O)}function H(z,O,w,B,et){return O===null||O.tag!==7?(O=Si(w,z.mode,B,et),O.return=z,O):(O=h(O,w),O.return=z,O)}function V(z,O,w){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Lr(""+O,z.mode,w),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case S:return w=_l(O.type,O.key,O.props,null,z.mode,w),na(w,O),w.return=z,w;case T:return O=Hr(O,z.mode,w),O.return=z,O;case F:return O=Oi(O),V(z,O,w)}if(dt(O)||st(O))return O=Si(O,z.mode,w,null),O.return=z,O;if(typeof O.then=="function")return V(z,Cl(O),w);if(O.$$typeof===q)return V(z,Ml(z,O),w);Dl(z,O)}return null}function R(z,O,w,B){var et=O!==null?O.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return et!==null?null:_(z,O,""+w,B);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case S:return w.key===et?E(z,O,w,B):null;case T:return w.key===et?j(z,O,w,B):null;case F:return w=Oi(w),R(z,O,w,B)}if(dt(w)||st(w))return et!==null?null:H(z,O,w,B,null);if(typeof w.then=="function")return R(z,O,Cl(w),B);if(w.$$typeof===q)return R(z,O,Ml(z,w),B);Dl(z,w)}return null}function k(z,O,w,B,et){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return z=z.get(w)||null,_(O,z,""+B,et);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case S:return z=z.get(B.key===null?w:B.key)||null,E(O,z,B,et);case T:return z=z.get(B.key===null?w:B.key)||null,j(O,z,B,et);case F:return B=Oi(B),k(z,O,w,B,et)}if(dt(B)||st(B))return z=z.get(w)||null,H(O,z,B,et,null);if(typeof B.then=="function")return k(z,O,w,Cl(B),et);if(B.$$typeof===q)return k(z,O,w,Ml(O,B),et);Dl(O,B)}return null}function I(z,O,w,B){for(var et=null,St=null,P=O,ft=O=0,bt=null;P!==null&&ft<w.length;ft++){P.index>ft?(bt=P,P=null):bt=P.sibling;var Tt=R(z,P,w[ft],B);if(Tt===null){P===null&&(P=bt);break}t&&P&&Tt.alternate===null&&n(z,P),O=g(Tt,O,ft),St===null?et=Tt:St.sibling=Tt,St=Tt,P=bt}if(ft===w.length)return l(z,P),vt&&dn(z,ft),et;if(P===null){for(;ft<w.length;ft++)P=V(z,w[ft],B),P!==null&&(O=g(P,O,ft),St===null?et=P:St.sibling=P,St=P);return vt&&dn(z,ft),et}for(P=r(P);ft<w.length;ft++)bt=k(P,z,ft,w[ft],B),bt!==null&&(t&&bt.alternate!==null&&P.delete(bt.key===null?ft:bt.key),O=g(bt,O,ft),St===null?et=bt:St.sibling=bt,St=bt);return t&&P.forEach(function(li){return n(z,li)}),vt&&dn(z,ft),et}function nt(z,O,w,B){if(w==null)throw Error(a(151));for(var et=null,St=null,P=O,ft=O=0,bt=null,Tt=w.next();P!==null&&!Tt.done;ft++,Tt=w.next()){P.index>ft?(bt=P,P=null):bt=P.sibling;var li=R(z,P,Tt.value,B);if(li===null){P===null&&(P=bt);break}t&&P&&li.alternate===null&&n(z,P),O=g(li,O,ft),St===null?et=li:St.sibling=li,St=li,P=bt}if(Tt.done)return l(z,P),vt&&dn(z,ft),et;if(P===null){for(;!Tt.done;ft++,Tt=w.next())Tt=V(z,Tt.value,B),Tt!==null&&(O=g(Tt,O,ft),St===null?et=Tt:St.sibling=Tt,St=Tt);return vt&&dn(z,ft),et}for(P=r(P);!Tt.done;ft++,Tt=w.next())Tt=k(P,z,ft,Tt.value,B),Tt!==null&&(t&&Tt.alternate!==null&&P.delete(Tt.key===null?ft:Tt.key),O=g(Tt,O,ft),St===null?et=Tt:St.sibling=Tt,St=Tt);return t&&P.forEach(function(Jv){return n(z,Jv)}),vt&&dn(z,ft),et}function jt(z,O,w,B){if(typeof w=="object"&&w!==null&&w.type===M&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case S:t:{for(var et=w.key;O!==null;){if(O.key===et){if(et=w.type,et===M){if(O.tag===7){l(z,O.sibling),B=h(O,w.props.children),B.return=z,z=B;break t}}else if(O.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===F&&Oi(et)===O.type){l(z,O.sibling),B=h(O,w.props),na(B,w),B.return=z,z=B;break t}l(z,O);break}else n(z,O);O=O.sibling}w.type===M?(B=Si(w.props.children,z.mode,B,w.key),B.return=z,z=B):(B=_l(w.type,w.key,w.props,null,z.mode,B),na(B,w),B.return=z,z=B)}return y(z);case T:t:{for(et=w.key;O!==null;){if(O.key===et)if(O.tag===4&&O.stateNode.containerInfo===w.containerInfo&&O.stateNode.implementation===w.implementation){l(z,O.sibling),B=h(O,w.children||[]),B.return=z,z=B;break t}else{l(z,O);break}else n(z,O);O=O.sibling}B=Hr(w,z.mode,B),B.return=z,z=B}return y(z);case F:return w=Oi(w),jt(z,O,w,B)}if(dt(w))return I(z,O,w,B);if(st(w)){if(et=st(w),typeof et!="function")throw Error(a(150));return w=et.call(w),nt(z,O,w,B)}if(typeof w.then=="function")return jt(z,O,Cl(w),B);if(w.$$typeof===q)return jt(z,O,Ml(z,w),B);Dl(z,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,O!==null&&O.tag===6?(l(z,O.sibling),B=h(O,w),B.return=z,z=B):(l(z,O),B=Lr(w,z.mode,B),B.return=z,z=B),y(z)):l(z,O)}return function(z,O,w,B){try{ea=0;var et=jt(z,O,w,B);return fs=null,et}catch(P){if(P===us||P===Al)throw P;var St=De(29,P,null,z.mode);return St.lanes=B,St.return=z,St}}}var Di=Lh(!0),Hh=Lh(!1),Xn=!1;function Wr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jr(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Gn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Qn(t,n,l){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(Mt&2)!==0){var h=r.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),r.pending=n,n=xl(t),xh(t,null,l),n}return vl(t,r,n,l),xl(t)}function ia(t,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var r=n.lanes;r&=t.pendingLanes,l|=r,n.lanes=l,Cf(t,l)}}function Ir(t,n){var l=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=y:g=g.next=y,l=l.next}while(l!==null);g===null?h=g=n:g=g.next=n}else h=g=n;l={baseState:r.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:r.shared,callbacks:r.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=n:t.next=n,l.lastBaseUpdate=n}var Pr=!1;function sa(){if(Pr){var t=cs;if(t!==null)throw t}}function aa(t,n,l,r){Pr=!1;var h=t.updateQueue;Xn=!1;var g=h.firstBaseUpdate,y=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var E=_,j=E.next;E.next=null,y===null?g=j:y.next=j,y=E;var H=t.alternate;H!==null&&(H=H.updateQueue,_=H.lastBaseUpdate,_!==y&&(_===null?H.firstBaseUpdate=j:_.next=j,H.lastBaseUpdate=E))}if(g!==null){var V=h.baseState;y=0,H=j=E=null,_=g;do{var R=_.lane&-536870913,k=R!==_.lane;if(k?(yt&R)===R:(r&R)===R){R!==0&&R===rs&&(Pr=!0),H!==null&&(H=H.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});t:{var I=t,nt=_;R=n;var jt=l;switch(nt.tag){case 1:if(I=nt.payload,typeof I=="function"){V=I.call(jt,V,R);break t}V=I;break t;case 3:I.flags=I.flags&-65537|128;case 0:if(I=nt.payload,R=typeof I=="function"?I.call(jt,V,R):I,R==null)break t;V=b({},V,R);break t;case 2:Xn=!0}}R=_.callback,R!==null&&(t.flags|=64,k&&(t.flags|=8192),k=h.callbacks,k===null?h.callbacks=[R]:k.push(R))}else k={lane:R,tag:_.tag,payload:_.payload,callback:_.callback,next:null},H===null?(j=H=k,E=V):H=H.next=k,y|=R;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;k=_,_=k.next,k.next=null,h.lastBaseUpdate=k,h.shared.pending=null}}while(!0);H===null&&(E=V),h.baseState=E,h.firstBaseUpdate=j,h.lastBaseUpdate=H,g===null&&(h.shared.lanes=0),Jn|=y,t.lanes=y,t.memoizedState=V}}function Bh(t,n){if(typeof t!="function")throw Error(a(191,t));t.call(n)}function Uh(t,n){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Bh(l[t],n)}var hs=C(null),zl=C(0);function Vh(t,n){t=Mn,K(zl,t),K(hs,n),Mn=t|n.baseLanes}function $r(){K(zl,Mn),K(hs,hs.current)}function tc(){Mn=zl.current,U(hs),U(zl)}var ze=C(null),Ge=null;function Zn(t){var n=t.alternate;K(Zt,Zt.current&1),K(ze,t),Ge===null&&(n===null||hs.current!==null||n.memoizedState!==null)&&(Ge=t)}function ec(t){K(Zt,Zt.current),K(ze,t),Ge===null&&(Ge=t)}function Yh(t){t.tag===22?(K(Zt,Zt.current),K(ze,t),Ge===null&&(Ge=t)):Fn()}function Fn(){K(Zt,Zt.current),K(ze,ze.current)}function we(t){U(ze),Ge===t&&(Ge=null),U(Zt)}var Zt=C(0);function wl(t){for(var n=t;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ou(l)||ru(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var pn=0,ut=null,zt=null,Jt=null,jl=!1,ds=!1,zi=!1,Rl=0,la=0,gs=null,Vb=0;function qt(){throw Error(a(321))}function nc(t,n){if(n===null)return!1;for(var l=0;l<n.length&&l<t.length;l++)if(!Ce(t[l],n[l]))return!1;return!0}function ic(t,n,l,r,h,g){return pn=g,ut=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,N.H=t===null||t.memoizedState===null?Md:bc,zi=!1,g=l(r,h),zi=!1,ds&&(g=Xh(n,l,r,h)),qh(t),g}function qh(t){N.H=ca;var n=zt!==null&&zt.next!==null;if(pn=0,Jt=zt=ut=null,jl=!1,la=0,gs=null,n)throw Error(a(300));t===null||It||(t=t.dependencies,t!==null&&Tl(t)&&(It=!0))}function Xh(t,n,l,r){ut=t;var h=0;do{if(ds&&(gs=null),la=0,ds=!1,25<=h)throw Error(a(301));if(h+=1,Jt=zt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}N.H=Ed,g=n(l,r)}while(ds);return g}function Yb(){var t=N.H,n=t.useState()[0];return n=typeof n.then=="function"?oa(n):n,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(ut.flags|=1024),n}function sc(){var t=Rl!==0;return Rl=0,t}function ac(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function lc(t){if(jl){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}jl=!1}pn=0,Jt=zt=ut=null,ds=!1,la=Rl=0,gs=null}function ge(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?ut.memoizedState=Jt=t:Jt=Jt.next=t,Jt}function Ft(){if(zt===null){var t=ut.alternate;t=t!==null?t.memoizedState:null}else t=zt.next;var n=Jt===null?ut.memoizedState:Jt.next;if(n!==null)Jt=n,zt=t;else{if(t===null)throw ut.alternate===null?Error(a(467)):Error(a(310));zt=t,t={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Jt===null?ut.memoizedState=Jt=t:Jt=Jt.next=t}return Jt}function Nl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oa(t){var n=la;return la+=1,gs===null&&(gs=[]),t=Rh(gs,t,n),n=ut,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,N.H=n===null||n.memoizedState===null?Md:bc),t}function kl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return oa(t);if(t.$$typeof===q)return ae(t)}throw Error(a(438,String(t)))}function oc(t){var n=null,l=ut.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var r=ut.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(n={data:r.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Nl(),ut.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(t),r=0;r<t;r++)l[r]=rt;return n.index++,l}function yn(t,n){return typeof n=="function"?n(t):n}function Ll(t){var n=Ft();return rc(n,zt,t)}function rc(t,n,l){var r=t.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=l;var h=t.baseQueue,g=r.pending;if(g!==null){if(h!==null){var y=h.next;h.next=g.next,g.next=y}n.baseQueue=h=g,r.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{n=h.next;var _=y=null,E=null,j=n,H=!1;do{var V=j.lane&-536870913;if(V!==j.lane?(yt&V)===V:(pn&V)===V){var R=j.revertLane;if(R===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),V===rs&&(H=!0);else if((pn&R)===R){j=j.next,R===rs&&(H=!0);continue}else V={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},E===null?(_=E=V,y=g):E=E.next=V,ut.lanes|=R,Jn|=R;V=j.action,zi&&l(g,V),g=j.hasEagerState?j.eagerState:l(g,V)}else R={lane:V,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},E===null?(_=E=R,y=g):E=E.next=R,ut.lanes|=V,Jn|=V;j=j.next}while(j!==null&&j!==n);if(E===null?y=g:E.next=_,!Ce(g,t.memoizedState)&&(It=!0,H&&(l=cs,l!==null)))throw l;t.memoizedState=g,t.baseState=y,t.baseQueue=E,r.lastRenderedState=g}return h===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function cc(t){var n=Ft(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=t;var r=l.dispatch,h=l.pending,g=n.memoizedState;if(h!==null){l.pending=null;var y=h=h.next;do g=t(g,y.action),y=y.next;while(y!==h);Ce(g,n.memoizedState)||(It=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),l.lastRenderedState=g}return[g,r]}function Gh(t,n,l){var r=ut,h=Ft(),g=vt;if(g){if(l===void 0)throw Error(a(407));l=l()}else l=n();var y=!Ce((zt||h).memoizedState,l);if(y&&(h.memoizedState=l,It=!0),h=h.queue,hc(Fh.bind(null,r,h,t),[t]),h.getSnapshot!==n||y||Jt!==null&&Jt.memoizedState.tag&1){if(r.flags|=2048,ms(9,{destroy:void 0},Zh.bind(null,r,h,l,n),null),Rt===null)throw Error(a(349));g||(pn&127)!==0||Qh(r,n,l)}return l}function Qh(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=ut.updateQueue,n===null?(n=Nl(),ut.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function Zh(t,n,l,r){n.value=l,n.getSnapshot=r,Kh(n)&&Wh(t)}function Fh(t,n,l){return l(function(){Kh(n)&&Wh(t)})}function Kh(t){var n=t.getSnapshot;t=t.value;try{var l=n();return!Ce(t,l)}catch{return!0}}function Wh(t){var n=_i(t,2);n!==null&&_e(n,t,2)}function uc(t){var n=ge();if(typeof t=="function"){var l=t;if(t=l(),zi){Ln(!0);try{l()}finally{Ln(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:t},n}function Jh(t,n,l,r){return t.baseState=l,rc(t,zt,typeof r=="function"?r:yn)}function qb(t,n,l,r,h){if(Ul(t))throw Error(a(485));if(t=n.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){g.listeners.push(y)}};N.T!==null?l(!0):g.isTransition=!1,r(g),l=n.pending,l===null?(g.next=n.pending=g,Ih(n,g)):(g.next=l.next,n.pending=l.next=g)}}function Ih(t,n){var l=n.action,r=n.payload,h=t.state;if(n.isTransition){var g=N.T,y={};N.T=y;try{var _=l(h,r),E=N.S;E!==null&&E(y,_),Ph(t,n,_)}catch(j){fc(t,n,j)}finally{g!==null&&y.types!==null&&(g.types=y.types),N.T=g}}else try{g=l(h,r),Ph(t,n,g)}catch(j){fc(t,n,j)}}function Ph(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){$h(t,n,r)},function(r){return fc(t,n,r)}):$h(t,n,l)}function $h(t,n,l){n.status="fulfilled",n.value=l,td(n),t.state=l,n=t.pending,n!==null&&(l=n.next,l===n?t.pending=null:(l=l.next,n.next=l,Ih(t,l)))}function fc(t,n,l){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do n.status="rejected",n.reason=l,td(n),n=n.next;while(n!==r)}t.action=null}function td(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function ed(t,n){return n}function nd(t,n){if(vt){var l=Rt.formState;if(l!==null){t:{var r=ut;if(vt){if(Lt){e:{for(var h=Lt,g=Xe;h.nodeType!==8;){if(!g){h=null;break e}if(h=Qe(h.nextSibling),h===null){h=null;break e}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){Lt=Qe(h.nextSibling),r=h.data==="F!";break t}}Yn(r)}r=!1}r&&(n=l[0])}}return l=ge(),l.memoizedState=l.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ed,lastRenderedState:n},l.queue=r,l=_d.bind(null,ut,r),r.dispatch=l,r=uc(!1),g=yc.bind(null,ut,!1,r.queue),r=ge(),h={state:n,dispatch:null,action:t,pending:null},r.queue=h,l=qb.bind(null,ut,h,g,l),h.dispatch=l,r.memoizedState=t,[n,l,!1]}function id(t){var n=Ft();return sd(n,zt,t)}function sd(t,n,l){if(n=rc(t,n,ed)[0],t=Ll(yn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var r=oa(n)}catch(y){throw y===us?Al:y}else r=n;n=Ft();var h=n.queue,g=h.dispatch;return l!==n.memoizedState&&(ut.flags|=2048,ms(9,{destroy:void 0},Xb.bind(null,h,l),null)),[r,g,t]}function Xb(t,n){t.action=n}function ad(t){var n=Ft(),l=zt;if(l!==null)return sd(n,l,t);Ft(),n=n.memoizedState,l=Ft();var r=l.queue.dispatch;return l.memoizedState=t,[n,r,!1]}function ms(t,n,l,r){return t={tag:t,create:l,deps:r,inst:n,next:null},n=ut.updateQueue,n===null&&(n=Nl(),ut.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=t.next=t:(r=l.next,l.next=t,t.next=r,n.lastEffect=t),t}function ld(){return Ft().memoizedState}function Hl(t,n,l,r){var h=ge();ut.flags|=t,h.memoizedState=ms(1|n,{destroy:void 0},l,r===void 0?null:r)}function Bl(t,n,l,r){var h=Ft();r=r===void 0?null:r;var g=h.memoizedState.inst;zt!==null&&r!==null&&nc(r,zt.memoizedState.deps)?h.memoizedState=ms(n,g,l,r):(ut.flags|=t,h.memoizedState=ms(1|n,g,l,r))}function od(t,n){Hl(8390656,8,t,n)}function hc(t,n){Bl(2048,8,t,n)}function Gb(t){ut.flags|=4;var n=ut.updateQueue;if(n===null)n=Nl(),ut.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function rd(t){var n=Ft().memoizedState;return Gb({ref:n,nextImpl:t}),function(){if((Mt&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function cd(t,n){return Bl(4,2,t,n)}function ud(t,n){return Bl(4,4,t,n)}function fd(t,n){if(typeof n=="function"){t=t();var l=n(t);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function hd(t,n,l){l=l!=null?l.concat([t]):null,Bl(4,4,fd.bind(null,n,t),l)}function dc(){}function dd(t,n){var l=Ft();n=n===void 0?null:n;var r=l.memoizedState;return n!==null&&nc(n,r[1])?r[0]:(l.memoizedState=[t,n],t)}function gd(t,n){var l=Ft();n=n===void 0?null:n;var r=l.memoizedState;if(n!==null&&nc(n,r[1]))return r[0];if(r=t(),zi){Ln(!0);try{t()}finally{Ln(!1)}}return l.memoizedState=[r,n],r}function gc(t,n,l){return l===void 0||(pn&1073741824)!==0&&(yt&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=mg(),ut.lanes|=t,Jn|=t,l)}function md(t,n,l,r){return Ce(l,n)?l:hs.current!==null?(t=gc(t,l,r),Ce(t,n)||(It=!0),t):(pn&42)===0||(pn&1073741824)!==0&&(yt&261930)===0?(It=!0,t.memoizedState=l):(t=mg(),ut.lanes|=t,Jn|=t,n)}function pd(t,n,l,r,h){var g=Q.p;Q.p=g!==0&&8>g?g:8;var y=N.T,_={};N.T=_,yc(t,!1,n,l);try{var E=h(),j=N.S;if(j!==null&&j(_,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var H=Ub(E,r);ra(t,n,H,Ne(t))}else ra(t,n,r,Ne(t))}catch(V){ra(t,n,{then:function(){},status:"rejected",reason:V},Ne())}finally{Q.p=g,y!==null&&_.types!==null&&(y.types=_.types),N.T=y}}function Qb(){}function mc(t,n,l,r){if(t.tag!==5)throw Error(a(476));var h=yd(t).queue;pd(t,h,n,$,l===null?Qb:function(){return bd(t),l(r)})}function yd(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:$},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:l},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function bd(t){var n=yd(t);n.next===null&&(n=t.alternate.memoizedState),ra(t,n.next.queue,{},Ne())}function pc(){return ae(Ea)}function vd(){return Ft().memoizedState}function xd(){return Ft().memoizedState}function Zb(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=Ne();t=Gn(l);var r=Qn(n,t,l);r!==null&&(_e(r,n,l),ia(r,n,l)),n={cache:Qr()},t.payload=n;return}n=n.return}}function Fb(t,n,l){var r=Ne();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ul(t)?Sd(n,l):(l=Nr(t,n,l,r),l!==null&&(_e(l,t,r),Td(l,n,r)))}function _d(t,n,l){var r=Ne();ra(t,n,l,r)}function ra(t,n,l,r){var h={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ul(t))Sd(n,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var y=n.lastRenderedState,_=g(y,l);if(h.hasEagerState=!0,h.eagerState=_,Ce(_,y))return vl(t,n,h,0),Rt===null&&bl(),!1}catch{}if(l=Nr(t,n,h,r),l!==null)return _e(l,t,r),Td(l,n,r),!0}return!1}function yc(t,n,l,r){if(r={lane:2,revertLane:Wc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ul(t)){if(n)throw Error(a(479))}else n=Nr(t,l,r,2),n!==null&&_e(n,t,2)}function Ul(t){var n=t.alternate;return t===ut||n!==null&&n===ut}function Sd(t,n){ds=jl=!0;var l=t.pending;l===null?n.next=n:(n.next=l.next,l.next=n),t.pending=n}function Td(t,n,l){if((l&4194048)!==0){var r=n.lanes;r&=t.pendingLanes,l|=r,n.lanes=l,Cf(t,l)}}var ca={readContext:ae,use:kl,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};ca.useEffectEvent=qt;var Md={readContext:ae,use:kl,useCallback:function(t,n){return ge().memoizedState=[t,n===void 0?null:n],t},useContext:ae,useEffect:od,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,Hl(4194308,4,fd.bind(null,n,t),l)},useLayoutEffect:function(t,n){return Hl(4194308,4,t,n)},useInsertionEffect:function(t,n){Hl(4,2,t,n)},useMemo:function(t,n){var l=ge();n=n===void 0?null:n;var r=t();if(zi){Ln(!0);try{t()}finally{Ln(!1)}}return l.memoizedState=[r,n],r},useReducer:function(t,n,l){var r=ge();if(l!==void 0){var h=l(n);if(zi){Ln(!0);try{l(n)}finally{Ln(!1)}}}else h=n;return r.memoizedState=r.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},r.queue=t,t=t.dispatch=Fb.bind(null,ut,t),[r.memoizedState,t]},useRef:function(t){var n=ge();return t={current:t},n.memoizedState=t},useState:function(t){t=uc(t);var n=t.queue,l=_d.bind(null,ut,n);return n.dispatch=l,[t.memoizedState,l]},useDebugValue:dc,useDeferredValue:function(t,n){var l=ge();return gc(l,t,n)},useTransition:function(){var t=uc(!1);return t=pd.bind(null,ut,t.queue,!0,!1),ge().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var r=ut,h=ge();if(vt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),Rt===null)throw Error(a(349));(yt&127)!==0||Qh(r,n,l)}h.memoizedState=l;var g={value:l,getSnapshot:n};return h.queue=g,od(Fh.bind(null,r,g,t),[t]),r.flags|=2048,ms(9,{destroy:void 0},Zh.bind(null,r,g,l,n),null),l},useId:function(){var t=ge(),n=Rt.identifierPrefix;if(vt){var l=tn,r=$e;l=(r&~(1<<32-Oe(r)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Rl++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=Vb++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:pc,useFormState:nd,useActionState:nd,useOptimistic:function(t){var n=ge();n.memoizedState=n.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=yc.bind(null,ut,!0,l),l.dispatch=n,[t,n]},useMemoCache:oc,useCacheRefresh:function(){return ge().memoizedState=Zb.bind(null,ut)},useEffectEvent:function(t){var n=ge(),l={impl:t};return n.memoizedState=l,function(){if((Mt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},bc={readContext:ae,use:kl,useCallback:dd,useContext:ae,useEffect:hc,useImperativeHandle:hd,useInsertionEffect:cd,useLayoutEffect:ud,useMemo:gd,useReducer:Ll,useRef:ld,useState:function(){return Ll(yn)},useDebugValue:dc,useDeferredValue:function(t,n){var l=Ft();return md(l,zt.memoizedState,t,n)},useTransition:function(){var t=Ll(yn)[0],n=Ft().memoizedState;return[typeof t=="boolean"?t:oa(t),n]},useSyncExternalStore:Gh,useId:vd,useHostTransitionStatus:pc,useFormState:id,useActionState:id,useOptimistic:function(t,n){var l=Ft();return Jh(l,zt,t,n)},useMemoCache:oc,useCacheRefresh:xd};bc.useEffectEvent=rd;var Ed={readContext:ae,use:kl,useCallback:dd,useContext:ae,useEffect:hc,useImperativeHandle:hd,useInsertionEffect:cd,useLayoutEffect:ud,useMemo:gd,useReducer:cc,useRef:ld,useState:function(){return cc(yn)},useDebugValue:dc,useDeferredValue:function(t,n){var l=Ft();return zt===null?gc(l,t,n):md(l,zt.memoizedState,t,n)},useTransition:function(){var t=cc(yn)[0],n=Ft().memoizedState;return[typeof t=="boolean"?t:oa(t),n]},useSyncExternalStore:Gh,useId:vd,useHostTransitionStatus:pc,useFormState:ad,useActionState:ad,useOptimistic:function(t,n){var l=Ft();return zt!==null?Jh(l,zt,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:oc,useCacheRefresh:xd};Ed.useEffectEvent=rd;function vc(t,n,l,r){n=t.memoizedState,l=l(r,n),l=l==null?n:b({},n,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var xc={enqueueSetState:function(t,n,l){t=t._reactInternals;var r=Ne(),h=Gn(r);h.payload=n,l!=null&&(h.callback=l),n=Qn(t,h,r),n!==null&&(_e(n,t,r),ia(n,t,r))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var r=Ne(),h=Gn(r);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Qn(t,h,r),n!==null&&(_e(n,t,r),ia(n,t,r))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=Ne(),r=Gn(l);r.tag=2,n!=null&&(r.callback=n),n=Qn(t,r,l),n!==null&&(_e(n,t,l),ia(n,t,l))}};function Ad(t,n,l,r,h,g,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,g,y):n.prototype&&n.prototype.isPureReactComponent?!Ws(l,r)||!Ws(h,g):!0}function Od(t,n,l,r){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,r),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,r),n.state!==t&&xc.enqueueReplaceState(n,n.state,null)}function wi(t,n){var l=n;if("ref"in n){l={};for(var r in n)r!=="ref"&&(l[r]=n[r])}if(t=t.defaultProps){l===n&&(l=b({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function Cd(t){yl(t)}function Dd(t){console.error(t)}function zd(t){yl(t)}function Vl(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(r){setTimeout(function(){throw r})}}function wd(t,n,l){try{var r=t.onCaughtError;r(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function _c(t,n,l){return l=Gn(l),l.tag=3,l.payload={element:null},l.callback=function(){Vl(t,n)},l}function jd(t){return t=Gn(t),t.tag=3,t}function Rd(t,n,l,r){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=r.value;t.payload=function(){return h(g)},t.callback=function(){wd(n,l,r)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){wd(n,l,r),typeof h!="function"&&(In===null?In=new Set([this]):In.add(this));var _=r.stack;this.componentDidCatch(r.value,{componentStack:_!==null?_:""})})}function Kb(t,n,l,r,h){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(n=l.alternate,n!==null&&os(n,l,h,!0),l=ze.current,l!==null){switch(l.tag){case 31:case 13:return Ge===null?Pl():l.alternate===null&&Xt===0&&(Xt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,r===Ol?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([r]):n.add(r),Zc(t,r,h)),!1;case 22:return l.flags|=65536,r===Ol?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([r])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([r]):l.add(r)),Zc(t,r,h)),!1}throw Error(a(435,l.tag))}return Zc(t,r,h),Pl(),!1}if(vt)return n=ze.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,r!==Vr&&(t=Error(a(422),{cause:r}),Ps(Ve(t,l)))):(r!==Vr&&(n=Error(a(423),{cause:r}),Ps(Ve(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,r=Ve(r,l),h=_c(t.stateNode,r,h),Ir(t,h),Xt!==4&&(Xt=2)),!1;var g=Error(a(520),{cause:r});if(g=Ve(g,l),ya===null?ya=[g]:ya.push(g),Xt!==4&&(Xt=2),n===null)return!0;r=Ve(r,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=_c(l.stateNode,r,t),Ir(l,t),!1;case 1:if(n=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(In===null||!In.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=jd(h),Rd(h,t,l,r),Ir(l,h),!1}l=l.return}while(l!==null);return!1}var Sc=Error(a(461)),It=!1;function le(t,n,l,r){n.child=t===null?Hh(n,null,l,r):Di(n,t.child,l,r)}function Nd(t,n,l,r,h){l=l.render;var g=n.ref;if("ref"in r){var y={};for(var _ in r)_!=="ref"&&(y[_]=r[_])}else y=r;return Ei(n),r=ic(t,n,l,y,g,h),_=sc(),t!==null&&!It?(ac(t,n,h),bn(t,n,h)):(vt&&_&&Br(n),n.flags|=1,le(t,n,r,h),n.child)}function kd(t,n,l,r,h){if(t===null){var g=l.type;return typeof g=="function"&&!kr(g)&&g.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=g,Ld(t,n,g,r,h)):(t=_l(l.type,null,r,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!zc(t,h)){var y=g.memoizedProps;if(l=l.compare,l=l!==null?l:Ws,l(y,r)&&t.ref===n.ref)return bn(t,n,h)}return n.flags|=1,t=hn(g,r),t.ref=n.ref,t.return=n,n.child=t}function Ld(t,n,l,r,h){if(t!==null){var g=t.memoizedProps;if(Ws(g,r)&&t.ref===n.ref)if(It=!1,n.pendingProps=r=g,zc(t,h))(t.flags&131072)!==0&&(It=!0);else return n.lanes=t.lanes,bn(t,n,h)}return Tc(t,n,l,r,h)}function Hd(t,n,l,r){var h=r.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|l:l,t!==null){for(r=n.child=t.child,h=0;r!==null;)h=h|r.lanes|r.childLanes,r=r.sibling;r=h&~g}else r=0,n.child=null;return Bd(t,n,g,l,r)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&El(n,g!==null?g.cachePool:null),g!==null?Vh(n,g):$r(),Yh(n);else return r=n.lanes=536870912,Bd(t,n,g!==null?g.baseLanes|l:l,l,r)}else g!==null?(El(n,g.cachePool),Vh(n,g),Fn(),n.memoizedState=null):(t!==null&&El(n,null),$r(),Fn());return le(t,n,h,l),n.child}function ua(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Bd(t,n,l,r,h){var g=Fr();return g=g===null?null:{parent:Wt._currentValue,pool:g},n.memoizedState={baseLanes:l,cachePool:g},t!==null&&El(n,null),$r(),Yh(n),t!==null&&os(t,n,r,!0),n.childLanes=h,null}function Yl(t,n){return n=Xl({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Ud(t,n,l){return Di(n,t.child,null,l),t=Yl(n,n.pendingProps),t.flags|=2,we(n),n.memoizedState=null,t}function Wb(t,n,l){var r=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(vt){if(r.mode==="hidden")return t=Yl(n,r),n.lanes=536870912,ua(null,t);if(ec(n),(t=Lt)?(t=Ig(t,Xe),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Un!==null?{id:$e,overflow:tn}:null,retryLane:536870912,hydrationErrors:null},l=Sh(t),l.return=n,n.child=l,se=n,Lt=null)):t=null,t===null)throw Yn(n);return n.lanes=536870912,null}return Yl(n,r)}var g=t.memoizedState;if(g!==null){var y=g.dehydrated;if(ec(n),h)if(n.flags&256)n.flags&=-257,n=Ud(t,n,l);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(a(558));else if(It||os(t,n,l,!1),h=(l&t.childLanes)!==0,It||h){if(r=Rt,r!==null&&(y=Df(r,l),y!==0&&y!==g.retryLane))throw g.retryLane=y,_i(t,y),_e(r,t,y),Sc;Pl(),n=Ud(t,n,l)}else t=g.treeContext,Lt=Qe(y.nextSibling),se=n,vt=!0,Vn=null,Xe=!1,t!==null&&Eh(n,t),n=Yl(n,r),n.flags|=4096;return n}return t=hn(t.child,{mode:r.mode,children:r.children}),t.ref=n.ref,n.child=t,t.return=n,t}function ql(t,n){var l=n.ref;if(l===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(t===null||t.ref!==l)&&(n.flags|=4194816)}}function Tc(t,n,l,r,h){return Ei(n),l=ic(t,n,l,r,void 0,h),r=sc(),t!==null&&!It?(ac(t,n,h),bn(t,n,h)):(vt&&r&&Br(n),n.flags|=1,le(t,n,l,h),n.child)}function Vd(t,n,l,r,h,g){return Ei(n),n.updateQueue=null,l=Xh(n,r,l,h),qh(t),r=sc(),t!==null&&!It?(ac(t,n,g),bn(t,n,g)):(vt&&r&&Br(n),n.flags|=1,le(t,n,l,g),n.child)}function Yd(t,n,l,r,h){if(Ei(n),n.stateNode===null){var g=is,y=l.contextType;typeof y=="object"&&y!==null&&(g=ae(y)),g=new l(r,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=xc,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=r,g.state=n.memoizedState,g.refs={},Wr(n),y=l.contextType,g.context=typeof y=="object"&&y!==null?ae(y):is,g.state=n.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(vc(n,l,y,r),g.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(y=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),y!==g.state&&xc.enqueueReplaceState(g,g.state,null),aa(n,r,g,h),sa(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!0}else if(t===null){g=n.stateNode;var _=n.memoizedProps,E=wi(l,_);g.props=E;var j=g.context,H=l.contextType;y=is,typeof H=="object"&&H!==null&&(y=ae(H));var V=l.getDerivedStateFromProps;H=typeof V=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,H||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||j!==y)&&Od(n,g,r,y),Xn=!1;var R=n.memoizedState;g.state=R,aa(n,r,g,h),sa(),j=n.memoizedState,_||R!==j||Xn?(typeof V=="function"&&(vc(n,l,V,r),j=n.memoizedState),(E=Xn||Ad(n,l,E,r,R,j,y))?(H||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=j),g.props=r,g.state=j,g.context=y,r=E):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{g=n.stateNode,Jr(t,n),y=n.memoizedProps,H=wi(l,y),g.props=H,V=n.pendingProps,R=g.context,j=l.contextType,E=is,typeof j=="object"&&j!==null&&(E=ae(j)),_=l.getDerivedStateFromProps,(j=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==V||R!==E)&&Od(n,g,r,E),Xn=!1,R=n.memoizedState,g.state=R,aa(n,r,g,h),sa();var k=n.memoizedState;y!==V||R!==k||Xn||t!==null&&t.dependencies!==null&&Tl(t.dependencies)?(typeof _=="function"&&(vc(n,l,_,r),k=n.memoizedState),(H=Xn||Ad(n,l,H,r,R,k,E)||t!==null&&t.dependencies!==null&&Tl(t.dependencies))?(j||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(r,k,E),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(r,k,E)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=k),g.props=r,g.state=k,g.context=E,r=H):(typeof g.componentDidUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&R===t.memoizedState||(n.flags|=1024),r=!1)}return g=r,ql(t,n),r=(n.flags&128)!==0,g||r?(g=n.stateNode,l=r&&typeof l.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&r?(n.child=Di(n,t.child,null,h),n.child=Di(n,null,l,h)):le(t,n,l,h),n.memoizedState=g.state,t=n.child):t=bn(t,n,h),t}function qd(t,n,l,r){return Ti(),n.flags|=256,le(t,n,l,r),n.child}var Mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(t){return{baseLanes:t,cachePool:wh()}}function Ac(t,n,l){return t=t!==null?t.childLanes&~l:0,n&&(t|=Re),t}function Xd(t,n,l){var r=n.pendingProps,h=!1,g=(n.flags&128)!==0,y;if((y=g)||(y=t!==null&&t.memoizedState===null?!1:(Zt.current&2)!==0),y&&(h=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,t===null){if(vt){if(h?Zn(n):Fn(),(t=Lt)?(t=Ig(t,Xe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Un!==null?{id:$e,overflow:tn}:null,retryLane:536870912,hydrationErrors:null},l=Sh(t),l.return=n,n.child=l,se=n,Lt=null)):t=null,t===null)throw Yn(n);return ru(t)?n.lanes=32:n.lanes=536870912,null}var _=r.children;return r=r.fallback,h?(Fn(),h=n.mode,_=Xl({mode:"hidden",children:_},h),r=Si(r,h,l,null),_.return=n,r.return=n,_.sibling=r,n.child=_,r=n.child,r.memoizedState=Ec(l),r.childLanes=Ac(t,y,l),n.memoizedState=Mc,ua(null,r)):(Zn(n),Oc(n,_))}var E=t.memoizedState;if(E!==null&&(_=E.dehydrated,_!==null)){if(g)n.flags&256?(Zn(n),n.flags&=-257,n=Cc(t,n,l)):n.memoizedState!==null?(Fn(),n.child=t.child,n.flags|=128,n=null):(Fn(),_=r.fallback,h=n.mode,r=Xl({mode:"visible",children:r.children},h),_=Si(_,h,l,null),_.flags|=2,r.return=n,_.return=n,r.sibling=_,n.child=r,Di(n,t.child,null,l),r=n.child,r.memoizedState=Ec(l),r.childLanes=Ac(t,y,l),n.memoizedState=Mc,n=ua(null,r));else if(Zn(n),ru(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var j=y.dgst;y=j,r=Error(a(419)),r.stack="",r.digest=y,Ps({value:r,source:null,stack:null}),n=Cc(t,n,l)}else if(It||os(t,n,l,!1),y=(l&t.childLanes)!==0,It||y){if(y=Rt,y!==null&&(r=Df(y,l),r!==0&&r!==E.retryLane))throw E.retryLane=r,_i(t,r),_e(y,t,r),Sc;ou(_)||Pl(),n=Cc(t,n,l)}else ou(_)?(n.flags|=192,n.child=t.child,n=null):(t=E.treeContext,Lt=Qe(_.nextSibling),se=n,vt=!0,Vn=null,Xe=!1,t!==null&&Eh(n,t),n=Oc(n,r.children),n.flags|=4096);return n}return h?(Fn(),_=r.fallback,h=n.mode,E=t.child,j=E.sibling,r=hn(E,{mode:"hidden",children:r.children}),r.subtreeFlags=E.subtreeFlags&65011712,j!==null?_=hn(j,_):(_=Si(_,h,l,null),_.flags|=2),_.return=n,r.return=n,r.sibling=_,n.child=r,ua(null,r),r=n.child,_=t.child.memoizedState,_===null?_=Ec(l):(h=_.cachePool,h!==null?(E=Wt._currentValue,h=h.parent!==E?{parent:E,pool:E}:h):h=wh(),_={baseLanes:_.baseLanes|l,cachePool:h}),r.memoizedState=_,r.childLanes=Ac(t,y,l),n.memoizedState=Mc,ua(t.child,r)):(Zn(n),l=t.child,t=l.sibling,l=hn(l,{mode:"visible",children:r.children}),l.return=n,l.sibling=null,t!==null&&(y=n.deletions,y===null?(n.deletions=[t],n.flags|=16):y.push(t)),n.child=l,n.memoizedState=null,l)}function Oc(t,n){return n=Xl({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Xl(t,n){return t=De(22,t,null,n),t.lanes=0,t}function Cc(t,n,l){return Di(n,t.child,null,l),t=Oc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Gd(t,n,l){t.lanes|=n;var r=t.alternate;r!==null&&(r.lanes|=n),Xr(t.return,n,l)}function Dc(t,n,l,r,h,g){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:l,tailMode:h,treeForkCount:g}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=l,y.tailMode=h,y.treeForkCount=g)}function Qd(t,n,l){var r=n.pendingProps,h=r.revealOrder,g=r.tail;r=r.children;var y=Zt.current,_=(y&2)!==0;if(_?(y=y&1|2,n.flags|=128):y&=1,K(Zt,y),le(t,n,r,l),r=vt?Is:0,!_&&t!==null&&(t.flags&128)!==0)t:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Gd(t,l,n);else if(t.tag===19)Gd(t,l,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break t;for(;t.sibling===null;){if(t.return===null||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(l=n.child,h=null;l!==null;)t=l.alternate,t!==null&&wl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null),Dc(n,!1,h,l,g,r);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&wl(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Dc(n,!0,l,null,g,r);break;case"together":Dc(n,!1,null,null,void 0,r);break;default:n.memoizedState=null}return n.child}function bn(t,n,l){if(t!==null&&(n.dependencies=t.dependencies),Jn|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(os(t,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(a(153));if(n.child!==null){for(t=n.child,l=hn(t,t.pendingProps),n.child=l,l.return=n;t.sibling!==null;)t=t.sibling,l=l.sibling=hn(t,t.pendingProps),l.return=n;l.sibling=null}return n.child}function zc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Tl(t)))}function Jb(t,n,l){switch(n.tag){case 3:de(n,n.stateNode.containerInfo),qn(n,Wt,t.memoizedState.cache),Ti();break;case 27:case 5:Ls(n);break;case 4:de(n,n.stateNode.containerInfo);break;case 10:qn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,ec(n),null;break;case 13:var r=n.memoizedState;if(r!==null)return r.dehydrated!==null?(Zn(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Xd(t,n,l):(Zn(n),t=bn(t,n,l),t!==null?t.sibling:null);Zn(n);break;case 19:var h=(t.flags&128)!==0;if(r=(l&n.childLanes)!==0,r||(os(t,n,l,!1),r=(l&n.childLanes)!==0),h){if(r)return Qd(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),K(Zt,Zt.current),r)break;return null;case 22:return n.lanes=0,Hd(t,n,l,n.pendingProps);case 24:qn(n,Wt,t.memoizedState.cache)}return bn(t,n,l)}function Zd(t,n,l){if(t!==null)if(t.memoizedProps!==n.pendingProps)It=!0;else{if(!zc(t,l)&&(n.flags&128)===0)return It=!1,Jb(t,n,l);It=(t.flags&131072)!==0}else It=!1,vt&&(n.flags&1048576)!==0&&Mh(n,Is,n.index);switch(n.lanes=0,n.tag){case 16:t:{var r=n.pendingProps;if(t=Oi(n.elementType),n.type=t,typeof t=="function")kr(t)?(r=wi(t,r),n.tag=1,n=Yd(null,n,t,r,l)):(n.tag=0,n=Tc(null,n,t,r,l));else{if(t!=null){var h=t.$$typeof;if(h===G){n.tag=11,n=Nd(null,n,t,r,l);break t}else if(h===X){n.tag=14,n=kd(null,n,t,r,l);break t}}throw n=Vt(t)||t,Error(a(306,n,""))}}return n;case 0:return Tc(t,n,n.type,n.pendingProps,l);case 1:return r=n.type,h=wi(r,n.pendingProps),Yd(t,n,r,h,l);case 3:t:{if(de(n,n.stateNode.containerInfo),t===null)throw Error(a(387));r=n.pendingProps;var g=n.memoizedState;h=g.element,Jr(t,n),aa(n,r,null,l);var y=n.memoizedState;if(r=y.cache,qn(n,Wt,r),r!==g.cache&&Gr(n,[Wt],l,!0),sa(),r=y.element,g.isDehydrated)if(g={element:r,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=qd(t,n,r,l);break t}else if(r!==h){h=Ve(Error(a(424)),n),Ps(h),n=qd(t,n,r,l);break t}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Lt=Qe(t.firstChild),se=n,vt=!0,Vn=null,Xe=!0,l=Hh(n,null,r,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ti(),r===h){n=bn(t,n,l);break t}le(t,n,r,l)}n=n.child}return n;case 26:return ql(t,n),t===null?(l=im(n.type,null,n.pendingProps,null))?n.memoizedState=l:vt||(l=n.type,t=n.pendingProps,r=ao(ot.current).createElement(l),r[ie]=n,r[me]=t,oe(r,l,t),ee(r),n.stateNode=r):n.memoizedState=im(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Ls(n),t===null&&vt&&(r=n.stateNode=tm(n.type,n.pendingProps,ot.current),se=n,Xe=!0,h=Lt,ei(n.type)?(cu=h,Lt=Qe(r.firstChild)):Lt=h),le(t,n,n.pendingProps.children,l),ql(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&vt&&((h=r=Lt)&&(r=Av(r,n.type,n.pendingProps,Xe),r!==null?(n.stateNode=r,se=n,Lt=Qe(r.firstChild),Xe=!1,h=!0):h=!1),h||Yn(n)),Ls(n),h=n.type,g=n.pendingProps,y=t!==null?t.memoizedProps:null,r=g.children,su(h,g)?r=null:y!==null&&su(h,y)&&(n.flags|=32),n.memoizedState!==null&&(h=ic(t,n,Yb,null,null,l),Ea._currentValue=h),ql(t,n),le(t,n,r,l),n.child;case 6:return t===null&&vt&&((t=l=Lt)&&(l=Ov(l,n.pendingProps,Xe),l!==null?(n.stateNode=l,se=n,Lt=null,t=!0):t=!1),t||Yn(n)),null;case 13:return Xd(t,n,l);case 4:return de(n,n.stateNode.containerInfo),r=n.pendingProps,t===null?n.child=Di(n,null,r,l):le(t,n,r,l),n.child;case 11:return Nd(t,n,n.type,n.pendingProps,l);case 7:return le(t,n,n.pendingProps,l),n.child;case 8:return le(t,n,n.pendingProps.children,l),n.child;case 12:return le(t,n,n.pendingProps.children,l),n.child;case 10:return r=n.pendingProps,qn(n,n.type,r.value),le(t,n,r.children,l),n.child;case 9:return h=n.type._context,r=n.pendingProps.children,Ei(n),h=ae(h),r=r(h),n.flags|=1,le(t,n,r,l),n.child;case 14:return kd(t,n,n.type,n.pendingProps,l);case 15:return Ld(t,n,n.type,n.pendingProps,l);case 19:return Qd(t,n,l);case 31:return Wb(t,n,l);case 22:return Hd(t,n,l,n.pendingProps);case 24:return Ei(n),r=ae(Wt),t===null?(h=Fr(),h===null&&(h=Rt,g=Qr(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),n.memoizedState={parent:r,cache:h},Wr(n),qn(n,Wt,h)):((t.lanes&l)!==0&&(Jr(t,n),aa(n,null,null,l),sa()),h=t.memoizedState,g=n.memoizedState,h.parent!==r?(h={parent:r,cache:r},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),qn(n,Wt,r)):(r=g.cache,qn(n,Wt,r),r!==h.cache&&Gr(n,[Wt],l,!0))),le(t,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function vn(t){t.flags|=4}function wc(t,n,l,r,h){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(vg())t.flags|=8192;else throw Ci=Ol,Kr}else t.flags&=-16777217}function Fd(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!rm(n))if(vg())t.flags|=8192;else throw Ci=Ol,Kr}function Gl(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Af():536870912,t.lanes|=n,vs|=n)}function fa(t,n){if(!vt)switch(t.tailMode){case"hidden":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var r=null;l!==null;)l.alternate!==null&&(r=l),l=l.sibling;r===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ht(t){var n=t.alternate!==null&&t.alternate.child===t.child,l=0,r=0;if(n)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,r|=h.subtreeFlags&65011712,r|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,r|=h.subtreeFlags,r|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=r,t.childLanes=l,n}function Ib(t,n,l){var r=n.pendingProps;switch(Ur(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(n),null;case 1:return Ht(n),null;case 3:return l=n.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),mn(Wt),Qt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ls(n)?vn(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Yr())),Ht(n),null;case 26:var h=n.type,g=n.memoizedState;return t===null?(vn(n),g!==null?(Ht(n),Fd(n,g)):(Ht(n),wc(n,h,null,r,l))):g?g!==t.memoizedState?(vn(n),Ht(n),Fd(n,g)):(Ht(n),n.flags&=-16777217):(t=t.memoizedProps,t!==r&&vn(n),Ht(n),wc(n,h,t,r,l)),null;case 27:if(el(n),l=ot.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(!r){if(n.stateNode===null)throw Error(a(166));return Ht(n),null}t=J.current,ls(n)?Ah(n):(t=tm(h,r,l),n.stateNode=t,vn(n))}return Ht(n),null;case 5:if(el(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(!r){if(n.stateNode===null)throw Error(a(166));return Ht(n),null}if(g=J.current,ls(n))Ah(n);else{var y=ao(ot.current);switch(g){case 1:g=y.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=y.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=y.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?g.multiple=!0:r.size&&(g.size=r.size);break;default:g=typeof r.is=="string"?y.createElement(h,{is:r.is}):y.createElement(h)}}g[ie]=n,g[me]=r;t:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)g.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break t;for(;y.sibling===null;){if(y.return===null||y.return===n)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=g;t:switch(oe(g,h,r),h){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break t;case"img":r=!0;break t;default:r=!1}r&&vn(n)}}return Ht(n),wc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,l),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==r&&vn(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(a(166));if(t=ot.current,ls(n)){if(t=n.stateNode,l=n.memoizedProps,r=null,h=se,h!==null)switch(h.tag){case 27:case 5:r=h.memoizedProps}t[ie]=n,t=!!(t.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||Xg(t.nodeValue,l)),t||Yn(n,!0)}else t=ao(t).createTextNode(r),t[ie]=n,n.stateNode=t}return Ht(n),null;case 31:if(l=n.memoizedState,t===null||t.memoizedState!==null){if(r=ls(n),l!==null){if(t===null){if(!r)throw Error(a(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[ie]=n}else Ti(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),t=!1}else l=Yr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return n.flags&256?(we(n),n):(we(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Ht(n),null;case 13:if(r=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=ls(n),r!==null&&r.dehydrated!==null){if(t===null){if(!h)throw Error(a(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(a(317));h[ie]=n}else Ti(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ht(n),h=!1}else h=Yr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(we(n),n):(we(n),null)}return we(n),(n.flags&128)!==0?(n.lanes=l,n):(l=r!==null,t=t!==null&&t.memoizedState!==null,l&&(r=n.child,h=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(h=r.alternate.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048)),l!==t&&l&&(n.child.flags|=8192),Gl(n,n.updateQueue),Ht(n),null);case 4:return Qt(),t===null&&$c(n.stateNode.containerInfo),Ht(n),null;case 10:return mn(n.type),Ht(n),null;case 19:if(U(Zt),r=n.memoizedState,r===null)return Ht(n),null;if(h=(n.flags&128)!==0,g=r.rendering,g===null)if(h)fa(r,!1);else{if(Xt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=wl(t),g!==null){for(n.flags|=128,fa(r,!1),t=g.updateQueue,n.updateQueue=t,Gl(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)_h(l,t),l=l.sibling;return K(Zt,Zt.current&1|2),vt&&dn(n,r.treeForkCount),n.child}t=t.sibling}r.tail!==null&&Ee()>Wl&&(n.flags|=128,h=!0,fa(r,!1),n.lanes=4194304)}else{if(!h)if(t=wl(g),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,Gl(n,t),fa(r,!0),r.tail===null&&r.tailMode==="hidden"&&!g.alternate&&!vt)return Ht(n),null}else 2*Ee()-r.renderingStartTime>Wl&&l!==536870912&&(n.flags|=128,h=!0,fa(r,!1),n.lanes=4194304);r.isBackwards?(g.sibling=n.child,n.child=g):(t=r.last,t!==null?t.sibling=g:n.child=g,r.last=g)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=Ee(),t.sibling=null,l=Zt.current,K(Zt,h?l&1|2:l&1),vt&&dn(n,r.treeForkCount),t):(Ht(n),null);case 22:case 23:return we(n),tc(),r=n.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(l&536870912)!==0&&(n.flags&128)===0&&(Ht(n),n.subtreeFlags&6&&(n.flags|=8192)):Ht(n),l=n.updateQueue,l!==null&&Gl(n,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==l&&(n.flags|=2048),t!==null&&U(Ai),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),mn(Wt),Ht(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function Pb(t,n){switch(Ur(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return mn(Wt),Qt(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return el(n),null;case 31:if(n.memoizedState!==null){if(we(n),n.alternate===null)throw Error(a(340));Ti()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(we(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(a(340));Ti()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return U(Zt),null;case 4:return Qt(),null;case 10:return mn(n.type),null;case 22:case 23:return we(n),tc(),t!==null&&U(Ai),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return mn(Wt),null;case 25:return null;default:return null}}function Kd(t,n){switch(Ur(n),n.tag){case 3:mn(Wt),Qt();break;case 26:case 27:case 5:el(n);break;case 4:Qt();break;case 31:n.memoizedState!==null&&we(n);break;case 13:we(n);break;case 19:U(Zt);break;case 10:mn(n.type);break;case 22:case 23:we(n),tc(),t!==null&&U(Ai);break;case 24:mn(Wt)}}function ha(t,n){try{var l=n.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var h=r.next;l=h;do{if((l.tag&t)===t){r=void 0;var g=l.create,y=l.inst;r=g(),y.destroy=r}l=l.next}while(l!==h)}}catch(_){Ct(n,n.return,_)}}function Kn(t,n,l){try{var r=n.updateQueue,h=r!==null?r.lastEffect:null;if(h!==null){var g=h.next;r=g;do{if((r.tag&t)===t){var y=r.inst,_=y.destroy;if(_!==void 0){y.destroy=void 0,h=n;var E=l,j=_;try{j()}catch(H){Ct(h,E,H)}}}r=r.next}while(r!==g)}}catch(H){Ct(n,n.return,H)}}function Wd(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{Uh(n,l)}catch(r){Ct(t,t.return,r)}}}function Jd(t,n,l){l.props=wi(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(r){Ct(t,n,r)}}function da(t,n){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}typeof l=="function"?t.refCleanup=l(r):l.current=r}}catch(h){Ct(t,n,h)}}function en(t,n){var l=t.ref,r=t.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(h){Ct(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){Ct(t,n,h)}else l.current=null}function Id(t){var n=t.type,l=t.memoizedProps,r=t.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break t;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(h){Ct(t,t.return,h)}}function jc(t,n,l){try{var r=t.stateNode;xv(r,t.type,l,n),r[me]=n}catch(h){Ct(t,t.return,h)}}function Pd(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ei(t.type)||t.tag===4}function Rc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Pd(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ei(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Nc(t,n,l){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(t),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=un));else if(r!==4&&(r===27&&ei(t.type)&&(l=t.stateNode,n=null),t=t.child,t!==null))for(Nc(t,n,l),t=t.sibling;t!==null;)Nc(t,n,l),t=t.sibling}function Ql(t,n,l){var r=t.tag;if(r===5||r===6)t=t.stateNode,n?l.insertBefore(t,n):l.appendChild(t);else if(r!==4&&(r===27&&ei(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Ql(t,n,l),t=t.sibling;t!==null;)Ql(t,n,l),t=t.sibling}function $d(t){var n=t.stateNode,l=t.memoizedProps;try{for(var r=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);oe(n,r,l),n[ie]=t,n[me]=l}catch(g){Ct(t,t.return,g)}}var xn=!1,Pt=!1,kc=!1,tg=typeof WeakSet=="function"?WeakSet:Set,ne=null;function $b(t,n){if(t=t.containerInfo,nu=ho,t=hh(t),Cr(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var r=l.getSelection&&l.getSelection();if(r&&r.rangeCount!==0){l=r.anchorNode;var h=r.anchorOffset,g=r.focusNode;r=r.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break t}var y=0,_=-1,E=-1,j=0,H=0,V=t,R=null;e:for(;;){for(var k;V!==l||h!==0&&V.nodeType!==3||(_=y+h),V!==g||r!==0&&V.nodeType!==3||(E=y+r),V.nodeType===3&&(y+=V.nodeValue.length),(k=V.firstChild)!==null;)R=V,V=k;for(;;){if(V===t)break e;if(R===l&&++j===h&&(_=y),R===g&&++H===r&&(E=y),(k=V.nextSibling)!==null)break;V=R,R=V.parentNode}V=k}l=_===-1||E===-1?null:{start:_,end:E}}else l=null}l=l||{start:0,end:0}}else l=null;for(iu={focusedElem:t,selectionRange:l},ho=!1,ne=n;ne!==null;)if(n=ne,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,ne=t;else for(;ne!==null;){switch(n=ne,g=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)h=t[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,l=n,h=g.memoizedProps,g=g.memoizedState,r=l.stateNode;try{var I=wi(l.type,h);t=r.getSnapshotBeforeUpdate(I,g),r.__reactInternalSnapshotBeforeUpdate=t}catch(nt){Ct(l,l.return,nt)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,l=t.nodeType,l===9)lu(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":lu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=n.sibling,t!==null){t.return=n.return,ne=t;break}ne=n.return}}function eg(t,n,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:Sn(t,l),r&4&&ha(5,l);break;case 1:if(Sn(t,l),r&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(y){Ct(l,l.return,y)}else{var h=wi(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Ct(l,l.return,y)}}r&64&&Wd(l),r&512&&da(l,l.return);break;case 3:if(Sn(t,l),r&64&&(t=l.updateQueue,t!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Uh(t,n)}catch(y){Ct(l,l.return,y)}}break;case 27:n===null&&r&4&&$d(l);case 26:case 5:Sn(t,l),n===null&&r&4&&Id(l),r&512&&da(l,l.return);break;case 12:Sn(t,l);break;case 31:Sn(t,l),r&4&&sg(t,l);break;case 13:Sn(t,l),r&4&&ag(t,l),r&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=rv.bind(null,l),Cv(t,l))));break;case 22:if(r=l.memoizedState!==null||xn,!r){n=n!==null&&n.memoizedState!==null||Pt,h=xn;var g=Pt;xn=r,(Pt=n)&&!g?Tn(t,l,(l.subtreeFlags&8772)!==0):Sn(t,l),xn=h,Pt=g}break;case 30:break;default:Sn(t,l)}}function ng(t){var n=t.alternate;n!==null&&(t.alternate=null,ng(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&fr(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Bt=null,ye=!1;function _n(t,n,l){for(l=l.child;l!==null;)ig(t,n,l),l=l.sibling}function ig(t,n,l){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(Hs,l)}catch{}switch(l.tag){case 26:Pt||en(l,n),_n(t,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Pt||en(l,n);var r=Bt,h=ye;ei(l.type)&&(Bt=l.stateNode,ye=!1),_n(t,n,l),Sa(l.stateNode),Bt=r,ye=h;break;case 5:Pt||en(l,n);case 6:if(r=Bt,h=ye,Bt=null,_n(t,n,l),Bt=r,ye=h,Bt!==null)if(ye)try{(Bt.nodeType===9?Bt.body:Bt.nodeName==="HTML"?Bt.ownerDocument.body:Bt).removeChild(l.stateNode)}catch(g){Ct(l,n,g)}else try{Bt.removeChild(l.stateNode)}catch(g){Ct(l,n,g)}break;case 18:Bt!==null&&(ye?(t=Bt,Wg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Os(t)):Wg(Bt,l.stateNode));break;case 4:r=Bt,h=ye,Bt=l.stateNode.containerInfo,ye=!0,_n(t,n,l),Bt=r,ye=h;break;case 0:case 11:case 14:case 15:Kn(2,l,n),Pt||Kn(4,l,n),_n(t,n,l);break;case 1:Pt||(en(l,n),r=l.stateNode,typeof r.componentWillUnmount=="function"&&Jd(l,n,r)),_n(t,n,l);break;case 21:_n(t,n,l);break;case 22:Pt=(r=Pt)||l.memoizedState!==null,_n(t,n,l),Pt=r;break;default:_n(t,n,l)}}function sg(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Os(t)}catch(l){Ct(n,n.return,l)}}}function ag(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Os(t)}catch(l){Ct(n,n.return,l)}}function tv(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new tg),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new tg),n;default:throw Error(a(435,t.tag))}}function Zl(t,n){var l=tv(t);n.forEach(function(r){if(!l.has(r)){l.add(r);var h=cv.bind(null,t,r);r.then(h,h)}})}function be(t,n){var l=n.deletions;if(l!==null)for(var r=0;r<l.length;r++){var h=l[r],g=t,y=n,_=y;t:for(;_!==null;){switch(_.tag){case 27:if(ei(_.type)){Bt=_.stateNode,ye=!1;break t}break;case 5:Bt=_.stateNode,ye=!1;break t;case 3:case 4:Bt=_.stateNode.containerInfo,ye=!0;break t}_=_.return}if(Bt===null)throw Error(a(160));ig(g,y,h),Bt=null,ye=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)lg(n,t),n=n.sibling}var Je=null;function lg(t,n){var l=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:be(n,t),ve(t),r&4&&(Kn(3,t,t.return),ha(3,t),Kn(5,t,t.return));break;case 1:be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),r&64&&xn&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?r:l.concat(r))));break;case 26:var h=Je;if(be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),r&4){var g=l!==null?l.memoizedState:null;if(r=t.memoizedState,l===null)if(r===null)if(t.stateNode===null){t:{r=t.type,l=t.memoizedProps,h=h.ownerDocument||h;e:switch(r){case"title":g=h.getElementsByTagName("title")[0],(!g||g[Vs]||g[ie]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(r),h.head.insertBefore(g,h.querySelector("head > title"))),oe(g,r,l),g[ie]=t,ee(g),r=g;break t;case"link":var y=lm("link","href",h).get(r+(l.href||""));if(y){for(var _=0;_<y.length;_++)if(g=y[_],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(_,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;case"meta":if(y=lm("meta","content",h).get(r+(l.content||""))){for(_=0;_<y.length;_++)if(g=y[_],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(_,1);break e}}g=h.createElement(r),oe(g,r,l),h.head.appendChild(g);break;default:throw Error(a(468,r))}g[ie]=t,ee(g),r=g}t.stateNode=r}else om(h,t.type,t.stateNode);else t.stateNode=am(h,r,t.memoizedProps);else g!==r?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,r===null?om(h,t.type,t.stateNode):am(h,r,t.memoizedProps)):r===null&&t.stateNode!==null&&jc(t,t.memoizedProps,l.memoizedProps)}break;case 27:be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),l!==null&&r&4&&jc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(be(n,t),ve(t),r&512&&(Pt||l===null||en(l,l.return)),t.flags&32){h=t.stateNode;try{Ji(h,"")}catch(I){Ct(t,t.return,I)}}r&4&&t.stateNode!=null&&(h=t.memoizedProps,jc(t,h,l!==null?l.memoizedProps:h)),r&1024&&(kc=!0);break;case 6:if(be(n,t),ve(t),r&4){if(t.stateNode===null)throw Error(a(162));r=t.memoizedProps,l=t.stateNode;try{l.nodeValue=r}catch(I){Ct(t,t.return,I)}}break;case 3:if(ro=null,h=Je,Je=lo(n.containerInfo),be(n,t),Je=h,ve(t),r&4&&l!==null&&l.memoizedState.isDehydrated)try{Os(n.containerInfo)}catch(I){Ct(t,t.return,I)}kc&&(kc=!1,og(t));break;case 4:r=Je,Je=lo(t.stateNode.containerInfo),be(n,t),ve(t),Je=r;break;case 12:be(n,t),ve(t);break;case 31:be(n,t),ve(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Zl(t,r)));break;case 13:be(n,t),ve(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Kl=Ee()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Zl(t,r)));break;case 22:h=t.memoizedState!==null;var E=l!==null&&l.memoizedState!==null,j=xn,H=Pt;if(xn=j||h,Pt=H||E,be(n,t),Pt=H,xn=j,ve(t),r&8192)t:for(n=t.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(l===null||E||xn||Pt||ji(t)),l=null,n=t;;){if(n.tag===5||n.tag===26){if(l===null){E=l=n;try{if(g=E.stateNode,h)y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{_=E.stateNode;var V=E.memoizedProps.style,R=V!=null&&V.hasOwnProperty("display")?V.display:null;_.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(I){Ct(E,E.return,I)}}}else if(n.tag===6){if(l===null){E=n;try{E.stateNode.nodeValue=h?"":E.memoizedProps}catch(I){Ct(E,E.return,I)}}}else if(n.tag===18){if(l===null){E=n;try{var k=E.stateNode;h?Jg(k,!0):Jg(E.stateNode,!1)}catch(I){Ct(E,E.return,I)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break t;for(;n.sibling===null;){if(n.return===null||n.return===t)break t;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}r&4&&(r=t.updateQueue,r!==null&&(l=r.retryQueue,l!==null&&(r.retryQueue=null,Zl(t,l))));break;case 19:be(n,t),ve(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Zl(t,r)));break;case 30:break;case 21:break;default:be(n,t),ve(t)}}function ve(t){var n=t.flags;if(n&2){try{for(var l,r=t.return;r!==null;){if(Pd(r)){l=r;break}r=r.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var h=l.stateNode,g=Rc(t);Ql(t,g,h);break;case 5:var y=l.stateNode;l.flags&32&&(Ji(y,""),l.flags&=-33);var _=Rc(t);Ql(t,_,y);break;case 3:case 4:var E=l.stateNode.containerInfo,j=Rc(t);Nc(t,j,E);break;default:throw Error(a(161))}}catch(H){Ct(t,t.return,H)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function og(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;og(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Sn(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)eg(t,n.alternate,n),n=n.sibling}function ji(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Kn(4,n,n.return),ji(n);break;case 1:en(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Jd(n,n.return,l),ji(n);break;case 27:Sa(n.stateNode);case 26:case 5:en(n,n.return),ji(n);break;case 22:n.memoizedState===null&&ji(n);break;case 30:ji(n);break;default:ji(n)}t=t.sibling}}function Tn(t,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var r=n.alternate,h=t,g=n,y=g.flags;switch(g.tag){case 0:case 11:case 15:Tn(h,g,l),ha(4,g);break;case 1:if(Tn(h,g,l),r=g,h=r.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(j){Ct(r,r.return,j)}if(r=g,h=r.updateQueue,h!==null){var _=r.stateNode;try{var E=h.shared.hiddenCallbacks;if(E!==null)for(h.shared.hiddenCallbacks=null,h=0;h<E.length;h++)Bh(E[h],_)}catch(j){Ct(r,r.return,j)}}l&&y&64&&Wd(g),da(g,g.return);break;case 27:$d(g);case 26:case 5:Tn(h,g,l),l&&r===null&&y&4&&Id(g),da(g,g.return);break;case 12:Tn(h,g,l);break;case 31:Tn(h,g,l),l&&y&4&&sg(h,g);break;case 13:Tn(h,g,l),l&&y&4&&ag(h,g);break;case 22:g.memoizedState===null&&Tn(h,g,l),da(g,g.return);break;case 30:break;default:Tn(h,g,l)}n=n.sibling}}function Lc(t,n){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&$s(l))}function Hc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&$s(t))}function Ie(t,n,l,r){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)rg(t,n,l,r),n=n.sibling}function rg(t,n,l,r){var h=n.flags;switch(n.tag){case 0:case 11:case 15:Ie(t,n,l,r),h&2048&&ha(9,n);break;case 1:Ie(t,n,l,r);break;case 3:Ie(t,n,l,r),h&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&$s(t)));break;case 12:if(h&2048){Ie(t,n,l,r),t=n.stateNode;try{var g=n.memoizedProps,y=g.id,_=g.onPostCommit;typeof _=="function"&&_(y,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(E){Ct(n,n.return,E)}}else Ie(t,n,l,r);break;case 31:Ie(t,n,l,r);break;case 13:Ie(t,n,l,r);break;case 23:break;case 22:g=n.stateNode,y=n.alternate,n.memoizedState!==null?g._visibility&2?Ie(t,n,l,r):ga(t,n):g._visibility&2?Ie(t,n,l,r):(g._visibility|=2,ps(t,n,l,r,(n.subtreeFlags&10256)!==0||!1)),h&2048&&Lc(y,n);break;case 24:Ie(t,n,l,r),h&2048&&Hc(n.alternate,n);break;default:Ie(t,n,l,r)}}function ps(t,n,l,r,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,y=n,_=l,E=r,j=y.flags;switch(y.tag){case 0:case 11:case 15:ps(g,y,_,E,h),ha(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?ps(g,y,_,E,h):ga(g,y):(H._visibility|=2,ps(g,y,_,E,h)),h&&j&2048&&Lc(y.alternate,y);break;case 24:ps(g,y,_,E,h),h&&j&2048&&Hc(y.alternate,y);break;default:ps(g,y,_,E,h)}n=n.sibling}}function ga(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=t,r=n,h=r.flags;switch(r.tag){case 22:ga(l,r),h&2048&&Lc(r.alternate,r);break;case 24:ga(l,r),h&2048&&Hc(r.alternate,r);break;default:ga(l,r)}n=n.sibling}}var ma=8192;function ys(t,n,l){if(t.subtreeFlags&ma)for(t=t.child;t!==null;)cg(t,n,l),t=t.sibling}function cg(t,n,l){switch(t.tag){case 26:ys(t,n,l),t.flags&ma&&t.memoizedState!==null&&Vv(l,Je,t.memoizedState,t.memoizedProps);break;case 5:ys(t,n,l);break;case 3:case 4:var r=Je;Je=lo(t.stateNode.containerInfo),ys(t,n,l),Je=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=ma,ma=16777216,ys(t,n,l),ma=r):ys(t,n,l));break;default:ys(t,n,l)}}function ug(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function pa(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var r=n[l];ne=r,hg(r,t)}ug(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)fg(t),t=t.sibling}function fg(t){switch(t.tag){case 0:case 11:case 15:pa(t),t.flags&2048&&Kn(9,t,t.return);break;case 3:pa(t);break;case 12:pa(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Fl(t)):pa(t);break;default:pa(t)}}function Fl(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var r=n[l];ne=r,hg(r,t)}ug(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Kn(8,n,n.return),Fl(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Fl(n));break;default:Fl(n)}t=t.sibling}}function hg(t,n){for(;ne!==null;){var l=ne;switch(l.tag){case 0:case 11:case 15:Kn(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var r=l.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:$s(l.memoizedState.cache)}if(r=l.child,r!==null)r.return=l,ne=r;else t:for(l=t;ne!==null;){r=ne;var h=r.sibling,g=r.return;if(ng(r),r===l){ne=null;break t}if(h!==null){h.return=g,ne=h;break t}ne=g}}}var ev={getCacheForType:function(t){var n=ae(Wt),l=n.data.get(t);return l===void 0&&(l=t(),n.data.set(t,l)),l},cacheSignal:function(){return ae(Wt).controller.signal}},nv=typeof WeakMap=="function"?WeakMap:Map,Mt=0,Rt=null,gt=null,yt=0,Ot=0,je=null,Wn=!1,bs=!1,Bc=!1,Mn=0,Xt=0,Jn=0,Ri=0,Uc=0,Re=0,vs=0,ya=null,xe=null,Vc=!1,Kl=0,dg=0,Wl=1/0,Jl=null,In=null,$t=0,Pn=null,xs=null,En=0,Yc=0,qc=null,gg=null,ba=0,Xc=null;function Ne(){return(Mt&2)!==0&&yt!==0?yt&-yt:N.T!==null?Wc():zf()}function mg(){if(Re===0)if((yt&536870912)===0||vt){var t=sl;sl<<=1,(sl&3932160)===0&&(sl=262144),Re=t}else Re=536870912;return t=ze.current,t!==null&&(t.flags|=32),Re}function _e(t,n,l){(t===Rt&&(Ot===2||Ot===9)||t.cancelPendingCommit!==null)&&(_s(t,0),$n(t,yt,Re,!1)),Us(t,l),((Mt&2)===0||t!==Rt)&&(t===Rt&&((Mt&2)===0&&(Ri|=l),Xt===4&&$n(t,yt,Re,!1)),nn(t))}function pg(t,n,l){if((Mt&6)!==0)throw Error(a(327));var r=!l&&(n&127)===0&&(n&t.expiredLanes)===0||Bs(t,n),h=r?av(t,n):Qc(t,n,!0),g=r;do{if(h===0){bs&&!r&&$n(t,n,0,!1);break}else{if(l=t.current.alternate,g&&!iv(l)){h=Qc(t,n,!1),g=!1;continue}if(h===2){if(g=n,t.errorRecoveryDisabledLanes&g)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;t:{var _=t;h=ya;var E=_.current.memoizedState.isDehydrated;if(E&&(_s(_,y).flags|=256),y=Qc(_,y,!1),y!==2){if(Bc&&!E){_.errorRecoveryDisabledLanes|=g,Ri|=g,h=4;break t}g=xe,xe=h,g!==null&&(xe===null?xe=g:xe.push.apply(xe,g))}h=y}if(g=!1,h!==2)continue}}if(h===1){_s(t,0),$n(t,n,0,!0);break}t:{switch(r=t,g=h,g){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:$n(r,n,Re,!Wn);break t;case 2:xe=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(h=Kl+300-Ee(),10<h)){if($n(r,n,Re,!Wn),ll(r,0,!0)!==0)break t;En=n,r.timeoutHandle=Fg(yg.bind(null,r,l,xe,Jl,Vc,n,Re,Ri,vs,Wn,g,"Throttled",-0,0),h);break t}yg(r,l,xe,Jl,Vc,n,Re,Ri,vs,Wn,g,null,-0,0)}}break}while(!0);nn(t)}function yg(t,n,l,r,h,g,y,_,E,j,H,V,R,k){if(t.timeoutHandle=-1,V=n.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},cg(n,g,V);var I=(g&62914560)===g?Kl-Ee():(g&4194048)===g?dg-Ee():0;if(I=Yv(V,I),I!==null){En=g,t.cancelPendingCommit=I(Eg.bind(null,t,n,g,l,r,h,y,_,E,H,V,null,R,k)),$n(t,g,y,!j);return}}Eg(t,n,g,l,r,h,y,_,E)}function iv(t){for(var n=t;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var r=0;r<l.length;r++){var h=l[r],g=h.getSnapshot;h=h.value;try{if(!Ce(g(),h))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function $n(t,n,l,r){n&=~Uc,n&=~Ri,t.suspendedLanes|=n,t.pingedLanes&=~n,r&&(t.warmLanes|=n),r=t.expirationTimes;for(var h=n;0<h;){var g=31-Oe(h),y=1<<g;r[g]=-1,h&=~y}l!==0&&Of(t,l,n)}function Il(){return(Mt&6)===0?(va(0),!1):!0}function Gc(){if(gt!==null){if(Ot===0)var t=gt.return;else t=gt,gn=Mi=null,lc(t),fs=null,ea=0,t=gt;for(;t!==null;)Kd(t.alternate,t),t=t.return;gt=null}}function _s(t,n){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,Tv(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),En=0,Gc(),Rt=t,gt=l=hn(t.current,null),yt=n,Ot=0,je=null,Wn=!1,bs=Bs(t,n),Bc=!1,vs=Re=Uc=Ri=Jn=Xt=0,xe=ya=null,Vc=!1,(n&8)!==0&&(n|=n&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=n;0<r;){var h=31-Oe(r),g=1<<h;n|=t[h],r&=~g}return Mn=n,bl(),l}function bg(t,n){ut=null,N.H=ca,n===us||n===Al?(n=Nh(),Ot=3):n===Kr?(n=Nh(),Ot=4):Ot=n===Sc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,je=n,gt===null&&(Xt=1,Vl(t,Ve(n,t.current)))}function vg(){var t=ze.current;return t===null?!0:(yt&4194048)===yt?Ge===null:(yt&62914560)===yt||(yt&536870912)!==0?t===Ge:!1}function xg(){var t=N.H;return N.H=ca,t===null?ca:t}function _g(){var t=N.A;return N.A=ev,t}function Pl(){Xt=4,Wn||(yt&4194048)!==yt&&ze.current!==null||(bs=!0),(Jn&134217727)===0&&(Ri&134217727)===0||Rt===null||$n(Rt,yt,Re,!1)}function Qc(t,n,l){var r=Mt;Mt|=2;var h=xg(),g=_g();(Rt!==t||yt!==n)&&(Jl=null,_s(t,n)),n=!1;var y=Xt;t:do try{if(Ot!==0&>!==null){var _=gt,E=je;switch(Ot){case 8:Gc(),y=6;break t;case 3:case 2:case 9:case 6:ze.current===null&&(n=!0);var j=Ot;if(Ot=0,je=null,Ss(t,_,E,j),l&&bs){y=0;break t}break;default:j=Ot,Ot=0,je=null,Ss(t,_,E,j)}}sv(),y=Xt;break}catch(H){bg(t,H)}while(!0);return n&&t.shellSuspendCounter++,gn=Mi=null,Mt=r,N.H=h,N.A=g,gt===null&&(Rt=null,yt=0,bl()),y}function sv(){for(;gt!==null;)Sg(gt)}function av(t,n){var l=Mt;Mt|=2;var r=xg(),h=_g();Rt!==t||yt!==n?(Jl=null,Wl=Ee()+500,_s(t,n)):bs=Bs(t,n);t:do try{if(Ot!==0&>!==null){n=gt;var g=je;e:switch(Ot){case 1:Ot=0,je=null,Ss(t,n,g,1);break;case 2:case 9:if(jh(g)){Ot=0,je=null,Tg(n);break}n=function(){Ot!==2&&Ot!==9||Rt!==t||(Ot=7),nn(t)},g.then(n,n);break t;case 3:Ot=7;break t;case 4:Ot=5;break t;case 7:jh(g)?(Ot=0,je=null,Tg(n)):(Ot=0,je=null,Ss(t,n,g,7));break;case 5:var y=null;switch(gt.tag){case 26:y=gt.memoizedState;case 5:case 27:var _=gt;if(y?rm(y):_.stateNode.complete){Ot=0,je=null;var E=_.sibling;if(E!==null)gt=E;else{var j=_.return;j!==null?(gt=j,$l(j)):gt=null}break e}}Ot=0,je=null,Ss(t,n,g,5);break;case 6:Ot=0,je=null,Ss(t,n,g,6);break;case 8:Gc(),Xt=6;break t;default:throw Error(a(462))}}lv();break}catch(H){bg(t,H)}while(!0);return gn=Mi=null,N.H=r,N.A=h,Mt=l,gt!==null?0:(Rt=null,yt=0,bl(),Xt)}function lv(){for(;gt!==null&&!Dy();)Sg(gt)}function Sg(t){var n=Zd(t.alternate,t,Mn);t.memoizedProps=t.pendingProps,n===null?$l(t):gt=n}function Tg(t){var n=t,l=n.alternate;switch(n.tag){case 15:case 0:n=Vd(l,n,n.pendingProps,n.type,void 0,yt);break;case 11:n=Vd(l,n,n.pendingProps,n.type.render,n.ref,yt);break;case 5:lc(n);default:Kd(l,n),n=gt=_h(n,Mn),n=Zd(l,n,Mn)}t.memoizedProps=t.pendingProps,n===null?$l(t):gt=n}function Ss(t,n,l,r){gn=Mi=null,lc(n),fs=null,ea=0;var h=n.return;try{if(Kb(t,h,n,l,yt)){Xt=1,Vl(t,Ve(l,t.current)),gt=null;return}}catch(g){if(h!==null)throw gt=h,g;Xt=1,Vl(t,Ve(l,t.current)),gt=null;return}n.flags&32768?(vt||r===1?t=!0:bs||(yt&536870912)!==0?t=!1:(Wn=t=!0,(r===2||r===9||r===3||r===6)&&(r=ze.current,r!==null&&r.tag===13&&(r.flags|=16384))),Mg(n,t)):$l(n)}function $l(t){var n=t;do{if((n.flags&32768)!==0){Mg(n,Wn);return}t=n.return;var l=Ib(n.alternate,n,Mn);if(l!==null){gt=l;return}if(n=n.sibling,n!==null){gt=n;return}gt=n=t}while(n!==null);Xt===0&&(Xt=5)}function Mg(t,n){do{var l=Pb(t.alternate,t);if(l!==null){l.flags&=32767,gt=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(t=t.sibling,t!==null)){gt=t;return}gt=t=l}while(t!==null);Xt=6,gt=null}function Eg(t,n,l,r,h,g,y,_,E){t.cancelPendingCommit=null;do to();while($t!==0);if((Mt&6)!==0)throw Error(a(327));if(n!==null){if(n===t.current)throw Error(a(177));if(g=n.lanes|n.childLanes,g|=Rr,Uy(t,l,g,y,_,E),t===Rt&&(gt=Rt=null,yt=0),xs=n,Pn=t,En=l,Yc=g,qc=h,gg=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,uv(nl,function(){return zg(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=N.T,N.T=null,h=Q.p,Q.p=2,y=Mt,Mt|=4;try{$b(t,n,l)}finally{Mt=y,Q.p=h,N.T=r}}$t=1,Ag(),Og(),Cg()}}function Ag(){if($t===1){$t=0;var t=Pn,n=xs,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=N.T,N.T=null;var r=Q.p;Q.p=2;var h=Mt;Mt|=4;try{lg(n,t);var g=iu,y=hh(t.containerInfo),_=g.focusedElem,E=g.selectionRange;if(y!==_&&_&&_.ownerDocument&&fh(_.ownerDocument.documentElement,_)){if(E!==null&&Cr(_)){var j=E.start,H=E.end;if(H===void 0&&(H=j),"selectionStart"in _)_.selectionStart=j,_.selectionEnd=Math.min(H,_.value.length);else{var V=_.ownerDocument||document,R=V&&V.defaultView||window;if(R.getSelection){var k=R.getSelection(),I=_.textContent.length,nt=Math.min(E.start,I),jt=E.end===void 0?nt:Math.min(E.end,I);!k.extend&&nt>jt&&(y=jt,jt=nt,nt=y);var z=uh(_,nt),O=uh(_,jt);if(z&&O&&(k.rangeCount!==1||k.anchorNode!==z.node||k.anchorOffset!==z.offset||k.focusNode!==O.node||k.focusOffset!==O.offset)){var w=V.createRange();w.setStart(z.node,z.offset),k.removeAllRanges(),nt>jt?(k.addRange(w),k.extend(O.node,O.offset)):(w.setEnd(O.node,O.offset),k.addRange(w))}}}}for(V=[],k=_;k=k.parentNode;)k.nodeType===1&&V.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<V.length;_++){var B=V[_];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}ho=!!nu,iu=nu=null}finally{Mt=h,Q.p=r,N.T=l}}t.current=n,$t=2}}function Og(){if($t===2){$t=0;var t=Pn,n=xs,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=N.T,N.T=null;var r=Q.p;Q.p=2;var h=Mt;Mt|=4;try{eg(t,n.alternate,n)}finally{Mt=h,Q.p=r,N.T=l}}$t=3}}function Cg(){if($t===4||$t===3){$t=0,zy();var t=Pn,n=xs,l=En,r=gg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?$t=5:($t=0,xs=Pn=null,Dg(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(In=null),cr(l),n=n.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(Hs,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=N.T,h=Q.p,Q.p=2,N.T=null;try{for(var g=t.onRecoverableError,y=0;y<r.length;y++){var _=r[y];g(_.value,{componentStack:_.stack})}}finally{N.T=n,Q.p=h}}(En&3)!==0&&to(),nn(t),h=t.pendingLanes,(l&261930)!==0&&(h&42)!==0?t===Xc?ba++:(ba=0,Xc=t):ba=0,va(0)}}function Dg(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,$s(n)))}function to(){return Ag(),Og(),Cg(),zg()}function zg(){if($t!==5)return!1;var t=Pn,n=Yc;Yc=0;var l=cr(En),r=N.T,h=Q.p;try{Q.p=32>l?32:l,N.T=null,l=qc,qc=null;var g=Pn,y=En;if($t=0,xs=Pn=null,En=0,(Mt&6)!==0)throw Error(a(331));var _=Mt;if(Mt|=4,fg(g.current),rg(g,g.current,y,l),Mt=_,va(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(Hs,g)}catch{}return!0}finally{Q.p=h,N.T=r,Dg(t,n)}}function wg(t,n,l){n=Ve(l,n),n=_c(t.stateNode,n,2),t=Qn(t,n,2),t!==null&&(Us(t,2),nn(t))}function Ct(t,n,l){if(t.tag===3)wg(t,t,l);else for(;n!==null;){if(n.tag===3){wg(n,t,l);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(In===null||!In.has(r))){t=Ve(l,t),l=jd(2),r=Qn(n,l,2),r!==null&&(Rd(l,r,n,t),Us(r,2),nn(r));break}}n=n.return}}function Zc(t,n,l){var r=t.pingCache;if(r===null){r=t.pingCache=new nv;var h=new Set;r.set(n,h)}else h=r.get(n),h===void 0&&(h=new Set,r.set(n,h));h.has(l)||(Bc=!0,h.add(l),t=ov.bind(null,t,n,l),n.then(t,t))}function ov(t,n,l){var r=t.pingCache;r!==null&&r.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Rt===t&&(yt&l)===l&&(Xt===4||Xt===3&&(yt&62914560)===yt&&300>Ee()-Kl?(Mt&2)===0&&_s(t,0):Uc|=l,vs===yt&&(vs=0)),nn(t)}function jg(t,n){n===0&&(n=Af()),t=_i(t,n),t!==null&&(Us(t,n),nn(t))}function rv(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),jg(t,l)}function cv(t,n){var l=0;switch(t.tag){case 31:case 13:var r=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(n),jg(t,l)}function uv(t,n){return ar(t,n)}var eo=null,Ts=null,Fc=!1,no=!1,Kc=!1,ti=0;function nn(t){t!==Ts&&t.next===null&&(Ts===null?eo=Ts=t:Ts=Ts.next=t),no=!0,Fc||(Fc=!0,hv())}function va(t,n){if(!Kc&&no){Kc=!0;do for(var l=!1,r=eo;r!==null;){if(t!==0){var h=r.pendingLanes;if(h===0)var g=0;else{var y=r.suspendedLanes,_=r.pingedLanes;g=(1<<31-Oe(42|t)+1)-1,g&=h&~(y&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,Lg(r,g))}else g=yt,g=ll(r,r===Rt?g:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(g&3)===0||Bs(r,g)||(l=!0,Lg(r,g));r=r.next}while(l);Kc=!1}}function fv(){Rg()}function Rg(){no=Fc=!1;var t=0;ti!==0&&Sv()&&(t=ti);for(var n=Ee(),l=null,r=eo;r!==null;){var h=r.next,g=Ng(r,n);g===0?(r.next=null,l===null?eo=h:l.next=h,h===null&&(Ts=l)):(l=r,(t!==0||(g&3)!==0)&&(no=!0)),r=h}$t!==0&&$t!==5||va(t),ti!==0&&(ti=0)}function Ng(t,n){for(var l=t.suspendedLanes,r=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var y=31-Oe(g),_=1<<y,E=h[y];E===-1?((_&l)===0||(_&r)!==0)&&(h[y]=By(_,n)):E<=n&&(t.expiredLanes|=_),g&=~_}if(n=Rt,l=yt,l=ll(t,t===n?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,l===0||t===n&&(Ot===2||Ot===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&lr(r),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Bs(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(r!==null&&lr(r),cr(l)){case 2:case 8:l=Mf;break;case 32:l=nl;break;case 268435456:l=Ef;break;default:l=nl}return r=kg.bind(null,t),l=ar(l,r),t.callbackPriority=n,t.callbackNode=l,n}return r!==null&&r!==null&&lr(r),t.callbackPriority=2,t.callbackNode=null,2}function kg(t,n){if($t!==0&&$t!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(to()&&t.callbackNode!==l)return null;var r=yt;return r=ll(t,t===Rt?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(pg(t,r,n),Ng(t,Ee()),t.callbackNode!=null&&t.callbackNode===l?kg.bind(null,t):null)}function Lg(t,n){if(to())return null;pg(t,n,!0)}function hv(){Mv(function(){(Mt&6)!==0?ar(Tf,fv):Rg()})}function Wc(){if(ti===0){var t=rs;t===0&&(t=il,il<<=1,(il&261888)===0&&(il=256)),ti=t}return ti}function Hg(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ul(""+t)}function Bg(t,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,t.id&&l.setAttribute("form",t.id),n.parentNode.insertBefore(l,n),t=new FormData(t),l.parentNode.removeChild(l),t}function dv(t,n,l,r,h){if(n==="submit"&&l&&l.stateNode===h){var g=Hg((h[me]||null).action),y=r.submitter;y&&(n=(n=y[me]||null)?Hg(n.formAction):y.getAttribute("formAction"),n!==null&&(g=n,y=null));var _=new gl("action","action",null,r,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ti!==0){var E=y?Bg(h,y):new FormData(h);mc(l,{pending:!0,data:E,method:h.method,action:g},null,E)}}else typeof g=="function"&&(_.preventDefault(),E=y?Bg(h,y):new FormData(h),mc(l,{pending:!0,data:E,method:h.method,action:g},g,E))},currentTarget:h}]})}}for(var Jc=0;Jc<jr.length;Jc++){var Ic=jr[Jc],gv=Ic.toLowerCase(),mv=Ic[0].toUpperCase()+Ic.slice(1);We(gv,"on"+mv)}We(mh,"onAnimationEnd"),We(ph,"onAnimationIteration"),We(yh,"onAnimationStart"),We("dblclick","onDoubleClick"),We("focusin","onFocus"),We("focusout","onBlur"),We(wb,"onTransitionRun"),We(jb,"onTransitionStart"),We(Rb,"onTransitionCancel"),We(bh,"onTransitionEnd"),Ki("onMouseEnter",["mouseout","mouseover"]),Ki("onMouseLeave",["mouseout","mouseover"]),Ki("onPointerEnter",["pointerout","pointerover"]),Ki("onPointerLeave",["pointerout","pointerover"]),yi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yi("onBeforeInput",["compositionend","keypress","textInput","paste"]),yi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xa));function Ug(t,n){n=(n&4)!==0;for(var l=0;l<t.length;l++){var r=t[l],h=r.event;r=r.listeners;t:{var g=void 0;if(n)for(var y=r.length-1;0<=y;y--){var _=r[y],E=_.instance,j=_.currentTarget;if(_=_.listener,E!==g&&h.isPropagationStopped())break t;g=_,h.currentTarget=j;try{g(h)}catch(H){yl(H)}h.currentTarget=null,g=E}else for(y=0;y<r.length;y++){if(_=r[y],E=_.instance,j=_.currentTarget,_=_.listener,E!==g&&h.isPropagationStopped())break t;g=_,h.currentTarget=j;try{g(h)}catch(H){yl(H)}h.currentTarget=null,g=E}}}}function mt(t,n){var l=n[ur];l===void 0&&(l=n[ur]=new Set);var r=t+"__bubble";l.has(r)||(Vg(n,t,2,!1),l.add(r))}function Pc(t,n,l){var r=0;n&&(r|=4),Vg(l,t,r,n)}var io="_reactListening"+Math.random().toString(36).slice(2);function $c(t){if(!t[io]){t[io]=!0,Rf.forEach(function(l){l!=="selectionchange"&&(pv.has(l)||Pc(l,!1,t),Pc(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[io]||(n[io]=!0,Pc("selectionchange",!1,n))}}function Vg(t,n,l,r){switch(mm(n)){case 2:var h=Gv;break;case 8:h=Qv;break;default:h=gu}l=h.bind(null,n,l,t),h=void 0,!vr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),r?h!==void 0?t.addEventListener(n,l,{capture:!0,passive:h}):t.addEventListener(n,l,!0):h!==void 0?t.addEventListener(n,l,{passive:h}):t.addEventListener(n,l,!1)}function tu(t,n,l,r,h){var g=r;if((n&1)===0&&(n&2)===0&&r!==null)t:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var _=r.stateNode.containerInfo;if(_===h)break;if(y===4)for(y=r.return;y!==null;){var E=y.tag;if((E===3||E===4)&&y.stateNode.containerInfo===h)return;y=y.return}for(;_!==null;){if(y=Qi(_),y===null)return;if(E=y.tag,E===5||E===6||E===26||E===27){r=g=y;continue t}_=_.parentNode}}r=r.return}Qf(function(){var j=g,H=yr(l),V=[];t:{var R=vh.get(t);if(R!==void 0){var k=gl,I=t;switch(t){case"keypress":if(hl(l)===0)break t;case"keydown":case"keyup":k=cb;break;case"focusin":I="focus",k=Tr;break;case"focusout":I="blur",k=Tr;break;case"beforeblur":case"afterblur":k=Tr;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=Kf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Iy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=hb;break;case mh:case ph:case yh:k=tb;break;case bh:k=gb;break;case"scroll":case"scrollend":k=Wy;break;case"wheel":k=pb;break;case"copy":case"cut":case"paste":k=nb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Jf;break;case"toggle":case"beforetoggle":k=bb}var nt=(n&4)!==0,jt=!nt&&(t==="scroll"||t==="scrollend"),z=nt?R!==null?R+"Capture":null:R;nt=[];for(var O=j,w;O!==null;){var B=O;if(w=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||w===null||z===null||(B=qs(O,z),B!=null&&nt.push(_a(O,B,w))),jt)break;O=O.return}0<nt.length&&(R=new k(R,I,null,l,H),V.push({event:R,listeners:nt}))}}if((n&7)===0){t:{if(R=t==="mouseover"||t==="pointerover",k=t==="mouseout"||t==="pointerout",R&&l!==pr&&(I=l.relatedTarget||l.fromElement)&&(Qi(I)||I[Gi]))break t;if((k||R)&&(R=H.window===H?H:(R=H.ownerDocument)?R.defaultView||R.parentWindow:window,k?(I=l.relatedTarget||l.toElement,k=j,I=I?Qi(I):null,I!==null&&(jt=c(I),nt=I.tag,I!==jt||nt!==5&&nt!==27&&nt!==6)&&(I=null)):(k=null,I=j),k!==I)){if(nt=Kf,B="onMouseLeave",z="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(nt=Jf,B="onPointerLeave",z="onPointerEnter",O="pointer"),jt=k==null?R:Ys(k),w=I==null?R:Ys(I),R=new nt(B,O+"leave",k,l,H),R.target=jt,R.relatedTarget=w,B=null,Qi(H)===j&&(nt=new nt(z,O+"enter",I,l,H),nt.target=w,nt.relatedTarget=jt,B=nt),jt=B,k&&I)e:{for(nt=yv,z=k,O=I,w=0,B=z;B;B=nt(B))w++;B=0;for(var et=O;et;et=nt(et))B++;for(;0<w-B;)z=nt(z),w--;for(;0<B-w;)O=nt(O),B--;for(;w--;){if(z===O||O!==null&&z===O.alternate){nt=z;break e}z=nt(z),O=nt(O)}nt=null}else nt=null;k!==null&&Yg(V,R,k,nt,!1),I!==null&&jt!==null&&Yg(V,jt,I,nt,!0)}}t:{if(R=j?Ys(j):window,k=R.nodeName&&R.nodeName.toLowerCase(),k==="select"||k==="input"&&R.type==="file")var St=sh;else if(nh(R))if(ah)St=Cb;else{St=Ab;var P=Eb}else k=R.nodeName,!k||k.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?j&&mr(j.elementType)&&(St=sh):St=Ob;if(St&&(St=St(t,j))){ih(V,St,l,H);break t}P&&P(t,R,j),t==="focusout"&&j&&R.type==="number"&&j.memoizedProps.value!=null&&gr(R,"number",R.value)}switch(P=j?Ys(j):window,t){case"focusin":(nh(P)||P.contentEditable==="true")&&(ts=P,Dr=j,Js=null);break;case"focusout":Js=Dr=ts=null;break;case"mousedown":zr=!0;break;case"contextmenu":case"mouseup":case"dragend":zr=!1,dh(V,l,H);break;case"selectionchange":if(zb)break;case"keydown":case"keyup":dh(V,l,H)}var ft;if(Er)t:{switch(t){case"compositionstart":var bt="onCompositionStart";break t;case"compositionend":bt="onCompositionEnd";break t;case"compositionupdate":bt="onCompositionUpdate";break t}bt=void 0}else $i?th(t,l)&&(bt="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(bt="onCompositionStart");bt&&(If&&l.locale!=="ko"&&($i||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&$i&&(ft=Zf()):(Bn=H,xr="value"in Bn?Bn.value:Bn.textContent,$i=!0)),P=so(j,bt),0<P.length&&(bt=new Wf(bt,t,null,l,H),V.push({event:bt,listeners:P}),ft?bt.data=ft:(ft=eh(l),ft!==null&&(bt.data=ft)))),(ft=xb?_b(t,l):Sb(t,l))&&(bt=so(j,"onBeforeInput"),0<bt.length&&(P=new Wf("onBeforeInput","beforeinput",null,l,H),V.push({event:P,listeners:bt}),P.data=ft)),dv(V,t,j,l,H)}Ug(V,n)})}function _a(t,n,l){return{instance:t,listener:n,currentTarget:l}}function so(t,n){for(var l=n+"Capture",r=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=qs(t,l),h!=null&&r.unshift(_a(t,h,g)),h=qs(t,n),h!=null&&r.push(_a(t,h,g))),t.tag===3)return r;t=t.return}return[]}function yv(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Yg(t,n,l,r,h){for(var g=n._reactName,y=[];l!==null&&l!==r;){var _=l,E=_.alternate,j=_.stateNode;if(_=_.tag,E!==null&&E===r)break;_!==5&&_!==26&&_!==27||j===null||(E=j,h?(j=qs(l,g),j!=null&&y.unshift(_a(l,j,E))):h||(j=qs(l,g),j!=null&&y.push(_a(l,j,E)))),l=l.return}y.length!==0&&t.push({event:n,listeners:y})}var bv=/\r\n?/g,vv=/\u0000|\uFFFD/g;function qg(t){return(typeof t=="string"?t:""+t).replace(bv,`
|
|
9
|
+
`).replace(vv,"")}function Xg(t,n){return n=qg(n),qg(t)===n}function wt(t,n,l,r,h,g){switch(l){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||Ji(t,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&Ji(t,""+r);break;case"className":rl(t,"class",r);break;case"tabIndex":rl(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(t,l,r);break;case"style":Xf(t,r,g);break;case"data":if(n!=="object"){rl(t,"data",r);break}case"src":case"href":if(r===""&&(n!=="a"||l!=="href")){t.removeAttribute(l);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(l);break}r=ul(""+r),t.setAttribute(l,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(l==="formAction"?(n!=="input"&&wt(t,n,"name",h.name,h,null),wt(t,n,"formEncType",h.formEncType,h,null),wt(t,n,"formMethod",h.formMethod,h,null),wt(t,n,"formTarget",h.formTarget,h,null)):(wt(t,n,"encType",h.encType,h,null),wt(t,n,"method",h.method,h,null),wt(t,n,"target",h.target,h,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(l);break}r=ul(""+r),t.setAttribute(l,r);break;case"onClick":r!=null&&(t.onclick=un);break;case"onScroll":r!=null&&mt("scroll",t);break;case"onScrollEnd":r!=null&&mt("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}l=ul(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,""+r):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":r===!0?t.setAttribute(l,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(l,r):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(l,r):t.removeAttribute(l);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(l):t.setAttribute(l,r);break;case"popover":mt("beforetoggle",t),mt("toggle",t),ol(t,"popover",r);break;case"xlinkActuate":cn(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":cn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":cn(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":cn(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":cn(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":cn(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":cn(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":cn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":cn(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ol(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Fy.get(l)||l,ol(t,l,r))}}function eu(t,n,l,r,h,g){switch(l){case"style":Xf(t,r,g);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(l=r.__html,l!=null){if(h.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"children":typeof r=="string"?Ji(t,r):(typeof r=="number"||typeof r=="bigint")&&Ji(t,""+r);break;case"onScroll":r!=null&&mt("scroll",t);break;case"onScrollEnd":r!=null&&mt("scrollend",t);break;case"onClick":r!=null&&(t.onclick=un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nf.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),n=l.slice(2,h?l.length-7:void 0),g=t[me]||null,g=g!=null?g[l]:null,typeof g=="function"&&t.removeEventListener(n,g,h),typeof r=="function")){typeof g!="function"&&g!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(n,r,h);break t}l in t?t[l]=r:r===!0?t.setAttribute(l,""):ol(t,l,r)}}}function oe(t,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",t),mt("load",t);var r=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var y=l[g];if(y!=null)switch(g){case"src":r=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:wt(t,n,g,y,l,null)}}h&&wt(t,n,"srcSet",l.srcSet,l,null),r&&wt(t,n,"src",l.src,l,null);return;case"input":mt("invalid",t);var _=g=y=h=null,E=null,j=null;for(r in l)if(l.hasOwnProperty(r)){var H=l[r];if(H!=null)switch(r){case"name":h=H;break;case"type":y=H;break;case"checked":E=H;break;case"defaultChecked":j=H;break;case"value":g=H;break;case"defaultValue":_=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(a(137,n));break;default:wt(t,n,r,H,l,null)}}Uf(t,g,_,E,j,y,h,!1);return;case"select":mt("invalid",t),r=y=g=null;for(h in l)if(l.hasOwnProperty(h)&&(_=l[h],_!=null))switch(h){case"value":g=_;break;case"defaultValue":y=_;break;case"multiple":r=_;default:wt(t,n,h,_,l,null)}n=g,l=y,t.multiple=!!r,n!=null?Wi(t,!!r,n,!1):l!=null&&Wi(t,!!r,l,!0);return;case"textarea":mt("invalid",t),g=h=r=null;for(y in l)if(l.hasOwnProperty(y)&&(_=l[y],_!=null))switch(y){case"value":r=_;break;case"defaultValue":h=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:wt(t,n,y,_,l,null)}Yf(t,r,h,g);return;case"option":for(E in l)l.hasOwnProperty(E)&&(r=l[E],r!=null)&&(E==="selected"?t.selected=r&&typeof r!="function"&&typeof r!="symbol":wt(t,n,E,r,l,null));return;case"dialog":mt("beforetoggle",t),mt("toggle",t),mt("cancel",t),mt("close",t);break;case"iframe":case"object":mt("load",t);break;case"video":case"audio":for(r=0;r<xa.length;r++)mt(xa[r],t);break;case"image":mt("error",t),mt("load",t);break;case"details":mt("toggle",t);break;case"embed":case"source":case"link":mt("error",t),mt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in l)if(l.hasOwnProperty(j)&&(r=l[j],r!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:wt(t,n,j,r,l,null)}return;default:if(mr(n)){for(H in l)l.hasOwnProperty(H)&&(r=l[H],r!==void 0&&eu(t,n,H,r,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(r=l[_],r!=null&&wt(t,n,_,r,l,null))}function xv(t,n,l,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,y=null,_=null,E=null,j=null,H=null;for(k in l){var V=l[k];if(l.hasOwnProperty(k)&&V!=null)switch(k){case"checked":break;case"value":break;case"defaultValue":E=V;default:r.hasOwnProperty(k)||wt(t,n,k,null,r,V)}}for(var R in r){var k=r[R];if(V=l[R],r.hasOwnProperty(R)&&(k!=null||V!=null))switch(R){case"type":g=k;break;case"name":h=k;break;case"checked":j=k;break;case"defaultChecked":H=k;break;case"value":y=k;break;case"defaultValue":_=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(a(137,n));break;default:k!==V&&wt(t,n,R,k,r,V)}}dr(t,y,_,E,j,H,g,h);return;case"select":k=y=_=R=null;for(g in l)if(E=l[g],l.hasOwnProperty(g)&&E!=null)switch(g){case"value":break;case"multiple":k=E;default:r.hasOwnProperty(g)||wt(t,n,g,null,r,E)}for(h in r)if(g=r[h],E=l[h],r.hasOwnProperty(h)&&(g!=null||E!=null))switch(h){case"value":R=g;break;case"defaultValue":_=g;break;case"multiple":y=g;default:g!==E&&wt(t,n,h,g,r,E)}n=_,l=y,r=k,R!=null?Wi(t,!!l,R,!1):!!r!=!!l&&(n!=null?Wi(t,!!l,n,!0):Wi(t,!!l,l?[]:"",!1));return;case"textarea":k=R=null;for(_ in l)if(h=l[_],l.hasOwnProperty(_)&&h!=null&&!r.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:wt(t,n,_,null,r,h)}for(y in r)if(h=r[y],g=l[y],r.hasOwnProperty(y)&&(h!=null||g!=null))switch(y){case"value":R=h;break;case"defaultValue":k=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(a(91));break;default:h!==g&&wt(t,n,y,h,r,g)}Vf(t,R,k);return;case"option":for(var I in l)R=l[I],l.hasOwnProperty(I)&&R!=null&&!r.hasOwnProperty(I)&&(I==="selected"?t.selected=!1:wt(t,n,I,null,r,R));for(E in r)R=r[E],k=l[E],r.hasOwnProperty(E)&&R!==k&&(R!=null||k!=null)&&(E==="selected"?t.selected=R&&typeof R!="function"&&typeof R!="symbol":wt(t,n,E,R,r,k));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var nt in l)R=l[nt],l.hasOwnProperty(nt)&&R!=null&&!r.hasOwnProperty(nt)&&wt(t,n,nt,null,r,R);for(j in r)if(R=r[j],k=l[j],r.hasOwnProperty(j)&&R!==k&&(R!=null||k!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(a(137,n));break;default:wt(t,n,j,R,r,k)}return;default:if(mr(n)){for(var jt in l)R=l[jt],l.hasOwnProperty(jt)&&R!==void 0&&!r.hasOwnProperty(jt)&&eu(t,n,jt,void 0,r,R);for(H in r)R=r[H],k=l[H],!r.hasOwnProperty(H)||R===k||R===void 0&&k===void 0||eu(t,n,H,R,r,k);return}}for(var z in l)R=l[z],l.hasOwnProperty(z)&&R!=null&&!r.hasOwnProperty(z)&&wt(t,n,z,null,r,R);for(V in r)R=r[V],k=l[V],!r.hasOwnProperty(V)||R===k||R==null&&k==null||wt(t,n,V,R,r,k)}function Gg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _v(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,l=performance.getEntriesByType("resource"),r=0;r<l.length;r++){var h=l[r],g=h.transferSize,y=h.initiatorType,_=h.duration;if(g&&_&&Gg(y)){for(y=0,_=h.responseEnd,r+=1;r<l.length;r++){var E=l[r],j=E.startTime;if(j>_)break;var H=E.transferSize,V=E.initiatorType;H&&Gg(V)&&(E=E.responseEnd,y+=H*(E<_?1:(_-j)/(E-j)))}if(--r,n+=8*(g+y)/(h.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var nu=null,iu=null;function ao(t){return t.nodeType===9?t:t.ownerDocument}function Qg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zg(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function su(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var au=null;function Sv(){var t=window.event;return t&&t.type==="popstate"?t===au?!1:(au=t,!0):(au=null,!1)}var Fg=typeof setTimeout=="function"?setTimeout:void 0,Tv=typeof clearTimeout=="function"?clearTimeout:void 0,Kg=typeof Promise=="function"?Promise:void 0,Mv=typeof queueMicrotask=="function"?queueMicrotask:typeof Kg<"u"?function(t){return Kg.resolve(null).then(t).catch(Ev)}:Fg;function Ev(t){setTimeout(function(){throw t})}function ei(t){return t==="head"}function Wg(t,n){var l=n,r=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(r===0){t.removeChild(h),Os(n);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")Sa(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Sa(l);for(var g=l.firstChild;g;){var y=g.nextSibling,_=g.nodeName;g[Vs]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=y}}else l==="body"&&Sa(t.ownerDocument.body);l=h}while(l);Os(n)}function Jg(t,n){var l=t;t=0;do{var r=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),r&&r.nodeType===8)if(l=r.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=r}while(l)}function lu(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":lu(l),fr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Av(t,n,l,r){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[Vs])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Qe(t.nextSibling),t===null)break}return null}function Ov(t,n,l){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Qe(t.nextSibling),t===null))return null;return t}function Ig(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Qe(t.nextSibling),t===null))return null;return t}function ou(t){return t.data==="$?"||t.data==="$~"}function ru(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Cv(t,n){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||l.readyState!=="loading")n();else{var r=function(){n(),l.removeEventListener("DOMContentLoaded",r)};l.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Qe(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var cu=null;function Pg(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(n===0)return Qe(t.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}t=t.nextSibling}return null}function $g(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return t;n--}else l!=="/$"&&l!=="/&"||n++}t=t.previousSibling}return null}function tm(t,n,l){switch(n=ao(l),t){case"html":if(t=n.documentElement,!t)throw Error(a(452));return t;case"head":if(t=n.head,!t)throw Error(a(453));return t;case"body":if(t=n.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function Sa(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);fr(t)}var Ze=new Map,em=new Set;function lo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var An=Q.d;Q.d={f:Dv,r:zv,D:wv,C:jv,L:Rv,m:Nv,X:Lv,S:kv,M:Hv};function Dv(){var t=An.f(),n=Il();return t||n}function zv(t){var n=Zi(t);n!==null&&n.tag===5&&n.type==="form"?bd(n):An.r(t)}var Ms=typeof document>"u"?null:document;function nm(t,n,l){var r=Ms;if(r&&typeof n=="string"&&n){var h=Be(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),em.has(h)||(em.add(h),t={rel:t,crossOrigin:l,href:n},r.querySelector(h)===null&&(n=r.createElement("link"),oe(n,"link",t),ee(n),r.head.appendChild(n)))}}function wv(t){An.D(t),nm("dns-prefetch",t,null)}function jv(t,n){An.C(t,n),nm("preconnect",t,n)}function Rv(t,n,l){An.L(t,n,l);var r=Ms;if(r&&t&&n){var h='link[rel="preload"][as="'+Be(n)+'"]';n==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Be(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Be(l.imageSizes)+'"]')):h+='[href="'+Be(t)+'"]';var g=h;switch(n){case"style":g=Es(t);break;case"script":g=As(t)}Ze.has(g)||(t=b({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:t,as:n},l),Ze.set(g,t),r.querySelector(h)!==null||n==="style"&&r.querySelector(Ta(g))||n==="script"&&r.querySelector(Ma(g))||(n=r.createElement("link"),oe(n,"link",t),ee(n),r.head.appendChild(n)))}}function Nv(t,n){An.m(t,n);var l=Ms;if(l&&t){var r=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Be(r)+'"][href="'+Be(t)+'"]',g=h;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=As(t)}if(!Ze.has(g)&&(t=b({rel:"modulepreload",href:t},n),Ze.set(g,t),l.querySelector(h)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ma(g)))return}r=l.createElement("link"),oe(r,"link",t),ee(r),l.head.appendChild(r)}}}function kv(t,n,l){An.S(t,n,l);var r=Ms;if(r&&t){var h=Fi(r).hoistableStyles,g=Es(t);n=n||"default";var y=h.get(g);if(!y){var _={loading:0,preload:null};if(y=r.querySelector(Ta(g)))_.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":n},l),(l=Ze.get(g))&&uu(t,l);var E=y=r.createElement("link");ee(E),oe(E,"link",t),E._p=new Promise(function(j,H){E.onload=j,E.onerror=H}),E.addEventListener("load",function(){_.loading|=1}),E.addEventListener("error",function(){_.loading|=2}),_.loading|=4,oo(y,n,r)}y={type:"stylesheet",instance:y,count:1,state:_},h.set(g,y)}}}function Lv(t,n){An.X(t,n);var l=Ms;if(l&&t){var r=Fi(l).hoistableScripts,h=As(t),g=r.get(h);g||(g=l.querySelector(Ma(h)),g||(t=b({src:t,async:!0},n),(n=Ze.get(h))&&fu(t,n),g=l.createElement("script"),ee(g),oe(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},r.set(h,g))}}function Hv(t,n){An.M(t,n);var l=Ms;if(l&&t){var r=Fi(l).hoistableScripts,h=As(t),g=r.get(h);g||(g=l.querySelector(Ma(h)),g||(t=b({src:t,async:!0,type:"module"},n),(n=Ze.get(h))&&fu(t,n),g=l.createElement("script"),ee(g),oe(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},r.set(h,g))}}function im(t,n,l,r){var h=(h=ot.current)?lo(h):null;if(!h)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Es(l.href),l=Fi(h).hoistableStyles,r=l.get(n),r||(r={type:"style",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Es(l.href);var g=Fi(h).hoistableStyles,y=g.get(t);if(y||(h=h.ownerDocument||h,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,y),(g=h.querySelector(Ta(t)))&&!g._p&&(y.instance=g,y.state.loading=5),Ze.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ze.set(t,l),g||Bv(h,t,l,y.state))),n&&r===null)throw Error(a(528,""));return y}if(n&&r!==null)throw Error(a(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=As(l),l=Fi(h).hoistableScripts,r=l.get(n),r||(r={type:"script",instance:null,count:0,state:null},l.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function Es(t){return'href="'+Be(t)+'"'}function Ta(t){return'link[rel="stylesheet"]['+t+"]"}function sm(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function Bv(t,n,l,r){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=t.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),oe(n,"link",l),ee(n),t.head.appendChild(n))}function As(t){return'[src="'+Be(t)+'"]'}function Ma(t){return"script[async]"+t}function am(t,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var r=t.querySelector('style[data-href~="'+Be(l.href)+'"]');if(r)return n.instance=r,ee(r),r;var h=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),ee(r),oe(r,"style",h),oo(r,l.precedence,t),n.instance=r;case"stylesheet":h=Es(l.href);var g=t.querySelector(Ta(h));if(g)return n.state.loading|=4,n.instance=g,ee(g),g;r=sm(l),(h=Ze.get(h))&&uu(r,h),g=(t.ownerDocument||t).createElement("link"),ee(g);var y=g;return y._p=new Promise(function(_,E){y.onload=_,y.onerror=E}),oe(g,"link",r),n.state.loading|=4,oo(g,l.precedence,t),n.instance=g;case"script":return g=As(l.src),(h=t.querySelector(Ma(g)))?(n.instance=h,ee(h),h):(r=l,(h=Ze.get(g))&&(r=b({},l),fu(r,h)),t=t.ownerDocument||t,h=t.createElement("script"),ee(h),oe(h,"link",r),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,oo(r,l.precedence,t));return n.instance}function oo(t,n,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=r.length?r[r.length-1]:null,g=h,y=0;y<r.length;y++){var _=r[y];if(_.dataset.precedence===n)g=_;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(t,n.firstChild))}function uu(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function fu(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var ro=null;function lm(t,n,l){if(ro===null){var r=new Map,h=ro=new Map;h.set(l,r)}else h=ro,r=h.get(l),r||(r=new Map,h.set(l,r));if(r.has(t))return r;for(r.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[Vs]||g[ie]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var y=g.getAttribute(n)||"";y=t+y;var _=r.get(y);_?_.push(g):r.set(y,[g])}}return r}function om(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function Uv(t,n,l){if(l===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function rm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Vv(t,n,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Es(r.href),g=n.querySelector(Ta(h));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=co.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=g,ee(g);return}g=n.ownerDocument||n,r=sm(r),(h=Ze.get(h))&&uu(r,h),g=g.createElement("link"),ee(g);var y=g;y._p=new Promise(function(_,E){y.onload=_,y.onerror=E}),oe(g,"link",r),l.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=co.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var hu=0;function Yv(t,n){return t.stylesheets&&t.count===0&&fo(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var r=setTimeout(function(){if(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&hu===0&&(hu=62500*_v());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&fo(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>hu?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(h)}}:null}function co(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var uo=null;function fo(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,uo=new Map,n.forEach(qv,t),uo=null,co.call(t))}function qv(t,n){if(!(n.state.loading&4)){var l=uo.get(t);if(l)var r=l.get(null);else{l=new Map,uo.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var y=h[g];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),r=y)}r&&l.set(null,r)}h=n.instance,y=h.getAttribute("data-precedence"),g=l.get(y)||r,g===r&&l.set(null,h),l.set(y,h),this.count++,r=co.bind(this),h.addEventListener("load",r),h.addEventListener("error",r),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Ea={$$typeof:q,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Xv(t,n,l,r,h,g,y,_,E){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=or(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=or(0),this.hiddenUpdates=or(null),this.identifierPrefix=r,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function cm(t,n,l,r,h,g,y,_,E,j,H,V){return t=new Xv(t,n,l,y,E,j,H,V,_),n=1,g===!0&&(n|=24),g=De(3,null,null,n),t.current=g,g.stateNode=t,n=Qr(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:r,isDehydrated:l,cache:n},Wr(g),t}function um(t){return t?(t=is,t):is}function fm(t,n,l,r,h,g){h=um(h),r.context===null?r.context=h:r.pendingContext=h,r=Gn(n),r.payload={element:l},g=g===void 0?null:g,g!==null&&(r.callback=g),l=Qn(t,r,n),l!==null&&(_e(l,t,n),ia(l,t,n))}function hm(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<n?l:n}}function du(t,n){hm(t,n),(t=t.alternate)&&hm(t,n)}function dm(t){if(t.tag===13||t.tag===31){var n=_i(t,67108864);n!==null&&_e(n,t,67108864),du(t,67108864)}}function gm(t){if(t.tag===13||t.tag===31){var n=Ne();n=rr(n);var l=_i(t,n);l!==null&&_e(l,t,n),du(t,n)}}var ho=!0;function Gv(t,n,l,r){var h=N.T;N.T=null;var g=Q.p;try{Q.p=2,gu(t,n,l,r)}finally{Q.p=g,N.T=h}}function Qv(t,n,l,r){var h=N.T;N.T=null;var g=Q.p;try{Q.p=8,gu(t,n,l,r)}finally{Q.p=g,N.T=h}}function gu(t,n,l,r){if(ho){var h=mu(r);if(h===null)tu(t,n,r,go,l),pm(t,r);else if(Fv(h,t,n,l,r))r.stopPropagation();else if(pm(t,r),n&4&&-1<Zv.indexOf(t)){for(;h!==null;){var g=Zi(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var y=pi(g.pendingLanes);if(y!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var E=1<<31-Oe(y);_.entanglements[1]|=E,y&=~E}nn(g),(Mt&6)===0&&(Wl=Ee()+500,va(0))}}break;case 31:case 13:_=_i(g,2),_!==null&&_e(_,g,2),Il(),du(g,2)}if(g=mu(r),g===null&&tu(t,n,r,go,l),g===h)break;h=g}h!==null&&r.stopPropagation()}else tu(t,n,r,null,l)}}function mu(t){return t=yr(t),pu(t)}var go=null;function pu(t){if(go=null,t=Qi(t),t!==null){var n=c(t);if(n===null)t=null;else{var l=n.tag;if(l===13){if(t=u(n),t!==null)return t;t=null}else if(l===31){if(t=f(n),t!==null)return t;t=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return go=t,null}function mm(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wy()){case Tf:return 2;case Mf:return 8;case nl:case jy:return 32;case Ef:return 268435456;default:return 32}default:return 32}}var yu=!1,ni=null,ii=null,si=null,Aa=new Map,Oa=new Map,ai=[],Zv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function pm(t,n){switch(t){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":Aa.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oa.delete(n.pointerId)}}function Ca(t,n,l,r,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:l,eventSystemFlags:r,nativeEvent:g,targetContainers:[h]},n!==null&&(n=Zi(n),n!==null&&dm(n)),t):(t.eventSystemFlags|=r,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function Fv(t,n,l,r,h){switch(n){case"focusin":return ni=Ca(ni,t,n,l,r,h),!0;case"dragenter":return ii=Ca(ii,t,n,l,r,h),!0;case"mouseover":return si=Ca(si,t,n,l,r,h),!0;case"pointerover":var g=h.pointerId;return Aa.set(g,Ca(Aa.get(g)||null,t,n,l,r,h)),!0;case"gotpointercapture":return g=h.pointerId,Oa.set(g,Ca(Oa.get(g)||null,t,n,l,r,h)),!0}return!1}function ym(t){var n=Qi(t.target);if(n!==null){var l=c(n);if(l!==null){if(n=l.tag,n===13){if(n=u(l),n!==null){t.blockedOn=n,wf(t.priority,function(){gm(l)});return}}else if(n===31){if(n=f(l),n!==null){t.blockedOn=n,wf(t.priority,function(){gm(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function mo(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var l=mu(t.nativeEvent);if(l===null){l=t.nativeEvent;var r=new l.constructor(l.type,l);pr=r,l.target.dispatchEvent(r),pr=null}else return n=Zi(l),n!==null&&dm(n),t.blockedOn=l,!1;n.shift()}return!0}function bm(t,n,l){mo(t)&&l.delete(n)}function Kv(){yu=!1,ni!==null&&mo(ni)&&(ni=null),ii!==null&&mo(ii)&&(ii=null),si!==null&&mo(si)&&(si=null),Aa.forEach(bm),Oa.forEach(bm)}function po(t,n){t.blockedOn===n&&(t.blockedOn=null,yu||(yu=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Kv)))}var yo=null;function vm(t){yo!==t&&(yo=t,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){yo===t&&(yo=null);for(var n=0;n<t.length;n+=3){var l=t[n],r=t[n+1],h=t[n+2];if(typeof r!="function"){if(pu(r||l)===null)continue;break}var g=Zi(l);g!==null&&(t.splice(n,3),n-=3,mc(g,{pending:!0,data:h,method:l.method,action:r},r,h))}}))}function Os(t){function n(E){return po(E,t)}ni!==null&&po(ni,t),ii!==null&&po(ii,t),si!==null&&po(si,t),Aa.forEach(n),Oa.forEach(n);for(var l=0;l<ai.length;l++){var r=ai[l];r.blockedOn===t&&(r.blockedOn=null)}for(;0<ai.length&&(l=ai[0],l.blockedOn===null);)ym(l),l.blockedOn===null&&ai.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(r=0;r<l.length;r+=3){var h=l[r],g=l[r+1],y=h[me]||null;if(typeof g=="function")y||vm(l);else if(y){var _=null;if(g&&g.hasAttribute("formAction")){if(h=g,y=g[me]||null)_=y.formAction;else if(pu(h)!==null)continue}else _=y.action;typeof _=="function"?l[r+1]=_:(l.splice(r,3),r-=3),vm(l)}}}function xm(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(y){return h=y})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),r||setTimeout(l,20)}function l(){if(!r&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function bu(t){this._internalRoot=t}bo.prototype.render=bu.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(a(409));var l=n.current,r=Ne();fm(l,r,t,n,null,null)},bo.prototype.unmount=bu.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;fm(t.current,2,null,t,null,null),Il(),n[Gi]=null}};function bo(t){this._internalRoot=t}bo.prototype.unstable_scheduleHydration=function(t){if(t){var n=zf();t={blockedOn:null,target:t,priority:n};for(var l=0;l<ai.length&&n!==0&&n<ai[l].priority;l++);ai.splice(l,0,t),l===0&&ym(t)}};var _m=e.version;if(_m!=="19.2.4")throw Error(a(527,_m,"19.2.4"));Q.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=m(n),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var Wv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vo.isDisabled&&vo.supportsFiber)try{Hs=vo.inject(Wv),Ae=vo}catch{}}return za.createRoot=function(t,n){if(!o(t))throw Error(a(299));var l=!1,r="",h=Cd,g=Dd,y=zd;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=cm(t,1,!1,null,null,l,r,null,h,g,y,xm),t[Gi]=n.current,$c(t),new bu(n)},za.hydrateRoot=function(t,n,l){if(!o(t))throw Error(a(299));var r=!1,h="",g=Cd,y=Dd,_=zd,E=null;return l!=null&&(l.unstable_strictMode===!0&&(r=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.formState!==void 0&&(E=l.formState)),n=cm(t,1,!0,n,l??null,r,h,E,g,y,_,xm),n.context=um(null),l=n.current,r=Ne(),r=rr(r),h=Gn(r),h.callback=null,Qn(l,h,r),l=r,n.current.lanes=l,Us(n,l),nn(n),t[Gi]=n.current,$c(t),new bo(n)},za.version="19.2.4",za}var wm;function ax(){if(wm)return _u.exports;wm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),_u.exports=sx(),_u.exports}var lx=ax();function tl(s){return s+.5|0}const oi=(s,e,i)=>Math.max(Math.min(s,i),e);function Ha(s){return oi(tl(s*2.55),0,255)}function fi(s){return oi(tl(s*255),0,255)}function zn(s){return oi(tl(s/2.55)/100,0,1)}function jm(s){return oi(tl(s*100),0,100)}const Fe={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},Zu=[..."0123456789ABCDEF"],ox=s=>Zu[s&15],rx=s=>Zu[(s&240)>>4]+Zu[s&15],xo=s=>(s&240)>>4===(s&15),cx=s=>xo(s.r)&&xo(s.g)&&xo(s.b)&&xo(s.a);function ux(s){var e=s.length,i;return s[0]==="#"&&(e===4||e===5?i={r:255&Fe[s[1]]*17,g:255&Fe[s[2]]*17,b:255&Fe[s[3]]*17,a:e===5?Fe[s[4]]*17:255}:(e===7||e===9)&&(i={r:Fe[s[1]]<<4|Fe[s[2]],g:Fe[s[3]]<<4|Fe[s[4]],b:Fe[s[5]]<<4|Fe[s[6]],a:e===9?Fe[s[7]]<<4|Fe[s[8]]:255})),i}const fx=(s,e)=>s<255?e(s):"";function hx(s){var e=cx(s)?ox:rx;return s?"#"+e(s.r)+e(s.g)+e(s.b)+fx(s.a,e):void 0}const dx=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function d0(s,e,i){const a=e*Math.min(i,1-i),o=(c,u=(c+s/30)%12)=>i-a*Math.max(Math.min(u-3,9-u,1),-1);return[o(0),o(8),o(4)]}function gx(s,e,i){const a=(o,c=(o+s/60)%6)=>i-i*e*Math.max(Math.min(c,4-c,1),0);return[a(5),a(3),a(1)]}function mx(s,e,i){const a=d0(s,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)a[o]*=1-e-i,a[o]+=e;return a}function px(s,e,i,a,o){return s===o?(e-i)/a+(e<i?6:0):e===o?(i-s)/a+2:(s-e)/a+4}function nf(s){const i=s.r/255,a=s.g/255,o=s.b/255,c=Math.max(i,a,o),u=Math.min(i,a,o),f=(c+u)/2;let d,m,p;return c!==u&&(p=c-u,m=f>.5?p/(2-c-u):p/(c+u),d=px(i,a,o,p,c),d=d*60+.5),[d|0,m||0,f]}function sf(s,e,i,a){return(Array.isArray(e)?s(e[0],e[1],e[2]):s(e,i,a)).map(fi)}function af(s,e,i){return sf(d0,s,e,i)}function yx(s,e,i){return sf(mx,s,e,i)}function bx(s,e,i){return sf(gx,s,e,i)}function g0(s){return(s%360+360)%360}function vx(s){const e=dx.exec(s);let i=255,a;if(!e)return;e[5]!==a&&(i=e[6]?Ha(+e[5]):fi(+e[5]));const o=g0(+e[2]),c=+e[3]/100,u=+e[4]/100;return e[1]==="hwb"?a=yx(o,c,u):e[1]==="hsv"?a=bx(o,c,u):a=af(o,c,u),{r:a[0],g:a[1],b:a[2],a:i}}function xx(s,e){var i=nf(s);i[0]=g0(i[0]+e),i=af(i),s.r=i[0],s.g=i[1],s.b=i[2]}function _x(s){if(!s)return;const e=nf(s),i=e[0],a=jm(e[1]),o=jm(e[2]);return s.a<255?`hsla(${i}, ${a}%, ${o}%, ${zn(s.a)})`:`hsl(${i}, ${a}%, ${o}%)`}const Rm={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"},Nm={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 Sx(){const s={},e=Object.keys(Nm),i=Object.keys(Rm);let a,o,c,u,f;for(a=0;a<e.length;a++){for(u=f=e[a],o=0;o<i.length;o++)c=i[o],f=f.replace(c,Rm[c]);c=parseInt(Nm[u],16),s[f]=[c>>16&255,c>>8&255,c&255]}return s}let _o;function Tx(s){_o||(_o=Sx(),_o.transparent=[0,0,0,0]);const e=_o[s.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Mx=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ex(s){const e=Mx.exec(s);let i=255,a,o,c;if(e){if(e[7]!==a){const u=+e[7];i=e[8]?Ha(u):oi(u*255,0,255)}return a=+e[1],o=+e[3],c=+e[5],a=255&(e[2]?Ha(a):oi(a,0,255)),o=255&(e[4]?Ha(o):oi(o,0,255)),c=255&(e[6]?Ha(c):oi(c,0,255)),{r:a,g:o,b:c,a:i}}}function Ax(s){return s&&(s.a<255?`rgba(${s.r}, ${s.g}, ${s.b}, ${zn(s.a)})`:`rgb(${s.r}, ${s.g}, ${s.b})`)}const Eu=s=>s<=.0031308?s*12.92:Math.pow(s,1/2.4)*1.055-.055,Cs=s=>s<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4);function Ox(s,e,i){const a=Cs(zn(s.r)),o=Cs(zn(s.g)),c=Cs(zn(s.b));return{r:fi(Eu(a+i*(Cs(zn(e.r))-a))),g:fi(Eu(o+i*(Cs(zn(e.g))-o))),b:fi(Eu(c+i*(Cs(zn(e.b))-c))),a:s.a+i*(e.a-s.a)}}function So(s,e,i){if(s){let a=nf(s);a[e]=Math.max(0,Math.min(a[e]+a[e]*i,e===0?360:1)),a=af(a),s.r=a[0],s.g=a[1],s.b=a[2]}}function m0(s,e){return s&&Object.assign(e||{},s)}function km(s){var e={r:0,g:0,b:0,a:255};return Array.isArray(s)?s.length>=3&&(e={r:s[0],g:s[1],b:s[2],a:255},s.length>3&&(e.a=fi(s[3]))):(e=m0(s,{r:0,g:0,b:0,a:1}),e.a=fi(e.a)),e}function Cx(s){return s.charAt(0)==="r"?Ex(s):vx(s)}class Za{constructor(e){if(e instanceof Za)return e;const i=typeof e;let a;i==="object"?a=km(e):i==="string"&&(a=ux(e)||Tx(e)||Cx(e)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var e=m0(this._rgb);return e&&(e.a=zn(e.a)),e}set rgb(e){this._rgb=km(e)}rgbString(){return this._valid?Ax(this._rgb):void 0}hexString(){return this._valid?hx(this._rgb):void 0}hslString(){return this._valid?_x(this._rgb):void 0}mix(e,i){if(e){const a=this.rgb,o=e.rgb;let c;const u=i===c?.5:i,f=2*u-1,d=a.a-o.a,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2;c=1-m,a.r=255&m*a.r+c*o.r+.5,a.g=255&m*a.g+c*o.g+.5,a.b=255&m*a.b+c*o.b+.5,a.a=u*a.a+(1-u)*o.a,this.rgb=a}return this}interpolate(e,i){return e&&(this._rgb=Ox(this._rgb,e._rgb,i)),this}clone(){return new Za(this.rgb)}alpha(e){return this._rgb.a=fi(e),this}clearer(e){const i=this._rgb;return i.a*=1-e,this}greyscale(){const e=this._rgb,i=tl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=i,this}opaquer(e){const i=this._rgb;return i.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return So(this._rgb,2,e),this}darken(e){return So(this._rgb,2,-e),this}saturate(e){return So(this._rgb,1,e),this}desaturate(e){return So(this._rgb,1,-e),this}rotate(e){return xx(this._rgb,e),this}}function On(){}const Dx=(()=>{let s=0;return()=>s++})();function xt(s){return s==null}function Kt(s){if(Array.isArray&&Array.isArray(s))return!0;const e=Object.prototype.toString.call(s);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function pt(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}function he(s){return(typeof s=="number"||s instanceof Number)&&isFinite(+s)}function sn(s,e){return he(s)?s:e}function ht(s,e){return typeof s>"u"?e:s}const zx=(s,e)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100:+s/e,p0=(s,e)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*e:+s;function Nt(s,e,i){if(s&&typeof s.call=="function")return s.apply(i,e)}function At(s,e,i,a){let o,c,u;if(Kt(s))for(c=s.length,o=0;o<c;o++)e.call(i,s[o],o);else if(pt(s))for(u=Object.keys(s),c=u.length,o=0;o<c;o++)e.call(i,s[u[o]],u[o])}function Uo(s,e){let i,a,o,c;if(!s||!e||s.length!==e.length)return!1;for(i=0,a=s.length;i<a;++i)if(o=s[i],c=e[i],o.datasetIndex!==c.datasetIndex||o.index!==c.index)return!1;return!0}function Vo(s){if(Kt(s))return s.map(Vo);if(pt(s)){const e=Object.create(null),i=Object.keys(s),a=i.length;let o=0;for(;o<a;++o)e[i[o]]=Vo(s[i[o]]);return e}return s}function y0(s){return["__proto__","prototype","constructor"].indexOf(s)===-1}function wx(s,e,i,a){if(!y0(s))return;const o=e[s],c=i[s];pt(o)&&pt(c)?rn(o,c,a):e[s]=Vo(c)}function rn(s,e,i){const a=Kt(e)?e:[e],o=a.length;if(!pt(s))return s;i=i||{};const c=i.merger||wx;let u;for(let f=0;f<o;++f){if(u=a[f],!pt(u))continue;const d=Object.keys(u);for(let m=0,p=d.length;m<p;++m)c(d[m],s,u,i)}return s}function Va(s,e){return rn(s,e,{merger:jx})}function jx(s,e,i){if(!y0(s))return;const a=e[s],o=i[s];pt(a)&&pt(o)?Va(a,o):Object.prototype.hasOwnProperty.call(e,s)||(e[s]=Vo(o))}const Lm={"":s=>s,x:s=>s.x,y:s=>s.y};function Rx(s){const e=s.split("."),i=[];let a="";for(const o of e)a+=o,a.endsWith("\\")?a=a.slice(0,-1)+".":(i.push(a),a="");return i}function Nx(s){const e=Rx(s);return i=>{for(const a of e){if(a==="")break;i=i&&i[a]}return i}}function Yi(s,e){return(Lm[e]||(Lm[e]=Nx(e)))(s)}function lf(s){return s.charAt(0).toUpperCase()+s.slice(1)}const Fa=s=>typeof s<"u",hi=s=>typeof s=="function",Hm=(s,e)=>{if(s.size!==e.size)return!1;for(const i of s)if(!e.has(i))return!1;return!0};function kx(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}const Dt=Math.PI,Yt=2*Dt,Lx=Yt+Dt,Yo=Number.POSITIVE_INFINITY,Hx=Dt/180,te=Dt/2,Ni=Dt/4,Bm=Dt*2/3,b0=Math.log10,on=Math.sign;function Ya(s,e,i){return Math.abs(s-e)<i}function Um(s){const e=Math.round(s);s=Ya(s,e,s/1e3)?e:s;const i=Math.pow(10,Math.floor(b0(s))),a=s/i;return(a<=1?1:a<=2?2:a<=5?5:10)*i}function Bx(s){const e=[],i=Math.sqrt(s);let a;for(a=1;a<i;a++)s%a===0&&(e.push(a),e.push(s/a));return i===(i|0)&&e.push(i),e.sort((o,c)=>o-c).pop(),e}function Ux(s){return typeof s=="symbol"||typeof s=="object"&&s!==null&&!(Symbol.toPrimitive in s||"toString"in s||"valueOf"in s)}function Ka(s){return!Ux(s)&&!isNaN(parseFloat(s))&&isFinite(s)}function Vx(s,e){const i=Math.round(s);return i-e<=s&&i+e>=s}function Yx(s,e,i){let a,o,c;for(a=0,o=s.length;a<o;a++)c=s[a][i],isNaN(c)||(e.min=Math.min(e.min,c),e.max=Math.max(e.max,c))}function jn(s){return s*(Dt/180)}function qx(s){return s*(180/Dt)}function Vm(s){if(!he(s))return;let e=1,i=0;for(;Math.round(s*e)/e!==s;)e*=10,i++;return i}function v0(s,e){const i=e.x-s.x,a=e.y-s.y,o=Math.sqrt(i*i+a*a);let c=Math.atan2(a,i);return c<-.5*Dt&&(c+=Yt),{angle:c,distance:o}}function Fu(s,e){return Math.sqrt(Math.pow(e.x-s.x,2)+Math.pow(e.y-s.y,2))}function Xx(s,e){return(s-e+Lx)%Yt-Dt}function ke(s){return(s%Yt+Yt)%Yt}function Wa(s,e,i,a){const o=ke(s),c=ke(e),u=ke(i),f=ke(c-o),d=ke(u-o),m=ke(o-c),p=ke(o-u);return o===c||o===u||a&&c===u||f>d&&m<p}function fe(s,e,i){return Math.max(e,Math.min(i,s))}function Gx(s){return fe(s,-32768,32767)}function Rn(s,e,i,a=1e-6){return s>=Math.min(e,i)-a&&s<=Math.max(e,i)+a}function of(s,e,i){i=i||(u=>s[u]<e);let a=s.length-1,o=0,c;for(;a-o>1;)c=o+a>>1,i(c)?o=c:a=c;return{lo:o,hi:a}}const Ui=(s,e,i,a)=>of(s,i,a?o=>{const c=s[o][e];return c<i||c===i&&s[o+1][e]===i}:o=>s[o][e]<i),Qx=(s,e,i)=>of(s,i,a=>s[a][e]>=i);function Zx(s,e,i){let a=0,o=s.length;for(;a<o&&s[a]<e;)a++;for(;o>a&&s[o-1]>i;)o--;return a>0||o<s.length?s.slice(a,o):s}const x0=["push","pop","shift","splice","unshift"];function Fx(s,e){if(s._chartjs){s._chartjs.listeners.push(e);return}Object.defineProperty(s,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),x0.forEach(i=>{const a="_onData"+lf(i),o=s[i];Object.defineProperty(s,i,{configurable:!0,enumerable:!1,value(...c){const u=o.apply(this,c);return s._chartjs.listeners.forEach(f=>{typeof f[a]=="function"&&f[a](...c)}),u}})})}function Ym(s,e){const i=s._chartjs;if(!i)return;const a=i.listeners,o=a.indexOf(e);o!==-1&&a.splice(o,1),!(a.length>0)&&(x0.forEach(c=>{delete s[c]}),delete s._chartjs)}function _0(s){const e=new Set(s);return e.size===s.length?s:Array.from(e)}const S0=(function(){return typeof window>"u"?function(s){return s()}:window.requestAnimationFrame})();function T0(s,e){let i=[],a=!1;return function(...o){i=o,a||(a=!0,S0.call(window,()=>{a=!1,s.apply(e,i)}))}}function Kx(s,e){let i;return function(...a){return e?(clearTimeout(i),i=setTimeout(s,e,a)):s.apply(this,a),e}}const rf=s=>s==="start"?"left":s==="end"?"right":"center",ue=(s,e,i)=>s==="start"?e:s==="end"?i:(e+i)/2,Wx=(s,e,i,a)=>s===(a?"left":"right")?i:s==="center"?(e+i)/2:e;function Jx(s,e,i){const a=e.length;let o=0,c=a;if(s._sorted){const{iScale:u,vScale:f,_parsed:d}=s,m=s.dataset&&s.dataset.options?s.dataset.options.spanGaps:null,p=u.axis,{min:b,max:v,minDefined:S,maxDefined:T}=u.getUserBounds();if(S){if(o=Math.min(Ui(d,p,b).lo,i?a:Ui(e,p,u.getPixelForValue(b)).lo),m){const M=d.slice(0,o+1).reverse().findIndex(A=>!xt(A[f.axis]));o-=Math.max(0,M)}o=fe(o,0,a-1)}if(T){let M=Math.max(Ui(d,u.axis,v,!0).hi+1,i?0:Ui(e,p,u.getPixelForValue(v),!0).hi+1);if(m){const A=d.slice(M-1).findIndex(D=>!xt(D[f.axis]));M+=Math.max(0,A)}c=fe(M,o,a)-o}else c=a-o}return{start:o,count:c}}function Ix(s){const{xScale:e,yScale:i,_scaleRanges:a}=s,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!a)return s._scaleRanges=o,!0;const c=a.xmin!==e.min||a.xmax!==e.max||a.ymin!==i.min||a.ymax!==i.max;return Object.assign(a,o),c}const To=s=>s===0||s===1,qm=(s,e,i)=>-(Math.pow(2,10*(s-=1))*Math.sin((s-e)*Yt/i)),Xm=(s,e,i)=>Math.pow(2,-10*s)*Math.sin((s-e)*Yt/i)+1,qa={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*te)+1,easeOutSine:s=>Math.sin(s*te),easeInOutSine:s=>-.5*(Math.cos(Dt*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=>To(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=>To(s)?s:qm(s,.075,.3),easeOutElastic:s=>To(s)?s:Xm(s,.075,.3),easeInOutElastic(s){return To(s)?s:s<.5?.5*qm(s*2,.1125,.45):.5+.5*Xm(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 e=1.70158;return(s/=.5)<1?.5*(s*s*(((e*=1.525)+1)*s-e)):.5*((s-=2)*s*(((e*=1.525)+1)*s+e)+2)},easeInBounce:s=>1-qa.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?qa.easeInBounce(s*2)*.5:qa.easeOutBounce(s*2-1)*.5+.5};function cf(s){if(s&&typeof s=="object"){const e=s.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Gm(s){return cf(s)?s:new Za(s)}function Au(s){return cf(s)?s:new Za(s).saturate(.5).darken(.1).hexString()}const Px=["x","y","borderWidth","radius","tension"],$x=["color","borderColor","backgroundColor"];function t_(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:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),s.set("animations",{colors:{type:"color",properties:$x},numbers:{type:"number",properties:Px}}),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:e=>e|0}}}})}function e_(s){s.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Qm=new Map;function n_(s,e){e=e||{};const i=s+JSON.stringify(e);let a=Qm.get(i);return a||(a=new Intl.NumberFormat(s,e),Qm.set(i,a)),a}function uf(s,e,i){return n_(e,i).format(s)}const i_={values(s){return Kt(s)?s:""+s},numeric(s,e,i){if(s===0)return"0";const a=this.chart.options.locale;let o,c=s;if(i.length>1){const m=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(m<1e-4||m>1e15)&&(o="scientific"),c=s_(s,i)}const u=b0(Math.abs(c)),f=isNaN(u)?1:Math.max(Math.min(-1*Math.floor(u),20),0),d={notation:o,minimumFractionDigits:f,maximumFractionDigits:f};return Object.assign(d,this.options.ticks.format),uf(s,a,d)}};function s_(s,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&s!==Math.floor(s)&&(i=s-Math.floor(s)),i}var M0={formatters:i_};function a_(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:(e,i)=>i.lineWidth,tickColor:(e,i)=>i.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:M0.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:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),s.describe("scales",{_fallback:"scale"}),s.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const qi=Object.create(null),Ku=Object.create(null);function Xa(s,e){if(!e)return s;const i=e.split(".");for(let a=0,o=i.length;a<o;++a){const c=i[a];s=s[c]||(s[c]=Object.create(null))}return s}function Ou(s,e,i){return typeof e=="string"?rn(Xa(s,e),i):rn(Xa(s,""),e)}class l_{constructor(e,i){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=a=>a.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=(a,o)=>Au(o.backgroundColor),this.hoverBorderColor=(a,o)=>Au(o.borderColor),this.hoverColor=(a,o)=>Au(o.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(e),this.apply(i)}set(e,i){return Ou(this,e,i)}get(e){return Xa(this,e)}describe(e,i){return Ou(Ku,e,i)}override(e,i){return Ou(qi,e,i)}route(e,i,a,o){const c=Xa(this,e),u=Xa(this,a),f="_"+i;Object.defineProperties(c,{[f]:{value:c[i],writable:!0},[i]:{enumerable:!0,get(){const d=this[f],m=u[o];return pt(d)?Object.assign({},m,d):ht(d,m)},set(d){this[f]=d}}})}apply(e){e.forEach(i=>i(this))}}var Gt=new l_({_scriptable:s=>!s.startsWith("on"),_indexable:s=>s!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[t_,e_,a_]);function o_(s){return!s||xt(s.size)||xt(s.family)?null:(s.style?s.style+" ":"")+(s.weight?s.weight+" ":"")+s.size+"px "+s.family}function Zm(s,e,i,a,o){let c=e[o];return c||(c=e[o]=s.measureText(o).width,i.push(o)),c>a&&(a=c),a}function ki(s,e,i){const a=s.currentDevicePixelRatio,o=i!==0?Math.max(i/2,.5):0;return Math.round((e-o)*a)/a+o}function Fm(s,e){!e&&!s||(e=e||s.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,s.width,s.height),e.restore())}function Wu(s,e,i,a){E0(s,e,i,a,null)}function E0(s,e,i,a,o){let c,u,f,d,m,p,b,v;const S=e.pointStyle,T=e.rotation,M=e.radius;let A=(T||0)*Hx;if(S&&typeof S=="object"&&(c=S.toString(),c==="[object HTMLImageElement]"||c==="[object HTMLCanvasElement]")){s.save(),s.translate(i,a),s.rotate(A),s.drawImage(S,-S.width/2,-S.height/2,S.width,S.height),s.restore();return}if(!(isNaN(M)||M<=0)){switch(s.beginPath(),S){default:o?s.ellipse(i,a,o/2,M,0,0,Yt):s.arc(i,a,M,0,Yt),s.closePath();break;case"triangle":p=o?o/2:M,s.moveTo(i+Math.sin(A)*p,a-Math.cos(A)*M),A+=Bm,s.lineTo(i+Math.sin(A)*p,a-Math.cos(A)*M),A+=Bm,s.lineTo(i+Math.sin(A)*p,a-Math.cos(A)*M),s.closePath();break;case"rectRounded":m=M*.516,d=M-m,u=Math.cos(A+Ni)*d,b=Math.cos(A+Ni)*(o?o/2-m:d),f=Math.sin(A+Ni)*d,v=Math.sin(A+Ni)*(o?o/2-m:d),s.arc(i-b,a-f,m,A-Dt,A-te),s.arc(i+v,a-u,m,A-te,A),s.arc(i+b,a+f,m,A,A+te),s.arc(i-v,a+u,m,A+te,A+Dt),s.closePath();break;case"rect":if(!T){d=Math.SQRT1_2*M,p=o?o/2:d,s.rect(i-p,a-d,2*p,2*d);break}A+=Ni;case"rectRot":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+v,a-u),s.lineTo(i+b,a+f),s.lineTo(i-v,a+u),s.closePath();break;case"crossRot":A+=Ni;case"cross":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+b,a+f),s.moveTo(i+v,a-u),s.lineTo(i-v,a+u);break;case"star":b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+b,a+f),s.moveTo(i+v,a-u),s.lineTo(i-v,a+u),A+=Ni,b=Math.cos(A)*(o?o/2:M),u=Math.cos(A)*M,f=Math.sin(A)*M,v=Math.sin(A)*(o?o/2:M),s.moveTo(i-b,a-f),s.lineTo(i+b,a+f),s.moveTo(i+v,a-u),s.lineTo(i-v,a+u);break;case"line":u=o?o/2:Math.cos(A)*M,f=Math.sin(A)*M,s.moveTo(i-u,a-f),s.lineTo(i+u,a+f);break;case"dash":s.moveTo(i,a),s.lineTo(i+Math.cos(A)*(o?o/2:M),a+Math.sin(A)*M);break;case!1:s.closePath();break}s.fill(),e.borderWidth>0&&s.stroke()}}function Ja(s,e,i){return i=i||.5,!e||s&&s.x>e.left-i&&s.x<e.right+i&&s.y>e.top-i&&s.y<e.bottom+i}function Zo(s,e){s.save(),s.beginPath(),s.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),s.clip()}function Fo(s){s.restore()}function r_(s,e,i,a,o){if(!e)return s.lineTo(i.x,i.y);if(o==="middle"){const c=(e.x+i.x)/2;s.lineTo(c,e.y),s.lineTo(c,i.y)}else o==="after"!=!!a?s.lineTo(e.x,i.y):s.lineTo(i.x,e.y);s.lineTo(i.x,i.y)}function c_(s,e,i,a){if(!e)return s.lineTo(i.x,i.y);s.bezierCurveTo(a?e.cp1x:e.cp2x,a?e.cp1y:e.cp2y,a?i.cp2x:i.cp1x,a?i.cp2y:i.cp1y,i.x,i.y)}function u_(s,e){e.translation&&s.translate(e.translation[0],e.translation[1]),xt(e.rotation)||s.rotate(e.rotation),e.color&&(s.fillStyle=e.color),e.textAlign&&(s.textAlign=e.textAlign),e.textBaseline&&(s.textBaseline=e.textBaseline)}function f_(s,e,i,a,o){if(o.strikethrough||o.underline){const c=s.measureText(a),u=e-c.actualBoundingBoxLeft,f=e+c.actualBoundingBoxRight,d=i-c.actualBoundingBoxAscent,m=i+c.actualBoundingBoxDescent,p=o.strikethrough?(d+m)/2:m;s.strokeStyle=s.fillStyle,s.beginPath(),s.lineWidth=o.decorationWidth||2,s.moveTo(u,p),s.lineTo(f,p),s.stroke()}}function h_(s,e){const i=s.fillStyle;s.fillStyle=e.color,s.fillRect(e.left,e.top,e.width,e.height),s.fillStyle=i}function Ia(s,e,i,a,o,c={}){const u=Kt(e)?e:[e],f=c.strokeWidth>0&&c.strokeColor!=="";let d,m;for(s.save(),s.font=o.string,u_(s,c),d=0;d<u.length;++d)m=u[d],c.backdrop&&h_(s,c.backdrop),f&&(c.strokeColor&&(s.strokeStyle=c.strokeColor),xt(c.strokeWidth)||(s.lineWidth=c.strokeWidth),s.strokeText(m,i,a,c.maxWidth)),s.fillText(m,i,a,c.maxWidth),f_(s,i,a,m,c),a+=Number(o.lineHeight);s.restore()}function qo(s,e){const{x:i,y:a,w:o,h:c,radius:u}=e;s.arc(i+u.topLeft,a+u.topLeft,u.topLeft,1.5*Dt,Dt,!0),s.lineTo(i,a+c-u.bottomLeft),s.arc(i+u.bottomLeft,a+c-u.bottomLeft,u.bottomLeft,Dt,te,!0),s.lineTo(i+o-u.bottomRight,a+c),s.arc(i+o-u.bottomRight,a+c-u.bottomRight,u.bottomRight,te,0,!0),s.lineTo(i+o,a+u.topRight),s.arc(i+o-u.topRight,a+u.topRight,u.topRight,0,-te,!0),s.lineTo(i+u.topLeft,a)}const d_=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,g_=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function m_(s,e){const i=(""+s).match(d_);if(!i||i[1]==="normal")return e*1.2;switch(s=+i[2],i[3]){case"px":return s;case"%":s/=100;break}return e*s}const p_=s=>+s||0;function ff(s,e){const i={},a=pt(e),o=a?Object.keys(e):e,c=pt(s)?a?u=>ht(s[u],s[e[u]]):u=>s[u]:()=>s;for(const u of o)i[u]=p_(c(u));return i}function A0(s){return ff(s,{top:"y",right:"x",bottom:"y",left:"x"})}function zs(s){return ff(s,["topLeft","topRight","bottomLeft","bottomRight"])}function Le(s){const e=A0(s);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function re(s,e){s=s||{},e=e||Gt.font;let i=ht(s.size,e.size);typeof i=="string"&&(i=parseInt(i,10));let a=ht(s.style,e.style);a&&!(""+a).match(g_)&&(console.warn('Invalid font style specified: "'+a+'"'),a=void 0);const o={family:ht(s.family,e.family),lineHeight:m_(ht(s.lineHeight,e.lineHeight),i),size:i,style:a,weight:ht(s.weight,e.weight),string:""};return o.string=o_(o),o}function Ut(s,e,i,a){let o,c,u;for(o=0,c=s.length;o<c;++o)if(u=s[o],u!==void 0&&(e!==void 0&&typeof u=="function"&&(u=u(e)),i!==void 0&&Kt(u)&&(u=u[i%u.length]),u!==void 0))return u}function y_(s,e,i){const{min:a,max:o}=s,c=p0(e,(o-a)/2),u=(f,d)=>i&&f===0?0:f+d;return{min:u(a,-Math.abs(c)),max:u(o,c)}}function Xi(s,e){return Object.assign(Object.create(s),e)}function hf(s,e=[""],i,a,o=()=>s[0]){const c=i||s;typeof a>"u"&&(a=z0("_fallback",s));const u={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:s,_rootScopes:c,_fallback:a,_getTarget:o,override:f=>hf([f,...s],e,c,a)};return new Proxy(u,{deleteProperty(f,d){return delete f[d],delete f._keys,delete s[0][d],!0},get(f,d){return C0(f,d,()=>E_(d,e,s,f))},getOwnPropertyDescriptor(f,d){return Reflect.getOwnPropertyDescriptor(f._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(s[0])},has(f,d){return Wm(f).includes(d)},ownKeys(f){return Wm(f)},set(f,d,m){const p=f._storage||(f._storage=o());return f[d]=p[d]=m,delete f._keys,!0}})}function Rs(s,e,i,a){const o={_cacheable:!1,_proxy:s,_context:e,_subProxy:i,_stack:new Set,_descriptors:O0(s,a),setContext:c=>Rs(s,c,i,a),override:c=>Rs(s.override(c),e,i,a)};return new Proxy(o,{deleteProperty(c,u){return delete c[u],delete s[u],!0},get(c,u,f){return C0(c,u,()=>v_(c,u,f))},getOwnPropertyDescriptor(c,u){return c._descriptors.allKeys?Reflect.has(s,u)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,u)},getPrototypeOf(){return Reflect.getPrototypeOf(s)},has(c,u){return Reflect.has(s,u)},ownKeys(){return Reflect.ownKeys(s)},set(c,u,f){return s[u]=f,delete c[u],!0}})}function O0(s,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:a=e.indexable,_allKeys:o=e.allKeys}=s;return{allKeys:o,scriptable:i,indexable:a,isScriptable:hi(i)?i:()=>i,isIndexable:hi(a)?a:()=>a}}const b_=(s,e)=>s?s+lf(e):e,df=(s,e)=>pt(e)&&s!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function C0(s,e,i){if(Object.prototype.hasOwnProperty.call(s,e)||e==="constructor")return s[e];const a=i();return s[e]=a,a}function v_(s,e,i){const{_proxy:a,_context:o,_subProxy:c,_descriptors:u}=s;let f=a[e];return hi(f)&&u.isScriptable(e)&&(f=x_(e,f,s,i)),Kt(f)&&f.length&&(f=__(e,f,s,u.isIndexable)),df(e,f)&&(f=Rs(f,o,c&&c[e],u)),f}function x_(s,e,i,a){const{_proxy:o,_context:c,_subProxy:u,_stack:f}=i;if(f.has(s))throw new Error("Recursion detected: "+Array.from(f).join("->")+"->"+s);f.add(s);let d=e(c,u||a);return f.delete(s),df(s,d)&&(d=gf(o._scopes,o,s,d)),d}function __(s,e,i,a){const{_proxy:o,_context:c,_subProxy:u,_descriptors:f}=i;if(typeof c.index<"u"&&a(s))return e[c.index%e.length];if(pt(e[0])){const d=e,m=o._scopes.filter(p=>p!==d);e=[];for(const p of d){const b=gf(m,o,s,p);e.push(Rs(b,c,u&&u[s],f))}}return e}function D0(s,e,i){return hi(s)?s(e,i):s}const S_=(s,e)=>s===!0?e:typeof s=="string"?Yi(e,s):void 0;function T_(s,e,i,a,o){for(const c of e){const u=S_(i,c);if(u){s.add(u);const f=D0(u._fallback,i,o);if(typeof f<"u"&&f!==i&&f!==a)return f}else if(u===!1&&typeof a<"u"&&i!==a)return null}return!1}function gf(s,e,i,a){const o=e._rootScopes,c=D0(e._fallback,i,a),u=[...s,...o],f=new Set;f.add(a);let d=Km(f,u,i,c||i,a);return d===null||typeof c<"u"&&c!==i&&(d=Km(f,u,c,d,a),d===null)?!1:hf(Array.from(f),[""],o,c,()=>M_(e,i,a))}function Km(s,e,i,a,o){for(;i;)i=T_(s,e,i,a,o);return i}function M_(s,e,i){const a=s._getTarget();e in a||(a[e]={});const o=a[e];return Kt(o)&&pt(i)?i:o||{}}function E_(s,e,i,a){let o;for(const c of e)if(o=z0(b_(c,s),i),typeof o<"u")return df(s,o)?gf(i,a,s,o):o}function z0(s,e){for(const i of e){if(!i)continue;const a=i[s];if(typeof a<"u")return a}}function Wm(s){let e=s._keys;return e||(e=s._keys=A_(s._scopes)),e}function A_(s){const e=new Set;for(const i of s)for(const a of Object.keys(i).filter(o=>!o.startsWith("_")))e.add(a);return Array.from(e)}const O_=Number.EPSILON||1e-14,Ns=(s,e)=>e<s.length&&!s[e].skip&&s[e],w0=s=>s==="x"?"y":"x";function C_(s,e,i,a){const o=s.skip?e:s,c=e,u=i.skip?e:i,f=Fu(c,o),d=Fu(u,c);let m=f/(f+d),p=d/(f+d);m=isNaN(m)?0:m,p=isNaN(p)?0:p;const b=a*m,v=a*p;return{previous:{x:c.x-b*(u.x-o.x),y:c.y-b*(u.y-o.y)},next:{x:c.x+v*(u.x-o.x),y:c.y+v*(u.y-o.y)}}}function D_(s,e,i){const a=s.length;let o,c,u,f,d,m=Ns(s,0);for(let p=0;p<a-1;++p)if(d=m,m=Ns(s,p+1),!(!d||!m)){if(Ya(e[p],0,O_)){i[p]=i[p+1]=0;continue}o=i[p]/e[p],c=i[p+1]/e[p],f=Math.pow(o,2)+Math.pow(c,2),!(f<=9)&&(u=3/Math.sqrt(f),i[p]=o*u*e[p],i[p+1]=c*u*e[p])}}function z_(s,e,i="x"){const a=w0(i),o=s.length;let c,u,f,d=Ns(s,0);for(let m=0;m<o;++m){if(u=f,f=d,d=Ns(s,m+1),!f)continue;const p=f[i],b=f[a];u&&(c=(p-u[i])/3,f[`cp1${i}`]=p-c,f[`cp1${a}`]=b-c*e[m]),d&&(c=(d[i]-p)/3,f[`cp2${i}`]=p+c,f[`cp2${a}`]=b+c*e[m])}}function w_(s,e="x"){const i=w0(e),a=s.length,o=Array(a).fill(0),c=Array(a);let u,f,d,m=Ns(s,0);for(u=0;u<a;++u)if(f=d,d=m,m=Ns(s,u+1),!!d){if(m){const p=m[e]-d[e];o[u]=p!==0?(m[i]-d[i])/p:0}c[u]=f?m?on(o[u-1])!==on(o[u])?0:(o[u-1]+o[u])/2:o[u-1]:o[u]}D_(s,o,c),z_(s,c,e)}function Mo(s,e,i){return Math.max(Math.min(s,i),e)}function j_(s,e){let i,a,o,c,u,f=Ja(s[0],e);for(i=0,a=s.length;i<a;++i)u=c,c=f,f=i<a-1&&Ja(s[i+1],e),c&&(o=s[i],u&&(o.cp1x=Mo(o.cp1x,e.left,e.right),o.cp1y=Mo(o.cp1y,e.top,e.bottom)),f&&(o.cp2x=Mo(o.cp2x,e.left,e.right),o.cp2y=Mo(o.cp2y,e.top,e.bottom)))}function R_(s,e,i,a,o){let c,u,f,d;if(e.spanGaps&&(s=s.filter(m=>!m.skip)),e.cubicInterpolationMode==="monotone")w_(s,o);else{let m=a?s[s.length-1]:s[0];for(c=0,u=s.length;c<u;++c)f=s[c],d=C_(m,f,s[Math.min(c+1,u-(a?0:1))%u],e.tension),f.cp1x=d.previous.x,f.cp1y=d.previous.y,f.cp2x=d.next.x,f.cp2y=d.next.y,m=f}e.capBezierPoints&&j_(s,i)}function mf(){return typeof window<"u"&&typeof document<"u"}function pf(s){let e=s.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Xo(s,e,i){let a;return typeof s=="string"?(a=parseInt(s,10),s.indexOf("%")!==-1&&(a=a/100*e.parentNode[i])):a=s,a}const Ko=s=>s.ownerDocument.defaultView.getComputedStyle(s,null);function N_(s,e){return Ko(s).getPropertyValue(e)}const k_=["top","right","bottom","left"];function Vi(s,e,i){const a={};i=i?"-"+i:"";for(let o=0;o<4;o++){const c=k_[o];a[c]=parseFloat(s[e+"-"+c+i])||0}return a.width=a.left+a.right,a.height=a.top+a.bottom,a}const L_=(s,e,i)=>(s>0||e>0)&&(!i||!i.shadowRoot);function H_(s,e){const i=s.touches,a=i&&i.length?i[0]:s,{offsetX:o,offsetY:c}=a;let u=!1,f,d;if(L_(o,c,s.target))f=o,d=c;else{const m=e.getBoundingClientRect();f=a.clientX-m.left,d=a.clientY-m.top,u=!0}return{x:f,y:d,box:u}}function Hi(s,e){if("native"in s)return s;const{canvas:i,currentDevicePixelRatio:a}=e,o=Ko(i),c=o.boxSizing==="border-box",u=Vi(o,"padding"),f=Vi(o,"border","width"),{x:d,y:m,box:p}=H_(s,i),b=u.left+(p&&f.left),v=u.top+(p&&f.top);let{width:S,height:T}=e;return c&&(S-=u.width+f.width,T-=u.height+f.height),{x:Math.round((d-b)/S*i.width/a),y:Math.round((m-v)/T*i.height/a)}}function B_(s,e,i){let a,o;if(e===void 0||i===void 0){const c=s&&pf(s);if(!c)e=s.clientWidth,i=s.clientHeight;else{const u=c.getBoundingClientRect(),f=Ko(c),d=Vi(f,"border","width"),m=Vi(f,"padding");e=u.width-m.width-d.width,i=u.height-m.height-d.height,a=Xo(f.maxWidth,c,"clientWidth"),o=Xo(f.maxHeight,c,"clientHeight")}}return{width:e,height:i,maxWidth:a||Yo,maxHeight:o||Yo}}const ri=s=>Math.round(s*10)/10;function U_(s,e,i,a){const o=Ko(s),c=Vi(o,"margin"),u=Xo(o.maxWidth,s,"clientWidth")||Yo,f=Xo(o.maxHeight,s,"clientHeight")||Yo,d=B_(s,e,i);let{width:m,height:p}=d;if(o.boxSizing==="content-box"){const v=Vi(o,"border","width"),S=Vi(o,"padding");m-=S.width+v.width,p-=S.height+v.height}return m=Math.max(0,m-c.width),p=Math.max(0,a?m/a:p-c.height),m=ri(Math.min(m,u,d.maxWidth)),p=ri(Math.min(p,f,d.maxHeight)),m&&!p&&(p=ri(m/2)),(e!==void 0||i!==void 0)&&a&&d.height&&p>d.height&&(p=d.height,m=ri(Math.floor(p*a))),{width:m,height:p}}function Jm(s,e,i){const a=e||1,o=ri(s.height*a),c=ri(s.width*a);s.height=ri(s.height),s.width=ri(s.width);const u=s.canvas;return u.style&&(i||!u.style.height&&!u.style.width)&&(u.style.height=`${s.height}px`,u.style.width=`${s.width}px`),s.currentDevicePixelRatio!==a||u.height!==o||u.width!==c?(s.currentDevicePixelRatio=a,u.height=o,u.width=c,s.ctx.setTransform(a,0,0,a,0,0),!0):!1}const V_=(function(){let s=!1;try{const e={get passive(){return s=!0,!1}};mf()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return s})();function Im(s,e){const i=N_(s,e),a=i&&i.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}function Bi(s,e,i,a){return{x:s.x+i*(e.x-s.x),y:s.y+i*(e.y-s.y)}}function Y_(s,e,i,a){return{x:s.x+i*(e.x-s.x),y:a==="middle"?i<.5?s.y:e.y:a==="after"?i<1?s.y:e.y:i>0?e.y:s.y}}function q_(s,e,i,a){const o={x:s.cp2x,y:s.cp2y},c={x:e.cp1x,y:e.cp1y},u=Bi(s,o,i),f=Bi(o,c,i),d=Bi(c,e,i),m=Bi(u,f,i),p=Bi(f,d,i);return Bi(m,p,i)}const X_=function(s,e){return{x(i){return s+s+e-i},setWidth(i){e=i},textAlign(i){return i==="center"?i:i==="right"?"left":"right"},xPlus(i,a){return i-a},leftForLtr(i,a){return i-a}}},G_=function(){return{x(s){return s},setWidth(s){},textAlign(s){return s},xPlus(s,e){return s+e},leftForLtr(s,e){return s}}};function ws(s,e,i){return s?X_(e,i):G_()}function j0(s,e){let i,a;(e==="ltr"||e==="rtl")&&(i=s.canvas.style,a=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),s.prevTextDirection=a)}function R0(s,e){e!==void 0&&(delete s.prevTextDirection,s.canvas.style.setProperty("direction",e[0],e[1]))}function N0(s){return s==="angle"?{between:Wa,compare:Xx,normalize:ke}:{between:Rn,compare:(e,i)=>e-i,normalize:e=>e}}function Pm({start:s,end:e,count:i,loop:a,style:o}){return{start:s%i,end:e%i,loop:a&&(e-s+1)%i===0,style:o}}function Q_(s,e,i){const{property:a,start:o,end:c}=i,{between:u,normalize:f}=N0(a),d=e.length;let{start:m,end:p,loop:b}=s,v,S;if(b){for(m+=d,p+=d,v=0,S=d;v<S&&u(f(e[m%d][a]),o,c);++v)m--,p--;m%=d,p%=d}return p<m&&(p+=d),{start:m,end:p,loop:b,style:s.style}}function k0(s,e,i){if(!i)return[s];const{property:a,start:o,end:c}=i,u=e.length,{compare:f,between:d,normalize:m}=N0(a),{start:p,end:b,loop:v,style:S}=Q_(s,e,i),T=[];let M=!1,A=null,D,L,q;const G=()=>d(o,q,D)&&f(o,q)!==0,Y=()=>f(c,D)===0||d(c,q,D),W=()=>M||G(),X=()=>!M||Y();for(let F=p,tt=p;F<=b;++F)L=e[F%u],!L.skip&&(D=m(L[a]),D!==q&&(M=d(D,o,c),A===null&&W()&&(A=f(D,o)===0?F:tt),A!==null&&X()&&(T.push(Pm({start:A,end:F,loop:v,count:u,style:S})),A=null),tt=F,q=D));return A!==null&&T.push(Pm({start:A,end:b,loop:v,count:u,style:S})),T}function L0(s,e){const i=[],a=s.segments;for(let o=0;o<a.length;o++){const c=k0(a[o],s.points,e);c.length&&i.push(...c)}return i}function Z_(s,e,i,a){let o=0,c=e-1;if(i&&!a)for(;o<e&&!s[o].skip;)o++;for(;o<e&&s[o].skip;)o++;for(o%=e,i&&(c+=o);c>o&&s[c%e].skip;)c--;return c%=e,{start:o,end:c}}function F_(s,e,i,a){const o=s.length,c=[];let u=e,f=s[e],d;for(d=e+1;d<=i;++d){const m=s[d%o];m.skip||m.stop?f.skip||(a=!1,c.push({start:e%o,end:(d-1)%o,loop:a}),e=u=m.stop?d:null):(u=d,f.skip&&(e=d)),f=m}return u!==null&&c.push({start:e%o,end:u%o,loop:a}),c}function K_(s,e){const i=s.points,a=s.options.spanGaps,o=i.length;if(!o)return[];const c=!!s._loop,{start:u,end:f}=Z_(i,o,c,a);if(a===!0)return $m(s,[{start:u,end:f,loop:c}],i,e);const d=f<u?f+o:f,m=!!s._fullLoop&&u===0&&f===o-1;return $m(s,F_(i,u,d,m),i,e)}function $m(s,e,i,a){return!a||!a.setContext||!i?e:W_(s,e,i,a)}function W_(s,e,i,a){const o=s._chart.getContext(),c=tp(s.options),{_datasetIndex:u,options:{spanGaps:f}}=s,d=i.length,m=[];let p=c,b=e[0].start,v=b;function S(T,M,A,D){const L=f?-1:1;if(T!==M){for(T+=d;i[T%d].skip;)T-=L;for(;i[M%d].skip;)M+=L;T%d!==M%d&&(m.push({start:T%d,end:M%d,loop:A,style:D}),p=D,b=M%d)}}for(const T of e){b=f?b:T.start;let M=i[b%d],A;for(v=b+1;v<=T.end;v++){const D=i[v%d];A=tp(a.setContext(Xi(o,{type:"segment",p0:M,p1:D,p0DataIndex:(v-1)%d,p1DataIndex:v%d,datasetIndex:u}))),J_(A,p)&&S(b,v-1,T.loop,p),M=D,p=A}b<v-1&&S(b,v-1,T.loop,p)}return m}function tp(s){return{backgroundColor:s.backgroundColor,borderCapStyle:s.borderCapStyle,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderJoinStyle:s.borderJoinStyle,borderWidth:s.borderWidth,borderColor:s.borderColor}}function J_(s,e){if(!e)return!1;const i=[],a=function(o,c){return cf(c)?(i.includes(c)||i.push(c),i.indexOf(c)):c};return JSON.stringify(s,a)!==JSON.stringify(e,a)}function Eo(s,e,i){return s.options.clip?s[i]:e[i]}function I_(s,e){const{xScale:i,yScale:a}=s;return i&&a?{left:Eo(i,e,"left"),right:Eo(i,e,"right"),top:Eo(a,e,"top"),bottom:Eo(a,e,"bottom")}:e}function H0(s,e){const i=e._clip;if(i.disabled)return!1;const a=I_(e,s.chartArea);return{left:i.left===!1?0:a.left-(i.left===!0?0:i.left),right:i.right===!1?s.width:a.right+(i.right===!0?0:i.right),top:i.top===!1?0:a.top-(i.top===!0?0:i.top),bottom:i.bottom===!1?s.height:a.bottom+(i.bottom===!0?0:i.bottom)}}class P_{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,i,a,o){const c=i.listeners[o],u=i.duration;c.forEach(f=>f({chart:e,initial:i.initial,numSteps:u,currentStep:Math.min(a-i.start,u)}))}_refresh(){this._request||(this._running=!0,this._request=S0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let i=0;this._charts.forEach((a,o)=>{if(!a.running||!a.items.length)return;const c=a.items;let u=c.length-1,f=!1,d;for(;u>=0;--u)d=c[u],d._active?(d._total>a.duration&&(a.duration=d._total),d.tick(e),f=!0):(c[u]=c[c.length-1],c.pop());f&&(o.draw(),this._notify(o,a,e,"progress")),c.length||(a.running=!1,this._notify(o,a,e,"complete"),a.initial=!1),i+=c.length}),this._lastDate=e,i===0&&(this._running=!1)}_getAnims(e){const i=this._charts;let a=i.get(e);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},i.set(e,a)),a}listen(e,i,a){this._getAnims(e).listeners[i].push(a)}add(e,i){!i||!i.length||this._getAnims(e).items.push(...i)}has(e){return this._getAnims(e).items.length>0}start(e){const i=this._charts.get(e);i&&(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce((a,o)=>Math.max(a,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;const i=this._charts.get(e);return!(!i||!i.running||!i.items.length)}stop(e){const i=this._charts.get(e);if(!i||!i.items.length)return;const a=i.items;let o=a.length-1;for(;o>=0;--o)a[o].cancel();i.items=[],this._notify(e,i,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Cn=new P_;const ep="transparent",$_={boolean(s,e,i){return i>.5?e:s},color(s,e,i){const a=Gm(s||ep),o=a.valid&&Gm(e||ep);return o&&o.valid?o.mix(a,i).hexString():e},number(s,e,i){return s+(e-s)*i}};class t1{constructor(e,i,a,o){const c=i[a];o=Ut([e.to,o,c,e.from]);const u=Ut([e.from,c,o]);this._active=!0,this._fn=e.fn||$_[e.type||typeof u],this._easing=qa[e.easing]||qa.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=i,this._prop=a,this._from=u,this._to=o,this._promises=void 0}active(){return this._active}update(e,i,a){if(this._active){this._notify(!1);const o=this._target[this._prop],c=a-this._start,u=this._duration-c;this._start=a,this._duration=Math.floor(Math.max(u,e.duration)),this._total+=c,this._loop=!!e.loop,this._to=Ut([e.to,i,o,e.from]),this._from=Ut([e.from,o,i])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const i=e-this._start,a=this._duration,o=this._prop,c=this._from,u=this._loop,f=this._to;let d;if(this._active=c!==f&&(u||i<a),!this._active){this._target[o]=f,this._notify(!0);return}if(i<0){this._target[o]=c;return}d=i/a%2,d=u&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[o]=this._fn(c,f,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((i,a)=>{e.push({res:i,rej:a})})}_notify(e){const i=e?"res":"rej",a=this._promises||[];for(let o=0;o<a.length;o++)a[o][i]()}}class B0{constructor(e,i){this._chart=e,this._properties=new Map,this.configure(i)}configure(e){if(!pt(e))return;const i=Object.keys(Gt.animation),a=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{const c=e[o];if(!pt(c))return;const u={};for(const f of i)u[f]=c[f];(Kt(c.properties)&&c.properties||[o]).forEach(f=>{(f===o||!a.has(f))&&a.set(f,u)})})}_animateOptions(e,i){const a=i.options,o=n1(e,a);if(!o)return[];const c=this._createAnimations(o,a);return a.$shared&&e1(e.options.$animations,a).then(()=>{e.options=a},()=>{}),c}_createAnimations(e,i){const a=this._properties,o=[],c=e.$animations||(e.$animations={}),u=Object.keys(i),f=Date.now();let d;for(d=u.length-1;d>=0;--d){const m=u[d];if(m.charAt(0)==="$")continue;if(m==="options"){o.push(...this._animateOptions(e,i));continue}const p=i[m];let b=c[m];const v=a.get(m);if(b)if(v&&b.active()){b.update(v,p,f);continue}else b.cancel();if(!v||!v.duration){e[m]=p;continue}c[m]=b=new t1(v,e,m,p),o.push(b)}return o}update(e,i){if(this._properties.size===0){Object.assign(e,i);return}const a=this._createAnimations(e,i);if(a.length)return Cn.add(this._chart,a),!0}}function e1(s,e){const i=[],a=Object.keys(e);for(let o=0;o<a.length;o++){const c=s[a[o]];c&&c.active()&&i.push(c.wait())}return Promise.all(i)}function n1(s,e){if(!e)return;let i=s.options;if(!i){s.options=e;return}return i.$shared&&(s.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}function np(s,e){const i=s&&s.options||{},a=i.reverse,o=i.min===void 0?e:0,c=i.max===void 0?e:0;return{start:a?c:o,end:a?o:c}}function i1(s,e,i){if(i===!1)return!1;const a=np(s,i),o=np(e,i);return{top:o.end,right:a.end,bottom:o.start,left:a.start}}function s1(s){let e,i,a,o;return pt(s)?(e=s.top,i=s.right,a=s.bottom,o=s.left):e=i=a=o=s,{top:e,right:i,bottom:a,left:o,disabled:s===!1}}function U0(s,e){const i=[],a=s._getSortedDatasetMetas(e);let o,c;for(o=0,c=a.length;o<c;++o)i.push(a[o].index);return i}function ip(s,e,i,a={}){const o=s.keys,c=a.mode==="single";let u,f,d,m;if(e===null)return;let p=!1;for(u=0,f=o.length;u<f;++u){if(d=+o[u],d===i){if(p=!0,a.all)continue;break}m=s.values[d],he(m)&&(c||e===0||on(e)===on(m))&&(e+=m)}return!p&&!a.all?0:e}function a1(s,e){const{iScale:i,vScale:a}=e,o=i.axis==="x"?"x":"y",c=a.axis==="x"?"x":"y",u=Object.keys(s),f=new Array(u.length);let d,m,p;for(d=0,m=u.length;d<m;++d)p=u[d],f[d]={[o]:p,[c]:s[p]};return f}function Cu(s,e){const i=s&&s.options.stacked;return i||i===void 0&&e.stack!==void 0}function l1(s,e,i){return`${s.id}.${e.id}.${i.stack||i.type}`}function o1(s){const{min:e,max:i,minDefined:a,maxDefined:o}=s.getUserBounds();return{min:a?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}function r1(s,e,i){const a=s[e]||(s[e]={});return a[i]||(a[i]={})}function sp(s,e,i,a){for(const o of e.getMatchingVisibleMetas(a).reverse()){const c=s[o.index];if(i&&c>0||!i&&c<0)return o.index}return null}function ap(s,e){const{chart:i,_cachedMeta:a}=s,o=i._stacks||(i._stacks={}),{iScale:c,vScale:u,index:f}=a,d=c.axis,m=u.axis,p=l1(c,u,a),b=e.length;let v;for(let S=0;S<b;++S){const T=e[S],{[d]:M,[m]:A}=T,D=T._stacks||(T._stacks={});v=D[m]=r1(o,p,M),v[f]=A,v._top=sp(v,u,!0,a.type),v._bottom=sp(v,u,!1,a.type);const L=v._visualValues||(v._visualValues={});L[f]=A}}function Du(s,e){const i=s.scales;return Object.keys(i).filter(a=>i[a].axis===e).shift()}function c1(s,e){return Xi(s,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function u1(s,e,i){return Xi(s,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}function wa(s,e){const i=s.controller.index,a=s.vScale&&s.vScale.axis;if(a){e=e||s._parsed;for(const o of e){const c=o._stacks;if(!c||c[a]===void 0||c[a][i]===void 0)return;delete c[a][i],c[a]._visualValues!==void 0&&c[a]._visualValues[i]!==void 0&&delete c[a]._visualValues[i]}}}const zu=s=>s==="reset"||s==="none",lp=(s,e)=>e?s:Object.assign({},s),f1=(s,e,i)=>s&&!e.hidden&&e._stacked&&{keys:U0(i,!0),values:null};class Wo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,i){this.chart=e,this._ctx=e.ctx,this.index=i,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Cu(e.vScale,e),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(e){this.index!==e&&wa(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,i=this._cachedMeta,a=this.getDataset(),o=(b,v,S,T)=>b==="x"?v:b==="r"?T:S,c=i.xAxisID=ht(a.xAxisID,Du(e,"x")),u=i.yAxisID=ht(a.yAxisID,Du(e,"y")),f=i.rAxisID=ht(a.rAxisID,Du(e,"r")),d=i.indexAxis,m=i.iAxisID=o(d,c,u,f),p=i.vAxisID=o(d,u,c,f);i.xScale=this.getScaleForId(c),i.yScale=this.getScaleForId(u),i.rScale=this.getScaleForId(f),i.iScale=this.getScaleForId(m),i.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const i=this._cachedMeta;return e===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ym(this._data,this),e._stacked&&wa(e)}_dataCheck(){const e=this.getDataset(),i=e.data||(e.data=[]),a=this._data;if(pt(i)){const o=this._cachedMeta;this._data=a1(i,o)}else if(a!==i){if(a){Ym(a,this);const o=this._cachedMeta;wa(o),o._parsed=[]}i&&Object.isExtensible(i)&&Fx(i,this),this._syncList=[],this._data=i}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const i=this._cachedMeta,a=this.getDataset();let o=!1;this._dataCheck();const c=i._stacked;i._stacked=Cu(i.vScale,i),i.stack!==a.stack&&(o=!0,wa(i),i.stack=a.stack),this._resyncElements(e),(o||c!==i._stacked)&&(ap(this,i._parsed),i._stacked=Cu(i.vScale,i))}configure(){const e=this.chart.config,i=e.datasetScopeKeys(this._type),a=e.getOptionScopes(this.getDataset(),i,!0);this.options=e.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,i){const{_cachedMeta:a,_data:o}=this,{iScale:c,_stacked:u}=a,f=c.axis;let d=e===0&&i===o.length?!0:a._sorted,m=e>0&&a._parsed[e-1],p,b,v;if(this._parsing===!1)a._parsed=o,a._sorted=!0,v=o;else{Kt(o[e])?v=this.parseArrayData(a,o,e,i):pt(o[e])?v=this.parseObjectData(a,o,e,i):v=this.parsePrimitiveData(a,o,e,i);const S=()=>b[f]===null||m&&b[f]<m[f];for(p=0;p<i;++p)a._parsed[p+e]=b=v[p],d&&(S()&&(d=!1),m=b);a._sorted=d}u&&ap(this,v)}parsePrimitiveData(e,i,a,o){const{iScale:c,vScale:u}=e,f=c.axis,d=u.axis,m=c.getLabels(),p=c===u,b=new Array(o);let v,S,T;for(v=0,S=o;v<S;++v)T=v+a,b[v]={[f]:p||c.parse(m[T],T),[d]:u.parse(i[T],T)};return b}parseArrayData(e,i,a,o){const{xScale:c,yScale:u}=e,f=new Array(o);let d,m,p,b;for(d=0,m=o;d<m;++d)p=d+a,b=i[p],f[d]={x:c.parse(b[0],p),y:u.parse(b[1],p)};return f}parseObjectData(e,i,a,o){const{xScale:c,yScale:u}=e,{xAxisKey:f="x",yAxisKey:d="y"}=this._parsing,m=new Array(o);let p,b,v,S;for(p=0,b=o;p<b;++p)v=p+a,S=i[v],m[p]={x:c.parse(Yi(S,f),v),y:u.parse(Yi(S,d),v)};return m}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,i,a){const o=this.chart,c=this._cachedMeta,u=i[e.axis],f={keys:U0(o,!0),values:i._stacks[e.axis]._visualValues};return ip(f,u,c.index,{mode:a})}updateRangeFromParsed(e,i,a,o){const c=a[i.axis];let u=c===null?NaN:c;const f=o&&a._stacks[i.axis];o&&f&&(o.values=f,u=ip(o,c,this._cachedMeta.index)),e.min=Math.min(e.min,u),e.max=Math.max(e.max,u)}getMinMax(e,i){const a=this._cachedMeta,o=a._parsed,c=a._sorted&&e===a.iScale,u=o.length,f=this._getOtherScale(e),d=f1(i,a,this.chart),m={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:b}=o1(f);let v,S;function T(){S=o[v];const M=S[f.axis];return!he(S[e.axis])||p>M||b<M}for(v=0;v<u&&!(!T()&&(this.updateRangeFromParsed(m,e,S,d),c));++v);if(c){for(v=u-1;v>=0;--v)if(!T()){this.updateRangeFromParsed(m,e,S,d);break}}return m}getAllParsedValues(e){const i=this._cachedMeta._parsed,a=[];let o,c,u;for(o=0,c=i.length;o<c;++o)u=i[o][e.axis],he(u)&&a.push(u);return a}getMaxOverflow(){return!1}getLabelAndValue(e){const i=this._cachedMeta,a=i.iScale,o=i.vScale,c=this.getParsed(e);return{label:a?""+a.getLabelForValue(c[a.axis]):"",value:o?""+o.getLabelForValue(c[o.axis]):""}}_update(e){const i=this._cachedMeta;this.update(e||"default"),i._clip=s1(ht(this.options.clip,i1(i.xScale,i.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,i=this.chart,a=this._cachedMeta,o=a.data||[],c=i.chartArea,u=[],f=this._drawStart||0,d=this._drawCount||o.length-f,m=this.options.drawActiveElementsOnTop;let p;for(a.dataset&&a.dataset.draw(e,c,f,d),p=f;p<f+d;++p){const b=o[p];b.hidden||(b.active&&m?u.push(b):b.draw(e,c))}for(p=0;p<u.length;++p)u[p].draw(e,c)}getStyle(e,i){const a=i?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(a):this.resolveDataElementOptions(e||0,a)}getContext(e,i,a){const o=this.getDataset();let c;if(e>=0&&e<this._cachedMeta.data.length){const u=this._cachedMeta.data[e];c=u.$context||(u.$context=u1(this.getContext(),e,u)),c.parsed=this.getParsed(e),c.raw=o.data[e],c.index=c.dataIndex=e}else c=this.$context||(this.$context=c1(this.chart.getContext(),this.index)),c.dataset=o,c.index=c.datasetIndex=this.index;return c.active=!!i,c.mode=a,c}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,i){return this._resolveElementOptions(this.dataElementType.id,i,e)}_resolveElementOptions(e,i="default",a){const o=i==="active",c=this._cachedDataOpts,u=e+"-"+i,f=c[u],d=this.enableOptionSharing&&Fa(a);if(f)return lp(f,d);const m=this.chart.config,p=m.datasetElementScopeKeys(this._type,e),b=o?[`${e}Hover`,"hover",e,""]:[e,""],v=m.getOptionScopes(this.getDataset(),p),S=Object.keys(Gt.elements[e]),T=()=>this.getContext(a,o,i),M=m.resolveNamedOptions(v,S,T,b);return M.$shared&&(M.$shared=d,c[u]=Object.freeze(lp(M,d))),M}_resolveAnimations(e,i,a){const o=this.chart,c=this._cachedDataOpts,u=`animation-${i}`,f=c[u];if(f)return f;let d;if(o.options.animation!==!1){const p=this.chart.config,b=p.datasetAnimationScopeKeys(this._type,i),v=p.getOptionScopes(this.getDataset(),b);d=p.createResolver(v,this.getContext(e,a,i))}const m=new B0(o,d&&d.animations);return d&&d._cacheable&&(c[u]=Object.freeze(m)),m}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,i){return!i||zu(e)||this.chart._animationsDisabled}_getSharedOptions(e,i){const a=this.resolveDataElementOptions(e,i),o=this._sharedOptions,c=this.getSharedOptions(a),u=this.includeOptions(i,c)||c!==o;return this.updateSharedOptions(c,i,a),{sharedOptions:c,includeOptions:u}}updateElement(e,i,a,o){zu(o)?Object.assign(e,a):this._resolveAnimations(i,o).update(e,a)}updateSharedOptions(e,i,a){e&&!zu(i)&&this._resolveAnimations(void 0,i).update(e,a)}_setStyle(e,i,a,o){e.active=o;const c=this.getStyle(i,o);this._resolveAnimations(i,a,o).update(e,{options:!o&&this.getSharedOptions(c)||c})}removeHoverStyle(e,i,a){this._setStyle(e,a,"active",!1)}setHoverStyle(e,i,a){this._setStyle(e,a,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const i=this._data,a=this._cachedMeta.data;for(const[f,d,m]of this._syncList)this[f](d,m);this._syncList=[];const o=a.length,c=i.length,u=Math.min(c,o);u&&this.parse(0,u),c>o?this._insertElements(o,c-o,e):c<o&&this._removeElements(c,o-c)}_insertElements(e,i,a=!0){const o=this._cachedMeta,c=o.data,u=e+i;let f;const d=m=>{for(m.length+=i,f=m.length-1;f>=u;f--)m[f]=m[f-i]};for(d(c),f=e;f<u;++f)c[f]=new this.dataElementType;this._parsing&&d(o._parsed),this.parse(e,i),a&&this.updateElements(c,e,i,"reset")}updateElements(e,i,a,o){}_removeElements(e,i){const a=this._cachedMeta;if(this._parsing){const o=a._parsed.splice(e,i);a._stacked&&wa(a,o)}a.data.splice(e,i)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[i,a,o]=e;this[i](a,o)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,i){i&&this._sync(["_removeElements",e,i]);const a=arguments.length-2;a&&this._sync(["_insertElements",e,a])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function h1(s,e){if(!s._cache.$bar){const i=s.getMatchingVisibleMetas(e);let a=[];for(let o=0,c=i.length;o<c;o++)a=a.concat(i[o].controller.getAllParsedValues(s));s._cache.$bar=_0(a.sort((o,c)=>o-c))}return s._cache.$bar}function d1(s){const e=s.iScale,i=h1(e,s.type);let a=e._length,o,c,u,f;const d=()=>{u===32767||u===-32768||(Fa(f)&&(a=Math.min(a,Math.abs(u-f)||a)),f=u)};for(o=0,c=i.length;o<c;++o)u=e.getPixelForValue(i[o]),d();for(f=void 0,o=0,c=e.ticks.length;o<c;++o)u=e.getPixelForTick(o),d();return a}function g1(s,e,i,a){const o=i.barThickness;let c,u;return xt(o)?(c=e.min*i.categoryPercentage,u=i.barPercentage):(c=o*a,u=1),{chunk:c/a,ratio:u,start:e.pixels[s]-c/2}}function m1(s,e,i,a){const o=e.pixels,c=o[s];let u=s>0?o[s-1]:null,f=s<o.length-1?o[s+1]:null;const d=i.categoryPercentage;u===null&&(u=c-(f===null?e.end-e.start:f-c)),f===null&&(f=c+c-u);const m=c-(c-Math.min(u,f))/2*d;return{chunk:Math.abs(f-u)/2*d/a,ratio:i.barPercentage,start:m}}function p1(s,e,i,a){const o=i.parse(s[0],a),c=i.parse(s[1],a),u=Math.min(o,c),f=Math.max(o,c);let d=u,m=f;Math.abs(u)>Math.abs(f)&&(d=f,m=u),e[i.axis]=m,e._custom={barStart:d,barEnd:m,start:o,end:c,min:u,max:f}}function V0(s,e,i,a){return Kt(s)?p1(s,e,i,a):e[i.axis]=i.parse(s,a),e}function op(s,e,i,a){const o=s.iScale,c=s.vScale,u=o.getLabels(),f=o===c,d=[];let m,p,b,v;for(m=i,p=i+a;m<p;++m)v=e[m],b={},b[o.axis]=f||o.parse(u[m],m),d.push(V0(v,b,c,m));return d}function wu(s){return s&&s.barStart!==void 0&&s.barEnd!==void 0}function y1(s,e,i){return s!==0?on(s):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}function b1(s){let e,i,a,o,c;return s.horizontal?(e=s.base>s.x,i="left",a="right"):(e=s.base<s.y,i="bottom",a="top"),e?(o="end",c="start"):(o="start",c="end"),{start:i,end:a,reverse:e,top:o,bottom:c}}function v1(s,e,i,a){let o=e.borderSkipped;const c={};if(!o){s.borderSkipped=c;return}if(o===!0){s.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:u,end:f,reverse:d,top:m,bottom:p}=b1(s);o==="middle"&&i&&(s.enableBorderRadius=!0,(i._top||0)===a?o=m:(i._bottom||0)===a?o=p:(c[rp(p,u,f,d)]=!0,o=m)),c[rp(o,u,f,d)]=!0,s.borderSkipped=c}function rp(s,e,i,a){return a?(s=x1(s,e,i),s=cp(s,i,e)):s=cp(s,e,i),s}function x1(s,e,i){return s===e?i:s===i?e:s}function cp(s,e,i){return s==="start"?e:s==="end"?i:s}function _1(s,{inflateAmount:e},i){s.inflateAmount=e==="auto"?i===1?.33:0:e}class S1 extends Wo{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,i,a,o){return op(e,i,a,o)}parseArrayData(e,i,a,o){return op(e,i,a,o)}parseObjectData(e,i,a,o){const{iScale:c,vScale:u}=e,{xAxisKey:f="x",yAxisKey:d="y"}=this._parsing,m=c.axis==="x"?f:d,p=u.axis==="x"?f:d,b=[];let v,S,T,M;for(v=a,S=a+o;v<S;++v)M=i[v],T={},T[c.axis]=c.parse(Yi(M,m),v),b.push(V0(Yi(M,p),T,u,v));return b}updateRangeFromParsed(e,i,a,o){super.updateRangeFromParsed(e,i,a,o);const c=a._custom;c&&i===this._cachedMeta.vScale&&(e.min=Math.min(e.min,c.min),e.max=Math.max(e.max,c.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const i=this._cachedMeta,{iScale:a,vScale:o}=i,c=this.getParsed(e),u=c._custom,f=wu(u)?"["+u.start+", "+u.end+"]":""+o.getLabelForValue(c[o.axis]);return{label:""+a.getLabelForValue(c[a.axis]),value:f}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const i=this._cachedMeta;this.updateElements(i.data,0,i.data.length,e)}updateElements(e,i,a,o){const c=o==="reset",{index:u,_cachedMeta:{vScale:f}}=this,d=f.getBasePixel(),m=f.isHorizontal(),p=this._getRuler(),{sharedOptions:b,includeOptions:v}=this._getSharedOptions(i,o);for(let S=i;S<i+a;S++){const T=this.getParsed(S),M=c||xt(T[f.axis])?{base:d,head:d}:this._calculateBarValuePixels(S),A=this._calculateBarIndexPixels(S,p),D=(T._stacks||{})[f.axis],L={horizontal:m,base:M.base,enableBorderRadius:!D||wu(T._custom)||u===D._top||u===D._bottom,x:m?M.head:A.center,y:m?A.center:M.head,height:m?A.size:Math.abs(M.size),width:m?Math.abs(M.size):A.size};v&&(L.options=b||this.resolveDataElementOptions(S,e[S].active?"active":o));const q=L.options||e[S].options;v1(L,q,D,u),_1(L,q,p.ratio),this.updateElement(e[S],S,L,o)}}_getStacks(e,i){const{iScale:a}=this._cachedMeta,o=a.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),c=a.options.stacked,u=[],f=this._cachedMeta.controller.getParsed(i),d=f&&f[a.axis],m=p=>{const b=p._parsed.find(S=>S[a.axis]===d),v=b&&b[p.vScale.axis];if(xt(v)||isNaN(v))return!0};for(const p of o)if(!(i!==void 0&&m(p))&&((c===!1||u.indexOf(p.stack)===-1||c===void 0&&p.stack===void 0)&&u.push(p.stack),p.index===e))break;return u.length||u.push(void 0),u}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,i=this.chart.options.indexAxis;return Object.keys(e).filter(a=>e[a].axis===i).shift()}_getAxis(){const e={},i=this.getFirstScaleIdForIndexAxis();for(const a of this.chart.data.datasets)e[ht(this.chart.options.indexAxis==="x"?a.xAxisID:a.yAxisID,i)]=!0;return Object.keys(e)}_getStackIndex(e,i,a){const o=this._getStacks(e,a),c=i!==void 0?o.indexOf(i):-1;return c===-1?o.length-1:c}_getRuler(){const e=this.options,i=this._cachedMeta,a=i.iScale,o=[];let c,u;for(c=0,u=i.data.length;c<u;++c)o.push(a.getPixelForValue(this.getParsed(c)[a.axis],c));const f=e.barThickness;return{min:f||d1(i),pixels:o,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:e.grouped,ratio:f?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:i,_stacked:a,index:o},options:{base:c,minBarLength:u}}=this,f=c||0,d=this.getParsed(e),m=d._custom,p=wu(m);let b=d[i.axis],v=0,S=a?this.applyStack(i,d,a):b,T,M;S!==b&&(v=S-b,S=b),p&&(b=m.barStart,S=m.barEnd-m.barStart,b!==0&&on(b)!==on(m.barEnd)&&(v=0),v+=b);const A=!xt(c)&&!p?c:v;let D=i.getPixelForValue(A);if(this.chart.getDataVisibility(e)?T=i.getPixelForValue(v+S):T=D,M=T-D,Math.abs(M)<u){M=y1(M,i,f)*u,b===f&&(D-=M/2);const L=i.getPixelForDecimal(0),q=i.getPixelForDecimal(1),G=Math.min(L,q),Y=Math.max(L,q);D=Math.max(Math.min(D,Y),G),T=D+M,a&&!p&&(d._stacks[i.axis]._visualValues[o]=i.getValueForPixel(T)-i.getValueForPixel(D))}if(D===i.getPixelForValue(f)){const L=on(M)*i.getLineWidthForValue(f)/2;D+=L,M-=L}return{size:M,base:D,head:T,center:T+M/2}}_calculateBarIndexPixels(e,i){const a=i.scale,o=this.options,c=o.skipNull,u=ht(o.maxBarThickness,1/0);let f,d;const m=this._getAxisCount();if(i.grouped){const p=c?this._getStackCount(e):i.stackCount,b=o.barThickness==="flex"?m1(e,i,o,p*m):g1(e,i,o,p*m),v=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,S=this._getAxis().indexOf(ht(v,this.getFirstScaleIdForIndexAxis())),T=this._getStackIndex(this.index,this._cachedMeta.stack,c?e:void 0)+S;f=b.start+b.chunk*T+b.chunk/2,d=Math.min(u,b.chunk*b.ratio)}else f=a.getPixelForValue(this.getParsed(e)[a.axis],e),d=Math.min(u,i.min*i.ratio);return{base:f-d/2,head:f+d/2,center:f,size:d}}draw(){const e=this._cachedMeta,i=e.vScale,a=e.data,o=a.length;let c=0;for(;c<o;++c)this.getParsed(c)[i.axis]!==null&&!a[c].hidden&&a[c].draw(this._ctx)}}function T1(s,e,i){let a=1,o=1,c=0,u=0;if(e<Yt){const f=s,d=f+e,m=Math.cos(f),p=Math.sin(f),b=Math.cos(d),v=Math.sin(d),S=(q,G,Y)=>Wa(q,f,d,!0)?1:Math.max(G,G*i,Y,Y*i),T=(q,G,Y)=>Wa(q,f,d,!0)?-1:Math.min(G,G*i,Y,Y*i),M=S(0,m,b),A=S(te,p,v),D=T(Dt,m,b),L=T(Dt+te,p,v);a=(M-D)/2,o=(A-L)/2,c=-(M+D)/2,u=-(A+L)/2}return{ratioX:a,ratioY:o,offsetX:c,offsetY:u}}class M1 extends Wo{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const i=e.data,{labels:{pointStyle:a,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=e.legend.options;return i.labels.length&&i.datasets.length?i.labels.map((d,m)=>{const b=e.getDatasetMeta(0).controller.getStyle(m);return{text:d,fillStyle:b.backgroundColor,fontColor:c,hidden:!e.getDataVisibility(m),lineDash:b.borderDash,lineDashOffset:b.borderDashOffset,lineJoin:b.borderJoinStyle,lineWidth:b.borderWidth,strokeStyle:b.borderColor,textAlign:o,pointStyle:a,borderRadius:u&&(f||b.borderRadius),index:m}}):[]}},onClick(e,i,a){a.chart.toggleDataVisibility(i.index),a.chart.update()}}}};constructor(e,i){super(e,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,i){const a=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=a;else{let c=d=>+a[d];if(pt(a[e])){const{key:d="value"}=this._parsing;c=m=>+Yi(a[m],d)}let u,f;for(u=e,f=e+i;u<f;++u)o._parsed[u]=c(u)}}_getRotation(){return jn(this.options.rotation-90)}_getCircumference(){return jn(this.options.circumference)}_getRotationExtents(){let e=Yt,i=-Yt;for(let a=0;a<this.chart.data.datasets.length;++a)if(this.chart.isDatasetVisible(a)&&this.chart.getDatasetMeta(a).type===this._type){const o=this.chart.getDatasetMeta(a).controller,c=o._getRotation(),u=o._getCircumference();e=Math.min(e,c),i=Math.max(i,c+u)}return{rotation:e,circumference:i-e}}update(e){const i=this.chart,{chartArea:a}=i,o=this._cachedMeta,c=o.data,u=this.getMaxBorderWidth()+this.getMaxOffset(c)+this.options.spacing,f=Math.max((Math.min(a.width,a.height)-u)/2,0),d=Math.min(zx(this.options.cutout,f),1),m=this._getRingWeight(this.index),{circumference:p,rotation:b}=this._getRotationExtents(),{ratioX:v,ratioY:S,offsetX:T,offsetY:M}=T1(b,p,d),A=(a.width-u)/v,D=(a.height-u)/S,L=Math.max(Math.min(A,D)/2,0),q=p0(this.options.radius,L),G=Math.max(q*d,0),Y=(q-G)/this._getVisibleDatasetWeightTotal();this.offsetX=T*q,this.offsetY=M*q,o.total=this.calculateTotal(),this.outerRadius=q-Y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-Y*m,0),this.updateElements(c,0,c.length,e)}_circumference(e,i){const a=this.options,o=this._cachedMeta,c=this._getCircumference();return i&&a.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*c/Yt)}updateElements(e,i,a,o){const c=o==="reset",u=this.chart,f=u.chartArea,m=u.options.animation,p=(f.left+f.right)/2,b=(f.top+f.bottom)/2,v=c&&m.animateScale,S=v?0:this.innerRadius,T=v?0:this.outerRadius,{sharedOptions:M,includeOptions:A}=this._getSharedOptions(i,o);let D=this._getRotation(),L;for(L=0;L<i;++L)D+=this._circumference(L,c);for(L=i;L<i+a;++L){const q=this._circumference(L,c),G=e[L],Y={x:p+this.offsetX,y:b+this.offsetY,startAngle:D,endAngle:D+q,circumference:q,outerRadius:T,innerRadius:S};A&&(Y.options=M||this.resolveDataElementOptions(L,G.active?"active":o)),D+=q,this.updateElement(G,L,Y,o)}}calculateTotal(){const e=this._cachedMeta,i=e.data;let a=0,o;for(o=0;o<i.length;o++){const c=e._parsed[o];c!==null&&!isNaN(c)&&this.chart.getDataVisibility(o)&&!i[o].hidden&&(a+=Math.abs(c))}return a}calculateCircumference(e){const i=this._cachedMeta.total;return i>0&&!isNaN(e)?Yt*(Math.abs(e)/i):0}getLabelAndValue(e){const i=this._cachedMeta,a=this.chart,o=a.data.labels||[],c=uf(i._parsed[e],a.options.locale);return{label:o[e]||"",value:c}}getMaxBorderWidth(e){let i=0;const a=this.chart;let o,c,u,f,d;if(!e){for(o=0,c=a.data.datasets.length;o<c;++o)if(a.isDatasetVisible(o)){u=a.getDatasetMeta(o),e=u.data,f=u.controller;break}}if(!e)return 0;for(o=0,c=e.length;o<c;++o)d=f.resolveDataElementOptions(o),d.borderAlign!=="inner"&&(i=Math.max(i,d.borderWidth||0,d.hoverBorderWidth||0));return i}getMaxOffset(e){let i=0;for(let a=0,o=e.length;a<o;++a){const c=this.resolveDataElementOptions(a);i=Math.max(i,c.offset||0,c.hoverOffset||0)}return i}_getRingWeightOffset(e){let i=0;for(let a=0;a<e;++a)this.chart.isDatasetVisible(a)&&(i+=this._getRingWeight(a));return i}_getRingWeight(e){return Math.max(ht(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class E1 extends Wo{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const i=this._cachedMeta,{dataset:a,data:o=[],_dataset:c}=i,u=this.chart._animationsDisabled;let{start:f,count:d}=Jx(i,o,u);this._drawStart=f,this._drawCount=d,Ix(i)&&(f=0,d=o.length),a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!c._decimated,a.points=o;const m=this.resolveDatasetElementOptions(e);this.options.showLine||(m.borderWidth=0),m.segment=this.options.segment,this.updateElement(a,void 0,{animated:!u,options:m},e),this.updateElements(o,f,d,e)}updateElements(e,i,a,o){const c=o==="reset",{iScale:u,vScale:f,_stacked:d,_dataset:m}=this._cachedMeta,{sharedOptions:p,includeOptions:b}=this._getSharedOptions(i,o),v=u.axis,S=f.axis,{spanGaps:T,segment:M}=this.options,A=Ka(T)?T:Number.POSITIVE_INFINITY,D=this.chart._animationsDisabled||c||o==="none",L=i+a,q=e.length;let G=i>0&&this.getParsed(i-1);for(let Y=0;Y<q;++Y){const W=e[Y],X=D?W:{};if(Y<i||Y>=L){X.skip=!0;continue}const F=this.getParsed(Y),tt=xt(F[S]),rt=X[v]=u.getPixelForValue(F[v],Y),it=X[S]=c||tt?f.getBasePixel():f.getPixelForValue(d?this.applyStack(f,F,d):F[S],Y);X.skip=isNaN(rt)||isNaN(it)||tt,X.stop=Y>0&&Math.abs(F[v]-G[v])>A,M&&(X.parsed=F,X.raw=m.data[Y]),b&&(X.options=p||this.resolveDataElementOptions(Y,W.active?"active":o)),D||this.updateElement(W,Y,X,o),G=F}}getMaxOverflow(){const e=this._cachedMeta,i=e.dataset,a=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return a;const c=o[0].size(this.resolveDataElementOptions(0)),u=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(a,c,u)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class A1 extends M1{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function Li(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class yf{static override(e){Object.assign(yf.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return Li()}parse(){return Li()}format(){return Li()}add(){return Li()}diff(){return Li()}startOf(){return Li()}endOf(){return Li()}}var O1={_date:yf};function C1(s,e,i,a){const{controller:o,data:c,_sorted:u}=s,f=o._cachedMeta.iScale,d=s.dataset&&s.dataset.options?s.dataset.options.spanGaps:null;if(f&&e===f.axis&&e!=="r"&&u&&c.length){const m=f._reversePixels?Qx:Ui;if(a){if(o._sharedOptions){const p=c[0],b=typeof p.getRange=="function"&&p.getRange(e);if(b){const v=m(c,e,i-b),S=m(c,e,i+b);return{lo:v.lo,hi:S.hi}}}}else{const p=m(c,e,i);if(d){const{vScale:b}=o._cachedMeta,{_parsed:v}=s,S=v.slice(0,p.lo+1).reverse().findIndex(M=>!xt(M[b.axis]));p.lo-=Math.max(0,S);const T=v.slice(p.hi).findIndex(M=>!xt(M[b.axis]));p.hi+=Math.max(0,T)}return p}}return{lo:0,hi:c.length-1}}function Jo(s,e,i,a,o){const c=s.getSortedVisibleDatasetMetas(),u=i[e];for(let f=0,d=c.length;f<d;++f){const{index:m,data:p}=c[f],{lo:b,hi:v}=C1(c[f],e,u,o);for(let S=b;S<=v;++S){const T=p[S];T.skip||a(T,m,S)}}}function D1(s){const e=s.indexOf("x")!==-1,i=s.indexOf("y")!==-1;return function(a,o){const c=e?Math.abs(a.x-o.x):0,u=i?Math.abs(a.y-o.y):0;return Math.sqrt(Math.pow(c,2)+Math.pow(u,2))}}function ju(s,e,i,a,o){const c=[];return!o&&!s.isPointInArea(e)||Jo(s,i,e,function(f,d,m){!o&&!Ja(f,s.chartArea,0)||f.inRange(e.x,e.y,a)&&c.push({element:f,datasetIndex:d,index:m})},!0),c}function z1(s,e,i,a){let o=[];function c(u,f,d){const{startAngle:m,endAngle:p}=u.getProps(["startAngle","endAngle"],a),{angle:b}=v0(u,{x:e.x,y:e.y});Wa(b,m,p)&&o.push({element:u,datasetIndex:f,index:d})}return Jo(s,i,e,c),o}function w1(s,e,i,a,o,c){let u=[];const f=D1(i);let d=Number.POSITIVE_INFINITY;function m(p,b,v){const S=p.inRange(e.x,e.y,o);if(a&&!S)return;const T=p.getCenterPoint(o);if(!(!!c||s.isPointInArea(T))&&!S)return;const A=f(e,T);A<d?(u=[{element:p,datasetIndex:b,index:v}],d=A):A===d&&u.push({element:p,datasetIndex:b,index:v})}return Jo(s,i,e,m),u}function Ru(s,e,i,a,o,c){return!c&&!s.isPointInArea(e)?[]:i==="r"&&!a?z1(s,e,i,o):w1(s,e,i,a,o,c)}function up(s,e,i,a,o){const c=[],u=i==="x"?"inXRange":"inYRange";let f=!1;return Jo(s,i,e,(d,m,p)=>{d[u]&&d[u](e[i],o)&&(c.push({element:d,datasetIndex:m,index:p}),f=f||d.inRange(e.x,e.y,o))}),a&&!f?[]:c}var j1={modes:{index(s,e,i,a){const o=Hi(e,s),c=i.axis||"x",u=i.includeInvisible||!1,f=i.intersect?ju(s,o,c,a,u):Ru(s,o,c,!1,a,u),d=[];return f.length?(s.getSortedVisibleDatasetMetas().forEach(m=>{const p=f[0].index,b=m.data[p];b&&!b.skip&&d.push({element:b,datasetIndex:m.index,index:p})}),d):[]},dataset(s,e,i,a){const o=Hi(e,s),c=i.axis||"xy",u=i.includeInvisible||!1;let f=i.intersect?ju(s,o,c,a,u):Ru(s,o,c,!1,a,u);if(f.length>0){const d=f[0].datasetIndex,m=s.getDatasetMeta(d).data;f=[];for(let p=0;p<m.length;++p)f.push({element:m[p],datasetIndex:d,index:p})}return f},point(s,e,i,a){const o=Hi(e,s),c=i.axis||"xy",u=i.includeInvisible||!1;return ju(s,o,c,a,u)},nearest(s,e,i,a){const o=Hi(e,s),c=i.axis||"xy",u=i.includeInvisible||!1;return Ru(s,o,c,i.intersect,a,u)},x(s,e,i,a){const o=Hi(e,s);return up(s,o,"x",i.intersect,a)},y(s,e,i,a){const o=Hi(e,s);return up(s,o,"y",i.intersect,a)}}};const Y0=["left","top","right","bottom"];function ja(s,e){return s.filter(i=>i.pos===e)}function fp(s,e){return s.filter(i=>Y0.indexOf(i.pos)===-1&&i.box.axis===e)}function Ra(s,e){return s.sort((i,a)=>{const o=e?a:i,c=e?i:a;return o.weight===c.weight?o.index-c.index:o.weight-c.weight})}function R1(s){const e=[];let i,a,o,c,u,f;for(i=0,a=(s||[]).length;i<a;++i)o=s[i],{position:c,options:{stack:u,stackWeight:f=1}}=o,e.push({index:i,box:o,pos:c,horizontal:o.isHorizontal(),weight:o.weight,stack:u&&c+u,stackWeight:f});return e}function N1(s){const e={};for(const i of s){const{stack:a,pos:o,stackWeight:c}=i;if(!a||!Y0.includes(o))continue;const u=e[a]||(e[a]={count:0,placed:0,weight:0,size:0});u.count++,u.weight+=c}return e}function k1(s,e){const i=N1(s),{vBoxMaxWidth:a,hBoxMaxHeight:o}=e;let c,u,f;for(c=0,u=s.length;c<u;++c){f=s[c];const{fullSize:d}=f.box,m=i[f.stack],p=m&&f.stackWeight/m.weight;f.horizontal?(f.width=p?p*a:d&&e.availableWidth,f.height=o):(f.width=a,f.height=p?p*o:d&&e.availableHeight)}return i}function L1(s){const e=R1(s),i=Ra(e.filter(m=>m.box.fullSize),!0),a=Ra(ja(e,"left"),!0),o=Ra(ja(e,"right")),c=Ra(ja(e,"top"),!0),u=Ra(ja(e,"bottom")),f=fp(e,"x"),d=fp(e,"y");return{fullSize:i,leftAndTop:a.concat(c),rightAndBottom:o.concat(d).concat(u).concat(f),chartArea:ja(e,"chartArea"),vertical:a.concat(o).concat(d),horizontal:c.concat(u).concat(f)}}function hp(s,e,i,a){return Math.max(s[i],e[i])+Math.max(s[a],e[a])}function q0(s,e){s.top=Math.max(s.top,e.top),s.left=Math.max(s.left,e.left),s.bottom=Math.max(s.bottom,e.bottom),s.right=Math.max(s.right,e.right)}function H1(s,e,i,a){const{pos:o,box:c}=i,u=s.maxPadding;if(!pt(o)){i.size&&(s[o]-=i.size);const b=a[i.stack]||{size:0,count:1};b.size=Math.max(b.size,i.horizontal?c.height:c.width),i.size=b.size/b.count,s[o]+=i.size}c.getPadding&&q0(u,c.getPadding());const f=Math.max(0,e.outerWidth-hp(u,s,"left","right")),d=Math.max(0,e.outerHeight-hp(u,s,"top","bottom")),m=f!==s.w,p=d!==s.h;return s.w=f,s.h=d,i.horizontal?{same:m,other:p}:{same:p,other:m}}function B1(s){const e=s.maxPadding;function i(a){const o=Math.max(e[a]-s[a],0);return s[a]+=o,o}s.y+=i("top"),s.x+=i("left"),i("right"),i("bottom")}function U1(s,e){const i=e.maxPadding;function a(o){const c={left:0,top:0,right:0,bottom:0};return o.forEach(u=>{c[u]=Math.max(e[u],i[u])}),c}return a(s?["left","right"]:["top","bottom"])}function Ba(s,e,i,a){const o=[];let c,u,f,d,m,p;for(c=0,u=s.length,m=0;c<u;++c){f=s[c],d=f.box,d.update(f.width||e.w,f.height||e.h,U1(f.horizontal,e));const{same:b,other:v}=H1(e,i,f,a);m|=b&&o.length,p=p||v,d.fullSize||o.push(f)}return m&&Ba(o,e,i,a)||p}function Ao(s,e,i,a,o){s.top=i,s.left=e,s.right=e+a,s.bottom=i+o,s.width=a,s.height=o}function dp(s,e,i,a){const o=i.padding;let{x:c,y:u}=e;for(const f of s){const d=f.box,m=a[f.stack]||{placed:0,weight:1},p=f.stackWeight/m.weight||1;if(f.horizontal){const b=e.w*p,v=m.size||d.height;Fa(m.start)&&(u=m.start),d.fullSize?Ao(d,o.left,u,i.outerWidth-o.right-o.left,v):Ao(d,e.left+m.placed,u,b,v),m.start=u,m.placed+=b,u=d.bottom}else{const b=e.h*p,v=m.size||d.width;Fa(m.start)&&(c=m.start),d.fullSize?Ao(d,c,o.top,v,i.outerHeight-o.bottom-o.top):Ao(d,c,e.top+m.placed,v,b),m.start=c,m.placed+=b,c=d.right}}e.x=c,e.y=u}var Ke={addBox(s,e){s.boxes||(s.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(i){e.draw(i)}}]},s.boxes.push(e)},removeBox(s,e){const i=s.boxes?s.boxes.indexOf(e):-1;i!==-1&&s.boxes.splice(i,1)},configure(s,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(s,e,i,a){if(!s)return;const o=Le(s.options.layout.padding),c=Math.max(e-o.width,0),u=Math.max(i-o.height,0),f=L1(s.boxes),d=f.vertical,m=f.horizontal;At(s.boxes,M=>{typeof M.beforeLayout=="function"&&M.beforeLayout()});const p=d.reduce((M,A)=>A.box.options&&A.box.options.display===!1?M:M+1,0)||1,b=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:c,availableHeight:u,vBoxMaxWidth:c/2/p,hBoxMaxHeight:u/2}),v=Object.assign({},o);q0(v,Le(a));const S=Object.assign({maxPadding:v,w:c,h:u,x:o.left,y:o.top},o),T=k1(d.concat(m),b);Ba(f.fullSize,S,b,T),Ba(d,S,b,T),Ba(m,S,b,T)&&Ba(d,S,b,T),B1(S),dp(f.leftAndTop,S,b,T),S.x+=S.w,S.y+=S.h,dp(f.rightAndBottom,S,b,T),s.chartArea={left:S.left,top:S.top,right:S.left+S.w,bottom:S.top+S.h,height:S.h,width:S.w},At(f.chartArea,M=>{const A=M.box;Object.assign(A,s.chartArea),A.update(S.w,S.h,{left:0,top:0,right:0,bottom:0})})}};class X0{acquireContext(e,i){}releaseContext(e){return!1}addEventListener(e,i,a){}removeEventListener(e,i,a){}getDevicePixelRatio(){return 1}getMaximumSize(e,i,a,o){return i=Math.max(0,i||e.width),a=a||e.height,{width:i,height:Math.max(0,o?Math.floor(i/o):a)}}isAttached(e){return!0}updateConfig(e){}}class V1 extends X0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Ho="$chartjs",Y1={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},gp=s=>s===null||s==="";function q1(s,e){const i=s.style,a=s.getAttribute("height"),o=s.getAttribute("width");if(s[Ho]={initial:{height:a,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",gp(o)){const c=Im(s,"width");c!==void 0&&(s.width=c)}if(gp(a))if(s.style.height==="")s.height=s.width/(e||2);else{const c=Im(s,"height");c!==void 0&&(s.height=c)}return s}const G0=V_?{passive:!0}:!1;function X1(s,e,i){s&&s.addEventListener(e,i,G0)}function G1(s,e,i){s&&s.canvas&&s.canvas.removeEventListener(e,i,G0)}function Q1(s,e){const i=Y1[s.type]||s.type,{x:a,y:o}=Hi(s,e);return{type:i,chart:e,native:s,x:a!==void 0?a:null,y:o!==void 0?o:null}}function Go(s,e){for(const i of s)if(i===e||i.contains(e))return!0}function Z1(s,e,i){const a=s.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||Go(f.addedNodes,a),u=u&&!Go(f.removedNodes,a);u&&i()});return o.observe(document,{childList:!0,subtree:!0}),o}function F1(s,e,i){const a=s.canvas,o=new MutationObserver(c=>{let u=!1;for(const f of c)u=u||Go(f.removedNodes,a),u=u&&!Go(f.addedNodes,a);u&&i()});return o.observe(document,{childList:!0,subtree:!0}),o}const Pa=new Map;let mp=0;function Q0(){const s=window.devicePixelRatio;s!==mp&&(mp=s,Pa.forEach((e,i)=>{i.currentDevicePixelRatio!==s&&e()}))}function K1(s,e){Pa.size||window.addEventListener("resize",Q0),Pa.set(s,e)}function W1(s){Pa.delete(s),Pa.size||window.removeEventListener("resize",Q0)}function J1(s,e,i){const a=s.canvas,o=a&&pf(a);if(!o)return;const c=T0((f,d)=>{const m=o.clientWidth;i(f,d),m<o.clientWidth&&i()},window),u=new ResizeObserver(f=>{const d=f[0],m=d.contentRect.width,p=d.contentRect.height;m===0&&p===0||c(m,p)});return u.observe(o),K1(s,c),u}function Nu(s,e,i){i&&i.disconnect(),e==="resize"&&W1(s)}function I1(s,e,i){const a=s.canvas,o=T0(c=>{s.ctx!==null&&i(Q1(c,s))},s);return X1(a,e,o),o}class P1 extends X0{acquireContext(e,i){const a=e&&e.getContext&&e.getContext("2d");return a&&a.canvas===e?(q1(e,i),a):null}releaseContext(e){const i=e.canvas;if(!i[Ho])return!1;const a=i[Ho].initial;["height","width"].forEach(c=>{const u=a[c];xt(u)?i.removeAttribute(c):i.setAttribute(c,u)});const o=a.style||{};return Object.keys(o).forEach(c=>{i.style[c]=o[c]}),i.width=i.width,delete i[Ho],!0}addEventListener(e,i,a){this.removeEventListener(e,i);const o=e.$proxies||(e.$proxies={}),u={attach:Z1,detach:F1,resize:J1}[i]||I1;o[i]=u(e,i,a)}removeEventListener(e,i){const a=e.$proxies||(e.$proxies={}),o=a[i];if(!o)return;({attach:Nu,detach:Nu,resize:Nu}[i]||G1)(e,i,o),a[i]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,i,a,o){return U_(e,i,a,o)}isAttached(e){const i=e&&pf(e);return!!(i&&i.isConnected)}}function $1(s){return!mf()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?V1:P1}class kn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:i,y:a}=this.getProps(["x","y"],e);return{x:i,y:a}}hasValue(){return Ka(this.x)&&Ka(this.y)}getProps(e,i){const a=this.$animations;if(!i||!a)return this;const o={};return e.forEach(c=>{o[c]=a[c]&&a[c].active()?a[c]._to:this[c]}),o}}function tS(s,e){const i=s.options.ticks,a=eS(s),o=Math.min(i.maxTicksLimit||a,a),c=i.major.enabled?iS(e):[],u=c.length,f=c[0],d=c[u-1],m=[];if(u>o)return sS(e,m,c,u/o),m;const p=nS(c,e,o);if(u>0){let b,v;const S=u>1?Math.round((d-f)/(u-1)):null;for(Oo(e,m,p,xt(S)?0:f-S,f),b=0,v=u-1;b<v;b++)Oo(e,m,p,c[b],c[b+1]);return Oo(e,m,p,d,xt(S)?e.length:d+S),m}return Oo(e,m,p),m}function eS(s){const e=s.options.offset,i=s._tickSize(),a=s._length/i+(e?0:1),o=s._maxLength/i;return Math.floor(Math.min(a,o))}function nS(s,e,i){const a=aS(s),o=e.length/i;if(!a)return Math.max(o,1);const c=Bx(a);for(let u=0,f=c.length-1;u<f;u++){const d=c[u];if(d>o)return d}return Math.max(o,1)}function iS(s){const e=[];let i,a;for(i=0,a=s.length;i<a;i++)s[i].major&&e.push(i);return e}function sS(s,e,i,a){let o=0,c=i[0],u;for(a=Math.ceil(a),u=0;u<s.length;u++)u===c&&(e.push(s[u]),o++,c=i[o*a])}function Oo(s,e,i,a,o){const c=ht(a,0),u=Math.min(ht(o,s.length),s.length);let f=0,d,m,p;for(i=Math.ceil(i),o&&(d=o-a,i=d/Math.floor(d/i)),p=c;p<0;)f++,p=Math.round(c+f*i);for(m=Math.max(c,0);m<u;m++)m===p&&(e.push(s[m]),f++,p=Math.round(c+f*i))}function aS(s){const e=s.length;let i,a;if(e<2)return!1;for(a=s[0],i=1;i<e;++i)if(s[i]-s[i-1]!==a)return!1;return a}const lS=s=>s==="left"?"right":s==="right"?"left":s,pp=(s,e,i)=>e==="top"||e==="left"?s[e]+i:s[e]-i,yp=(s,e)=>Math.min(e||s,s);function bp(s,e){const i=[],a=s.length/e,o=s.length;let c=0;for(;c<o;c+=a)i.push(s[Math.floor(c)]);return i}function oS(s,e,i){const a=s.ticks.length,o=Math.min(e,a-1),c=s._startPixel,u=s._endPixel,f=1e-6;let d=s.getPixelForTick(o),m;if(!(i&&(a===1?m=Math.max(d-c,u-d):e===0?m=(s.getPixelForTick(1)-d)/2:m=(d-s.getPixelForTick(o-1))/2,d+=o<e?m:-m,d<c-f||d>u+f)))return d}function rS(s,e){At(s,i=>{const a=i.gc,o=a.length/2;let c;if(o>e){for(c=0;c<o;++c)delete i.data[a[c]];a.splice(0,o)}})}function Na(s){return s.drawTicks?s.tickLength:0}function vp(s,e){if(!s.display)return 0;const i=re(s.font,e),a=Le(s.padding);return(Kt(s.text)?s.text.length:1)*i.lineHeight+a.height}function cS(s,e){return Xi(s,{scale:e,type:"scale"})}function uS(s,e,i){return Xi(s,{tick:i,index:e,type:"tick"})}function fS(s,e,i){let a=rf(s);return(i&&e!=="right"||!i&&e==="right")&&(a=lS(a)),a}function hS(s,e,i,a){const{top:o,left:c,bottom:u,right:f,chart:d}=s,{chartArea:m,scales:p}=d;let b=0,v,S,T;const M=u-o,A=f-c;if(s.isHorizontal()){if(S=ue(a,c,f),pt(i)){const D=Object.keys(i)[0],L=i[D];T=p[D].getPixelForValue(L)+M-e}else i==="center"?T=(m.bottom+m.top)/2+M-e:T=pp(s,i,e);v=f-c}else{if(pt(i)){const D=Object.keys(i)[0],L=i[D];S=p[D].getPixelForValue(L)-A+e}else i==="center"?S=(m.left+m.right)/2-A+e:S=pp(s,i,e);T=ue(a,u,o),b=i==="left"?-te:te}return{titleX:S,titleY:T,maxWidth:v,rotation:b}}class ks extends kn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,i){return e}getUserBounds(){let{_userMin:e,_userMax:i,_suggestedMin:a,_suggestedMax:o}=this;return e=sn(e,Number.POSITIVE_INFINITY),i=sn(i,Number.NEGATIVE_INFINITY),a=sn(a,Number.POSITIVE_INFINITY),o=sn(o,Number.NEGATIVE_INFINITY),{min:sn(e,a),max:sn(i,o),minDefined:he(e),maxDefined:he(i)}}getMinMax(e){let{min:i,max:a,minDefined:o,maxDefined:c}=this.getUserBounds(),u;if(o&&c)return{min:i,max:a};const f=this.getMatchingVisibleMetas();for(let d=0,m=f.length;d<m;++d)u=f[d].controller.getMinMax(this,e),o||(i=Math.min(i,u.min)),c||(a=Math.max(a,u.max));return i=c&&i>a?a:i,a=o&&i>a?i:a,{min:sn(i,sn(a,i)),max:sn(a,sn(i,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Nt(this.options.beforeUpdate,[this])}update(e,i,a){const{beginAtZero:o,grace:c,ticks:u}=this.options,f=u.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=i,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=y_(this,c,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=f<this.ticks.length;this._convertTicksToLabels(d?bp(this.ticks,f):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),u.display&&(u.autoSkip||u.source==="auto")&&(this.ticks=tS(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,i,a;this.isHorizontal()?(i=this.left,a=this.right):(i=this.top,a=this.bottom,e=!e),this._startPixel=i,this._endPixel=a,this._reversePixels=e,this._length=a-i,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Nt(this.options.afterUpdate,[this])}beforeSetDimensions(){Nt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Nt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Nt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Nt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const i=this.options.ticks;let a,o,c;for(a=0,o=e.length;a<o;a++)c=e[a],c.label=Nt(i.callback,[c.value,a,e],this)}afterTickToLabelConversion(){Nt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Nt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,i=e.ticks,a=yp(this.ticks.length,e.ticks.maxTicksLimit),o=i.minRotation||0,c=i.maxRotation;let u=o,f,d,m;if(!this._isVisible()||!i.display||o>=c||a<=1||!this.isHorizontal()){this.labelRotation=o;return}const p=this._getLabelSizes(),b=p.widest.width,v=p.highest.height,S=fe(this.chart.width-b,0,this.maxWidth);f=e.offset?this.maxWidth/a:S/(a-1),b+6>f&&(f=S/(a-(e.offset?.5:1)),d=this.maxHeight-Na(e.grid)-i.padding-vp(e.title,this.chart.options.font),m=Math.sqrt(b*b+v*v),u=qx(Math.min(Math.asin(fe((p.highest.height+6)/f,-1,1)),Math.asin(fe(d/m,-1,1))-Math.asin(fe(v/m,-1,1)))),u=Math.max(o,Math.min(c,u))),this.labelRotation=u}afterCalculateLabelRotation(){Nt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Nt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:i,options:{ticks:a,title:o,grid:c}}=this,u=this._isVisible(),f=this.isHorizontal();if(u){const d=vp(o,i.options.font);if(f?(e.width=this.maxWidth,e.height=Na(c)+d):(e.height=this.maxHeight,e.width=Na(c)+d),a.display&&this.ticks.length){const{first:m,last:p,widest:b,highest:v}=this._getLabelSizes(),S=a.padding*2,T=jn(this.labelRotation),M=Math.cos(T),A=Math.sin(T);if(f){const D=a.mirror?0:A*b.width+M*v.height;e.height=Math.min(this.maxHeight,e.height+D+S)}else{const D=a.mirror?0:M*b.width+A*v.height;e.width=Math.min(this.maxWidth,e.width+D+S)}this._calculatePadding(m,p,A,M)}}this._handleMargins(),f?(this.width=this._length=i.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=i.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,i,a,o){const{ticks:{align:c,padding:u},position:f}=this.options,d=this.labelRotation!==0,m=f!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,b=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,S=0;d?m?(v=o*e.width,S=a*i.height):(v=a*e.height,S=o*i.width):c==="start"?S=i.width:c==="end"?v=e.width:c!=="inner"&&(v=e.width/2,S=i.width/2),this.paddingLeft=Math.max((v-p+u)*this.width/(this.width-p),0),this.paddingRight=Math.max((S-b+u)*this.width/(this.width-b),0)}else{let p=i.height/2,b=e.height/2;c==="start"?(p=0,b=e.height):c==="end"&&(p=i.height,b=0),this.paddingTop=p+u,this.paddingBottom=b+u}}_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(){Nt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:i}=this.options;return i==="top"||i==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let i,a;for(i=0,a=e.length;i<a;i++)xt(e[i].label)&&(e.splice(i,1),a--,i--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const i=this.options.ticks.sampleSize;let a=this.ticks;i<a.length&&(a=bp(a,i)),this._labelSizes=e=this._computeLabelSizes(a,a.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,i,a){const{ctx:o,_longestTextCache:c}=this,u=[],f=[],d=Math.floor(i/yp(i,a));let m=0,p=0,b,v,S,T,M,A,D,L,q,G,Y;for(b=0;b<i;b+=d){if(T=e[b].label,M=this._resolveTickFontOptions(b),o.font=A=M.string,D=c[A]=c[A]||{data:{},gc:[]},L=M.lineHeight,q=G=0,!xt(T)&&!Kt(T))q=Zm(o,D.data,D.gc,q,T),G=L;else if(Kt(T))for(v=0,S=T.length;v<S;++v)Y=T[v],!xt(Y)&&!Kt(Y)&&(q=Zm(o,D.data,D.gc,q,Y),G+=L);u.push(q),f.push(G),m=Math.max(q,m),p=Math.max(G,p)}rS(c,i);const W=u.indexOf(m),X=f.indexOf(p),F=tt=>({width:u[tt]||0,height:f[tt]||0});return{first:F(0),last:F(i-1),widest:F(W),highest:F(X),widths:u,heights:f}}getLabelForValue(e){return e}getPixelForValue(e,i){return NaN}getValueForPixel(e){}getPixelForTick(e){const i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const i=this._startPixel+e*this._length;return Gx(this._alignToPixels?ki(this.chart,i,0):i)}getDecimalForPixel(e){const i=(e-this._startPixel)/this._length;return this._reversePixels?1-i:i}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:i}=this;return e<0&&i<0?i:e>0&&i>0?e:0}getContext(e){const i=this.ticks||[];if(e>=0&&e<i.length){const a=i[e];return a.$context||(a.$context=uS(this.getContext(),e,a))}return this.$context||(this.$context=cS(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,i=jn(this.labelRotation),a=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),c=this._getLabelSizes(),u=e.autoSkipPadding||0,f=c?c.widest.width+u:0,d=c?c.highest.height+u:0;return this.isHorizontal()?d*a>f*o?f/a:d/o:d*o<f*a?d/a:f/o}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const i=this.axis,a=this.chart,o=this.options,{grid:c,position:u,border:f}=o,d=c.offset,m=this.isHorizontal(),b=this.ticks.length+(d?1:0),v=Na(c),S=[],T=f.setContext(this.getContext()),M=T.display?T.width:0,A=M/2,D=function(N){return ki(a,N,M)};let L,q,G,Y,W,X,F,tt,rt,it,st,kt;if(u==="top")L=D(this.bottom),X=this.bottom-v,tt=L-A,it=D(e.top)+A,kt=e.bottom;else if(u==="bottom")L=D(this.top),it=e.top,kt=D(e.bottom)-A,X=L+A,tt=this.top+v;else if(u==="left")L=D(this.right),W=this.right-v,F=L-A,rt=D(e.left)+A,st=e.right;else if(u==="right")L=D(this.left),rt=e.left,st=D(e.right)-A,W=L+A,F=this.left+v;else if(i==="x"){if(u==="center")L=D((e.top+e.bottom)/2+.5);else if(pt(u)){const N=Object.keys(u)[0],Q=u[N];L=D(this.chart.scales[N].getPixelForValue(Q))}it=e.top,kt=e.bottom,X=L+A,tt=X+v}else if(i==="y"){if(u==="center")L=D((e.left+e.right)/2);else if(pt(u)){const N=Object.keys(u)[0],Q=u[N];L=D(this.chart.scales[N].getPixelForValue(Q))}W=L-A,F=W-v,rt=e.left,st=e.right}const Vt=ht(o.ticks.maxTicksLimit,b),dt=Math.max(1,Math.ceil(b/Vt));for(q=0;q<b;q+=dt){const N=this.getContext(q),Q=c.setContext(N),$=f.setContext(N),lt=Q.lineWidth,_t=Q.color,C=$.dash||[],U=$.dashOffset,K=Q.tickWidth,J=Q.tickColor,at=Q.tickBorderDash||[],ot=Q.tickBorderDashOffset;G=oS(this,q,d),G!==void 0&&(Y=ki(a,G,lt),m?W=F=rt=st=Y:X=tt=it=kt=Y,S.push({tx1:W,ty1:X,tx2:F,ty2:tt,x1:rt,y1:it,x2:st,y2:kt,width:lt,color:_t,borderDash:C,borderDashOffset:U,tickWidth:K,tickColor:J,tickBorderDash:at,tickBorderDashOffset:ot}))}return this._ticksLength=b,this._borderValue=L,S}_computeLabelItems(e){const i=this.axis,a=this.options,{position:o,ticks:c}=a,u=this.isHorizontal(),f=this.ticks,{align:d,crossAlign:m,padding:p,mirror:b}=c,v=Na(a.grid),S=v+p,T=b?-p:S,M=-jn(this.labelRotation),A=[];let D,L,q,G,Y,W,X,F,tt,rt,it,st,kt="middle";if(o==="top")W=this.bottom-T,X=this._getXAxisLabelAlignment();else if(o==="bottom")W=this.top+T,X=this._getXAxisLabelAlignment();else if(o==="left"){const dt=this._getYAxisLabelAlignment(v);X=dt.textAlign,Y=dt.x}else if(o==="right"){const dt=this._getYAxisLabelAlignment(v);X=dt.textAlign,Y=dt.x}else if(i==="x"){if(o==="center")W=(e.top+e.bottom)/2+S;else if(pt(o)){const dt=Object.keys(o)[0],N=o[dt];W=this.chart.scales[dt].getPixelForValue(N)+S}X=this._getXAxisLabelAlignment()}else if(i==="y"){if(o==="center")Y=(e.left+e.right)/2-S;else if(pt(o)){const dt=Object.keys(o)[0],N=o[dt];Y=this.chart.scales[dt].getPixelForValue(N)}X=this._getYAxisLabelAlignment(v).textAlign}i==="y"&&(d==="start"?kt="top":d==="end"&&(kt="bottom"));const Vt=this._getLabelSizes();for(D=0,L=f.length;D<L;++D){q=f[D],G=q.label;const dt=c.setContext(this.getContext(D));F=this.getPixelForTick(D)+c.labelOffset,tt=this._resolveTickFontOptions(D),rt=tt.lineHeight,it=Kt(G)?G.length:1;const N=it/2,Q=dt.color,$=dt.textStrokeColor,lt=dt.textStrokeWidth;let _t=X;u?(Y=F,X==="inner"&&(D===L-1?_t=this.options.reverse?"left":"right":D===0?_t=this.options.reverse?"right":"left":_t="center"),o==="top"?m==="near"||M!==0?st=-it*rt+rt/2:m==="center"?st=-Vt.highest.height/2-N*rt+rt:st=-Vt.highest.height+rt/2:m==="near"||M!==0?st=rt/2:m==="center"?st=Vt.highest.height/2-N*rt:st=Vt.highest.height-it*rt,b&&(st*=-1),M!==0&&!dt.showLabelBackdrop&&(Y+=rt/2*Math.sin(M))):(W=F,st=(1-it)*rt/2);let C;if(dt.showLabelBackdrop){const U=Le(dt.backdropPadding),K=Vt.heights[D],J=Vt.widths[D];let at=st-U.top,ot=0-U.left;switch(kt){case"middle":at-=K/2;break;case"bottom":at-=K;break}switch(X){case"center":ot-=J/2;break;case"right":ot-=J;break;case"inner":D===L-1?ot-=J:D>0&&(ot-=J/2);break}C={left:ot,top:at,width:J+U.width,height:K+U.height,color:dt.backdropColor}}A.push({label:G,font:tt,textOffset:st,options:{rotation:M,color:Q,strokeColor:$,strokeWidth:lt,textAlign:_t,textBaseline:kt,translation:[Y,W],backdrop:C}})}return A}_getXAxisLabelAlignment(){const{position:e,ticks:i}=this.options;if(-jn(this.labelRotation))return e==="top"?"left":"right";let o="center";return i.align==="start"?o="left":i.align==="end"?o="right":i.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:i,ticks:{crossAlign:a,mirror:o,padding:c}}=this.options,u=this._getLabelSizes(),f=e+c,d=u.widest.width;let m,p;return i==="left"?o?(p=this.right+c,a==="near"?m="left":a==="center"?(m="center",p+=d/2):(m="right",p+=d)):(p=this.right-f,a==="near"?m="right":a==="center"?(m="center",p-=d/2):(m="left",p=this.left)):i==="right"?o?(p=this.left+c,a==="near"?m="right":a==="center"?(m="center",p-=d/2):(m="left",p-=d)):(p=this.left+f,a==="near"?m="left":a==="center"?(m="center",p+=d/2):(m="right",p=this.right)):m="right",{textAlign:m,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,i=this.options.position;if(i==="left"||i==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(i==="top"||i==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:i},left:a,top:o,width:c,height:u}=this;i&&(e.save(),e.fillStyle=i,e.fillRect(a,o,c,u),e.restore())}getLineWidthForValue(e){const i=this.options.grid;if(!this._isVisible()||!i.display)return 0;const o=this.ticks.findIndex(c=>c.value===e);return o>=0?i.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){const i=this.options.grid,a=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let c,u;const f=(d,m,p)=>{!p.width||!p.color||(a.save(),a.lineWidth=p.width,a.strokeStyle=p.color,a.setLineDash(p.borderDash||[]),a.lineDashOffset=p.borderDashOffset,a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(m.x,m.y),a.stroke(),a.restore())};if(i.display)for(c=0,u=o.length;c<u;++c){const d=o[c];i.drawOnChartArea&&f({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),i.drawTicks&&f({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:i,options:{border:a,grid:o}}=this,c=a.setContext(this.getContext()),u=a.display?c.width:0;if(!u)return;const f=o.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let m,p,b,v;this.isHorizontal()?(m=ki(e,this.left,u)-u/2,p=ki(e,this.right,f)+f/2,b=v=d):(b=ki(e,this.top,u)-u/2,v=ki(e,this.bottom,f)+f/2,m=p=d),i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.beginPath(),i.moveTo(m,b),i.lineTo(p,v),i.stroke(),i.restore()}drawLabels(e){if(!this.options.ticks.display)return;const a=this.ctx,o=this._computeLabelArea();o&&Zo(a,o);const c=this.getLabelItems(e);for(const u of c){const f=u.options,d=u.font,m=u.label,p=u.textOffset;Ia(a,m,0,p,d,f)}o&&Fo(a)}drawTitle(){const{ctx:e,options:{position:i,title:a,reverse:o}}=this;if(!a.display)return;const c=re(a.font),u=Le(a.padding),f=a.align;let d=c.lineHeight/2;i==="bottom"||i==="center"||pt(i)?(d+=u.bottom,Kt(a.text)&&(d+=c.lineHeight*(a.text.length-1))):d+=u.top;const{titleX:m,titleY:p,maxWidth:b,rotation:v}=hS(this,d,i,f);Ia(e,a.text,0,0,c,{color:a.color,maxWidth:b,rotation:v,textAlign:fS(f,i,o),textBaseline:"middle",translation:[m,p]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,i=e.ticks&&e.ticks.z||0,a=ht(e.grid&&e.grid.z,-1),o=ht(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==ks.prototype.draw?[{z:i,draw:c=>{this.draw(c)}}]:[{z:a,draw:c=>{this.drawBackground(),this.drawGrid(c),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:i,draw:c=>{this.drawLabels(c)}}]}getMatchingVisibleMetas(e){const i=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",o=[];let c,u;for(c=0,u=i.length;c<u;++c){const f=i[c];f[a]===this.id&&(!e||f.type===e)&&o.push(f)}return o}_resolveTickFontOptions(e){const i=this.options.ticks.setContext(this.getContext(e));return re(i.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Co{constructor(e,i,a){this.type=e,this.scope=i,this.override=a,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const i=Object.getPrototypeOf(e);let a;mS(i)&&(a=this.register(i));const o=this.items,c=e.id,u=this.scope+"."+c;if(!c)throw new Error("class does not have id: "+e);return c in o||(o[c]=e,dS(e,u,a),this.override&&Gt.override(e.id,e.overrides)),u}get(e){return this.items[e]}unregister(e){const i=this.items,a=e.id,o=this.scope;a in i&&delete i[a],o&&a in Gt[o]&&(delete Gt[o][a],this.override&&delete qi[a])}}function dS(s,e,i){const a=rn(Object.create(null),[i?Gt.get(i):{},Gt.get(e),s.defaults]);Gt.set(e,a),s.defaultRoutes&&gS(e,s.defaultRoutes),s.descriptors&&Gt.describe(e,s.descriptors)}function gS(s,e){Object.keys(e).forEach(i=>{const a=i.split("."),o=a.pop(),c=[s].concat(a).join("."),u=e[i].split("."),f=u.pop(),d=u.join(".");Gt.route(c,o,d,f)})}function mS(s){return"id"in s&&"defaults"in s}class pS{constructor(){this.controllers=new Co(Wo,"datasets",!0),this.elements=new Co(kn,"elements"),this.plugins=new Co(Object,"plugins"),this.scales=new Co(ks,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,i,a){[...i].forEach(o=>{const c=a||this._getRegistryForType(o);a||c.isForType(o)||c===this.plugins&&o.id?this._exec(e,c,o):At(o,u=>{const f=a||this._getRegistryForType(u);this._exec(e,f,u)})})}_exec(e,i,a){const o=lf(e);Nt(a["before"+o],[],a),i[e](a),Nt(a["after"+o],[],a)}_getRegistryForType(e){for(let i=0;i<this._typedRegistries.length;i++){const a=this._typedRegistries[i];if(a.isForType(e))return a}return this.plugins}_get(e,i,a){const o=i.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+a+".");return o}}var ln=new pS;class yS{constructor(){this._init=void 0}notify(e,i,a,o){if(i==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const c=o?this._descriptors(e).filter(o):this._descriptors(e),u=this._notify(c,e,i,a);return i==="afterDestroy"&&(this._notify(c,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),u}_notify(e,i,a,o){o=o||{};for(const c of e){const u=c.plugin,f=u[a],d=[i,o,c.options];if(Nt(f,d,u)===!1&&o.cancelable)return!1}return!0}invalidate(){xt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const i=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),i}_createDescriptors(e,i){const a=e&&e.config,o=ht(a.options&&a.options.plugins,{}),c=bS(a);return o===!1&&!i?[]:xS(e,c,o,i)}_notifyStateChanges(e){const i=this._oldCache||[],a=this._cache,o=(c,u)=>c.filter(f=>!u.some(d=>f.plugin.id===d.plugin.id));this._notify(o(i,a),e,"stop"),this._notify(o(a,i),e,"start")}}function bS(s){const e={},i=[],a=Object.keys(ln.plugins.items);for(let c=0;c<a.length;c++)i.push(ln.getPlugin(a[c]));const o=s.plugins||[];for(let c=0;c<o.length;c++){const u=o[c];i.indexOf(u)===-1&&(i.push(u),e[u.id]=!0)}return{plugins:i,localIds:e}}function vS(s,e){return!e&&s===!1?null:s===!0?{}:s}function xS(s,{plugins:e,localIds:i},a,o){const c=[],u=s.getContext();for(const f of e){const d=f.id,m=vS(a[d],o);m!==null&&c.push({plugin:f,options:_S(s.config,{plugin:f,local:i[d]},m,u)})}return c}function _S(s,{plugin:e,local:i},a,o){const c=s.pluginScopeKeys(e),u=s.getOptionScopes(a,c);return i&&e.defaults&&u.push(e.defaults),s.createResolver(u,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ju(s,e){const i=Gt.datasets[s]||{};return((e.datasets||{})[s]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function SS(s,e){let i=s;return s==="_index_"?i=e:s==="_value_"&&(i=e==="x"?"y":"x"),i}function TS(s,e){return s===e?"_index_":"_value_"}function xp(s){if(s==="x"||s==="y"||s==="r")return s}function MS(s){if(s==="top"||s==="bottom")return"x";if(s==="left"||s==="right")return"y"}function Iu(s,...e){if(xp(s))return s;for(const i of e){const a=i.axis||MS(i.position)||s.length>1&&xp(s[0].toLowerCase());if(a)return a}throw new Error(`Cannot determine type of '${s}' axis. Please provide 'axis' or 'position' option.`)}function _p(s,e,i){if(i[e+"AxisID"]===s)return{axis:e}}function ES(s,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter(a=>a.xAxisID===s||a.yAxisID===s);if(i.length)return _p(s,"x",i[0])||_p(s,"y",i[0])}return{}}function AS(s,e){const i=qi[s.type]||{scales:{}},a=e.scales||{},o=Ju(s.type,e),c=Object.create(null);return Object.keys(a).forEach(u=>{const f=a[u];if(!pt(f))return console.error(`Invalid scale configuration for scale: ${u}`);if(f._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${u}`);const d=Iu(u,f,ES(u,s),Gt.scales[f.type]),m=TS(d,o),p=i.scales||{};c[u]=Va(Object.create(null),[{axis:d},f,p[d],p[m]])}),s.data.datasets.forEach(u=>{const f=u.type||s.type,d=u.indexAxis||Ju(f,e),p=(qi[f]||{}).scales||{};Object.keys(p).forEach(b=>{const v=SS(b,d),S=u[v+"AxisID"]||v;c[S]=c[S]||Object.create(null),Va(c[S],[{axis:v},a[S],p[b]])})}),Object.keys(c).forEach(u=>{const f=c[u];Va(f,[Gt.scales[f.type],Gt.scale])}),c}function Z0(s){const e=s.options||(s.options={});e.plugins=ht(e.plugins,{}),e.scales=AS(s,e)}function F0(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function OS(s){return s=s||{},s.data=F0(s.data),Z0(s),s}const Sp=new Map,K0=new Set;function Do(s,e){let i=Sp.get(s);return i||(i=e(),Sp.set(s,i),K0.add(i)),i}const ka=(s,e,i)=>{const a=Yi(e,i);a!==void 0&&s.add(a)};class CS{constructor(e){this._config=OS(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=F0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Z0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Do(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,i){return Do(`${e}.transition.${i}`,()=>[[`datasets.${e}.transitions.${i}`,`transitions.${i}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,i){return Do(`${e}-${i}`,()=>[[`datasets.${e}.elements.${i}`,`datasets.${e}`,`elements.${i}`,""]])}pluginScopeKeys(e){const i=e.id,a=this.type;return Do(`${a}-plugin-${i}`,()=>[[`plugins.${i}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,i){const a=this._scopeCache;let o=a.get(e);return(!o||i)&&(o=new Map,a.set(e,o)),o}getOptionScopes(e,i,a){const{options:o,type:c}=this,u=this._cachedScopes(e,a),f=u.get(i);if(f)return f;const d=new Set;i.forEach(p=>{e&&(d.add(e),p.forEach(b=>ka(d,e,b))),p.forEach(b=>ka(d,o,b)),p.forEach(b=>ka(d,qi[c]||{},b)),p.forEach(b=>ka(d,Gt,b)),p.forEach(b=>ka(d,Ku,b))});const m=Array.from(d);return m.length===0&&m.push(Object.create(null)),K0.has(i)&&u.set(i,m),m}chartOptionScopes(){const{options:e,type:i}=this;return[e,qi[i]||{},Gt.datasets[i]||{},{type:i},Gt,Ku]}resolveNamedOptions(e,i,a,o=[""]){const c={$shared:!0},{resolver:u,subPrefixes:f}=Tp(this._resolverCache,e,o);let d=u;if(zS(u,i)){c.$shared=!1,a=hi(a)?a():a;const m=this.createResolver(e,a,f);d=Rs(u,a,m)}for(const m of i)c[m]=d[m];return c}createResolver(e,i,a=[""],o){const{resolver:c}=Tp(this._resolverCache,e,a);return pt(i)?Rs(c,i,void 0,o):c}}function Tp(s,e,i){let a=s.get(e);a||(a=new Map,s.set(e,a));const o=i.join();let c=a.get(o);return c||(c={resolver:hf(e,i),subPrefixes:i.filter(f=>!f.toLowerCase().includes("hover"))},a.set(o,c)),c}const DS=s=>pt(s)&&Object.getOwnPropertyNames(s).some(e=>hi(s[e]));function zS(s,e){const{isScriptable:i,isIndexable:a}=O0(s);for(const o of e){const c=i(o),u=a(o),f=(u||c)&&s[o];if(c&&(hi(f)||DS(f))||u&&Kt(f))return!0}return!1}var wS="4.5.1";const jS=["top","bottom","left","right","chartArea"];function Mp(s,e){return s==="top"||s==="bottom"||jS.indexOf(s)===-1&&e==="x"}function Ep(s,e){return function(i,a){return i[s]===a[s]?i[e]-a[e]:i[s]-a[s]}}function Ap(s){const e=s.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Nt(i&&i.onComplete,[s],e)}function RS(s){const e=s.chart,i=e.options.animation;Nt(i&&i.onProgress,[s],e)}function W0(s){return mf()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}const Bo={},Op=s=>{const e=W0(s);return Object.values(Bo).filter(i=>i.canvas===e).pop()};function NS(s,e,i){const a=Object.keys(s);for(const o of a){const c=+o;if(c>=e){const u=s[o];delete s[o],(i>0||c>e)&&(s[c+i]=u)}}}function kS(s,e,i,a){return!i||s.type==="mouseout"?null:a?e:s}let Io=class{static defaults=Gt;static instances=Bo;static overrides=qi;static registry=ln;static version=wS;static getChart=Op;static register(...e){ln.add(...e),Cp()}static unregister(...e){ln.remove(...e),Cp()}constructor(e,i){const a=this.config=new CS(i),o=W0(e),c=Op(o);if(c)throw new Error("Canvas is already in use. Chart with ID '"+c.id+"' must be destroyed before the canvas with ID '"+c.canvas.id+"' can be reused.");const u=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||$1(o)),this.platform.updateConfig(a);const f=this.platform.acquireContext(o,u.aspectRatio),d=f&&f.canvas,m=d&&d.height,p=d&&d.width;if(this.id=Dx(),this.ctx=f,this.canvas=d,this.width=p,this.height=m,this._options=u,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 yS,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Kx(b=>this.update(b),u.resizeDelay||0),this._dataChanges=[],Bo[this.id]=this,!f||!d){console.error("Failed to create chart: can't acquire context from the given item");return}Cn.listen(this,"complete",Ap),Cn.listen(this,"progress",RS),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:i},width:a,height:o,_aspectRatio:c}=this;return xt(e)?i&&c?c:o?a/o:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ln}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Jm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Fm(this.canvas,this.ctx),this}stop(){return Cn.stop(this),this}resize(e,i){Cn.running(this)?this._resizeBeforeDraw={width:e,height:i}:this._resize(e,i)}_resize(e,i){const a=this.options,o=this.canvas,c=a.maintainAspectRatio&&this.aspectRatio,u=this.platform.getMaximumSize(o,e,i,c),f=a.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=u.width,this.height=u.height,this._aspectRatio=this.aspectRatio,Jm(this,f,!0)&&(this.notifyPlugins("resize",{size:u}),Nt(a.onResize,[this,u],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const i=this.options.scales||{};At(i,(a,o)=>{a.id=o})}buildOrUpdateScales(){const e=this.options,i=e.scales,a=this.scales,o=Object.keys(a).reduce((u,f)=>(u[f]=!1,u),{});let c=[];i&&(c=c.concat(Object.keys(i).map(u=>{const f=i[u],d=Iu(u,f),m=d==="r",p=d==="x";return{options:f,dposition:m?"chartArea":p?"bottom":"left",dtype:m?"radialLinear":p?"category":"linear"}}))),At(c,u=>{const f=u.options,d=f.id,m=Iu(d,f),p=ht(f.type,u.dtype);(f.position===void 0||Mp(f.position,m)!==Mp(u.dposition))&&(f.position=u.dposition),o[d]=!0;let b=null;if(d in a&&a[d].type===p)b=a[d];else{const v=ln.getScale(p);b=new v({id:d,type:p,ctx:this.ctx,chart:this}),a[b.id]=b}b.init(f,e)}),At(o,(u,f)=>{u||delete a[f]}),At(a,u=>{Ke.configure(this,u,u.options),Ke.addBox(this,u)})}_updateMetasets(){const e=this._metasets,i=this.data.datasets.length,a=e.length;if(e.sort((o,c)=>o.index-c.index),a>i){for(let o=i;o<a;++o)this._destroyDatasetMeta(o);e.splice(i,a-i)}this._sortedMetasets=e.slice(0).sort(Ep("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:i}}=this;e.length>i.length&&delete this._stacks,e.forEach((a,o)=>{i.filter(c=>c===a._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const e=[],i=this.data.datasets;let a,o;for(this._removeUnreferencedMetasets(),a=0,o=i.length;a<o;a++){const c=i[a];let u=this.getDatasetMeta(a);const f=c.type||this.config.type;if(u.type&&u.type!==f&&(this._destroyDatasetMeta(a),u=this.getDatasetMeta(a)),u.type=f,u.indexAxis=c.indexAxis||Ju(f,this.options),u.order=c.order||0,u.index=a,u.label=""+c.label,u.visible=this.isDatasetVisible(a),u.controller)u.controller.updateIndex(a),u.controller.linkScales();else{const d=ln.getController(f),{datasetElementType:m,dataElementType:p}=Gt.datasets[f];Object.assign(d,{dataElementType:ln.getElement(p),datasetElementType:m&&ln.getElement(m)}),u.controller=new d(this,a),e.push(u.controller)}}return this._updateMetasets(),e}_resetElements(){At(this.data.datasets,(e,i)=>{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const i=this.config;i.update();const a=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const c=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let u=0;for(let m=0,p=this.data.datasets.length;m<p;m++){const{controller:b}=this.getDatasetMeta(m),v=!o&&c.indexOf(b)===-1;b.buildOrUpdateElements(v),u=Math.max(+b.getMaxOverflow(),u)}u=this._minPadding=a.layout.autoPadding?u:0,this._updateLayout(u),o||At(c,m=>{m.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Ep("z","_idx"));const{_active:f,_lastEvent:d}=this;d?this._eventHandler(d,!0):f.length&&this._updateHoverStyles(f,f,!0),this.render()}_updateScales(){At(this.scales,e=>{Ke.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,i=new Set(Object.keys(this._listeners)),a=new Set(e.events);(!Hm(i,a)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,i=this._getUniformDataChanges()||[];for(const{method:a,start:o,count:c}of i){const u=a==="_removeElements"?-c:c;NS(e,o,u)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const i=this.data.datasets.length,a=c=>new Set(e.filter(u=>u[0]===c).map((u,f)=>f+","+u.splice(1).join(","))),o=a(0);for(let c=1;c<i;c++)if(!Hm(o,a(c)))return;return Array.from(o).map(c=>c.split(",")).map(c=>({method:c[1],start:+c[2],count:+c[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ke.update(this,this.width,this.height,e);const i=this.chartArea,a=i.width<=0||i.height<=0;this._layers=[],At(this.boxes,o=>{a&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,c)=>{o._idx=c}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let i=0,a=this.data.datasets.length;i<a;++i)this.getDatasetMeta(i).controller.configure();for(let i=0,a=this.data.datasets.length;i<a;++i)this._updateDataset(i,hi(e)?e({datasetIndex:i}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,i){const a=this.getDatasetMeta(e),o={meta:a,index:e,mode:i,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(a.controller._update(i),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Cn.has(this)?this.attached&&!Cn.running(this)&&Cn.start(this):(this.draw(),Ap({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:a,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(a,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const i=this._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(this.chartArea);for(this._drawDatasets();e<i.length;++e)i[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const i=this._sortedMetasets,a=[];let o,c;for(o=0,c=i.length;o<c;++o){const u=i[o];(!e||u.visible)&&a.push(u)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)this._drawDataset(e[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const i=this.ctx,a={meta:e,index:e.index,cancelable:!0},o=H0(this,e);this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(o&&Zo(i,o),e.controller.draw(),o&&Fo(i),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return Ja(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,i,a,o){const c=j1.modes[i];return typeof c=="function"?c(this,e,a,o):[]}getDatasetMeta(e){const i=this.data.datasets[e],a=this._metasets;let o=a.filter(c=>c&&c._dataset===i).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:e,_dataset:i,_parsed:[],_sorted:!1},a.push(o)),o}getContext(){return this.$context||(this.$context=Xi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const i=this.data.datasets[e];if(!i)return!1;const a=this.getDatasetMeta(e);return typeof a.hidden=="boolean"?!a.hidden:!i.hidden}setDatasetVisibility(e,i){const a=this.getDatasetMeta(e);a.hidden=!i}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,i,a){const o=a?"show":"hide",c=this.getDatasetMeta(e),u=c.controller._resolveAnimations(void 0,o);Fa(i)?(c.data[i].hidden=!a,this.update()):(this.setDatasetVisibility(e,a),u.update(c,{visible:a}),this.update(f=>f.datasetIndex===e?o:void 0))}hide(e,i){this._updateVisibility(e,i,!1)}show(e,i){this._updateVisibility(e,i,!0)}_destroyDatasetMeta(e){const i=this._metasets[e];i&&i.controller&&i.controller._destroy(),delete this._metasets[e]}_stop(){let e,i;for(this.stop(),Cn.remove(this),e=0,i=this.data.datasets.length;e<i;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:i}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Fm(e,i),this.platform.releaseContext(i),this.canvas=null,this.ctx=null),delete Bo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,i=this.platform,a=(c,u)=>{i.addEventListener(this,c,u),e[c]=u},o=(c,u,f)=>{c.offsetX=u,c.offsetY=f,this._eventHandler(c)};At(this.options.events,c=>a(c,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,i=this.platform,a=(d,m)=>{i.addEventListener(this,d,m),e[d]=m},o=(d,m)=>{e[d]&&(i.removeEventListener(this,d,m),delete e[d])},c=(d,m)=>{this.canvas&&this.resize(d,m)};let u;const f=()=>{o("attach",f),this.attached=!0,this.resize(),a("resize",c),a("detach",u)};u=()=>{this.attached=!1,o("resize",c),this._stop(),this._resize(0,0),a("attach",f)},i.isAttached(this.canvas)?f():u()}unbindEvents(){At(this._listeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._listeners={},At(this._responsiveListeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,i,a){const o=a?"set":"remove";let c,u,f,d;for(i==="dataset"&&(c=this.getDatasetMeta(e[0].datasetIndex),c.controller["_"+o+"DatasetHoverStyle"]()),f=0,d=e.length;f<d;++f){u=e[f];const m=u&&this.getDatasetMeta(u.datasetIndex).controller;m&&m[o+"HoverStyle"](u.element,u.datasetIndex,u.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const i=this._active||[],a=e.map(({datasetIndex:c,index:u})=>{const f=this.getDatasetMeta(c);if(!f)throw new Error("No dataset found at index "+c);return{datasetIndex:c,element:f.data[u],index:u}});!Uo(a,i)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,i))}notifyPlugins(e,i,a){return this._plugins.notify(this,e,i,a)}isPluginEnabled(e){return this._plugins._cache.filter(i=>i.plugin.id===e).length===1}_updateHoverStyles(e,i,a){const o=this.options.hover,c=(d,m)=>d.filter(p=>!m.some(b=>p.datasetIndex===b.datasetIndex&&p.index===b.index)),u=c(i,e),f=a?e:c(e,i);u.length&&this.updateHoverStyle(u,o.mode,!1),f.length&&o.mode&&this.updateHoverStyle(f,o.mode,!0)}_eventHandler(e,i){const a={event:e,replay:i,cancelable:!0,inChartArea:this.isPointInArea(e)},o=u=>(u.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",a,o)===!1)return;const c=this._handleEvent(e,i,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,o),(c||a.changed)&&this.render(),this}_handleEvent(e,i,a){const{_active:o=[],options:c}=this,u=i,f=this._getActiveElements(e,o,a,u),d=kx(e),m=kS(e,this._lastEvent,a,d);a&&(this._lastEvent=null,Nt(c.onHover,[e,f,this],this),d&&Nt(c.onClick,[e,f,this],this));const p=!Uo(f,o);return(p||i)&&(this._active=f,this._updateHoverStyles(f,o,i)),this._lastEvent=m,p}_getActiveElements(e,i,a,o){if(e.type==="mouseout")return[];if(!a)return i;const c=this.options.hover;return this.getElementsAtEventForMode(e,c.mode,c,o)}};function Cp(){return At(Io.instances,s=>s._plugins.invalidate())}function LS(s,e,i){const{startAngle:a,x:o,y:c,outerRadius:u,innerRadius:f,options:d}=e,{borderWidth:m,borderJoinStyle:p}=d,b=Math.min(m/u,ke(a-i));if(s.beginPath(),s.arc(o,c,u-m/2,a+b/2,i-b/2),f>0){const v=Math.min(m/f,ke(a-i));s.arc(o,c,f+m/2,i-v/2,a+v/2,!0)}else{const v=Math.min(m/2,u*ke(a-i));if(p==="round")s.arc(o,c,v,i-Dt/2,a+Dt/2,!0);else if(p==="bevel"){const S=2*v*v,T=-S*Math.cos(i+Dt/2)+o,M=-S*Math.sin(i+Dt/2)+c,A=S*Math.cos(a+Dt/2)+o,D=S*Math.sin(a+Dt/2)+c;s.lineTo(T,M),s.lineTo(A,D)}}s.closePath(),s.moveTo(0,0),s.rect(0,0,s.canvas.width,s.canvas.height),s.clip("evenodd")}function HS(s,e,i){const{startAngle:a,pixelMargin:o,x:c,y:u,outerRadius:f,innerRadius:d}=e;let m=o/f;s.beginPath(),s.arc(c,u,f,a-m,i+m),d>o?(m=o/d,s.arc(c,u,d,i+m,a-m,!0)):s.arc(c,u,o,i+te,a-te),s.closePath(),s.clip()}function BS(s){return ff(s,["outerStart","outerEnd","innerStart","innerEnd"])}function US(s,e,i,a){const o=BS(s.options.borderRadius),c=(i-e)/2,u=Math.min(c,a*e/2),f=d=>{const m=(i-Math.min(c,d))*a/2;return fe(d,0,Math.min(c,m))};return{outerStart:f(o.outerStart),outerEnd:f(o.outerEnd),innerStart:fe(o.innerStart,0,u),innerEnd:fe(o.innerEnd,0,u)}}function Ds(s,e,i,a){return{x:i+s*Math.cos(e),y:a+s*Math.sin(e)}}function Qo(s,e,i,a,o,c){const{x:u,y:f,startAngle:d,pixelMargin:m,innerRadius:p}=e,b=Math.max(e.outerRadius+a+i-m,0),v=p>0?p+a+i+m:0;let S=0;const T=o-d;if(a){const dt=p>0?p-a:0,N=b>0?b-a:0,Q=(dt+N)/2,$=Q!==0?T*Q/(Q+a):T;S=(T-$)/2}const M=Math.max(.001,T*b-i/Dt)/b,A=(T-M)/2,D=d+A+S,L=o-A-S,{outerStart:q,outerEnd:G,innerStart:Y,innerEnd:W}=US(e,v,b,L-D),X=b-q,F=b-G,tt=D+q/X,rt=L-G/F,it=v+Y,st=v+W,kt=D+Y/it,Vt=L-W/st;if(s.beginPath(),c){const dt=(tt+rt)/2;if(s.arc(u,f,b,tt,dt),s.arc(u,f,b,dt,rt),G>0){const lt=Ds(F,rt,u,f);s.arc(lt.x,lt.y,G,rt,L+te)}const N=Ds(st,L,u,f);if(s.lineTo(N.x,N.y),W>0){const lt=Ds(st,Vt,u,f);s.arc(lt.x,lt.y,W,L+te,Vt+Math.PI)}const Q=(L-W/v+(D+Y/v))/2;if(s.arc(u,f,v,L-W/v,Q,!0),s.arc(u,f,v,Q,D+Y/v,!0),Y>0){const lt=Ds(it,kt,u,f);s.arc(lt.x,lt.y,Y,kt+Math.PI,D-te)}const $=Ds(X,D,u,f);if(s.lineTo($.x,$.y),q>0){const lt=Ds(X,tt,u,f);s.arc(lt.x,lt.y,q,D-te,tt)}}else{s.moveTo(u,f);const dt=Math.cos(tt)*b+u,N=Math.sin(tt)*b+f;s.lineTo(dt,N);const Q=Math.cos(rt)*b+u,$=Math.sin(rt)*b+f;s.lineTo(Q,$)}s.closePath()}function VS(s,e,i,a,o){const{fullCircles:c,startAngle:u,circumference:f}=e;let d=e.endAngle;if(c){Qo(s,e,i,a,d,o);for(let m=0;m<c;++m)s.fill();isNaN(f)||(d=u+(f%Yt||Yt))}return Qo(s,e,i,a,d,o),s.fill(),d}function YS(s,e,i,a,o){const{fullCircles:c,startAngle:u,circumference:f,options:d}=e,{borderWidth:m,borderJoinStyle:p,borderDash:b,borderDashOffset:v,borderRadius:S}=d,T=d.borderAlign==="inner";if(!m)return;s.setLineDash(b||[]),s.lineDashOffset=v,T?(s.lineWidth=m*2,s.lineJoin=p||"round"):(s.lineWidth=m,s.lineJoin=p||"bevel");let M=e.endAngle;if(c){Qo(s,e,i,a,M,o);for(let A=0;A<c;++A)s.stroke();isNaN(f)||(M=u+(f%Yt||Yt))}T&&HS(s,e,M),d.selfJoin&&M-u>=Dt&&S===0&&p!=="miter"&&LS(s,e,M),c||(Qo(s,e,i,a,M,o),s.stroke())}class J0 extends kn{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,a){const o=this.getProps(["x","y"],a),{angle:c,distance:u}=v0(o,{x:e,y:i}),{startAngle:f,endAngle:d,innerRadius:m,outerRadius:p,circumference:b}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),v=(this.options.spacing+this.options.borderWidth)/2,S=ht(b,d-f),T=Wa(c,f,d)&&f!==d,M=S>=Yt||T,A=Rn(u,m+v,p+v);return M&&A}getCenterPoint(e){const{x:i,y:a,startAngle:o,endAngle:c,innerRadius:u,outerRadius:f}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:m}=this.options,p=(o+c)/2,b=(u+f+m+d)/2;return{x:i+Math.cos(p)*b,y:a+Math.sin(p)*b}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:a}=this,o=(i.offset||0)/4,c=(i.spacing||0)/2,u=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=a>Yt?Math.floor(a/Yt):0,a===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const f=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(f)*o,Math.sin(f)*o);const d=1-Math.sin(Math.min(Dt,a||0)),m=o*d;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,VS(e,this,m,c,u),YS(e,this,m,c,u),e.restore()}}function I0(s,e,i=e){s.lineCap=ht(i.borderCapStyle,e.borderCapStyle),s.setLineDash(ht(i.borderDash,e.borderDash)),s.lineDashOffset=ht(i.borderDashOffset,e.borderDashOffset),s.lineJoin=ht(i.borderJoinStyle,e.borderJoinStyle),s.lineWidth=ht(i.borderWidth,e.borderWidth),s.strokeStyle=ht(i.borderColor,e.borderColor)}function qS(s,e,i){s.lineTo(i.x,i.y)}function XS(s){return s.stepped?r_:s.tension||s.cubicInterpolationMode==="monotone"?c_:qS}function P0(s,e,i={}){const a=s.length,{start:o=0,end:c=a-1}=i,{start:u,end:f}=e,d=Math.max(o,u),m=Math.min(c,f),p=o<u&&c<u||o>f&&c>f;return{count:a,start:d,loop:e.loop,ilen:m<d&&!p?a+m-d:m-d}}function GS(s,e,i,a){const{points:o,options:c}=e,{count:u,start:f,loop:d,ilen:m}=P0(o,i,a),p=XS(c);let{move:b=!0,reverse:v}=a||{},S,T,M;for(S=0;S<=m;++S)T=o[(f+(v?m-S:S))%u],!T.skip&&(b?(s.moveTo(T.x,T.y),b=!1):p(s,M,T,v,c.stepped),M=T);return d&&(T=o[(f+(v?m:0))%u],p(s,M,T,v,c.stepped)),!!d}function QS(s,e,i,a){const o=e.points,{count:c,start:u,ilen:f}=P0(o,i,a),{move:d=!0,reverse:m}=a||{};let p=0,b=0,v,S,T,M,A,D;const L=G=>(u+(m?f-G:G))%c,q=()=>{M!==A&&(s.lineTo(p,A),s.lineTo(p,M),s.lineTo(p,D))};for(d&&(S=o[L(0)],s.moveTo(S.x,S.y)),v=0;v<=f;++v){if(S=o[L(v)],S.skip)continue;const G=S.x,Y=S.y,W=G|0;W===T?(Y<M?M=Y:Y>A&&(A=Y),p=(b*p+G)/++b):(q(),s.lineTo(G,Y),T=W,b=0,M=A=Y),D=Y}q()}function Pu(s){const e=s.options,i=e.borderDash&&e.borderDash.length;return!s._decimated&&!s._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!i?QS:GS}function ZS(s){return s.stepped?Y_:s.tension||s.cubicInterpolationMode==="monotone"?q_:Bi}function FS(s,e,i,a){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,a)&&o.closePath()),I0(s,e.options),s.stroke(o)}function KS(s,e,i,a){const{segments:o,options:c}=e,u=Pu(e);for(const f of o)I0(s,c,f.style),s.beginPath(),u(s,e,f,{start:i,end:i+a-1})&&s.closePath(),s.stroke()}const WS=typeof Path2D=="function";function JS(s,e,i,a){WS&&!e.options.segment?FS(s,e,i,a):KS(s,e,i,a)}class Po extends kn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,i){const a=this.options;if((a.tension||a.cubicInterpolationMode==="monotone")&&!a.stepped&&!this._pointsUpdated){const o=a.spanGaps?this._loop:this._fullLoop;R_(this._points,a,e,o,i),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=K_(this,this.options.segment))}first(){const e=this.segments,i=this.points;return e.length&&i[e[0].start]}last(){const e=this.segments,i=this.points,a=e.length;return a&&i[e[a-1].end]}interpolate(e,i){const a=this.options,o=e[i],c=this.points,u=L0(this,{property:i,start:o,end:o});if(!u.length)return;const f=[],d=ZS(a);let m,p;for(m=0,p=u.length;m<p;++m){const{start:b,end:v}=u[m],S=c[b],T=c[v];if(S===T){f.push(S);continue}const M=Math.abs((o-S[i])/(T[i]-S[i])),A=d(S,T,M,a.stepped);A[i]=e[i],f.push(A)}return f.length===1?f[0]:f}pathSegment(e,i,a){return Pu(this)(e,this,i,a)}path(e,i,a){const o=this.segments,c=Pu(this);let u=this._loop;i=i||0,a=a||this.points.length-i;for(const f of o)u&=c(e,this,f,{start:i,end:i+a-1});return!!u}draw(e,i,a,o){const c=this.options||{};(this.points||[]).length&&c.borderWidth&&(e.save(),JS(e,this,a,o),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Dp(s,e,i,a){const o=s.options,{[i]:c}=s.getProps([i],a);return Math.abs(e-c)<o.radius+o.hitRadius}class $0 extends kn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,a){const o=this.options,{x:c,y:u}=this.getProps(["x","y"],a);return Math.pow(e-c,2)+Math.pow(i-u,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return Dp(this,e,"x",i)}inYRange(e,i){return Dp(this,e,"y",i)}getCenterPoint(e){const{x:i,y:a}=this.getProps(["x","y"],e);return{x:i,y:a}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const a=i&&e.borderWidth||0;return(i+a)*2}draw(e,i){const a=this.options;this.skip||a.radius<.1||!Ja(this,i,this.size(a)/2)||(e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.fillStyle=a.backgroundColor,Wu(e,a,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function ty(s,e){const{x:i,y:a,base:o,width:c,height:u}=s.getProps(["x","y","base","width","height"],e);let f,d,m,p,b;return s.horizontal?(b=u/2,f=Math.min(i,o),d=Math.max(i,o),m=a-b,p=a+b):(b=c/2,f=i-b,d=i+b,m=Math.min(a,o),p=Math.max(a,o)),{left:f,top:m,right:d,bottom:p}}function ci(s,e,i,a){return s?0:fe(e,i,a)}function IS(s,e,i){const a=s.options.borderWidth,o=s.borderSkipped,c=A0(a);return{t:ci(o.top,c.top,0,i),r:ci(o.right,c.right,0,e),b:ci(o.bottom,c.bottom,0,i),l:ci(o.left,c.left,0,e)}}function PS(s,e,i){const{enableBorderRadius:a}=s.getProps(["enableBorderRadius"]),o=s.options.borderRadius,c=zs(o),u=Math.min(e,i),f=s.borderSkipped,d=a||pt(o);return{topLeft:ci(!d||f.top||f.left,c.topLeft,0,u),topRight:ci(!d||f.top||f.right,c.topRight,0,u),bottomLeft:ci(!d||f.bottom||f.left,c.bottomLeft,0,u),bottomRight:ci(!d||f.bottom||f.right,c.bottomRight,0,u)}}function $S(s){const e=ty(s),i=e.right-e.left,a=e.bottom-e.top,o=IS(s,i/2,a/2),c=PS(s,i/2,a/2);return{outer:{x:e.left,y:e.top,w:i,h:a,radius:c},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:a-o.t-o.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,c.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(o.b,o.r))}}}}function ku(s,e,i,a){const o=e===null,c=i===null,f=s&&!(o&&c)&&ty(s,a);return f&&(o||Rn(e,f.left,f.right))&&(c||Rn(i,f.top,f.bottom))}function t2(s){return s.topLeft||s.topRight||s.bottomLeft||s.bottomRight}function e2(s,e){s.rect(e.x,e.y,e.w,e.h)}function Lu(s,e,i={}){const a=s.x!==i.x?-e:0,o=s.y!==i.y?-e:0,c=(s.x+s.w!==i.x+i.w?e:0)-a,u=(s.y+s.h!==i.y+i.h?e:0)-o;return{x:s.x+a,y:s.y+o,w:s.w+c,h:s.h+u,radius:s.radius}}class ey extends kn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:i,options:{borderColor:a,backgroundColor:o}}=this,{inner:c,outer:u}=$S(this),f=t2(u.radius)?qo:e2;e.save(),(u.w!==c.w||u.h!==c.h)&&(e.beginPath(),f(e,Lu(u,i,c)),e.clip(),f(e,Lu(c,-i,u)),e.fillStyle=a,e.fill("evenodd")),e.beginPath(),f(e,Lu(c,i)),e.fillStyle=o,e.fill(),e.restore()}inRange(e,i,a){return ku(this,e,i,a)}inXRange(e,i){return ku(this,e,null,i)}inYRange(e,i){return ku(this,null,e,i)}getCenterPoint(e){const{x:i,y:a,base:o,horizontal:c}=this.getProps(["x","y","base","horizontal"],e);return{x:c?(i+o)/2:i,y:c?a:(a+o)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}function n2(s,e,i){const a=s.segments,o=s.points,c=e.points,u=[];for(const f of a){let{start:d,end:m}=f;m=$o(d,m,o);const p=$u(i,o[d],o[m],f.loop);if(!e.segments){u.push({source:f,target:p,start:o[d],end:o[m]});continue}const b=L0(e,p);for(const v of b){const S=$u(i,c[v.start],c[v.end],v.loop),T=k0(f,o,S);for(const M of T)u.push({source:M,target:v,start:{[i]:zp(p,S,"start",Math.max)},end:{[i]:zp(p,S,"end",Math.min)}})}}return u}function $u(s,e,i,a){if(a)return;let o=e[s],c=i[s];return s==="angle"&&(o=ke(o),c=ke(c)),{property:s,start:o,end:c}}function i2(s,e){const{x:i=null,y:a=null}=s||{},o=e.points,c=[];return e.segments.forEach(({start:u,end:f})=>{f=$o(u,f,o);const d=o[u],m=o[f];a!==null?(c.push({x:d.x,y:a}),c.push({x:m.x,y:a})):i!==null&&(c.push({x:i,y:d.y}),c.push({x:i,y:m.y}))}),c}function $o(s,e,i){for(;e>s;e--){const a=i[e];if(!isNaN(a.x)&&!isNaN(a.y))break}return e}function zp(s,e,i,a){return s&&e?a(s[i],e[i]):s?s[i]:e?e[i]:0}function ny(s,e){let i=[],a=!1;return Kt(s)?(a=!0,i=s):i=i2(s,e),i.length?new Po({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function wp(s){return s&&s.fill!==!1}function s2(s,e,i){let o=s[e].fill;const c=[e];let u;if(!i)return o;for(;o!==!1&&c.indexOf(o)===-1;){if(!he(o))return o;if(u=s[o],!u)return!1;if(u.visible)return o;c.push(o),o=u.fill}return!1}function a2(s,e,i){const a=c2(s);if(pt(a))return isNaN(a.value)?!1:a;let o=parseFloat(a);return he(o)&&Math.floor(o)===o?l2(a[0],e,o,i):["origin","start","end","stack","shape"].indexOf(a)>=0&&a}function l2(s,e,i,a){return(s==="-"||s==="+")&&(i=e+i),i===e||i<0||i>=a?!1:i}function o2(s,e){let i=null;return s==="start"?i=e.bottom:s==="end"?i=e.top:pt(s)?i=e.getPixelForValue(s.value):e.getBasePixel&&(i=e.getBasePixel()),i}function r2(s,e,i){let a;return s==="start"?a=i:s==="end"?a=e.options.reverse?e.min:e.max:pt(s)?a=s.value:a=e.getBaseValue(),a}function c2(s){const e=s.options,i=e.fill;let a=ht(i&&i.target,i);return a===void 0&&(a=!!e.backgroundColor),a===!1||a===null?!1:a===!0?"origin":a}function u2(s){const{scale:e,index:i,line:a}=s,o=[],c=a.segments,u=a.points,f=f2(e,i);f.push(ny({x:null,y:e.bottom},a));for(let d=0;d<c.length;d++){const m=c[d];for(let p=m.start;p<=m.end;p++)h2(o,u[p],f)}return new Po({points:o,options:{}})}function f2(s,e){const i=[],a=s.getMatchingVisibleMetas("line");for(let o=0;o<a.length;o++){const c=a[o];if(c.index===e)break;c.hidden||i.unshift(c.dataset)}return i}function h2(s,e,i){const a=[];for(let o=0;o<i.length;o++){const c=i[o],{first:u,last:f,point:d}=d2(c,e,"x");if(!(!d||u&&f)){if(u)a.unshift(d);else if(s.push(d),!f)break}}s.push(...a)}function d2(s,e,i){const a=s.interpolate(e,i);if(!a)return{};const o=a[i],c=s.segments,u=s.points;let f=!1,d=!1;for(let m=0;m<c.length;m++){const p=c[m],b=u[p.start][i],v=u[p.end][i];if(Rn(o,b,v)){f=o===b,d=o===v;break}}return{first:f,last:d,point:a}}class iy{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,i,a){const{x:o,y:c,radius:u}=this;return i=i||{start:0,end:Yt},e.arc(o,c,u,i.end,i.start,!0),!a.bounds}interpolate(e){const{x:i,y:a,radius:o}=this,c=e.angle;return{x:i+Math.cos(c)*o,y:a+Math.sin(c)*o,angle:c}}}function g2(s){const{chart:e,fill:i,line:a}=s;if(he(i))return m2(e,i);if(i==="stack")return u2(s);if(i==="shape")return!0;const o=p2(s);return o instanceof iy?o:ny(o,a)}function m2(s,e){const i=s.getDatasetMeta(e);return i&&s.isDatasetVisible(e)?i.dataset:null}function p2(s){return(s.scale||{}).getPointPositionForValue?b2(s):y2(s)}function y2(s){const{scale:e={},fill:i}=s,a=o2(i,e);if(he(a)){const o=e.isHorizontal();return{x:o?a:null,y:o?null:a}}return null}function b2(s){const{scale:e,fill:i}=s,a=e.options,o=e.getLabels().length,c=a.reverse?e.max:e.min,u=r2(i,e,c),f=[];if(a.grid.circular){const d=e.getPointPositionForValue(0,c);return new iy({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(u)})}for(let d=0;d<o;++d)f.push(e.getPointPositionForValue(d,u));return f}function Hu(s,e,i){const a=g2(e),{chart:o,index:c,line:u,scale:f,axis:d}=e,m=u.options,p=m.fill,b=m.backgroundColor,{above:v=b,below:S=b}=p||{},T=o.getDatasetMeta(c),M=H0(o,T);a&&u.points.length&&(Zo(s,i),v2(s,{line:u,target:a,above:v,below:S,area:i,scale:f,axis:d,clip:M}),Fo(s))}function v2(s,e){const{line:i,target:a,above:o,below:c,area:u,scale:f,clip:d}=e,m=i._loop?"angle":e.axis;s.save();let p=c;c!==o&&(m==="x"?(jp(s,a,u.top),Bu(s,{line:i,target:a,color:o,scale:f,property:m,clip:d}),s.restore(),s.save(),jp(s,a,u.bottom)):m==="y"&&(Rp(s,a,u.left),Bu(s,{line:i,target:a,color:c,scale:f,property:m,clip:d}),s.restore(),s.save(),Rp(s,a,u.right),p=o)),Bu(s,{line:i,target:a,color:p,scale:f,property:m,clip:d}),s.restore()}function jp(s,e,i){const{segments:a,points:o}=e;let c=!0,u=!1;s.beginPath();for(const f of a){const{start:d,end:m}=f,p=o[d],b=o[$o(d,m,o)];c?(s.moveTo(p.x,p.y),c=!1):(s.lineTo(p.x,i),s.lineTo(p.x,p.y)),u=!!e.pathSegment(s,f,{move:u}),u?s.closePath():s.lineTo(b.x,i)}s.lineTo(e.first().x,i),s.closePath(),s.clip()}function Rp(s,e,i){const{segments:a,points:o}=e;let c=!0,u=!1;s.beginPath();for(const f of a){const{start:d,end:m}=f,p=o[d],b=o[$o(d,m,o)];c?(s.moveTo(p.x,p.y),c=!1):(s.lineTo(i,p.y),s.lineTo(p.x,p.y)),u=!!e.pathSegment(s,f,{move:u}),u?s.closePath():s.lineTo(i,b.y)}s.lineTo(i,e.first().y),s.closePath(),s.clip()}function Bu(s,e){const{line:i,target:a,property:o,color:c,scale:u,clip:f}=e,d=n2(i,a,o);for(const{source:m,target:p,start:b,end:v}of d){const{style:{backgroundColor:S=c}={}}=m,T=a!==!0;s.save(),s.fillStyle=S,x2(s,u,f,T&&$u(o,b,v)),s.beginPath();const M=!!i.pathSegment(s,m);let A;if(T){M?s.closePath():Np(s,a,v,o);const D=!!a.pathSegment(s,p,{move:M,reverse:!0});A=M&&D,A||Np(s,a,b,o)}s.closePath(),s.fill(A?"evenodd":"nonzero"),s.restore()}}function x2(s,e,i,a){const o=e.chart.chartArea,{property:c,start:u,end:f}=a||{};if(c==="x"||c==="y"){let d,m,p,b;c==="x"?(d=u,m=o.top,p=f,b=o.bottom):(d=o.left,m=u,p=o.right,b=f),s.beginPath(),i&&(d=Math.max(d,i.left),p=Math.min(p,i.right),m=Math.max(m,i.top),b=Math.min(b,i.bottom)),s.rect(d,m,p-d,b-m),s.clip()}}function Np(s,e,i,a){const o=e.interpolate(i,a);o&&s.lineTo(o.x,o.y)}var _2={id:"filler",afterDatasetsUpdate(s,e,i){const a=(s.data.datasets||[]).length,o=[];let c,u,f,d;for(u=0;u<a;++u)c=s.getDatasetMeta(u),f=c.dataset,d=null,f&&f.options&&f instanceof Po&&(d={visible:s.isDatasetVisible(u),index:u,fill:a2(f,u,a),chart:s,axis:c.controller.options.indexAxis,scale:c.vScale,line:f}),c.$filler=d,o.push(d);for(u=0;u<a;++u)d=o[u],!(!d||d.fill===!1)&&(d.fill=s2(o,u,i.propagate))},beforeDraw(s,e,i){const a=i.drawTime==="beforeDraw",o=s.getSortedVisibleDatasetMetas(),c=s.chartArea;for(let u=o.length-1;u>=0;--u){const f=o[u].$filler;f&&(f.line.updateControlPoints(c,f.axis),a&&f.fill&&Hu(s.ctx,f,c))}},beforeDatasetsDraw(s,e,i){if(i.drawTime!=="beforeDatasetsDraw")return;const a=s.getSortedVisibleDatasetMetas();for(let o=a.length-1;o>=0;--o){const c=a[o].$filler;wp(c)&&Hu(s.ctx,c,s.chartArea)}},beforeDatasetDraw(s,e,i){const a=e.meta.$filler;!wp(a)||i.drawTime!=="beforeDatasetDraw"||Hu(s.ctx,a,s.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const kp=(s,e)=>{let{boxHeight:i=e,boxWidth:a=e}=s;return s.usePointStyle&&(i=Math.min(i,e),a=s.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:i,itemHeight:Math.max(e,i)}},S2=(s,e)=>s!==null&&e!==null&&s.datasetIndex===e.datasetIndex&&s.index===e.index;class Lp extends kn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,i,a){this.maxWidth=e,this.maxHeight=i,this._margins=a,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let i=Nt(e.generateLabels,[this.chart],this)||[];e.filter&&(i=i.filter(a=>e.filter(a,this.chart.data))),e.sort&&(i=i.sort((a,o)=>e.sort(a,o,this.chart.data))),this.options.reverse&&i.reverse(),this.legendItems=i}fit(){const{options:e,ctx:i}=this;if(!e.display){this.width=this.height=0;return}const a=e.labels,o=re(a.font),c=o.size,u=this._computeTitleHeight(),{boxWidth:f,itemHeight:d}=kp(a,c);let m,p;i.font=o.string,this.isHorizontal()?(m=this.maxWidth,p=this._fitRows(u,c,f,d)+10):(p=this.maxHeight,m=this._fitCols(u,o,f,d)+10),this.width=Math.min(m,e.maxWidth||this.maxWidth),this.height=Math.min(p,e.maxHeight||this.maxHeight)}_fitRows(e,i,a,o){const{ctx:c,maxWidth:u,options:{labels:{padding:f}}}=this,d=this.legendHitBoxes=[],m=this.lineWidths=[0],p=o+f;let b=e;c.textAlign="left",c.textBaseline="middle";let v=-1,S=-p;return this.legendItems.forEach((T,M)=>{const A=a+i/2+c.measureText(T.text).width;(M===0||m[m.length-1]+A+2*f>u)&&(b+=p,m[m.length-(M>0?0:1)]=0,S+=p,v++),d[M]={left:0,top:S,row:v,width:A,height:o},m[m.length-1]+=A+f}),b}_fitCols(e,i,a,o){const{ctx:c,maxHeight:u,options:{labels:{padding:f}}}=this,d=this.legendHitBoxes=[],m=this.columnSizes=[],p=u-e;let b=f,v=0,S=0,T=0,M=0;return this.legendItems.forEach((A,D)=>{const{itemWidth:L,itemHeight:q}=T2(a,i,c,A,o);D>0&&S+q+2*f>p&&(b+=v+f,m.push({width:v,height:S}),T+=v+f,M++,v=S=0),d[D]={left:T,top:S,col:M,width:L,height:q},v=Math.max(v,L),S+=q+f}),b+=v,m.push({width:v,height:S}),b}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:i,options:{align:a,labels:{padding:o},rtl:c}}=this,u=ws(c,this.left,this.width);if(this.isHorizontal()){let f=0,d=ue(a,this.left+o,this.right-this.lineWidths[f]);for(const m of i)f!==m.row&&(f=m.row,d=ue(a,this.left+o,this.right-this.lineWidths[f])),m.top+=this.top+e+o,m.left=u.leftForLtr(u.x(d),m.width),d+=m.width+o}else{let f=0,d=ue(a,this.top+e+o,this.bottom-this.columnSizes[f].height);for(const m of i)m.col!==f&&(f=m.col,d=ue(a,this.top+e+o,this.bottom-this.columnSizes[f].height)),m.top=d,m.left+=this.left+o,m.left=u.leftForLtr(u.x(m.left),m.width),d+=m.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Zo(e,this),this._draw(),Fo(e)}}_draw(){const{options:e,columnSizes:i,lineWidths:a,ctx:o}=this,{align:c,labels:u}=e,f=Gt.color,d=ws(e.rtl,this.left,this.width),m=re(u.font),{padding:p}=u,b=m.size,v=b/2;let S;this.drawTitle(),o.textAlign=d.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=m.string;const{boxWidth:T,boxHeight:M,itemHeight:A}=kp(u,b),D=function(W,X,F){if(isNaN(T)||T<=0||isNaN(M)||M<0)return;o.save();const tt=ht(F.lineWidth,1);if(o.fillStyle=ht(F.fillStyle,f),o.lineCap=ht(F.lineCap,"butt"),o.lineDashOffset=ht(F.lineDashOffset,0),o.lineJoin=ht(F.lineJoin,"miter"),o.lineWidth=tt,o.strokeStyle=ht(F.strokeStyle,f),o.setLineDash(ht(F.lineDash,[])),u.usePointStyle){const rt={radius:M*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:tt},it=d.xPlus(W,T/2),st=X+v;E0(o,rt,it,st,u.pointStyleWidth&&T)}else{const rt=X+Math.max((b-M)/2,0),it=d.leftForLtr(W,T),st=zs(F.borderRadius);o.beginPath(),Object.values(st).some(kt=>kt!==0)?qo(o,{x:it,y:rt,w:T,h:M,radius:st}):o.rect(it,rt,T,M),o.fill(),tt!==0&&o.stroke()}o.restore()},L=function(W,X,F){Ia(o,F.text,W,X+A/2,m,{strikethrough:F.hidden,textAlign:d.textAlign(F.textAlign)})},q=this.isHorizontal(),G=this._computeTitleHeight();q?S={x:ue(c,this.left+p,this.right-a[0]),y:this.top+p+G,line:0}:S={x:this.left+p,y:ue(c,this.top+G+p,this.bottom-i[0].height),line:0},j0(this.ctx,e.textDirection);const Y=A+p;this.legendItems.forEach((W,X)=>{o.strokeStyle=W.fontColor,o.fillStyle=W.fontColor;const F=o.measureText(W.text).width,tt=d.textAlign(W.textAlign||(W.textAlign=u.textAlign)),rt=T+v+F;let it=S.x,st=S.y;d.setWidth(this.width),q?X>0&&it+rt+p>this.right&&(st=S.y+=Y,S.line++,it=S.x=ue(c,this.left+p,this.right-a[S.line])):X>0&&st+Y>this.bottom&&(it=S.x=it+i[S.line].width+p,S.line++,st=S.y=ue(c,this.top+G+p,this.bottom-i[S.line].height));const kt=d.x(it);if(D(kt,st,W),it=Wx(tt,it+T+v,q?it+rt:this.right,e.rtl),L(d.x(it),st,W),q)S.x+=rt+p;else if(typeof W.text!="string"){const Vt=m.lineHeight;S.y+=sy(W,Vt)+p}else S.y+=Y}),R0(this.ctx,e.textDirection)}drawTitle(){const e=this.options,i=e.title,a=re(i.font),o=Le(i.padding);if(!i.display)return;const c=ws(e.rtl,this.left,this.width),u=this.ctx,f=i.position,d=a.size/2,m=o.top+d;let p,b=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),p=this.top+m,b=ue(e.align,b,this.right-v);else{const T=this.columnSizes.reduce((M,A)=>Math.max(M,A.height),0);p=m+ue(e.align,this.top,this.bottom-T-e.labels.padding-this._computeTitleHeight())}const S=ue(f,b,b+v);u.textAlign=c.textAlign(rf(f)),u.textBaseline="middle",u.strokeStyle=i.color,u.fillStyle=i.color,u.font=a.string,Ia(u,i.text,S,p,a)}_computeTitleHeight(){const e=this.options.title,i=re(e.font),a=Le(e.padding);return e.display?i.lineHeight+a.height:0}_getLegendItemAt(e,i){let a,o,c;if(Rn(e,this.left,this.right)&&Rn(i,this.top,this.bottom)){for(c=this.legendHitBoxes,a=0;a<c.length;++a)if(o=c[a],Rn(e,o.left,o.left+o.width)&&Rn(i,o.top,o.top+o.height))return this.legendItems[a]}return null}handleEvent(e){const i=this.options;if(!A2(e.type,i))return;const a=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const o=this._hoveredItem,c=S2(o,a);o&&!c&&Nt(i.onLeave,[e,o,this],this),this._hoveredItem=a,a&&!c&&Nt(i.onHover,[e,a,this],this)}else a&&Nt(i.onClick,[e,a,this],this)}}function T2(s,e,i,a,o){const c=M2(a,s,e,i),u=E2(o,a,e.lineHeight);return{itemWidth:c,itemHeight:u}}function M2(s,e,i,a){let o=s.text;return o&&typeof o!="string"&&(o=o.reduce((c,u)=>c.length>u.length?c:u)),e+i.size/2+a.measureText(o).width}function E2(s,e,i){let a=s;return typeof e.text!="string"&&(a=sy(e,i)),a}function sy(s,e){const i=s.text?s.text.length:0;return e*i}function A2(s,e){return!!((s==="mousemove"||s==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(s==="click"||s==="mouseup"))}var O2={id:"legend",_element:Lp,start(s,e,i){const a=s.legend=new Lp({ctx:s.ctx,options:i,chart:s});Ke.configure(s,a,i),Ke.addBox(s,a)},stop(s){Ke.removeBox(s,s.legend),delete s.legend},beforeUpdate(s,e,i){const a=s.legend;Ke.configure(s,a,i),a.options=i},afterUpdate(s){const e=s.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(s,e){e.replay||s.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(s,e,i){const a=e.datasetIndex,o=i.chart;o.isDatasetVisible(a)?(o.hide(a),e.hidden=!0):(o.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:s=>s.chart.options.color,boxWidth:40,padding:10,generateLabels(s){const e=s.data.datasets,{labels:{usePointStyle:i,pointStyle:a,textAlign:o,color:c,useBorderRadius:u,borderRadius:f}}=s.legend.options;return s._getSortedDatasetMetas().map(d=>{const m=d.controller.getStyle(i?0:void 0),p=Le(m.borderWidth);return{text:e[d.index].label,fillStyle:m.backgroundColor,fontColor:c,hidden:!d.visible,lineCap:m.borderCapStyle,lineDash:m.borderDash,lineDashOffset:m.borderDashOffset,lineJoin:m.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:m.borderColor,pointStyle:a||m.pointStyle,rotation:m.rotation,textAlign:o||m.textAlign,borderRadius:u&&(f||m.borderRadius),datasetIndex:d.index}},this)}},title:{color:s=>s.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:s=>!s.startsWith("on"),labels:{_scriptable:s=>!["generateLabels","filter","sort"].includes(s)}}};class ay extends kn{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,i){const a=this.options;if(this.left=0,this.top=0,!a.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=i;const o=Kt(a.text)?a.text.length:1;this._padding=Le(a.padding);const c=o*re(a.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=c:this.width=c}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:i,left:a,bottom:o,right:c,options:u}=this,f=u.align;let d=0,m,p,b;return this.isHorizontal()?(p=ue(f,a,c),b=i+e,m=c-a):(u.position==="left"?(p=a+e,b=ue(f,o,i),d=Dt*-.5):(p=c-e,b=ue(f,i,o),d=Dt*.5),m=o-i),{titleX:p,titleY:b,maxWidth:m,rotation:d}}draw(){const e=this.ctx,i=this.options;if(!i.display)return;const a=re(i.font),c=a.lineHeight/2+this._padding.top,{titleX:u,titleY:f,maxWidth:d,rotation:m}=this._drawArgs(c);Ia(e,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:m,textAlign:rf(i.align),textBaseline:"middle",translation:[u,f]})}}function C2(s,e){const i=new ay({ctx:s.ctx,options:e,chart:s});Ke.configure(s,i,e),Ke.addBox(s,i),s.titleBlock=i}var D2={id:"title",_element:ay,start(s,e,i){C2(s,i)},stop(s){const e=s.titleBlock;Ke.removeBox(s,e),delete s.titleBlock},beforeUpdate(s,e,i){const a=s.titleBlock;Ke.configure(s,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ua={average(s){if(!s.length)return!1;let e,i,a=new Set,o=0,c=0;for(e=0,i=s.length;e<i;++e){const f=s[e].element;if(f&&f.hasValue()){const d=f.tooltipPosition();a.add(d.x),o+=d.y,++c}}return c===0||a.size===0?!1:{x:[...a].reduce((f,d)=>f+d)/a.size,y:o/c}},nearest(s,e){if(!s.length)return!1;let i=e.x,a=e.y,o=Number.POSITIVE_INFINITY,c,u,f;for(c=0,u=s.length;c<u;++c){const d=s[c].element;if(d&&d.hasValue()){const m=d.getCenterPoint(),p=Fu(e,m);p<o&&(o=p,f=d)}}if(f){const d=f.tooltipPosition();i=d.x,a=d.y}return{x:i,y:a}}};function an(s,e){return e&&(Kt(e)?Array.prototype.push.apply(s,e):s.push(e)),s}function Dn(s){return(typeof s=="string"||s instanceof String)&&s.indexOf(`
|
|
10
10
|
`)>-1?s.split(`
|
|
11
|
-
`):s}function A2(s,e){const{element:i,datasetIndex:a,index:o}=e,c=s.getDatasetMeta(a).controller,{label:u,value:f}=c.getLabelAndValue(o);return{chart:s,label:u,parsed:c.getParsed(o),raw:s.data.datasets[a].data[o],formattedValue:f,dataset:c.getDataset(),dataIndex:o,datasetIndex:a,element:i}}function Lp(s,e){const i=s.chart.ctx,{body:a,footer:o,title:c}=s,{boxWidth:u,boxHeight:f}=e,d=re(e.bodyFont),m=re(e.titleFont),p=re(e.footerFont),b=c.length,v=o.length,S=a.length,T=Le(e.padding);let M=T.height,A=0,D=a.reduce((G,Y)=>G+Y.before.length+Y.lines.length+Y.after.length,0);if(D+=s.beforeBody.length+s.afterBody.length,b&&(M+=b*m.lineHeight+(b-1)*e.titleSpacing+e.titleMarginBottom),D){const G=e.displayColors?Math.max(f,d.lineHeight):d.lineHeight;M+=S*G+(D-S)*d.lineHeight+(D-1)*e.bodySpacing}v&&(M+=e.footerMarginTop+v*p.lineHeight+(v-1)*e.footerSpacing);let L=0;const q=function(G){A=Math.max(A,i.measureText(G).width+L)};return i.save(),i.font=m.string,At(s.title,q),i.font=d.string,At(s.beforeBody.concat(s.afterBody),q),L=e.displayColors?u+2+e.boxPadding:0,At(a,G=>{At(G.before,q),At(G.lines,q),At(G.after,q)}),L=0,i.font=p.string,At(s.footer,q),i.restore(),A+=T.width,{width:A,height:M}}function O2(s,e){const{y:i,height:a}=e;return i<a/2?"top":i>s.height-a/2?"bottom":"center"}function C2(s,e,i,a){const{x:o,width:c}=a,u=i.caretSize+i.caretPadding;if(s==="left"&&o+c+u>e.width||s==="right"&&o-c-u<0)return!0}function D2(s,e,i,a){const{x:o,width:c}=i,{width:u,chartArea:{left:f,right:d}}=s;let m="center";return a==="center"?m=o<=(f+d)/2?"left":"right":o<=c/2?m="left":o>=u-c/2&&(m="right"),C2(m,s,e,i)&&(m="center"),m}function Hp(s,e,i){const a=i.yAlign||e.yAlign||O2(s,i);return{xAlign:i.xAlign||e.xAlign||D2(s,e,i,a),yAlign:a}}function z2(s,e){let{x:i,width:a}=s;return e==="right"?i-=a:e==="center"&&(i-=a/2),i}function w2(s,e,i){let{y:a,height:o}=s;return e==="top"?a+=i:e==="bottom"?a-=o+i:a-=o/2,a}function Bp(s,e,i,a){const{caretSize:o,caretPadding:c,cornerRadius:u}=s,{xAlign:f,yAlign:d}=i,m=o+c,{topLeft:p,topRight:b,bottomLeft:v,bottomRight:S}=zs(u);let T=z2(e,f);const M=w2(e,d,m);return d==="center"?f==="left"?T+=m:f==="right"&&(T-=m):f==="left"?T-=Math.max(p,v)+o:f==="right"&&(T+=Math.max(b,S)+o),{x:fe(T,0,a.width-e.width),y:fe(M,0,a.height-e.height)}}function zo(s,e,i){const a=Le(i.padding);return e==="center"?s.x+s.width/2:e==="right"?s.x+s.width-a.right:s.x+a.left}function Up(s){return an([],Dn(s))}function j2(s,e,i){return qi(s,{tooltip:e,tooltipItems:i,type:"tooltip"})}function Vp(s,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?s.override(i):s}const sy={beforeTitle:On,title(s){if(s.length>0){const e=s[0],i=e.chart.data.labels,a=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(a>0&&e.dataIndex<a)return i[e.dataIndex]}return""},afterTitle:On,beforeBody:On,beforeLabel:On,label(s){if(this&&this.options&&this.options.mode==="dataset")return s.label+": "+s.formattedValue||s.formattedValue;let e=s.dataset.label||"";e&&(e+=": ");const i=s.formattedValue;return xt(i)||(e+=i),e},labelColor(s){const i=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(s){const i=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:On,afterBody:On,beforeFooter:On,footer:On,afterFooter:On};function Se(s,e,i,a){const o=s[e].call(i,a);return typeof o>"u"?sy[e].call(i,a):o}class Yp extends Nn{static positioners=Ua;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const i=this.chart,a=this.options.setContext(this.getContext()),o=a.enabled&&i.options.animation&&a.animations,c=new L0(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=j2(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,i){const{callbacks:a}=i,o=Se(a,"beforeTitle",this,e),c=Se(a,"title",this,e),u=Se(a,"afterTitle",this,e);let f=[];return f=an(f,Dn(o)),f=an(f,Dn(c)),f=an(f,Dn(u)),f}getBeforeBody(e,i){return Up(Se(i.callbacks,"beforeBody",this,e))}getBody(e,i){const{callbacks:a}=i,o=[];return At(e,c=>{const u={before:[],lines:[],after:[]},f=Vp(a,c);an(u.before,Dn(Se(f,"beforeLabel",this,c))),an(u.lines,Se(f,"label",this,c)),an(u.after,Dn(Se(f,"afterLabel",this,c))),o.push(u)}),o}getAfterBody(e,i){return Up(Se(i.callbacks,"afterBody",this,e))}getFooter(e,i){const{callbacks:a}=i,o=Se(a,"beforeFooter",this,e),c=Se(a,"footer",this,e),u=Se(a,"afterFooter",this,e);let f=[];return f=an(f,Dn(o)),f=an(f,Dn(c)),f=an(f,Dn(u)),f}_createItems(e){const i=this._active,a=this.chart.data,o=[],c=[],u=[];let f=[],d,m;for(d=0,m=i.length;d<m;++d)f.push(A2(this.chart,i[d]));return e.filter&&(f=f.filter((p,b,v)=>e.filter(p,b,v,a))),e.itemSort&&(f=f.sort((p,b)=>e.itemSort(p,b,a))),At(f,p=>{const b=Vp(e.callbacks,p);o.push(Se(b,"labelColor",this,p)),c.push(Se(b,"labelPointStyle",this,p)),u.push(Se(b,"labelTextColor",this,p))}),this.labelColors=o,this.labelPointStyles=c,this.labelTextColors=u,this.dataPoints=f,f}update(e,i){const a=this.options.setContext(this.getContext()),o=this._active;let c,u=[];if(!o.length)this.opacity!==0&&(c={opacity:0});else{const f=Ua[a.position].call(this,o,this._eventPosition);u=this._createItems(a),this.title=this.getTitle(u,a),this.beforeBody=this.getBeforeBody(u,a),this.body=this.getBody(u,a),this.afterBody=this.getAfterBody(u,a),this.footer=this.getFooter(u,a);const d=this._size=Lp(this,a),m=Object.assign({},f,d),p=Hp(this.chart,a,m),b=Bp(a,m,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,c={opacity:1,x:b.x,y:b.y,width:d.width,height:d.height,caretX:f.x,caretY:f.y}}this._tooltipItems=u,this.$context=void 0,c&&this._resolveAnimations().update(this,c),e&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(e,i,a,o){const c=this.getCaretPosition(e,a,o);i.lineTo(c.x1,c.y1),i.lineTo(c.x2,c.y2),i.lineTo(c.x3,c.y3)}getCaretPosition(e,i,a){const{xAlign:o,yAlign:c}=this,{caretSize:u,cornerRadius:f}=a,{topLeft:d,topRight:m,bottomLeft:p,bottomRight:b}=zs(f),{x:v,y:S}=e,{width:T,height:M}=i;let A,D,L,q,G,Y;return c==="center"?(G=S+M/2,o==="left"?(A=v,D=A-u,q=G+u,Y=G-u):(A=v+T,D=A+u,q=G-u,Y=G+u),L=A):(o==="left"?D=v+Math.max(d,p)+u:o==="right"?D=v+T-Math.max(m,b)-u:D=this.caretX,c==="top"?(q=S,G=q-u,A=D-u,L=D+u):(q=S+M,G=q+u,A=D+u,L=D-u),Y=q),{x1:A,x2:D,x3:L,y1:q,y2:G,y3:Y}}drawTitle(e,i,a){const o=this.title,c=o.length;let u,f,d;if(c){const m=ws(a.rtl,this.x,this.width);for(e.x=zo(this,a.titleAlign,a),i.textAlign=m.textAlign(a.titleAlign),i.textBaseline="middle",u=re(a.titleFont),f=a.titleSpacing,i.fillStyle=a.titleColor,i.font=u.string,d=0;d<c;++d)i.fillText(o[d],m.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+f,d+1===c&&(e.y+=a.titleMarginBottom-f)}}_drawColorBox(e,i,a,o,c){const u=this.labelColors[a],f=this.labelPointStyles[a],{boxHeight:d,boxWidth:m}=c,p=re(c.bodyFont),b=zo(this,"left",c),v=o.x(b),S=d<p.lineHeight?(p.lineHeight-d)/2:0,T=i.y+S;if(c.usePointStyle){const M={radius:Math.min(m,d)/2,pointStyle:f.pointStyle,rotation:f.rotation,borderWidth:1},A=o.leftForLtr(v,m)+m/2,D=T+d/2;e.strokeStyle=c.multiKeyBackground,e.fillStyle=c.multiKeyBackground,Ku(e,M,A,D),e.strokeStyle=u.borderColor,e.fillStyle=u.backgroundColor,Ku(e,M,A,D)}else{e.lineWidth=pt(u.borderWidth)?Math.max(...Object.values(u.borderWidth)):u.borderWidth||1,e.strokeStyle=u.borderColor,e.setLineDash(u.borderDash||[]),e.lineDashOffset=u.borderDashOffset||0;const M=o.leftForLtr(v,m),A=o.leftForLtr(o.xPlus(v,1),m-2),D=zs(u.borderRadius);Object.values(D).some(L=>L!==0)?(e.beginPath(),e.fillStyle=c.multiKeyBackground,qo(e,{x:M,y:T,w:m,h:d,radius:D}),e.fill(),e.stroke(),e.fillStyle=u.backgroundColor,e.beginPath(),qo(e,{x:A,y:T+1,w:m-2,h:d-2,radius:D}),e.fill()):(e.fillStyle=c.multiKeyBackground,e.fillRect(M,T,m,d),e.strokeRect(M,T,m,d),e.fillStyle=u.backgroundColor,e.fillRect(A,T+1,m-2,d-2))}e.fillStyle=this.labelTextColors[a]}drawBody(e,i,a){const{body:o}=this,{bodySpacing:c,bodyAlign:u,displayColors:f,boxHeight:d,boxWidth:m,boxPadding:p}=a,b=re(a.bodyFont);let v=b.lineHeight,S=0;const T=ws(a.rtl,this.x,this.width),M=function(Z){i.fillText(Z,T.x(e.x+S),e.y+v/2),e.y+=v+c},A=T.textAlign(u);let D,L,q,G,Y,K,X;for(i.textAlign=u,i.textBaseline="middle",i.font=b.string,e.x=zo(this,A,a),i.fillStyle=a.bodyColor,At(this.beforeBody,M),S=f&&A!=="right"?u==="center"?m/2+p:m+2+p:0,G=0,K=o.length;G<K;++G){for(D=o[G],L=this.labelTextColors[G],i.fillStyle=L,At(D.before,M),q=D.lines,f&&q.length&&(this._drawColorBox(i,e,G,T,a),v=Math.max(b.lineHeight,d)),Y=0,X=q.length;Y<X;++Y)M(q[Y]),v=b.lineHeight;At(D.after,M)}S=0,v=b.lineHeight,At(this.afterBody,M),e.y-=c}drawFooter(e,i,a){const o=this.footer,c=o.length;let u,f;if(c){const d=ws(a.rtl,this.x,this.width);for(e.x=zo(this,a.footerAlign,a),e.y+=a.footerMarginTop,i.textAlign=d.textAlign(a.footerAlign),i.textBaseline="middle",u=re(a.footerFont),i.fillStyle=a.footerColor,i.font=u.string,f=0;f<c;++f)i.fillText(o[f],d.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+a.footerSpacing}}drawBackground(e,i,a,o){const{xAlign:c,yAlign:u}=this,{x:f,y:d}=e,{width:m,height:p}=a,{topLeft:b,topRight:v,bottomLeft:S,bottomRight:T}=zs(o.cornerRadius);i.fillStyle=o.backgroundColor,i.strokeStyle=o.borderColor,i.lineWidth=o.borderWidth,i.beginPath(),i.moveTo(f+b,d),u==="top"&&this.drawCaret(e,i,a,o),i.lineTo(f+m-v,d),i.quadraticCurveTo(f+m,d,f+m,d+v),u==="center"&&c==="right"&&this.drawCaret(e,i,a,o),i.lineTo(f+m,d+p-T),i.quadraticCurveTo(f+m,d+p,f+m-T,d+p),u==="bottom"&&this.drawCaret(e,i,a,o),i.lineTo(f+S,d+p),i.quadraticCurveTo(f,d+p,f,d+p-S),u==="center"&&c==="left"&&this.drawCaret(e,i,a,o),i.lineTo(f,d+b),i.quadraticCurveTo(f,d,f+b,d),i.closePath(),i.fill(),o.borderWidth>0&&i.stroke()}_updateAnimationTarget(e){const i=this.chart,a=this.$animations,o=a&&a.x,c=a&&a.y;if(o||c){const u=Ua[e.position].call(this,this._active,this._eventPosition);if(!u)return;const f=this._size=Lp(this,e),d=Object.assign({},u,this._size),m=Hp(i,e,d),p=Bp(e,d,m,i);(o._to!==p.x||c._to!==p.y)&&(this.xAlign=m.xAlign,this.yAlign=m.yAlign,this.width=f.width,this.height=f.height,this.caretX=u.x,this.caretY=u.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(e){const i=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(i);const o={width:this.width,height:this.height},c={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const u=Le(i.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&f&&(e.save(),e.globalAlpha=a,this.drawBackground(c,e,o,i),z0(e,i.textDirection),c.y+=u.top,this.drawTitle(c,e,i),this.drawBody(c,e,i),this.drawFooter(c,e,i),w0(e,i.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,i){const a=this._active,o=e.map(({datasetIndex:f,index:d})=>{const m=this.chart.getDatasetMeta(f);if(!m)throw new Error("Cannot find a dataset at index "+f);return{datasetIndex:f,element:m.data[d],index:d}}),c=!Uo(a,o),u=this._positionChanged(o,i);(c||u)&&(this._active=o,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,i,a=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,c=this._active||[],u=this._getActiveElements(e,c,i,a),f=this._positionChanged(u,e),d=i||!Uo(u,c)||f;return d&&(this._active=u,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,i))),d}_getActiveElements(e,i,a,o){const c=this.options;if(e.type==="mouseout")return[];if(!o)return i.filter(f=>this.chart.data.datasets[f.datasetIndex]&&this.chart.getDatasetMeta(f.datasetIndex).controller.getParsed(f.index)!==void 0);const u=this.chart.getElementsAtEventForMode(e,c.mode,c,a);return c.reverse&&u.reverse(),u}_positionChanged(e,i){const{caretX:a,caretY:o,options:c}=this,u=Ua[c.position].call(this,e,i);return u!==!1&&(a!==u.x||o!==u.y)}}var R2={id:"tooltip",_element:Yp,positioners:Ua,afterInit(s,e,i){i&&(s.tooltip=new Yp({chart:s,options:i}))},beforeUpdate(s,e,i){s.tooltip&&s.tooltip.initialize(i)},reset(s,e,i){s.tooltip&&s.tooltip.initialize(i)},afterDraw(s){const e=s.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(s.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0})===!1)return;e.draw(s.ctx),s.notifyPlugins("afterTooltipDraw",i)}},afterEvent(s,e){if(s.tooltip){const i=e.replay;s.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(s,e)=>e.bodyFont.size,boxWidth:(s,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:sy},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:s=>s!=="filter"&&s!=="itemSort"&&s!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const k2=(s,e,i,a)=>(typeof e=="string"?(i=s.push(e)-1,a.unshift({index:i,label:e})):isNaN(e)&&(i=null),i);function N2(s,e,i,a){const o=s.indexOf(e);if(o===-1)return k2(s,e,i,a);const c=s.lastIndexOf(e);return o!==c?i:o}const L2=(s,e)=>s===null?null:fe(Math.round(s),0,e);function qp(s){const e=this.getLabels();return s>=0&&s<e.length?e[s]:s}class H2 extends Ns{static id="category";static defaults={ticks:{callback:qp}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const i=this._addedLabels;if(i.length){const a=this.getLabels();for(const{index:o,label:c}of i)a[o]===c&&a.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,i){if(xt(e))return null;const a=this.getLabels();return i=isFinite(i)&&a[i]===e?i:N2(a,e,ht(i,e),this._addedLabels),L2(i,a.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:a,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(a=0),i||(o=this.getLabels().length-1)),this.min=a,this.max=o}buildTicks(){const e=this.min,i=this.max,a=this.options.offset,o=[];let c=this.getLabels();c=e===0&&i===c.length-1?c:c.slice(e,i+1),this._valueRange=Math.max(c.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let u=e;u<=i;u++)o.push({value:u});return o}getLabelForValue(e){return qp.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function B2(s,e){const i=[],{bounds:o,step:c,min:u,max:f,precision:d,count:m,maxTicks:p,maxDigits:b,includeBounds:v}=s,S=c||1,T=p-1,{min:M,max:A}=e,D=!xt(u),L=!xt(f),q=!xt(m),G=(A-M)/(b+1);let Y=Bm((A-M)/T/S)*S,K,X,Z,tt;if(Y<1e-14&&!D&&!L)return[{value:M},{value:A}];tt=Math.ceil(A/Y)-Math.floor(M/Y),tt>T&&(Y=Bm(tt*Y/T/S)*S),xt(d)||(K=Math.pow(10,d),Y=Math.ceil(Y*K)/K),o==="ticks"?(X=Math.floor(M/Y)*Y,Z=Math.ceil(A/Y)*Y):(X=M,Z=A),D&&L&&c&&Lx((f-u)/c,Y/1e3)?(tt=Math.round(Math.min((f-u)/Y,p)),Y=(f-u)/tt,X=u,Z=f):q?(X=D?u:X,Z=L?f:Z,tt=m-1,Y=(Z-X)/tt):(tt=(Z-X)/Y,Ya(tt,Math.round(tt),Y/1e3)?tt=Math.round(tt):tt=Math.ceil(tt));const rt=Math.max(Um(Y),Um(X));K=Math.pow(10,xt(d)?rt:d),X=Math.round(X*K)/K,Z=Math.round(Z*K)/K;let it=0;for(D&&(v&&X!==u?(i.push({value:u}),X<u&&it++,Ya(Math.round((X+it*Y)*K)/K,u,Xp(u,G,s))&&it++):X<u&&it++);it<tt;++it){const st=Math.round((X+it*Y)*K)/K;if(L&&st>f)break;i.push({value:st})}return L&&v&&Z!==f?i.length&&Ya(i[i.length-1].value,f,Xp(f,G,s))?i[i.length-1].value=f:i.push({value:f}):(!L||Z===f)&&i.push({value:Z}),i}function Xp(s,e,{horizontal:i,minRotation:a}){const o=jn(a),c=(i?Math.sin(o):Math.cos(o))||.001,u=.75*e*(""+s).length;return Math.min(e/c,u)}class U2 extends Ns{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,i){return xt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:i,maxDefined:a}=this.getUserBounds();let{min:o,max:c}=this;const u=d=>o=i?o:d,f=d=>c=a?c:d;if(e){const d=on(o),m=on(c);d<0&&m<0?f(0):d>0&&m>0&&u(0)}if(o===c){let d=c===0?1:Math.abs(c*.05);f(c+d),e||u(o-d)}this.min=o,this.max=c}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:i,stepSize:a}=e,o;return a?(o=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),i=i||11),i&&(o=Math.min(i,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,i=e.ticks;let a=this.getTickLimit();a=Math.max(2,a);const o={maxTicks:a,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:i.minRotation||0,includeBounds:i.includeBounds!==!1},c=this._range||this,u=B2(o,c);return e.bounds==="ticks"&&Hx(u,this,"value"),e.reverse?(u.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),u}configure(){const e=this.ticks;let i=this.min,a=this.max;if(super.configure(),this.options.offset&&e.length){const o=(a-i)/Math.max(e.length-1,1)/2;i-=o,a+=o}this._startValue=i,this._endValue=a,this._valueRange=a-i}getLabelForValue(e){return cf(e,this.chart.options.locale,this.options.ticks.format)}}class V2 extends U2{static id="linear";static defaults={ticks:{callback:S0.formatters.numeric}};determineDataLimits(){const{min:e,max:i}=this.getMinMax(!0);this.min=he(e)?e:0,this.max=he(i)?i:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),i=e?this.width:this.height,a=jn(this.options.ticks.minRotation),o=(e?Math.sin(a):Math.cos(a))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,c.lineHeight/o))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const tr={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}},Me=Object.keys(tr);function Gp(s,e){return s-e}function Qp(s,e){if(xt(e))return null;const i=s._adapter,{parser:a,round:o,isoWeekday:c}=s._parseOpts;let u=e;return typeof a=="function"&&(u=a(u)),he(u)||(u=typeof a=="string"?i.parse(u,a):i.parse(u)),u===null?null:(o&&(u=o==="week"&&(Ka(c)||c===!0)?i.startOf(u,"isoWeek",c):i.startOf(u,o)),+u)}function Zp(s,e,i,a){const o=Me.length;for(let c=Me.indexOf(s);c<o-1;++c){const u=tr[Me[c]],f=u.steps?u.steps:Number.MAX_SAFE_INTEGER;if(u.common&&Math.ceil((i-e)/(f*u.size))<=a)return Me[c]}return Me[o-1]}function Y2(s,e,i,a,o){for(let c=Me.length-1;c>=Me.indexOf(i);c--){const u=Me[c];if(tr[u].common&&s._adapter.diff(o,a,u)>=e-1)return u}return Me[i?Me.indexOf(i):0]}function q2(s){for(let e=Me.indexOf(s)+1,i=Me.length;e<i;++e)if(tr[Me[e]].common)return Me[e]}function Fp(s,e,i){if(!i)s[e]=!0;else if(i.length){const{lo:a,hi:o}=lf(i,e),c=i[a]>=e?i[a]:i[o];s[c]=!0}}function X2(s,e,i,a){const o=s._adapter,c=+o.startOf(e[0].value,a),u=e[e.length-1].value;let f,d;for(f=c;f<=u;f=+o.add(f,1,a))d=i[f],d>=0&&(e[d].major=!0);return e}function Kp(s,e,i){const a=[],o={},c=e.length;let u,f;for(u=0;u<c;++u)f=e[u],o[f]=u,a.push({value:f,major:!1});return c===0||!i?a:X2(s,a,o,i)}class Wp extends Ns{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,i={}){const a=e.time||(e.time={}),o=this._adapter=new T1._date(e.adapters.date);o.init(i),Va(a.displayFormats,o.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(e),this._normalized=i.normalized}parse(e,i){return e===void 0?null:Qp(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,i=this._adapter,a=e.time.unit||"day";let{min:o,max:c,minDefined:u,maxDefined:f}=this.getUserBounds();function d(m){!u&&!isNaN(m.min)&&(o=Math.min(o,m.min)),!f&&!isNaN(m.max)&&(c=Math.max(c,m.max))}(!u||!f)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),o=he(o)&&!isNaN(o)?o:+i.startOf(Date.now(),a),c=he(c)&&!isNaN(c)?c:+i.endOf(Date.now(),a)+1,this.min=Math.min(o,c-1),this.max=Math.max(o+1,c)}_getLabelBounds(){const e=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return e.length&&(i=e[0],a=e[e.length-1]),{min:i,max:a}}buildTicks(){const e=this.options,i=e.time,a=e.ticks,o=a.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const c=this.min,u=this.max,f=qx(o,c,u);return this._unit=i.unit||(a.autoSkip?Zp(i.minUnit,this.min,this.max,this._getLabelCapacity(c)):Y2(this,f.length,i.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:q2(this._unit),this.initOffsets(o),e.reverse&&f.reverse(),Kp(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let i=0,a=0,o,c;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?i=1-o:i=(this.getDecimalForValue(e[1])-o)/2,c=this.getDecimalForValue(e[e.length-1]),e.length===1?a=c:a=(c-this.getDecimalForValue(e[e.length-2]))/2);const u=e.length<3?.5:.25;i=fe(i,0,u),a=fe(a,0,u),this._offsets={start:i,end:a,factor:1/(i+1+a)}}_generate(){const e=this._adapter,i=this.min,a=this.max,o=this.options,c=o.time,u=c.unit||Zp(c.minUnit,i,a,this._getLabelCapacity(i)),f=ht(o.ticks.stepSize,1),d=u==="week"?c.isoWeekday:!1,m=Ka(d)||d===!0,p={};let b=i,v,S;if(m&&(b=+e.startOf(b,"isoWeek",d)),b=+e.startOf(b,m?"day":u),e.diff(a,i,u)>1e5*f)throw new Error(i+" and "+a+" are too far apart with stepSize of "+f+" "+u);const T=o.ticks.source==="data"&&this.getDataTimestamps();for(v=b,S=0;v<a;v=+e.add(v,f,u),S++)Fp(p,v,T);return(v===a||o.bounds==="ticks"||S===1)&&Fp(p,v,T),Object.keys(p).sort(Gp).map(M=>+M)}getLabelForValue(e){const i=this._adapter,a=this.options.time;return a.tooltipFormat?i.format(e,a.tooltipFormat):i.format(e,a.displayFormats.datetime)}format(e,i){const o=this.options.time.displayFormats,c=this._unit,u=i||o[c];return this._adapter.format(e,u)}_tickFormatFunction(e,i,a,o){const c=this.options,u=c.ticks.callback;if(u)return kt(u,[e,i,a],this);const f=c.time.displayFormats,d=this._unit,m=this._majorUnit,p=d&&f[d],b=m&&f[m],v=a[i],S=m&&b&&v&&v.major;return this._adapter.format(e,o||(S?b:p))}generateTickLabels(e){let i,a,o;for(i=0,a=e.length;i<a;++i)o=e[i],o.label=this._tickFormatFunction(o.value,i,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const i=this._offsets,a=this.getDecimalForValue(e);return this.getPixelForDecimal((i.start+a)*i.factor)}getValueForPixel(e){const i=this._offsets,a=this.getDecimalForPixel(e)/i.factor-i.end;return this.min+a*(this.max-this.min)}_getLabelSize(e){const i=this.options.ticks,a=this.ctx.measureText(e).width,o=jn(this.isHorizontal()?i.maxRotation:i.minRotation),c=Math.cos(o),u=Math.sin(o),f=this._resolveTickFontOptions(0).size;return{w:a*c+f*u,h:a*u+f*c}}_getLabelCapacity(e){const i=this.options.time,a=i.displayFormats,o=a[i.unit]||a.millisecond,c=this._tickFormatFunction(e,0,Kp(this,[e],this._majorUnit),o),u=this._getLabelSize(c),f=Math.floor(this.isHorizontal()?this.width/u.w:this.height/u.h)-1;return f>0?f:1}getDataTimestamps(){let e=this._cache.data||[],i,a;if(e.length)return e;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(i=0,a=o.length;i<a;++i)e=e.concat(o[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let i,a;if(e.length)return e;const o=this.getLabels();for(i=0,a=o.length;i<a;++i)e.push(Qp(this,o[i]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return v0(e.sort(Gp))}}function wo(s,e,i){let a=0,o=s.length-1,c,u,f,d;i?(e>=s[a].pos&&e<=s[o].pos&&({lo:a,hi:o}=Bi(s,"pos",e)),{pos:c,time:f}=s[a],{pos:u,time:d}=s[o]):(e>=s[a].time&&e<=s[o].time&&({lo:a,hi:o}=Bi(s,"time",e)),{time:c,pos:f}=s[a],{time:u,pos:d}=s[o]);const m=u-c;return m?f+(d-f)*(e-c)/m:f}class XM extends Wp{static id="timeseries";static defaults=Wp.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),i=this._table=this.buildLookupTable(e);this._minPos=wo(i,this.min),this._tableRange=wo(i,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:i,max:a}=this,o=[],c=[];let u,f,d,m,p;for(u=0,f=e.length;u<f;++u)m=e[u],m>=i&&m<=a&&o.push(m);if(o.length<2)return[{time:i,pos:0},{time:a,pos:1}];for(u=0,f=o.length;u<f;++u)p=o[u+1],d=o[u-1],m=o[u],Math.round((p+d)/2)!==m&&c.push({time:m,pos:u/(f-1)});return c}_generate(){const e=this.min,i=this.max;let a=super.getDataTimestamps();return(!a.includes(e)||!a.length)&&a.splice(0,0,e),(!a.includes(i)||a.length===1)&&a.push(i),a.sort((o,c)=>o-c)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const i=this.getDataTimestamps(),a=this.getLabelTimestamps();return i.length&&a.length?e=this.normalize(i.concat(a)):e=i.length?i:a,e=this._cache.all=e,e}getDecimalForValue(e){return(wo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const i=this._offsets,a=this.getDecimalForPixel(e)/i.factor-i.end;return wo(this._table,a*this._tableRange+this._minPos,!0)}}var Jp=(function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var s=window.screen;if(s)return(s.deviceXDPI||1)/(s.logicalXDPI||1)}return 1})(),Ga={toTextLines:function(s){var e=[],i;for(s=[].concat(s);s.length;)i=s.pop(),typeof i=="string"?e.unshift.apply(e,i.split(`
|
|
12
|
-
`)):Array.isArray(i)?s.push.apply(s,i):xt(s)||e.unshift(""+i);return e},textSize:function(s,e,i){var a=[].concat(e),o=a.length,c=s.font,u=0,f;for(s.font=i.string,f=0;f<o;++f)u=Math.max(s.measureText(a[f]).width,u);return s.font=c,{height:o*i.lineHeight,width:u}},bound:function(s,e,i){return Math.max(s,Math.min(e,i))},arrayDiff:function(s,e){var i=s.slice(),a=[],o,c,u,f;for(o=0,u=e.length;o<u;++o)f=e[o],c=i.indexOf(f),c===-1?a.push([f,1]):i.splice(c,1);for(o=0,u=i.length;o<u;++o)a.push([i[o],-1]);return a},rasterize:function(s){return Math.round(s*Jp)/Jp}};function Uu(s,e){var i=e.x,a=e.y;if(i===null)return{x:0,y:-1};if(a===null)return{x:1,y:0};var o=s.x-i,c=s.y-a,u=Math.sqrt(o*o+c*c);return{x:u?o/u:0,y:u?c/u:-1}}function G2(s,e,i,a,o){switch(o){case"center":i=a=0;break;case"bottom":i=0,a=1;break;case"right":i=1,a=0;break;case"left":i=-1,a=0;break;case"top":i=0,a=-1;break;case"start":i=-i,a=-a;break;case"end":break;default:o*=Math.PI/180,i=Math.cos(o),a=Math.sin(o);break}return{x:s,y:e,vx:i,vy:a}}var Q2=0,ay=1,ly=2,oy=4,ry=8;function jo(s,e,i){var a=Q2;return s<i.left?a|=ay:s>i.right&&(a|=ly),e<i.top?a|=ry:e>i.bottom&&(a|=oy),a}function Z2(s,e){for(var i=s.x0,a=s.y0,o=s.x1,c=s.y1,u=jo(i,a,e),f=jo(o,c,e),d,m,p;!(!(u|f)||u&f);)d=u||f,d&ry?(m=i+(o-i)*(e.top-a)/(c-a),p=e.top):d&oy?(m=i+(o-i)*(e.bottom-a)/(c-a),p=e.bottom):d&ly?(p=a+(c-a)*(e.right-i)/(o-i),m=e.right):d&ay&&(p=a+(c-a)*(e.left-i)/(o-i),m=e.left),d===u?(i=m,a=p,u=jo(i,a,e)):(o=m,c=p,f=jo(o,c,e));return{x0:i,x1:o,y0:a,y1:c}}function Ro(s,e){var i=e.anchor,a=s,o,c;return e.clamp&&(a=Z2(a,e.area)),i==="start"?(o=a.x0,c=a.y0):i==="end"?(o=a.x1,c=a.y1):(o=(a.x0+a.x1)/2,c=(a.y0+a.y1)/2),G2(o,c,s.vx,s.vy,e.align)}var ko={arc:function(s,e){var i=(s.startAngle+s.endAngle)/2,a=Math.cos(i),o=Math.sin(i),c=s.innerRadius,u=s.outerRadius;return Ro({x0:s.x+a*c,y0:s.y+o*c,x1:s.x+a*u,y1:s.y+o*u,vx:a,vy:o},e)},point:function(s,e){var i=Uu(s,e.origin),a=i.x*s.options.radius,o=i.y*s.options.radius;return Ro({x0:s.x-a,y0:s.y-o,x1:s.x+a,y1:s.y+o,vx:i.x,vy:i.y},e)},bar:function(s,e){var i=Uu(s,e.origin),a=s.x,o=s.y,c=0,u=0;return s.horizontal?(a=Math.min(s.x,s.base),c=Math.abs(s.base-s.x)):(o=Math.min(s.y,s.base),u=Math.abs(s.base-s.y)),Ro({x0:a,y0:o+u,x1:a+c,y1:o,vx:i.x,vy:i.y},e)},fallback:function(s,e){var i=Uu(s,e.origin);return Ro({x0:s.x,y0:s.y,x1:s.x+(s.width||0),y1:s.y+(s.height||0),vx:i.x,vy:i.y},e)}},kn=Ga.rasterize;function F2(s){var e=s.borderWidth||0,i=s.padding,a=s.size.height,o=s.size.width,c=-o/2,u=-a/2;return{frame:{x:c-i.left-e,y:u-i.top-e,w:o+i.width+e*2,h:a+i.height+e*2},text:{x:c,y:u,w:o,h:a}}}function K2(s,e){var i=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!i)return null;if(i.xCenter!==void 0&&i.yCenter!==void 0)return{x:i.xCenter,y:i.yCenter};var a=i.getBasePixel();return s.horizontal?{x:a,y:null}:{x:null,y:a}}function W2(s){return s instanceof K0?ko.arc:s instanceof I0?ko.point:s instanceof $0?ko.bar:ko.fallback}function J2(s,e,i,a,o,c){var u=Math.PI/2;if(c){var f=Math.min(c,o/2,a/2),d=e+f,m=i+f,p=e+a-f,b=i+o-f;s.moveTo(e,m),d<p&&m<b?(s.arc(d,m,f,-Math.PI,-u),s.arc(p,m,f,-u,0),s.arc(p,b,f,0,u),s.arc(d,b,f,u,Math.PI)):d<p?(s.moveTo(d,i),s.arc(p,m,f,-u,u),s.arc(d,m,f,u,Math.PI+u)):m<b?(s.arc(d,m,f,-Math.PI,0),s.arc(d,b,f,0,Math.PI)):s.arc(d,m,f,-Math.PI,Math.PI),s.closePath(),s.moveTo(e,i)}else s.rect(e,i,a,o)}function I2(s,e,i){var a=i.backgroundColor,o=i.borderColor,c=i.borderWidth;!a&&(!o||!c)||(s.beginPath(),J2(s,kn(e.x)+c/2,kn(e.y)+c/2,kn(e.w)-c,kn(e.h)-c,i.borderRadius),s.closePath(),a&&(s.fillStyle=a,s.fill()),o&&c&&(s.strokeStyle=o,s.lineWidth=c,s.lineJoin="miter",s.stroke()))}function P2(s,e,i){var a=i.lineHeight,o=s.w,c=s.x,u=s.y+a/2;return e==="center"?c+=o/2:(e==="end"||e==="right")&&(c+=o),{h:a,w:o,x:c,y:u}}function $2(s,e,i){var a=s.shadowBlur,o=i.stroked,c=kn(i.x),u=kn(i.y),f=kn(i.w);o&&s.strokeText(e,c,u,f),i.filled&&(a&&o&&(s.shadowBlur=0),s.fillText(e,c,u,f),a&&o&&(s.shadowBlur=a))}function tT(s,e,i,a){var o=a.textAlign,c=a.color,u=!!c,f=a.font,d=e.length,m=a.textStrokeColor,p=a.textStrokeWidth,b=m&&p,v;if(!(!d||!u&&!b))for(i=P2(i,o,f),s.font=f.string,s.textAlign=o,s.textBaseline="middle",s.shadowBlur=a.textShadowBlur,s.shadowColor=a.textShadowColor,u&&(s.fillStyle=c),b&&(s.lineJoin="round",s.lineWidth=p,s.strokeStyle=m),v=0,d=e.length;v<d;++v)$2(s,e[v],{stroked:b,filled:u,w:i.w,x:i.x,y:i.y+i.h*v})}var cy=function(s,e,i,a){var o=this;o._config=s,o._index=a,o._model=null,o._rects=null,o._ctx=e,o._el=i};rn(cy.prototype,{_modelize:function(s,e,i,a){var o=this,c=o._index,u=re(Ut([i.font,{}],a,c)),f=Ut([i.color,Gt.color],a,c);return{align:Ut([i.align,"center"],a,c),anchor:Ut([i.anchor,"center"],a,c),area:a.chart.chartArea,backgroundColor:Ut([i.backgroundColor,null],a,c),borderColor:Ut([i.borderColor,null],a,c),borderRadius:Ut([i.borderRadius,0],a,c),borderWidth:Ut([i.borderWidth,0],a,c),clamp:Ut([i.clamp,!1],a,c),clip:Ut([i.clip,!1],a,c),color:f,display:s,font:u,lines:e,offset:Ut([i.offset,4],a,c),opacity:Ut([i.opacity,1],a,c),origin:K2(o._el,a),padding:Le(Ut([i.padding,4],a,c)),positioner:W2(o._el),rotation:Ut([i.rotation,0],a,c)*(Math.PI/180),size:Ga.textSize(o._ctx,e,u),textAlign:Ut([i.textAlign,"start"],a,c),textShadowBlur:Ut([i.textShadowBlur,0],a,c),textShadowColor:Ut([i.textShadowColor,f],a,c),textStrokeColor:Ut([i.textStrokeColor,f],a,c),textStrokeWidth:Ut([i.textStrokeWidth,0],a,c)}},update:function(s){var e=this,i=null,a=null,o=e._index,c=e._config,u,f,d,m=Ut([c.display,!0],s,o);m&&(u=s.dataset.data[o],f=ht(kt(c.formatter,[u,s]),u),d=xt(f)?[]:Ga.toTextLines(f),d.length&&(i=e._modelize(m,d,c,s),a=F2(i))),e._model=i,e._rects=a},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(s,e){var i=this,a=s.ctx,o=i._model,c=i._rects,u;this.visible()&&(a.save(),o.clip&&(u=o.area,a.beginPath(),a.rect(u.left,u.top,u.right-u.left,u.bottom-u.top),a.clip()),a.globalAlpha=Ga.bound(0,o.opacity,1),a.translate(kn(e.x),kn(e.y)),a.rotate(o.rotation),I2(a,c.frame,o),tT(a,o.lines,c.text,o),a.restore())}});var eT=Number.MIN_SAFE_INTEGER||-9007199254740991,nT=Number.MAX_SAFE_INTEGER||9007199254740991;function La(s,e,i){var a=Math.cos(i),o=Math.sin(i),c=e.x,u=e.y;return{x:c+a*(s.x-c)-o*(s.y-u),y:u+o*(s.x-c)+a*(s.y-u)}}function Ip(s,e){var i=nT,a=eT,o=e.origin,c,u,f,d,m;for(c=0;c<s.length;++c)u=s[c],f=u.x-o.x,d=u.y-o.y,m=e.vx*f+e.vy*d,i=Math.min(i,m),a=Math.max(a,m);return{min:i,max:a}}function No(s,e){var i=e.x-s.x,a=e.y-s.y,o=Math.sqrt(i*i+a*a);return{vx:(e.x-s.x)/o,vy:(e.y-s.y)/o,origin:s,ln:o}}var uy=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};rn(uy.prototype,{center:function(){var s=this._rect;return{x:s.x+s.w/2,y:s.y+s.h/2}},update:function(s,e,i){this._rotation=i,this._rect={x:e.x+s.x,y:e.y+s.y,w:e.w,h:e.h}},contains:function(s){var e=this,i=1,a=e._rect;return s=La(s,e.center(),-e._rotation),!(s.x<a.x-i||s.y<a.y-i||s.x>a.x+a.w+i*2||s.y>a.y+a.h+i*2)},intersects:function(s){var e=this._points(),i=s._points(),a=[No(e[0],e[1]),No(e[0],e[3])],o,c,u;for(this._rotation!==s._rotation&&a.push(No(i[0],i[1]),No(i[0],i[3])),o=0;o<a.length;++o)if(c=Ip(e,a[o]),u=Ip(i,a[o]),c.max<u.min||u.max<c.min)return!1;return!0},_points:function(){var s=this,e=s._rect,i=s._rotation,a=s.center();return[La({x:e.x,y:e.y},a,i),La({x:e.x+e.w,y:e.y},a,i),La({x:e.x+e.w,y:e.y+e.h},a,i),La({x:e.x,y:e.y+e.h},a,i)]}});function fy(s,e,i){var a=e.positioner(s,e),o=a.vx,c=a.vy;if(!o&&!c)return{x:a.x,y:a.y};var u=i.w,f=i.h,d=e.rotation,m=Math.abs(u/2*Math.cos(d))+Math.abs(f/2*Math.sin(d)),p=Math.abs(u/2*Math.sin(d))+Math.abs(f/2*Math.cos(d)),b=1/Math.max(Math.abs(o),Math.abs(c));return m*=o*b,p*=c*b,m+=e.offset*o,p+=e.offset*c,{x:a.x+m,y:a.y+p}}function iT(s,e){var i,a,o,c;for(i=s.length-1;i>=0;--i)for(o=s[i].$layout,a=i-1;a>=0&&o._visible;--a)c=s[a].$layout,c._visible&&o._box.intersects(c._box)&&e(o,c);return s}function sT(s){var e,i,a,o,c,u,f;for(e=0,i=s.length;e<i;++e)a=s[e],o=a.$layout,o._visible&&(f=new Proxy(a._el,{get:(d,m)=>d.getProps([m],!0)[m]}),c=a.geometry(),u=fy(f,a.model(),c),o._box.update(u,c,a.rotation()));return iT(s,function(d,m){var p=d._hidable,b=m._hidable;p&&b||b?m._visible=!1:p&&(d._visible=!1)})}var Qa={prepare:function(s){var e=[],i,a,o,c,u;for(i=0,o=s.length;i<o;++i)for(a=0,c=s[i].length;a<c;++a)u=s[i][a],e.push(u),u.$layout={_box:new uy,_hidable:!1,_visible:!0,_set:i,_idx:u._index};return e.sort(function(f,d){var m=f.$layout,p=d.$layout;return m._idx===p._idx?p._set-m._set:p._idx-m._idx}),this.update(e),e},update:function(s){var e=!1,i,a,o,c,u;for(i=0,a=s.length;i<a;++i)o=s[i],c=o.model(),u=o.$layout,u._hidable=c&&c.display==="auto",u._visible=o.visible(),e|=u._hidable;e&&sT(s)},lookup:function(s,e){var i,a;for(i=s.length-1;i>=0;--i)if(a=s[i].$layout,a&&a._visible&&a._box.contains(e))return s[i];return null},draw:function(s,e){var i,a,o,c,u,f;for(i=0,a=e.length;i<a;++i)o=e[i],c=o.$layout,c._visible&&(u=o.geometry(),f=fy(o._el,o.model(),u),c._box.update(f,u,o.rotation()),o.draw(s,f))}},aT=function(s){if(xt(s))return null;var e=s,i,a,o;if(pt(s))if(!xt(s.label))e=s.label;else if(!xt(s.r))e=s.r;else for(e="",i=Object.keys(s),o=0,a=i.length;o<a;++o)e+=(o!==0?", ":"")+i[o]+": "+s[i[o]];return""+e},lT={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:aT,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Te="$datalabels",hy="$default";function oT(s,e){var i=s.datalabels,a={},o=[],c,u;return i===!1?null:(i===!0&&(i={}),e=rn({},[e,i]),c=e.labels||{},u=Object.keys(c),delete e.labels,u.length?u.forEach(function(f){c[f]&&o.push(rn({},[e,c[f],{_key:f}]))}):o.push(e),a=o.reduce(function(f,d){return At(d.listeners||{},function(m,p){f[p]=f[p]||{},f[p][d._key||hy]=m}),delete d.listeners,f},{}),{labels:o,listeners:a})}function $u(s,e,i,a){if(e){var o=i.$context,c=i.$groups,u;e[c._set]&&(u=e[c._set][c._key],u&&kt(u,[o,a])===!0&&(s[Te]._dirty=!0,i.update(o)))}}function rT(s,e,i,a,o){var c,u;!i&&!a||(i?a?i!==a&&(u=c=!0):u=!0:c=!0,u&&$u(s,e.leave,i,o),c&&$u(s,e.enter,a,o))}function cT(s,e){var i=s[Te],a=i._listeners,o,c;if(!(!a.enter&&!a.leave)){if(e.type==="mousemove")c=Qa.lookup(i._labels,e);else if(e.type!=="mouseout")return;o=i._hovered,i._hovered=c,rT(s,a,o,c,e)}}function uT(s,e){var i=s[Te],a=i._listeners.click,o=a&&Qa.lookup(i._labels,e);o&&$u(s,a,o,e)}var fT={id:"datalabels",defaults:lT,beforeInit:function(s){s[Te]={_actives:[]}},beforeUpdate:function(s){var e=s[Te];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(s,e,i){var a=e.index,o=s[Te],c=o._datasets[a]=[],u=s.isDatasetVisible(a),f=s.data.datasets[a],d=oT(f,i),m=e.meta.data||[],p=s.ctx,b,v,S,T,M,A,D,L;for(p.save(),b=0,S=m.length;b<S;++b)if(D=m[b],D[Te]=[],u&&D&&s.getDataVisibility(b)&&!D.skip)for(v=0,T=d.labels.length;v<T;++v)M=d.labels[v],A=M._key,L=new cy(M,p,D,b),L.$groups={_set:a,_key:A||hy},L.$context={active:!1,chart:s,dataIndex:b,dataset:f,datasetIndex:a},L.update(L.$context),D[Te].push(L),c.push(L);p.restore(),rn(o._listeners,d.listeners,{merger:function(q,G,Y){G[q]=G[q]||{},G[q][e.index]=Y[q],o._listened=!0}})},afterUpdate:function(s){s[Te]._labels=Qa.prepare(s[Te]._datasets)},afterDatasetsDraw:function(s){Qa.draw(s,s[Te]._labels)},beforeEvent:function(s,e){if(s[Te]._listened){var i=e.event;switch(i.type){case"mousemove":case"mouseout":cT(s,i);break;case"click":uT(s,i);break}}},afterEvent:function(s){var e=s[Te],i=e._actives,a=e._actives=s.getActiveElements(),o=Ga.arrayDiff(i,a),c,u,f,d,m,p,b;for(c=0,u=o.length;c<u;++c)if(m=o[c],m[1])for(b=m[0].element[Te]||[],f=0,d=b.length;f<d;++f)p=b[f],p.$context.active=m[1]===1,p.update(p.$context);(e._dirty||o.length)&&(Qa.update(e._labels),s.render()),delete e._dirty}};const Vu=1e3;function hT(){if(typeof window>"u")return"light";const s=localStorage.getItem("smart-edit-theme");return s==="dark"||s==="light"?s:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function dT(){return typeof window>"u"?!1:localStorage.getItem("smart-edit-sidebar-collapsed")==="true"}function gT(){if(typeof window>"u")return"en";const s=localStorage.getItem("smart-edit-locale");return s==="ja"||s==="en"?s:navigator.language.toLowerCase().startsWith("ja")?"ja":"en"}function dy(){return{searchKeyword:"",logLevels:new Set,toolNames:new Set}}const mT={logs:[],maxLogIdx:-1,toolNames:[],toolStats:null,theme:hT(),locale:gT(),isStatsVisible:!1,connectionMode:"disconnected",activeProject:null,error:null,isLoading:!1,currentView:"dashboard",sidebarCollapsed:dT(),logFilter:dy(),currentSession:null,sessionHistory:[]};function pT(s,e){switch(e.type){case"SET_LOGS":return{...s,logs:e.logs.slice(-Vu),maxLogIdx:e.maxIdx};case"APPEND_LOG":{const i=[...s.logs,e.log];return{...s,logs:i.length>Vu?i.slice(-Vu):i,maxLogIdx:e.maxIdx}}case"SET_TOOL_NAMES":return{...s,toolNames:e.toolNames};case"SET_TOOL_STATS":return{...s,toolStats:e.stats};case"SET_THEME":return localStorage.setItem("smart-edit-theme",e.theme),document.documentElement.setAttribute("data-theme",e.theme),{...s,theme:e.theme};case"SET_LOCALE":return localStorage.setItem("smart-edit-locale",e.locale),{...s,locale:e.locale};case"TOGGLE_STATS":return{...s,isStatsVisible:!s.isStatsVisible};case"SET_CONNECTION_MODE":return{...s,connectionMode:e.mode};case"SET_ACTIVE_PROJECT":return{...s,activeProject:e.project};case"SET_ERROR":return{...s,error:e.error};case"SET_LOADING":return{...s,isLoading:e.isLoading};case"CLEAR_LOGS":return{...s,logs:[],maxLogIdx:-1};case"SET_CURRENT_VIEW":return{...s,currentView:e.view};case"TOGGLE_SIDEBAR":{const i=!s.sidebarCollapsed;return localStorage.setItem("smart-edit-sidebar-collapsed",String(i)),{...s,sidebarCollapsed:i}}case"SET_LOG_FILTER":return{...s,logFilter:{...s.logFilter,...e.filter}};case"CLEAR_LOG_FILTERS":return{...s,logFilter:dy()};case"START_SESSION":return{...s,currentSession:e.session};case"END_SESSION":return s.currentSession?{...s,sessionHistory:[{...s.currentSession,endTime:new Date},...s.sessionHistory].slice(0,50),currentSession:null}:s;case"LOAD_SESSION_HISTORY":return{...s,sessionHistory:e.sessions};case"CLEAR_SESSION_HISTORY":return{...s,sessionHistory:[]};default:return s}}const gy=W.createContext(null);function yT({children:s}){const[e,i]=W.useReducer(pT,mT);return _.jsx(gy.Provider,{value:{state:e,dispatch:i},children:s})}function Xi(){const s=W.useContext(gy);if(!s)throw new Error("useDashboard must be used within a DashboardProvider");return s}function Pe(){return Xi().state}function yf(){return Xi().dispatch}async function Pp(s=0){const e=await fetch("/get_log_messages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({start_idx:s})});if(!e.ok)throw new Error(`Failed to fetch logs: ${e.statusText}`);return e.json()}async function $p(){const s=await fetch("/get_tool_names");if(!s.ok)throw new Error(`Failed to fetch tool names: ${s.statusText}`);return(await s.json()).tool_names??[]}async function bT(){const s=await fetch("/get_tool_stats");if(!s.ok)throw new Error(`Failed to fetch tool stats: ${s.statusText}`);return(await s.json()).stats??{}}async function vT(){const s=await fetch("/clear_tool_stats",{method:"POST"});if(!s.ok)throw new Error(`Failed to clear tool stats: ${s.statusText}`)}async function xT(){const s=await fetch("/get_token_count_estimator_name");if(!s.ok)throw new Error(`Failed to fetch token estimator name: ${s.statusText}`);return(await s.json()).token_count_estimator_name??"unknown"}async function _T(){await fetch("/shutdown",{method:"PUT"})}const ST=1e3,TT=3;function MT(s){return s.startsWith("DEBUG")?"debug":s.startsWith("INFO")?"info":s.startsWith("WARNING")?"warning":s.startsWith("ERROR")?"error":"default"}function Lo(s,e){return{id:e,message:s,level:MT(s)}}const my=W.createContext(null);function ET({children:s}){const{state:e,dispatch:i}=Xi(),a=W.useRef(null),o=W.useRef(null),c=W.useRef(0),u=W.useRef(e.maxLogIdx);u.current=e.maxLogIdx;const f=W.useCallback(async()=>{try{i({type:"SET_LOADING",isLoading:!0});const T=await $p();i({type:"SET_TOOL_NAMES",toolNames:T});const M=await Pp(0),A=M.messages.map((D,L)=>Lo(D,L));i({type:"SET_LOGS",logs:A,maxIdx:M.max_idx}),i({type:"SET_ACTIVE_PROJECT",project:M.active_project}),i({type:"SET_ERROR",error:null})}catch(T){i({type:"SET_ERROR",error:T instanceof Error?T.message:String(T)})}finally{i({type:"SET_LOADING",isLoading:!1})}},[i]),d=W.useCallback(async()=>{try{const T=await Pp(u.current+1);if(c.current=0,T.messages.length>0)for(let M=0;M<T.messages.length;M++){const A=u.current+1+M,D=Lo(T.messages[M],A);i({type:"APPEND_LOG",log:D,maxIdx:A})}i({type:"SET_ACTIVE_PROJECT",project:T.active_project})}catch{c.current++,c.current>=TT&&window.close()}},[i]),m=W.useCallback(()=>{o.current===null&&(i({type:"SET_CONNECTION_MODE",mode:"polling"}),o.current=window.setInterval(d,ST))},[i,d]),p=W.useCallback(()=>{o.current!==null&&(clearInterval(o.current),o.current=null)},[]),b=W.useCallback(()=>{if(!window.EventSource)return!1;try{const T=new EventSource("/log_stream");a.current=T;let M=!1;return T.addEventListener("open",()=>{i({type:"SET_CONNECTION_MODE",mode:"streaming"}),p()}),T.addEventListener("history",A=>{M=!0;const D=JSON.parse(A.data),L=D.messages.map((q,G)=>Lo(q,G));i({type:"SET_LOGS",logs:L,maxIdx:D.maxIdx}),i({type:"SET_ACTIVE_PROJECT",project:D.activeProject})}),T.addEventListener("log",A=>{const D=JSON.parse(A.data),L=Lo(D.message,D.idx);i({type:"APPEND_LOG",log:L,maxIdx:D.idx}),i({type:"SET_ACTIVE_PROJECT",project:D.activeProject})}),T.addEventListener("toolNames",A=>{const D=JSON.parse(A.data);i({type:"SET_TOOL_NAMES",toolNames:D.toolNames})}),T.onerror=()=>{T.close(),a.current=null,i({type:"SET_CONNECTION_MODE",mode:"disconnected"}),M?m():f().then(()=>{m()})},!0}catch{return!1}},[i,p,f,m]),v=W.useCallback(()=>{a.current&&(a.current.close(),a.current=null),p(),b()||f().then(()=>{m()})},[b,p,f,m]);W.useEffect(()=>((async()=>{const M=await $p().catch(()=>[]);i({type:"SET_TOOL_NAMES",toolNames:M}),b()||(await f(),m())})(),()=>{a.current&&a.current.close(),p()}),[i,b,f,m,p]),W.useEffect(()=>{const T=()=>{document.visibilityState==="visible"&&e.connectionMode==="disconnected"&&v()};return document.addEventListener("visibilitychange",T),()=>document.removeEventListener("visibilitychange",T)},[e.connectionMode,v]);const S=W.useCallback(async()=>{i({type:"CLEAR_LOGS"}),await f()},[i,f]);return _.jsx(my.Provider,{value:{reloadLogs:S,reconnect:v},children:s})}function AT(){const s=W.useContext(my);if(!s)throw new Error("useLogStreamActions must be used within a LogStreamProvider");return s}const OT={nav:{dashboard:"Dashboard",logs:"Logs",statistics:"Statistics",sessions:"Sessions",shutdown:"Shutdown"},status:{connected:"Connected",polling:"Polling",disconnected:"Disconnected"},dashboard:{welcome:"Welcome to Smart Edit",welcomeWithProject:"Welcome to {project}",description:"Monitor your coding sessions, view logs, and analyze tool usage statistics.",logEntries:"Log Entries",toolCalls:"Tool Calls",totalTokens:"Total Tokens",topTool:"Top Tool",currentSession:"Current session",toolsUsed:"{count} tools used",inputOutput:"Input + Output",calls:"{count} calls",noData:"No data",quickNavigation:"Quick Navigation",viewLogs:"View Logs",viewLogsDesc:"Real-time log stream with filtering",statisticsDesc:"Tool usage and token analytics",sessionsDesc:"Session history and export"},stats:{refresh:"Refresh",loading:"Loading...",clearStats:"Clear Stats",tokenEstimator:"Token estimator: {name}",noStatsYet:"No tool stats collected yet.",noStatsHint:"Tool statistics will appear here once tools are used during the session.",totalCalls:"Total Calls",inputTokens:"Input Tokens",outputTokens:"Output Tokens",totalInput:"Total input",totalOutput:"Total output",mostUsedTool:"Most Used Tool",activityOverTime:"Activity Over Time",noActivityYet:"No activity recorded yet",activityHint:"Activity will appear here as tools are used",clearHistory:"Clear History",tokenDistribution:"Token Distribution by Tool",callDistribution:"Call Distribution",tokenBreakdown:"Token Breakdown",noToolData:"No tool usage data available"},logs:{searchPlaceholder:"Search logs...",logLevel:"Log Level",tool:"Tool",clearFilters:"Clear Filters",reloadLogs:"Reload logs",noLogs:"No log entries to display.",noLogsHint:"Logs will appear here once the server starts producing output.",noMatchingLogs:"No logs match the current filters.",debug:"Debug",info:"Info",warning:"Warning",error:"Error"},sessions:{currentSession:"Current Session",noActiveSession:"No active session",sessionHistory:"Session History",sessionsRecorded:"{count} sessions recorded",sessionRecorded:"{count} session recorded",noHistory:"No session history available.",noHistoryHint:"Session history will appear here as you use Smart Edit.",exportJson:"Export JSON",exportAll:"Export All",export:"Export",exportSession:"Export session as JSON",clearHistory:"Clear History",started:"Started",ended:"Ended",duration:"Duration",inProgress:"In progress",calls:"Calls",input:"Input",output:"Output",tokens:"Tokens",active:"Active",confirmClearHistory:"Are you sure you want to clear all session history?"},common:{close:"Close",cancel:"Cancel",confirm:"Confirm",loading:"Loading...",error:"Error",success:"Success"},sidebar:{expand:"Expand sidebar",collapse:"Collapse sidebar",shutdownConfirm:"This will fully terminate the Smart Edit server."},theme:{switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode"}},CT={nav:{dashboard:"ダッシュボード",logs:"ログ",statistics:"統計",sessions:"セッション",shutdown:"シャットダウン"},status:{connected:"接続中",polling:"ポーリング中",disconnected:"切断"},dashboard:{welcome:"Smart Edit へようこそ",welcomeWithProject:"{project} へようこそ",description:"コーディングセッションの監視、ログの表示、ツール使用統計の分析ができます。",logEntries:"ログエントリ",toolCalls:"ツール呼び出し",totalTokens:"合計トークン",topTool:"よく使うツール",currentSession:"現在のセッション",toolsUsed:"{count} ツール使用",inputOutput:"入力 + 出力",calls:"{count} 回",noData:"データなし",quickNavigation:"クイックナビゲーション",viewLogs:"ログを表示",viewLogsDesc:"フィルタ付きリアルタイムログ",statisticsDesc:"ツール使用量とトークン分析",sessionsDesc:"セッション履歴とエクスポート"},stats:{refresh:"更新",loading:"読み込み中...",clearStats:"統計をクリア",tokenEstimator:"トークン推定: {name}",noStatsYet:"ツール統計はまだありません。",noStatsHint:"セッション中にツールが使用されると、ここに統計が表示されます。",totalCalls:"合計呼び出し",inputTokens:"入力トークン",outputTokens:"出力トークン",totalInput:"入力合計",totalOutput:"出力合計",mostUsedTool:"最多使用ツール",activityOverTime:"アクティビティ推移",noActivityYet:"アクティビティはまだありません",activityHint:"ツールが使用されるとここに表示されます",clearHistory:"履歴をクリア",tokenDistribution:"ツール別トークン分布",callDistribution:"呼び出し分布",tokenBreakdown:"トークン内訳",noToolData:"ツール使用データがありません"},logs:{searchPlaceholder:"ログを検索...",logLevel:"ログレベル",tool:"ツール",clearFilters:"フィルタをクリア",reloadLogs:"ログを再読み込み",noLogs:"表示するログエントリがありません。",noLogsHint:"サーバーが出力を開始すると、ここにログが表示されます。",noMatchingLogs:"現在のフィルタに一致するログがありません。",debug:"デバッグ",info:"情報",warning:"警告",error:"エラー"},sessions:{currentSession:"現在のセッション",noActiveSession:"アクティブなセッションがありません",sessionHistory:"セッション履歴",sessionsRecorded:"{count} 件のセッション",sessionRecorded:"{count} 件のセッション",noHistory:"セッション履歴がありません。",noHistoryHint:"Smart Edit を使用すると、ここにセッション履歴が表示されます。",exportJson:"JSON エクスポート",exportAll:"すべてエクスポート",export:"エクスポート",exportSession:"セッションをJSONでエクスポート",clearHistory:"履歴をクリア",started:"開始",ended:"終了",duration:"時間",inProgress:"進行中",calls:"呼び出し",input:"入力",output:"出力",tokens:"トークン",active:"アクティブ",confirmClearHistory:"すべてのセッション履歴をクリアしてもよろしいですか?"},common:{close:"閉じる",cancel:"キャンセル",confirm:"確認",loading:"読み込み中...",error:"エラー",success:"成功"},sidebar:{expand:"サイドバーを展開",collapse:"サイドバーを折りたたむ",shutdownConfirm:"Smart Edit サーバーを完全に終了します。"},theme:{switchToLight:"ライトモードに切り替え",switchToDark:"ダークモードに切り替え"}},t0={en:OT,ja:CT};function e0(s,e){const i=e.split(".");let a=s;for(const o of i){if(a==null||typeof a!="object")return;a=a[o]}return typeof a=="string"?a:void 0}const py=W.createContext(null);function DT(s){return function(i,a){let o=e0(t0[s],i);return o||(o=e0(t0.en,i)),o?(a&&Object.entries(a).forEach(([c,u])=>{o=o.replace(`{${c}}`,String(u))}),o):i}}function di(){const s=W.useContext(py);if(!s)throw new Error("useTranslation must be used within an I18nProvider");return s}function zT({children:s}){const{locale:e}=Pe(),i=yf(),a=W.useMemo(()=>{const o=DT(e);return{locale:e,setLocale:u=>{i({type:"SET_LOCALE",locale:u})},t:o}},[e,i]);return _.jsx(py.Provider,{value:a,children:s})}function wT(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),_.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),_.jsx("rect",{x:"14",y:"14",width:"7",height:"7"}),_.jsx("rect",{x:"3",y:"14",width:"7",height:"7"})]})}function jT(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),_.jsx("path",{d:"M14 2v6h6"}),_.jsx("path",{d:"M16 13H8"}),_.jsx("path",{d:"M16 17H8"}),_.jsx("path",{d:"M10 9H8"})]})}function RT(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M18 20V10"}),_.jsx("path",{d:"M12 20V4"}),_.jsx("path",{d:"M6 20v-6"})]})}function kT(){return _.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function NT(){return _.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",children:[_.jsxs("defs",{children:[_.jsxs("linearGradient",{id:"logoGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[_.jsx("stop",{offset:"0%",stopColor:"#FFD700"}),_.jsx("stop",{offset:"100%",stopColor:"#FFA500"})]}),_.jsxs("filter",{id:"logoGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[_.jsx("feGaussianBlur",{stdDeviation:"1",result:"glow"}),_.jsxs("feMerge",{children:[_.jsx("feMergeNode",{in:"glow"}),_.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),_.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",fill:"url(#logoGradient)",filter:"url(#logoGlow)"})]})}function LT(){return _.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M15 18l-6-6 6-6"})})}function HT(){return _.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M9 18l6-6-6-6"})})}function BT(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0"}),_.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"12"})]})}const UT=[{id:"dashboard",labelKey:"nav.dashboard",icon:_.jsx(wT,{})},{id:"logs",labelKey:"nav.logs",icon:_.jsx(jT,{})},{id:"stats",labelKey:"nav.statistics",icon:_.jsx(RT,{})},{id:"sessions",labelKey:"nav.sessions",icon:_.jsx(kT,{})}];function VT(){const{state:s,dispatch:e}=Xi(),{currentView:i,sidebarCollapsed:a}=s,{t:o}=di(),c=d=>{e({type:"SET_CURRENT_VIEW",view:d})},u=()=>{e({type:"TOGGLE_SIDEBAR"})},f=()=>{window.confirm(o("sidebar.shutdownConfirm"))&&(_T(),e({type:"SET_ERROR",error:"Shutting down ..."}),setTimeout(()=>window.close(),2e3))};return _.jsxs("aside",{className:`sidebar ${a?"collapsed":""}`,children:[_.jsxs("div",{className:"sidebar-header",children:[_.jsxs("div",{className:"sidebar-logo",children:[_.jsx("span",{className:"sidebar-logo-icon",children:_.jsx(NT,{})}),_.jsx("span",{className:"sidebar-logo-text",children:"Smart Edit"})]}),_.jsx("button",{className:"sidebar-toggle",onClick:u,title:o(a?"sidebar.expand":"sidebar.collapse"),children:a?_.jsx(HT,{}):_.jsx(LT,{})})]}),_.jsx("nav",{className:"sidebar-nav",children:UT.map(d=>{const m=o(d.labelKey);return _.jsxs("button",{className:`nav-item ${i===d.id?"active":""}`,onClick:()=>c(d.id),title:a?m:void 0,children:[_.jsx("span",{className:"nav-item-icon",children:d.icon}),_.jsx("span",{className:"nav-item-label",children:m})]},d.id)})}),_.jsx("div",{className:"sidebar-footer",children:_.jsxs("button",{className:"nav-item shutdown-btn",onClick:f,title:a?o("nav.shutdown"):void 0,children:[_.jsx("span",{className:"nav-item-icon",children:_.jsx(BT,{})}),_.jsx("span",{className:"nav-item-label",children:o("nav.shutdown")})]})})]})}function YT(){return _.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"5"}),_.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),_.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),_.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),_.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),_.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),_.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),_.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),_.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})}function qT(){return _.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})}function XT(){const{state:s,dispatch:e}=Xi(),i=()=>{const a=s.theme==="light"?"dark":"light";e({type:"SET_THEME",theme:a})};return _.jsx("button",{className:"theme-toggle",onClick:i,title:s.theme==="dark"?"Switch to light mode":"Switch to dark mode","aria-label":s.theme==="dark"?"Switch to light mode":"Switch to dark mode",children:_.jsx("span",{className:"icon",children:s.theme==="dark"?_.jsx(YT,{}):_.jsx(qT,{})})})}function GT(){return _.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"10"}),_.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),_.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function QT(){const{locale:s,setLocale:e}=di(),i=()=>{e(s==="en"?"ja":"en")};return _.jsxs("button",{className:"language-toggle",onClick:i,title:s==="en"?"日本語に切り替え":"Switch to English","aria-label":s==="en"?"日本語に切り替え":"Switch to English",children:[_.jsx("span",{className:"icon",children:_.jsx(GT,{})}),_.jsx("span",{className:"language-code",children:s.toUpperCase()})]})}const ZT={dashboard:"nav.dashboard",logs:"nav.logs",stats:"nav.statistics",sessions:"nav.sessions"};function FT(){const{currentView:s,activeProject:e,connectionMode:i}=Pe(),{t:a}=di(),o=()=>{switch(i){case"streaming":return a("status.connected");case"polling":return a("status.polling");case"disconnected":return a("status.disconnected")}};return _.jsxs("header",{className:"topbar",children:[_.jsx("div",{className:"topbar-left",children:_.jsxs("div",{children:[_.jsx("h1",{className:"topbar-title",children:a(ZT[s])}),e&&_.jsx("p",{className:"topbar-subtitle",children:e})]})}),_.jsxs("div",{className:"topbar-right",children:[_.jsxs("div",{className:"connection-indicator",children:[_.jsx("span",{className:`connection-dot ${i}`}),_.jsx("span",{children:o()})]}),_.jsx(QT,{}),_.jsx(XT,{})]})]})}function KT({children:s}){return _.jsxs("div",{className:"main-layout",children:[_.jsx(VT,{}),_.jsxs("div",{className:"main-content",children:[_.jsx(FT,{}),_.jsx("main",{className:"content-area",children:s})]})]})}function WT(s,e){const[i,a]=W.useState(s);return W.useEffect(()=>{const o=setTimeout(()=>{a(s)},e);return()=>{clearTimeout(o)}},[s,e]),i}const JT=/\[tool:\s*([^\]]+)\]/i;function yy(s){const e=s.match(JT);return e?e[1].trim():null}function IT(s,e){const i=WT(e.searchKeyword,200);return W.useMemo(()=>s.filter(a=>{if(e.logLevels.size>0&&!e.logLevels.has(a.level))return!1;if(e.toolNames.size>0){const o=yy(a.message);if(!o||!e.toolNames.has(o))return!1}if(i){const o=i.toLowerCase();if(!a.message.toLowerCase().includes(o))return!1}return!0}),[s,e.logLevels,e.toolNames,i])}function PT(s){return W.useMemo(()=>{const e=new Set;for(const i of s){const a=yy(i.message);a&&e.add(a)}return Array.from(e).sort()},[s])}function $T({value:s,onChange:e,placeholder:i="Search...",className:a=""}){const o=u=>{e(u.target.value)},c=()=>{e("")};return _.jsxs("div",{className:`search-input-wrapper ${a}`,children:[_.jsx("span",{className:"search-input-icon",children:_.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"11",cy:"11",r:"8"}),_.jsx("path",{d:"m21 21-4.35-4.35"})]})}),_.jsx("input",{type:"text",className:"search-input",value:s,onChange:o,placeholder:i}),s&&_.jsx("button",{type:"button",className:"search-input-clear",onClick:c,"aria-label":"Clear search",children:_.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M18 6 6 18"}),_.jsx("path",{d:"m6 6 12 12"})]})})]})}function n0({options:s,selected:e,onChange:i,placeholder:a="Select...",className:o="",multiple:c=!0}){const[u,f]=W.useState(!1),d=W.useRef(null);W.useEffect(()=>{const S=T=>{d.current&&!d.current.contains(T.target)&&f(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[]);const m=()=>{f(!u)},p=S=>{const T=new Set(e);T.has(S)?T.delete(S):(c||T.clear(),T.add(S)),i(T)},b=()=>{i(new Set)},v=()=>{if(e.size===0)return a;if(e.size===1){const S=Array.from(e)[0];return s.find(M=>M.value===S)?.label||S}return`${e.size} selected`};return _.jsxs("div",{className:`dropdown ${o}`,ref:d,children:[_.jsxs("button",{type:"button",className:"dropdown-trigger",onClick:m,children:[_.jsx("span",{className:"dropdown-text",children:v()}),_.jsx("span",{className:`dropdown-arrow ${u?"open":""}`,children:_.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),u&&_.jsxs("div",{className:"dropdown-menu",children:[c&&e.size>0&&_.jsx("button",{type:"button",className:"dropdown-clear",onClick:b,children:"Clear all"}),_.jsx("div",{className:"dropdown-options",children:s.map(S=>_.jsxs("label",{className:"dropdown-option",children:[_.jsx("input",{type:c?"checkbox":"radio",checked:e.has(S.value),onChange:()=>p(S.value)}),_.jsx("span",{className:"dropdown-option-label",children:S.label})]},S.value))})]})]})}function tM(){const{logs:s,logFilter:e}=Pe(),i=yf(),{t:a}=di(),o=PT(s),{reloadLogs:c}=AT(),[u,f]=W.useState(!1),d=[{value:"debug",label:a("logs.debug")},{value:"info",label:a("logs.info")},{value:"warning",label:a("logs.warning")},{value:"error",label:a("logs.error")}],m=o.map(A=>({value:A,label:A})),p=A=>{i({type:"SET_LOG_FILTER",filter:{searchKeyword:A}})},b=A=>{i({type:"SET_LOG_FILTER",filter:{logLevels:A}})},v=A=>{i({type:"SET_LOG_FILTER",filter:{toolNames:A}})},S=()=>{i({type:"CLEAR_LOG_FILTERS"})},T=async()=>{f(!0);try{await c()}finally{f(!1)}},M=e.searchKeyword||e.logLevels.size>0||e.toolNames.size>0;return _.jsxs("div",{className:"log-filter-bar",children:[_.jsx($T,{value:e.searchKeyword,onChange:p,placeholder:a("logs.searchPlaceholder"),className:"log-filter-search"}),_.jsxs("div",{className:"log-filter-dropdowns",children:[_.jsx(n0,{options:d,selected:e.logLevels,onChange:b,placeholder:a("logs.logLevel"),className:"log-filter-level"}),m.length>0&&_.jsx(n0,{options:m,selected:e.toolNames,onChange:v,placeholder:a("logs.tool"),className:"log-filter-tool"}),_.jsx("button",{type:"button",className:`icon-btn reload-btn ${u?"spinning":""}`,onClick:T,disabled:u,title:a("logs.reloadLogs"),children:_.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),_.jsx("path",{d:"M21 3v5h-5"})]})})]}),M&&_.jsx("button",{type:"button",className:"log-filter-clear btn",onClick:S,children:a("logs.clearFilters")})]})}const eM={"<":"<",">":">","&":"&",'"':""","'":"'","`":"`"};function nM(s){return s.replace(/[<>&"'`]/g,e=>eM[e]??e)}function iM(s,e){if(e.length===0)return s;let i=nM(s);for(const a of e){const o=new RegExp(`\\b${sM(a)}\\b`,"gi");i=i.replace(o,'<span class="tool-name">$&</span>')}return i}function sM(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aM({log:s}){const{toolNames:e}=Pe(),i=W.useMemo(()=>iM(s.message,e),[s.message,e]);return _.jsx("div",{className:`log-${s.level}`,dangerouslySetInnerHTML:{__html:i+`
|
|
13
|
-
`}})}function lM({logs:s,isLoading:e,totalCount:i}){const a=W.useRef(null),o=W.useRef(!0);W.useEffect(()=>{const u=a.current;if(!u)return;const f=()=>{o.current=u.scrollTop+u.clientHeight>=u.scrollHeight-10};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)},[]),W.useEffect(()=>{const u=a.current;u&&o.current&&(u.scrollTop=u.scrollHeight)},[s]);const c=s.length!==i;return e&&i===0?_.jsx("div",{className:"log-container",ref:a,children:_.jsx("div",{className:"loading",children:"Loading logs..."})}):i===0?_.jsx("div",{className:"log-container",ref:a,children:_.jsx("div",{className:"loading",children:"No log messages found."})}):s.length===0&&c?_.jsx("div",{className:"log-container",ref:a,children:_.jsx("div",{className:"loading",children:"No logs match the current filters."})}):_.jsxs("div",{className:"log-container",ref:a,children:[c&&_.jsxs("div",{className:"filter-stats",children:["Showing ",_.jsx("span",{className:"filter-stats-count",children:s.length})," of"," ",_.jsx("span",{className:"filter-stats-count",children:i})," logs"]}),s.map(u=>_.jsx(aM,{log:u},u.id))]})}function oM(){const{error:s}=Pe();return s?_.jsx("div",{id:"error-container",children:_.jsx("div",{className:"error-message",children:s})}):null}function wn({children:s,title:e,subtitle:i,actions:a,className:o="",style:c}){return _.jsxs("div",{className:`card ${o}`,style:c,children:[(e||a)&&_.jsxs("div",{className:"card-header",children:[_.jsxs("div",{children:[e&&_.jsx("h3",{className:"card-title",children:e}),i&&_.jsx("p",{className:"card-subtitle",children:i})]}),a&&_.jsx("div",{className:"card-actions",children:a})]}),_.jsx("div",{className:"card-body",children:s})]})}function rM(){const{logs:s,logFilter:e,isLoading:i}=Pe(),a=IT(s,e);return _.jsxs("div",{className:"log-panel",children:[_.jsx(oM,{}),_.jsxs(wn,{className:"log-card",style:{flex:1,display:"flex",flexDirection:"column"},children:[_.jsx("div",{className:"log-panel-header",children:_.jsx(tM,{})}),_.jsx("div",{className:"log-panel-content",children:_.jsx(lM,{logs:a,isLoading:i,totalCount:s.length})})]})]})}function by(){const{dispatch:s}=Xi(),[e,i]=W.useState(!1),[a,o]=W.useState("unknown"),c=W.useCallback(async()=>{i(!0);try{const[f,d]=await Promise.all([bT(),xT()]);s({type:"SET_TOOL_STATS",stats:f}),o(d)}catch(f){console.error("Failed to load stats:",f)}finally{i(!1)}},[s]),u=W.useCallback(async()=>{try{await vT(),await c()}catch(f){console.error("Failed to clear stats:",f)}},[c]);return{loadStats:c,clearStats:u,isLoading:e,tokenEstimatorName:a}}function vy(s){return W.useMemo(()=>{if(!s)return{totalCalls:0,totalInputTokens:0,totalOutputTokens:0,totalTokens:0,toolCount:0,mostUsedTool:null,topTools:[]};const e=Object.entries(s);let i=0,a=0,o=0,c=null;const f=e.map(([d,m])=>(i+=m.num_times_called,a+=m.input_tokens,o+=m.output_tokens,(!c||m.num_times_called>c.calls)&&(c={name:d,calls:m.num_times_called}),{name:d,calls:m.num_times_called,inputTokens:m.input_tokens,outputTokens:m.output_tokens})).sort((d,m)=>m.calls-d.calls).slice(0,5);return{totalCalls:i,totalInputTokens:a,totalOutputTokens:o,totalTokens:a+o,toolCount:e.length,mostUsedTool:c,topTools:f}},[s])}function $a(s){return s>=1e6?(s/1e6).toFixed(1)+"M":s>=1e3?(s/1e3).toFixed(1)+"K":s.toString()}function cM(s){return s?Object.values(s).reduce((e,i)=>({calls:e.calls+i.num_times_called,inputTokens:e.inputTokens+i.input_tokens,outputTokens:e.outputTokens+i.output_tokens}),{calls:0,inputTokens:0,outputTokens:0}):{calls:0,inputTokens:0,outputTokens:0}}function uM(s){return s.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}const i0=60;function fM(s){const[e,i]=W.useState([]),a=W.useRef(null);W.useEffect(()=>{const c=cM(s);if(a.current===null){a.current=c;return}const u=a.current,f=c.calls-u.calls,d=c.inputTokens-u.inputTokens,m=c.outputTokens-u.outputTokens;if(f>0||d>0||m>0){const p=new Date,b={timestamp:p,label:uM(p),calls:f,inputTokens:d,outputTokens:m};i(v=>{const S=[...v,b];return S.length>i0?S.slice(-i0):S})}a.current=c},[s]);const o=W.useCallback(()=>{i([]),a.current=null},[]);return{history:e,clearHistory:o}}function ui({title:s,value:e,subtitle:i,icon:a,trend:o,className:c=""}){return _.jsxs("div",{className:`metric-card ${c}`,children:[_.jsxs("div",{className:"metric-card-header",children:[_.jsx("span",{className:"metric-card-title",children:s}),a&&_.jsx("span",{className:"metric-card-icon",children:a})]}),_.jsx("div",{className:"metric-card-value",children:e}),(i||o)&&_.jsxs("div",{className:"metric-card-footer",children:[i&&_.jsx("span",{className:"metric-card-subtitle",children:i}),o&&_.jsxs("span",{className:`metric-card-trend ${o.direction}`,children:[o.direction==="up"&&"+",o.direction==="down"&&"-",Math.abs(o.value),"%"]})]})]})}function js({value:s,duration:e=500,formatter:i=o=>o.toLocaleString(),className:a=""}){const[o,c]=W.useState(s),u=W.useRef(s),f=W.useRef(void 0);return W.useEffect(()=>{const d=u.current,m=s,p=performance.now(),b=v=>{const S=v-p,T=Math.min(S/e,1),M=1-(1-T)*(1-T),A=Math.round(d+(m-d)*M);c(A),T<1?f.current=requestAnimationFrame(b):u.current=m};return d!==m&&(f.current=requestAnimationFrame(b)),()=>{f.current&&cancelAnimationFrame(f.current)}},[s,e]),_.jsx("span",{className:`live-counter ${a}`,children:i(o)})}const xy="label";function s0(s,e){typeof s=="function"?s(e):s&&(s.current=e)}function hM(s,e){const i=s.options;i&&e&&Object.assign(i,e)}function _y(s,e){s.labels=e}function Sy(s,e,i=xy){const a=[];s.datasets=e.map(o=>{const c=s.datasets.find(u=>u[i]===o[i]);return!c||!o.data||a.includes(c)?{...o}:(a.push(c),Object.assign(c,o),c)})}function dM(s,e=xy){const i={labels:[],datasets:[]};return _y(i,s.labels),Sy(i,s.datasets,e),i}function gM(s,e){const{height:i=150,width:a=300,redraw:o=!1,datasetIdKey:c,type:u,data:f,options:d,plugins:m=[],fallbackContent:p,updateMode:b,...v}=s,S=W.useRef(null),T=W.useRef(null),M=()=>{S.current&&(T.current=new Io(S.current,{type:u,data:dM(f,c),options:d&&{...d},plugins:m}),s0(e,T.current))},A=()=>{s0(e,null),T.current&&(T.current.destroy(),T.current=null)};return W.useEffect(()=>{!o&&T.current&&d&&hM(T.current,d)},[o,d]),W.useEffect(()=>{!o&&T.current&&_y(T.current.config.data,f.labels)},[o,f.labels]),W.useEffect(()=>{!o&&T.current&&f.datasets&&Sy(T.current.config.data,f.datasets,c)},[o,f.datasets]),W.useEffect(()=>{T.current&&(o?(A(),setTimeout(M)):T.current.update(b))},[o,d,f.labels,f.datasets,b]),W.useEffect(()=>{T.current&&(A(),setTimeout(M))},[u]),W.useEffect(()=>(M(),()=>A()),[]),_.jsx("canvas",{ref:S,role:"img",height:i,width:a,...v,children:p})}const mM=W.forwardRef(gM);function bf(s,e){return Io.register(e),W.forwardRef((i,a)=>_.jsx(mM,{...i,ref:a,type:s}))}const pM=bf("line",_1),yM=bf("bar",b1),bM=bf("pie",S1);function vf(){const{theme:s}=Pe();return W.useMemo(()=>({textColor:s==="dark"?"#ffffff":"#000000",gridColor:s==="dark"?"#444444":"#dddddd",legendColor:s==="dark"?"#ffffff":"#000000"}),[s])}function vM({toolStats:s,maxTools:e=8}){const i=vf();if(!s||Object.keys(s).length===0)return _.jsx("div",{className:"chart-empty",children:_.jsx("p",{children:"No tool usage data available"})});const a=Object.entries(s).map(([u,f])=>({name:u,inputTokens:f.input_tokens,outputTokens:f.output_tokens,total:f.input_tokens+f.output_tokens})).sort((u,f)=>f.total-u.total).slice(0,e),o={labels:a.map(u=>u.name),datasets:[{label:"Input Tokens",data:a.map(u=>u.inputTokens),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"Output Tokens",data:a.map(u=>u.outputTokens),backgroundColor:"rgba(34, 197, 94, 0.8)",borderColor:"rgba(34, 197, 94, 1)",borderWidth:1}]},c={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{color:i.textColor,font:{size:11}}},datalabels:{display:!1},tooltip:{callbacks:{label:u=>{const f=u.parsed.x??0;return`${u.dataset.label}: ${f.toLocaleString()}`}}}},scales:{x:{stacked:!0,grid:{color:i.gridColor},ticks:{color:i.textColor,callback:function(u){const f=typeof u=="number"?u:parseFloat(String(u));return f>=1e3?(f/1e3).toFixed(0)+"K":f}}},y:{stacked:!0,grid:{display:!1},ticks:{color:i.textColor}}}};return _.jsx("div",{className:"chart-container",style:{height:Math.max(200,a.length*40)},children:_.jsx(yM,{data:o,options:c})})}function xM({history:s,onClear:e}){const i=vf();if(s.length===0)return _.jsxs("div",{className:"chart-empty",children:[_.jsx("p",{children:"No activity recorded yet"}),_.jsx("p",{className:"chart-empty-hint",children:"Activity will appear here as tools are used"})]});const a={labels:s.map(c=>c.label),datasets:[{label:"Calls",data:s.map(c=>c.calls),borderColor:"rgba(139, 92, 246, 1)",backgroundColor:"rgba(139, 92, 246, 0.1)",fill:!0,tension:.3,yAxisID:"y"},{label:"Input Tokens",data:s.map(c=>c.inputTokens),borderColor:"rgba(59, 130, 246, 1)",backgroundColor:"rgba(59, 130, 246, 0.1)",fill:!1,tension:.3,yAxisID:"y1"},{label:"Output Tokens",data:s.map(c=>c.outputTokens),borderColor:"rgba(34, 197, 94, 1)",backgroundColor:"rgba(34, 197, 94, 0.1)",fill:!1,tension:.3,yAxisID:"y1"}]},o={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"top",labels:{color:i.textColor,font:{size:11},usePointStyle:!0,pointStyle:"circle"}},datalabels:{display:!1},tooltip:{callbacks:{label:c=>{const u=c.parsed.y??0,f=c.dataset.label||"";return f==="Calls"?`${f}: ${u}`:`${f}: ${u.toLocaleString()}`}}}},scales:{x:{grid:{color:i.gridColor},ticks:{color:i.textColor,maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10}},y:{type:"linear",display:!0,position:"left",title:{display:!0,text:"Calls",color:i.textColor},grid:{color:i.gridColor},ticks:{color:i.textColor,stepSize:1},min:0},y1:{type:"linear",display:!0,position:"right",title:{display:!0,text:"Tokens",color:i.textColor},grid:{drawOnChartArea:!1},ticks:{color:i.textColor,callback:function(c){const u=typeof c=="number"?c:parseFloat(String(c));return u>=1e3?(u/1e3).toFixed(0)+"K":u}},min:0}}};return _.jsxs("div",{className:"activity-chart-wrapper",children:[_.jsx("div",{className:"chart-container",style:{height:280},children:_.jsx(pM,{data:a,options:o})}),e&&s.length>0&&_.jsx("div",{className:"chart-actions",children:_.jsx("button",{className:"btn btn-sm",onClick:e,children:"Clear History"})})]})}const a0=["#101010","#1f1f1f","#2e2e2e","#3d3d3d","#4c4c4c","#5b5b5b","#6a6a6a","#797979","#888888","#979797","#a6a6a6","#b5b5b5","#c4c4c4","#d3d3d3","#e2e2e2"];function _M(s){return Array.from({length:s},(e,i)=>a0[i%a0.length])}function Yu({title:s,labels:e,data:i}){const{textColor:a}=vf(),o=W.useMemo(()=>_M(e.length),[e.length]),c=W.useMemo(()=>({labels:e,datasets:[{data:i,backgroundColor:o}]}),[e,i,o]),u=W.useMemo(()=>({plugins:{legend:{display:!0,labels:{color:a}},datalabels:{display:!0,color:"white",font:{weight:"bold"},formatter:f=>f}}}),[a]);return _.jsxs("div",{className:"chart-group",children:[_.jsx("h3",{children:s}),_.jsx(bM,{data:c,options:u})]})}function SM(){return _.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:_.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function l0(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[_.jsx("circle",{cx:"12",cy:"12",r:"10"}),_.jsx("path",{d:"M12 6v12"}),_.jsx("path",{d:"M8 10h8"}),_.jsx("path",{d:"M8 14h8"})]})}function TM(){return _.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:_.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function MM(){const{toolStats:s}=Pe(),{t:e}=di(),{loadStats:i,clearStats:a,isLoading:o,tokenEstimatorName:c}=by(),u=vy(s),{history:f,clearHistory:d}=fM(s);W.useEffect(()=>{s||i()},[s,i]);const m=s?{names:Object.keys(s),counts:Object.values(s).map(p=>p.num_times_called),inputTokens:Object.values(s).map(p=>p.input_tokens),outputTokens:Object.values(s).map(p=>p.output_tokens)}:null;return _.jsxs("div",{className:"stats-panel",children:[_.jsxs("div",{className:"stats-panel-header",children:[_.jsxs("div",{className:"stats-panel-actions",children:[_.jsx("button",{className:"btn",onClick:i,disabled:o,children:e(o?"stats.loading":"stats.refresh")}),_.jsx("button",{className:"btn",onClick:a,children:e("stats.clearStats")})]}),c&&_.jsx("span",{className:"stats-estimator",children:e("stats.tokenEstimator",{name:c})})]}),!s||Object.keys(s).length===0?_.jsx(wn,{children:_.jsxs("div",{className:"stats-empty",children:[_.jsx("p",{children:e("stats.noStatsYet")}),_.jsx("p",{className:"stats-empty-hint",children:e("stats.noStatsHint")})]})}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"metrics-grid",children:[_.jsx(ui,{title:e("stats.totalCalls"),value:_.jsx(js,{value:u.totalCalls}),subtitle:e("dashboard.toolsUsed",{count:u.toolCount}),icon:_.jsx(TM,{})}),_.jsx(ui,{title:e("stats.inputTokens"),value:_.jsx(js,{value:u.totalInputTokens,formatter:$a}),subtitle:e("stats.totalInput"),icon:_.jsx(l0,{})}),_.jsx(ui,{title:e("stats.outputTokens"),value:_.jsx(js,{value:u.totalOutputTokens,formatter:$a}),subtitle:e("stats.totalOutput"),icon:_.jsx(l0,{})}),_.jsx(ui,{title:e("stats.mostUsedTool"),value:u.mostUsedTool?.name||"-",subtitle:u.mostUsedTool?e("dashboard.calls",{count:u.mostUsedTool.calls}):void 0,icon:_.jsx(SM,{})})]}),_.jsx("div",{className:"stats-charts-row",children:_.jsx(wn,{title:e("stats.activityOverTime"),children:_.jsx(xM,{history:f,onClear:d})})}),_.jsxs("div",{className:"stats-charts-grid",children:[_.jsx(wn,{title:e("stats.tokenDistribution"),children:_.jsx(vM,{toolStats:s})}),_.jsx(wn,{title:e("stats.callDistribution"),children:m&&_.jsx(Yu,{title:"",labels:m.names,data:m.counts})})]}),_.jsx("div",{className:"stats-charts-row",children:_.jsx(wn,{title:e("stats.tokenBreakdown"),children:_.jsx("div",{className:"pie-charts-row",children:m&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"pie-chart-item",children:_.jsx(Yu,{title:e("stats.inputTokens"),labels:m.names,data:m.inputTokens})}),_.jsx("div",{className:"pie-chart-item",children:_.jsx(Yu,{title:e("stats.outputTokens"),labels:m.names,data:m.outputTokens})})]})})})})]})]})}const qu="smart-edit-session-history";function Xu(s){return{id:s.id,startTime:s.startTime.toISOString(),endTime:s.endTime?s.endTime.toISOString():null,projectName:s.projectName,stats:s.stats,toolStats:s.toolStats}}function EM(s){return{id:s.id,startTime:new Date(s.startTime),endTime:s.endTime?new Date(s.endTime):null,projectName:s.projectName,stats:s.stats,toolStats:s.toolStats}}function AM(){const{state:s,dispatch:e}=Xi();W.useEffect(()=>{try{const f=localStorage.getItem(qu);if(f){const m=JSON.parse(f).map(EM);e({type:"LOAD_SESSION_HISTORY",sessions:m})}}catch(f){console.error("Failed to load session history:",f)}},[e]),W.useEffect(()=>{try{const f=s.sessionHistory.map(Xu);localStorage.setItem(qu,JSON.stringify(f))}catch(f){console.error("Failed to save session history:",f)}},[s.sessionHistory]);const i=W.useCallback(f=>{const d={id:crypto.randomUUID(),startTime:new Date,endTime:null,projectName:f,stats:{totalCalls:0,totalInputTokens:0,totalOutputTokens:0},toolStats:null};e({type:"START_SESSION",session:d})},[e]),a=W.useCallback(()=>{if(s.currentSession&&s.toolStats){const f=Object.values(s.toolStats).reduce((m,p)=>({totalCalls:m.totalCalls+p.num_times_called,totalInputTokens:m.totalInputTokens+p.input_tokens,totalOutputTokens:m.totalOutputTokens+p.output_tokens}),{totalCalls:0,totalInputTokens:0,totalOutputTokens:0}),d={...s.currentSession,stats:f,toolStats:s.toolStats};e({type:"START_SESSION",session:d})}e({type:"END_SESSION"})},[e,s.currentSession,s.toolStats]),o=W.useCallback(()=>{e({type:"CLEAR_SESSION_HISTORY"}),localStorage.removeItem(qu)},[e]),c=W.useCallback(f=>{const d={...Xu(f),exportedAt:new Date().toISOString()};return JSON.stringify(d,null,2)},[]),u=W.useCallback(()=>{const f={sessions:s.sessionHistory.map(Xu),exportedAt:new Date().toISOString()};return JSON.stringify(f,null,2)},[s.sessionHistory]);return{currentSession:s.currentSession,sessionHistory:s.sessionHistory,startSession:i,endSession:a,clearHistory:o,exportSession:c,exportAllSessions:u}}function OM(s,e){return s.toLocaleDateString(e==="ja"?"ja-JP":"en-US",{year:"numeric",month:"short",day:"numeric"})}function o0(s,e){return s.toLocaleTimeString(e==="ja"?"ja-JP":"en-US",{hour:"2-digit",minute:"2-digit"})}function CM(s,e,i){if(!e)return i;const a=e.getTime()-s.getTime(),o=Math.floor(a/(1e3*60*60)),c=Math.floor(a%(1e3*60*60)/(1e3*60));return o>0?`${o}h ${c}m`:`${c}m`}function DM({sessions:s,onExport:e}){const{t:i,locale:a}=di();return s.length===0?_.jsxs("div",{className:"session-list-empty",children:[_.jsx("p",{children:i("sessions.noHistory")}),_.jsx("p",{className:"session-list-empty-hint",children:i("sessions.noHistoryHint")})]}):_.jsx("div",{className:"session-list",children:s.map(o=>_.jsxs("div",{className:"session-item",children:[_.jsxs("div",{className:"session-item-header",children:[_.jsxs("div",{className:"session-item-info",children:[_.jsx("span",{className:"session-item-date",children:OM(o.startTime,a)}),_.jsxs("span",{className:"session-item-time",children:[o0(o.startTime,a),o.endTime&&` - ${o0(o.endTime,a)}`]})]}),_.jsx("span",{className:"session-item-duration",children:CM(o.startTime,o.endTime,i("sessions.inProgress"))})]}),o.projectName&&_.jsx("div",{className:"session-item-project",children:o.projectName}),_.jsxs("div",{className:"session-item-stats",children:[_.jsxs("div",{className:"session-stat",children:[_.jsx("span",{className:"session-stat-label",children:i("sessions.calls")}),_.jsx("span",{className:"session-stat-value",children:o.stats.totalCalls})]}),_.jsxs("div",{className:"session-stat",children:[_.jsx("span",{className:"session-stat-label",children:i("sessions.input")}),_.jsx("span",{className:"session-stat-value",children:$a(o.stats.totalInputTokens)})]}),_.jsxs("div",{className:"session-stat",children:[_.jsx("span",{className:"session-stat-label",children:i("sessions.output")}),_.jsx("span",{className:"session-stat-value",children:$a(o.stats.totalOutputTokens)})]})]}),_.jsx("div",{className:"session-item-actions",children:_.jsxs("button",{type:"button",className:"session-action-btn",onClick:()=>e(o),title:i("sessions.exportSession"),children:[_.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[_.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),_.jsx("polyline",{points:"7 10 12 15 17 10"}),_.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),i("sessions.export")]})})]},o.id))})}function zM({getData:s,filename:e,label:i="Export All",className:a=""}){const o=W.useCallback(()=>{const c=s(),u=new Blob([c],{type:"application/json"}),f=URL.createObjectURL(u),d=document.createElement("a");d.href=f,d.download=e,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(f)},[s,e]);return _.jsxs("button",{type:"button",className:`btn export-btn ${a}`,onClick:o,children:[_.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{marginRight:"6px"},children:[_.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),_.jsx("polyline",{points:"7 10 12 15 17 10"}),_.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),i]})}function wM(s,e){const i=new Blob([s],{type:"application/json"}),a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)}function jM(){const{sessionHistory:s,clearHistory:e,exportSession:i,exportAllSessions:a}=AM(),{t:o}=di(),c=W.useCallback(d=>{const m=i(d),p=d.startTime.toISOString().split("T")[0];wM(m,`smart-edit-session-${p}.json`)},[i]),u=W.useCallback(()=>a(),[a]),f=s.length===1?o("sessions.sessionRecorded",{count:String(s.length)}):o("sessions.sessionsRecorded",{count:String(s.length)});return _.jsx("div",{className:"session-panel",children:_.jsxs(wn,{children:[_.jsxs("div",{className:"session-panel-header",children:[_.jsxs("div",{children:[_.jsx("h3",{className:"session-panel-title",children:o("sessions.sessionHistory")}),_.jsx("p",{className:"session-panel-subtitle",children:f})]}),_.jsx("div",{className:"session-panel-actions",children:s.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(zM,{getData:u,filename:`smart-edit-sessions-${new Date().toISOString().split("T")[0]}.json`,label:o("sessions.exportAll")}),_.jsx("button",{type:"button",className:"btn btn-danger",onClick:e,children:o("sessions.clearHistory")})]})})]}),_.jsx(DM,{sessions:s,onExport:c})]})})}function r0(){return _.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:_.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function c0(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[_.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),_.jsx("path",{d:"M14 2v6h6"}),_.jsx("path",{d:"M16 13H8"}),_.jsx("path",{d:"M16 17H8"}),_.jsx("path",{d:"M10 9H8"})]})}function u0(){return _.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[_.jsx("circle",{cx:"12",cy:"12",r:"10"}),_.jsx("path",{d:"M12 6v12"}),_.jsx("path",{d:"M8 10h8"}),_.jsx("path",{d:"M8 14h8"})]})}function RM(){return _.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:_.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function Gu({title:s,description:e,icon:i,view:a}){const o=yf(),c=()=>{o({type:"SET_CURRENT_VIEW",view:a})};return _.jsxs("button",{type:"button",className:"quick-nav-card",onClick:c,children:[_.jsx("div",{className:"quick-nav-icon",children:i}),_.jsxs("div",{className:"quick-nav-content",children:[_.jsx("h4",{className:"quick-nav-title",children:s}),_.jsx("p",{className:"quick-nav-description",children:e})]}),_.jsx("svg",{className:"quick-nav-arrow",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:_.jsx("path",{d:"M9 18l6-6-6-6"})})]})}function kM(){const{logs:s,toolStats:e,activeProject:i}=Pe(),{t:a}=di(),{loadStats:o}=by(),c=vy(e);return W.useEffect(()=>{e||o()},[e,o]),_.jsxs("div",{className:"dashboard-overview",children:[_.jsx(wn,{children:_.jsx("div",{className:"welcome-section",children:_.jsxs("div",{className:"welcome-content",children:[_.jsx("h2",{className:"welcome-title",children:i?a("dashboard.welcomeWithProject",{project:i}):a("dashboard.welcome")}),_.jsx("p",{className:"welcome-description",children:a("dashboard.description")})]})})}),_.jsxs("div",{className:"metrics-grid",children:[_.jsx(ui,{title:a("dashboard.logEntries"),value:_.jsx(js,{value:s.length}),subtitle:a("dashboard.currentSession"),icon:_.jsx(c0,{})}),_.jsx(ui,{title:a("dashboard.toolCalls"),value:_.jsx(js,{value:c.totalCalls}),subtitle:a("dashboard.toolsUsed",{count:c.toolCount}),icon:_.jsx(r0,{})}),_.jsx(ui,{title:a("dashboard.totalTokens"),value:_.jsx(js,{value:c.totalTokens,formatter:$a}),subtitle:a("dashboard.inputOutput"),icon:_.jsx(u0,{})}),_.jsx(ui,{title:a("dashboard.topTool"),value:c.mostUsedTool?.name||"-",subtitle:c.mostUsedTool?a("dashboard.calls",{count:c.mostUsedTool.calls}):a("dashboard.noData"),icon:_.jsx(RM,{})})]}),_.jsx(wn,{title:a("dashboard.quickNavigation"),children:_.jsxs("div",{className:"quick-nav-grid",children:[_.jsx(Gu,{title:a("dashboard.viewLogs"),description:a("dashboard.viewLogsDesc"),icon:_.jsx(c0,{}),view:"logs"}),_.jsx(Gu,{title:a("nav.statistics"),description:a("dashboard.statisticsDesc"),icon:_.jsx(r0,{}),view:"stats"}),_.jsx(Gu,{title:a("nav.sessions"),description:a("dashboard.sessionsDesc"),icon:_.jsx(u0,{}),view:"sessions"})]})})]})}function NM(){return _.jsx(kM,{})}function LM(){return _.jsx(rM,{})}function HM(){return _.jsx(MM,{})}function BM(){return _.jsx(jM,{})}function UM(){const{currentView:s}=Pe();return{dashboard:_.jsx(NM,{}),logs:_.jsx(LM,{}),stats:_.jsx(HM,{}),sessions:_.jsx(BM,{})}[s]}function VM(){const{theme:s,activeProject:e}=Pe();return W.useEffect(()=>{document.documentElement.setAttribute("data-theme",s)},[s]),W.useEffect(()=>{document.title=e?`${e} – Smart Edit Dashboard`:"Smart Edit Dashboard"},[e]),_.jsx(KT,{children:_.jsx(UM,{})})}function YM(){return _.jsx(yT,{children:_.jsx(zT,{children:_.jsx(ET,{children:_.jsx(VM,{})})})})}Io.register(K0,$0,Po,I0,H2,V2,T2,R2,E2,y2,fT);const Ty=document.getElementById("root");if(!Ty)throw new Error("Root element not found");nx.createRoot(Ty).render(_.jsx(W.StrictMode,{children:_.jsx(YM,{})}));
|
|
11
|
+
`):s}function z2(s,e){const{element:i,datasetIndex:a,index:o}=e,c=s.getDatasetMeta(a).controller,{label:u,value:f}=c.getLabelAndValue(o);return{chart:s,label:u,parsed:c.getParsed(o),raw:s.data.datasets[a].data[o],formattedValue:f,dataset:c.getDataset(),dataIndex:o,datasetIndex:a,element:i}}function Hp(s,e){const i=s.chart.ctx,{body:a,footer:o,title:c}=s,{boxWidth:u,boxHeight:f}=e,d=re(e.bodyFont),m=re(e.titleFont),p=re(e.footerFont),b=c.length,v=o.length,S=a.length,T=Le(e.padding);let M=T.height,A=0,D=a.reduce((G,Y)=>G+Y.before.length+Y.lines.length+Y.after.length,0);if(D+=s.beforeBody.length+s.afterBody.length,b&&(M+=b*m.lineHeight+(b-1)*e.titleSpacing+e.titleMarginBottom),D){const G=e.displayColors?Math.max(f,d.lineHeight):d.lineHeight;M+=S*G+(D-S)*d.lineHeight+(D-1)*e.bodySpacing}v&&(M+=e.footerMarginTop+v*p.lineHeight+(v-1)*e.footerSpacing);let L=0;const q=function(G){A=Math.max(A,i.measureText(G).width+L)};return i.save(),i.font=m.string,At(s.title,q),i.font=d.string,At(s.beforeBody.concat(s.afterBody),q),L=e.displayColors?u+2+e.boxPadding:0,At(a,G=>{At(G.before,q),At(G.lines,q),At(G.after,q)}),L=0,i.font=p.string,At(s.footer,q),i.restore(),A+=T.width,{width:A,height:M}}function w2(s,e){const{y:i,height:a}=e;return i<a/2?"top":i>s.height-a/2?"bottom":"center"}function j2(s,e,i,a){const{x:o,width:c}=a,u=i.caretSize+i.caretPadding;if(s==="left"&&o+c+u>e.width||s==="right"&&o-c-u<0)return!0}function R2(s,e,i,a){const{x:o,width:c}=i,{width:u,chartArea:{left:f,right:d}}=s;let m="center";return a==="center"?m=o<=(f+d)/2?"left":"right":o<=c/2?m="left":o>=u-c/2&&(m="right"),j2(m,s,e,i)&&(m="center"),m}function Bp(s,e,i){const a=i.yAlign||e.yAlign||w2(s,i);return{xAlign:i.xAlign||e.xAlign||R2(s,e,i,a),yAlign:a}}function N2(s,e){let{x:i,width:a}=s;return e==="right"?i-=a:e==="center"&&(i-=a/2),i}function k2(s,e,i){let{y:a,height:o}=s;return e==="top"?a+=i:e==="bottom"?a-=o+i:a-=o/2,a}function Up(s,e,i,a){const{caretSize:o,caretPadding:c,cornerRadius:u}=s,{xAlign:f,yAlign:d}=i,m=o+c,{topLeft:p,topRight:b,bottomLeft:v,bottomRight:S}=zs(u);let T=N2(e,f);const M=k2(e,d,m);return d==="center"?f==="left"?T+=m:f==="right"&&(T-=m):f==="left"?T-=Math.max(p,v)+o:f==="right"&&(T+=Math.max(b,S)+o),{x:fe(T,0,a.width-e.width),y:fe(M,0,a.height-e.height)}}function zo(s,e,i){const a=Le(i.padding);return e==="center"?s.x+s.width/2:e==="right"?s.x+s.width-a.right:s.x+a.left}function Vp(s){return an([],Dn(s))}function L2(s,e,i){return Xi(s,{tooltip:e,tooltipItems:i,type:"tooltip"})}function Yp(s,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?s.override(i):s}const ly={beforeTitle:On,title(s){if(s.length>0){const e=s[0],i=e.chart.data.labels,a=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(a>0&&e.dataIndex<a)return i[e.dataIndex]}return""},afterTitle:On,beforeBody:On,beforeLabel:On,label(s){if(this&&this.options&&this.options.mode==="dataset")return s.label+": "+s.formattedValue||s.formattedValue;let e=s.dataset.label||"";e&&(e+=": ");const i=s.formattedValue;return xt(i)||(e+=i),e},labelColor(s){const i=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(s){const i=s.chart.getDatasetMeta(s.datasetIndex).controller.getStyle(s.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:On,afterBody:On,beforeFooter:On,footer:On,afterFooter:On};function Se(s,e,i,a){const o=s[e].call(i,a);return typeof o>"u"?ly[e].call(i,a):o}class qp extends kn{static positioners=Ua;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const i=this.chart,a=this.options.setContext(this.getContext()),o=a.enabled&&i.options.animation&&a.animations,c=new B0(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(c)),c}getContext(){return this.$context||(this.$context=L2(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,i){const{callbacks:a}=i,o=Se(a,"beforeTitle",this,e),c=Se(a,"title",this,e),u=Se(a,"afterTitle",this,e);let f=[];return f=an(f,Dn(o)),f=an(f,Dn(c)),f=an(f,Dn(u)),f}getBeforeBody(e,i){return Vp(Se(i.callbacks,"beforeBody",this,e))}getBody(e,i){const{callbacks:a}=i,o=[];return At(e,c=>{const u={before:[],lines:[],after:[]},f=Yp(a,c);an(u.before,Dn(Se(f,"beforeLabel",this,c))),an(u.lines,Se(f,"label",this,c)),an(u.after,Dn(Se(f,"afterLabel",this,c))),o.push(u)}),o}getAfterBody(e,i){return Vp(Se(i.callbacks,"afterBody",this,e))}getFooter(e,i){const{callbacks:a}=i,o=Se(a,"beforeFooter",this,e),c=Se(a,"footer",this,e),u=Se(a,"afterFooter",this,e);let f=[];return f=an(f,Dn(o)),f=an(f,Dn(c)),f=an(f,Dn(u)),f}_createItems(e){const i=this._active,a=this.chart.data,o=[],c=[],u=[];let f=[],d,m;for(d=0,m=i.length;d<m;++d)f.push(z2(this.chart,i[d]));return e.filter&&(f=f.filter((p,b,v)=>e.filter(p,b,v,a))),e.itemSort&&(f=f.sort((p,b)=>e.itemSort(p,b,a))),At(f,p=>{const b=Yp(e.callbacks,p);o.push(Se(b,"labelColor",this,p)),c.push(Se(b,"labelPointStyle",this,p)),u.push(Se(b,"labelTextColor",this,p))}),this.labelColors=o,this.labelPointStyles=c,this.labelTextColors=u,this.dataPoints=f,f}update(e,i){const a=this.options.setContext(this.getContext()),o=this._active;let c,u=[];if(!o.length)this.opacity!==0&&(c={opacity:0});else{const f=Ua[a.position].call(this,o,this._eventPosition);u=this._createItems(a),this.title=this.getTitle(u,a),this.beforeBody=this.getBeforeBody(u,a),this.body=this.getBody(u,a),this.afterBody=this.getAfterBody(u,a),this.footer=this.getFooter(u,a);const d=this._size=Hp(this,a),m=Object.assign({},f,d),p=Bp(this.chart,a,m),b=Up(a,m,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,c={opacity:1,x:b.x,y:b.y,width:d.width,height:d.height,caretX:f.x,caretY:f.y}}this._tooltipItems=u,this.$context=void 0,c&&this._resolveAnimations().update(this,c),e&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(e,i,a,o){const c=this.getCaretPosition(e,a,o);i.lineTo(c.x1,c.y1),i.lineTo(c.x2,c.y2),i.lineTo(c.x3,c.y3)}getCaretPosition(e,i,a){const{xAlign:o,yAlign:c}=this,{caretSize:u,cornerRadius:f}=a,{topLeft:d,topRight:m,bottomLeft:p,bottomRight:b}=zs(f),{x:v,y:S}=e,{width:T,height:M}=i;let A,D,L,q,G,Y;return c==="center"?(G=S+M/2,o==="left"?(A=v,D=A-u,q=G+u,Y=G-u):(A=v+T,D=A+u,q=G-u,Y=G+u),L=A):(o==="left"?D=v+Math.max(d,p)+u:o==="right"?D=v+T-Math.max(m,b)-u:D=this.caretX,c==="top"?(q=S,G=q-u,A=D-u,L=D+u):(q=S+M,G=q+u,A=D+u,L=D-u),Y=q),{x1:A,x2:D,x3:L,y1:q,y2:G,y3:Y}}drawTitle(e,i,a){const o=this.title,c=o.length;let u,f,d;if(c){const m=ws(a.rtl,this.x,this.width);for(e.x=zo(this,a.titleAlign,a),i.textAlign=m.textAlign(a.titleAlign),i.textBaseline="middle",u=re(a.titleFont),f=a.titleSpacing,i.fillStyle=a.titleColor,i.font=u.string,d=0;d<c;++d)i.fillText(o[d],m.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+f,d+1===c&&(e.y+=a.titleMarginBottom-f)}}_drawColorBox(e,i,a,o,c){const u=this.labelColors[a],f=this.labelPointStyles[a],{boxHeight:d,boxWidth:m}=c,p=re(c.bodyFont),b=zo(this,"left",c),v=o.x(b),S=d<p.lineHeight?(p.lineHeight-d)/2:0,T=i.y+S;if(c.usePointStyle){const M={radius:Math.min(m,d)/2,pointStyle:f.pointStyle,rotation:f.rotation,borderWidth:1},A=o.leftForLtr(v,m)+m/2,D=T+d/2;e.strokeStyle=c.multiKeyBackground,e.fillStyle=c.multiKeyBackground,Wu(e,M,A,D),e.strokeStyle=u.borderColor,e.fillStyle=u.backgroundColor,Wu(e,M,A,D)}else{e.lineWidth=pt(u.borderWidth)?Math.max(...Object.values(u.borderWidth)):u.borderWidth||1,e.strokeStyle=u.borderColor,e.setLineDash(u.borderDash||[]),e.lineDashOffset=u.borderDashOffset||0;const M=o.leftForLtr(v,m),A=o.leftForLtr(o.xPlus(v,1),m-2),D=zs(u.borderRadius);Object.values(D).some(L=>L!==0)?(e.beginPath(),e.fillStyle=c.multiKeyBackground,qo(e,{x:M,y:T,w:m,h:d,radius:D}),e.fill(),e.stroke(),e.fillStyle=u.backgroundColor,e.beginPath(),qo(e,{x:A,y:T+1,w:m-2,h:d-2,radius:D}),e.fill()):(e.fillStyle=c.multiKeyBackground,e.fillRect(M,T,m,d),e.strokeRect(M,T,m,d),e.fillStyle=u.backgroundColor,e.fillRect(A,T+1,m-2,d-2))}e.fillStyle=this.labelTextColors[a]}drawBody(e,i,a){const{body:o}=this,{bodySpacing:c,bodyAlign:u,displayColors:f,boxHeight:d,boxWidth:m,boxPadding:p}=a,b=re(a.bodyFont);let v=b.lineHeight,S=0;const T=ws(a.rtl,this.x,this.width),M=function(F){i.fillText(F,T.x(e.x+S),e.y+v/2),e.y+=v+c},A=T.textAlign(u);let D,L,q,G,Y,W,X;for(i.textAlign=u,i.textBaseline="middle",i.font=b.string,e.x=zo(this,A,a),i.fillStyle=a.bodyColor,At(this.beforeBody,M),S=f&&A!=="right"?u==="center"?m/2+p:m+2+p:0,G=0,W=o.length;G<W;++G){for(D=o[G],L=this.labelTextColors[G],i.fillStyle=L,At(D.before,M),q=D.lines,f&&q.length&&(this._drawColorBox(i,e,G,T,a),v=Math.max(b.lineHeight,d)),Y=0,X=q.length;Y<X;++Y)M(q[Y]),v=b.lineHeight;At(D.after,M)}S=0,v=b.lineHeight,At(this.afterBody,M),e.y-=c}drawFooter(e,i,a){const o=this.footer,c=o.length;let u,f;if(c){const d=ws(a.rtl,this.x,this.width);for(e.x=zo(this,a.footerAlign,a),e.y+=a.footerMarginTop,i.textAlign=d.textAlign(a.footerAlign),i.textBaseline="middle",u=re(a.footerFont),i.fillStyle=a.footerColor,i.font=u.string,f=0;f<c;++f)i.fillText(o[f],d.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+a.footerSpacing}}drawBackground(e,i,a,o){const{xAlign:c,yAlign:u}=this,{x:f,y:d}=e,{width:m,height:p}=a,{topLeft:b,topRight:v,bottomLeft:S,bottomRight:T}=zs(o.cornerRadius);i.fillStyle=o.backgroundColor,i.strokeStyle=o.borderColor,i.lineWidth=o.borderWidth,i.beginPath(),i.moveTo(f+b,d),u==="top"&&this.drawCaret(e,i,a,o),i.lineTo(f+m-v,d),i.quadraticCurveTo(f+m,d,f+m,d+v),u==="center"&&c==="right"&&this.drawCaret(e,i,a,o),i.lineTo(f+m,d+p-T),i.quadraticCurveTo(f+m,d+p,f+m-T,d+p),u==="bottom"&&this.drawCaret(e,i,a,o),i.lineTo(f+S,d+p),i.quadraticCurveTo(f,d+p,f,d+p-S),u==="center"&&c==="left"&&this.drawCaret(e,i,a,o),i.lineTo(f,d+b),i.quadraticCurveTo(f,d,f+b,d),i.closePath(),i.fill(),o.borderWidth>0&&i.stroke()}_updateAnimationTarget(e){const i=this.chart,a=this.$animations,o=a&&a.x,c=a&&a.y;if(o||c){const u=Ua[e.position].call(this,this._active,this._eventPosition);if(!u)return;const f=this._size=Hp(this,e),d=Object.assign({},u,this._size),m=Bp(i,e,d),p=Up(e,d,m,i);(o._to!==p.x||c._to!==p.y)&&(this.xAlign=m.xAlign,this.yAlign=m.yAlign,this.width=f.width,this.height=f.height,this.caretX=u.x,this.caretY=u.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(e){const i=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(i);const o={width:this.width,height:this.height},c={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const u=Le(i.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&f&&(e.save(),e.globalAlpha=a,this.drawBackground(c,e,o,i),j0(e,i.textDirection),c.y+=u.top,this.drawTitle(c,e,i),this.drawBody(c,e,i),this.drawFooter(c,e,i),R0(e,i.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,i){const a=this._active,o=e.map(({datasetIndex:f,index:d})=>{const m=this.chart.getDatasetMeta(f);if(!m)throw new Error("Cannot find a dataset at index "+f);return{datasetIndex:f,element:m.data[d],index:d}}),c=!Uo(a,o),u=this._positionChanged(o,i);(c||u)&&(this._active=o,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,i,a=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,c=this._active||[],u=this._getActiveElements(e,c,i,a),f=this._positionChanged(u,e),d=i||!Uo(u,c)||f;return d&&(this._active=u,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,i))),d}_getActiveElements(e,i,a,o){const c=this.options;if(e.type==="mouseout")return[];if(!o)return i.filter(f=>this.chart.data.datasets[f.datasetIndex]&&this.chart.getDatasetMeta(f.datasetIndex).controller.getParsed(f.index)!==void 0);const u=this.chart.getElementsAtEventForMode(e,c.mode,c,a);return c.reverse&&u.reverse(),u}_positionChanged(e,i){const{caretX:a,caretY:o,options:c}=this,u=Ua[c.position].call(this,e,i);return u!==!1&&(a!==u.x||o!==u.y)}}var H2={id:"tooltip",_element:qp,positioners:Ua,afterInit(s,e,i){i&&(s.tooltip=new qp({chart:s,options:i}))},beforeUpdate(s,e,i){s.tooltip&&s.tooltip.initialize(i)},reset(s,e,i){s.tooltip&&s.tooltip.initialize(i)},afterDraw(s){const e=s.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(s.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0})===!1)return;e.draw(s.ctx),s.notifyPlugins("afterTooltipDraw",i)}},afterEvent(s,e){if(s.tooltip){const i=e.replay;s.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(s,e)=>e.bodyFont.size,boxWidth:(s,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ly},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:s=>s!=="filter"&&s!=="itemSort"&&s!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const B2=(s,e,i,a)=>(typeof e=="string"?(i=s.push(e)-1,a.unshift({index:i,label:e})):isNaN(e)&&(i=null),i);function U2(s,e,i,a){const o=s.indexOf(e);if(o===-1)return B2(s,e,i,a);const c=s.lastIndexOf(e);return o!==c?i:o}const V2=(s,e)=>s===null?null:fe(Math.round(s),0,e);function Xp(s){const e=this.getLabels();return s>=0&&s<e.length?e[s]:s}class Y2 extends ks{static id="category";static defaults={ticks:{callback:Xp}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const i=this._addedLabels;if(i.length){const a=this.getLabels();for(const{index:o,label:c}of i)a[o]===c&&a.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,i){if(xt(e))return null;const a=this.getLabels();return i=isFinite(i)&&a[i]===e?i:U2(a,e,ht(i,e),this._addedLabels),V2(i,a.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:a,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(a=0),i||(o=this.getLabels().length-1)),this.min=a,this.max=o}buildTicks(){const e=this.min,i=this.max,a=this.options.offset,o=[];let c=this.getLabels();c=e===0&&i===c.length-1?c:c.slice(e,i+1),this._valueRange=Math.max(c.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let u=e;u<=i;u++)o.push({value:u});return o}getLabelForValue(e){return Xp.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function q2(s,e){const i=[],{bounds:o,step:c,min:u,max:f,precision:d,count:m,maxTicks:p,maxDigits:b,includeBounds:v}=s,S=c||1,T=p-1,{min:M,max:A}=e,D=!xt(u),L=!xt(f),q=!xt(m),G=(A-M)/(b+1);let Y=Um((A-M)/T/S)*S,W,X,F,tt;if(Y<1e-14&&!D&&!L)return[{value:M},{value:A}];tt=Math.ceil(A/Y)-Math.floor(M/Y),tt>T&&(Y=Um(tt*Y/T/S)*S),xt(d)||(W=Math.pow(10,d),Y=Math.ceil(Y*W)/W),o==="ticks"?(X=Math.floor(M/Y)*Y,F=Math.ceil(A/Y)*Y):(X=M,F=A),D&&L&&c&&Vx((f-u)/c,Y/1e3)?(tt=Math.round(Math.min((f-u)/Y,p)),Y=(f-u)/tt,X=u,F=f):q?(X=D?u:X,F=L?f:F,tt=m-1,Y=(F-X)/tt):(tt=(F-X)/Y,Ya(tt,Math.round(tt),Y/1e3)?tt=Math.round(tt):tt=Math.ceil(tt));const rt=Math.max(Vm(Y),Vm(X));W=Math.pow(10,xt(d)?rt:d),X=Math.round(X*W)/W,F=Math.round(F*W)/W;let it=0;for(D&&(v&&X!==u?(i.push({value:u}),X<u&&it++,Ya(Math.round((X+it*Y)*W)/W,u,Gp(u,G,s))&&it++):X<u&&it++);it<tt;++it){const st=Math.round((X+it*Y)*W)/W;if(L&&st>f)break;i.push({value:st})}return L&&v&&F!==f?i.length&&Ya(i[i.length-1].value,f,Gp(f,G,s))?i[i.length-1].value=f:i.push({value:f}):(!L||F===f)&&i.push({value:F}),i}function Gp(s,e,{horizontal:i,minRotation:a}){const o=jn(a),c=(i?Math.sin(o):Math.cos(o))||.001,u=.75*e*(""+s).length;return Math.min(e/c,u)}class X2 extends ks{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,i){return xt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:i,maxDefined:a}=this.getUserBounds();let{min:o,max:c}=this;const u=d=>o=i?o:d,f=d=>c=a?c:d;if(e){const d=on(o),m=on(c);d<0&&m<0?f(0):d>0&&m>0&&u(0)}if(o===c){let d=c===0?1:Math.abs(c*.05);f(c+d),e||u(o-d)}this.min=o,this.max=c}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:i,stepSize:a}=e,o;return a?(o=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),i=i||11),i&&(o=Math.min(i,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,i=e.ticks;let a=this.getTickLimit();a=Math.max(2,a);const o={maxTicks:a,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:i.minRotation||0,includeBounds:i.includeBounds!==!1},c=this._range||this,u=q2(o,c);return e.bounds==="ticks"&&Yx(u,this,"value"),e.reverse?(u.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),u}configure(){const e=this.ticks;let i=this.min,a=this.max;if(super.configure(),this.options.offset&&e.length){const o=(a-i)/Math.max(e.length-1,1)/2;i-=o,a+=o}this._startValue=i,this._endValue=a,this._valueRange=a-i}getLabelForValue(e){return uf(e,this.chart.options.locale,this.options.ticks.format)}}class G2 extends X2{static id="linear";static defaults={ticks:{callback:M0.formatters.numeric}};determineDataLimits(){const{min:e,max:i}=this.getMinMax(!0);this.min=he(e)?e:0,this.max=he(i)?i:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),i=e?this.width:this.height,a=jn(this.options.ticks.minRotation),o=(e?Math.sin(a):Math.cos(a))||.001,c=this._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,c.lineHeight/o))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const tr={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}},Me=Object.keys(tr);function Qp(s,e){return s-e}function Zp(s,e){if(xt(e))return null;const i=s._adapter,{parser:a,round:o,isoWeekday:c}=s._parseOpts;let u=e;return typeof a=="function"&&(u=a(u)),he(u)||(u=typeof a=="string"?i.parse(u,a):i.parse(u)),u===null?null:(o&&(u=o==="week"&&(Ka(c)||c===!0)?i.startOf(u,"isoWeek",c):i.startOf(u,o)),+u)}function Fp(s,e,i,a){const o=Me.length;for(let c=Me.indexOf(s);c<o-1;++c){const u=tr[Me[c]],f=u.steps?u.steps:Number.MAX_SAFE_INTEGER;if(u.common&&Math.ceil((i-e)/(f*u.size))<=a)return Me[c]}return Me[o-1]}function Q2(s,e,i,a,o){for(let c=Me.length-1;c>=Me.indexOf(i);c--){const u=Me[c];if(tr[u].common&&s._adapter.diff(o,a,u)>=e-1)return u}return Me[i?Me.indexOf(i):0]}function Z2(s){for(let e=Me.indexOf(s)+1,i=Me.length;e<i;++e)if(tr[Me[e]].common)return Me[e]}function Kp(s,e,i){if(!i)s[e]=!0;else if(i.length){const{lo:a,hi:o}=of(i,e),c=i[a]>=e?i[a]:i[o];s[c]=!0}}function F2(s,e,i,a){const o=s._adapter,c=+o.startOf(e[0].value,a),u=e[e.length-1].value;let f,d;for(f=c;f<=u;f=+o.add(f,1,a))d=i[f],d>=0&&(e[d].major=!0);return e}function Wp(s,e,i){const a=[],o={},c=e.length;let u,f;for(u=0;u<c;++u)f=e[u],o[f]=u,a.push({value:f,major:!1});return c===0||!i?a:F2(s,a,o,i)}class Jp extends ks{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,i={}){const a=e.time||(e.time={}),o=this._adapter=new O1._date(e.adapters.date);o.init(i),Va(a.displayFormats,o.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(e),this._normalized=i.normalized}parse(e,i){return e===void 0?null:Zp(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,i=this._adapter,a=e.time.unit||"day";let{min:o,max:c,minDefined:u,maxDefined:f}=this.getUserBounds();function d(m){!u&&!isNaN(m.min)&&(o=Math.min(o,m.min)),!f&&!isNaN(m.max)&&(c=Math.max(c,m.max))}(!u||!f)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),o=he(o)&&!isNaN(o)?o:+i.startOf(Date.now(),a),c=he(c)&&!isNaN(c)?c:+i.endOf(Date.now(),a)+1,this.min=Math.min(o,c-1),this.max=Math.max(o+1,c)}_getLabelBounds(){const e=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return e.length&&(i=e[0],a=e[e.length-1]),{min:i,max:a}}buildTicks(){const e=this.options,i=e.time,a=e.ticks,o=a.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const c=this.min,u=this.max,f=Zx(o,c,u);return this._unit=i.unit||(a.autoSkip?Fp(i.minUnit,this.min,this.max,this._getLabelCapacity(c)):Q2(this,f.length,i.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:Z2(this._unit),this.initOffsets(o),e.reverse&&f.reverse(),Wp(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let i=0,a=0,o,c;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?i=1-o:i=(this.getDecimalForValue(e[1])-o)/2,c=this.getDecimalForValue(e[e.length-1]),e.length===1?a=c:a=(c-this.getDecimalForValue(e[e.length-2]))/2);const u=e.length<3?.5:.25;i=fe(i,0,u),a=fe(a,0,u),this._offsets={start:i,end:a,factor:1/(i+1+a)}}_generate(){const e=this._adapter,i=this.min,a=this.max,o=this.options,c=o.time,u=c.unit||Fp(c.minUnit,i,a,this._getLabelCapacity(i)),f=ht(o.ticks.stepSize,1),d=u==="week"?c.isoWeekday:!1,m=Ka(d)||d===!0,p={};let b=i,v,S;if(m&&(b=+e.startOf(b,"isoWeek",d)),b=+e.startOf(b,m?"day":u),e.diff(a,i,u)>1e5*f)throw new Error(i+" and "+a+" are too far apart with stepSize of "+f+" "+u);const T=o.ticks.source==="data"&&this.getDataTimestamps();for(v=b,S=0;v<a;v=+e.add(v,f,u),S++)Kp(p,v,T);return(v===a||o.bounds==="ticks"||S===1)&&Kp(p,v,T),Object.keys(p).sort(Qp).map(M=>+M)}getLabelForValue(e){const i=this._adapter,a=this.options.time;return a.tooltipFormat?i.format(e,a.tooltipFormat):i.format(e,a.displayFormats.datetime)}format(e,i){const o=this.options.time.displayFormats,c=this._unit,u=i||o[c];return this._adapter.format(e,u)}_tickFormatFunction(e,i,a,o){const c=this.options,u=c.ticks.callback;if(u)return Nt(u,[e,i,a],this);const f=c.time.displayFormats,d=this._unit,m=this._majorUnit,p=d&&f[d],b=m&&f[m],v=a[i],S=m&&b&&v&&v.major;return this._adapter.format(e,o||(S?b:p))}generateTickLabels(e){let i,a,o;for(i=0,a=e.length;i<a;++i)o=e[i],o.label=this._tickFormatFunction(o.value,i,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const i=this._offsets,a=this.getDecimalForValue(e);return this.getPixelForDecimal((i.start+a)*i.factor)}getValueForPixel(e){const i=this._offsets,a=this.getDecimalForPixel(e)/i.factor-i.end;return this.min+a*(this.max-this.min)}_getLabelSize(e){const i=this.options.ticks,a=this.ctx.measureText(e).width,o=jn(this.isHorizontal()?i.maxRotation:i.minRotation),c=Math.cos(o),u=Math.sin(o),f=this._resolveTickFontOptions(0).size;return{w:a*c+f*u,h:a*u+f*c}}_getLabelCapacity(e){const i=this.options.time,a=i.displayFormats,o=a[i.unit]||a.millisecond,c=this._tickFormatFunction(e,0,Wp(this,[e],this._majorUnit),o),u=this._getLabelSize(c),f=Math.floor(this.isHorizontal()?this.width/u.w:this.height/u.h)-1;return f>0?f:1}getDataTimestamps(){let e=this._cache.data||[],i,a;if(e.length)return e;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(i=0,a=o.length;i<a;++i)e=e.concat(o[i].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let i,a;if(e.length)return e;const o=this.getLabels();for(i=0,a=o.length;i<a;++i)e.push(Zp(this,o[i]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return _0(e.sort(Qp))}}function wo(s,e,i){let a=0,o=s.length-1,c,u,f,d;i?(e>=s[a].pos&&e<=s[o].pos&&({lo:a,hi:o}=Ui(s,"pos",e)),{pos:c,time:f}=s[a],{pos:u,time:d}=s[o]):(e>=s[a].time&&e<=s[o].time&&({lo:a,hi:o}=Ui(s,"time",e)),{time:c,pos:f}=s[a],{time:u,pos:d}=s[o]);const m=u-c;return m?f+(d-f)*(e-c)/m:f}class JM extends Jp{static id="timeseries";static defaults=Jp.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),i=this._table=this.buildLookupTable(e);this._minPos=wo(i,this.min),this._tableRange=wo(i,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:i,max:a}=this,o=[],c=[];let u,f,d,m,p;for(u=0,f=e.length;u<f;++u)m=e[u],m>=i&&m<=a&&o.push(m);if(o.length<2)return[{time:i,pos:0},{time:a,pos:1}];for(u=0,f=o.length;u<f;++u)p=o[u+1],d=o[u-1],m=o[u],Math.round((p+d)/2)!==m&&c.push({time:m,pos:u/(f-1)});return c}_generate(){const e=this.min,i=this.max;let a=super.getDataTimestamps();return(!a.includes(e)||!a.length)&&a.splice(0,0,e),(!a.includes(i)||a.length===1)&&a.push(i),a.sort((o,c)=>o-c)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const i=this.getDataTimestamps(),a=this.getLabelTimestamps();return i.length&&a.length?e=this.normalize(i.concat(a)):e=i.length?i:a,e=this._cache.all=e,e}getDecimalForValue(e){return(wo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const i=this._offsets,a=this.getDecimalForPixel(e)/i.factor-i.end;return wo(this._table,a*this._tableRange+this._minPos,!0)}}var Ip=(function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var s=window.screen;if(s)return(s.deviceXDPI||1)/(s.logicalXDPI||1)}return 1})(),Ga={toTextLines:function(s){var e=[],i;for(s=[].concat(s);s.length;)i=s.pop(),typeof i=="string"?e.unshift.apply(e,i.split(`
|
|
12
|
+
`)):Array.isArray(i)?s.push.apply(s,i):xt(s)||e.unshift(""+i);return e},textSize:function(s,e,i){var a=[].concat(e),o=a.length,c=s.font,u=0,f;for(s.font=i.string,f=0;f<o;++f)u=Math.max(s.measureText(a[f]).width,u);return s.font=c,{height:o*i.lineHeight,width:u}},bound:function(s,e,i){return Math.max(s,Math.min(e,i))},arrayDiff:function(s,e){var i=s.slice(),a=[],o,c,u,f;for(o=0,u=e.length;o<u;++o)f=e[o],c=i.indexOf(f),c===-1?a.push([f,1]):i.splice(c,1);for(o=0,u=i.length;o<u;++o)a.push([i[o],-1]);return a},rasterize:function(s){return Math.round(s*Ip)/Ip}};function Uu(s,e){var i=e.x,a=e.y;if(i===null)return{x:0,y:-1};if(a===null)return{x:1,y:0};var o=s.x-i,c=s.y-a,u=Math.sqrt(o*o+c*c);return{x:u?o/u:0,y:u?c/u:-1}}function K2(s,e,i,a,o){switch(o){case"center":i=a=0;break;case"bottom":i=0,a=1;break;case"right":i=1,a=0;break;case"left":i=-1,a=0;break;case"top":i=0,a=-1;break;case"start":i=-i,a=-a;break;case"end":break;default:o*=Math.PI/180,i=Math.cos(o),a=Math.sin(o);break}return{x:s,y:e,vx:i,vy:a}}var W2=0,oy=1,ry=2,cy=4,uy=8;function jo(s,e,i){var a=W2;return s<i.left?a|=oy:s>i.right&&(a|=ry),e<i.top?a|=uy:e>i.bottom&&(a|=cy),a}function J2(s,e){for(var i=s.x0,a=s.y0,o=s.x1,c=s.y1,u=jo(i,a,e),f=jo(o,c,e),d,m,p;!(!(u|f)||u&f);)d=u||f,d&uy?(m=i+(o-i)*(e.top-a)/(c-a),p=e.top):d&cy?(m=i+(o-i)*(e.bottom-a)/(c-a),p=e.bottom):d&ry?(p=a+(c-a)*(e.right-i)/(o-i),m=e.right):d&oy&&(p=a+(c-a)*(e.left-i)/(o-i),m=e.left),d===u?(i=m,a=p,u=jo(i,a,e)):(o=m,c=p,f=jo(o,c,e));return{x0:i,x1:o,y0:a,y1:c}}function Ro(s,e){var i=e.anchor,a=s,o,c;return e.clamp&&(a=J2(a,e.area)),i==="start"?(o=a.x0,c=a.y0):i==="end"?(o=a.x1,c=a.y1):(o=(a.x0+a.x1)/2,c=(a.y0+a.y1)/2),K2(o,c,s.vx,s.vy,e.align)}var No={arc:function(s,e){var i=(s.startAngle+s.endAngle)/2,a=Math.cos(i),o=Math.sin(i),c=s.innerRadius,u=s.outerRadius;return Ro({x0:s.x+a*c,y0:s.y+o*c,x1:s.x+a*u,y1:s.y+o*u,vx:a,vy:o},e)},point:function(s,e){var i=Uu(s,e.origin),a=i.x*s.options.radius,o=i.y*s.options.radius;return Ro({x0:s.x-a,y0:s.y-o,x1:s.x+a,y1:s.y+o,vx:i.x,vy:i.y},e)},bar:function(s,e){var i=Uu(s,e.origin),a=s.x,o=s.y,c=0,u=0;return s.horizontal?(a=Math.min(s.x,s.base),c=Math.abs(s.base-s.x)):(o=Math.min(s.y,s.base),u=Math.abs(s.base-s.y)),Ro({x0:a,y0:o+u,x1:a+c,y1:o,vx:i.x,vy:i.y},e)},fallback:function(s,e){var i=Uu(s,e.origin);return Ro({x0:s.x,y0:s.y,x1:s.x+(s.width||0),y1:s.y+(s.height||0),vx:i.x,vy:i.y},e)}},Nn=Ga.rasterize;function I2(s){var e=s.borderWidth||0,i=s.padding,a=s.size.height,o=s.size.width,c=-o/2,u=-a/2;return{frame:{x:c-i.left-e,y:u-i.top-e,w:o+i.width+e*2,h:a+i.height+e*2},text:{x:c,y:u,w:o,h:a}}}function P2(s,e){var i=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!i)return null;if(i.xCenter!==void 0&&i.yCenter!==void 0)return{x:i.xCenter,y:i.yCenter};var a=i.getBasePixel();return s.horizontal?{x:a,y:null}:{x:null,y:a}}function $2(s){return s instanceof J0?No.arc:s instanceof $0?No.point:s instanceof ey?No.bar:No.fallback}function tT(s,e,i,a,o,c){var u=Math.PI/2;if(c){var f=Math.min(c,o/2,a/2),d=e+f,m=i+f,p=e+a-f,b=i+o-f;s.moveTo(e,m),d<p&&m<b?(s.arc(d,m,f,-Math.PI,-u),s.arc(p,m,f,-u,0),s.arc(p,b,f,0,u),s.arc(d,b,f,u,Math.PI)):d<p?(s.moveTo(d,i),s.arc(p,m,f,-u,u),s.arc(d,m,f,u,Math.PI+u)):m<b?(s.arc(d,m,f,-Math.PI,0),s.arc(d,b,f,0,Math.PI)):s.arc(d,m,f,-Math.PI,Math.PI),s.closePath(),s.moveTo(e,i)}else s.rect(e,i,a,o)}function eT(s,e,i){var a=i.backgroundColor,o=i.borderColor,c=i.borderWidth;!a&&(!o||!c)||(s.beginPath(),tT(s,Nn(e.x)+c/2,Nn(e.y)+c/2,Nn(e.w)-c,Nn(e.h)-c,i.borderRadius),s.closePath(),a&&(s.fillStyle=a,s.fill()),o&&c&&(s.strokeStyle=o,s.lineWidth=c,s.lineJoin="miter",s.stroke()))}function nT(s,e,i){var a=i.lineHeight,o=s.w,c=s.x,u=s.y+a/2;return e==="center"?c+=o/2:(e==="end"||e==="right")&&(c+=o),{h:a,w:o,x:c,y:u}}function iT(s,e,i){var a=s.shadowBlur,o=i.stroked,c=Nn(i.x),u=Nn(i.y),f=Nn(i.w);o&&s.strokeText(e,c,u,f),i.filled&&(a&&o&&(s.shadowBlur=0),s.fillText(e,c,u,f),a&&o&&(s.shadowBlur=a))}function sT(s,e,i,a){var o=a.textAlign,c=a.color,u=!!c,f=a.font,d=e.length,m=a.textStrokeColor,p=a.textStrokeWidth,b=m&&p,v;if(!(!d||!u&&!b))for(i=nT(i,o,f),s.font=f.string,s.textAlign=o,s.textBaseline="middle",s.shadowBlur=a.textShadowBlur,s.shadowColor=a.textShadowColor,u&&(s.fillStyle=c),b&&(s.lineJoin="round",s.lineWidth=p,s.strokeStyle=m),v=0,d=e.length;v<d;++v)iT(s,e[v],{stroked:b,filled:u,w:i.w,x:i.x,y:i.y+i.h*v})}var fy=function(s,e,i,a){var o=this;o._config=s,o._index=a,o._model=null,o._rects=null,o._ctx=e,o._el=i};rn(fy.prototype,{_modelize:function(s,e,i,a){var o=this,c=o._index,u=re(Ut([i.font,{}],a,c)),f=Ut([i.color,Gt.color],a,c);return{align:Ut([i.align,"center"],a,c),anchor:Ut([i.anchor,"center"],a,c),area:a.chart.chartArea,backgroundColor:Ut([i.backgroundColor,null],a,c),borderColor:Ut([i.borderColor,null],a,c),borderRadius:Ut([i.borderRadius,0],a,c),borderWidth:Ut([i.borderWidth,0],a,c),clamp:Ut([i.clamp,!1],a,c),clip:Ut([i.clip,!1],a,c),color:f,display:s,font:u,lines:e,offset:Ut([i.offset,4],a,c),opacity:Ut([i.opacity,1],a,c),origin:P2(o._el,a),padding:Le(Ut([i.padding,4],a,c)),positioner:$2(o._el),rotation:Ut([i.rotation,0],a,c)*(Math.PI/180),size:Ga.textSize(o._ctx,e,u),textAlign:Ut([i.textAlign,"start"],a,c),textShadowBlur:Ut([i.textShadowBlur,0],a,c),textShadowColor:Ut([i.textShadowColor,f],a,c),textStrokeColor:Ut([i.textStrokeColor,f],a,c),textStrokeWidth:Ut([i.textStrokeWidth,0],a,c)}},update:function(s){var e=this,i=null,a=null,o=e._index,c=e._config,u,f,d,m=Ut([c.display,!0],s,o);m&&(u=s.dataset.data[o],f=ht(Nt(c.formatter,[u,s]),u),d=xt(f)?[]:Ga.toTextLines(f),d.length&&(i=e._modelize(m,d,c,s),a=I2(i))),e._model=i,e._rects=a},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(s,e){var i=this,a=s.ctx,o=i._model,c=i._rects,u;this.visible()&&(a.save(),o.clip&&(u=o.area,a.beginPath(),a.rect(u.left,u.top,u.right-u.left,u.bottom-u.top),a.clip()),a.globalAlpha=Ga.bound(0,o.opacity,1),a.translate(Nn(e.x),Nn(e.y)),a.rotate(o.rotation),eT(a,c.frame,o),sT(a,o.lines,c.text,o),a.restore())}});var aT=Number.MIN_SAFE_INTEGER||-9007199254740991,lT=Number.MAX_SAFE_INTEGER||9007199254740991;function La(s,e,i){var a=Math.cos(i),o=Math.sin(i),c=e.x,u=e.y;return{x:c+a*(s.x-c)-o*(s.y-u),y:u+o*(s.x-c)+a*(s.y-u)}}function Pp(s,e){var i=lT,a=aT,o=e.origin,c,u,f,d,m;for(c=0;c<s.length;++c)u=s[c],f=u.x-o.x,d=u.y-o.y,m=e.vx*f+e.vy*d,i=Math.min(i,m),a=Math.max(a,m);return{min:i,max:a}}function ko(s,e){var i=e.x-s.x,a=e.y-s.y,o=Math.sqrt(i*i+a*a);return{vx:(e.x-s.x)/o,vy:(e.y-s.y)/o,origin:s,ln:o}}var hy=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};rn(hy.prototype,{center:function(){var s=this._rect;return{x:s.x+s.w/2,y:s.y+s.h/2}},update:function(s,e,i){this._rotation=i,this._rect={x:e.x+s.x,y:e.y+s.y,w:e.w,h:e.h}},contains:function(s){var e=this,i=1,a=e._rect;return s=La(s,e.center(),-e._rotation),!(s.x<a.x-i||s.y<a.y-i||s.x>a.x+a.w+i*2||s.y>a.y+a.h+i*2)},intersects:function(s){var e=this._points(),i=s._points(),a=[ko(e[0],e[1]),ko(e[0],e[3])],o,c,u;for(this._rotation!==s._rotation&&a.push(ko(i[0],i[1]),ko(i[0],i[3])),o=0;o<a.length;++o)if(c=Pp(e,a[o]),u=Pp(i,a[o]),c.max<u.min||u.max<c.min)return!1;return!0},_points:function(){var s=this,e=s._rect,i=s._rotation,a=s.center();return[La({x:e.x,y:e.y},a,i),La({x:e.x+e.w,y:e.y},a,i),La({x:e.x+e.w,y:e.y+e.h},a,i),La({x:e.x,y:e.y+e.h},a,i)]}});function dy(s,e,i){var a=e.positioner(s,e),o=a.vx,c=a.vy;if(!o&&!c)return{x:a.x,y:a.y};var u=i.w,f=i.h,d=e.rotation,m=Math.abs(u/2*Math.cos(d))+Math.abs(f/2*Math.sin(d)),p=Math.abs(u/2*Math.sin(d))+Math.abs(f/2*Math.cos(d)),b=1/Math.max(Math.abs(o),Math.abs(c));return m*=o*b,p*=c*b,m+=e.offset*o,p+=e.offset*c,{x:a.x+m,y:a.y+p}}function oT(s,e){var i,a,o,c;for(i=s.length-1;i>=0;--i)for(o=s[i].$layout,a=i-1;a>=0&&o._visible;--a)c=s[a].$layout,c._visible&&o._box.intersects(c._box)&&e(o,c);return s}function rT(s){var e,i,a,o,c,u,f;for(e=0,i=s.length;e<i;++e)a=s[e],o=a.$layout,o._visible&&(f=new Proxy(a._el,{get:(d,m)=>d.getProps([m],!0)[m]}),c=a.geometry(),u=dy(f,a.model(),c),o._box.update(u,c,a.rotation()));return oT(s,function(d,m){var p=d._hidable,b=m._hidable;p&&b||b?m._visible=!1:p&&(d._visible=!1)})}var Qa={prepare:function(s){var e=[],i,a,o,c,u;for(i=0,o=s.length;i<o;++i)for(a=0,c=s[i].length;a<c;++a)u=s[i][a],e.push(u),u.$layout={_box:new hy,_hidable:!1,_visible:!0,_set:i,_idx:u._index};return e.sort(function(f,d){var m=f.$layout,p=d.$layout;return m._idx===p._idx?p._set-m._set:p._idx-m._idx}),this.update(e),e},update:function(s){var e=!1,i,a,o,c,u;for(i=0,a=s.length;i<a;++i)o=s[i],c=o.model(),u=o.$layout,u._hidable=c&&c.display==="auto",u._visible=o.visible(),e|=u._hidable;e&&rT(s)},lookup:function(s,e){var i,a;for(i=s.length-1;i>=0;--i)if(a=s[i].$layout,a&&a._visible&&a._box.contains(e))return s[i];return null},draw:function(s,e){var i,a,o,c,u,f;for(i=0,a=e.length;i<a;++i)o=e[i],c=o.$layout,c._visible&&(u=o.geometry(),f=dy(o._el,o.model(),u),c._box.update(f,u,o.rotation()),o.draw(s,f))}},cT=function(s){if(xt(s))return null;var e=s,i,a,o;if(pt(s))if(!xt(s.label))e=s.label;else if(!xt(s.r))e=s.r;else for(e="",i=Object.keys(s),o=0,a=i.length;o<a;++o)e+=(o!==0?", ":"")+i[o]+": "+s[i[o]];return""+e},uT={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:cT,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Te="$datalabels",gy="$default";function fT(s,e){var i=s.datalabels,a={},o=[],c,u;return i===!1?null:(i===!0&&(i={}),e=rn({},[e,i]),c=e.labels||{},u=Object.keys(c),delete e.labels,u.length?u.forEach(function(f){c[f]&&o.push(rn({},[e,c[f],{_key:f}]))}):o.push(e),a=o.reduce(function(f,d){return At(d.listeners||{},function(m,p){f[p]=f[p]||{},f[p][d._key||gy]=m}),delete d.listeners,f},{}),{labels:o,listeners:a})}function tf(s,e,i,a){if(e){var o=i.$context,c=i.$groups,u;e[c._set]&&(u=e[c._set][c._key],u&&Nt(u,[o,a])===!0&&(s[Te]._dirty=!0,i.update(o)))}}function hT(s,e,i,a,o){var c,u;!i&&!a||(i?a?i!==a&&(u=c=!0):u=!0:c=!0,u&&tf(s,e.leave,i,o),c&&tf(s,e.enter,a,o))}function dT(s,e){var i=s[Te],a=i._listeners,o,c;if(!(!a.enter&&!a.leave)){if(e.type==="mousemove")c=Qa.lookup(i._labels,e);else if(e.type!=="mouseout")return;o=i._hovered,i._hovered=c,hT(s,a,o,c,e)}}function gT(s,e){var i=s[Te],a=i._listeners.click,o=a&&Qa.lookup(i._labels,e);o&&tf(s,a,o,e)}var mT={id:"datalabels",defaults:uT,beforeInit:function(s){s[Te]={_actives:[]}},beforeUpdate:function(s){var e=s[Te];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(s,e,i){var a=e.index,o=s[Te],c=o._datasets[a]=[],u=s.isDatasetVisible(a),f=s.data.datasets[a],d=fT(f,i),m=e.meta.data||[],p=s.ctx,b,v,S,T,M,A,D,L;for(p.save(),b=0,S=m.length;b<S;++b)if(D=m[b],D[Te]=[],u&&D&&s.getDataVisibility(b)&&!D.skip)for(v=0,T=d.labels.length;v<T;++v)M=d.labels[v],A=M._key,L=new fy(M,p,D,b),L.$groups={_set:a,_key:A||gy},L.$context={active:!1,chart:s,dataIndex:b,dataset:f,datasetIndex:a},L.update(L.$context),D[Te].push(L),c.push(L);p.restore(),rn(o._listeners,d.listeners,{merger:function(q,G,Y){G[q]=G[q]||{},G[q][e.index]=Y[q],o._listened=!0}})},afterUpdate:function(s){s[Te]._labels=Qa.prepare(s[Te]._datasets)},afterDatasetsDraw:function(s){Qa.draw(s,s[Te]._labels)},beforeEvent:function(s,e){if(s[Te]._listened){var i=e.event;switch(i.type){case"mousemove":case"mouseout":dT(s,i);break;case"click":gT(s,i);break}}},afterEvent:function(s){var e=s[Te],i=e._actives,a=e._actives=s.getActiveElements(),o=Ga.arrayDiff(i,a),c,u,f,d,m,p,b;for(c=0,u=o.length;c<u;++c)if(m=o[c],m[1])for(b=m[0].element[Te]||[],f=0,d=b.length;f<d;++f)p=b[f],p.$context.active=m[1]===1,p.update(p.$context);(e._dirty||o.length)&&(Qa.update(e._labels),s.render()),delete e._dirty}};const Vu=1e3;function pT(){if(typeof window>"u")return"light";const s=localStorage.getItem("smart-edit-theme");return s==="dark"||s==="light"?s:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function yT(){return typeof window>"u"?!1:localStorage.getItem("smart-edit-sidebar-collapsed")==="true"}function bT(){if(typeof window>"u")return"en";const s=localStorage.getItem("smart-edit-locale");return s==="ja"||s==="en"?s:navigator.language.toLowerCase().startsWith("ja")?"ja":"en"}function my(){return{searchKeyword:"",logLevels:new Set,toolNames:new Set}}const vT={logs:[],maxLogIdx:-1,toolNames:[],toolStats:null,theme:pT(),locale:bT(),isStatsVisible:!1,connectionMode:"disconnected",activeProject:null,error:null,isLoading:!1,currentView:"dashboard",sidebarCollapsed:yT(),logFilter:my(),currentSession:null,sessionHistory:[]};function xT(s,e){switch(e.type){case"SET_LOGS":return{...s,logs:e.logs.slice(-Vu),maxLogIdx:e.maxIdx};case"APPEND_LOG":{const i=[...s.logs,e.log];return{...s,logs:i.length>Vu?i.slice(-Vu):i,maxLogIdx:e.maxIdx}}case"SET_TOOL_NAMES":return{...s,toolNames:e.toolNames};case"SET_TOOL_STATS":return{...s,toolStats:e.stats};case"SET_THEME":return localStorage.setItem("smart-edit-theme",e.theme),document.documentElement.setAttribute("data-theme",e.theme),{...s,theme:e.theme};case"SET_LOCALE":return localStorage.setItem("smart-edit-locale",e.locale),{...s,locale:e.locale};case"TOGGLE_STATS":return{...s,isStatsVisible:!s.isStatsVisible};case"SET_CONNECTION_MODE":return{...s,connectionMode:e.mode};case"SET_ACTIVE_PROJECT":return{...s,activeProject:e.project};case"SET_ERROR":return{...s,error:e.error};case"SET_LOADING":return{...s,isLoading:e.isLoading};case"CLEAR_LOGS":return{...s,logs:[],maxLogIdx:-1};case"SET_CURRENT_VIEW":return{...s,currentView:e.view};case"TOGGLE_SIDEBAR":{const i=!s.sidebarCollapsed;return localStorage.setItem("smart-edit-sidebar-collapsed",String(i)),{...s,sidebarCollapsed:i}}case"SET_LOG_FILTER":return{...s,logFilter:{...s.logFilter,...e.filter}};case"CLEAR_LOG_FILTERS":return{...s,logFilter:my()};case"START_SESSION":return{...s,currentSession:e.session};case"END_SESSION":return s.currentSession?{...s,sessionHistory:[{...s.currentSession,endTime:new Date},...s.sessionHistory].slice(0,50),currentSession:null}:s;case"LOAD_SESSION_HISTORY":return{...s,sessionHistory:e.sessions};case"CLEAR_SESSION_HISTORY":return{...s,sessionHistory:[]};default:return s}}const py=Z.createContext(null);function _T({children:s}){const[e,i]=Z.useReducer(xT,vT);return x.jsx(py.Provider,{value:{state:e,dispatch:i},children:s})}function di(){const s=Z.useContext(py);if(!s)throw new Error("useDashboard must be used within a DashboardProvider");return s}function Pe(){return di().state}function bf(){return di().dispatch}async function $p(s=0){const e=await fetch("/get_log_messages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({start_idx:s})});if(!e.ok)throw new Error(`Failed to fetch logs: ${e.statusText}`);return e.json()}async function t0(){const s=await fetch("/get_tool_names");if(!s.ok)throw new Error(`Failed to fetch tool names: ${s.statusText}`);return(await s.json()).tool_names??[]}async function ST(){const s=await fetch("/get_tool_stats");if(!s.ok)throw new Error(`Failed to fetch tool stats: ${s.statusText}`);return(await s.json()).stats??{}}async function TT(){const s=await fetch("/clear_tool_stats",{method:"POST"});if(!s.ok)throw new Error(`Failed to clear tool stats: ${s.statusText}`)}async function MT(){const s=await fetch("/get_token_count_estimator_name");if(!s.ok)throw new Error(`Failed to fetch token estimator name: ${s.statusText}`);return(await s.json()).token_count_estimator_name??"unknown"}async function ET(){await fetch("/shutdown",{method:"PUT"})}const AT=1e3,OT=3;function CT(s){return s.startsWith("DEBUG")?"debug":s.startsWith("INFO")?"info":s.startsWith("WARNING")?"warning":s.startsWith("ERROR")?"error":"default"}function Lo(s,e){return{id:e,message:s,level:CT(s)}}const yy=Z.createContext(null);function DT({children:s}){const{state:e,dispatch:i}=di(),a=Z.useRef(null),o=Z.useRef(null),c=Z.useRef(0),u=Z.useRef(e.maxLogIdx);u.current=e.maxLogIdx;const f=Z.useCallback(async()=>{try{i({type:"SET_LOADING",isLoading:!0});const T=await t0();i({type:"SET_TOOL_NAMES",toolNames:T});const M=await $p(0),A=M.messages.map((D,L)=>Lo(D,L));i({type:"SET_LOGS",logs:A,maxIdx:M.max_idx}),i({type:"SET_ACTIVE_PROJECT",project:M.active_project}),i({type:"SET_ERROR",error:null})}catch(T){i({type:"SET_ERROR",error:T instanceof Error?T.message:String(T)})}finally{i({type:"SET_LOADING",isLoading:!1})}},[i]),d=Z.useCallback(async()=>{try{const T=await $p(u.current+1);if(c.current=0,T.messages.length>0)for(let M=0;M<T.messages.length;M++){const A=u.current+1+M,D=Lo(T.messages[M],A);i({type:"APPEND_LOG",log:D,maxIdx:A})}i({type:"SET_ACTIVE_PROJECT",project:T.active_project})}catch{c.current++,c.current>=OT&&window.close()}},[i]),m=Z.useCallback(()=>{o.current===null&&(i({type:"SET_CONNECTION_MODE",mode:"polling"}),o.current=window.setInterval(d,AT))},[i,d]),p=Z.useCallback(()=>{o.current!==null&&(clearInterval(o.current),o.current=null)},[]),b=Z.useCallback(()=>{if(!window.EventSource)return!1;try{const T=new EventSource("/log_stream");a.current=T;let M=!1;return T.addEventListener("open",()=>{i({type:"SET_CONNECTION_MODE",mode:"streaming"}),p()}),T.addEventListener("history",A=>{M=!0;const D=JSON.parse(A.data),L=D.messages.map((q,G)=>Lo(q,G));i({type:"SET_LOGS",logs:L,maxIdx:D.maxIdx}),i({type:"SET_ACTIVE_PROJECT",project:D.activeProject})}),T.addEventListener("log",A=>{const D=JSON.parse(A.data),L=Lo(D.message,D.idx);i({type:"APPEND_LOG",log:L,maxIdx:D.idx}),i({type:"SET_ACTIVE_PROJECT",project:D.activeProject})}),T.addEventListener("toolNames",A=>{const D=JSON.parse(A.data);i({type:"SET_TOOL_NAMES",toolNames:D.toolNames})}),T.onerror=()=>{T.close(),a.current=null,i({type:"SET_CONNECTION_MODE",mode:"disconnected"}),M?m():f().then(()=>{m()})},!0}catch{return!1}},[i,p,f,m]),v=Z.useCallback(()=>{a.current&&(a.current.close(),a.current=null),p(),b()||f().then(()=>{m()})},[b,p,f,m]);Z.useEffect(()=>((async()=>{const M=await t0().catch(()=>[]);i({type:"SET_TOOL_NAMES",toolNames:M}),b()||(await f(),m())})(),()=>{a.current&&a.current.close(),p()}),[i,b,f,m,p]),Z.useEffect(()=>{const T=()=>{document.visibilityState==="visible"&&e.connectionMode==="disconnected"&&v()};return document.addEventListener("visibilitychange",T),()=>document.removeEventListener("visibilitychange",T)},[e.connectionMode,v]);const S=Z.useCallback(async()=>{i({type:"CLEAR_LOGS"}),await f()},[i,f]);return x.jsx(yy.Provider,{value:{reloadLogs:S,reconnect:v},children:s})}function zT(){const s=Z.useContext(yy);if(!s)throw new Error("useLogStreamActions must be used within a LogStreamProvider");return s}const wT={nav:{dashboard:"Dashboard",logs:"Logs",statistics:"Statistics",sessions:"Sessions",shutdown:"Shutdown"},status:{connected:"Connected",polling:"Polling",disconnected:"Disconnected"},dashboard:{welcome:"Welcome to Smart Edit",welcomeWithProject:"Welcome to {project}",description:"Monitor your coding sessions, view logs, and analyze tool usage statistics.",logEntries:"Log Entries",toolCalls:"Tool Calls",totalTokens:"Total Tokens",topTool:"Top Tool",currentSession:"Current session",toolsUsed:"{count} tools used",inputOutput:"Input + Output",calls:"{count} calls",noData:"No data",quickNavigation:"Quick Navigation",viewLogs:"View Logs",viewLogsDesc:"Real-time log stream with filtering",statisticsDesc:"Tool usage and token analytics",sessionsDesc:"Session history and export"},stats:{refresh:"Refresh",loading:"Loading...",clearStats:"Clear Stats",tokenEstimator:"Token estimator: {name}",noStatsYet:"No tool stats collected yet.",noStatsHint:"Tool statistics will appear here once tools are used during the session.",totalCalls:"Total Calls",inputTokens:"Input Tokens",outputTokens:"Output Tokens",totalInput:"Total input",totalOutput:"Total output",mostUsedTool:"Most Used Tool",activityOverTime:"Activity Over Time",noActivityYet:"No activity recorded yet",activityHint:"Activity will appear here as tools are used",clearHistory:"Clear History",tokenDistribution:"Token Distribution by Tool",callDistribution:"Call Distribution",tokenBreakdown:"Token Breakdown",noToolData:"No tool usage data available"},logs:{searchPlaceholder:"Search logs...",logLevel:"Log Level",tool:"Tool",clearFilters:"Clear Filters",reloadLogs:"Reload logs",noLogs:"No log entries to display.",noLogsHint:"Logs will appear here once the server starts producing output.",noMatchingLogs:"No logs match the current filters.",debug:"Debug",info:"Info",warning:"Warning",error:"Error"},sessions:{currentSession:"Current Session",noActiveSession:"No active session",sessionHistory:"Session History",sessionsRecorded:"{count} sessions recorded",sessionRecorded:"{count} session recorded",noHistory:"No session history available.",noHistoryHint:"Session history will appear here as you use Smart Edit.",exportJson:"Export JSON",exportAll:"Export All",export:"Export",exportSession:"Export session as JSON",clearHistory:"Clear History",started:"Started",ended:"Ended",duration:"Duration",inProgress:"In progress",calls:"Calls",input:"Input",output:"Output",tokens:"Tokens",active:"Active",confirmClearHistory:"Are you sure you want to clear all session history?"},common:{close:"Close",cancel:"Cancel",confirm:"Confirm",loading:"Loading...",error:"Error",success:"Success"},sidebar:{expand:"Expand sidebar",collapse:"Collapse sidebar",shutdownConfirm:"This will fully terminate the Smart Edit server.",project:"Project",noProject:"No project active",instances:"Projects"},theme:{switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode"}},jT={nav:{dashboard:"ダッシュボード",logs:"ログ",statistics:"統計",sessions:"セッション",shutdown:"シャットダウン"},status:{connected:"接続中",polling:"ポーリング中",disconnected:"切断"},dashboard:{welcome:"Smart Edit へようこそ",welcomeWithProject:"{project} へようこそ",description:"コーディングセッションの監視、ログの表示、ツール使用統計の分析ができます。",logEntries:"ログエントリ",toolCalls:"ツール呼び出し",totalTokens:"合計トークン",topTool:"よく使うツール",currentSession:"現在のセッション",toolsUsed:"{count} ツール使用",inputOutput:"入力 + 出力",calls:"{count} 回",noData:"データなし",quickNavigation:"クイックナビゲーション",viewLogs:"ログを表示",viewLogsDesc:"フィルタ付きリアルタイムログ",statisticsDesc:"ツール使用量とトークン分析",sessionsDesc:"セッション履歴とエクスポート"},stats:{refresh:"更新",loading:"読み込み中...",clearStats:"統計をクリア",tokenEstimator:"トークン推定: {name}",noStatsYet:"ツール統計はまだありません。",noStatsHint:"セッション中にツールが使用されると、ここに統計が表示されます。",totalCalls:"合計呼び出し",inputTokens:"入力トークン",outputTokens:"出力トークン",totalInput:"入力合計",totalOutput:"出力合計",mostUsedTool:"最多使用ツール",activityOverTime:"アクティビティ推移",noActivityYet:"アクティビティはまだありません",activityHint:"ツールが使用されるとここに表示されます",clearHistory:"履歴をクリア",tokenDistribution:"ツール別トークン分布",callDistribution:"呼び出し分布",tokenBreakdown:"トークン内訳",noToolData:"ツール使用データがありません"},logs:{searchPlaceholder:"ログを検索...",logLevel:"ログレベル",tool:"ツール",clearFilters:"フィルタをクリア",reloadLogs:"ログを再読み込み",noLogs:"表示するログエントリがありません。",noLogsHint:"サーバーが出力を開始すると、ここにログが表示されます。",noMatchingLogs:"現在のフィルタに一致するログがありません。",debug:"デバッグ",info:"情報",warning:"警告",error:"エラー"},sessions:{currentSession:"現在のセッション",noActiveSession:"アクティブなセッションがありません",sessionHistory:"セッション履歴",sessionsRecorded:"{count} 件のセッション",sessionRecorded:"{count} 件のセッション",noHistory:"セッション履歴がありません。",noHistoryHint:"Smart Edit を使用すると、ここにセッション履歴が表示されます。",exportJson:"JSON エクスポート",exportAll:"すべてエクスポート",export:"エクスポート",exportSession:"セッションをJSONでエクスポート",clearHistory:"履歴をクリア",started:"開始",ended:"終了",duration:"時間",inProgress:"進行中",calls:"呼び出し",input:"入力",output:"出力",tokens:"トークン",active:"アクティブ",confirmClearHistory:"すべてのセッション履歴をクリアしてもよろしいですか?"},common:{close:"閉じる",cancel:"キャンセル",confirm:"確認",loading:"読み込み中...",error:"エラー",success:"成功"},sidebar:{expand:"サイドバーを展開",collapse:"サイドバーを折りたたむ",shutdownConfirm:"Smart Edit サーバーを完全に終了します。",project:"プロジェクト",noProject:"プロジェクト未設定",instances:"プロジェクト"},theme:{switchToLight:"ライトモードに切り替え",switchToDark:"ダークモードに切り替え"}},e0={en:wT,ja:jT};function n0(s,e){const i=e.split(".");let a=s;for(const o of i){if(a==null||typeof a!="object")return;a=a[o]}return typeof a=="string"?a:void 0}const by=Z.createContext(null);function RT(s){return function(i,a){let o=n0(e0[s],i);return o||(o=n0(e0.en,i)),o?(a&&Object.entries(a).forEach(([c,u])=>{o=o.replace(`{${c}}`,String(u))}),o):i}}function gi(){const s=Z.useContext(by);if(!s)throw new Error("useTranslation must be used within an I18nProvider");return s}function NT({children:s}){const{locale:e}=Pe(),i=bf(),a=Z.useMemo(()=>{const o=RT(e);return{locale:e,setLocale:u=>{i({type:"SET_LOCALE",locale:u})},t:o}},[e,i]);return x.jsx(by.Provider,{value:a,children:s})}const kT=5e3,vy=Z.createContext(null);function LT(){return typeof window>"u"?null:localStorage.getItem("smart-edit-active-instance")}function Yu(s){typeof window>"u"||(s?localStorage.setItem("smart-edit-active-instance",s):localStorage.removeItem("smart-edit-active-instance"))}function i0(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get("multi")==="true"||window.location.pathname==="/dashboard/"}function HT({children:s}){const[e,i]=Z.useState({instances:[],activeInstanceId:LT(),isLoading:!1,error:null,isMultiInstanceMode:i0()}),a=Z.useCallback(async()=>{const d=["",`http://127.0.0.1:${window.location.port}`];for(const m of d)try{const p=await fetch(`${m}/api/instances`);if(p.ok)return(await p.json()).instances||[]}catch{}return[]},[]),o=Z.useCallback(async()=>{i(d=>({...d,isLoading:!0,error:null}));try{const d=await a();i(m=>{let p=m.activeInstanceId;return p&&!d.some(b=>b.id===p)&&(p=d.length>0?d[0].id:null,Yu(p)),!p&&d.length>0&&(p=d[0].id,Yu(p)),{...m,instances:d,activeInstanceId:p,isLoading:!1,isMultiInstanceMode:d.length>1||i0()}})}catch(d){i(m=>({...m,isLoading:!1,error:d instanceof Error?d.message:"Failed to fetch instances"}))}},[a]),c=Z.useCallback(d=>{Yu(d),i(m=>({...m,activeInstanceId:d}))},[]),u=Z.useCallback(()=>e.instances.find(d=>d.id===e.activeInstanceId)||null,[e.instances,e.activeInstanceId]);Z.useEffect(()=>{o();const d=setInterval(()=>{o()},kT);return()=>clearInterval(d)},[o]);const f={state:e,setActiveInstance:c,refreshInstances:o,getActiveInstance:u};return x.jsx(vy.Provider,{value:f,children:s})}function BT(){const s=Z.useContext(vy);if(!s)throw new Error("useMultiInstance must be used within a MultiInstanceProvider");return s}function UT(){return x.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",children:[x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"logoGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[x.jsx("stop",{offset:"0%",stopColor:"#FFD700"}),x.jsx("stop",{offset:"100%",stopColor:"#FFA500"})]}),x.jsxs("filter",{id:"logoGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[x.jsx("feGaussianBlur",{stdDeviation:"1",result:"glow"}),x.jsxs("feMerge",{children:[x.jsx("feMergeNode",{in:"glow"}),x.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),x.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",fill:"url(#logoGradient)",filter:"url(#logoGlow)"})]})}function xy(){return x.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function VT(){return x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0"}),x.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"12"})]})}function YT(s){return s&&s.split("/").pop()||null}function qT({instance:s,isActive:e,onClick:i}){const a=YT(s.project);return x.jsxs("button",{className:`instance-item ${e?"active":""}`,onClick:i,title:s.project||"No project",children:[x.jsx("span",{className:`instance-indicator ${e?"active":""}`}),x.jsx(xy,{}),x.jsx("span",{className:"instance-name",children:a||"No project"})]})}function XT(){const{state:s,dispatch:e}=di(),{activeProject:i}=s,{state:a,setActiveInstance:o}=BT(),{instances:c,activeInstanceId:u,isMultiInstanceMode:f}=a,{t:d}=gi(),m=()=>{window.confirm(d("sidebar.shutdownConfirm"))&&(ET(),e({type:"SET_ERROR",error:"Shutting down ..."}),setTimeout(()=>window.close(),2e3))},p=i?i.split("/").pop():null;return x.jsxs("aside",{className:"sidebar",children:[x.jsx("div",{className:"sidebar-header",children:x.jsxs("div",{className:"sidebar-logo",children:[x.jsx("span",{className:"sidebar-logo-icon",children:x.jsx(UT,{})}),x.jsx("span",{className:"sidebar-logo-text",children:"Smart Edit"})]})}),x.jsx("div",{className:"sidebar-content",children:f&&c.length>0?x.jsxs("div",{className:"sidebar-section",children:[x.jsx("h3",{className:"sidebar-section-title",children:d("sidebar.instances")}),x.jsx("div",{className:"instance-list",children:c.map(b=>x.jsx(qT,{instance:b,isActive:b.id===u,onClick:()=>o(b.id)},b.id))})]}):x.jsxs("div",{className:"sidebar-section",children:[x.jsx("h3",{className:"sidebar-section-title",children:d("sidebar.project")}),i?x.jsxs("div",{className:"project-info",children:[x.jsxs("div",{className:"project-name",children:[x.jsx(xy,{}),x.jsx("span",{className:"project-name-text",title:i,children:p})]}),x.jsx("div",{className:"project-path",title:i,children:i})]}):x.jsx("div",{className:"project-empty",children:d("sidebar.noProject")})]})}),x.jsx("div",{className:"sidebar-footer",children:x.jsxs("button",{className:"sidebar-action-btn shutdown-btn",onClick:m,children:[x.jsx(VT,{}),x.jsx("span",{children:d("nav.shutdown")})]})})]})}function GT(){return x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("circle",{cx:"12",cy:"12",r:"5"}),x.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),x.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),x.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),x.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),x.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),x.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),x.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),x.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})}function QT(){return x.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})}function ZT(){const{state:s,dispatch:e}=di(),i=()=>{const a=s.theme==="light"?"dark":"light";e({type:"SET_THEME",theme:a})};return x.jsx("button",{className:"theme-toggle",onClick:i,title:s.theme==="dark"?"Switch to light mode":"Switch to dark mode","aria-label":s.theme==="dark"?"Switch to light mode":"Switch to dark mode",children:x.jsx("span",{className:"icon",children:s.theme==="dark"?x.jsx(GT,{}):x.jsx(QT,{})})})}function FT(){return x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),x.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function KT(){const{locale:s,setLocale:e}=gi(),i=()=>{e(s==="en"?"ja":"en")};return x.jsxs("button",{className:"language-toggle",onClick:i,title:s==="en"?"日本語に切り替え":"Switch to English","aria-label":s==="en"?"日本語に切り替え":"Switch to English",children:[x.jsx("span",{className:"icon",children:x.jsx(FT,{})}),x.jsx("span",{className:"language-code",children:s.toUpperCase()})]})}function WT(){return x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),x.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),x.jsx("rect",{x:"14",y:"14",width:"7",height:"7"}),x.jsx("rect",{x:"3",y:"14",width:"7",height:"7"})]})}function JT(){return x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),x.jsx("path",{d:"M14 2v6h6"}),x.jsx("path",{d:"M16 13H8"}),x.jsx("path",{d:"M16 17H8"}),x.jsx("path",{d:"M10 9H8"})]})}function IT(){return x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M18 20V10"}),x.jsx("path",{d:"M12 20V4"}),x.jsx("path",{d:"M6 20v-6"})]})}function PT(){return x.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}const $T=[{id:"dashboard",labelKey:"nav.dashboard",icon:x.jsx(WT,{})},{id:"logs",labelKey:"nav.logs",icon:x.jsx(JT,{})},{id:"stats",labelKey:"nav.statistics",icon:x.jsx(IT,{})},{id:"sessions",labelKey:"nav.sessions",icon:x.jsx(PT,{})}];function tM(){const{state:s,dispatch:e}=di(),{connectionMode:i}=Pe(),{currentView:a}=s,{t:o}=gi(),c=f=>{e({type:"SET_CURRENT_VIEW",view:f})},u=()=>{switch(i){case"streaming":return o("status.connected");case"polling":return o("status.polling");case"disconnected":return o("status.disconnected")}};return x.jsxs("header",{className:"topbar",children:[x.jsx("nav",{className:"topbar-nav",children:$T.map(f=>x.jsxs("button",{className:`topbar-nav-item ${a===f.id?"active":""}`,onClick:()=>c(f.id),children:[x.jsx("span",{className:"topbar-nav-icon",children:f.icon}),x.jsx("span",{className:"topbar-nav-label",children:o(f.labelKey)})]},f.id))}),x.jsxs("div",{className:"topbar-right",children:[x.jsxs("div",{className:"connection-indicator",children:[x.jsx("span",{className:`connection-dot ${i}`}),x.jsx("span",{children:u()})]}),x.jsx(KT,{}),x.jsx(ZT,{})]})]})}function eM({children:s}){return x.jsxs("div",{className:"main-layout",children:[x.jsx(XT,{}),x.jsxs("div",{className:"main-content",children:[x.jsx(tM,{}),x.jsx("main",{className:"content-area",children:s})]})]})}function nM(s,e){const[i,a]=Z.useState(s);return Z.useEffect(()=>{const o=setTimeout(()=>{a(s)},e);return()=>{clearTimeout(o)}},[s,e]),i}const iM=/\[tool:\s*([^\]]+)\]/i;function _y(s){const e=s.match(iM);return e?e[1].trim():null}function sM(s,e){const i=nM(e.searchKeyword,200);return Z.useMemo(()=>s.filter(a=>{if(e.logLevels.size>0&&!e.logLevels.has(a.level))return!1;if(e.toolNames.size>0){const o=_y(a.message);if(!o||!e.toolNames.has(o))return!1}if(i){const o=i.toLowerCase();if(!a.message.toLowerCase().includes(o))return!1}return!0}),[s,e.logLevels,e.toolNames,i])}function aM(s){return Z.useMemo(()=>{const e=new Set;for(const i of s){const a=_y(i.message);a&&e.add(a)}return Array.from(e).sort()},[s])}function lM({value:s,onChange:e,placeholder:i="Search...",className:a=""}){const o=u=>{e(u.target.value)},c=()=>{e("")};return x.jsxs("div",{className:`search-input-wrapper ${a}`,children:[x.jsx("span",{className:"search-input-icon",children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("circle",{cx:"11",cy:"11",r:"8"}),x.jsx("path",{d:"m21 21-4.35-4.35"})]})}),x.jsx("input",{type:"text",className:"search-input",value:s,onChange:o,placeholder:i}),s&&x.jsx("button",{type:"button",className:"search-input-clear",onClick:c,"aria-label":"Clear search",children:x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M18 6 6 18"}),x.jsx("path",{d:"m6 6 12 12"})]})})]})}function s0({options:s,selected:e,onChange:i,placeholder:a="Select...",className:o="",multiple:c=!0}){const[u,f]=Z.useState(!1),d=Z.useRef(null);Z.useEffect(()=>{const S=T=>{d.current&&!d.current.contains(T.target)&&f(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[]);const m=()=>{f(!u)},p=S=>{const T=new Set(e);T.has(S)?T.delete(S):(c||T.clear(),T.add(S)),i(T)},b=()=>{i(new Set)},v=()=>{if(e.size===0)return a;if(e.size===1){const S=Array.from(e)[0];return s.find(M=>M.value===S)?.label||S}return`${e.size} selected`};return x.jsxs("div",{className:`dropdown ${o}`,ref:d,children:[x.jsxs("button",{type:"button",className:"dropdown-trigger",onClick:m,children:[x.jsx("span",{className:"dropdown-text",children:v()}),x.jsx("span",{className:`dropdown-arrow ${u?"open":""}`,children:x.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:x.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),u&&x.jsxs("div",{className:"dropdown-menu",children:[c&&e.size>0&&x.jsx("button",{type:"button",className:"dropdown-clear",onClick:b,children:"Clear all"}),x.jsx("div",{className:"dropdown-options",children:s.map(S=>x.jsxs("label",{className:"dropdown-option",children:[x.jsx("input",{type:c?"checkbox":"radio",checked:e.has(S.value),onChange:()=>p(S.value)}),x.jsx("span",{className:"dropdown-option-label",children:S.label})]},S.value))})]})]})}function oM(){const{logs:s,logFilter:e}=Pe(),i=bf(),{t:a}=gi(),o=aM(s),{reloadLogs:c}=zT(),[u,f]=Z.useState(!1),d=[{value:"debug",label:a("logs.debug")},{value:"info",label:a("logs.info")},{value:"warning",label:a("logs.warning")},{value:"error",label:a("logs.error")}],m=o.map(A=>({value:A,label:A})),p=A=>{i({type:"SET_LOG_FILTER",filter:{searchKeyword:A}})},b=A=>{i({type:"SET_LOG_FILTER",filter:{logLevels:A}})},v=A=>{i({type:"SET_LOG_FILTER",filter:{toolNames:A}})},S=()=>{i({type:"CLEAR_LOG_FILTERS"})},T=async()=>{f(!0);try{await c()}finally{f(!1)}},M=e.searchKeyword||e.logLevels.size>0||e.toolNames.size>0;return x.jsxs("div",{className:"log-filter-bar",children:[x.jsx(lM,{value:e.searchKeyword,onChange:p,placeholder:a("logs.searchPlaceholder"),className:"log-filter-search"}),x.jsxs("div",{className:"log-filter-dropdowns",children:[x.jsx(s0,{options:d,selected:e.logLevels,onChange:b,placeholder:a("logs.logLevel"),className:"log-filter-level"}),m.length>0&&x.jsx(s0,{options:m,selected:e.toolNames,onChange:v,placeholder:a("logs.tool"),className:"log-filter-tool"}),x.jsx("button",{type:"button",className:`icon-btn reload-btn ${u?"spinning":""}`,onClick:T,disabled:u,title:a("logs.reloadLogs"),children:x.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),x.jsx("path",{d:"M21 3v5h-5"})]})})]}),M&&x.jsx("button",{type:"button",className:"log-filter-clear btn",onClick:S,children:a("logs.clearFilters")})]})}const rM={"<":"<",">":">","&":"&",'"':""","'":"'","`":"`"};function cM(s){return s.replace(/[<>&"'`]/g,e=>rM[e]??e)}function uM(s,e){if(e.length===0)return s;let i=cM(s);for(const a of e){const o=new RegExp(`\\b${fM(a)}\\b`,"gi");i=i.replace(o,'<span class="tool-name">$&</span>')}return i}function fM(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hM({log:s}){const{toolNames:e}=Pe(),i=Z.useMemo(()=>uM(s.message,e),[s.message,e]);return x.jsx("div",{className:`log-${s.level}`,dangerouslySetInnerHTML:{__html:i+`
|
|
13
|
+
`}})}function dM({logs:s,isLoading:e,totalCount:i}){const a=Z.useRef(null),o=Z.useRef(!0);Z.useEffect(()=>{const u=a.current;if(!u)return;const f=()=>{o.current=u.scrollTop+u.clientHeight>=u.scrollHeight-10};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)},[]),Z.useEffect(()=>{const u=a.current;u&&o.current&&(u.scrollTop=u.scrollHeight)},[s]);const c=s.length!==i;return e&&i===0?x.jsx("div",{className:"log-container",ref:a,children:x.jsx("div",{className:"loading",children:"Loading logs..."})}):i===0?x.jsx("div",{className:"log-container",ref:a,children:x.jsx("div",{className:"loading",children:"No log messages found."})}):s.length===0&&c?x.jsx("div",{className:"log-container",ref:a,children:x.jsx("div",{className:"loading",children:"No logs match the current filters."})}):x.jsxs("div",{className:"log-container",ref:a,children:[c&&x.jsxs("div",{className:"filter-stats",children:["Showing ",x.jsx("span",{className:"filter-stats-count",children:s.length})," of"," ",x.jsx("span",{className:"filter-stats-count",children:i})," logs"]}),s.map(u=>x.jsx(hM,{log:u},u.id))]})}function gM(){const{error:s}=Pe();return s?x.jsx("div",{id:"error-container",children:x.jsx("div",{className:"error-message",children:s})}):null}function wn({children:s,title:e,subtitle:i,actions:a,className:o="",style:c}){return x.jsxs("div",{className:`card ${o}`,style:c,children:[(e||a)&&x.jsxs("div",{className:"card-header",children:[x.jsxs("div",{children:[e&&x.jsx("h3",{className:"card-title",children:e}),i&&x.jsx("p",{className:"card-subtitle",children:i})]}),a&&x.jsx("div",{className:"card-actions",children:a})]}),x.jsx("div",{className:"card-body",children:s})]})}function mM(){const{logs:s,logFilter:e,isLoading:i}=Pe(),a=sM(s,e);return x.jsxs("div",{className:"log-panel",children:[x.jsx(gM,{}),x.jsxs(wn,{className:"log-card",style:{flex:1,display:"flex",flexDirection:"column"},children:[x.jsx("div",{className:"log-panel-header",children:x.jsx(oM,{})}),x.jsx("div",{className:"log-panel-content",children:x.jsx(dM,{logs:a,isLoading:i,totalCount:s.length})})]})]})}function Sy(){const{dispatch:s}=di(),[e,i]=Z.useState(!1),[a,o]=Z.useState("unknown"),c=Z.useCallback(async()=>{i(!0);try{const[f,d]=await Promise.all([ST(),MT()]);s({type:"SET_TOOL_STATS",stats:f}),o(d)}catch(f){console.error("Failed to load stats:",f)}finally{i(!1)}},[s]),u=Z.useCallback(async()=>{try{await TT(),await c()}catch(f){console.error("Failed to clear stats:",f)}},[c]);return{loadStats:c,clearStats:u,isLoading:e,tokenEstimatorName:a}}function Ty(s){return Z.useMemo(()=>{if(!s)return{totalCalls:0,totalInputTokens:0,totalOutputTokens:0,totalTokens:0,toolCount:0,mostUsedTool:null,topTools:[]};const e=Object.entries(s);let i=0,a=0,o=0,c=null;const f=e.map(([d,m])=>(i+=m.num_times_called,a+=m.input_tokens,o+=m.output_tokens,(!c||m.num_times_called>c.calls)&&(c={name:d,calls:m.num_times_called}),{name:d,calls:m.num_times_called,inputTokens:m.input_tokens,outputTokens:m.output_tokens})).sort((d,m)=>m.calls-d.calls).slice(0,5);return{totalCalls:i,totalInputTokens:a,totalOutputTokens:o,totalTokens:a+o,toolCount:e.length,mostUsedTool:c,topTools:f}},[s])}function $a(s){return s>=1e6?(s/1e6).toFixed(1)+"M":s>=1e3?(s/1e3).toFixed(1)+"K":s.toString()}function pM(s){return s?Object.values(s).reduce((e,i)=>({calls:e.calls+i.num_times_called,inputTokens:e.inputTokens+i.input_tokens,outputTokens:e.outputTokens+i.output_tokens}),{calls:0,inputTokens:0,outputTokens:0}):{calls:0,inputTokens:0,outputTokens:0}}function yM(s){return s.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}const a0=60;function bM(s){const[e,i]=Z.useState([]),a=Z.useRef(null);Z.useEffect(()=>{const c=pM(s);if(a.current===null){a.current=c;return}const u=a.current,f=c.calls-u.calls,d=c.inputTokens-u.inputTokens,m=c.outputTokens-u.outputTokens;if(f>0||d>0||m>0){const p=new Date,b={timestamp:p,label:yM(p),calls:f,inputTokens:d,outputTokens:m};i(v=>{const S=[...v,b];return S.length>a0?S.slice(-a0):S})}a.current=c},[s]);const o=Z.useCallback(()=>{i([]),a.current=null},[]);return{history:e,clearHistory:o}}function ui({title:s,value:e,subtitle:i,icon:a,trend:o,className:c=""}){return x.jsxs("div",{className:`metric-card ${c}`,children:[x.jsxs("div",{className:"metric-card-header",children:[x.jsx("span",{className:"metric-card-title",children:s}),a&&x.jsx("span",{className:"metric-card-icon",children:a})]}),x.jsx("div",{className:"metric-card-value",children:e}),(i||o)&&x.jsxs("div",{className:"metric-card-footer",children:[i&&x.jsx("span",{className:"metric-card-subtitle",children:i}),o&&x.jsxs("span",{className:`metric-card-trend ${o.direction}`,children:[o.direction==="up"&&"+",o.direction==="down"&&"-",Math.abs(o.value),"%"]})]})]})}function js({value:s,duration:e=500,formatter:i=o=>o.toLocaleString(),className:a=""}){const[o,c]=Z.useState(s),u=Z.useRef(s),f=Z.useRef(void 0);return Z.useEffect(()=>{const d=u.current,m=s,p=performance.now(),b=v=>{const S=v-p,T=Math.min(S/e,1),M=1-(1-T)*(1-T),A=Math.round(d+(m-d)*M);c(A),T<1?f.current=requestAnimationFrame(b):u.current=m};return d!==m&&(f.current=requestAnimationFrame(b)),()=>{f.current&&cancelAnimationFrame(f.current)}},[s,e]),x.jsx("span",{className:`live-counter ${a}`,children:i(o)})}const My="label";function l0(s,e){typeof s=="function"?s(e):s&&(s.current=e)}function vM(s,e){const i=s.options;i&&e&&Object.assign(i,e)}function Ey(s,e){s.labels=e}function Ay(s,e,i=My){const a=[];s.datasets=e.map(o=>{const c=s.datasets.find(u=>u[i]===o[i]);return!c||!o.data||a.includes(c)?{...o}:(a.push(c),Object.assign(c,o),c)})}function xM(s,e=My){const i={labels:[],datasets:[]};return Ey(i,s.labels),Ay(i,s.datasets,e),i}function _M(s,e){const{height:i=150,width:a=300,redraw:o=!1,datasetIdKey:c,type:u,data:f,options:d,plugins:m=[],fallbackContent:p,updateMode:b,...v}=s,S=Z.useRef(null),T=Z.useRef(null),M=()=>{S.current&&(T.current=new Io(S.current,{type:u,data:xM(f,c),options:d&&{...d},plugins:m}),l0(e,T.current))},A=()=>{l0(e,null),T.current&&(T.current.destroy(),T.current=null)};return Z.useEffect(()=>{!o&&T.current&&d&&vM(T.current,d)},[o,d]),Z.useEffect(()=>{!o&&T.current&&Ey(T.current.config.data,f.labels)},[o,f.labels]),Z.useEffect(()=>{!o&&T.current&&f.datasets&&Ay(T.current.config.data,f.datasets,c)},[o,f.datasets]),Z.useEffect(()=>{T.current&&(o?(A(),setTimeout(M)):T.current.update(b))},[o,d,f.labels,f.datasets,b]),Z.useEffect(()=>{T.current&&(A(),setTimeout(M))},[u]),Z.useEffect(()=>(M(),()=>A()),[]),x.jsx("canvas",{ref:S,role:"img",height:i,width:a,...v,children:p})}const SM=Z.forwardRef(_M);function vf(s,e){return Io.register(e),Z.forwardRef((i,a)=>x.jsx(SM,{...i,ref:a,type:s}))}const TM=vf("line",E1),MM=vf("bar",S1),EM=vf("pie",A1);function xf(){const{theme:s}=Pe();return Z.useMemo(()=>({textColor:s==="dark"?"#ffffff":"#000000",gridColor:s==="dark"?"#444444":"#dddddd",legendColor:s==="dark"?"#ffffff":"#000000"}),[s])}function AM({toolStats:s,maxTools:e=8}){const i=xf();if(!s||Object.keys(s).length===0)return x.jsx("div",{className:"chart-empty",children:x.jsx("p",{children:"No tool usage data available"})});const a=Object.entries(s).map(([u,f])=>({name:u,inputTokens:f.input_tokens,outputTokens:f.output_tokens,total:f.input_tokens+f.output_tokens})).sort((u,f)=>f.total-u.total).slice(0,e),o={labels:a.map(u=>u.name),datasets:[{label:"Input Tokens",data:a.map(u=>u.inputTokens),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"Output Tokens",data:a.map(u=>u.outputTokens),backgroundColor:"rgba(34, 197, 94, 0.8)",borderColor:"rgba(34, 197, 94, 1)",borderWidth:1}]},c={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{color:i.textColor,font:{size:11}}},datalabels:{display:!1},tooltip:{callbacks:{label:u=>{const f=u.parsed.x??0;return`${u.dataset.label}: ${f.toLocaleString()}`}}}},scales:{x:{stacked:!0,grid:{color:i.gridColor},ticks:{color:i.textColor,callback:function(u){const f=typeof u=="number"?u:parseFloat(String(u));return f>=1e3?(f/1e3).toFixed(0)+"K":f}}},y:{stacked:!0,grid:{display:!1},ticks:{color:i.textColor}}}};return x.jsx("div",{className:"chart-container",style:{height:Math.max(200,a.length*40)},children:x.jsx(MM,{data:o,options:c})})}function OM({history:s,onClear:e}){const i=xf();if(s.length===0)return x.jsxs("div",{className:"chart-empty",children:[x.jsx("p",{children:"No activity recorded yet"}),x.jsx("p",{className:"chart-empty-hint",children:"Activity will appear here as tools are used"})]});const a={labels:s.map(c=>c.label),datasets:[{label:"Calls",data:s.map(c=>c.calls),borderColor:"rgba(139, 92, 246, 1)",backgroundColor:"rgba(139, 92, 246, 0.1)",fill:!0,tension:.3,yAxisID:"y"},{label:"Input Tokens",data:s.map(c=>c.inputTokens),borderColor:"rgba(59, 130, 246, 1)",backgroundColor:"rgba(59, 130, 246, 0.1)",fill:!1,tension:.3,yAxisID:"y1"},{label:"Output Tokens",data:s.map(c=>c.outputTokens),borderColor:"rgba(34, 197, 94, 1)",backgroundColor:"rgba(34, 197, 94, 0.1)",fill:!1,tension:.3,yAxisID:"y1"}]},o={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"top",labels:{color:i.textColor,font:{size:11},usePointStyle:!0,pointStyle:"circle"}},datalabels:{display:!1},tooltip:{callbacks:{label:c=>{const u=c.parsed.y??0,f=c.dataset.label||"";return f==="Calls"?`${f}: ${u}`:`${f}: ${u.toLocaleString()}`}}}},scales:{x:{grid:{color:i.gridColor},ticks:{color:i.textColor,maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10}},y:{type:"linear",display:!0,position:"left",title:{display:!0,text:"Calls",color:i.textColor},grid:{color:i.gridColor},ticks:{color:i.textColor,stepSize:1},min:0},y1:{type:"linear",display:!0,position:"right",title:{display:!0,text:"Tokens",color:i.textColor},grid:{drawOnChartArea:!1},ticks:{color:i.textColor,callback:function(c){const u=typeof c=="number"?c:parseFloat(String(c));return u>=1e3?(u/1e3).toFixed(0)+"K":u}},min:0}}};return x.jsxs("div",{className:"activity-chart-wrapper",children:[x.jsx("div",{className:"chart-container",style:{height:280},children:x.jsx(TM,{data:a,options:o})}),e&&s.length>0&&x.jsx("div",{className:"chart-actions",children:x.jsx("button",{className:"btn btn-sm",onClick:e,children:"Clear History"})})]})}const o0=["#101010","#1f1f1f","#2e2e2e","#3d3d3d","#4c4c4c","#5b5b5b","#6a6a6a","#797979","#888888","#979797","#a6a6a6","#b5b5b5","#c4c4c4","#d3d3d3","#e2e2e2"];function CM(s){return Array.from({length:s},(e,i)=>o0[i%o0.length])}function qu({title:s,labels:e,data:i}){const{textColor:a}=xf(),o=Z.useMemo(()=>CM(e.length),[e.length]),c=Z.useMemo(()=>({labels:e,datasets:[{data:i,backgroundColor:o}]}),[e,i,o]),u=Z.useMemo(()=>({plugins:{legend:{display:!0,labels:{color:a}},datalabels:{display:!0,color:"white",font:{weight:"bold"},formatter:f=>f}}}),[a]);return x.jsxs("div",{className:"chart-group",children:[x.jsx("h3",{children:s}),x.jsx(EM,{data:c,options:u})]})}function DM(){return x.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function r0(){return x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("path",{d:"M12 6v12"}),x.jsx("path",{d:"M8 10h8"}),x.jsx("path",{d:"M8 14h8"})]})}function zM(){return x.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function wM(){const{toolStats:s}=Pe(),{t:e}=gi(),{loadStats:i,clearStats:a,isLoading:o,tokenEstimatorName:c}=Sy(),u=Ty(s),{history:f,clearHistory:d}=bM(s);Z.useEffect(()=>{s||i()},[s,i]);const m=s?{names:Object.keys(s),counts:Object.values(s).map(p=>p.num_times_called),inputTokens:Object.values(s).map(p=>p.input_tokens),outputTokens:Object.values(s).map(p=>p.output_tokens)}:null;return x.jsxs("div",{className:"stats-panel",children:[x.jsxs("div",{className:"stats-panel-header",children:[x.jsxs("div",{className:"stats-panel-actions",children:[x.jsx("button",{className:"btn",onClick:i,disabled:o,children:e(o?"stats.loading":"stats.refresh")}),x.jsx("button",{className:"btn",onClick:a,children:e("stats.clearStats")})]}),c&&x.jsx("span",{className:"stats-estimator",children:e("stats.tokenEstimator",{name:c})})]}),!s||Object.keys(s).length===0?x.jsx(wn,{children:x.jsxs("div",{className:"stats-empty",children:[x.jsx("p",{children:e("stats.noStatsYet")}),x.jsx("p",{className:"stats-empty-hint",children:e("stats.noStatsHint")})]})}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"metrics-grid",children:[x.jsx(ui,{title:e("stats.totalCalls"),value:x.jsx(js,{value:u.totalCalls}),subtitle:e("dashboard.toolsUsed",{count:u.toolCount}),icon:x.jsx(zM,{})}),x.jsx(ui,{title:e("stats.inputTokens"),value:x.jsx(js,{value:u.totalInputTokens,formatter:$a}),subtitle:e("stats.totalInput"),icon:x.jsx(r0,{})}),x.jsx(ui,{title:e("stats.outputTokens"),value:x.jsx(js,{value:u.totalOutputTokens,formatter:$a}),subtitle:e("stats.totalOutput"),icon:x.jsx(r0,{})}),x.jsx(ui,{title:e("stats.mostUsedTool"),value:u.mostUsedTool?.name||"-",subtitle:u.mostUsedTool?e("dashboard.calls",{count:u.mostUsedTool.calls}):void 0,icon:x.jsx(DM,{})})]}),x.jsx("div",{className:"stats-charts-row",children:x.jsx(wn,{title:e("stats.activityOverTime"),children:x.jsx(OM,{history:f,onClear:d})})}),x.jsxs("div",{className:"stats-charts-grid",children:[x.jsx(wn,{title:e("stats.tokenDistribution"),children:x.jsx(AM,{toolStats:s})}),x.jsx(wn,{title:e("stats.callDistribution"),children:m&&x.jsx(qu,{title:"",labels:m.names,data:m.counts})})]}),x.jsx("div",{className:"stats-charts-row",children:x.jsx(wn,{title:e("stats.tokenBreakdown"),children:x.jsx("div",{className:"pie-charts-row",children:m&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"pie-chart-item",children:x.jsx(qu,{title:e("stats.inputTokens"),labels:m.names,data:m.inputTokens})}),x.jsx("div",{className:"pie-chart-item",children:x.jsx(qu,{title:e("stats.outputTokens"),labels:m.names,data:m.outputTokens})})]})})})})]})]})}const Xu="smart-edit-session-history";function Gu(s){return{id:s.id,startTime:s.startTime.toISOString(),endTime:s.endTime?s.endTime.toISOString():null,projectName:s.projectName,stats:s.stats,toolStats:s.toolStats}}function jM(s){return{id:s.id,startTime:new Date(s.startTime),endTime:s.endTime?new Date(s.endTime):null,projectName:s.projectName,stats:s.stats,toolStats:s.toolStats}}function RM(){const{state:s,dispatch:e}=di();Z.useEffect(()=>{try{const f=localStorage.getItem(Xu);if(f){const m=JSON.parse(f).map(jM);e({type:"LOAD_SESSION_HISTORY",sessions:m})}}catch(f){console.error("Failed to load session history:",f)}},[e]),Z.useEffect(()=>{try{const f=s.sessionHistory.map(Gu);localStorage.setItem(Xu,JSON.stringify(f))}catch(f){console.error("Failed to save session history:",f)}},[s.sessionHistory]);const i=Z.useCallback(f=>{const d={id:crypto.randomUUID(),startTime:new Date,endTime:null,projectName:f,stats:{totalCalls:0,totalInputTokens:0,totalOutputTokens:0},toolStats:null};e({type:"START_SESSION",session:d})},[e]),a=Z.useCallback(()=>{if(s.currentSession&&s.toolStats){const f=Object.values(s.toolStats).reduce((m,p)=>({totalCalls:m.totalCalls+p.num_times_called,totalInputTokens:m.totalInputTokens+p.input_tokens,totalOutputTokens:m.totalOutputTokens+p.output_tokens}),{totalCalls:0,totalInputTokens:0,totalOutputTokens:0}),d={...s.currentSession,stats:f,toolStats:s.toolStats};e({type:"START_SESSION",session:d})}e({type:"END_SESSION"})},[e,s.currentSession,s.toolStats]),o=Z.useCallback(()=>{e({type:"CLEAR_SESSION_HISTORY"}),localStorage.removeItem(Xu)},[e]),c=Z.useCallback(f=>{const d={...Gu(f),exportedAt:new Date().toISOString()};return JSON.stringify(d,null,2)},[]),u=Z.useCallback(()=>{const f={sessions:s.sessionHistory.map(Gu),exportedAt:new Date().toISOString()};return JSON.stringify(f,null,2)},[s.sessionHistory]);return{currentSession:s.currentSession,sessionHistory:s.sessionHistory,startSession:i,endSession:a,clearHistory:o,exportSession:c,exportAllSessions:u}}function NM(s,e){return s.toLocaleDateString(e==="ja"?"ja-JP":"en-US",{year:"numeric",month:"short",day:"numeric"})}function c0(s,e){return s.toLocaleTimeString(e==="ja"?"ja-JP":"en-US",{hour:"2-digit",minute:"2-digit"})}function kM(s,e,i){if(!e)return i;const a=e.getTime()-s.getTime(),o=Math.floor(a/(1e3*60*60)),c=Math.floor(a%(1e3*60*60)/(1e3*60));return o>0?`${o}h ${c}m`:`${c}m`}function LM({sessions:s,onExport:e}){const{t:i,locale:a}=gi();return s.length===0?x.jsxs("div",{className:"session-list-empty",children:[x.jsx("p",{children:i("sessions.noHistory")}),x.jsx("p",{className:"session-list-empty-hint",children:i("sessions.noHistoryHint")})]}):x.jsx("div",{className:"session-list",children:s.map(o=>x.jsxs("div",{className:"session-item",children:[x.jsxs("div",{className:"session-item-header",children:[x.jsxs("div",{className:"session-item-info",children:[x.jsx("span",{className:"session-item-date",children:NM(o.startTime,a)}),x.jsxs("span",{className:"session-item-time",children:[c0(o.startTime,a),o.endTime&&` - ${c0(o.endTime,a)}`]})]}),x.jsx("span",{className:"session-item-duration",children:kM(o.startTime,o.endTime,i("sessions.inProgress"))})]}),o.projectName&&x.jsx("div",{className:"session-item-project",children:o.projectName}),x.jsxs("div",{className:"session-item-stats",children:[x.jsxs("div",{className:"session-stat",children:[x.jsx("span",{className:"session-stat-label",children:i("sessions.calls")}),x.jsx("span",{className:"session-stat-value",children:o.stats.totalCalls})]}),x.jsxs("div",{className:"session-stat",children:[x.jsx("span",{className:"session-stat-label",children:i("sessions.input")}),x.jsx("span",{className:"session-stat-value",children:$a(o.stats.totalInputTokens)})]}),x.jsxs("div",{className:"session-stat",children:[x.jsx("span",{className:"session-stat-label",children:i("sessions.output")}),x.jsx("span",{className:"session-stat-value",children:$a(o.stats.totalOutputTokens)})]})]}),x.jsx("div",{className:"session-item-actions",children:x.jsxs("button",{type:"button",className:"session-action-btn",onClick:()=>e(o),title:i("sessions.exportSession"),children:[x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),x.jsx("polyline",{points:"7 10 12 15 17 10"}),x.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),i("sessions.export")]})})]},o.id))})}function HM({getData:s,filename:e,label:i="Export All",className:a=""}){const o=Z.useCallback(()=>{const c=s(),u=new Blob([c],{type:"application/json"}),f=URL.createObjectURL(u),d=document.createElement("a");d.href=f,d.download=e,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(f)},[s,e]);return x.jsxs("button",{type:"button",className:`btn export-btn ${a}`,onClick:o,children:[x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{marginRight:"6px"},children:[x.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),x.jsx("polyline",{points:"7 10 12 15 17 10"}),x.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),i]})}function BM(s,e){const i=new Blob([s],{type:"application/json"}),a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)}function UM(){const{sessionHistory:s,clearHistory:e,exportSession:i,exportAllSessions:a}=RM(),{t:o}=gi(),c=Z.useCallback(d=>{const m=i(d),p=d.startTime.toISOString().split("T")[0];BM(m,`smart-edit-session-${p}.json`)},[i]),u=Z.useCallback(()=>a(),[a]),f=s.length===1?o("sessions.sessionRecorded",{count:String(s.length)}):o("sessions.sessionsRecorded",{count:String(s.length)});return x.jsx("div",{className:"session-panel",children:x.jsxs(wn,{children:[x.jsxs("div",{className:"session-panel-header",children:[x.jsxs("div",{children:[x.jsx("h3",{className:"session-panel-title",children:o("sessions.sessionHistory")}),x.jsx("p",{className:"session-panel-subtitle",children:f})]}),x.jsx("div",{className:"session-panel-actions",children:s.length>0&&x.jsxs(x.Fragment,{children:[x.jsx(HM,{getData:u,filename:`smart-edit-sessions-${new Date().toISOString().split("T")[0]}.json`,label:o("sessions.exportAll")}),x.jsx("button",{type:"button",className:"btn btn-danger",onClick:e,children:o("sessions.clearHistory")})]})})]}),x.jsx(LM,{sessions:s,onExport:c})]})})}function u0(){return x.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function f0(){return x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),x.jsx("path",{d:"M14 2v6h6"}),x.jsx("path",{d:"M16 13H8"}),x.jsx("path",{d:"M16 17H8"}),x.jsx("path",{d:"M10 9H8"})]})}function h0(){return x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("path",{d:"M12 6v12"}),x.jsx("path",{d:"M8 10h8"}),x.jsx("path",{d:"M8 14h8"})]})}function VM(){return x.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function Qu({title:s,description:e,icon:i,view:a}){const o=bf(),c=()=>{o({type:"SET_CURRENT_VIEW",view:a})};return x.jsxs("button",{type:"button",className:"quick-nav-card",onClick:c,children:[x.jsx("div",{className:"quick-nav-icon",children:i}),x.jsxs("div",{className:"quick-nav-content",children:[x.jsx("h4",{className:"quick-nav-title",children:s}),x.jsx("p",{className:"quick-nav-description",children:e})]}),x.jsx("svg",{className:"quick-nav-arrow",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M9 18l6-6-6-6"})})]})}function YM(){const{logs:s,toolStats:e,activeProject:i}=Pe(),{t:a}=gi(),{loadStats:o}=Sy(),c=Ty(e);return Z.useEffect(()=>{e||o()},[e,o]),x.jsxs("div",{className:"dashboard-overview",children:[x.jsx(wn,{children:x.jsx("div",{className:"welcome-section",children:x.jsxs("div",{className:"welcome-content",children:[x.jsx("h2",{className:"welcome-title",children:i?a("dashboard.welcomeWithProject",{project:i}):a("dashboard.welcome")}),x.jsx("p",{className:"welcome-description",children:a("dashboard.description")})]})})}),x.jsxs("div",{className:"metrics-grid",children:[x.jsx(ui,{title:a("dashboard.logEntries"),value:x.jsx(js,{value:s.length}),subtitle:a("dashboard.currentSession"),icon:x.jsx(f0,{})}),x.jsx(ui,{title:a("dashboard.toolCalls"),value:x.jsx(js,{value:c.totalCalls}),subtitle:a("dashboard.toolsUsed",{count:c.toolCount}),icon:x.jsx(u0,{})}),x.jsx(ui,{title:a("dashboard.totalTokens"),value:x.jsx(js,{value:c.totalTokens,formatter:$a}),subtitle:a("dashboard.inputOutput"),icon:x.jsx(h0,{})}),x.jsx(ui,{title:a("dashboard.topTool"),value:c.mostUsedTool?.name||"-",subtitle:c.mostUsedTool?a("dashboard.calls",{count:c.mostUsedTool.calls}):a("dashboard.noData"),icon:x.jsx(VM,{})})]}),x.jsx(wn,{title:a("dashboard.quickNavigation"),children:x.jsxs("div",{className:"quick-nav-grid",children:[x.jsx(Qu,{title:a("dashboard.viewLogs"),description:a("dashboard.viewLogsDesc"),icon:x.jsx(f0,{}),view:"logs"}),x.jsx(Qu,{title:a("nav.statistics"),description:a("dashboard.statisticsDesc"),icon:x.jsx(u0,{}),view:"stats"}),x.jsx(Qu,{title:a("nav.sessions"),description:a("dashboard.sessionsDesc"),icon:x.jsx(h0,{}),view:"sessions"})]})})]})}function qM(){return x.jsx(YM,{})}function XM(){return x.jsx(mM,{})}function GM(){return x.jsx(wM,{})}function QM(){return x.jsx(UM,{})}function ZM(){const{currentView:s}=Pe();return{dashboard:x.jsx(qM,{}),logs:x.jsx(XM,{}),stats:x.jsx(GM,{}),sessions:x.jsx(QM,{})}[s]}function FM(){const{theme:s,activeProject:e}=Pe();return Z.useEffect(()=>{document.documentElement.setAttribute("data-theme",s)},[s]),Z.useEffect(()=>{document.title=e?`${e} – Smart Edit Dashboard`:"Smart Edit Dashboard"},[e]),x.jsx(eM,{children:x.jsx(ZM,{})})}function KM(){return x.jsx(HT,{children:x.jsx(_T,{children:x.jsx(NT,{children:x.jsx(DT,{children:x.jsx(FM,{})})})})})}Io.register(J0,ey,Po,$0,Y2,G2,O2,H2,D2,_2,mT);const Oy=document.getElementById("root");if(!Oy)throw new Error("Root element not found");lx.createRoot(Oy).render(x.jsx(Z.StrictMode,{children:x.jsx(KM,{})}));
|